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