Main Page | Directories | File List | File Members

osso-manager.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
00021  *
00022  */
00023 
00028 #ifndef OSSO_MANAGER_H
00029 #define OSSO_MANAGER_H
00030 
00031 #include <libosso.h>
00032 #include <X11/Xlib.h>
00033 /* hildon includes */
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 /* OSSO_MANAGER_H */

Generated on Thu Dec 21 11:26:52 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2