00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00029 #ifndef OSSO_MANAGER_H
00030 #define OSSO_MANAGER_H
00031
00032 #include <libosso.h>
00033 #include <X11/Xlib.h>
00034
00035 #include "hildon-navigator.h"
00036
00037 #define APP_NAME_LEN 64
00038
00039 #define OSSO_BUS_ROOT "com.nokia"
00040 #define OSSO_BUS_ROOT_PATH "/com/nokia"
00041 #define OSSO_BUS_TOP "top_application"
00042
00043 #define TASKNAV "tasknav"
00044 #define TASKNAV_VERSION "0.1"
00045
00046 #define METHOD_NAME_LEN 64
00047
00048 #define SERVICE_PREFIX "com.nokia."
00049
00050 #define SERVICE_NAME_LEN 255
00051 #define PATH_NAME_LEN 255
00052 #define INTERFACE_NAME_LEN 255
00053 #define TMP_NAME_LEN 255
00054
00055 #define DBUS_BUF_SIZE 128
00056
00057 typedef struct osso_manager osso_manager_t;
00058
00059 G_BEGIN_DECLS
00060
00061 struct osso_manager {
00062 osso_context_t *osso;
00063 GArray *methods;
00064 Window window;
00065 };
00066
00067
00068
00078 typedef int (tasknav_cb_f)(GArray *arguments, gpointer data);
00079
00080 typedef struct osso_method {
00081 gchar name[METHOD_NAME_LEN];
00082 tasknav_cb_f *method;
00083 gpointer data;
00084 } osso_method;
00085
00086 typedef struct {
00087 gchar name[APP_NAME_LEN];
00088 } app_name_t;
00089
00090
00091
00092
00096 osso_manager_t *osso_manager_singleton_get_instance( void );
00097
00107 void add_method_cb(osso_manager_t *manager,
00108 const gchar *methodname,
00109 tasknav_cb_f *method,
00110 gpointer data);
00111
00113 void osso_manager_launch(osso_manager_t *man,const gchar *app,
00114 const gchar *launch_data);
00115
00116
00118 void osso_manager_infoprint(osso_manager_t *man, const gchar *message);
00119
00121 void osso_manager_set_window(osso_manager_t *man,Window win);
00122
00123
00124
00126 int is_service_running(const char *service);
00127
00130 osso_context_t *get_context(osso_manager_t *man);
00131
00132 G_END_DECLS
00133
00134 #endif