[PATCH 5/5] e_dbus/bluez: move to Eina_Bool
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 10 Mar 2010 20:36:17 +0000 (20:36 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 10 Mar 2010 20:36:17 +0000 (20:36 +0000)
By: Gustavo F. Padovan <padovan@profusion.mobi>

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@47117 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/e_dbus_bluez_test.c
src/lib/bluez/E_Bluez.h
src/lib/bluez/e_bluez.c
src/lib/bluez/e_bluez_adapter.c
src/lib/bluez/e_bluez_device.c
src/lib/bluez/e_bluez_element.c
src/lib/bluez/e_bluez_manager.c
src/lib/bluez/e_bluez_private.h

index b0f218b..8006b8e 100644 (file)
@@ -167,7 +167,7 @@ _on_cmd_get_all(char *cmd, char *args)
    E_Bluez_Element **elements;
    char *type;
    unsigned int count;
-   bool ret;
+   Eina_Bool ret;
 
    if (!args)
      type = NULL;
@@ -455,7 +455,7 @@ static int
 _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)
@@ -472,7 +472,7 @@ static int
 _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)
@@ -498,7 +498,7 @@ static int
 _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)
@@ -515,7 +515,7 @@ static int
 _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)
@@ -589,7 +589,7 @@ static int
 _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)
index 91357a5..d0f3505 100644 (file)
@@ -2,7 +2,6 @@
 #define E_BLUEZ_H
 
 #include <stdint.h>
-#include <stdbool.h>
 #include <stdio.h>
 
 #include <Eina.h>
@@ -90,41 +89,41 @@ extern "C" {
 
   /* 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);
@@ -136,20 +135,20 @@ extern "C" {
   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
 }
index 76ab0e1..3ba7f8c 100644 (file)
@@ -70,7 +70,7 @@ e_bluez_system_bus_name_get(void)
  *
  * @return 1 on success, 0 otherwise.
  */
-bool
+Eina_Bool
 e_bluez_manager_sync_elements(void)
 {
    E_Bluez_Element *manager;
index 24d97d6..c312ac7 100644 (file)
@@ -63,7 +63,7 @@ _device_found_callback(void *data, DBusMessage *msg)
  *
  * @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";
@@ -88,7 +88,7 @@ e_bluez_adapter_agent_register(E_Bluez_Element *element, const char *object_path
  *
  * @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";
@@ -114,7 +114,7 @@ e_bluez_adapter_agent_unregister(E_Bluez_Element *element, const char *object_pa
  *
  * @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);
@@ -138,7 +138,7 @@ e_bluez_adapter_address_get(E_Bluez_Element *element, const char **address)
  *
  * @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);
@@ -162,7 +162,7 @@ e_bluez_adapter_name_get(E_Bluez_Element *element, const char **name)
  * @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);
@@ -178,13 +178,13 @@ e_bluez_adapter_name_set(E_Bluez_Element *element, const char *name, E_DBus_Meth
  * 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);
@@ -203,8 +203,8 @@ e_bluez_adapter_powered_get(E_Bluez_Element *element, bool *powered)
  *
  * @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
@@ -220,13 +220,13 @@ e_bluez_adapter_powered_set(E_Bluez_Element *element, bool powered, E_DBus_Metho
  * 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);
@@ -245,8 +245,8 @@ e_bluez_adapter_discoverable_get(E_Bluez_Element *element, bool *discoverable)
  *
  * @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
@@ -268,7 +268,7 @@ e_bluez_adapter_discoverable_set(E_Bluez_Element *element, bool discoverable, E_
  * @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);
@@ -292,7 +292,7 @@ e_bluez_adapter_discoverable_timeout_get(const E_Bluez_Element *element, unsigne
  * @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);
@@ -308,13 +308,13 @@ e_bluez_adapter_discoverable_timeout_set(E_Bluez_Element *element, unsigned int
  * 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);
@@ -334,7 +334,7 @@ e_bluez_adapter_discovering_get(E_Bluez_Element *element, bool *discovering)
  *
  * @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";
@@ -362,7 +362,7 @@ e_bluez_adapter_start_discovery(E_Bluez_Element *element, E_DBus_Method_Return_C
  *
  * @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";
@@ -387,7 +387,7 @@ e_bluez_adapter_stop_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb
  *
  * @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;
index 762d57c..61c7be4 100644 (file)
@@ -14,7 +14,7 @@
  *
  * @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);
index 05c56ce..5f0728c 100644 (file)
@@ -32,7 +32,7 @@ struct _E_Bluez_Element_Property
    const char *name;
    int type;
    union {
-      bool boolean;
+      Eina_Bool boolean;
       const char *str;
       unsigned short u16;
       unsigned int u32;
@@ -294,7 +294,7 @@ _e_bluez_element_dict_entry_new(DBusMessageIter *itr)
    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;
@@ -501,7 +501,7 @@ _e_bluez_element_array_match(E_Bluez_Array *old, E_Bluez_Array *new, const char
 
    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;
@@ -548,7 +548,7 @@ out_remove_remaining:
      }
 }
 
-static bool
+static Eina_Bool
 _e_bluez_element_property_update(E_Bluez_Element_Property *property, int type, void *data)
 {
    int changed = 0;
@@ -570,9 +570,9 @@ _e_bluez_element_property_update(E_Bluez_Element_Property *property, int type, v
    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;
@@ -711,7 +711,7 @@ e_bluez_element_bytes_array_get_stringshared(const E_Bluez_Element *element, con
    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;
@@ -773,7 +773,7 @@ e_bluez_element_objects_array_get_stringshared(const E_Bluez_Element *element, c
 }
 
 /* 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;
@@ -1063,7 +1063,7 @@ e_bluez_element_unref(E_Bluez_Element *element)
  *
  * @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;
@@ -1118,7 +1118,7 @@ e_bluez_element_message_send(E_Bluez_Element *element, const char *method_name,
    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;
@@ -1135,7 +1135,7 @@ e_bluez_element_call_full(E_Bluez_Element *element, const char *method_name, E_D
      (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;
@@ -1320,7 +1320,7 @@ _e_bluez_element_get_properties_callback(void *user_data, DBusMessage *msg, DBus
  *
  * @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";
@@ -1342,7 +1342,7 @@ e_bluez_element_properties_sync_full(E_Bluez_Element *element, E_DBus_Method_Ret
  *
  * @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);
@@ -1367,7 +1367,7 @@ e_bluez_element_properties_sync(E_Bluez_Element *element)
  *
  * @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";
@@ -1443,7 +1443,7 @@ e_bluez_element_property_dict_set_full(E_Bluez_Element *element, const char *pro
  *
  * @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";
@@ -1495,7 +1495,7 @@ e_bluez_element_property_set_full(E_Bluez_Element *element, const char *prop, in
  *
  * @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);
@@ -1504,7 +1504,7 @@ e_bluez_element_property_set(E_Bluez_Element *element, const char *prop, int typ
      (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;
@@ -1529,7 +1529,7 @@ e_bluez_element_call_with_path(E_Bluez_Element *element, const char *method_name
      (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;
@@ -1554,7 +1554,7 @@ e_bluez_element_call_with_string(E_Bluez_Element *element, const char *method_na
      (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;
@@ -1593,7 +1593,7 @@ e_bluez_element_call_with_path_and_string(E_Bluez_Element *element, const char *
  *
  * @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;
@@ -1628,10 +1628,10 @@ e_bluez_element_property_type_get_stringshared(const E_Bluez_Element *element, c
  *
  * @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);
@@ -1639,7 +1639,7 @@ e_bluez_element_property_type_get(const E_Bluez_Element *element, const char *na
 }
 
 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;
 
@@ -1659,7 +1659,7 @@ e_bluez_element_list_properties(const E_Bluez_Element *element, bool (*cb)(void
              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;
@@ -1691,11 +1691,11 @@ e_bluez_element_list_properties(const E_Bluez_Element *element, bool (*cb)(void
  * @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;
@@ -1740,7 +1740,7 @@ e_bluez_element_property_dict_get_stringshared(const E_Bluez_Element *element, c
        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;
@@ -1785,11 +1785,11 @@ e_bluez_element_property_dict_get_stringshared(const E_Bluez_Element *element, c
  * @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;
@@ -1808,7 +1808,7 @@ e_bluez_element_property_get_stringshared(const E_Bluez_Element *element, const
        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;
@@ -1853,14 +1853,14 @@ e_bluez_element_property_get_stringshared(const E_Bluez_Element *element, const
  * @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);
@@ -1902,7 +1902,7 @@ e_bluez_elements_for_each(Eina_Hash_Foreach cb, const void *user_data)
                     &data);
 }
 
-static bool
+static Eina_Bool
 _e_bluez_elements_get_allocate(unsigned int *count, E_Bluez_Element ***p_elements)
 {
    *count = eina_hash_population(elements);
@@ -1949,7 +1949,7 @@ _e_bluez_elements_get_all(Eina_Hash *hash __UNUSED__, const char *key __UNUSED__
  *
  * @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;
@@ -2004,7 +2004,7 @@ _e_bluez_elements_get_all_type(Eina_Hash *hash __UNUSED__, const char *key __UNU
  *
  * @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;
index c07d534..47434c7 100644 (file)
@@ -21,7 +21,7 @@ e_bluez_manager_get(void)
  *
  * @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);
index 358e025..4eb0e4f 100644 (file)
@@ -57,7 +57,7 @@ struct _E_Bluez_Element_Dict_Entry
    const char *name;
    int type;
    union {
-      bool boolean;
+      Eina_Bool boolean;
       const char *str;
       short i16;
       unsigned short u16;
@@ -81,7 +81,7 @@ struct _E_Bluez_Element_Dict_Entry
 #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)
@@ -115,7 +115,7 @@ __dbus_callback_check_and_init(const char *file, int line, const char *function,
   __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)
@@ -141,13 +141,13 @@ void e_bluez_elements_shutdown(void);
 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);