mac_updater.cpp File Reference

LicenseInfo
firstyear=2006&license=viewergpl
More...

#include "linden_common.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <curl/curl.h>
#include <pthread.h>
#include "llerror.h"
#include "lltimer.h"
#include "lldir.h"
#include "llfile.h"
#include "llstring.h"
#include <Carbon/Carbon.h>
#include "MoreFilesX.h"
#include "FSCopyObject.h"

Include dependency graph for mac_updater.cpp:

Go to the source code of this file.

Enumerations

enum  {
  kEventClassCustom = 'Cust', kEventCustomProgress = 'Prog', kEventParamCustomCurValue = 'Cur ', kEventParamCustomMaxValue = 'Max ',
  kEventParamCustomText = 'Text', kEventCustomDone = 'Done'
}

Functions

void * updatethreadproc (void *)
OSStatus setProgress (int cur, int max)
OSStatus setProgressText (CFStringRef text)
OSStatus sendProgress (long cur, long max, CFStringRef text=NULL)
OSStatus sendDone (void)
OSStatus dialogHandler (EventHandlerCallRef handler, EventRef event, void *userdata)
int curl_progress_callback_func (void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
int parse_args (int argc, char **argv)
int main (int argc, char **argv)
bool isDirWritable (FSRef &dir)
static void utf8str_to_HFSUniStr255 (HFSUniStr255 *dest, const char *src)
static std::string HFSUniStr255_to_utf8str (const HFSUniStr255 *src)
int restoreObject (const char *aside, const char *target, const char *path, const char *object)
void filterFile (const char *filename)
static bool isFSRefViewerBundle (FSRef *targetRef)
static OSErr findAppBundleOnDiskImage (FSRef *parent, FSRef *app)

Variables

WindowRef gWindow = NULL
EventHandlerRef gEventHandler = NULL
OSStatus gFailure = noErr
Boolean gCancelled = false
char * gUpdateURL
char * gProductName
pthread_t updatethread


Detailed Description

LicenseInfo
firstyear=2006&license=viewergpl

Copyright (c) 2006-2008, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file mac_updater.cpp.


Enumeration Type Documentation

anonymous enum

Enumerator:
kEventClassCustom 
kEventCustomProgress 
kEventParamCustomCurValue 
kEventParamCustomMaxValue 
kEventParamCustomText 
kEventCustomDone 

Definition at line 53 of file mac_updater.cpp.


Function Documentation

int curl_progress_callback_func ( void *  clientp,
double  dltotal,
double  dlnow,
double  ultotal,
double  ulnow 
)

Definition at line 308 of file mac_updater.cpp.

References gCancelled, and sendProgress().

Referenced by updatethreadproc().

Here is the call graph for this function:

Here is the caller graph for this function:

OSStatus dialogHandler ( EventHandlerCallRef  handler,
EventRef  event,
void *  userdata 
)

void filterFile ( const char *  filename  ) 

Definition at line 593 of file mac_updater.cpp.

References gProductName.

static OSErr findAppBundleOnDiskImage ( FSRef *  parent,
FSRef *  app 
) [static]

Definition at line 660 of file mac_updater.cpp.

References HFSUniStr255_to_utf8str(), isFSRefViewerBundle(), llendl, llinfos, and NULL.

Referenced by updatethreadproc().

Here is the call graph for this function:

Here is the caller graph for this function:

static std::string HFSUniStr255_to_utf8str ( const HFSUniStr255 *  src  )  [static]

Definition at line 551 of file mac_updater.cpp.

References utf16str_to_utf8str().

Referenced by findAppBundleOnDiskImage().

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDirWritable ( FSRef &  dir  ) 

Definition at line 492 of file mac_updater.cpp.

References FSGetUserPrivilegesPermissions(), llendl, llinfos, and NULL.

Referenced by updatethreadproc().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool isFSRefViewerBundle ( FSRef *  targetRef  )  [static]

Definition at line 606 of file mac_updater.cpp.

References llendl, llinfos, and NULL.

Referenced by findAppBundleOnDiskImage(), and updatethreadproc().

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

int parse_args ( int  argc,
char **  argv 
)

Definition at line 324 of file mac_updater.cpp.

References gProductName, gUpdateURL, and j.

Referenced by main(), and WinMain().

Here is the caller graph for this function:

int restoreObject ( const char *  aside,
const char *  target,
const char *  path,
const char *  object 
)

Definition at line 558 of file mac_updater.cpp.

References FSCopyObject(), kDupeActionReplace, llendl, llinfos, and NULL.

Here is the call graph for this function:

OSStatus sendDone ( void   ) 

Definition at line 201 of file mac_updater.cpp.

References gWindow, kEventClassCustom, kEventCustomDone, and NULL.

Referenced by updatethreadproc().

Here is the caller graph for this function:

OSStatus sendProgress ( long  cur,
long  max,
CFStringRef  text = NULL 
)

Definition at line 130 of file mac_updater.cpp.

References gWindow, kEventClassCustom, kEventCustomProgress, kEventParamCustomCurValue, kEventParamCustomMaxValue, kEventParamCustomText, and NULL.

Referenced by curl_progress_callback_func(), and updatethreadproc().

Here is the caller graph for this function:

OSStatus setProgress ( int  cur,
int  max 
)

Definition at line 75 of file mac_updater.cpp.

References gWindow, and NULL.

Referenced by dialogHandler().

Here is the caller graph for this function:

OSStatus setProgressText ( CFStringRef  text  ) 

Definition at line 111 of file mac_updater.cpp.

References gWindow, and NULL.

Referenced by dialogHandler().

Here is the caller graph for this function:

void * updatethreadproc ( void *   ) 

static void utf8str_to_HFSUniStr255 ( HFSUniStr255 *  dest,
const char *  src 
) [static]

Definition at line 537 of file mac_updater.cpp.

References utf8str_to_utf16str().

Referenced by updatethreadproc().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Boolean gCancelled = false

Definition at line 66 of file mac_updater.cpp.

Referenced by curl_progress_callback_func(), dialogHandler(), main(), and updatethreadproc().

EventHandlerRef gEventHandler = NULL

Definition at line 64 of file mac_updater.cpp.

OSStatus gFailure = noErr

Definition at line 65 of file mac_updater.cpp.

Referenced by main(), and updatethreadproc().

char* gProductName

Definition at line 69 of file mac_updater.cpp.

Referenced by filterFile(), main(), parse_args(), updatethreadproc(), and WinMain().

char* gUpdateURL

Definition at line 68 of file mac_updater.cpp.

Referenced by main(), parse_args(), updatethreadproc(), and WinMain().

WindowRef gWindow = NULL

Definition at line 63 of file mac_updater.cpp.

pthread_t updatethread

Definition at line 73 of file mac_updater.cpp.

Referenced by main().


Generated on Fri May 16 08:36:15 2008 for SecondLife by  doxygen 1.5.5