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

appmgr_prv.h

Go to the documentation of this file.
00001 /********************************************************************
00002 
00003 Copyright 2006, ACCESS Systems Americas, Inc. All rights reserved.
00004 
00005 The contents of this file are subject to the Mozilla Public License Version
00006 1.1 (the "License"); you may not use this file except in compliance with
00007 the License. You may obtain a copy of the License at
00008 http://www.mozilla.org/MPL/
00009 
00010 Software distributed under the License is distributed on an "AS IS" basis,
00011 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012 for the specific language governing rights and limitations under the
00013 License.
00014 
00015 The Original Code is the entire contents of this file.
00016 
00017 The Initial Developer of the Original Code is ACCESS Systems Americas, Inc.
00018 
00019 Portions created by ACCESS Systems Americas, Inc. are Copyright  2006. All
00020 Rights Reserved.
00021 
00022 Contributor(s): none.
00023 
00024 ********************************************************************/
00033 #ifndef __ALP_APP_MGR_PRV_H_
00034 #define __ALP_APP_MGR_PRV_H_
00035 
00036 #include <hiker/pdk/appmgr_pdk.h>
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00051  /************************************************
00052         PRIVATE.  ALP internal use only.
00053  ************************************************/
00054 
00055 
00056 
00057 
00058 // Message packing & unpacking.  
00059 // These calls should always be used to pack & unpack messages to/from the app server.
00060 
00062 AlpMessage* alp_app_prv_make_launch_msg(const char *appID, int argc,  char *const argv[], gboolean waitForPID);
00063 
00065 alp_status_t alp_app_prv_unpack_launch_msg(AlpMessage* msg, int *outArgc, char*** outArgv, gboolean *waitForPID);
00066 
00067 
00069 AlpMessage* alp_app_prv_make_exit_msg(const char *pkgID);
00070 
00072 alp_status_t alp_app_prv_unpack_exit_msg(AlpMessage* msg, char** pkgID);
00073 
00074 
00076 AlpMessage* alp_app_prv_make_retire_msg(const char *appID);
00077 
00079 alp_status_t alp_app_prv_unpack_retire_msg(AlpMessage* msg, char** appID);
00080 
00081 
00083 AlpMessage* alp_app_prv_make_backgrounding_msg(AlpAppBackgroundingType newBG);
00084 
00086 alp_status_t alp_app_prv_unpack_backgrounding_msg(AlpMessage* msg,
00087                                                                 AlpAppBackgroundingType* outBG);
00088 
00089 
00090 
00091 
00093 AlpMessage* alp_app_prv_make_register_msg(const char *pkgID, pid_t appPID, guint32 flags, const char *lpScheme);
00094 
00096 alp_status_t alp_app_prv_unpack_register_msg(AlpMessage* msg, char** appID, pid_t *appPID, guint32 *flags, char**lpScheme);
00097 
00098 
00100 AlpMessage* alp_app_prv_make_unregister_msg(int result);
00101 
00103 alp_status_t alp_app_prv_unpack_unregister_msg(AlpMessage* msg, int *result);
00104 
00105 
00107 AlpMessage* alp_app_prv_make_diagnostic_msg(const char *appID, const char *str);
00108 
00110 alp_status_t alp_app_prv_unpack_diagnostic_msg(AlpMessage* msg, char **pkgID, char **str);
00111 
00112 
00114 AlpMessage* alp_app_prv_make_launch_reply_msg(AlpMessage* replyTo, const char *appID, alp_status_t launchErr, pid_t appPID);
00115 
00117 alp_status_t alp_app_prv_unpack_launch_reply_msg(AlpMessage* msg, char **appID, alp_status_t *launchErr, pid_t *appPID);
00118 
00120 AlpMessage* alp_app_prv_make_flush_msg(AlpMessage *replyTo);
00121 
00123 AlpMessage* alp_app_prv_make_jump_list_request_msg(void);
00124 
00126 AlpMessage* alp_app_prv_make_jump_list_msg(AlpMessage *replyTo, int count, char *const appIDs[], const gboolean *isRunnings);
00127 
00129 alp_status_t alp_app_prv_unpack_jump_list_msg(AlpMessage* msg, 
00130                                                                  int *count, char***appIDs, gboolean **isRunnings);
00131 
00133 AlpMessage* alp_app_prv_make_cur_app_msg(AlpMessage *replyTo, const char *pkgID);
00134 
00136 alp_status_t alp_app_prv_unpack_cur_app_msg(AlpMessage* msg, char** outPkgID);
00137 
00139 AlpMessage* alp_app_prv_make_watcher_msg(AlpMessage *replyTo, const char *pkgID, 
00140                                                           AlpWatcherRef watcherRef, gboolean wasRun, 
00141                                                           gboolean remove, alp_status_t result, gint blockMode);
00142 
00144 alp_status_t alp_app_prv_unpack_watcher_msg(AlpMessage* msg, char** outPkgID, 
00145                                                                 AlpWatcherRef *outWatcherRef, gboolean *outWasRun,
00146                                                                 gboolean *outRemove, alp_status_t *outResult, gint *outBlockMode);
00147 
00149 AlpMessage* alp_app_prv_make_theme_update_msg(void);
00150 
00152 AlpMessage* alp_app_prv_make_reset_msg(void);
00153 
00154 // Message packing utility APIs.
00155 // Not tied to any particular message type.
00156 
00158 alp_status_t alp_app_prv_pack_argv(AlpMessage *msg, const char *pkgID, int argc,  char *const argv[]);
00159 
00161 alp_status_t alp_app_prv_unpack_argv(AlpMessage *msg, int *outArgc, char*** outArgv);
00162 
00163 
00164 /************************************************
00165         PRIVATE constants, ALP internal use only.  
00166  ************************************************/
00167 typedef enum
00168 {
00169         ALP_APP_SERVER_FLAG_NONE                                = 0,
00170         ALP_APP_SERVER_FLAG_EXIT_CLEAN          = (1 << 0),
00171         ALP_APP_SERVER_FLAG_WAITING_FOR_REPLY   = (1 << 1),
00172         ALP_APP_SERVER_FLAG_NO_JUMP_LIST                = (1 << 2),
00173         ALP_APP_SERVER_FLAG_ALWAYS_JUMP_LIST    = (1 << 3)
00174 } AlpAppServerFlags;
00175 
00176 
00177 
00178 // Standard message IDs: 
00179 typedef enum
00180 {
00181         ALP_APP_MSG_ID_LAUNCH = 1,
00182         ALP_APP_MSG_ID_REGISTER,
00183         ALP_APP_MSG_ID_UNREGISTER,
00184         ALP_APP_MSG_ID_EXIT,
00185         ALP_APP_MSG_ID_DIAGNOSTIC,
00186         ALP_APP_MSG_ID_LAUNCH_REPLY,
00187         ALP_APP_MSG_ID_BACKGROUNDING,
00188         ALP_APP_MSG_ID_FLUSH,
00189         ALP_APP_MSG_ID_JUMP_LIST_REQ,
00190         ALP_APP_MSG_ID_JUMP_LIST,
00191         ALP_APP_MSG_ID_CUR_APP,
00192         ALP_APP_MSG_ID_WATCHER,
00193         ALP_APP_MSG_ID_RETIRE,
00194         ALP_APP_MSG_ID_THEME_UPDATE,
00195         ALP_APP_MSG_ID_RESET
00196 } AlpAppMsgID;
00197 
00198 
00199 
00200 // Values for the "tristate" 'block' value in watcher messages.
00201 #define ALP_APP_WATCHER_UNBLOCK 0
00202 #define ALP_APP_WATCHER_BLOCK           1
00203 #define ALP_APP_WATCHER_IGNORE  2
00204 
00205 
00206 
00208 #define ALP_APP_SERVER_CHANNEL "ALP AppServer"
00209 
00210 
00213 
00214 #ifdef __cplusplus
00215 }       // extern "C"
00216 #endif
00217 
00218 #endif // __ALP_APP_MGR_PRV_H_
00219 
00220 

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