  
    
index.htmlMain Page     
modules.htmlModules     
annotated.htmlData Structures     
files.htmlFiles     
pages.htmlRelated Pages   
libhal.h
00001 /*************************************************************************** 00002  * CVSID: $Id: libhal.h,v 1.31 2005/11/02 15:38:14 david Exp $ 00003  * 00004  * libhal.h : HAL daemon C convenience library headers 00005  * 00006  * Copyright (C) 2003 David Zeuthen, <david@fubar.dk> 00007  * 00008  * Licensed under the Academic Free License version 2.1 00009  * 00010  * This program is free software; you can redistribute it and/or modify 00011  * it under the terms of the GNU General Public License as published by 00012  * the Free Software Foundation; either version 2 of the License, or 00013  * (at your option) any later version. 00014  * 00015  * This program is distributed in the hope that it will be useful, 00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 00018  * GNU General Public License for more details. 00019  * 00020  * You should have received a copy of the GNU General Public License 00021  * along with this program; if not, write to the Free Software 00022  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 00023  * 00024  **************************************************************************/ 00025 
00026 #ifndef LIBHAL_H 00027 #define LIBHAL_H 00028 00029 #include <dbus/dbus.h> 00030 
00031 #if defined(__cplusplus) 00032 extern "C" {
00033 #if 0 00034 } /* shut up emacs indenting */ 00035 #endif 00036 #endif 00037 00039 #define LIBHAL_CHECK_LIBHALCONTEXT(_ctx_, _ret_)                    \ 00040     do {                                    \ 00041         if (_ctx_ == NULL) {                        \ 00042             fprintf (stderr,                    \ 00043                  "%s %d : LibHalContext *ctx is NULL\n",    \ 00044                  __FILE__, __LINE__);               \ 00045             return _ret_;                       \ 00046         }                               \ 00047     } while(0) 00048 group__LibHal.html#g5e5a8a56bd7ac6141dd67fdefb14f0e600056  typedef enum {
00058     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e619b26670d27f9a7fe91dcb441b040c68LIBHAL_PROPERTY_TYPE_INVALID      =    DBUS_TYPE_INVALID,
00059 
00061     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e6c3a42b401b3833e88ec4aa4c631f96e6LIBHAL_PROPERTY_TYPE_INT32    =    DBUS_TYPE_INT32,
00062 
00064     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e69b9b049650db0d7c0e90ad6d4a4a67dfLIBHAL_PROPERTY_TYPE_UINT64   =    DBUS_TYPE_UINT64,
00065 
00067     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e66fff949a9f9ac721a21f8d33a3dfe107LIBHAL_PROPERTY_TYPE_DOUBLE   =    DBUS_TYPE_DOUBLE,
00068 
00070     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e6ddf1c8c88ff976b5440c73eea63edd47LIBHAL_PROPERTY_TYPE_BOOLEAN  =    DBUS_TYPE_BOOLEAN,
00071 
00073     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e665a50adaddc694a6b4dafa40c8ef6bb8LIBHAL_PROPERTY_TYPE_STRING   =    DBUS_TYPE_STRING,
00074 
00076     group__LibHal.html#gg5e5a8a56bd7ac6141dd67fdefb14f0e65bd27c02eb7c7ecda103daf0da715c30LIBHAL_PROPERTY_TYPE_STRLIST  =     ((int) (DBUS_TYPE_STRING<<8)+('l'))
00077 } group__LibHal.html#g5e5a8a56bd7ac6141dd67fdefb14f0e6LibHalPropertyType ;
00078 
00079 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00080 typedef struct structLibHalContext__s.htmlLibHalContext_s  LibHalContext;
00081 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00082 
group__LibHal.html#g894f0989786d813664bf82749153bfb100089  typedef void (* group__LibHal.html#g894f0989786d813664bf82749153bfb1LibHalIntegrateDBusIntoMainLoop ) (LibHalContext *ctx,
00090                          DBusConnection *dbus_connection);
00091 
group__LibHal.html#gae0a349979b2facc33cffaefa5ecb85400097  typedef void (* group__LibHal.html#gae0a349979b2facc33cffaefa5ecb854LibHalDeviceAdded ) (LibHalContext *ctx, 
00098                    const char *udi);
00099 
group__LibHal.html#g86ae1246b009d898ffc9dfdeed0ca62300105  typedef void (* group__LibHal.html#g86ae1246b009d898ffc9dfdeed0ca623LibHalDeviceRemoved ) (LibHalContext *ctx, 
00106                      const char *udi);
00107 
group__LibHal.html#gbf3956b6ea6197cb387e26cdd0e8d8c600114  typedef void (* group__LibHal.html#gbf3956b6ea6197cb387e26cdd0e8d8c6LibHalDeviceNewCapability ) (LibHalContext *ctx, 
00115                        const char *udi,
00116                        const char *capability);
00117 
group__LibHal.html#gca727978472d133604830e138201c83a00124  typedef void (* group__LibHal.html#gca727978472d133604830e138201c83aLibHalDeviceLostCapability ) (LibHalContext *ctx, 
00125                         const char *udi,
00126                         const char *capability);
00127 
group__LibHal.html#gaa8e717584c94defb20c375bfacd78f800136  typedef void (* group__LibHal.html#gaa8e717584c94defb20c375bfacd78f8LibHalDevicePropertyModified ) (LibHalContext *ctx,
00137                           const char *udi,
00138                           const char *key,
00139                           dbus_bool_t is_removed,
00140                           dbus_bool_t is_added);
00141 
group__LibHal.html#g486e784757f222a608eb484f35f8db6900151  typedef void (* group__LibHal.html#g486e784757f222a608eb484f35f8db69LibHalDeviceCondition ) (LibHalContext *ctx,
00152                        const char *udi,
00153                        const char *condition_name,
00154                        const char *condition_detail);
00155 
00156 
00157 /* Create a new context for a connection with hald */ 00158 LibHalContext * group__LibHal.html#gb424ee1341182290f98a54490f1c6512libhal_ctx_new                           (void);
00159 
00160 /* Enable or disable caching */ 00161 dbus_bool_t    group__LibHal.html#g36823cdb437cf58e6a0acf4ce0ecbe49libhal_ctx_set_cache                     (LibHalContext *ctx, dbus_bool_t use_cache);
00162 
00163 /* Set DBus connection to use to talk to hald. */ 00164 dbus_bool_t    group__LibHal.html#g27ba5c46b35e171ce03ffbd003878157libhal_ctx_set_dbus_connection           (LibHalContext *ctx, DBusConnection *conn);
00165 
00166 /* Set user data for the context */ 00167 dbus_bool_t    group__LibHal.html#gbeb2726ca69a0a04958a9cff8e2d3157libhal_ctx_set_user_data                 (LibHalContext *ctx, void * structLibHalContext__s.html#89c99c1d7d8a70f3484638aa82c976fauser_data );
00168 
00169 /* Get user data for the context */ 00170 void*          group__LibHal.html#ge39c55292f5e3a5c483101173fb2b416libhal_ctx_get_user_data                 (LibHalContext *ctx);
00171 
00172 /* Set the callback for when a device is added */ 00173 dbus_bool_t    group__LibHal.html#g515dc39e668b7737dda9c2c340c5788elibhal_ctx_set_device_added              (LibHalContext *ctx, group__LibHal.html#gae0a349979b2facc33cffaefa5ecb854LibHalDeviceAdded  callback);
00174 
00175 /* Set the callback for when a device is removed */ 00176 dbus_bool_t    group__LibHal.html#g9b47944eb3514325abfd7698f4cd7fd9libhal_ctx_set_device_removed            (LibHalContext *ctx, group__LibHal.html#g86ae1246b009d898ffc9dfdeed0ca623LibHalDeviceRemoved  callback);
00177 
00178 /* Set the callback for when a device gains a new capability */ 00179 dbus_bool_t    group__LibHal.html#ga3c245e6b37f716541639a321222a3b7libhal_ctx_set_device_new_capability     (LibHalContext *ctx, group__LibHal.html#gbf3956b6ea6197cb387e26cdd0e8d8c6LibHalDeviceNewCapability  callback);
00180 
00181 /* Set the callback for when a device loses a capability */ 00182 dbus_bool_t    group__LibHal.html#gc902a0065183c7cafd53b8634693c527libhal_ctx_set_device_lost_capability    (LibHalContext *ctx, group__LibHal.html#gca727978472d133604830e138201c83aLibHalDeviceLostCapability  callback);
00183 
00184 /* Set the callback for when a property is modified on a device */ 00185 dbus_bool_t    group__LibHal.html#gdd2847764061001993e4ecb3c1ef9d13libhal_ctx_set_device_property_modified  (LibHalContext *ctx, group__LibHal.html#gaa8e717584c94defb20c375bfacd78f8LibHalDevicePropertyModified  callback);
00186 
00187 /* Set the callback for when a device emits a condition */ 00188 dbus_bool_t    group__LibHal.html#g5d10b018ee9c4876c4b4ec995c98b20clibhal_ctx_set_device_condition          (LibHalContext *ctx, group__LibHal.html#g486e784757f222a608eb484f35f8db69LibHalDeviceCondition  callback);
00189 
00190 /* Initialize the connection to hald */ 00191 dbus_bool_t    group__LibHal.html#g2376b4debf5a4a65ae35dec397846846libhal_ctx_init                          (LibHalContext *ctx, DBusError *error);
00192 
00193 /* Shut down a connection to hald */ 00194 dbus_bool_t    group__LibHal.html#gc898742f7853a8b7d70569886b8b2a3alibhal_ctx_shutdown                      (LibHalContext *ctx, DBusError *error);
00195 
00196 /* Free a LibHalContext resource */ 00197 dbus_bool_t    group__LibHal.html#g438a1cbf67b357979b903be9fe23b652libhal_ctx_free                          (LibHalContext *ctx);
00198 
00199 /* Create an already initialized connection to hald */ 00200 LibHalContext * group__LibHal.html#gac5e017f5a339cf4904c8d3ccf03bdd9libhal_ctx_init_direct                   (DBusError *error);
00201 
00202 /* Get all devices in the Global Device List (GDL). */ 00203 char        ** group__LibHal.html#g266be22c5155a92d031fbbead26b2da6libhal_get_all_devices  (LibHalContext *ctx, int *num_devices, DBusError *error);
00204 
00205 /* Determine if a device exists. */ 00206 dbus_bool_t   group__LibHal.html#g3fd17b23cd1ccc7a16072c4e94bfbfb3libhal_device_exists    (LibHalContext *ctx, const char *udi,  DBusError *error);
00207 
00208 /* Print a device to stdout; useful for debugging. */ 00209 dbus_bool_t   group__LibHal.html#g92eae8c7e513a0da01b8a54a6176f0dalibhal_device_print     (LibHalContext *ctx, const char *udi,  DBusError *error);
00210 
00211 /* Determine if a property on a device exists. */ 00212 dbus_bool_t group__LibHal.html#g9c423145ebe05084f4a5f1e51a7c19f1libhal_device_property_exists  (LibHalContext *ctx, 
00213                        const char *udi,
00214                        const char *key,
00215                        DBusError *error);
00216 
00217 /* Get the value of a property of type string. */ 00218 char * group__LibHal.html#g066ef29ec76a3389801c7e5980737657libhal_device_get_property_string  (LibHalContext *ctx, 
00219                      const char *udi,
00220                      const char *key,
00221                      DBusError *error);
00222 
00223 /* Get the value of a property of type signed integer. */ 00224 dbus_int32_t group__LibHal.html#g19c851422023ac683db0ff5ef9b118e3libhal_device_get_property_int  (LibHalContext *ctx, 
00225                          const char *udi,
00226                          const char *key,
00227                          DBusError *error);
00228 
00229 /* Get the value of a property of type unsigned integer. */ 00230 dbus_uint64_t group__LibHal.html#g6b23bf729d1e61e50766394a2be51353libhal_device_get_property_uint64  (LibHalContext *ctx, 
00231                          const char *udi,
00232                          const char *key,
00233                          DBusError *error);
00234 
00235 /* Get the value of a property of type double. */ 00236 double group__LibHal.html#g482a8d663dd23bab9c2246b423a0f395libhal_device_get_property_double  (LibHalContext *ctx, 
00237                       const char *udi,
00238                       const char *key,
00239                       DBusError *error);
00240 
00241 /* Get the value of a property of type bool. */ 00242 dbus_bool_t group__LibHal.html#ge8ebd0da6bf3112b522d92a5fe0fcc7flibhal_device_get_property_bool  (LibHalContext *ctx, 
00243                          const char *udi,
00244                          const char *key,
00245                          DBusError *error);
00246 
00247 /* Get the value of a property of type string list. */ 00248 char ** group__LibHal.html#g00a326eb75e3bca19a69e7adc666bb0dlibhal_device_get_property_strlist  (LibHalContext *ctx, 
00249                        const char *udi, 
00250                        const char *key,
00251                        DBusError *error);
00252 
00253 /* Set a property of type string. */ 00254 dbus_bool_t group__LibHal.html#gadd157e098efc40f1827ce5d05e69db2libhal_device_set_property_string  (LibHalContext *ctx, 
00255                            const char *udi,
00256                            const char *key,
00257                            const char *value,
00258                            DBusError *error);
00259 
00260 /* Set a property of type signed integer. */ 00261 dbus_bool_t group__LibHal.html#g2aba1a83610f6c1ebbaaf27d1ddf6113libhal_device_set_property_int  (LibHalContext *ctx, 
00262                         const char *udi,
00263                         const char *key,
00264                         dbus_int32_t value,
00265                         DBusError *error);
00266 
00267 /* Set a property of type unsigned integer. */ 00268 dbus_bool_t group__LibHal.html#g84726584e834b64d487c6961225686a0libhal_device_set_property_uint64  (LibHalContext *ctx, 
00269                            const char *udi,
00270                            const char *key,
00271                            dbus_uint64_t value,
00272                            DBusError *error);
00273 
00274 /* Set a property of type double. */ 00275 dbus_bool_t group__LibHal.html#gcae2cb49002a001d8488ff8a8970fb2blibhal_device_set_property_double  (LibHalContext *ctx, 
00276                            const char *udi,
00277                            const char *key,
00278                            double value,
00279                            DBusError *error);
00280 
00281 /* Set a property of type bool. */ 00282 dbus_bool_t group__LibHal.html#gd2aeb19524c48b1adbf0136b66773ee8libhal_device_set_property_bool  (LibHalContext *ctx, 
00283                          const char *udi,
00284                          const char *key,
00285                          dbus_bool_t value,
00286                          DBusError *error);
00287 
00288 /* Append to a property of type strlist. */ 00289 dbus_bool_t group__LibHal.html#gbf07ef68a656f0688674b81e93c81e7clibhal_device_property_strlist_append  (LibHalContext *ctx, 
00290                            const char *udi,
00291                            const char *key,
00292                            const char *value,
00293                            DBusError *error);
00294 
00295 /* Prepend to a property of type strlist. */ 00296 dbus_bool_t group__LibHal.html#gb776e01e9b35b56494610546c1beda46libhal_device_property_strlist_prepend  (LibHalContext *ctx, 
00297                             const char *udi,
00298                             const char *key,
00299                             const char *value,
00300                             DBusError *error);
00301 
00302 /* Remove a specified string from a property of type strlist. */ 00303 dbus_bool_t group__LibHal.html#g6eef668b485c1be2d41fe80ecdd84339libhal_device_property_strlist_remove_index  (LibHalContext *ctx, 
00304                              const char *udi,
00305                              const char *key,
00306                              unsigned int index,
00307                              DBusError *error);
00308 
00309 /* Remove a specified string from a property of type strlist. */ 00310 dbus_bool_t group__LibHal.html#g66655fe0f17d18398c4ba845c397ba3flibhal_device_property_strlist_remove  (LibHalContext *ctx, 
00311                            const char *udi,
00312                            const char *key,
00313                            const char *value,
00314                            DBusError *error);
00315 
00316 /* Remove a property. */ 00317 dbus_bool_t group__LibHal.html#g9867552685ac98d6883c4859c9e28834libhal_device_remove_property  (LibHalContext *ctx, 
00318                        const char *udi,
00319                        const char *key,
00320                        DBusError *error);
00321 
00322 /* Query a property type of a device. */ 00323 group__LibHal.html#g5e5a8a56bd7ac6141dd67fdefb14f0e6LibHalPropertyType  group__LibHal.html#g7934d60a97845aea5a9d5575095b3a3alibhal_device_get_property_type  (LibHalContext *ctx, 
00324                             const char *udi,
00325                             const char *key,
00326                             DBusError *error);
00327 
00328 
00329 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00330 struct structLibHalProperty__s.htmlLibHalProperty_s ;
00331 typedef struct structLibHalProperty__s.htmlLibHalProperty_s  LibHalProperty;
00332 
00333 struct structLibHalPropertySet__s.htmlLibHalPropertySet_s ;
00334 typedef struct structLibHalPropertySet__s.htmlLibHalPropertySet_s  LibHalPropertySet;
00335 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00336 
00337 /* Retrieve all the properties on a device. */ 00338 LibHalPropertySet * group__LibHal.html#g5dbaa81c388a097396cc4e79866f5f45libhal_device_get_all_properties  (LibHalContext *ctx, 
00339                              const char *udi,
00340                              DBusError *error);
00341 
00342 /* Free a property set earlier obtained with libhal_device_get_all_properties(). */ 00343 void group__LibHal.html#g22b659f4c4ae06779ed22ef32e510044libhal_free_property_set  (LibHalPropertySet *set);
00344 
00345 /* Get the number of properties in a property set. */ 00346 unsigned int group__LibHal.html#ge7049a1124105f5321663bd71befb65dlibhal_property_set_get_num_elems  (LibHalPropertySet *set);
00347 
structLibHalPropertySetIterator__s.html00349  struct structLibHalPropertySetIterator__s.htmlLibHalPropertySetIterator_s  {
structLibHalPropertySetIterator__s.html#81576697ea296bc7a14030539173075700350      LibHalPropertySet * structLibHalPropertySetIterator__s.html#81576697ea296bc7a140305391730757set ;    
structLibHalPropertySetIterator__s.html#57eff7bf9d1aa29e95490c54f334279b00351      unsigned int structLibHalPropertySetIterator__s.html#57eff7bf9d1aa29e95490c54f334279bindex ;        
structLibHalPropertySetIterator__s.html#4ac6c2b6d76e90b3836f6beefae76bbd00352      LibHalProperty * structLibHalPropertySetIterator__s.html#4ac6c2b6d76e90b3836f6beefae76bbdcur_prop ;  
structLibHalPropertySetIterator__s.html#ea4b5c64167779423132de85f2ffb30800353      void * structLibHalPropertySetIterator__s.html#ea4b5c64167779423132de85f2ffb308reservered0 ;         
structLibHalPropertySetIterator__s.html#eaf8816907ba6a1ebdefe2b4f6455c1100354      void * structLibHalPropertySetIterator__s.html#eaf8816907ba6a1ebdefe2b4f6455c11reservered1 ;         
00355 };
00356 
00357 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00358 typedef struct structLibHalPropertySetIterator__s.htmlLibHalPropertySetIterator_s  LibHalPropertySetIterator;
00359 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00360 
00361 /* Initialize a property set iterator. */ 00362 void group__LibHal.html#gb754976b6dbe4cfea0d7a18024e3ae4flibhal_psi_init  (LibHalPropertySetIterator *iter, LibHalPropertySet * structLibHalPropertySetIterator__s.html#81576697ea296bc7a140305391730757set );
00363 
00364 /* Determine whether there are more properties to iterate over */ 00365 dbus_bool_t group__LibHal.html#g8c985761b2909c7bdc49e49a3020abc9libhal_psi_has_more  (LibHalPropertySetIterator *iter);
00366 
00367 /* Advance iterator to next property. */ 00368 void group__LibHal.html#g8e628cb8aac74bd4fd307c133dc3fa92libhal_psi_next  (LibHalPropertySetIterator *iter);
00369 
00370 /* Get type of property. */ 00371 group__LibHal.html#g5e5a8a56bd7ac6141dd67fdefb14f0e6LibHalPropertyType  group__LibHal.html#g3df57f4bddd14e70a9237ac5ea16e18flibhal_psi_get_type  (LibHalPropertySetIterator *iter);
00372 
00373 /* Get the key of a property. */ 00374 char * group__LibHal.html#gad021d85a856bad5653a61c82ec0f639libhal_psi_get_key  (LibHalPropertySetIterator *iter);
00375 
00376 /* Get the value of a property of type string. */ 00377 char * group__LibHal.html#g4ed11ffe50e9e62ecaa58e49134f9363libhal_psi_get_string  (LibHalPropertySetIterator *iter);
00378 
00379 /* Get the value of a property of type signed integer. */ 00380 dbus_int32_t group__LibHal.html#ga743b4a7eab85fc493d27cfea2e91099libhal_psi_get_int  (LibHalPropertySetIterator *iter);
00381 
00382 /* Get the value of a property of type unsigned integer. */ 00383 dbus_uint64_t group__LibHal.html#gc644fbe5c10e22607c6f888333561374libhal_psi_get_uint64  (LibHalPropertySetIterator *iter);
00384 
00385 /* Get the value of a property of type double. */ 00386 double group__LibHal.html#gc4a16711253ae21e9a99d18ca1644e30libhal_psi_get_double  (LibHalPropertySetIterator *iter);
00387 
00388 /* Get the value of a property of type bool. */ 00389 dbus_bool_t group__LibHal.html#gc4a14b72e53feef0a6fe809790c00e53libhal_psi_get_bool  (LibHalPropertySetIterator *iter);
00390 
00391 /* Get the value of a property of type string list. */ 00392 char ** group__LibHal.html#g08cb49fc20f19674891a6314651cb0e9libhal_psi_get_strlist  (LibHalPropertySetIterator *iter);
00393 
00394 /* Get the length of an array of strings */ 00395 unsigned int group__LibHal.html#g20d34c56df67cce6d3acba353b16544clibhal_string_array_length  (char **str_array);
00396 
00397 /* Frees a NULL-terminated array of strings. If passed NULL, does nothing. */ 00398 void group__LibHal.html#g588e0fe84f2982df4d4e7e99254bcd87libhal_free_string_array  (char **str_array);
00399 
00400 /* Frees a nul-terminated string */ 00401 void group__LibHal.html#g848151fe424e9b88eb43bf097cc864a9libhal_free_string  (char *str);
00402 
00403 /* Create a new device object which will be hidden from applications 00404  * until the CommitToGdl(), ie. libhal_device_commit_to_gdl(), method is called. 00405  */ 00406 char * group__LibHal.html#g0296ccbb340bb4f2adff509aa04604a4libhal_new_device  (LibHalContext *ctx, DBusError *error);
00407 
00408 /* When a hidden device has been built using the NewDevice method, ie. 00409  * libhal_new_device(), and the org.freedesktop.Hal.Device interface 00410  * this function will commit it to the global device list. 00411  */ 00412 dbus_bool_t group__LibHal.html#g59038b98ab8c170e45af95aea3362a0dlibhal_device_commit_to_gdl  (LibHalContext *ctx,
00413                      const char *temp_udi,
00414                      const char *udi,
00415                      DBusError *error);
00416 
00417 /* This method can be invoked when a device is removed. The HAL daemon 00418  * will shut down the device. Note that the device may still be in the device 00419  * list if the Persistent property is set to true. 00420  */ 00421 dbus_bool_t group__LibHal.html#gbea3640ca3da909d0b996a3475c76145libhal_remove_device  (LibHalContext *ctx, 
00422                     const char *udi,
00423                     DBusError *error);
00424 
00425 /* Merge properties from one device to another. */ 00426 dbus_bool_t group__LibHal.html#g9f7dfefe5d8fae2e0f20c2382a4694fflibhal_merge_properties  (LibHalContext *ctx,
00427                        const char *target_udi,
00428                        const char *source_udi,
00429                        DBusError *error);
00430 
00431 /* Check a set of properties for two devices matches. */ 00432 dbus_bool_t group__LibHal.html#g38c79be0409c7962fc0a36462429d90dlibhal_device_matches  (LibHalContext *ctx,
00433                      const char *udi1,
00434                      const char *udi2,
00435                      const char *property_namespace,
00436                      DBusError *error);
00437 
00438 /* Find a device in the GDL where a single string property matches a 00439  * given value. 00440  */ 00441 char ** group__LibHal.html#g06a613466c9e59ae7d5ba0406a031a3flibhal_manager_find_device_string_match  (LibHalContext *ctx,
00442                         const char *key,
00443                         const char *value,
00444                         int *num_devices,
00445                         DBusError *error);
00446 
00447 /* Assign a capability to a device. */ 00448 dbus_bool_t group__LibHal.html#gb299138b688751ab1e07ea78568a1a57libhal_device_add_capability  (LibHalContext *ctx,
00449                       const char *udi,
00450                       const char *capability,
00451                       DBusError *error);
00452 
00453 /* Check if a device has a capability. The result is undefined if the 00454  * device doesn't exist. 00455  */ 00456 dbus_bool_t group__LibHal.html#gd817c044708a4749a44d180bf36dc04flibhal_device_query_capability  (LibHalContext *ctx,
00457                         const char *udi,
00458                         const char *capability,
00459                         DBusError *error);
00460 
00461 /* Find devices with a given capability. */ 00462 char ** group__LibHal.html#gcd36d04ce7bb118cb3b93d2b156754a1libhal_find_device_by_capability  (LibHalContext *ctx,
00463                      const char *capability,
00464                      int *num_devices,
00465                      DBusError *error);
00466 
00467 /* Watch all devices, ie. the device_property_changed callback is 00468  * invoked when the properties on any device changes. 00469  */ 00470 dbus_bool_t group__LibHal.html#g088e20ae9bc64da0c56686914cca779alibhal_device_property_watch_all  (LibHalContext *ctx,
00471                           DBusError *error);
00472 
00473 /* Add a watch on a device, so the device_property_changed callback is 00474  * invoked when the properties on the given device changes. 00475  */ 00476 dbus_bool_t group__LibHal.html#g3c2c7e729c04d06235f9bfb2c0121773libhal_device_add_property_watch  (LibHalContext *ctx, 
00477                           const char *udi,
00478                           DBusError *error);
00479 
00480 /* Remove a watch on a device */ 00481 dbus_bool_t group__LibHal.html#gccc89d8c9b9b4c702427c5e3f44ad989libhal_device_remove_property_watch  (LibHalContext *ctx, 
00482                          const char *udi,
00483                          DBusError *error);
00484 
00485 /* Take an advisory lock on the device. */ 00486 dbus_bool_t group__LibHal.html#ge8e59102621c40fb7e3752d82e0f9c69libhal_device_lock  (LibHalContext *ctx,
00487                 const char *udi,
00488                 const char *reason_to_lock,
00489                 char **reason_why_locked,
00490                 DBusError *error);
00491 
00492 /* Release an advisory lock on the device. */ 00493 dbus_bool_t group__LibHal.html#gac5ce16198a137c08bc9c14bdcff3e54libhal_device_unlock  (LibHalContext *ctx,
00494                   const char *udi,
00495                   DBusError *error);
00496 
00497 dbus_bool_t group__LibHal.html#gbdf821add21f86d5a9309f4f09d3aca5libhal_device_rescan  (LibHalContext *ctx,
00498                   const char *udi,
00499                   DBusError *error);
00500 
00501 dbus_bool_t group__LibHal.html#g7a2190fa06020ee3eb0dec6623ec495dlibhal_device_reprobe  (LibHalContext *ctx,
00502                    const char *udi,
00503                    DBusError *error);
00504 
00505 /* Emit a condition from a device */ 00506 dbus_bool_t group__LibHal.html#g502be45f68713bdf62e8447bbfc53872libhal_device_emit_condition  (LibHalContext *ctx,
00507                       const char *udi,
00508                       const char *condition_name,
00509                       const char *condition_details,
00510                       DBusError *error);
00511 
00514 #if defined(__cplusplus) 00515 }
00516 #endif 00517 00518 #endif /* LIBHAL_H */ Generated on Tue May 2 08:40:16 2006 for HAL by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 