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

appserverclient.c File Reference


Detailed Description

This file contains the client-side APIs & implementation for the MAX Application server.

#include <signal.h>
#include <hiker/pdk/appmgr_pdk.h>
#include <hiker/ipc.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <hiker/bundlemgr.h>
#include <stdlib.h>
#include <hiker/prv/appmgr_prv.h>

Data Structures

struct  _AlpExitHandlerInfo
struct  _AlpAppContext

Defines

#define ALP_TRACE   ALP_TRACE_OFF

Typedefs

typedef _AlpExitHandlerInfo AlpExitHandlerInfo

Functions

alp_status_t prv_watcher_stuff (const char *appID, AlpWatcherRef *ioWatcherRef, gboolean *outAppRan, gboolean remove, gint blockMode)
alp_status_t alp_app_launch (const char *appID, int argc, char *const argv[], pid_t *outPID)
 Sends a request to the appserver to launch the indicated app.
alp_status_t alp_app_launch_async (const char *appID, int argc, char *const argv[])
 Sends a request to the appserver to launch the indicated app, without blocking.
alp_status_t alp_app_launch_full (AlpAppContext *context, const char *appID, int argc, char *const argv[], pid_t *outPID)
 More flexible PDK version of alp_app_launch.
alp_status_t alp_app_exit (const char *appID)
 Request that the indicated application cease execution.
alp_status_t alp_app_retire (const char *appID)
 Request that the indicated primary application exit or move to the background.
alp_status_t alp_app_watcher_add (const char *appID, AlpWatcherRef *outWatcherRef, gboolean *outAppRan)
 Add a new watcher to notice when the indicated app is run.
alp_status_t alp_app_watcher_check (AlpWatcherRef watcherRef, gboolean *outAppRan)
 Check if the indicated watcher's target app has been run since the watcher was added.
alp_status_t alp_app_watcher_remove (AlpWatcherRef watcherRef, gboolean *outAppRan)
 Deallocate the indicated watcher, and check if its target app ran since the watcher was added.
alp_status_t alp_app_watcher_block (AlpWatcherRef watcherRef, gboolean blockLaunch)
 Configure watcher to (not) prevent its target application from being launched.
alp_status_t alp_app_current (char **outPkgID)
 Obtain the package ID of the current primary app, if any.
alp_status_t alp_app_set_backgrounding (AlpAppBackgroundingType newBackgrounding)
 Set the application's backgrounding setting.
alp_status_t alp_app_set_relaunch_handler (AlpRelaunchHandler procP, gpointer cbData)
 Set the handler for launch arguments in case the app is launched while it is already running.
alp_status_t alp_app_add_exit_handler (AlpExitHandler procP, gpointer cbData)
 Applications should call this API in order to add an exit handler to the list.
alp_status_t alp_app_remove_exit_handler (AlpExitHandler procP)
 Remove the indicated exit handler from the list.
alp_status_t alp_app_remove_exit_handler_with_data (AlpExitHandler procP, gpointer cbData)
 Remove the indicated exit handler from the list which also matches a given data pointer.
AlpAppContextalp_app_setup (const char *appID, guint32 flags, const char *scheme)
 Sets up a default connection to the application server, & registers the app.
void alp_app_destroy (AlpAppContext *context, int result)
 Unregisters app & closes the connection opened by alp_app_setup().
void alp_app_abandon (AlpAppContext *context)
 Close IPC connection & deallocate context without unregistering with appserver.
void alp_app_set_default_context (AlpAppContext *context)
 Sets the default application context.
void alp_app_register (AlpAppContext *context, const char *appID, guint32 flags, const char *scheme)
 Re-register a relaunched application with the appserver.
alp_status_t alp_app_flush (AlpAppContext *context)
 Ensure appserver has handled any pending messages for the given context.
guint32 alp_app_parse_launch_flags (guint32 launchFlags, int argc, char *const argv[])
 Parse default ALP launch arguments and return a bit flag representation.
void alp_app_set_diagnostic_handler (AlpAppContext *ctxt, AlpDiagnosticHandler procP, void *cbData)
 Set a handler to receive diagnostic messages from appserver.
alp_status_t alp_app_get_jump_list (int *count, char ***appIDs, gboolean **isRunnings)
 Get the current list of applications in the "jump list".
void alp_app_free_argv (int argc, char *argv[])
 Deallocate a dynamically allocated argc/argv style argument list.
void alp_app_debug_break (void)
 Halt execution, fork a new gnome-terminal, and attach gdb to the app.
alp_status_t alp_app_theme_update (void)
 Causes all running apps to reload the theme.
void alp_app_set_theme_update_proc (AlpAppContext *context, AlpThemeUpdateProc proc)
 Set the procedure used to update the app's theme when a theme update message is received.
alp_status_t alp_app_reset_system (void)
 Causes the system to reboot.
void prv_execute_relaunch (AlpAppContext *context, AlpMessage *msg)

Variables

AlpAppContextgDefaultAppContext = NULL


Define Documentation

#define ALP_TRACE   ALP_TRACE_OFF
 


Typedef Documentation

typedef struct _AlpExitHandlerInfo AlpExitHandlerInfo
 


Function Documentation

void prv_execute_relaunch AlpAppContext context,
AlpMessage msg
 

alp_status_t prv_watcher_stuff const char *  appID,
AlpWatcherRef ioWatcherRef,
gboolean *  outAppRan,
gboolean  remove,
gint  blockMode
 


Variable Documentation

AlpAppContext* gDefaultAppContext = NULL
 


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