Added BlueZ build scripts
[ti-bt/build-utils.git] / patches / 0001-bt-obex-new-dbus-api-for-obexd.patch
1 From 0d60f8a9da3f0e77d8703da96d4f9e954f3c7c04 Mon Sep 17 00:00:00 2001
2 From: Vita Preskovsky <vitap@ti.com>
3 Date: Tue, 30 Oct 2012 18:37:39 +0200
4 Subject: [PATCH] bt-obex: new dbus api for obexd
6  * obexd's dbus APIs are changed from "org.openobex" to "org.bluez.obex"
9 Signed-off-by: Vita Preskovsky <vitap@ti.com>
11 diff --git a/src/lib/obexd-api.h b/src/lib/obexd-api.h
12 index 09695f6..7716df4 100644
13 --- a/src/lib/obexd-api.h
14 +++ b/src/lib/obexd-api.h
15 @@ -33,8 +33,8 @@
16  #include <dbus/dbus-glib.h>
17  
18  #ifdef OBEX_SUPPORT
19 -#define OBEXS_DBUS_NAME "org.openobex"
20 -#define OBEXC_DBUS_NAME "org.openobex.client"
21 +#define OBEXS_DBUS_NAME "org.bluez.obex"
22 +#define OBEXC_DBUS_NAME "org.bluez.obex.client"
23  
24  /* OBEXD DBus API */
25  #include "obexd/obexagent.h"
26 diff --git a/src/lib/obexd/obexagent.h b/src/lib/obexd/obexagent.h
27 index b94fb2c..5bc5f9c 100644
28 --- a/src/lib/obexd/obexagent.h
29 +++ b/src/lib/obexd/obexagent.h
30 @@ -89,7 +89,7 @@ static const DBusGObjectInfo dbus_glib_obexagent_object_info = {
31         0,
32         dbus_glib_obexagent_methods,
33         7,
34 -       "org.openobex.Agent\0Authorize\0S\0transfer\0I\0o\0bt_address\0I\0s\0name\0I\0s\0type\0I\0s\0length\0I\0i\0time\0I\0i\0arg6\0O\0F\0N\0s\0\0org.openobex.Agent\0Cancel\0S\0\0org.openobex.Agent\0Release\0S\0\0org.openobex.Agent\0Request\0S\0transfer\0I\0o\0arg1\0O\0F\0N\0s\0\0org.openobex.Agent\0Progress\0S\0transfer\0I\0o\0transferred\0I\0t\0\0org.openobex.Agent\0Complete\0S\0transfer\0I\0o\0\0org.openobex.Agent\0Error\0S\0transfer\0I\0o\0message\0I\0s\0\0\0",
35 +       "org.bluez.obex.Agent\0Authorize\0S\0transfer\0I\0o\0bt_address\0I\0s\0name\0I\0s\0type\0I\0s\0length\0I\0i\0time\0I\0i\0arg6\0O\0F\0N\0s\0\0org.bluez.obex.Agent\0Cancel\0S\0\0org.bluez.obex.Agent\0Release\0S\0\0org.bluez.obex.Agent\0Request\0S\0transfer\0I\0o\0arg1\0O\0F\0N\0s\0\0org.bluez.obex.Agent\0Progress\0S\0transfer\0I\0o\0transferred\0I\0t\0\0org.bluez.obex.Agent\0Complete\0S\0transfer\0I\0o\0\0org.bluez.obex.Agent\0Error\0S\0transfer\0I\0o\0message\0I\0s\0\0\0",
36         "\0",
37         "\0"
38  };
39 diff --git a/src/lib/obexd/obexclient.c b/src/lib/obexd/obexclient.c
40 index d8cfa78..b8ac43e 100644
41 --- a/src/lib/obexd/obexclient.c
42 +++ b/src/lib/obexd/obexclient.c
43 @@ -83,7 +83,7 @@ static void obexclient_init(OBEXClient *self)
44         GError *error = NULL;
45  
46         /* Getting introspection XML */
47 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", OBEXCLIENT_DBUS_PATH, "org.freedesktop.DBus.Introspectable");
48 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", OBEXCLIENT_DBUS_PATH, "org.freedesktop.DBus.Introspectable");
49         self->priv->introspection_xml = NULL;
50         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
51                 g_critical("%s", error->message);
52 @@ -97,7 +97,7 @@ static void obexclient_init(OBEXClient *self)
53         }
54         g_free(check_intf_regex_str);
55  
56 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", OBEXCLIENT_DBUS_PATH, OBEXCLIENT_DBUS_INTERFACE);
57 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", OBEXCLIENT_DBUS_PATH, OBEXCLIENT_DBUS_INTERFACE);
58  }
59  
60  /* Methods */
61 diff --git a/src/lib/obexd/obexclient.h b/src/lib/obexd/obexclient.h
62 index d999b76..59799db 100644
63 --- a/src/lib/obexd/obexclient.h
64 +++ b/src/lib/obexd/obexclient.h
65 @@ -27,7 +27,7 @@
66  #include <glib-object.h>
67  
68  #define OBEXCLIENT_DBUS_PATH "/"
69 -#define OBEXCLIENT_DBUS_INTERFACE "org.openobex.Client"
70 +#define OBEXCLIENT_DBUS_INTERFACE "org.bluez.obex.Client"
71  
72  /*
73   * Type macros
74 diff --git a/src/lib/obexd/obexclient_file_transfer.c b/src/lib/obexd/obexclient_file_transfer.c
75 index 05fa36d..683cdfa 100644
76 --- a/src/lib/obexd/obexclient_file_transfer.c
77 +++ b/src/lib/obexd/obexclient_file_transfer.c
78 @@ -109,7 +109,7 @@ static void obexclient_file_transfer_post_init(OBEXClientFileTransfer *self, con
79         GError *error = NULL;
80  
81         /* Getting introspection XML */
82 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", dbus_object_path, "org.freedesktop.DBus.Introspectable");
83 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", dbus_object_path, "org.freedesktop.DBus.Introspectable");
84         self->priv->introspection_xml = NULL;
85         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
86                 g_critical("%s", error->message);
87 @@ -122,7 +122,7 @@ static void obexclient_file_transfer_post_init(OBEXClientFileTransfer *self, con
88                 g_assert(FALSE);
89         }
90         g_free(check_intf_regex_str);
91 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", dbus_object_path, OBEXCLIENT_FILE_TRANSFER_DBUS_INTERFACE);
92 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", dbus_object_path, OBEXCLIENT_FILE_TRANSFER_DBUS_INTERFACE);
93  }
94  
95  static void _obexclient_file_transfer_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
96 diff --git a/src/lib/obexd/obexclient_file_transfer.h b/src/lib/obexd/obexclient_file_transfer.h
97 index 5e796b2..750d411 100644
98 --- a/src/lib/obexd/obexclient_file_transfer.h
99 +++ b/src/lib/obexd/obexclient_file_transfer.h
100 @@ -26,7 +26,7 @@
101  
102  #include <glib-object.h>
103  
104 -#define OBEXCLIENT_FILE_TRANSFER_DBUS_INTERFACE "org.openobex.FileTransfer"
105 +#define OBEXCLIENT_FILE_TRANSFER_DBUS_INTERFACE "org.bluez.obex.FileTransfer"
106  
107  /*
108   * Type macros
109 diff --git a/src/lib/obexd/obexclient_session.c b/src/lib/obexd/obexclient_session.c
110 index a5b52f8..3b882d1 100644
111 --- a/src/lib/obexd/obexclient_session.c
112 +++ b/src/lib/obexd/obexclient_session.c
113 @@ -133,7 +133,7 @@ static void obexclient_session_post_init(OBEXClientSession *self, const gchar *d
114         GError *error = NULL;
115  
116         /* Getting introspection XML */
117 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", dbus_object_path, "org.freedesktop.DBus.Introspectable");
118 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", dbus_object_path, "org.freedesktop.DBus.Introspectable");
119         self->priv->introspection_xml = NULL;
120         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
121                 g_critical("%s", error->message);
122 @@ -146,7 +146,7 @@ static void obexclient_session_post_init(OBEXClientSession *self, const gchar *d
123                 g_assert(FALSE);
124         }
125         g_free(check_intf_regex_str);
126 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", dbus_object_path, OBEXCLIENT_SESSION_DBUS_INTERFACE);
127 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", dbus_object_path, OBEXCLIENT_SESSION_DBUS_INTERFACE);
128  
129         /* Properties init */
130         GHashTable *properties = obexclient_session_get_properties(self, &error);
131 diff --git a/src/lib/obexd/obexclient_session.h b/src/lib/obexd/obexclient_session.h
132 index 87af06d..bffd844 100644
133 --- a/src/lib/obexd/obexclient_session.h
134 +++ b/src/lib/obexd/obexclient_session.h
135 @@ -26,7 +26,7 @@
136  
137  #include <glib-object.h>
138  
139 -#define OBEXCLIENT_SESSION_DBUS_INTERFACE "org.openobex.Session"
140 +#define OBEXCLIENT_SESSION_DBUS_INTERFACE "org.bluez.obex.Session"
141  
142  /*
143   * Type macros
144 diff --git a/src/lib/obexd/obexclient_transfer.c b/src/lib/obexd/obexclient_transfer.c
145 index 68c4bf3..e11e2d4 100644
146 --- a/src/lib/obexd/obexclient_transfer.c
147 +++ b/src/lib/obexd/obexclient_transfer.c
148 @@ -133,7 +133,7 @@ static void obexclient_transfer_post_init(OBEXClientTransfer *self, const gchar
149         GError *error = NULL;
150  
151         /* Getting introspection XML */
152 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", dbus_object_path, "org.freedesktop.DBus.Introspectable");
153 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", dbus_object_path, "org.freedesktop.DBus.Introspectable");
154         self->priv->introspection_xml = NULL;
155         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
156                 g_critical("%s", error->message);
157 @@ -146,7 +146,7 @@ static void obexclient_transfer_post_init(OBEXClientTransfer *self, const gchar
158                 g_assert(FALSE);
159         }
160         g_free(check_intf_regex_str);
161 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex.client", dbus_object_path, OBEXCLIENT_TRANSFER_DBUS_INTERFACE);
162 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex.client", dbus_object_path, OBEXCLIENT_TRANSFER_DBUS_INTERFACE);
163  
164         /* Properties init */
165         GHashTable *properties = obexclient_transfer_get_properties(self, &error);
166 diff --git a/src/lib/obexd/obexclient_transfer.h b/src/lib/obexd/obexclient_transfer.h
167 index f84fd69..f92e790 100644
168 --- a/src/lib/obexd/obexclient_transfer.h
169 +++ b/src/lib/obexd/obexclient_transfer.h
170 @@ -26,7 +26,7 @@
171  
172  #include <glib-object.h>
173  
174 -#define OBEXCLIENT_TRANSFER_DBUS_INTERFACE "org.openobex.Transfer"
175 +#define OBEXCLIENT_TRANSFER_DBUS_INTERFACE "org.bluez.obex.Transfer"
176  
177  /*
178   * Type macros
179 diff --git a/src/lib/obexd/obexmanager.c b/src/lib/obexd/obexmanager.c
180 index 1e3e0d4..c77daad 100644
181 --- a/src/lib/obexd/obexmanager.c
182 +++ b/src/lib/obexd/obexmanager.c
183 @@ -134,7 +134,7 @@ static void obexmanager_init(OBEXManager *self)
184         GError *error = NULL;
185  
186         /* Getting introspection XML */
187 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex", OBEXMANAGER_DBUS_PATH, "org.freedesktop.DBus.Introspectable");
188 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex", OBEXMANAGER_DBUS_PATH, "org.freedesktop.DBus.Introspectable");
189         self->priv->introspection_xml = NULL;
190         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
191                 g_critical("%s", error->message);
192 @@ -148,7 +148,7 @@ static void obexmanager_init(OBEXManager *self)
193         }
194         g_free(check_intf_regex_str);
195  
196 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex", OBEXMANAGER_DBUS_PATH, OBEXMANAGER_DBUS_INTERFACE);
197 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex", OBEXMANAGER_DBUS_PATH, OBEXMANAGER_DBUS_INTERFACE);
198  
199         /* DBus signals connection */
200  
201 diff --git a/src/lib/obexd/obexmanager.h b/src/lib/obexd/obexmanager.h
202 index 203fe59..c0fe168 100644
203 --- a/src/lib/obexd/obexmanager.h
204 +++ b/src/lib/obexd/obexmanager.h
205 @@ -27,7 +27,7 @@
206  #include <glib-object.h>
207  
208  #define OBEXMANAGER_DBUS_PATH "/"
209 -#define OBEXMANAGER_DBUS_INTERFACE "org.openobex.Manager"
210 +#define OBEXMANAGER_DBUS_INTERFACE "org.bluez.obex.Manager"
211  
212  /*
213   * Type macros
214 diff --git a/src/lib/obexd/obexsession.c b/src/lib/obexd/obexsession.c
215 index 48380cf..49cbeed 100644
216 --- a/src/lib/obexd/obexsession.c
217 +++ b/src/lib/obexd/obexsession.c
218 @@ -120,7 +120,7 @@ static void obexsession_post_init(OBEXSession *self, const gchar *dbus_object_pa
219         GError *error = NULL;
220  
221         /* Getting introspection XML */
222 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex", dbus_object_path, "org.freedesktop.DBus.Introspectable");
223 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex", dbus_object_path, "org.freedesktop.DBus.Introspectable");
224         self->priv->introspection_xml = NULL;
225         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
226                 g_critical("%s", error->message);
227 @@ -133,7 +133,7 @@ static void obexsession_post_init(OBEXSession *self, const gchar *dbus_object_pa
228                 g_assert(FALSE);
229         }
230         g_free(check_intf_regex_str);
231 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex", dbus_object_path, OBEXSESSION_DBUS_INTERFACE);
232 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex", dbus_object_path, OBEXSESSION_DBUS_INTERFACE);
233  
234         /* Properties init */
235         GHashTable *properties = obexsession_get_properties(self, &error);
236 diff --git a/src/lib/obexd/obexsession.h b/src/lib/obexd/obexsession.h
237 index d39e15f..c045859 100644
238 --- a/src/lib/obexd/obexsession.h
239 +++ b/src/lib/obexd/obexsession.h
240 @@ -26,7 +26,8 @@
241  
242  #include <glib-object.h>
243  
244 -#define OBEXSESSION_DBUS_INTERFACE "org.openobex.Session"
245 +#define OBEXSESSION_DBUS_INTERFACE "org.bluez.obex.Session"
247  
248  /*
249   * Type macros
250 diff --git a/src/lib/obexd/obextransfer.c b/src/lib/obexd/obextransfer.c
251 index 78dcf52..94c5979 100644
252 --- a/src/lib/obexd/obextransfer.c
253 +++ b/src/lib/obexd/obextransfer.c
254 @@ -130,7 +130,7 @@ static void obextransfer_post_init(OBEXTransfer *self, const gchar *dbus_object_
255         GError *error = NULL;
256  
257         /* Getting introspection XML */
258 -       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex", dbus_object_path, "org.freedesktop.DBus.Introspectable");
259 +       self->priv->introspection_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex", dbus_object_path, "org.freedesktop.DBus.Introspectable");
260         self->priv->introspection_xml = NULL;
261         if (!dbus_g_proxy_call(self->priv->introspection_g_proxy, "Introspect", &error, G_TYPE_INVALID, G_TYPE_STRING, &self->priv->introspection_xml, G_TYPE_INVALID)) {
262                 g_critical("%s", error->message);
263 @@ -143,7 +143,7 @@ static void obextransfer_post_init(OBEXTransfer *self, const gchar *dbus_object_
264                 g_assert(FALSE);
265         }
266         g_free(check_intf_regex_str);
267 -       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.openobex", dbus_object_path, OBEXTRANSFER_DBUS_INTERFACE);
268 +       self->priv->dbus_g_proxy = dbus_g_proxy_new_for_name(session_conn, "org.bluez.obex", dbus_object_path, OBEXTRANSFER_DBUS_INTERFACE);
269  
270         /* DBus signals connection */
271  
272 diff --git a/src/lib/obexd/obextransfer.h b/src/lib/obexd/obextransfer.h
273 index 99f3084..3ccdcbd 100644
274 --- a/src/lib/obexd/obextransfer.h
275 +++ b/src/lib/obexd/obextransfer.h
276 @@ -26,7 +26,7 @@
277  
278  #include <glib-object.h>
279  
280 -#define OBEXTRANSFER_DBUS_INTERFACE "org.openobex.Transfer"
281 +#define OBEXTRANSFER_DBUS_INTERFACE "org.bluez.obex.Transfer"
282  
283  /*
284   * Type macros
285 -- 
286 1.7.9.5