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  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00029 #ifndef OSSO_MANAGER_H
00030 #define OSSO_MANAGER_H
00031 
00032 #include <libosso.h>
00033 #include <X11/Xlib.h>
00034 /* hildon includes */
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 /* OSSO_MANAGER_H */

Generated on Fri Jun 9 16:23:09 2006 for maemo-af-desktop-documentation by  doxygen 1.4.6