E_Bluez_Element **elements;
char *type;
unsigned int count;
- bool ret;
+ Eina_Bool ret;
if (!args)
type = NULL;
_on_cmd_adapter_get_powered(char *cmd, char *args)
{
char *next_args;
- bool powered;
+ Eina_Bool powered;
E_Bluez_Element *element = _element_from_args(args, &next_args);
if (!element)
_on_cmd_adapter_set_powered(char *cmd, char *args)
{
char *next_args;
- bool powered;
+ Eina_Bool powered;
E_Bluez_Element *element = _element_from_args(args, &next_args);
if (!element)
_on_cmd_adapter_get_discoverable(char *cmd, char *args)
{
char *next_args;
- bool discoverable;
+ Eina_Bool discoverable;
E_Bluez_Element *element = _element_from_args(args, &next_args);
if (!element)
_on_cmd_adapter_set_discoverable(char *cmd, char *args)
{
char *next_args;
- bool discoverable;
+ Eina_Bool discoverable;
E_Bluez_Element *element = _element_from_args(args, &next_args);
if (!element)
_on_cmd_adapter_get_discovering(char *cmd, char *args)
{
char *next_args;
- bool discovering;
+ Eina_Bool discovering;
E_Bluez_Element *element = _element_from_args(args, &next_args);
if (!element)
#define E_BLUEZ_H
#include <stdint.h>
-#include <stdbool.h>
#include <stdio.h>
#include <Eina.h>
/* Manager Methods */
EAPI E_Bluez_Element *e_bluez_manager_get(void) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_manager_default_adapter(E_DBus_Method_Return_Cb cb, void *data) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_manager_default_adapter(E_DBus_Method_Return_Cb cb, void *data) EINA_WARN_UNUSED_RESULT;
/* Adapter Methods */
- EAPI bool e_bluez_adapter_agent_register(E_Bluez_Element *element, const char *object_path, const char *capability, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_agent_unregister(E_Bluez_Element *element, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_address_get(E_Bluez_Element *element, const char **address) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_name_get(E_Bluez_Element *element, const char **name) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_name_set(E_Bluez_Element *element, const char *name, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1,2) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_powered_get(E_Bluez_Element *element, bool *powered) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_powered_set(E_Bluez_Element *profile, bool powered, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_discoverable_get(E_Bluez_Element *element, bool *discoverable) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_discoverable_set(E_Bluez_Element *profile, bool discoverable, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_discoverable_timeout_get(const E_Bluez_Element *element, unsigned int *timeout) EINA_ARG_NONNULL(1,2) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_discoverable_timeout_set(E_Bluez_Element *element, unsigned int timeout, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_discovering_get(E_Bluez_Element *element, bool *discovering) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_start_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_stop_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_adapter_create_paired_device(E_Bluez_Element *element, const char *object_path, const char *capability, const char *device, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1,2,4) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_agent_register(E_Bluez_Element *element, const char *object_path, const char *capability, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_agent_unregister(E_Bluez_Element *element, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_address_get(E_Bluez_Element *element, const char **address) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_name_get(E_Bluez_Element *element, const char **name) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_name_set(E_Bluez_Element *element, const char *name, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1,2) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_powered_get(E_Bluez_Element *element, Eina_Bool *powered) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_powered_set(E_Bluez_Element *profile, Eina_Bool powered, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_discoverable_get(E_Bluez_Element *element, Eina_Bool *discoverable) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_discoverable_set(E_Bluez_Element *profile, Eina_Bool discoverable, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_discoverable_timeout_get(const E_Bluez_Element *element, unsigned int *timeout) EINA_ARG_NONNULL(1,2) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_discoverable_timeout_set(E_Bluez_Element *element, unsigned int timeout, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_discovering_get(E_Bluez_Element *element, Eina_Bool *discovering) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_start_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_stop_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_adapter_create_paired_device(E_Bluez_Element *element, const char *object_path, const char *capability, const char *device, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1,2,4) EINA_WARN_UNUSED_RESULT;
/* Device Found Methods */
EAPI void e_bluez_devicefound_free(E_Bluez_Device_Found *device) EINA_ARG_NONNULL(1);
EAPI const char *e_bluez_devicefound_alias_get(E_Bluez_Device_Found *device) EINA_ARG_NONNULL(1);
/* Devices Methods */
- EAPI bool e_bluez_device_name_get(E_Bluez_Element *element, const char **name) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_device_name_get(E_Bluez_Element *element, const char **name) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
/* Low-Level API:
*
* Should just be used to work around problems until proper solution
* is made into e_bluez.
*/
- EAPI bool e_bluez_manager_sync_elements(void);
+ EAPI Eina_Bool e_bluez_manager_sync_elements(void);
- EAPI bool e_bluez_elements_get_all(unsigned int *count, E_Bluez_Element ***p_elements) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_elements_get_all_type(const char *type, unsigned int *count, E_Bluez_Element ***p_elements) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_elements_get_all(unsigned int *count, E_Bluez_Element ***p_elements) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_elements_get_all_type(const char *type, unsigned int *count, E_Bluez_Element ***p_elements) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
EAPI E_Bluez_Element *e_bluez_element_get(const char *path);
EAPI void e_bluez_element_listener_add(E_Bluez_Element *element, void (*cb)(void *data, const E_Bluez_Element *element), const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1, 2);
EAPI void e_bluez_element_print(FILE *fp, const E_Bluez_Element *element) EINA_ARG_NONNULL(1, 2);
EAPI void e_bluez_element_array_print(FILE *fp, E_Bluez_Array *array);
- EAPI bool e_bluez_element_properties_sync(E_Bluez_Element *element) EINA_ARG_NONNULL(1);
- EAPI bool e_bluez_element_properties_sync_full(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool e_bluez_element_properties_sync(E_Bluez_Element *element) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool e_bluez_element_properties_sync_full(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1);
- EAPI bool e_bluez_element_property_set(E_Bluez_Element *element, const char *prop, int type, const void *value) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_element_property_set_full(E_Bluez_Element *element, const char *prop, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_element_property_dict_set_full(E_Bluez_Element *element, const char *prop, const char *key, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_set(E_Bluez_Element *element, const char *prop, int type, const void *value) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_set_full(E_Bluez_Element *element, const char *prop, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_dict_set_full(E_Bluez_Element *element, const char *prop, const char *key, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
- EAPI void e_bluez_element_properties_list(const E_Bluez_Element *element, bool (*cb)(void *data, const E_Bluez_Element *element, const char *name, int type, const void *value), const void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void e_bluez_element_properties_list(const E_Bluez_Element *element, Eina_Bool (*cb)(void *data, const E_Bluez_Element *element, const char *name, int type, const void *value), const void *data) EINA_ARG_NONNULL(1, 2);
- EAPI bool e_bluez_element_property_type_get_stringshared(const E_Bluez_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_element_property_type_get(const E_Bluez_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_element_property_dict_get_stringshared(const E_Bluez_Element *element, const char *dict_name, const char *key_name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_element_property_get_stringshared(const E_Bluez_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
- EAPI bool e_bluez_element_property_get(const E_Bluez_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_type_get_stringshared(const E_Bluez_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_type_get(const E_Bluez_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_dict_get_stringshared(const E_Bluez_Element *element, const char *dict_name, const char *key_name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_get_stringshared(const E_Bluez_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
+ EAPI Eina_Bool e_bluez_element_property_get(const E_Bluez_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
#ifdef __cplusplus
}
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_manager_sync_elements(void)
{
E_Bluez_Element *manager;
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_agent_register(E_Bluez_Element *element, const char *object_path, const char *capability, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "RegisterAgent";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_agent_unregister(E_Bluez_Element *element, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "UnregisterAgent";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_address_get(E_Bluez_Element *element, const char **address)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_name_get(E_Bluez_Element *element, const char **name)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
* @return 1 on success, 0 otherwise.
* @see e_bluez_adapter_name_get()
*/
-bool
+Eina_Bool
e_bluez_adapter_name_set(E_Bluez_Element *element, const char *name, E_DBus_Method_Return_Cb cb, const void *data)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
* values shall be considered invalid.
*
* @param powered where to store the property value, must be a pointer
- * to booleans (bool *).
+ * to booleans (Eina_Bool *).
*
* @return 1 on success, 0 otherwise.
* @see e_bluez_adapter_powered_set()
*/
-bool
-e_bluez_adapter_powered_get(E_Bluez_Element *element, bool *powered)
+Eina_Bool
+e_bluez_adapter_powered_get(E_Bluez_Element *element, Eina_Bool *powered)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(powered, 0);
*
* @return 1 on success, 0 otherwise.
*/
-bool
-e_bluez_adapter_powered_set(E_Bluez_Element *element, bool powered, E_DBus_Method_Return_Cb cb, const void *data)
+Eina_Bool
+e_bluez_adapter_powered_set(E_Bluez_Element *element, Eina_Bool powered, E_DBus_Method_Return_Cb cb, const void *data)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
return e_bluez_element_property_set_full
* values shall be considered invalid.
*
* @param discoverable where to store the property value, must be a pointer
- * to booleans (bool *).
+ * to booleans (Eina_Bool *).
*
* @return 1 on success, 0 otherwise.
* @see e_bluez_adapter_discoverable_set()
*/
-bool
-e_bluez_adapter_discoverable_get(E_Bluez_Element *element, bool *discoverable)
+Eina_Bool
+e_bluez_adapter_discoverable_get(E_Bluez_Element *element, Eina_Bool *discoverable)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(discoverable, 0);
*
* @return 1 on success, 0 otherwise.
*/
-bool
-e_bluez_adapter_discoverable_set(E_Bluez_Element *element, bool discoverable, E_DBus_Method_Return_Cb cb, const void *data)
+Eina_Bool
+e_bluez_adapter_discoverable_set(E_Bluez_Element *element, Eina_Bool discoverable, E_DBus_Method_Return_Cb cb, const void *data)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
return e_bluez_element_property_set_full
* @return 1 on success, 0 otherwise.
* @see e_bluez_adapter_discoverable_timeout_set()
*/
-bool
+Eina_Bool
e_bluez_adapter_discoverable_timeout_get(const E_Bluez_Element *element, unsigned int *timeout)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
* @return 1 on success, 0 otherwise.
* @see e_bluez_adapter_discoverable_timeout_get()
*/
-bool
+Eina_Bool
e_bluez_adapter_discoverable_timeout_set(E_Bluez_Element *element, unsigned int timeout, E_DBus_Method_Return_Cb cb, const void *data)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
* values shall be considered invalid.
*
* @param discovering where to store the property value, must be a pointer
- * to booleans (bool *).
+ * to booleans (Eina_Bool *).
*
* @return 1 on success, 0 otherwise.
* @see e_bluez_adapter_discovering_set()
*/
-bool
-e_bluez_adapter_discovering_get(E_Bluez_Element *element, bool *discovering)
+Eina_Bool
+e_bluez_adapter_discovering_get(E_Bluez_Element *element, Eina_Bool *discovering)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(discovering, 0);
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_start_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "StartDiscovery";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_stop_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "StopDiscovery";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_adapter_create_paired_device(E_Bluez_Element *element, const char *object_path, const char *capability, const char *device, E_DBus_Method_Return_Cb cb, const void *data)
{
DBusMessageIter itr;
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_device_name_get(E_Bluez_Element *element, const char **name)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(name, 0);
const char *name;
int type;
union {
- bool boolean;
+ Eina_Bool boolean;
const char *str;
unsigned short u16;
unsigned int u32;
switch (t)
{
case DBUS_TYPE_BOOLEAN:
- entry->value.boolean = (bool)(long)value;
+ entry->value.boolean = (Eina_Bool)(long)value;
break;
case DBUS_TYPE_BYTE:
entry->value.byte = (unsigned char)(long)value;
for(; i_new < eina_array_count_get(new->array); iter_new++, i_new++)
{
- bool found = 0;
+ Eina_Bool found = 0;
item_new = *iter_new;
if (!item_new)
break;
}
}
-static bool
+static Eina_Bool
_e_bluez_element_property_update(E_Bluez_Element_Property *property, int type, void *data)
{
int changed = 0;
switch (type)
{
case DBUS_TYPE_BOOLEAN:
- if (changed || property->value.boolean != (bool)(long)data)
+ if (changed || property->value.boolean != (Eina_Bool)(long)data)
{
- property->value.boolean = (bool)(long)data;
+ property->value.boolean = (Eina_Bool)(long)data;
changed = 1;
}
break;
return ret;
}
-bool
+Eina_Bool
e_bluez_element_objects_array_get_stringshared(const E_Bluez_Element *element, const char *property, unsigned int *count, E_Bluez_Element ***elements)
{
E_Bluez_Element **ret, **p;
}
/* strings are just pointers (references), no strdup or stringshare_add/ref */
-bool
+Eina_Bool
e_bluez_element_strings_array_get_stringshared(const E_Bluez_Element *element, const char *property, unsigned int *count, const char ***strings)
{
const char **ret, **p;
*
* @return 1 on success, 0 on failure.
*/
-bool
+Eina_Bool
e_bluez_element_message_send(E_Bluez_Element *element, const char *method_name, E_DBus_Method_Return_Cb cb, DBusMessage *msg, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data)
{
E_Bluez_Element_Call_Data *data;
return 0;
}
-bool
+Eina_Bool
e_bluez_element_call_full(E_Bluez_Element *element, const char *method_name, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data)
{
DBusMessage *msg;
(element, method_name, cb, msg, pending, user_cb, user_data);
}
-static bool
+static Eina_Bool
_e_bluez_element_property_value_add(E_Bluez_Element *element, const char *name, int type, void *value)
{
E_Bluez_Element_Property *p;
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_properties_sync_full(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "GetProperties";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_properties_sync(E_Bluez_Element *element)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_dict_set_full(E_Bluez_Element *element, const char *prop, const char *key, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "SetProperty";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_set_full(E_Bluez_Element *element, const char *prop, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data)
{
const char name[] = "SetProperty";
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_set(E_Bluez_Element *element, const char *prop, int type, const void *value)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
(element, prop, type, value, NULL, NULL);
}
-bool
+Eina_Bool
e_bluez_element_call_with_path(E_Bluez_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data)
{
DBusMessageIter itr;
(element, method_name, cb, msg, pending, user_cb, user_data);
}
-bool
+Eina_Bool
e_bluez_element_call_with_string(E_Bluez_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data)
{
DBusMessageIter itr;
(element, method_name, cb, msg, pending, user_cb, user_data);
}
-bool
+Eina_Bool
e_bluez_element_call_with_path_and_string(E_Bluez_Element *element, const char *method_name, const char *path, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data)
{
DBusMessageIter itr;
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_type_get_stringshared(const E_Bluez_Element *element, const char *name, int *type)
{
const E_Bluez_Element_Property *p;
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_type_get(const E_Bluez_Element *element, const char *name, int *type)
{
- bool ret;
+ Eina_Bool ret;
name = eina_stringshare_add(name);
ret = e_bluez_element_property_type_get_stringshared(element, name, type);
eina_stringshare_del(name);
}
void
-e_bluez_element_list_properties(const E_Bluez_Element *element, bool (*cb)(void *data, const E_Bluez_Element *element, const char *name, int type, const void *value), const void *data)
+e_bluez_element_list_properties(const E_Bluez_Element *element, Eina_Bool (*cb)(void *data, const E_Bluez_Element *element, const char *name, int type, const void *value), const void *data)
{
const E_Bluez_Element_Property *p;
value = &p->value.path;
break;
case DBUS_TYPE_BOOLEAN:
- value = (void *)p->value.boolean;
+ value = (void *)(unsigned long)p->value.boolean;
break;
case DBUS_TYPE_UINT16:
value = &p->value.u16;
* @param key key inside dict, must be previously stringshared
* @param type if provided it will contain the value type.
* @param value where to store the property value, must be a pointer to the
- * exact type, (bool *) for booleans, (char **) for strings, and so on.
+ * exact type, (Eina_Bool *) for booleans, (char **) for strings, and so on.
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_dict_get_stringshared(const E_Bluez_Element *element, const char *dict_name, const char *key, int *type, void *value)
{
const E_Bluez_Element_Property *p;
switch (entry->type)
{
case DBUS_TYPE_BOOLEAN:
- *(bool *)value = entry->value.boolean;
+ *(Eina_Bool *)value = entry->value.boolean;
return 1;
case DBUS_TYPE_BYTE:
*(unsigned char *)value = entry->value.byte;
* @param name property name, must be previously stringshared
* @param type if provided it will contain the value type.
* @param value where to store the property value, must be a pointer to the
- * exact type, (bool *) for booleans, (char **) for strings, and so on.
+ * exact type, (Eina_Bool *) for booleans, (char **) for strings, and so on.
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_get_stringshared(const E_Bluez_Element *element, const char *name, int *type, void *value)
{
const E_Bluez_Element_Property *p;
switch (p->type)
{
case DBUS_TYPE_BOOLEAN:
- *(bool *)value = p->value.boolean;
+ *(Eina_Bool *)value = p->value.boolean;
return 1;
case DBUS_TYPE_BYTE:
*(unsigned char *)value = p->value.byte;
* @param name property name
* @param type if provided it will contain the value type.
* @param value where to store the property value, must be a pointer to the
- * exact type, (bool *) for booleans, (char **) for strings, and so on.
+ * exact type, (Eina_Bool *) for booleans, (char **) for strings, and so on.
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_element_property_get(const E_Bluez_Element *element, const char *name, int *type, void *value)
{
- bool ret;
+ Eina_Bool ret;
name = eina_stringshare_add(name);
ret = e_bluez_element_property_get_stringshared
(element, name, type, value);
&data);
}
-static bool
+static Eina_Bool
_e_bluez_elements_get_allocate(unsigned int *count, E_Bluez_Element ***p_elements)
{
*count = eina_hash_population(elements);
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_elements_get_all(unsigned int *count, E_Bluez_Element ***p_elements)
{
E_Bluez_Element **p;
*
* @see e_bluez_elements_get_all()
*/
-bool
+Eina_Bool
e_bluez_elements_get_all_type(const char *type, unsigned int *count, E_Bluez_Element ***p_elements)
{
struct e_bluez_elements_get_all_str_data data;
*
* @return 1 on success, 0 otherwise.
*/
-bool
+Eina_Bool
e_bluez_manager_default_adapter(E_DBus_Method_Return_Cb cb, void *data)
{
E_Bluez_Element *element = e_bluez_element_get(manager_path);
const char *name;
int type;
union {
- bool boolean;
+ Eina_Bool boolean;
const char *str;
short i16;
unsigned short u16;
#define WRN(...) EINA_LOG_DOM_WARN(_e_dbus_bluez_log_dom , __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_e_dbus_bluez_log_dom , __VA_ARGS__)
-static inline bool
+static inline Eina_Bool
__dbus_callback_check_and_init(const char *file, int line, const char *function, DBusMessage *msg, DBusMessageIter *itr, DBusError *err)
{
if (!msg)
__dbus_callback_check_and_init(__FILE__, __LINE__, __FUNCTION__, \
msg, itr, err)
-static inline bool
+static inline Eina_Bool
__dbus_iter_type_check(const char *file, int line, const char *function, int type, int expected, const char *expected_name)
{
if (type == expected)
E_Bluez_Element *e_bluez_element_register(const char *path, const char *interface);
void e_bluez_element_unregister(E_Bluez_Element *element);
-bool e_bluez_element_message_send(E_Bluez_Element *element, const char *method_name, E_DBus_Method_Return_Cb cb, DBusMessage *msg, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
+Eina_Bool e_bluez_element_message_send(E_Bluez_Element *element, const char *method_name, E_DBus_Method_Return_Cb cb, DBusMessage *msg, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
E_Bluez_Array *e_bluez_element_iter_get_array(DBusMessageIter *itr, const char *key);
void e_bluez_element_event_add(int event_type, E_Bluez_Element *element);
E_Bluez_Element_Dict_Entry * e_bluez_element_array_dict_find_stringshared(const E_Bluez_Array *array, const char *key);
void e_bluez_element_array_free(E_Bluez_Array *array, E_Bluez_Array *new __UNUSED__);
-bool e_bluez_element_call_full(E_Bluez_Element *element, const char *method_name, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
-bool e_bluez_element_call_with_path(E_Bluez_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
-bool e_bluez_element_call_with_string(E_Bluez_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
-bool e_bluez_element_call_with_path_and_string(E_Bluez_Element *element, const char *method_name, const char *path, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
+Eina_Bool e_bluez_element_call_full(E_Bluez_Element *element, const char *method_name, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
+Eina_Bool e_bluez_element_call_with_path(E_Bluez_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
+Eina_Bool e_bluez_element_call_with_string(E_Bluez_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);
+Eina_Bool e_bluez_element_call_with_path_and_string(E_Bluez_Element *element, const char *method_name, const char *path, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data);