Back to index

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

Go to the source code of this file.

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(* pfnXPIProgress )(const char *msg, PRInt32 val, PRInt32 max)
 pfnXPIProgress -- individual install item callback
const char * aLogName
const char pfnXPIProgress progressCB
const char * args
const char long flags

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:
aProgramDirdirectory to use as "program" directory. If NULL default will be used -- the location of the calling executable. Must be native filename format.
aLogNamefilename for log.
progressCBCalled for each installed file
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 70 of file xpistub.h.

const char* args

Definition at line 84 of file xpistub.h.

Definition at line 84 of file xpistub.h.

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 52 of file xpistub.h.

Definition at line 70 of file xpistub.h.