00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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
00268
00269 #endif
00270