Back to index

lightning-sunbird  0.9+nobinonly
Defines | Typedefs | Functions | Variables
xpistub.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define nsresult   long
 Generic XPCOM result data type.

Typedefs

typedef void(* pfnXPIProgress )(const char *msg, PRInt32 val, PRInt32 max)
 pfnXPIProgress -- individual install item callback
typedef void(* pfnXPIFinal )(const char *URL, PRInt32 finalStatus)
 pfnXPIFinal -- script end callback

Functions

 PR_EXTERN (nsresult) XPI_Init(const char *aProgramDir
 XPI_Init.
 PR_EXTERN (PRInt32) XPI_Install(const char *file
 XPI_Install.
 PR_EXTERN (void) XPI_Exit()
 XPI_Exit.

Variables

PR_BEGIN_EXTERN_C typedef void(* pfnXPIStart )(const char *URL, const char *UIName)
 pfnXPIStart -- script start callback
const char * aLogName
const char pfnXPIProgress progressCB
const char * args
const char long flags

Define Documentation

typedef PRUint32 nsresult   long

Generic XPCOM result data type.

Definition at line 48 of file xpistub.h.


Typedef Documentation

typedef void(* pfnXPIFinal)(const char *URL, PRInt32 finalStatus)

pfnXPIFinal -- script end callback

This function will be called when the script calls either AbortInstall() or FinalizeInstall() and will return the last error code.

Definition at line 77 of file xpistub.h.

typedef void(* pfnXPIProgress)(const char *msg, PRInt32 val, PRInt32 max)

pfnXPIProgress -- individual install item callback

This callback will be called twice for each installed item, First when it is scheduled (val and max will both be 0) and then during the finalize step.

Definition at line 69 of file xpistub.h.


Function Documentation

PR_EXTERN ( nsresult  ) const

XPI_Init.

call XPI_Init() to initialize XPCOM and the XPInstall engine, and to pass in your callback functions.

Parameters:
aXPIStubDir[MAC only] directory of the xpistub shlb off of which the component manager derives the components directory.
aProgramDirdirectory to use as "program" directory. If NULL default will be used -- the location of the calling executable. Must be native filename format.
startCBCalled when script started
progressCBCalled for each installed file
finalCBCalled with status code at end
Returns:
XPCOM status code indicating success or failure
PR_EXTERN ( PRInt32  ) const

XPI_Install.

Install an XPI package from a local file

Parameters:
fileNative filename of XPI archive
argsInstall.arguments, if any
flagsthe old SmartUpdate trigger flags. This may go away
Returns:
status Status from the installed archive
PR_EXTERN ( void  )

XPI_Exit.

call when done to shut down the XPInstall and XPCOM engines and free allocated memory

XPI_Exit.

Sets SecurityCotext for proxy env.

  1. the array to sort
    1. the number of elements in the array
    2. the size of each array element
    3. comparison function taking two elements and parameter #5 and returning an integer:
      • less than zero if the first element should be before the second
      • 0 if the order of the elements does not matter
      • greater than zero if the second element should be before the first
    4. extra data to pass to comparison function

Definition at line 972 of file irix.c.

{
PRThread *me = _PR_MD_CURRENT_THREAD();

       /*
        * the exit code of the process is the exit code of the primordial
        * sproc
        */
       if (!_PR_IS_NATIVE_THREAD(me) && (_PR_MD_CURRENT_CPU()->id == 0)) {
              /*
               * primordial sproc case: call _exit directly
               * Cause SIGKILL to be sent to other sprocs
               */
              prctl(PR_SETEXITSIG, SIGKILL);
              _exit(status);
       } else {
              int rv;
              char data;
              sigset_t set;

              /*
               * non-primordial sproc case: cause the primordial sproc, cpu 0,
               * to wakeup and call _exit
               */
              _pr_irix_process_exit = 1;
              _pr_irix_process_exit_code = status;
              rv = write(_pr_irix_primoridal_cpu_fd[1], &data, 1);
              PR_ASSERT(rv == 1);
              /*
               * block all signals and wait for SIGKILL to terminate this sproc
               */
              sigfillset(&set);
              sigsuspend(&set);
              /*
               * this code doesn't (shouldn't) execute
               */
              prctl(PR_SETEXITSIG, SIGKILL);
              _exit(status);
       }
}

Variable Documentation

const char* aLogName

Definition at line 104 of file xpistub.h.

const char* args

Definition at line 123 of file xpistub.h.

Definition at line 123 of file xpistub.h.

PR_BEGIN_EXTERN_C typedef void(* pfnXPIStart)(const char *URL, const char *UIName)

pfnXPIStart -- script start callback

When an install script gets to StartInstall() this function will be called to tell the observer the pretty-name of the install package. You are not guaranteed this will be called for all scripts--there might be a fatal error before it gets to StartInstall(), either in the script itself or in the engine trying to set up for it.

Definition at line 61 of file xpistub.h.

Definition at line 104 of file xpistub.h.