liblazy.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *                              liblazy                                    *
00004  *                                                                         *
00005  *           Copyright (C) 2006 Holger Macht <holger@homac.de>             *
00006  *                                                                         *
00007  *              Author(s): Holger Macht <holger@homac.de>                  *
00008  *                                                                         *
00009  * This library is free software; you can redistribute it and/or modify it *
00010  * under the terms of the GNU Lesser General Public License as published   *
00011  * by the Free Software Foundation; either version 2.1 of the License, or  *
00012  * (at your option) any later version.                                     *
00013  *                                                                         *
00014  * This library is distributed in the hope that it will be useful, but     *
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of              *
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
00017  * Lesser General Public License for more details.                         *
00018  *                                                                         *
00019  * You should have received a copy of the GNU Lesser General Public        *
00020  * License along with this library; if not, write to the Free Software     *
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA           *
00022  * 02110-1301  USA                                                         *
00023  *                                                                         *
00024  ***************************************************************************/
00025 
00026 #ifndef LIBLAZY_H
00027 #define LIBLAZY_H
00028 
00029 #define DBUS_API_SUBJECT_TO_CHANGE 1
00030 #include <dbus/dbus.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif /* __cplusplus */
00035 
00039 #define LIBLAZY_ERROR_GENERAL                   -1
00040 #define LIBLAZY_ERROR_INVALID_ARGUMENT          -2
00041 #define LIBLAZY_ERROR_HAL_NOT_READY             -10
00042 #define LIBLAZY_ERROR_HAL_NO_SUCH_PROPERTY      -11
00043 
00044 #define LIBLAZY_ERROR_DBUS_NOT_READY            -20
00045 #define LIBLAZY_ERROR_DBUS_NO_REPLY             -21
00046 #define LIBLAZY_ERROR_DBUS_ERROR_IS_SET         -22
00047 
00052 void liblazy_free_string(char *string);
00053 
00058 void liblazy_free_strlist(char **strlist);
00059 
00076 int liblazy_dbus_system_send_method_call(const char *destination, const char *path,
00077                                          const char *interface, const char *method,
00078                                          DBusMessage **reply,
00079                                          int first_arg_type, ...);
00080 
00098 int liblazy_dbus_session_send_method_call(const char *destination, const char *path,
00099                                           const char *interface, const char *method,
00100                                           DBusMessage **reply,
00101                                           int first_arg_type, ...);
00102 
00116 int liblazy_dbus_system_send_signal(const char *path, const char *interface,
00117                                     const char *name, int first_arg_type, ...);
00118 
00132 int liblazy_dbus_session_send_signal(const char *path, const char *interface,
00133                                      const char *name, int first_arg_type, ...);
00134 
00144 int liblazy_dbus_message_get_basic_arg(DBusMessage *message, int type, void *arg, int no);
00145 
00156 int liblazy_dbus_message_get_strlist_arg(DBusMessage *message, char ***strlist, int no);
00157 
00172 void liblazy_dbus_system_use_private_connection(int use_private);
00173 
00184 int liblazy_hal_get_property_int(const char *udi, const char *property, int *value);
00185 
00196 int liblazy_hal_get_property_bool(const char *udi, const char *property, int *value);
00197 
00208 int liblazy_hal_get_property_string(const char *udi, const char *property, char **value);
00209 
00221 int liblazy_hal_get_property_strlist(const char *udi, const char *property, char ***strlist);
00222 
00231 int liblazy_hal_query_capability(const char *udi, const char *capability);
00232 
00241 int liblazy_hal_find_device_by_capability(const char *capability, char ***strlist);
00242 
00252 int liblazy_hal_find_device_by_string_match(const char *key, const char *value, char ***strlist);
00253 
00263 int liblazy_hal_is_caller_privileged(const char *privilege);
00264 
00265 #ifdef __cplusplus
00266 }
00267 #endif /* __cplusplus */
00268 
00269 #endif                          /* LIBLAZY_H */
00270 // end of liblazy group

Generated on Wed Jul 2 23:36:17 2008 for liblazy by  doxygen 1.5.5