linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH obexd 01/16] Remove unused function obex_aparam_write
@ 2011-11-15 13:27 Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 02/16] Remove use of obex_object_t on obex.h Luiz Augusto von Dentz
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 src/obex.c |   11 -----------
 src/obex.h |    2 --
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/src/obex.c b/src/obex.c
index 0d00f7f..70a0c68 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -1548,17 +1548,6 @@ ssize_t obex_aparam_read(struct obex_session *os,
 	return -EBADR;
 }
 
-int obex_aparam_write(struct obex_session *os,
-		obex_object_t *obj, const uint8_t *data, unsigned int size)
-{
-	obex_headerdata_t hd;
-
-	hd.bs = data;
-
-	return OBEX_ObjectAddHeader(os->obex, obj,
-			OBEX_HDR_APPARAM, hd, size, 0);
-}
-
 int memncmp0(const void *a, size_t na, const void *b, size_t nb)
 {
 	if (na != nb)
diff --git a/src/obex.h b/src/obex.h
index 0f3360b..e3f399a 100644
--- a/src/obex.h
+++ b/src/obex.h
@@ -49,8 +49,6 @@ uint8_t obex_get_action_id(struct obex_session *os);
 char *obex_get_id(struct obex_session *os);
 ssize_t obex_aparam_read(struct obex_session *os, obex_object_t *obj,
 						const uint8_t **buffer);
-int obex_aparam_write(struct obex_session *os, obex_object_t *obj,
-				const uint8_t *buffer, unsigned int size);
 
 /* Just a thin wrapper around memcmp to deal with NULL values */
 int memncmp0(const void *a, size_t na, const void *b, size_t nb);
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 02/16] Remove use of obex_object_t on obex.h
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 03/16] Introduce obex_get_non_header_data Luiz Augusto von Dentz
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Plugins including obex.h need to include openobex headers because of
this.
---
 plugins/pbap.c  |    2 +-
 src/obex-priv.h |    2 ++
 src/obex.c      |   28 +++++++++++++---------------
 src/obex.h      |    3 +--
 4 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/plugins/pbap.c b/plugins/pbap.c
index 997b5bd..fb82766 100644
--- a/plugins/pbap.c
+++ b/plugins/pbap.c
@@ -642,7 +642,7 @@ static int pbap_get(struct obex_session *os, obex_object_t *obj,
 	if (type == NULL)
 		return -EBADR;
 
-	rsize = obex_aparam_read(os, obj, &buffer);
+	rsize = obex_get_apparam(os, &buffer);
 	if (rsize < 0) {
 		if (g_ascii_strcasecmp(type, VCARDENTRY_TYPE) != 0)
 			return -EBADR;
diff --git a/src/obex-priv.h b/src/obex-priv.h
index 01b6496..a834511 100644
--- a/src/obex-priv.h
+++ b/src/obex-priv.h
@@ -34,6 +34,8 @@ struct obex_session {
 	char *type;
 	char *path;
 	time_t time;
+	uint8_t *apparam;
+	size_t apparam_len;
 	uint8_t *buf;
 	int64_t pending;
 	int64_t offset;
diff --git a/src/obex.c b/src/obex.c
index 70a0c68..a1621b9 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -312,6 +312,11 @@ static void os_reset_session(struct obex_session *os)
 		g_free(os->path);
 		os->path = NULL;
 	}
+	if (os->apparam) {
+		g_free(os->apparam);
+		os->apparam = NULL;
+		os->apparam_len = 0;
+	}
 
 	os->object = NULL;
 	os->obj = NULL;
@@ -825,6 +830,11 @@ static void cmd_get(struct obex_session *os, obex_t *obex, obex_object_t *obj)
 						os->service->who_size);
 			break;
 		}
+
+		if (hi == OBEX_HDR_APPARAM) {
+			os->apparam = g_memdup(hd.bs, hlen);
+			os->apparam_len = hlen;
+		}
 	}
 
 	if (os->type == NULL)
@@ -1529,23 +1539,11 @@ char *obex_get_id(struct obex_session *os)
 	return g_strdup_printf("%s+%d", address, channel);
 }
 
-ssize_t obex_aparam_read(struct obex_session *os,
-		obex_object_t *obj, const uint8_t **buffer)
+ssize_t obex_get_apparam(struct obex_session *os, const uint8_t **buffer)
 {
-	obex_headerdata_t hd;
-	uint8_t hi;
-	uint32_t hlen;
-
-	OBEX_ObjectReParseHeaders(os->obex, obj);
-
-	while (OBEX_ObjectGetNextHeader(os->obex, obj, &hi, &hd, &hlen)) {
-		if (hi == OBEX_HDR_APPARAM) {
-			*buffer = hd.bs;
-			return hlen;
-		}
-	}
+	*buffer = os->apparam;
 
-	return -EBADR;
+	return os->apparam_len;
 }
 
 int memncmp0(const void *a, size_t na, const void *b, size_t nb)
diff --git a/src/obex.h b/src/obex.h
index e3f399a..6ede0a4 100644
--- a/src/obex.h
+++ b/src/obex.h
@@ -47,8 +47,7 @@ int obex_move(struct obex_session *os, const char *source,
 						const char *destination);
 uint8_t obex_get_action_id(struct obex_session *os);
 char *obex_get_id(struct obex_session *os);
-ssize_t obex_aparam_read(struct obex_session *os, obex_object_t *obj,
-						const uint8_t **buffer);
+ssize_t obex_get_apparam(struct obex_session *os, const uint8_t **buffer);
 
 /* Just a thin wrapper around memcmp to deal with NULL values */
 int memncmp0(const void *a, size_t na, const void *b, size_t nb);
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 03/16] Introduce obex_get_non_header_data
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 02/16] Remove use of obex_object_t on obex.h Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 04/16] Remove use of obex_object_t from service.h Luiz Augusto von Dentz
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This function remove the need of calling OBEX_ObjectGetNonHdrData in the
plugins.
---
 plugins/ftp.c   |    4 ++--
 plugins/mas.c   |    4 ++--
 plugins/pbap.c  |    4 ++--
 src/obex-priv.h |    2 ++
 src/obex.c      |   10 ++++++++++
 src/obex.h      |    2 ++
 6 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/plugins/ftp.c b/plugins/ftp.c
index 0586326..7a736ae 100644
--- a/plugins/ftp.c
+++ b/plugins/ftp.c
@@ -255,13 +255,13 @@ int ftp_setpath(struct obex_session *os, obex_object_t *obj, void *user_data)
 {
 	struct ftp_session *ftp = user_data;
 	const char *root_folder, *name;
-	uint8_t *nonhdr;
+	const uint8_t *nonhdr;
 	char *fullname;
 	struct stat dstat;
 	gboolean root;
 	int err;
 
-	if (OBEX_ObjectGetNonHdrData(obj, &nonhdr) != 2) {
+	if (obex_get_non_header_data(os, &nonhdr) != 2) {
 		error("Set path failed: flag and constants not found!");
 		return -EBADMSG;
 	}
diff --git a/plugins/mas.c b/plugins/mas.c
index 7d3d553..7d47212 100644
--- a/plugins/mas.c
+++ b/plugins/mas.c
@@ -410,10 +410,10 @@ static int mas_setpath(struct obex_session *os, obex_object_t *obj,
 							void *user_data)
 {
 	const char *name;
-	uint8_t *nonhdr;
+	const uint8_t *nonhdr;
 	struct mas_session *mas = user_data;
 
-	if (OBEX_ObjectGetNonHdrData(obj, &nonhdr) != 2) {
+	if (obex_get_non_header_data(os, &nonhdr) != 2) {
 		error("Set path failed: flag and constants not found!");
 		return -EBADR;
 	}
diff --git a/plugins/pbap.c b/plugins/pbap.c
index fb82766..2e607b3 100644
--- a/plugins/pbap.c
+++ b/plugins/pbap.c
@@ -698,11 +698,11 @@ static int pbap_setpath(struct obex_session *os, obex_object_t *obj,
 {
 	struct pbap_session *pbap = user_data;
 	const char *name;
-	uint8_t *nonhdr;
+	const uint8_t *nonhdr;
 	char *fullname;
 	int err;
 
-	if (OBEX_ObjectGetNonHdrData(obj, &nonhdr) != 2) {
+	if (obex_get_non_header_data(os, &nonhdr) != 2) {
 		error("Set path failed: flag and constants not found!");
 		return -EBADMSG;
 	}
diff --git a/src/obex-priv.h b/src/obex-priv.h
index a834511..6a439b4 100644
--- a/src/obex-priv.h
+++ b/src/obex-priv.h
@@ -36,6 +36,8 @@ struct obex_session {
 	time_t time;
 	uint8_t *apparam;
 	size_t apparam_len;
+	uint8_t *nonhdr;
+	size_t nonhdr_len;
 	uint8_t *buf;
 	int64_t pending;
 	int64_t offset;
diff --git a/src/obex.c b/src/obex.c
index a1621b9..3a06775 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -931,6 +931,8 @@ static void cmd_setpath(struct obex_session *os,
 		break;
 	}
 
+	os->nonhdr_len = OBEX_ObjectGetNonHdrData(obj, &os->nonhdr);
+
 	err = os->service->setpath(os, obj, os->service_data);
 	os_set_response(obj, err);
 }
@@ -1546,6 +1548,14 @@ ssize_t obex_get_apparam(struct obex_session *os, const uint8_t **buffer)
 	return os->apparam_len;
 }
 
+ssize_t obex_get_non_header_data(struct obex_session *os,
+							const uint8_t **data)
+{
+	*data = os->nonhdr;
+
+	return os->nonhdr_len;
+}
+
 int memncmp0(const void *a, size_t na, const void *b, size_t nb)
 {
 	if (na != nb)
diff --git a/src/obex.h b/src/obex.h
index 6ede0a4..3e8ce00 100644
--- a/src/obex.h
+++ b/src/obex.h
@@ -48,6 +48,8 @@ int obex_move(struct obex_session *os, const char *source,
 uint8_t obex_get_action_id(struct obex_session *os);
 char *obex_get_id(struct obex_session *os);
 ssize_t obex_get_apparam(struct obex_session *os, const uint8_t **buffer);
+ssize_t obex_get_non_header_data(struct obex_session *os,
+							const uint8_t **data);
 
 /* Just a thin wrapper around memcmp to deal with NULL values */
 int memncmp0(const void *a, size_t na, const void *b, size_t nb);
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 04/16] Remove use of obex_object_t from service.h
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 02/16] Remove use of obex_object_t on obex.h Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 03/16] Introduce obex_get_non_header_data Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 05/16] ftp: remove duplicated includes Luiz Augusto von Dentz
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Plugins including service.h need to include openobex headers because of
this.
---
 plugins/ftp.c           |    8 ++++----
 plugins/ftp.h           |    8 ++++----
 plugins/irmc.c          |    3 +--
 plugins/mas.c           |    7 +++----
 plugins/opp.c           |    5 ++---
 plugins/pbap.c          |    6 ++----
 plugins/pcsuite.c       |   20 ++++++++------------
 plugins/syncevolution.c |    6 ++----
 src/obex.c              |    8 ++++----
 src/service.h           |   12 ++++--------
 10 files changed, 34 insertions(+), 49 deletions(-)

diff --git a/plugins/ftp.c b/plugins/ftp.c
index 7a736ae..2b5cc2e 100644
--- a/plugins/ftp.c
+++ b/plugins/ftp.c
@@ -163,7 +163,7 @@ void *ftp_connect(struct obex_session *os, int *err)
 	return ftp;
 }
 
-int ftp_get(struct obex_session *os, obex_object_t *obj, void *user_data)
+int ftp_get(struct obex_session *os, void *user_data)
 {
 	struct ftp_session *ftp = user_data;
 	const char *type = obex_get_type(os);
@@ -228,7 +228,7 @@ int ftp_chkput(struct obex_session *os, void *user_data)
 	return ret;
 }
 
-int ftp_put(struct obex_session *os, obex_object_t *obj, void *user_data)
+int ftp_put(struct obex_session *os, void *user_data)
 {
 	struct ftp_session *ftp = user_data;
 	const char *name = obex_get_name(os);
@@ -251,7 +251,7 @@ int ftp_put(struct obex_session *os, obex_object_t *obj, void *user_data)
 	return 0;
 }
 
-int ftp_setpath(struct obex_session *os, obex_object_t *obj, void *user_data)
+int ftp_setpath(struct obex_session *os, void *user_data)
 {
 	struct ftp_session *ftp = user_data;
 	const char *root_folder, *name;
@@ -480,7 +480,7 @@ static int ftp_move(struct ftp_session *ftp, const char *name,
 	return ret;
 }
 
-int ftp_action(struct obex_session *os, obex_object_t *obj, void *user_data)
+int ftp_action(struct obex_session *os, void *user_data)
 {
 	struct ftp_session *ftp = user_data;
 	const char *name, *destname;
diff --git a/plugins/ftp.h b/plugins/ftp.h
index 86c7725..f06de84 100644
--- a/plugins/ftp.h
+++ b/plugins/ftp.h
@@ -22,9 +22,9 @@
  */
 
 void *ftp_connect(struct obex_session *os, int *err);
-int ftp_get(struct obex_session *os, obex_object_t *obj, void *user_data);
+int ftp_get(struct obex_session *os, void *user_data);
 int ftp_chkput(struct obex_session *os, void *user_data);
-int ftp_put(struct obex_session *os, obex_object_t *obj, void *user_data);
-int ftp_setpath(struct obex_session *os, obex_object_t *obj, void *user_data);
+int ftp_put(struct obex_session *os, void *user_data);
+int ftp_setpath(struct obex_session *os, void *user_data);
 void ftp_disconnect(struct obex_session *os, void *user_data);
-int ftp_action(struct obex_session *os, obex_object_t *obj, void *user_data);
+int ftp_action(struct obex_session *os, void *user_data);
diff --git a/plugins/irmc.c b/plugins/irmc.c
index 4ea76c5..2a198c8 100644
--- a/plugins/irmc.c
+++ b/plugins/irmc.c
@@ -237,8 +237,7 @@ static void *irmc_connect(struct obex_session *os, int *err)
 	return irmc;
 }
 
-static int irmc_get(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int irmc_get(struct obex_session *os, void *user_data)
 {
 	struct irmc_session *irmc = user_data;
 	const char *type = obex_get_type(os);
diff --git a/plugins/mas.c b/plugins/mas.c
index 7d47212..b104d8f 100644
--- a/plugins/mas.c
+++ b/plugins/mas.c
@@ -165,7 +165,7 @@ static void mas_disconnect(struct obex_session *os, void *user_data)
 	mas_clean(mas);
 }
 
-static int mas_get(struct obex_session *os, obex_object_t *obj, void *user_data)
+static int mas_get(struct obex_session *os, void *user_data)
 {
 	struct mas_session *mas = user_data;
 	const char *type = obex_get_type(os);
@@ -190,7 +190,7 @@ failed:
 	return ret;
 }
 
-static int mas_put(struct obex_session *os, obex_object_t *obj, void *user_data)
+static int mas_put(struct obex_session *os, void *user_data)
 {
 	struct mas_session *mas = user_data;
 	const char *type = obex_get_type(os);
@@ -406,8 +406,7 @@ proceed:
 		obex_object_set_io_flags(mas, G_IO_IN, err);
 }
 
-static int mas_setpath(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int mas_setpath(struct obex_session *os, void *user_data)
 {
 	const char *name;
 	const uint8_t *nonhdr;
diff --git a/plugins/opp.c b/plugins/opp.c
index ee4fecb..f93206d 100644
--- a/plugins/opp.c
+++ b/plugins/opp.c
@@ -165,8 +165,7 @@ failed:
 	return err;
 }
 
-static int opp_put(struct obex_session *os, obex_object_t *obj,
-						void *user_data)
+static int opp_put(struct obex_session *os, void *user_data)
 {
 	const char *name = obex_get_name(os);
 	const char *folder = obex_option_root_folder();
@@ -180,7 +179,7 @@ static int opp_put(struct obex_session *os, obex_object_t *obj,
 	return 0;
 }
 
-static int opp_get(struct obex_session *os, obex_object_t *obj, void *user_data)
+static int opp_get(struct obex_session *os, void *user_data)
 {
 	const char *type;
 
diff --git a/plugins/pbap.c b/plugins/pbap.c
index 2e607b3..7de1dff 100644
--- a/plugins/pbap.c
+++ b/plugins/pbap.c
@@ -625,8 +625,7 @@ static void *pbap_connect(struct obex_session *os, int *err)
 	return pbap;
 }
 
-static int pbap_get(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int pbap_get(struct obex_session *os, void *user_data)
 {
 	struct pbap_session *pbap = user_data;
 	const char *type = obex_get_type(os);
@@ -693,8 +692,7 @@ static int pbap_get(struct obex_session *os, obex_object_t *obj,
 	return ret;
 }
 
-static int pbap_setpath(struct obex_session *os, obex_object_t *obj,
-		void *user_data)
+static int pbap_setpath(struct obex_session *os, void *user_data)
 {
 	struct pbap_session *pbap = user_data;
 	const char *name;
diff --git a/plugins/pcsuite.c b/plugins/pcsuite.c
index 27a3496..cbb4ba0 100644
--- a/plugins/pcsuite.c
+++ b/plugins/pcsuite.c
@@ -180,14 +180,13 @@ fail:
 	return NULL;
 }
 
-static int pcsuite_get(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int pcsuite_get(struct obex_session *os, void *user_data)
 {
 	struct pcsuite_session *pcsuite = user_data;
 
 	DBG("%p", pcsuite);
 
-	return ftp_get(os, obj, pcsuite->ftp);
+	return ftp_get(os, pcsuite->ftp);
 }
 
 static int pcsuite_chkput(struct obex_session *os, void *user_data)
@@ -199,34 +198,31 @@ static int pcsuite_chkput(struct obex_session *os, void *user_data)
 	return ftp_chkput(os, pcsuite->ftp);
 }
 
-static int pcsuite_put(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int pcsuite_put(struct obex_session *os, void *user_data)
 {
 	struct pcsuite_session *pcsuite = user_data;
 
 	DBG("%p", pcsuite);
 
-	return ftp_put(os, obj, pcsuite->ftp);
+	return ftp_put(os, pcsuite->ftp);
 }
 
-static int pcsuite_setpath(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int pcsuite_setpath(struct obex_session *os, void *user_data)
 {
 	struct pcsuite_session *pcsuite = user_data;
 
 	DBG("%p", pcsuite);
 
-	return ftp_setpath(os, obj, pcsuite->ftp);
+	return ftp_setpath(os, pcsuite->ftp);
 }
 
-static int pcsuite_action(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int pcsuite_action(struct obex_session *os, void *user_data)
 {
 	struct pcsuite_session *pcsuite = user_data;
 
 	DBG("%p", pcsuite);
 
-	return ftp_action(os, obj, pcsuite->ftp);
+	return ftp_action(os, pcsuite->ftp);
 }
 
 static void pcsuite_disconnect(struct obex_session *os, void *user_data)
diff --git a/plugins/syncevolution.c b/plugins/syncevolution.c
index fcf6d2b..0a50a24 100644
--- a/plugins/syncevolution.c
+++ b/plugins/syncevolution.c
@@ -244,14 +244,12 @@ failed:
 	return NULL;
 }
 
-static int synce_put(struct obex_session *os, obex_object_t *obj,
-					void *user_data)
+static int synce_put(struct obex_session *os, void *user_data)
 {
 	return 0;
 }
 
-static int synce_get(struct obex_session *os, obex_object_t *obj,
-							void *user_data)
+static int synce_get(struct obex_session *os, void *user_data)
 {
 	return obex_get_stream_start(os, NULL);
 }
diff --git a/src/obex.c b/src/obex.c
index 3a06775..7d8d0e8 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -851,7 +851,7 @@ static void cmd_get(struct obex_session *os, obex_t *obex, obex_object_t *obj)
 		return;
 	}
 
-	err = os->service->get(os, obj, os->service_data);
+	err = os->service->get(os, os->service_data);
 
 	if (err < 0)
 		goto done;
@@ -933,7 +933,7 @@ static void cmd_setpath(struct obex_session *os,
 
 	os->nonhdr_len = OBEX_ObjectGetNonHdrData(obj, &os->nonhdr);
 
-	err = os->service->setpath(os, obj, os->service_data);
+	err = os->service->setpath(os, os->service_data);
 	os_set_response(obj, err);
 }
 
@@ -1132,7 +1132,7 @@ static void cmd_put(struct obex_session *os, obex_t *obex, obex_object_t *obj)
 		return;
 	}
 
-	err = os->service->put(os, obj, os->service_data);
+	err = os->service->put(os, os->service_data);
 	if (err < 0) {
 		os_set_response(obj, err);
 		return;
@@ -1240,7 +1240,7 @@ static void cmd_action(struct obex_session *os, obex_t *obex,
 		return;
 	}
 
-	err = os->service->action(os, obj, os->service_data);
+	err = os->service->action(os, os->service_data);
 	if (err < 0) {
 		os_set_response(obj, err);
 		return;
diff --git a/src/service.h b/src/service.h
index 68c4474..3dee7d7 100644
--- a/src/service.h
+++ b/src/service.h
@@ -33,15 +33,11 @@ struct obex_service_driver {
 	const char *record;
 	void *(*connect) (struct obex_session *os, int *err);
 	void (*progress) (struct obex_session *os, void *user_data);
-	int (*get) (struct obex_session *os, obex_object_t *obj,
-							void *user_data);
-	int (*put) (struct obex_session *os, obex_object_t *obj,
-			void *user_data);
+	int (*get) (struct obex_session *os, void *user_data);
+	int (*put) (struct obex_session *os, void *user_data);
 	int (*chkput) (struct obex_session *os, void *user_data);
-	int (*setpath) (struct obex_session *os, obex_object_t *obj,
-							void *user_data);
-	int (*action) (struct obex_session *os, obex_object_t *obj,
-							void *user_data);
+	int (*setpath) (struct obex_session *os, void *user_data);
+	int (*action) (struct obex_session *os, void *user_data);
 	void (*disconnect) (struct obex_session *os, void *user_data);
 	void (*reset) (struct obex_session *os, void *user_data);
 };
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 05/16] ftp: remove duplicated includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (2 preceding siblings ...)
  2011-11-15 13:27 ` [PATCH obexd 04/16] Remove use of obex_object_t from service.h Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 06/16] ftp: remove unnecessary openobex includes Luiz Augusto von Dentz
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/ftp.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/plugins/ftp.c b/plugins/ftp.c
index 2b5cc2e..9a82754 100644
--- a/plugins/ftp.c
+++ b/plugins/ftp.c
@@ -36,8 +36,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
-#include <string.h>
-#include <stdio.h>
 
 #include <glib.h>
 
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 06/16] ftp: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (3 preceding siblings ...)
  2011-11-15 13:27 ` [PATCH obexd 05/16] ftp: remove duplicated includes Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 07/16] opp: " Luiz Augusto von Dentz
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/ftp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/plugins/ftp.c b/plugins/ftp.c
index 9a82754..9b102d0 100644
--- a/plugins/ftp.c
+++ b/plugins/ftp.c
@@ -36,12 +36,10 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <glib.h>
 
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
-
 #include "obexd.h"
 #include "plugin.h"
 #include "log.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 07/16] opp: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (4 preceding siblings ...)
  2011-11-15 13:27 ` [PATCH obexd 06/16] ftp: remove unnecessary openobex includes Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:27 ` [PATCH obexd 08/16] bluetooth: " Luiz Augusto von Dentz
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/opp.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/opp.c b/plugins/opp.c
index f93206d..2375a21 100644
--- a/plugins/opp.c
+++ b/plugins/opp.c
@@ -28,9 +28,8 @@
 
 #include <errno.h>
 #include <string.h>
-
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
+#include <unistd.h>
+#include <inttypes.h>
 
 #include <glib.h>
 
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 08/16] bluetooth: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (5 preceding siblings ...)
  2011-11-15 13:27 ` [PATCH obexd 07/16] opp: " Luiz Augusto von Dentz
@ 2011-11-15 13:27 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 09/16] usb: " Luiz Augusto von Dentz
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:27 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/bluetooth.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 1a57654..c73beb6 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -28,9 +28,8 @@
 
 #include <errno.h>
 #include <string.h>
-
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
+#include <unistd.h>
+#include <inttypes.h>
 
 #include <glib.h>
 #include <gdbus.h>
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 09/16] usb: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (6 preceding siblings ...)
  2011-11-15 13:27 ` [PATCH obexd 08/16] bluetooth: " Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 10/16] filesystem: " Luiz Augusto von Dentz
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/usb.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/plugins/usb.c b/plugins/usb.c
index 12fb30c..3da77d0 100644
--- a/plugins/usb.c
+++ b/plugins/usb.c
@@ -34,9 +34,7 @@
 #include <signal.h>
 #include <fcntl.h>
 #include <termios.h>
-
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
+#include <inttypes.h>
 
 #include <glib.h>
 #include <gdbus.h>
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 10/16] filesystem: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (7 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 09/16] usb: " Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 11/16] irmc: " Luiz Augusto von Dentz
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/filesystem.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/plugins/filesystem.c b/plugins/filesystem.c
index 12ca209..68785c6 100644
--- a/plugins/filesystem.c
+++ b/plugins/filesystem.c
@@ -39,12 +39,10 @@
 #include <sys/sendfile.h>
 #include <fcntl.h>
 #include <wait.h>
+#include <inttypes.h>
 
 #include <glib.h>
 
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
-
 #include "obexd.h"
 #include "plugin.h"
 #include "log.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 11/16] irmc: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (8 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 10/16] filesystem: " Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 12/16] mas: " Luiz Augusto von Dentz
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/irmc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/plugins/irmc.c b/plugins/irmc.c
index 2a198c8..6f28e51 100644
--- a/plugins/irmc.c
+++ b/plugins/irmc.c
@@ -34,9 +34,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
+#include <inttypes.h>
 
 #include "obexd.h"
 #include "plugin.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 12/16] mas: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (9 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 11/16] irmc: " Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 13/16] pcsuite: remove duplicated includes Luiz Augusto von Dentz
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/mas.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/mas.c b/plugins/mas.c
index b104d8f..3c3104c 100644
--- a/plugins/mas.c
+++ b/plugins/mas.c
@@ -27,8 +27,8 @@
 
 #include <errno.h>
 #include <glib.h>
-#include <openobex/obex.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
 #include "obexd.h"
 #include "plugin.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 13/16] pcsuite: remove duplicated includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (10 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 12/16] mas: " Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 14/16] pcsuite: remove unnecessary openobex includes Luiz Augusto von Dentz
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/pcsuite.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/plugins/pcsuite.c b/plugins/pcsuite.c
index cbb4ba0..f321207 100644
--- a/plugins/pcsuite.c
+++ b/plugins/pcsuite.c
@@ -36,8 +36,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
-#include <string.h>
-#include <stdio.h>
 
 #include <glib.h>
 #include "gdbus.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 14/16] pcsuite: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (11 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 13/16] pcsuite: remove duplicated includes Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 15/16] syncevolution: " Luiz Augusto von Dentz
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/pcsuite.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/plugins/pcsuite.c b/plugins/pcsuite.c
index f321207..f3d0b1a 100644
--- a/plugins/pcsuite.c
+++ b/plugins/pcsuite.c
@@ -36,13 +36,11 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <glib.h>
 #include "gdbus.h"
 
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
-
 #include "obexd.h"
 #include "plugin.h"
 #include "log.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 15/16] syncevolution: remove unnecessary openobex includes
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (12 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 14/16] pcsuite: remove unnecessary openobex includes Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-15 13:28 ` [PATCH obexd 16/16] pbap: remove dependency on openobex Luiz Augusto von Dentz
  2011-11-16 13:41 ` [PATCH obexd 01/16] Remove unused function obex_aparam_write Johan Hedberg
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/syncevolution.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/plugins/syncevolution.c b/plugins/syncevolution.c
index 0a50a24..41386b3 100644
--- a/plugins/syncevolution.c
+++ b/plugins/syncevolution.c
@@ -34,9 +34,6 @@
 
 #include <bluetooth/bluetooth.h>
 
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
-
 #include "plugin.h"
 #include "obex.h"
 #include "service.h"
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH obexd 16/16] pbap: remove dependency on openobex
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (13 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 15/16] syncevolution: " Luiz Augusto von Dentz
@ 2011-11-15 13:28 ` Luiz Augusto von Dentz
  2011-11-16 13:41 ` [PATCH obexd 01/16] Remove unused function obex_aparam_write Johan Hedberg
  15 siblings, 0 replies; 17+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15 13:28 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 plugins/pbap.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/pbap.c b/plugins/pbap.c
index 7de1dff..0f07c46 100644
--- a/plugins/pbap.c
+++ b/plugins/pbap.c
@@ -36,9 +36,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
-#include <openobex/obex.h>
-#include <openobex/obex_const.h>
+#include <gobex.h>
 
 #include "obexd.h"
 #include "plugin.h"
@@ -976,7 +976,7 @@ static ssize_t vobject_pull_get_next_header(void *object, void *buf, size_t mtu,
 	if (!obj->buffer && !obj->aparams)
 		return -EAGAIN;
 
-	*hi = OBEX_HDR_APPARAM;
+	*hi = G_OBEX_HDR_APPARAM;
 
 	if (pbap->params->maxlistcount == 0 || obj->firstpacket) {
 		obj->firstpacket = FALSE;
@@ -1028,7 +1028,7 @@ static ssize_t vobject_list_get_next_header(void *object, void *buf, size_t mtu,
 	if (!pbap->cache.valid)
 		return -EAGAIN;
 
-	*hi = OBEX_HDR_APPARAM;
+	*hi = G_OBEX_HDR_APPARAM;
 
 	if (pbap->params->maxlistcount == 0)
 		return array_read(obj->aparams, buf, mtu);
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH obexd 01/16] Remove unused function obex_aparam_write
  2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
                   ` (14 preceding siblings ...)
  2011-11-15 13:28 ` [PATCH obexd 16/16] pbap: remove dependency on openobex Luiz Augusto von Dentz
@ 2011-11-16 13:41 ` Johan Hedberg
  15 siblings, 0 replies; 17+ messages in thread
From: Johan Hedberg @ 2011-11-16 13:41 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Tue, Nov 15, 2011, Luiz Augusto von Dentz wrote:
> ---
>  src/obex.c |   11 -----------
>  src/obex.h |    2 --
>  2 files changed, 0 insertions(+), 13 deletions(-)

All patches in this set have been applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-11-16 13:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 13:27 [PATCH obexd 01/16] Remove unused function obex_aparam_write Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 02/16] Remove use of obex_object_t on obex.h Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 03/16] Introduce obex_get_non_header_data Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 04/16] Remove use of obex_object_t from service.h Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 05/16] ftp: remove duplicated includes Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 06/16] ftp: remove unnecessary openobex includes Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 07/16] opp: " Luiz Augusto von Dentz
2011-11-15 13:27 ` [PATCH obexd 08/16] bluetooth: " Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 09/16] usb: " Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 10/16] filesystem: " Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 11/16] irmc: " Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 12/16] mas: " Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 13/16] pcsuite: remove duplicated includes Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 14/16] pcsuite: remove unnecessary openobex includes Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 15/16] syncevolution: " Luiz Augusto von Dentz
2011-11-15 13:28 ` [PATCH obexd 16/16] pbap: remove dependency on openobex Luiz Augusto von Dentz
2011-11-16 13:41 ` [PATCH obexd 01/16] Remove unused function obex_aparam_write Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).