e_bluez_element_array_print(stderr, device->array);
printf("\n");
- e_bluez_adapter_device_found_free(device);
+ e_bluez_devicefound_free(device);
return 1;
}
EAPI bool e_bluez_manager_default_adapter(E_DBus_Method_Return_Cb cb, void *data) EINA_WARN_UNUSED_RESULT;
/* Adapter Methods */
- EAPI void e_bluez_adapter_device_found_free(E_Bluez_Device_Found *device) EINA_ARG_NONNULL(1);
- EAPI const char *e_bluez_adapter_device_found_get_alias(E_Bluez_Device_Found *device) EINA_ARG_NONNULL(1);
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_stop_discovery(E_Bluez_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
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;
e_bluez_element.c \
e_bluez_manager.c \
e_bluez_adapter.c \
-e_bluez_device.c
+e_bluez_device.c \
+e_bluez_devicefound.c
libebluez_la_LIBADD = \
@EDBUS_LIBS@ @EVAS_LIBS@ \
}
/**
- * Free a E_Bluez_Device_Found struct
- *
- * @param device the struct to be freed
- */
-void
-e_bluez_adapter_device_found_free(E_Bluez_Device_Found *device)
-{
- EINA_SAFETY_ON_NULL_RETURN(device);
-
- eina_stringshare_del(device->name);
- e_bluez_element_array_free(device->array, NULL);
-}
-
-const char *
-e_bluez_adapter_device_found_get_alias(E_Bluez_Device_Found *device)
-{
- E_Bluez_Element_Dict_Entry *entry;
- const char *alias = eina_stringshare_add("Alias");
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
-
- entry = e_bluez_element_array_dict_find_stringshared(device->array,
- alias);
-
- if (entry->type == DBUS_TYPE_STRING)
- return entry->value.str;
-
- return NULL;
-}
-
-/**
* Register new agent for handling user requests.
*
* Call method RegisterAgent(object) on server in order to
--- /dev/null
+#include "e_bluez_private.h"
+
+/**
+ * Free a E_Bluez_Device_Found struct
+ *
+ * @param device the struct to be freed
+ */
+void
+e_bluez_devicefound_free(E_Bluez_Device_Found *device)
+{
+ EINA_SAFETY_ON_NULL_RETURN(device);
+
+ eina_stringshare_del(device->name);
+ e_bluez_element_array_free(device->array, NULL);
+}
+
+const char *
+e_bluez_devicefound_alias_get(E_Bluez_Device_Found *device)
+{
+ E_Bluez_Element_Dict_Entry *entry;
+ const char *alias = eina_stringshare_add("Alias");
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
+
+ entry = e_bluez_element_array_dict_find_stringshared(device->array,
+ alias);
+
+ if (entry->type == DBUS_TYPE_STRING)
+ return entry->value.str;
+
+ return NULL;
+}