etrunko pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=767df72a75e8b618369188df676c0a76e2784fbe

commit 767df72a75e8b618369188df676c0a76e2784fbe
Author: Eduardo Lima (Etrunko) <eduardo.l...@intel.com>
Date:   Tue Apr 1 08:37:42 2014 -0300

    Bluez 5
    
    Signed-off-by: Eduardo Lima (Etrunko) <eduardo.l...@intel.com>
---
 src/modules/bluez4/ebluez4.c | 27 +++++++++++++++++++++++++++
 src/modules/bluez4/ebluez4.h | 13 +++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/src/modules/bluez4/ebluez4.c b/src/modules/bluez4/ebluez4.c
index 9b8252d..963a52a 100644
--- a/src/modules/bluez4/ebluez4.c
+++ b/src/modules/bluez4/ebluez4.c
@@ -841,3 +841,30 @@ ebluez4_adapter_property_set(Adapter *adap, const char 
*prop_name, Eina_Bool val
    eldbus_message_iter_container_close(iter, variant);
    eldbus_proxy_send(adap->proxy, new_msg, NULL, NULL, -1);
 }
+
+static struct ebluez5 *bluez5 = NULL;
+
+void
+eldbus5_init(void)
+{
+   Eldbus_Object *obj;
+
+   if (bluez5 != NULL)
+      return;
+
+   bluez5 = calloc(1, sizeof(*bluez5));
+   bluez5->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM);
+
+   obj = eldbus_object_get(bluez5->conn, BLUEZ_BUS, ORG_BLUEZ_PATH);
+   bluez5->agent_manager = eldbus_proxy_get(obj, AGENT_MANAGER_INTERFACE);
+}
+
+void
+eldbus5_shutdown(void)
+{
+   if (!bluez5)
+      return;
+
+   eldbus_connection_unref(bluez5->conn);
+   free(bluez5);
+}
diff --git a/src/modules/bluez4/ebluez4.h b/src/modules/bluez4/ebluez4.h
index 9d61475..3373b86 100644
--- a/src/modules/bluez4/ebluez4.h
+++ b/src/modules/bluez4/ebluez4.h
@@ -82,3 +82,16 @@ void ebluez4_pair_with_device(const char *addr, void 
(*cb)(void *, Eina_Bool, co
 void ebluez4_remove_device(Eldbus_Object *obj);
 int ebluez4_dev_path_cmp(const void *d1, const void *d2);
 void ebluez4_adapter_property_set(Adapter *adap, const char *prop_name, 
Eina_Bool value);
+
+
+#define ORG_BLUEZ_PATH  "/org/bluez"
+#define AGENT_MANAGER_INTERFACE  "org.bluez.AgentManager1"
+
+struct ebluez5
+{
+   Eldbus_Connection *conn;
+   Eldbus_Proxy *agent_manager;
+};
+
+void ebluez5_init(void);
+void ebluez5_shutdown(void);

-- 


Reply via email to