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

appserver.c File Reference


Detailed Description

This file contains the MAX Application Server implementation.

#include <errno.h>
#include <time.h>
#include <signal.h>
#include <string.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <hiker/pdk/appmgr_pdk.h>
#include <hiker/prv/appmgr_prv.h>
#include <hiker/pdk/sysutils_pdk.h>
#include <hiker/ipc.h>
#include <hiker/traces.h>
#include <hiker/bundlemgr.h>
#include <hiker/prv/bundlemgr_prv.h>
#include <hiker/prv/appserver_lock.h>
#include <hiker/fail.h>
#include <hiker/config.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/XF86keysym.h>
#include <X11/keysym.h>

Data Structures

struct  RunningAppInfo
struct  PendingLaunch
struct  AppWatcher

Defines

#define ALP_TRACE   ALP_TRACE_OFF
#define APPSERVERLOCK   "/var/lock/.alp_appserverd_lock"
#define PRV_KILL_TIMER_SECS   3
#define PRV_LAUNCH_TIMEOUT_SECS   5
#define PRV_EXIT_TIMER   0
#define PRV_RELAUNCH_TIMER   1
#define PRV_NUM_KILL_TIMERS   2
#define PRV_JUMPLIST_NUM_RECENT   10

Typedefs

typedef RunningAppInfo RunningAppInfo
typedef PendingLaunch PendingLaunch
typedef AppWatcher AppWatcher

Functions

void prv_check_default_app (void)
void prv_free_running_app_info (RunningAppInfo *app)
void prv_client_connect_cb (AlpConnection *connection, gpointer cbData)
void prv_client_disconnect_cb (AlpConnection *connection, gpointer cbData)
void prv_receive_data_cb (AlpConnection *connection, AlpMessage *message, gpointer cbData)
void prv_handle_launch (RunningAppInfo *requesterInfo, AlpMessage *msg)
RunningAppInfoprv_find_app_by_id (char *appID)
void prv_handle_exit_request (AlpMessage *exitMsg)
void prv_send_launch_reply (RunningAppInfo *dest, char *appID, alp_status_t launchErr, pid_t appPID)
PendingLaunchprv_find_pending_launch (char *appID)
alp_status_t prv_send_to_launchpad (char *appID, AlpMessage *msg)
void prv_do_next_pending_launch (char *appID)
void prv_remove_pending_launch (PendingLaunch *pendLaunch, alp_status_t err, pid_t appPID)
AppWatcherprv_find_watcher (AlpWatcherRef ref)
gboolean prv_handle_kill_timer (RunningAppInfo *appInfo, gint which)
gboolean prv_exit_timer_proc (gpointer cbData)
gboolean prv_relaunch_timer_proc (gpointer cbData)
void prv_clear_kill_timer (RunningAppInfo *appInfo, int which)
void prv_set_kill_timer (RunningAppInfo *appInfo, int which)
gboolean prv_launch_timeout_proc (gpointer cbData)
void prv_set_launch_timeout (PendingLaunch *pend)
void prv_clear_launch_timeout (PendingLaunch *pend)
gboolean prv_search_args (char *searchArg, int argc, char *argv[])
void prv_print_pending_list (void)
void prv_broadcast_diagnostic_msg (char *appID, char *str)
gint prv_compare_strcmp (gconstpointer a, gconstpointer b)
AppWatcherprv_watcher_find (AlpWatcherRef ref)
void prv_watcher_remove_by_owner (RunningAppInfo *owner)
void prv_watcher_notify (char *appID)
alp_status_t prv_dispatch_launch (char *appID, AlpMessage *msg)
void prv_retire_app (RunningAppInfo *appInfo)
void prv_retire_transient_apps (void)
void prv_do_initial_app_registration (RunningAppInfo *appInfo, char *appID, pid_t appPID, guint32 launchFlags, char *scheme)
void prv_send_jumplist_reply (RunningAppInfo *senderInfo, AlpMessage *replyTo)
void prv_jumplist_accumulate (char *appID)
void prv_handle_watcher (RunningAppInfo *requesterInfo, AlpMessage *msg)
void prv_handle_retire_request (AlpMessage *retireMsg)
void prv_handle_set_backgrounding (RunningAppInfo *appInfo, AlpMessage *msg)
void prv_handle_app_register (RunningAppInfo *senderInfo, AlpMessage *msg)
void prv_init_appserver (int argc, char *argv[])
void prv_takedown_appserver (void)
void prv_other_init (void)
void prv_other_takedown (void)
int main (int argc, char *argv[])

Variables

KeyCode gHomeKeyCode = 0
KeyCode gHomePageKeyCode = 0


Define Documentation

#define ALP_TRACE   ALP_TRACE_OFF
 

#define APPSERVERLOCK   "/var/lock/.alp_appserverd_lock"
 

#define PRV_EXIT_TIMER   0
 

#define PRV_JUMPLIST_NUM_RECENT   10
 

#define PRV_KILL_TIMER_SECS   3
 

#define PRV_LAUNCH_TIMEOUT_SECS   5
 

#define PRV_NUM_KILL_TIMERS   2
 

#define PRV_RELAUNCH_TIMER   1
 


Typedef Documentation

typedef struct AppWatcher AppWatcher
 

typedef struct PendingLaunch PendingLaunch
 

typedef struct RunningAppInfo RunningAppInfo
 


Function Documentation

int main int  argc,
char *  argv[]
 

void prv_broadcast_diagnostic_msg char *  appID,
char *  str
 

void prv_check_default_app void   ) 
 

void prv_clear_kill_timer RunningAppInfo appInfo,
int  which
 

void prv_clear_launch_timeout PendingLaunch pend  ) 
 

void prv_client_connect_cb AlpConnection connection,
gpointer  cbData
 

void prv_client_disconnect_cb AlpConnection connection,
gpointer  cbData
 

gint prv_compare_strcmp gconstpointer  a,
gconstpointer  b
 

alp_status_t prv_dispatch_launch char *  appID,
AlpMessage msg
 

void prv_do_initial_app_registration RunningAppInfo appInfo,
char *  appID,
pid_t  appPID,
guint32  launchFlags,
char *  scheme
 

void prv_do_next_pending_launch char *  appID  ) 
 

gboolean prv_exit_timer_proc gpointer  cbData  ) 
 

RunningAppInfo * prv_find_app_by_id char *  appID  ) 
 

PendingLaunch * prv_find_pending_launch char *  appID  ) 
 

AppWatcher* prv_find_watcher AlpWatcherRef  ref  ) 
 

void prv_free_running_app_info RunningAppInfo app  ) 
 

void prv_handle_app_register RunningAppInfo senderInfo,
AlpMessage msg
 

void prv_handle_exit_request AlpMessage exitMsg  ) 
 

gboolean prv_handle_kill_timer RunningAppInfo appInfo,
gint  which
 

void prv_handle_launch RunningAppInfo requesterInfo,
AlpMessage msg
 

void prv_handle_retire_request AlpMessage retireMsg  ) 
 

void prv_handle_set_backgrounding RunningAppInfo appInfo,
AlpMessage msg
 

void prv_handle_watcher RunningAppInfo requesterInfo,
AlpMessage msg
 

void prv_init_appserver int  argc,
char *  argv[]
 

void prv_jumplist_accumulate char *  appID  ) 
 

gboolean prv_launch_timeout_proc gpointer  cbData  ) 
 

void prv_other_init void   ) 
 

void prv_other_takedown void   ) 
 

void prv_print_pending_list void   ) 
 

void prv_receive_data_cb AlpConnection connection,
AlpMessage message,
gpointer  cbData
 

gboolean prv_relaunch_timer_proc gpointer  cbData  ) 
 

void prv_remove_pending_launch PendingLaunch pendLaunch,
alp_status_t  err,
pid_t  appPID
 

void prv_retire_app RunningAppInfo appInfo  ) 
 

void prv_retire_transient_apps void   ) 
 

gboolean prv_search_args char *  searchArg,
int  argc,
char *  argv[]
 

void prv_send_jumplist_reply RunningAppInfo senderInfo,
AlpMessage replyTo
 

void prv_send_launch_reply RunningAppInfo dest,
char *  appID,
alp_status_t  launchErr,
pid_t  appPID
 

alp_status_t prv_send_to_launchpad char *  appID,
AlpMessage msg
 

void prv_set_kill_timer RunningAppInfo appInfo,
int  which
 

void prv_set_launch_timeout PendingLaunch pend  ) 
 

void prv_takedown_appserver void   ) 
 

AppWatcher* prv_watcher_find AlpWatcherRef  ref  ) 
 

void prv_watcher_notify char *  appID  ) 
 

void prv_watcher_remove_by_owner RunningAppInfo owner  ) 
 


Variable Documentation

KeyCode gHomeKeyCode = 0
 

KeyCode gHomePageKeyCode = 0
 


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