17 # define EAPI __declspec(dllexport)
19 # define EAPI __declspec(dllimport)
24 # define EAPI __attribute__ ((visibility("default")))
38 extern int E_BLUEZ_EVENT_ELEMENT_IN;
39 extern int E_BLUEZ_EVENT_ELEMENT_OUT;
40 extern int E_BLUEZ_EVENT_ELEMENT_ADD;
41 extern int E_BLUEZ_EVENT_ELEMENT_DEL;
42 extern int E_BLUEZ_EVENT_ELEMENT_UPDATED;
44 typedef struct _E_Bluez_Element E_Bluez_Element;
46 struct _E_Bluez_Element
49 const char *interface;
50 E_DBus_Signal_Handler *signal_handler;
55 Eina_Inlist *properties_get;
56 Eina_Inlist *property_set;
57 Eina_Inlist *agent_register;
58 Eina_Inlist *agent_unregister;
63 Eina_Inlist *_listeners;
67 /* General Public API */
68 EAPI unsigned int e_bluez_system_init(E_DBus_Connection *edbus_conn) EINA_ARG_NONNULL(1);
69 EAPI unsigned int e_bluez_system_shutdown(void);
72 EAPI E_Bluez_Element *e_bluez_manager_get(void) EINA_WARN_UNUSED_RESULT;
76 * Should just be used to work around problems until proper solution
77 * is made into e_bluez.
79 EAPI bool e_bluez_manager_sync_elements(void);
81 EAPI bool e_bluez_elements_get_all(unsigned int *count, E_Bluez_Element ***p_elements) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
82 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;
83 EAPI E_Bluez_Element *e_bluez_element_get(const char *path);
85 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);
86 EAPI void e_bluez_element_listener_del(E_Bluez_Element *element, void (*cb)(void *data, const E_Bluez_Element *element), const void *data) EINA_ARG_NONNULL(1, 2);
88 EAPI int e_bluez_element_ref(E_Bluez_Element *element) EINA_ARG_NONNULL(1);
89 EAPI int e_bluez_element_unref(E_Bluez_Element *element) EINA_ARG_NONNULL(1);
91 EAPI void e_bluez_element_print(FILE *fp, const E_Bluez_Element *element) EINA_ARG_NONNULL(1, 2);
94 EAPI bool e_bluez_element_properties_sync(E_Bluez_Element *element) EINA_ARG_NONNULL(1);
95 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);
97 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;
98 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;
99 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;
101 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);
103 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;
104 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;
105 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;
106 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;
107 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;
112 #endif /* E_BLUEZ_H */