00001 #ifndef __IPC_H__ 00002 #define __IPC_H__ 00003 00004 /** 00005 * File Name : ipc.h 00006 * 00007 * Description: The dbus-based eripc functions 00008 */ 00009 00010 /* 00011 * This file is part of hello-world-settings. 00012 * 00013 * hello-world is free software: you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation, either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * hello-world is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 */ 00026 00027 /** 00028 * Copyright (C) 2009 iRex Technologies B.V. 00029 * All rights reserved. 00030 */ 00031 00032 00033 //---------------------------------------------------------------------------- 00034 // Include Files 00035 //---------------------------------------------------------------------------- 00036 00037 #include <liberipc/eripc.h> 00038 00039 G_BEGIN_DECLS 00040 00041 00042 //---------------------------------------------------------------------------- 00043 // Definitions 00044 //---------------------------------------------------------------------------- 00045 00046 00047 //---------------------------------------------------------------------------- 00048 // Forward Declarations 00049 //---------------------------------------------------------------------------- 00050 00051 00052 //---------------------------------------------------------------------------- 00053 // Type Declarations 00054 //---------------------------------------------------------------------------- 00055 00056 00057 //---------------------------------------------------------------------------- 00058 // Global Constants 00059 //---------------------------------------------------------------------------- 00060 00061 00062 //============================================================================ 00063 // Public Functions 00064 //============================================================================ 00065 00066 /**--------------------------------------------------------------------------- 00067 * 00068 * Name : ipc_set_services 00069 * 00070 * @brief Setup IPC connection and register API functions 00071 * 00072 * @param -- 00073 * 00074 * @return -- 00075 * 00076 *--------------------------------------------------------------------------*/ 00077 void ipc_set_services ( void ); 00078 00079 00080 /**--------------------------------------------------------------------------- 00081 * 00082 * Name : ipc_unset_services 00083 * 00084 * @brief Unregister API functions 00085 * 00086 * @param -- 00087 * 00088 * @return -- 00089 * 00090 *--------------------------------------------------------------------------*/ 00091 void ipc_unset_services ( void ); 00092 00093 00094 /**--------------------------------------------------------------------------- 00095 * 00096 * Name : ipc_sys_startup_complete 00097 * 00098 * @brief Report "application started" to sysd 00099 * 00100 * @param -- 00101 * 00102 * @return -- 00103 * 00104 *--------------------------------------------------------------------------*/ 00105 void ipc_sys_startup_complete ( void ); 00106 00107 00108 /**--------------------------------------------------------------------------- 00109 * 00110 * Name : ipc_menu_add_menu 00111 * 00112 * @brief Send message addMenu to popup menu 00113 * 00114 * @param [in] name - name (mnemonic) of the menu 00115 * @param [in] group1 .. group3 - name (mnemonic) of the menu groups 00116 * 00117 * @return TRUE on success, FALSE otherwise 00118 * 00119 *--------------------------------------------------------------------------*/ 00120 gboolean ipc_menu_add_menu ( const char *name, 00121 const char *group1, 00122 const char *group2, 00123 const char *group3 ); 00124 00125 00126 /**--------------------------------------------------------------------------- 00127 * 00128 * Name : ipc_menu_add_group 00129 * 00130 * @brief Send message addGroup to popup menu 00131 * 00132 * @param [in] name - name (mnemonic) of menu group 00133 * @param [in] parent - name (mnemonic) of the group this group belongs to, 00134 * or NULL when this group is at the highest level 00135 * @param [in] image - icon bitmap file 00136 * 00137 * @return TRUE on success, FALSE otherwise 00138 * 00139 *--------------------------------------------------------------------------*/ 00140 gboolean ipc_menu_add_group ( const char *name, 00141 const char *parent, 00142 const char *image ); 00143 00144 00145 /**--------------------------------------------------------------------------- 00146 * 00147 * Name : ipc_menu_add_item 00148 * 00149 * @brief Send message addGroup to popup menu 00150 * 00151 * @param [in] name - name (mnemonic) of menu item 00152 * @param [in] parent - name (mnemomic) of the menu group this item belongs to 00153 * @param [in] image - icon bitmap file 00154 * 00155 * @return TRUE on success, FALSE otherwise 00156 * 00157 *--------------------------------------------------------------------------*/ 00158 gboolean ipc_menu_add_item ( const char *name, 00159 const char *parent, 00160 const char *image ); 00161 00162 00163 /**--------------------------------------------------------------------------- 00164 * 00165 * Name : ipc_menu_set_menu_label 00166 * 00167 * @brief Send message setMenuLabel to popup menu 00168 * 00169 * @param [in] name - name (mnemonic) of the menu 00170 * @param [in] label - on-screen text at the top of the menu 00171 * 00172 * @return TRUE on success, FALSE otherwise 00173 * 00174 *--------------------------------------------------------------------------*/ 00175 gboolean ipc_menu_set_menu_label ( const char *name, 00176 const char *label ); 00177 00178 00179 /**--------------------------------------------------------------------------- 00180 * 00181 * Name : ipc_menu_set_group_label 00182 * 00183 * @brief Send message setGroupLabel to popup menu 00184 * 00185 * @param [in] name - name (mnemonic) of menu group 00186 * @param [in] label - on-screen text at the top of the menu group 00187 * 00188 * @return TRUE on success, FALSE otherwise 00189 * 00190 *--------------------------------------------------------------------------*/ 00191 gboolean ipc_menu_set_group_label ( const char *name, 00192 const char *label ); 00193 00194 00195 /**--------------------------------------------------------------------------- 00196 * 00197 * Name : ipc_menu_set_item_label 00198 * 00199 * @brief Send message setItemLabel to popup menu 00200 * 00201 * @param [in] name - name (mnemonic) of menu item 00202 * @param [in] parent - name (mnemomic) of the menu group this item belongs to 00203 * @param [in] label - on-screen text below icon 00204 * 00205 * @return TRUE on success, FALSE otherwise 00206 * 00207 *--------------------------------------------------------------------------*/ 00208 gboolean ipc_menu_set_item_label ( const char *name, 00209 const char *parent, 00210 const char *label ); 00211 00212 00213 /**--------------------------------------------------------------------------- 00214 * 00215 * Name : ipc_menu_show_menu 00216 * 00217 * @brief Send message showMenu to popup menu 00218 * 00219 * @param [in] name - name (mnemonic) of menu to be displayed 00220 * 00221 * @return TRUE on success, FALSE otherwise 00222 * 00223 *--------------------------------------------------------------------------*/ 00224 gboolean ipc_menu_show_menu ( const char *name ); 00225 00226 00227 /**--------------------------------------------------------------------------- 00228 * 00229 * Name : ipc_remove_menu 00230 * 00231 * @brief Remove menu from popup menu. 00232 * 00233 * @param [in] name - name (mnemonic) of menu to be removed 00234 * 00235 * @return -- 00236 * 00237 *--------------------------------------------------------------------------*/ 00238 gboolean ipc_remove_menu( const char *name ); 00239 00240 00241 /**--------------------------------------------------------------------------- 00242 * 00243 * Name : ipc_menu_set_group_state 00244 * 00245 * @brief Send message setItemState to popup menu 00246 * 00247 * @param [in] name - name (mnemonic) of menu group to be set 00248 * @param [in] state - new state ("normal", "disabled") 00249 * 00250 * @return TRUE on success, FALSE otherwise 00251 * 00252 *--------------------------------------------------------------------------*/ 00253 gboolean ipc_menu_set_group_state ( const char *name, 00254 const char *state ); 00255 00256 00257 /**--------------------------------------------------------------------------- 00258 * 00259 * Name : ipc_menu_set_item_state 00260 * 00261 * @brief Send message setItemState to popup menu 00262 * 00263 * @param [in] name - name (mnemonic) of menu item to be set 00264 * @param [in] parent - name (mnemomic) of the menu group this item belongs to 00265 * @param [in] state - new state ("normal", "selected", "disabled") 00266 * 00267 * @return TRUE on success, FALSE otherwise 00268 * 00269 *--------------------------------------------------------------------------*/ 00270 gboolean ipc_menu_set_item_state ( const char *name, 00271 const char *parent, 00272 const char *state ); 00273 00274 00275 G_END_DECLS 00276 00277 #endif /* __IPC_H__ */