Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

Private
[Application Manager]


Defines

#define ALP_APP_WATCHER_UNBLOCK   0
#define ALP_APP_WATCHER_BLOCK   1
#define ALP_APP_WATCHER_IGNORE   2
#define ALP_APP_SERVER_CHANNEL   "ALP AppServer"
 The name of the communications channel used by the appserver. For use with alp_channel_connect().

Enumerations

enum  AlpAppServerFlags {
  ALP_APP_SERVER_FLAG_NONE = 0, ALP_APP_SERVER_FLAG_EXIT_CLEAN = (1 << 0), ALP_APP_SERVER_FLAG_WAITING_FOR_REPLY = (1 << 1), ALP_APP_SERVER_FLAG_NO_JUMP_LIST = (1 << 2),
  ALP_APP_SERVER_FLAG_ALWAYS_JUMP_LIST = (1 << 3)
}
enum  AlpAppMsgID {
  ALP_APP_MSG_ID_LAUNCH = 1, ALP_APP_MSG_ID_REGISTER, ALP_APP_MSG_ID_UNREGISTER, ALP_APP_MSG_ID_EXIT,
  ALP_APP_MSG_ID_DIAGNOSTIC, ALP_APP_MSG_ID_LAUNCH_REPLY, ALP_APP_MSG_ID_BACKGROUNDING, ALP_APP_MSG_ID_FLUSH,
  ALP_APP_MSG_ID_JUMP_LIST_REQ, ALP_APP_MSG_ID_JUMP_LIST, ALP_APP_MSG_ID_CUR_APP, ALP_APP_MSG_ID_WATCHER,
  ALP_APP_MSG_ID_RETIRE, ALP_APP_MSG_ID_THEME_UPDATE, ALP_APP_MSG_ID_RESET
}

Functions

AlpMessagealp_app_prv_make_launch_msg (const char *appID, int argc, char *const argv[], gboolean waitForPID)
 Utility API to create a new AlpMessage containing a launch request.
alp_status_t alp_app_prv_unpack_launch_msg (AlpMessage *msg, int *outArgc, char ***outArgv, gboolean *waitForPID)
 Utility API to unpack the contents of an AlpMessage containing a launch request.
AlpMessagealp_app_prv_make_exit_msg (const char *pkgID)
 Utility API to create a new AlpMessage containing an exit request.
alp_status_t alp_app_prv_unpack_exit_msg (AlpMessage *msg, char **pkgID)
 Utility API to unpack the contents of an AlpMessage containing an exit request.
AlpMessagealp_app_prv_make_retire_msg (const char *appID)
 Utility API to create a new AlpMessage containing a retire request.
alp_status_t alp_app_prv_unpack_retire_msg (AlpMessage *msg, char **appID)
 Utility API to unpack the contents of an AlpMessage containing an retire request.
AlpMessagealp_app_prv_make_backgrounding_msg (AlpAppBackgroundingType newBG)
 Utility API to create a new AlpMessage containing a "set backgrounding" request.
alp_status_t alp_app_prv_unpack_backgrounding_msg (AlpMessage *msg, AlpAppBackgroundingType *outBG)
 Utility API to unpack the contents of an AlpMessage containing a "set backgrounding" request.
AlpMessagealp_app_prv_make_register_msg (const char *pkgID, pid_t appPID, guint32 flags, const char *lpScheme)
 Utility API to create a new AlpMessage containing an app registration.
alp_status_t alp_app_prv_unpack_register_msg (AlpMessage *msg, char **appID, pid_t *appPID, guint32 *flags, char **lpScheme)
 Utility API to unpack the contents of an AlpMessage containing an app registration.
AlpMessagealp_app_prv_make_unregister_msg (int result)
 Utility API to create a new AlpMessage containing an unregistration message.
alp_status_t alp_app_prv_unpack_unregister_msg (AlpMessage *msg, int *result)
 Utility API to unpack the contents of an AlpMessage containing an unregistration message.
AlpMessagealp_app_prv_make_diagnostic_msg (const char *appID, const char *str)
 Utility API to create a new AlpMessage containing a diagnostic message.
alp_status_t alp_app_prv_unpack_diagnostic_msg (AlpMessage *msg, char **pkgID, char **str)
 Utility API to unpack the contents of an AlpMessage containing a diagnostic message.
AlpMessagealp_app_prv_make_launch_reply_msg (AlpMessage *replyTo, const char *appID, alp_status_t launchErr, pid_t appPID)
 Utility API to pack the contents of an AlpMessage containing a launch reply message.
alp_status_t alp_app_prv_unpack_launch_reply_msg (AlpMessage *msg, char **appID, alp_status_t *launchErr, pid_t *appPID)
 Utility API to unpack the contents of an AlpMessage containing a launch reply message.
AlpMessagealp_app_prv_make_flush_msg (AlpMessage *replyTo)
 Utility API to pack the contents of an AlpMessage containing a flush message.
AlpMessagealp_app_prv_make_jump_list_request_msg (void)
 Utility API to pack the contents of an AlpMessage containing a request for the current jumplist apps.
AlpMessagealp_app_prv_make_jump_list_msg (AlpMessage *replyTo, int count, char *const appIDs[], const gboolean *isRunnings)
 Utility API to pack the contents of an AlpMessage containing the current jumplist apps.
alp_status_t alp_app_prv_unpack_jump_list_msg (AlpMessage *msg, int *count, char ***appIDs, gboolean **isRunnings)
 Utility API to unpack the contents of an AlpMessage containing the current jumplist apps.
AlpMessagealp_app_prv_make_cur_app_msg (AlpMessage *replyTo, const char *pkgID)
 Utility API to pack the contents of an AlpMessage containing a request/response for the current primary app name.
alp_status_t alp_app_prv_unpack_cur_app_msg (AlpMessage *msg, char **outPkgID)
 Utility API to unpack the contents of an AlpMessage containing a request/response for the current primary app name.
AlpMessagealp_app_prv_make_watcher_msg (AlpMessage *replyTo, const char *pkgID, AlpWatcherRef watcherRef, gboolean wasRun, gboolean remove, alp_status_t result, gint blockMode)
 Utility API to pack the contents of an AlpMessage containing a request/response for the "watcher" APIs.
alp_status_t alp_app_prv_unpack_watcher_msg (AlpMessage *msg, char **outPkgID, AlpWatcherRef *outWatcherRef, gboolean *outWasRun, gboolean *outRemove, alp_status_t *outResult, gint *outBlockMode)
 Utility API to unpack the contents of an AlpMessage containing a request/response for the "watcher" APIs.
AlpMessagealp_app_prv_make_theme_update_msg (void)
 Utility API to make a theme update message.
AlpMessagealp_app_prv_make_reset_msg (void)
 Utility API to make a system reset message.
alp_status_t alp_app_prv_pack_argv (AlpMessage *msg, const char *pkgID, int argc, char *const argv[])
 Pack an argc/argv style argument list from AlpMessage structures.
alp_status_t alp_app_prv_unpack_argv (AlpMessage *msg, int *outArgc, char ***outArgv)
 Unpacking an argc/argv style argument list from AlpMessage structures.


Define Documentation

#define ALP_APP_SERVER_CHANNEL   "ALP AppServer"
 

The name of the communications channel used by the appserver. For use with alp_channel_connect().

#define ALP_APP_WATCHER_BLOCK   1
 

#define ALP_APP_WATCHER_IGNORE   2
 

#define ALP_APP_WATCHER_UNBLOCK   0
 


Enumeration Type Documentation

enum AlpAppMsgID
 

Enumerator:
ALP_APP_MSG_ID_LAUNCH 
ALP_APP_MSG_ID_REGISTER 
ALP_APP_MSG_ID_UNREGISTER 
ALP_APP_MSG_ID_EXIT 
ALP_APP_MSG_ID_DIAGNOSTIC 
ALP_APP_MSG_ID_LAUNCH_REPLY 
ALP_APP_MSG_ID_BACKGROUNDING 
ALP_APP_MSG_ID_FLUSH 
ALP_APP_MSG_ID_JUMP_LIST_REQ 
ALP_APP_MSG_ID_JUMP_LIST 
ALP_APP_MSG_ID_CUR_APP 
ALP_APP_MSG_ID_WATCHER 
ALP_APP_MSG_ID_RETIRE 
ALP_APP_MSG_ID_THEME_UPDATE 
ALP_APP_MSG_ID_RESET 

enum AlpAppServerFlags
 

Enumerator:
ALP_APP_SERVER_FLAG_NONE 
ALP_APP_SERVER_FLAG_EXIT_CLEAN 
ALP_APP_SERVER_FLAG_WAITING_FOR_REPLY 
ALP_APP_SERVER_FLAG_NO_JUMP_LIST 
ALP_APP_SERVER_FLAG_ALWAYS_JUMP_LIST 


Function Documentation

AlpMessage* alp_app_prv_make_backgrounding_msg AlpAppBackgroundingType  newBG  ) 
 

Utility API to create a new AlpMessage containing a "set backgrounding" request.

Parameters:
[in] newBG The new backgrounding setting for the app.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_cur_app_msg AlpMessage replyTo,
const char *  appID
 

Utility API to pack the contents of an AlpMessage containing a request/response for the current primary app name.

This message is used for both the initial request to appserver, and also to carry the reply.

Parameters:
[in] replyTo The AlpMessage to reply to, or NULL if this is a request to appserver.
[in] appID Package ID to store in the message. Use "" for a request to the appserver.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_diagnostic_msg const char *  appID,
const char *  str
 

Utility API to create a new AlpMessage containing a diagnostic message.

Parameters:
[in] appID The name of the package containing the application to which the message pertains.
[in] str The diagnostic message to include.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_exit_msg const char *  appID  ) 
 

Utility API to create a new AlpMessage containing an exit request.

Parameters:
[in] appID The name of the package containing the application to exit, or NULL.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_flush_msg AlpMessage replyTo  ) 
 

Utility API to pack the contents of an AlpMessage containing a flush message.

Parameters:
[in] replyTo The launch request message to reply to.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_jump_list_msg AlpMessage replyTo,
int  count,
char *const   appIDs[],
const gboolean *  isRunnings
 

Utility API to pack the contents of an AlpMessage containing the current jumplist apps.

Parameters:
[in] replyTo The AlpMessage containing the original jumplist request.
[in] count The number of strings in the appIDs array.
[in] appIDs An array of char* containing package ID strings for each app in the jump list.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_jump_list_request_msg void   ) 
 

Utility API to pack the contents of an AlpMessage containing a request for the current jumplist apps.

Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_launch_msg const char *  appID,
int  argc,
char *const   argv[],
gboolean  waitForPID
 

Utility API to create a new AlpMessage containing a launch request.

Parameters:
[in] appID The name of the package containing the application to launch, or NULL if it's contained in argv[0].
[in] argc The number of strings in the argv array.
[in] argv An array of char* containing launch arguments for the application.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_launch_reply_msg AlpMessage replyTo,
const char *  appID,
alp_status_t  launchErr,
pid_t  appPID
 

Utility API to pack the contents of an AlpMessage containing a launch reply message.

Parameters:
[in] replyTo The launch request message to reply to.
[in] appID The name of the package containing the application to which the message pertains.
[in] launchErr The error result code from the launch operation.
[in] appPID The process ID of the newly launched application, when applicable (<=0 otherwise).
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_register_msg const char *  appID,
pid_t  appPID,
guint32  flags,
const char *  lpScheme
 

Utility API to create a new AlpMessage containing an app registration.

Parameters:
[in] appID The name of the package containing the application.
[in] appPID The process ID of the newly spawned app process.
[in] flags Standard launch flags indicating the app's mode of execution.
[in] lpScheme The package type for received launch requests. Used only when registering as a launchpad.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_reset_msg void   ) 
 

Utility API to make a system reset message.

Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_retire_msg const char *  appID  ) 
 

Utility API to create a new AlpMessage containing a retire request.

Parameters:
[in] appID The name of the package containing the application to retire, or NULL
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_theme_update_msg void   ) 
 

Utility API to make a theme update message.

Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_unregister_msg int  result  ) 
 

Utility API to create a new AlpMessage containing an unregistration message.

Parameters:
[in] result The app process's exit/result code.
Returns:
Returns the newly allocated message, or NULL on failure.

AlpMessage* alp_app_prv_make_watcher_msg AlpMessage replyTo,
const char *  appID,
AlpWatcherRef  watcherRef,
gboolean  wasRun,
gboolean  remove,
alp_status_t  result,
gint  blockMode
 

Utility API to pack the contents of an AlpMessage containing a request/response for the "watcher" APIs.

This message is used for both the initial request to appserver, and also to carry the reply.

Parameters:
[in] replyTo The AlpMessage to reply to, or NULL if this is a request to appserver.
[in] appID Package ID to store in the message.
[in] watcherRef Watcher ID to store in message.
[in] wasRun Boolean wasRun value to store in message.
[in] remove Boolean "remove" value to store in message.
Returns:
Returns the newly allocated message, or NULL on failure.

alp_status_t alp_app_prv_pack_argv AlpMessage msg,
const char *  appID,
int  argc,
char *const   argv[]
 

Pack an argc/argv style argument list from AlpMessage structures.

If appID is non-null, then it is packed into the message as argv[0], argc is incremented, and the remaining parameters follow. If appID is null, then argc & argv are packed just as passed to this routine.

Parameters:
[in] msg The AlpMessage to pack data into.
[in] appID The name of the package containing the application. Becomes argv[0].
[in] argc The number of strings in the argv array.
[in] argv An array of char* containing launch arguments for the application.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem packing the message.

alp_status_t alp_app_prv_unpack_argv AlpMessage msg,
int *  outArgc,
char ***  outArgv
 

Unpacking an argc/argv style argument list from AlpMessage structures.

Parameters:
[in] msg The AlpMessage to pack data into.
[out] outArgc Receives the number of strings in the argv array.
[out] outArgv Receives a newly allocated array of char* containing launch arguments for the application.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_backgrounding_msg AlpMessage msg,
AlpAppBackgroundingType outBG
 

Utility API to unpack the contents of an AlpMessage containing a "set backgrounding" request.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] outBG Receives the new backgrounding setting for the app.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_cur_app_msg AlpMessage msg,
char **  outPkgID
 

Utility API to unpack the contents of an AlpMessage containing a request/response for the current primary app name.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] outPkgID Receives pkg ID stored in the message.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_diagnostic_msg AlpMessage msg,
char **  appID,
char **  str
 

Utility API to unpack the contents of an AlpMessage containing a diagnostic message.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] appID Receives the name of the package containing the application.
[out] str Receives the diagnostic message string.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_exit_msg AlpMessage msg,
char **  appID
 

Utility API to unpack the contents of an AlpMessage containing an exit request.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] appID Receives the name of the package containing the application to exit.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_jump_list_msg AlpMessage msg,
int *  count,
char ***  appIDs,
gboolean **  outIsRunnings
 

Utility API to unpack the contents of an AlpMessage containing the current jumplist apps.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] count Receives the length of the appIDs array.
[out] appIDs Receives a ptr to an array of char* containing package IDs of the apps in the jump list.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_launch_msg AlpMessage msg,
int *  argc,
char ***  argv,
gboolean *  waitForPID
 

Utility API to unpack the contents of an AlpMessage containing a launch request.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] outArgc Receives the number of strings in the argv array.
[out] outArgv Receives a newly allocated array of char* containing launch arguments for the application.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_launch_reply_msg AlpMessage msg,
char **  appID,
alp_status_t launchErr,
pid_t *  appPID
 

Utility API to unpack the contents of an AlpMessage containing a launch reply message.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] appID Receives the name of the package containing the application.
[out] launchErr Receives the error result code from the launch operation.
[out] appPID Receives the process ID of the newly launched application, when applicable (<=0 otherwise).
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_register_msg AlpMessage msg,
char **  appID,
pid_t *  appPID,
guint32 *  flags,
char **  lpScheme
 

Utility API to unpack the contents of an AlpMessage containing an app registration.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] appID The name of the package containing the application.
[out] appPID The process ID of the newly spawned app process.
[out] flags Standard launch flags indicating the app's mode of execution.
[out] lpScheme The package type for received launch requests. Used only when registering as a launchpad.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_retire_msg AlpMessage msg,
char **  appID
 

Utility API to unpack the contents of an AlpMessage containing an retire request.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] appID Receives the name of the package containing the application to retire.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_unregister_msg AlpMessage msg,
int *  result
 

Utility API to unpack the contents of an AlpMessage containing an unregistration message.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] result Receives the app process's exit/result code.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.

alp_status_t alp_app_prv_unpack_watcher_msg AlpMessage msg,
char **  outPkgID,
AlpWatcherRef outWatcherRef,
gboolean *  outWasRun,
gboolean *  outRemove,
alp_status_t outResult,
gint *  outBlockMode
 

Utility API to unpack the contents of an AlpMessage containing a request/response for the "watcher" APIs.

Parameters:
[in] msg The AlpMessage to unpack data from.
[out] outPkgID Receives pkg ID stored in the message.
Returns:
Yields ALP_STATUS_OK on success, or an error code if there is a problem unpacking the message.


Generated on Sat Dec 16 20:29:50 2006 for hiker-0.9 by  doxygen 1.4.4