  
    
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#gffe3bdde2198927f9132972e7c92a26600056  typedef enum {
00058     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a266a444516ac848fa0f99aa9029cf4432c5LIBHAL_PROPERTY_TYPE_INVALID      =    DBUS_TYPE_INVALID,
00059 
00061     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a2665f4dbdfb838e0120570a088a81be19a4LIBHAL_PROPERTY_TYPE_INT32    =    DBUS_TYPE_INT32,
00062 
00064     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a26696e182097d4929a9d0909e01b99c1ad6LIBHAL_PROPERTY_TYPE_UINT64   =    DBUS_TYPE_UINT64,
00065 
00067     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a266999074429d6bcd98523985bec3371f12LIBHAL_PROPERTY_TYPE_DOUBLE   =    DBUS_TYPE_DOUBLE,
00068 
00070     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a266fdf620252c0f760c6c5c47b0284bff81LIBHAL_PROPERTY_TYPE_BOOLEAN  =    DBUS_TYPE_BOOLEAN,
00071 
00073     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a26607301d12905460ed6467202ea3582928LIBHAL_PROPERTY_TYPE_STRING   =    DBUS_TYPE_STRING,
00074 
00076     group__LibHal.html#ggffe3bdde2198927f9132972e7c92a266448e6ce11cecf8b2293653f496370d20LIBHAL_PROPERTY_TYPE_STRLIST  =     ((int) (DBUS_TYPE_STRING<<8)+('l'))
00077 } group__LibHal.html#gffe3bdde2198927f9132972e7c92a266LibHalPropertyType ;
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#ge24739f585367e46ce7ff81facbccfa600089  typedef void (* group__LibHal.html#ge24739f585367e46ce7ff81facbccfa6LibHalIntegrateDBusIntoMainLoop ) (LibHalContext *ctx,
00090                          DBusConnection *dbus_connection);
00091 
group__LibHal.html#g0f190c3798f993df8f61561b168778f200097  typedef void (* group__LibHal.html#g0f190c3798f993df8f61561b168778f2LibHalDeviceAdded ) (LibHalContext *ctx, 
00098                    const char *udi);
00099 
group__LibHal.html#gd4f2461c74b744905c4262c1ffcb18a000105  typedef void (* group__LibHal.html#gd4f2461c74b744905c4262c1ffcb18a0LibHalDeviceRemoved ) (LibHalContext *ctx, 
00106                      const char *udi);
00107 
group__LibHal.html#ge3a0a0f362a5f44241a1c6294c101ac000114  typedef void (* group__LibHal.html#ge3a0a0f362a5f44241a1c6294c101ac0LibHalDeviceNewCapability ) (LibHalContext *ctx, 
00115                        const char *udi,
00116                        const char *capability);
00117 
group__LibHal.html#gb018406efaf3901f58c434b88301e17700124  typedef void (* group__LibHal.html#gb018406efaf3901f58c434b88301e177LibHalDeviceLostCapability ) (LibHalContext *ctx, 
00125                         const char *udi,
00126                         const char *capability);
00127 
group__LibHal.html#g3afa0ce3c3ef654d48c8e52149e283fc00136  typedef void (* group__LibHal.html#g3afa0ce3c3ef654d48c8e52149e283fcLibHalDevicePropertyModified ) (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#g0db65ef03a18c0c7202a98b0c927dbce00151  typedef void (* group__LibHal.html#g0db65ef03a18c0c7202a98b0c927dbceLibHalDeviceCondition ) (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#g74fbf2a1372b9890ff9ecdbaf528494alibhal_ctx_new                           (void);
00159 
00160 /* Enable or disable caching */ 00161 dbus_bool_t    group__LibHal.html#gb4e9c39ceeea7f0ee3d1d6d602146032libhal_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#g40a6569856927e29b66851d479746bddlibhal_ctx_set_dbus_connection           (LibHalContext *ctx, DBusConnection *conn);
00165 
00166 /* Set user data for the context */ 00167 dbus_bool_t    group__LibHal.html#ge42583d062da35e543ab569dbf16316alibhal_ctx_set_user_data                 (LibHalContext *ctx, void * structLibHalContext__s.html#834f8eed4d44180c475b4e35a71cca0cuser_data );
00168 
00169 /* Get user data for the context */ 00170 void*          group__LibHal.html#g6c6189ab9d139e26564e3a705568052clibhal_ctx_get_user_data                 (LibHalContext *ctx);
00171 
00172 /* Set the callback for when a device is added */ 00173 dbus_bool_t    group__LibHal.html#gbe6acddece4b992e55f5d75732f071falibhal_ctx_set_device_added              (LibHalContext *ctx, group__LibHal.html#g0f190c3798f993df8f61561b168778f2LibHalDeviceAdded  callback);
00174 
00175 /* Set the callback for when a device is removed */ 00176 dbus_bool_t    group__LibHal.html#gfb9b58d5987281721ac78cb6e9398c5elibhal_ctx_set_device_removed            (LibHalContext *ctx, group__LibHal.html#gd4f2461c74b744905c4262c1ffcb18a0LibHalDeviceRemoved  callback);
00177 
00178 /* Set the callback for when a device gains a new capability */ 00179 dbus_bool_t    group__LibHal.html#g94ffc59da65719271803d36511bdde29libhal_ctx_set_device_new_capability     (LibHalContext *ctx, group__LibHal.html#ge3a0a0f362a5f44241a1c6294c101ac0LibHalDeviceNewCapability  callback);
00180 
00181 /* Set the callback for when a device loses a capability */ 00182 dbus_bool_t    group__LibHal.html#g96f6737e548735aa2dde97671d08f4c2libhal_ctx_set_device_lost_capability    (LibHalContext *ctx, group__LibHal.html#gb018406efaf3901f58c434b88301e177LibHalDeviceLostCapability  callback);
00183 
00184 /* Set the callback for when a property is modified on a device */ 00185 dbus_bool_t    group__LibHal.html#g9d03f12a7ee7678fccbe5f170dd01115libhal_ctx_set_device_property_modified  (LibHalContext *ctx, group__LibHal.html#g3afa0ce3c3ef654d48c8e52149e283fcLibHalDevicePropertyModified  callback);
00186 
00187 /* Set the callback for when a device emits a condition */ 00188 dbus_bool_t    group__LibHal.html#g27de7e998835ae928d4bfe96c33f1103libhal_ctx_set_device_condition          (LibHalContext *ctx, group__LibHal.html#g0db65ef03a18c0c7202a98b0c927dbceLibHalDeviceCondition  callback);
00189 
00190 /* Initialize the connection to hald */ 00191 dbus_bool_t    group__LibHal.html#ge4ec4b63bf8b85ea8b30f9d7d0872bf9libhal_ctx_init                          (LibHalContext *ctx, DBusError *error);
00192 
00193 /* Shut down a connection to hald */ 00194 dbus_bool_t    group__LibHal.html#g2867f508030a1f39a97b2db3a3d3286flibhal_ctx_shutdown                      (LibHalContext *ctx, DBusError *error);
00195 
00196 /* Free a LibHalContext resource */ 00197 dbus_bool_t    group__LibHal.html#ge39b94fae6440045b7098896ab257683libhal_ctx_free                          (LibHalContext *ctx);
00198 
00199 /* Create an already initialized connection to hald */ 00200 LibHalContext * group__LibHal.html#gb4eca258c42f56a0181f6f624cc476dclibhal_ctx_init_direct                   (DBusError *error);
00201 
00202 /* Get all devices in the Global Device List (GDL). */ 00203 char        ** group__LibHal.html#g3891d993bc1867eafb5396b7b8359564libhal_get_all_devices  (LibHalContext *ctx, int *num_devices, DBusError *error);
00204 
00205 /* Determine if a device exists. */ 00206 dbus_bool_t   group__LibHal.html#g3e2e4dd1ab246cf180866f62d08f77e5libhal_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#g8aff0fd7a39a89f0d9d62aec4845b1f7libhal_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#g95c599c1feeeb2a9e0461c350ee03423libhal_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#g3af646ad713c0b39427c9fa69c4e4111libhal_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#g982cc6210be2d304c7f312ca75b7dffclibhal_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#g2c8ec6e1ee71bd35cdd18372525d2a70libhal_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#g95b29f096f116def183d40e64db4dcc0libhal_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#g3e7ae49bfdb5bd0cbe5b25e9e502834elibhal_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#g12128f49ee2cab97b3a1cdb520a392a5libhal_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#gaa3d887589341f83f3a193b2cb1825d4libhal_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#g8003e1c97845b352e60619d96c947101libhal_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#gc8c7e8c1a36ba49f333974feac5632d8libhal_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#ge8c5549415ed5673c869bc198aa823aalibhal_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#gc9bd2699207ae1d020ce619fc70d9c3clibhal_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#g3306f24835d53776d091b3814a184ca4libhal_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#g5bacb11a9042ee3de39f848fd4d74345libhal_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#g56b3eb2844c34cd954e21a8473ac7a08libhal_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#gf3e783b23f6706b9fa96506a2d190602libhal_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#g0c0fcb15dd91b9f7e8ab7d0aa7c41db1libhal_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#gffe3bdde2198927f9132972e7c92a266LibHalPropertyType  group__LibHal.html#gf61141b715e2e776e0e158964453ecablibhal_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#g0dcf4239200a1b2c793154a5b4369246libhal_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#gaee5d86cb53f0859b52eff353f6c97f0libhal_free_property_set  (LibHalPropertySet *set);
00344 
00345 /* Get the number of properties in a property set. */ 00346 unsigned int group__LibHal.html#g1549431474f21aaf385432dfd85dd5dalibhal_property_set_get_num_elems  (LibHalPropertySet *set);
00347 
structLibHalPropertySetIterator__s.html00349  struct structLibHalPropertySetIterator__s.htmlLibHalPropertySetIterator_s  {
structLibHalPropertySetIterator__s.html#28a2cc62d1dcf8d5dd10f6811aac880b00350      LibHalPropertySet * structLibHalPropertySetIterator__s.html#28a2cc62d1dcf8d5dd10f6811aac880bset ;    
structLibHalPropertySetIterator__s.html#c17f776989a9cbad7061c466ef6e440000351      unsigned int structLibHalPropertySetIterator__s.html#c17f776989a9cbad7061c466ef6e4400index ;        
structLibHalPropertySetIterator__s.html#2e7f14fd6fbfc4dea883cce9e4237dad00352      LibHalProperty * structLibHalPropertySetIterator__s.html#2e7f14fd6fbfc4dea883cce9e4237dadcur_prop ;  
structLibHalPropertySetIterator__s.html#3d7c5b0fb339be15f08209ef9fc9298700353      void * structLibHalPropertySetIterator__s.html#3d7c5b0fb339be15f08209ef9fc92987reservered0 ;         
structLibHalPropertySetIterator__s.html#73f71a6bc2a035a89bb37329bf1c4b0000354      void * structLibHalPropertySetIterator__s.html#73f71a6bc2a035a89bb37329bf1c4b00reservered1 ;         
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#g936effe33ff2f8404db04ab053fba036libhal_psi_init  (LibHalPropertySetIterator *iter, LibHalPropertySet * structLibHalPropertySetIterator__s.html#28a2cc62d1dcf8d5dd10f6811aac880bset );
00363 
00364 /* Determine whether there are more properties to iterate over */ 00365 dbus_bool_t group__LibHal.html#g17f9854107667d84afb595fba3990d3flibhal_psi_has_more  (LibHalPropertySetIterator *iter);
00366 
00367 /* Advance iterator to next property. */ 00368 void group__LibHal.html#g36d85ab254da79e982e9819d7536533alibhal_psi_next  (LibHalPropertySetIterator *iter);
00369 
00370 /* Get type of property. */ 00371 group__LibHal.html#gffe3bdde2198927f9132972e7c92a266LibHalPropertyType  group__LibHal.html#gc4472ad8b5010d94e64e774719e7081flibhal_psi_get_type  (LibHalPropertySetIterator *iter);
00372 
00373 /* Get the key of a property. */ 00374 char * group__LibHal.html#gff76d172919c3aab042da6c3d6d2a96flibhal_psi_get_key  (LibHalPropertySetIterator *iter);
00375 
00376 /* Get the value of a property of type string. */ 00377 char * group__LibHal.html#g8d043166c33c0e7cfe13f66d8cf1bbfalibhal_psi_get_string  (LibHalPropertySetIterator *iter);
00378 
00379 /* Get the value of a property of type signed integer. */ 00380 dbus_int32_t group__LibHal.html#gf49f9d10005b3022718526acc96cc43blibhal_psi_get_int  (LibHalPropertySetIterator *iter);
00381 
00382 /* Get the value of a property of type unsigned integer. */ 00383 dbus_uint64_t group__LibHal.html#ga3cee12fc56d3450686a7944a3dd8256libhal_psi_get_uint64  (LibHalPropertySetIterator *iter);
00384 
00385 /* Get the value of a property of type double. */ 00386 double group__LibHal.html#g21a15df68add3833bfade3822045121flibhal_psi_get_double  (LibHalPropertySetIterator *iter);
00387 
00388 /* Get the value of a property of type bool. */ 00389 dbus_bool_t group__LibHal.html#g7a7f265a0980ddb25752f3ff8f68921blibhal_psi_get_bool  (LibHalPropertySetIterator *iter);
00390 
00391 /* Get the value of a property of type string list. */ 00392 char ** group__LibHal.html#g832b523bf518c0afcf0963f7b3f8eabflibhal_psi_get_strlist  (LibHalPropertySetIterator *iter);
00393 
00394 /* Get the length of an array of strings */ 00395 unsigned int group__LibHal.html#g6b507afdad5c995893159b86b8bb2192libhal_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#g0e3c7de1fd4eab0e253a5180b6e13984libhal_free_string_array  (char **str_array);
00399 
00400 /* Frees a nul-terminated string */ 00401 void group__LibHal.html#gdf72661720d6c735ea99cc661f834430libhal_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#gf947bfe5d680b388a9511b1c2ba31de6libhal_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#g6eeec8b282ca555ef35cef6b64afb71dlibhal_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#g870b71f69fd3cbd47d2b2c321b21cac3libhal_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#g6138964d98cd3fde2f4e842ea2d0324clibhal_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#gbbf08996cfdd718e2b22ec4d4ea67badlibhal_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#gf29f3fcbd7aaf824ea8bbe18089c6804libhal_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#gd9550eb414bdf5e5d36997fd828c39dclibhal_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#ga18fa4dabf12be4bd9def75077758f8flibhal_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#gdd7f2d9d8a95ed05d9961d19f7a91e04libhal_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#g5fca32d26c9196ad64bce1dd50989fdalibhal_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#g99b09201b063842b4e7224b511aaf8a8libhal_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#gf6c21c9d2a15e928edd4f85ccc07a15dlibhal_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#g56bb8f4dc1e44a9d6c41e260c219c064libhal_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#g41985540aa20b64c0d77e2292538c1e7libhal_device_unlock  (LibHalContext *ctx,
00494                   const char *udi,
00495                   DBusError *error);
00496 
00497 dbus_bool_t group__LibHal.html#g64f1303745a38d7f5346a7ad2fbe6bbdlibhal_device_rescan  (LibHalContext *ctx,
00498                   const char *udi,
00499                   DBusError *error);
00500 
00501 dbus_bool_t group__LibHal.html#g1a9bea8fa56432a410832852dbb81127libhal_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#g30a29e5e11b30100b4c4f6299ea99b5blibhal_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:52:17 2006 for HAL by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 