Diff between ebc3e654376f8d3b77a359b41e9140249aba1ab4 and 9a885b6bc35005e4eccf089521f4245097946083

Changed Files

File Additions Deletions Status
obexd/plugins/filesystem.c +3 -3 modified
obexd/plugins/ftp.c +9 -9 modified
obexd/plugins/opp.c +7 -7 modified
obexd/plugins/pbap.c +9 -7 modified
obexd/plugins/syncevolution.c +6 -6 modified
obexd/src/dbus.h +8 -8 modified
obexd/src/manager.c +9 -8 modified
obexd/src/mimetype.h +1 -1 modified
obexd/src/obex-priv.h +47 -0 added
obexd/src/obex.c +15 -14 modified
obexd/src/obex.h +15 -40 modified
obexd/src/service.h +8 -8 modified

Full Patch

diff --git a/obexd/plugins/filesystem.c b/obexd/plugins/filesystem.c
index 9775bcb..621bbac 100644
--- a/obexd/plugins/filesystem.c
+++ b/obexd/plugins/filesystem.c
@@ -124,7 +124,7 @@ static gchar *file_stat_line(gchar *filename, struct stat *fstat,
 }
 
 static gpointer filesystem_open(const char *name, int oflag, mode_t mode,
-		size_t *size, struct OBEX_session *os, int *err)
+		size_t *size, struct obex_session *os, int *err)
 {
 	struct stat stats;
 	struct statvfs buf;
@@ -247,7 +247,7 @@ static int capability_exec(const char **argv, int *output, int *err)
 }
 
 static gpointer capability_open(const char *name, int oflag, mode_t mode,
-		size_t *size, struct OBEX_session *os, int *err)
+		size_t *size, struct obex_session *os, int *err)
 {
 	struct capability_object *object = NULL;
 	gchar *buf;
@@ -307,7 +307,7 @@ fail:
 }
 
 static gpointer folder_open(const char *name, int oflag, mode_t mode,
-		size_t *size, struct OBEX_session *os, int *err)
+		size_t *size, struct obex_session *os, int *err)
 {
 	struct stat fstat, dstat;
 	struct dirent *ep;
diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c
index 21c369d..ccba5f2 100644
--- a/obexd/plugins/ftp.c
+++ b/obexd/plugins/ftp.c
@@ -144,7 +144,7 @@ static const guint8 FTP_TARGET[TARGET_SIZE] = {
 static const guint8 PCSUITE_WHO[PCSUITE_WHO_SIZE] = {
 			'P','C',' ','S','u','i','t','e' };
 
-static gint get_by_type(struct OBEX_session *os, const gchar *type)
+static gint get_by_type(struct obex_session *os, const gchar *type)
 {
 	const char *folder = obex_get_folder(os);
 	const char *capability = obex_get_capability_path(os);
@@ -161,7 +161,7 @@ static gint get_by_type(struct OBEX_session *os, const gchar *type)
 	return -ENOENT;
 }
 
-static gint ftp_prepare_get(struct OBEX_session *os, gchar *file)
+static gint ftp_prepare_get(struct obex_session *os, gchar *file)
 {
 	const char *root_folder = obex_get_root_folder(os);
 	const char *folder = obex_get_folder(os);
@@ -186,14 +186,14 @@ static gint ftp_prepare_get(struct OBEX_session *os, gchar *file)
 	return obex_stream_start(os, file);
 }
 
-static int ftp_connect(struct OBEX_session *os)
+static int ftp_connect(struct obex_session *os)
 {
 	manager_register_session(os);
 
 	return 0;
 }
 
-static int ftp_get(struct OBEX_session *os, obex_object_t *obj)
+static int ftp_get(struct obex_session *os, obex_object_t *obj)
 {
 	const char *folder = obex_get_folder(os);
 	const char *type = obex_get_type(os);
@@ -227,7 +227,7 @@ fail:
 	return err;
 }
 
-static gint ftp_delete(struct OBEX_session *os)
+static gint ftp_delete(struct obex_session *os)
 {
 	const char *name = obex_get_name(os);
 	const char *folder = obex_get_folder(os);
@@ -247,7 +247,7 @@ static gint ftp_delete(struct OBEX_session *os)
 	return ret;
 }
 
-static gint ftp_chkput(struct OBEX_session *os)
+static gint ftp_chkput(struct obex_session *os)
 {
 
 	if (obex_get_size(os) == OBJECT_SIZE_DELETE)
@@ -256,7 +256,7 @@ static gint ftp_chkput(struct OBEX_session *os)
 	return obex_prepare_put(os);
 }
 
-static int ftp_put(struct OBEX_session *os)
+static int ftp_put(struct obex_session *os)
 {
 	const char *folder = obex_get_folder(os);
 	const char *name = obex_get_name(os);
@@ -274,7 +274,7 @@ static int ftp_put(struct OBEX_session *os)
 	return 0;
 }
 
-static int ftp_setpath(struct OBEX_session *os, obex_object_t *obj)
+static int ftp_setpath(struct obex_session *os, obex_object_t *obj)
 {
 	const gchar *root_folder, *current_folder, *name;
 	guint8 *nonhdr;
@@ -372,7 +372,7 @@ done:
 	return err;
 }
 
-static void ftp_disconnect(struct OBEX_session *os)
+static void ftp_disconnect(struct obex_session *os)
 {
 	manager_unregister_session(os);
 }
diff --git a/obexd/plugins/opp.c b/obexd/plugins/opp.c
index c7ddf80..60ef1a2 100644
--- a/obexd/plugins/opp.c
+++ b/obexd/plugins/opp.c
@@ -93,19 +93,19 @@
   </attribute>									\
 </record>"
 
-static int opp_connect(struct OBEX_session *os)
+static int opp_connect(struct obex_session *os)
 {
 	manager_register_transfer(os);
 
 	return 0;
 }
 
-static void opp_progress(struct OBEX_session *os)
+static void opp_progress(struct obex_session *os)
 {
 	manager_emit_transfer_progress(os);
 }
 
-static gint opp_chkput(struct OBEX_session *os)
+static gint opp_chkput(struct obex_session *os)
 {
 	gchar *new_folder, *new_name;
 	gint32 time;
@@ -137,7 +137,7 @@ skip_auth:
 	return obex_prepare_put(os);
 }
 
-static int opp_put(struct OBEX_session *os)
+static int opp_put(struct obex_session *os)
 {
 	const char *name = obex_get_name(os);
 	const char *folder = obex_get_folder(os);
@@ -151,7 +151,7 @@ static int opp_put(struct OBEX_session *os)
 	return 0;
 }
 
-static int opp_get(struct OBEX_session *os, obex_object_t *obj)
+static int opp_get(struct obex_session *os, obex_object_t *obj)
 {
 	const char *type;
 
@@ -173,12 +173,12 @@ static int opp_get(struct OBEX_session *os, obex_object_t *obj)
 	return 0;
 }
 
-static void opp_disconnect(struct OBEX_session *os)
+static void opp_disconnect(struct obex_session *os)
 {
 	manager_unregister_transfer(os);
 }
 
-static void opp_reset(struct OBEX_session *os)
+static void opp_reset(struct obex_session *os)
 {
 	manager_emit_transfer_completed(os);
 }
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 79ee4a8..1866854 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -132,24 +132,26 @@ struct apparam_hdr {
 	uint8_t		val[0];
 } __attribute__ ((packed));
 
+struct obex_session;
+
 struct phonebook_query {
 	const char *type;
 	GString *buffer;
-	struct OBEX_session *os;
+	struct obex_session *os;
 };
 
 static const guint8 PBAP_TARGET[TARGET_SIZE] = {
 			0x79, 0x61, 0x35, 0xF0,  0xF0, 0xC5, 0x11, 0xD8,
 			0x09, 0x66, 0x08, 0x00,  0x20, 0x0C, 0x9A, 0x66  };
 
-static int pbap_connect(struct OBEX_session *os)
+static int pbap_connect(struct obex_session *os)
 {
 	manager_register_session(os);
 
 	return 0;
 }
 
-static int pbap_get(struct OBEX_session *os, obex_object_t *obj)
+static int pbap_get(struct obex_session *os, obex_object_t *obj)
 {
 	const gchar *type = obex_get_type(os);
 	const gchar *folder = obex_get_folder(os);
@@ -185,7 +187,7 @@ static int pbap_get(struct OBEX_session *os, obex_object_t *obj)
 }
 
 
-static int pbap_setpath(struct OBEX_session *os, obex_object_t *obj)
+static int pbap_setpath(struct obex_session *os, obex_object_t *obj)
 {
 	const gchar *current_folder, *name;
 	guint8 *nonhdr;
@@ -220,12 +222,12 @@ static int pbap_setpath(struct OBEX_session *os, obex_object_t *obj)
 	return 0;
 }
 
-static void pbap_disconnect(struct OBEX_session *os)
+static void pbap_disconnect(struct obex_session *os)
 {
 	manager_unregister_session(os);
 }
 
-static gint pbap_chkput(struct OBEX_session *os)
+static gint pbap_chkput(struct obex_session *os)
 {
 	/* Rejects all PUTs */
 	return -EINVAL;
@@ -259,7 +261,7 @@ static void query_result(const gchar *buffer, size_t bufsize,
 }
 
 static gpointer vobject_open(const char *name, int oflag, mode_t mode,
-		size_t *size, struct OBEX_session *os, int *err)
+		size_t *size, struct obex_session *os, int *err)
 {
 	const gchar *type = obex_get_type(os);
 	struct phonebook_query *query;
diff --git a/obexd/plugins/syncevolution.c b/obexd/plugins/syncevolution.c
index fa4b686..c255ebf 100644
--- a/obexd/plugins/syncevolution.c
+++ b/obexd/plugins/syncevolution.c
@@ -213,19 +213,19 @@ done:
 	dbus_message_unref(reply);
 }
 
-static int synce_connect(struct OBEX_session *os)
+static int synce_connect(struct obex_session *os)
 {
 	manager_register_session(os);
 
 	return 0;
 }
 
-static int synce_put(struct OBEX_session *os)
+static int synce_put(struct obex_session *os)
 {
 	return 0;
 }
 
-static int synce_get(struct OBEX_session *os, obex_object_t *obj)
+static int synce_get(struct obex_session *os, obex_object_t *obj)
 {
 	return 0;
 }
@@ -246,13 +246,13 @@ static void close_cb(DBusPendingCall *call, void *user_data)
 	dbus_message_unref(reply);
 }
 
-static void synce_disconnect(struct OBEX_session *os)
+static void synce_disconnect(struct obex_session *os)
 {
 
 }
 
 static gpointer synce_open(const char *name, int oflag, mode_t mode,
-		size_t *size, struct OBEX_session *os, int *err)
+		size_t *size, struct obex_session *os, int *err)
 {
 	DBusConnection *conn;
 	struct synce_context *context;
@@ -322,7 +322,7 @@ done:
 static ssize_t synce_read(gpointer object, void *buf, size_t count)
 {
 	struct synce_context *context = object;
-	struct OBEX_session *os = context->os;
+	struct obex_session *os = context->os;
 	DBusConnection *conn;
 	gchar *id, transport[36], transport_description[24];
 	const char *session;
diff --git a/obexd/src/dbus.h b/obexd/src/dbus.h
index 288ef33..a183957 100644
--- a/obexd/src/dbus.h
+++ b/obexd/src/dbus.h
@@ -37,14 +37,14 @@ void register_record(struct server *server, gpointer user_data);
 gint request_service_authorization(struct server *server, GIOChannel *io,
 					const char *address);
 
-void manager_register_session(struct OBEX_session *os);
-void manager_unregister_session(struct OBEX_session *os);
-void manager_register_transfer(struct OBEX_session *os);
-void manager_unregister_transfer(struct OBEX_session *os);
-void manager_emit_transfer_started(struct OBEX_session *os);
-void manager_emit_transfer_progress(struct OBEX_session *os);
-void manager_emit_transfer_completed(struct OBEX_session *os);
-int manager_request_authorization(struct OBEX_session *os, gint32 time,
+void manager_register_session(struct obex_session *os);
+void manager_unregister_session(struct obex_session *os);
+void manager_register_transfer(struct obex_session *os);
+void manager_unregister_transfer(struct obex_session *os);
+void manager_emit_transfer_started(struct obex_session *os);
+void manager_emit_transfer_progress(struct obex_session *os);
+void manager_emit_transfer_completed(struct obex_session *os);
+int manager_request_authorization(struct obex_session *os, gint32 time,
 		gchar **new_folder, gchar **new_name);
 
 DBusConnection *obex_dbus_get_connection(void);
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index f8c0c98..a4e2fc6 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
@@ -44,6 +44,7 @@
 #include "logging.h"
 #include "btio.h"
 #include "service.h"
+#include "obex-priv.h"
 
 #define TRANSFER_INTERFACE OPENOBEX_SERVICE ".Transfer"
 #define SESSION_INTERFACE OPENOBEX_SERVICE ".Session"
@@ -580,7 +581,7 @@ void manager_cleanup(void)
 	dbus_connection_unref(connection);
 }
 
-void manager_emit_transfer_started(struct OBEX_session *os)
+void manager_emit_transfer_started(struct obex_session *os)
 {
 	gchar *path = g_strdup_printf("/transfer%u", os->cid);
 
@@ -618,7 +619,7 @@ void emit_transfer_progress(guint32 id, guint32 total, guint32 transfered)
 	g_free(path);
 }
 
-void manager_register_transfer(struct OBEX_session *os)
+void manager_register_transfer(struct obex_session *os)
 {
 	gchar *path = g_strdup_printf("/transfer%u", os->cid);
 
@@ -634,7 +635,7 @@ void manager_register_transfer(struct OBEX_session *os)
 	g_free(path);
 }
 
-void manager_unregister_transfer(struct OBEX_session *os)
+void manager_unregister_transfer(struct obex_session *os)
 {
 	gchar *path = g_strdup_printf("/transfer%u", os->cid);
 
@@ -712,7 +713,7 @@ static gboolean auth_error(GIOChannel *io, GIOCondition cond,
 	return FALSE;
 }
 
-int manager_request_authorization(struct OBEX_session *os, gint32 time,
+int manager_request_authorization(struct obex_session *os, gint32 time,
 		gchar **new_folder, gchar **new_name)
 {
 	DBusMessage *msg;
@@ -974,7 +975,7 @@ gint request_service_authorization(struct server *server, GIOChannel *io,
 	return 0;
 }
 
-void manager_register_session(struct OBEX_session *os)
+void manager_register_session(struct obex_session *os)
 {
 	gchar *path = g_strdup_printf("/session%u", os->cid);
 
@@ -995,7 +996,7 @@ void manager_register_session(struct OBEX_session *os)
 	g_free(path);
 }
 
-void manager_unregister_session(struct OBEX_session *os)
+void manager_unregister_session(struct obex_session *os)
 {
 	gchar *path = g_strdup_printf("/session%u", os->cid);
 
@@ -1010,12 +1011,12 @@ void manager_unregister_session(struct OBEX_session *os)
 	g_free(path);
 }
 
-void manager_emit_transfer_progress(struct OBEX_session *os)
+void manager_emit_transfer_progress(struct obex_session *os)
 {
 	emit_transfer_progress(os->cid, os->size, os->offset);
 }
 
-void manager_emit_transfer_completed(struct OBEX_session *os)
+void manager_emit_transfer_completed(struct obex_session *os)
 {
 	emit_transfer_completed(os->cid, !os->aborted);
 }
diff --git a/obexd/src/mimetype.h b/obexd/src/mimetype.h
index 8cecc94..a089ce8 100644
--- a/obexd/src/mimetype.h
+++ b/obexd/src/mimetype.h
@@ -30,7 +30,7 @@ struct obex_mime_type_driver {
 	const guint8 *target;
 	const char *mimetype;
 	gpointer (*open) (const char *name, int oflag, mode_t mode,
-			size_t *size, struct OBEX_session *os, int *err);
+			size_t *size, struct obex_session *os, int *err);
 	int (*close) (gpointer object);
 	ssize_t (*read) (gpointer object, void *buf, size_t count);
 	ssize_t (*write) (gpointer object, const void *buf, size_t count);
diff --git a/obexd/src/obex-priv.h b/obexd/src/obex-priv.h
new file mode 100644
index 0000000..dce3d4c
--- /dev/null
+++ b/obexd/src/obex-priv.h
@@ -0,0 +1,47 @@
+/*
+ *
+ *  OBEX Server
+ *
+ *  Copyright (C) 2007-2010  Nokia Corporation
+ *  Copyright (C) 2007-2010  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+struct obex_session {
+	GIOChannel	*io;
+	guint32		cid;
+	guint16		tx_mtu;
+	guint16		rx_mtu;
+	guint8		cmd;
+	gchar		*name;
+	gchar		*type;
+	time_t		time;
+	gchar		*current_folder;
+	guint8		*buf;
+	gint32		offset;
+	gint32		size;
+	gpointer	object;
+	gboolean	aborted;
+	struct obex_service_driver *service;
+	struct server *server;
+	gboolean	checked;
+	obex_t		*obex;
+	obex_object_t	*obj;
+	struct obex_mime_type_driver *driver;
+	gboolean	finished;
+};
diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index f039476..a774d88 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
@@ -49,6 +49,7 @@
 #include "mimetype.h"
 #include "service.h"
 #include "btio.h"
+#include "obex-priv.h"
 
 /* Default MTU's */
 #define DEFAULT_RX_MTU 32767
@@ -460,7 +461,7 @@ static void cmd_setpath(struct obex_session *os,
 	os_set_response(obj, err);
 }
 
-int obex_stream_start(struct OBEX_session *os, const gchar *filename)
+int obex_stream_start(struct obex_session *os, const gchar *filename)
 {
 	gint err;
 	gpointer object;
@@ -1114,66 +1115,66 @@ gint obex_tty_session_stop(void)
 	return 0;
 }
 
-const char *obex_get_name(struct OBEX_session *os)
+const char *obex_get_name(struct obex_session *os)
 {
 	return os->name;
 }
 
-void obex_set_name(struct OBEX_session *os, const gchar *name)
+void obex_set_name(struct obex_session *os, const gchar *name)
 {
 	g_free(os->name);
 
 	os->name = (name ? g_strdup(name) : NULL);
 }
 
-ssize_t obex_get_size(struct OBEX_session *os)
+ssize_t obex_get_size(struct obex_session *os)
 {
 	return os->size;
 }
 
-const char *obex_get_type(struct OBEX_session *os)
+const char *obex_get_type(struct obex_session *os)
 {
 	return os->type;
 }
 
-const char *obex_get_folder(struct OBEX_session *os)
+const char *obex_get_folder(struct obex_session *os)
 {
 	return os->current_folder;
 }
 
-void obex_set_folder(struct OBEX_session *os, const gchar *folder)
+void obex_set_folder(struct obex_session *os, const gchar *folder)
 {
 	g_free(os->current_folder);
 
 	os->current_folder = (folder ? g_strdup(folder) : NULL);
 }
 
-const char *obex_get_root_folder(struct OBEX_session *os)
+const char *obex_get_root_folder(struct obex_session *os)
 {
 	return os->server->folder;
 }
 
-guint16 obex_get_service(struct OBEX_session *os)
+guint16 obex_get_service(struct obex_session *os)
 {
 	return os->service->service;
 }
 
-gboolean obex_get_symlinks(struct OBEX_session *os)
+gboolean obex_get_symlinks(struct obex_session *os)
 {
 	return os->server->symlinks;
 }
 
-const char *obex_get_capability_path(struct OBEX_session *os)
+const char *obex_get_capability_path(struct obex_session *os)
 {
 	return os->server->capability;
 }
 
-gboolean obex_get_auto_accept(struct OBEX_session *os)
+gboolean obex_get_auto_accept(struct obex_session *os)
 {
 	return os->server->auto_accept;
 }
 
-int obex_remove(struct OBEX_session *os, const char *path)
+int obex_remove(struct obex_session *os, const char *path)
 {
 	if (os->driver == NULL)
 		return -EINVAL;
@@ -1182,7 +1183,7 @@ int obex_remove(struct OBEX_session *os, const char *path)
 }
 
 /* TODO: find a way to do this for tty or fix syncevolution */
-char *obex_get_id(struct OBEX_session *os)
+char *obex_get_id(struct obex_session *os)
 {
 	GError *gerr = NULL;
 	gchar address[18];
diff --git a/obexd/src/obex.h b/obexd/src/obex.h
index 62498f5..69b5dfe 100644
--- a/obexd/src/obex.h
+++ b/obexd/src/obex.h
@@ -58,51 +58,26 @@ struct server {
 	GSList		*drivers;
 };
 
-struct obex_session {
-	GIOChannel	*io;
-	guint32		cid;
-	guint16		tx_mtu;
-	guint16		rx_mtu;
-	guint8		cmd;
-	gchar		*name;
-	gchar		*type;
-	time_t		time;
-	gchar		*current_folder;
-	guint8		*buf;
-	gint32		offset;
-	gint32		size;
-	gpointer	object;
-	gboolean	aborted;
-	struct obex_service_driver *service;
-	struct server *server;
-	gboolean	checked;
-	obex_t		*obex;
-	obex_object_t	*obj;
-	struct obex_mime_type_driver *driver;
-	gboolean	finished;
-};
-
-/* FIXME: first step to obsfuscate */
-#define OBEX_session obex_session
+struct obex_session;
 
 void obex_connect_cb(GIOChannel *io, GError *err, gpointer user_data);
 
 gint obex_session_start(GIOChannel *io, struct server *server);
-int obex_stream_start(struct OBEX_session *os, const gchar *filename);
+int obex_stream_start(struct obex_session *os, const gchar *filename);
 gint obex_prepare_put(struct obex_session *os);
-const char *obex_get_name(struct OBEX_session *os);
-void obex_set_name(struct OBEX_session *os, const gchar *name);
-ssize_t obex_get_size(struct OBEX_session *os);
-const char *obex_get_type(struct OBEX_session *os);
-const char *obex_get_folder(struct OBEX_session *os);
-void obex_set_folder(struct OBEX_session *os, const char *folder);
-const char *obex_get_root_folder(struct OBEX_session *os);
-guint16 obex_get_service(struct OBEX_session *os);
-gboolean obex_get_symlinks(struct OBEX_session *os);
-const char *obex_get_capability_path(struct OBEX_session *os);
-gboolean obex_get_auto_accept(struct OBEX_session *os);
-int obex_remove(struct OBEX_session *os, const char *path);
-char *obex_get_id(struct OBEX_session *os);
+const char *obex_get_name(struct obex_session *os);
+void obex_set_name(struct obex_session *os, const gchar *name);
+ssize_t obex_get_size(struct obex_session *os);
+const char *obex_get_type(struct obex_session *os);
+const char *obex_get_folder(struct obex_session *os);
+void obex_set_folder(struct obex_session *os, const char *folder);
+const char *obex_get_root_folder(struct obex_session *os);
+guint16 obex_get_service(struct obex_session *os);
+gboolean obex_get_symlinks(struct obex_session *os);
+const char *obex_get_capability_path(struct obex_session *os);
+gboolean obex_get_auto_accept(struct obex_session *os);
+int obex_remove(struct obex_session *os, const char *path);
+char *obex_get_id(struct obex_session *os);
 
 void server_free(struct server *server);
 int tty_init(gint service, const gchar *folder, const gchar *capability,
diff --git a/obexd/src/service.h b/obexd/src/service.h
index 6080d1c..615f359 100644
--- a/obexd/src/service.h
+++ b/obexd/src/service.h
@@ -30,14 +30,14 @@ struct obex_service_driver {
 	const guint8 *who;
 	guint who_size;
 	const gchar *record;
-	int (*connect) (struct OBEX_session *os);
-	void (*progress) (struct OBEX_session *os);
-	int (*get) (struct OBEX_session *os, obex_object_t *obj);
-	int (*put) (struct OBEX_session *os);
-	gint (*chkput) (struct OBEX_session *os);
-	int (*setpath) (struct OBEX_session *os, obex_object_t *obj);
-	void (*disconnect) (struct OBEX_session *os);
-	void (*reset) (struct OBEX_session *os);
+	int (*connect) (struct obex_session *os);
+	void (*progress) (struct obex_session *os);
+	int (*get) (struct obex_session *os, obex_object_t *obj);
+	int (*put) (struct obex_session *os);
+	gint (*chkput) (struct obex_session *os);
+	int (*setpath) (struct obex_session *os, obex_object_t *obj);
+	void (*disconnect) (struct obex_session *os);
+	void (*reset) (struct obex_session *os);
 };
 
 int obex_service_driver_register(struct obex_service_driver *driver);