00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00032 #ifndef __ALP_APP_MGR_PDK_H_
00033 #define __ALP_APP_MGR_PDK_H_
00034
00035 #include <hiker/appmgr.h>
00036
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00046
00047
00048
00049
00050
00051
00052 #define ALP_APP_SERVER_TRACE ALP_TRACE_DEFINE(ALP_CLASS_APPSERVER, 1)
00053 #define ALP_APP_CLIENT_TRACE ALP_TRACE_DEFINE(ALP_CLASS_APPSERVER, 2)
00054 #define ALP_APP_TEST_TRACE ALP_TRACE_DEFINE(ALP_CLASS_APPSERVER, 3)
00055
00056
00057
00058 typedef void (*AlpDiagnosticHandler) (const char* appID, const char* diagStr, void* cbData);
00059 typedef void (*AlpThemeUpdateProc) (void);
00060
00061 typedef struct _AlpAppContext AlpAppContext;
00062
00064
00079 alp_status_t alp_app_launch_full(AlpAppContext* context, const char * appID, int argc, char *const argv[], pid_t *outPID);
00080
00082
00110 AlpAppContext* alp_app_setup(const char *appID, guint32 flags, const char* scheme);
00111
00113
00125 void alp_app_destroy(AlpAppContext *context, int result);
00126
00128
00136 void alp_app_abandon(AlpAppContext* context);
00137
00139
00145 void alp_app_set_default_context(AlpAppContext* context);
00146
00147
00149
00166 void alp_app_register(AlpAppContext *context, const char *appID, guint32 flags, const char* scheme);
00167
00169
00175 alp_status_t alp_app_flush(AlpAppContext* context);
00176
00177
00179
00190 guint32 alp_app_parse_launch_flags(guint32 launchFlags, int argc, char *const argv[]);
00191
00193
00202 void alp_app_set_diagnostic_handler(AlpAppContext *context, AlpDiagnosticHandler procP, void* cbData);
00203
00204
00205
00206
00207
00208
00210
00232 alp_status_t alp_app_get_jump_list(int *count, char***appIDs, gboolean **isRunnings);
00233
00234
00235
00236
00237
00238
00240
00246 void alp_app_free_argv(int argc, char* argv[]);
00247
00248
00250
00260 void alp_app_debug_break(void);
00261
00262
00264
00274 void alp_app_set_theme_update_proc(AlpAppContext *context, AlpThemeUpdateProc proc);
00275
00276
00277
00278
00279
00280
00281 #define ALP_APP_LAUNCHPAD_SCHEME_SIZE 16 // max bytes for a launchpad scheme.
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 typedef enum
00292 {
00293 ALP_APP_LAUNCH_FLAG_NONE = 0,
00294 ALP_APP_LAUNCH_FLAG_DEBUG = (1 << 0),
00295 ALP_APP_LAUNCH_FLAG_PRIMARY = (1 << 1),
00296 ALP_APP_LAUNCH_FLAG_LAUNCHPAD = (1 << 2),
00297 ALP_APP_LAUNCH_FLAG_DIAGNOSTIC = (1 << 3),
00298 ALP_APP_LAUNCH_FLAG_TRANSIENT = (1 << 4),
00299
00300
00301
00302 ALP_APP_LAUNCH_FLAG_ERROR = (1 << 5)
00303 } AlpAppLaunchFlags;
00304
00306 #define ALP_APP_LAUNCH_FLAGS_STICKY (ALP_APP_LAUNCH_FLAG_TRANSIENT | ALP_APP_LAUNCH_FLAG_DEBUG | ALP_APP_LAUNCH_FLAG_LAUNCHPAD)
00307
00309 #define ALP_APP_LAUNCH_FLAGS_DEFAULT (ALP_APP_LAUNCH_FLAG_NONE)
00310
00311
00312
00313 #define ALP_APP_DIAG_UNEXPECTED_EXIT "Application quit unexpectedly."
00314 #define ALP_APP_DIAG_CLEAN_EXIT "Application quit cleanly."
00315 #define ALP_APP_DIAG_MISSING_LAUNCPAD "Can't find launchpad for scheme, not launching."
00316
00317
00318
00319
00320 #define ALP_APP_NO_DEFAULT_APP "--no-default-app"
00321 #define ALP_APP_NO_DEFAULTS "--no-defaults"
00322 #define ALP_APP_NO_DAEMON "--no-daemon"
00323 #define ALP_APP_DEFAULT_PRIMARY "--default-primary"
00324
00325
00326
00329
00330 #ifdef __cplusplus
00331 }
00332 #endif
00333
00334 #endif // __ALP_APP_MGR_PDK_H_
00335
00336