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

appmgr_pdk.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 ********************************************************************/
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         PDK.  Available to licensees only.
00048  ************************************************/
00049 
00050 
00051 // Define trace classes:
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 // Jump List.  
00206 // The app server tracks jump list apps, and these APIs are used to access it.
00207 // Currently there are no APIs to manipulate the jump list.
00208 
00210 
00232 alp_status_t alp_app_get_jump_list(int *count, char***appIDs, gboolean **isRunnings);
00233 
00234 
00235 
00236 // Miscellaneous utility routines.
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 The launch flags are passed to alp_app_setup() and alp_app_register(), and are
00285 used to describe an application's mode of execution.  They are usually obtained
00286 from alp_app_parse_launch_flags(), which parses the application's argv array and 
00287 returns the appropriate set of bits.  Note that these bits describe the application's
00288 mode of execution ONLY.  They have no relation to any other apps which might have
00289 launched this one, or which this one may launch.
00290  */
00291 typedef enum
00292 {
00293         ALP_APP_LAUNCH_FLAG_NONE                = 0,
00294         ALP_APP_LAUNCH_FLAG_DEBUG               = (1 << 0),     // app is being debugged.
00295         ALP_APP_LAUNCH_FLAG_PRIMARY     = (1 << 1),     // app is the primary "main ui" app
00296         ALP_APP_LAUNCH_FLAG_LAUNCHPAD   = (1 << 2),     // app is a launchpad/cookiecutter
00297         ALP_APP_LAUNCH_FLAG_DIAGNOSTIC  = (1 << 3),     // app should be sent diagnostic messages.
00298         ALP_APP_LAUNCH_FLAG_TRANSIENT   = (1 << 4),     // app should be closed when main app is switched.  
00299                                                                                 // Causes transient server flag to be set.
00300                                                                                 // DOLATER - this should probably be moved to server flags & driven 
00301                                                                                 // from a manifest property when possible.  
00302         ALP_APP_LAUNCH_FLAG_ERROR       = (1 << 5)      // launchpad encountered an error. 
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 // Diagnostic messages:
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 // Appserver specific launch arguments:
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 }       // extern "C"
00332 #endif
00333 
00334 #endif // __ALP_APP_MGR_PDK_H_
00335 
00336 

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