eripc_support.h

Go to the documentation of this file.
00001 #ifndef _ERIPC_SUPPORT_
00002 #define _ERIPC_SUPPORT_
00003 
00004 /**
00005  * @addtogroup eripc
00006  * @{
00007  * @file eripc_support.h
00008  * @brief Public header for liberipc support functions.
00009  */
00010  
00011 /*
00012  * This file is part of liberipc.
00013  *
00014  * liberipc is free software: you can redistribute it and/or modify
00015  * it under the terms of the GNU General Public License as published by
00016  * the Free Software Foundation, either version 2 of the License, or
00017  * (at your option) any later version.
00018  *
00019  * liberipc is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU General Public License
00025  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00026  */
00027 
00028 /**
00029  * Copyright (C) 2008 iRex Technologies B.V. 
00030  * All rights reserved.
00031  *
00032  * Based on code found in libosso library by Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>
00033  */
00034 
00035 #include <glib.h>
00036 #include "eripc.h"
00037 
00038 G_BEGIN_DECLS
00039 
00040 typedef struct {
00041     eripc_context_t *context;
00042     gchar *name;
00043     gchar *service;
00044     gchar *path;
00045 } eripc_client_context_t;
00046 
00047 typedef struct {
00048     gboolean    has_stylus;
00049     gboolean    has_wifi;
00050     gboolean    has_bluetooth;
00051     gboolean    has_3g;
00052 } eripc_device_caps_t;
00053 
00054 typedef struct {
00055     eripc_handler_t *handler;
00056     const gchar     *message_name;
00057     const gchar     *interface;
00058     gint            handler_id;
00059 } eripc_callback_function_t;
00060 
00061 
00062 /**
00063  * Create a new client context for a client application
00064  */
00065 eripc_client_context_t *eripc_client_context_new( const char *name,
00066                                                   const char *version,
00067                                                   const char *service,
00068                                                   const char *path,
00069                                                   const char *interface,
00070                                                   eripc_callback_function_t *callbacks );
00071 
00072 /**
00073  * Free a client context
00074  */
00075 void eripc_client_context_free( eripc_client_context_t *ccontext,
00076                                 eripc_callback_function_t *callbacks );
00077 
00078 /**
00079  * Return error string for code
00080  */
00081 const gchar* eripc_error_string(eripc_error_t errorcode);
00082 
00083 /**
00084  * Add a new menu to the popupmenu
00085  */
00086 gboolean eripc_menu_add_menu( eripc_client_context_t *ccontext,
00087                               const char *name,
00088                               const char *group1,
00089                               const char *group2,
00090                               const char *group3,
00091                               const char *group4 );
00092 
00093 /**
00094  * Remove a menu from the popupmenu
00095  */
00096 gboolean eripc_menu_remove_menu( eripc_client_context_t *ccontext,
00097                                  const char *name );
00098 
00099 /**
00100  * Add a new group to a popupmenu menu
00101  */
00102 gboolean eripc_menu_add_group( eripc_client_context_t *ccontext,
00103                                const char *name,
00104                                const char *parent, 
00105                                const char *image );
00106 
00107 /**
00108  * Add a new item to a popupmenu group
00109  */
00110 gboolean eripc_menu_add_item( eripc_client_context_t *ccontext,
00111                               const char *name,
00112                               const char *parent, 
00113                               const char *image  );
00114 
00115 /**
00116  * Set the label for a popupmenu menu
00117  */
00118 gboolean eripc_menu_set_menu_label ( eripc_client_context_t *ccontext,
00119                                      const char *name,
00120                                      const char *label );
00121 
00122 /**
00123  * Set the label for a popupmenu group
00124  */
00125 gboolean eripc_menu_set_group_label ( eripc_client_context_t *ccontext,
00126                                       const char *name,
00127                                       const char *label );
00128 
00129 /**
00130  * Set the label for a popupmenu item
00131  */
00132 gboolean eripc_menu_set_item_label ( eripc_client_context_t *ccontext,
00133                                      const char *name,
00134                                      const char *parent, 
00135                                      const char *label );
00136 
00137 /**
00138  * Show a specific popupmenu menu
00139  */
00140 gboolean eripc_menu_show_menu( eripc_client_context_t *ccontext,
00141                                const char *name );
00142 
00143 /**
00144  * Set a popupmenu group's state
00145  */
00146 gboolean eripc_menu_set_group_state( eripc_client_context_t *ccontext,
00147                                      const char *name,
00148                                      const char *state );
00149 
00150 /**
00151  * Set a popupmenu item's state
00152  */
00153 gboolean eripc_menu_set_item_state( eripc_client_context_t *ccontext,
00154                                     const char *name,
00155                                     const char *parent,
00156                                     const char *state );
00157 
00158 /**
00159  * Set the statusbar page counter
00160  */
00161 gboolean eripc_menu_set_pagecounter( eripc_client_context_t *ccontext,
00162                                      int cur_page,
00163                                      int num_pages,
00164                                      gboolean boundary_check );
00165 
00166 /**
00167  * Set a statusbar item's state
00168  */
00169 gboolean eripc_menu_set_statusitem_state( eripc_client_context_t *ccontext,
00170                                           const char *item,
00171                                           const char *state );
00172 
00173 /**
00174  * Set the popupmenu's state
00175  */
00176 gboolean eripc_sysd_set_menu_state( eripc_client_context_t *ccontext,
00177                                     const char *state );
00178 
00179 /**
00180  * Request an SD card mount
00181  */
00182 gboolean eripc_sysd_mount_sd_card( eripc_client_context_t *ccontext, gboolean show_index_splash);
00183 
00184 /**
00185  * Request an SD card unmount
00186  */
00187 gboolean eripc_sysd_unmount_sd_card( eripc_client_context_t *ccontext );
00188 
00189 /**
00190  * Set busy state
00191  */
00192 gboolean eripc_sysd_set_busy( eripc_client_context_t *ccontext,
00193                               const char *state,
00194                               const char *message );
00195 
00196 /**
00197  * Reset busy state
00198  */
00199 gboolean eripc_sysd_reset_busy( eripc_client_context_t *ccontext );
00200 
00201 /**
00202  * Set background busy state
00203  */
00204 gboolean eripc_sysd_set_bg_busy( eripc_client_context_t *ccontext );
00205 
00206 /**
00207  * Reset background busy state
00208  */
00209 gboolean eripc_sysd_reset_bg_busy( eripc_client_context_t *ccontext );
00210 
00211 /**
00212  * Set keyboard state
00213  */
00214 gboolean eripc_sysd_set_keyboard( eripc_client_context_t *ccontext, 
00215                                   const char *state);
00216 
00217 /**
00218  * Signal the application has completed startup
00219  */
00220 gboolean eripc_sysd_startup_complete( eripc_client_context_t *ccontext,
00221                                       const int pid,
00222                                       const gboolean is_multidoc,
00223                                       const int xid);
00224 
00225 /**
00226  * Request a task be started
00227  */
00228 gint eripc_sysd_start_task( eripc_client_context_t *ccontext,
00229                             const gchar  *cmd_line,
00230                             const gchar  *work_dir,
00231                             const gchar  *label,
00232                             const gchar  *thumbnail_path,
00233                             gchar        **err_message );
00234 
00235 /**
00236  * Request a task be stopped
00237  */
00238 gboolean eripc_sysd_stop_task( eripc_client_context_t *ccontext,
00239                               const char *cmd_line );
00240 
00241 /**
00242  * Request an url be opened
00243  */
00244 gint eripc_sysd_open_url ( eripc_client_context_t *ccontext,
00245                            const gchar  *url,
00246                            const gchar  *label,
00247                            const gchar  *back_text,
00248                            gchar        **err_message );
00249 
00250 /**
00251  * Return the device's capabilities
00252  */
00253 gboolean eripc_sysd_get_device_capabilities ( eripc_client_context_t *ccontext,
00254                                               eripc_device_caps_t *caps );
00255 
00256 /**
00257  * Request a network connection
00258  */
00259 gboolean eripc_sysd_conn_connect ( eripc_client_context_t *ccontext,
00260                                    const char *medium,
00261                                    const char *profile );
00262                                    
00263 /**
00264  * Release the network connection
00265  */
00266 gboolean eripc_sysd_conn_disconnect ( eripc_client_context_t *ccontext );
00267 
00268 /**
00269  * Request the current network network status
00270  */
00271 gboolean eripc_sysd_conn_status_request ( eripc_client_context_t *ccontext );
00272 
00273 G_END_DECLS
00274 
00275 /** @} */
00276 
00277 #endif /* _ERIPC_ */
00278 
Generated by  doxygen 1.6.2-20100208