From ddb69649e8d0d665366bfb468af317de0363182c Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 11 Jul 2011 17:17:48 +0300 Subject: [PATCH] gobex: Merge gobex-transfer.h into gobex.h --- gobex/gobex-transfer.c | 1 - gobex/gobex-transfer.h | 49 -------------------------------------- gobex/gobex.h | 22 +++++++++++++++++ tools/obex-client-tool.c | 1 - tools/obex-server-tool.c | 1 - unit/test-gobex-transfer.c | 1 - 6 files changed, 22 insertions(+), 53 deletions(-) delete mode 100644 gobex/gobex-transfer.h diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c index bd69812a7..533956e8d 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -22,7 +22,6 @@ #include #include "gobex.h" -#include "gobex-transfer.h" static GSList *transfers = NULL; diff --git a/gobex/gobex-transfer.h b/gobex/gobex-transfer.h deleted file mode 100644 index 29385abfa..000000000 --- a/gobex/gobex-transfer.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * OBEX library with GLib integration - * - * Copyright (C) 2011 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * 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 - * - */ - -#ifndef __GOBEX_TRANSFER_H -#define __GOBEX_TRANSFER_H - -#include - -#include -#include - -guint g_obex_put_req(GObex *obex, GObexDataProducer data_func, - GObexFunc complete_func, gpointer user_data, - GError **err, guint8 first_hdr_id, ...); - -guint g_obex_get_req(GObex *obex, GObexDataConsumer data_func, - GObexFunc complete_func, gpointer user_data, - GError **err, guint8 first_hdr_id, ...); - -guint g_obex_put_rsp(GObex *obex, GObexPacket *req, - GObexDataConsumer data_func, GObexFunc complete_func, - gpointer user_data, GError **err, - guint8 first_hdr_id, ...); - -guint g_obex_get_rsp(GObex *obex, GObexDataProducer data_func, - GObexFunc complete_func, gpointer user_data, - GError **err, guint8 first_hdr_id, ...); - -gboolean g_obex_cancel_transfer(guint id); - -#endif /* __GOBEX_TRANSFER_H_ */ diff --git a/gobex/gobex.h b/gobex/gobex.h index dfcd66f0c..7c2d4b799 100644 --- a/gobex/gobex.h +++ b/gobex/gobex.h @@ -25,6 +25,7 @@ #include #include +#include #include typedef enum { @@ -80,4 +81,25 @@ guint g_obex_mkdir(GObex *obex, const char *path, GObexResponseFunc func, guint g_obex_delete(GObex *obex, const char *name, GObexResponseFunc func, gpointer user_data, GError **err); +/* Transfer related high-level functions */ + +guint g_obex_put_req(GObex *obex, GObexDataProducer data_func, + GObexFunc complete_func, gpointer user_data, + GError **err, guint8 first_hdr_id, ...); + +guint g_obex_get_req(GObex *obex, GObexDataConsumer data_func, + GObexFunc complete_func, gpointer user_data, + GError **err, guint8 first_hdr_id, ...); + +guint g_obex_put_rsp(GObex *obex, GObexPacket *req, + GObexDataConsumer data_func, GObexFunc complete_func, + gpointer user_data, GError **err, + guint8 first_hdr_id, ...); + +guint g_obex_get_rsp(GObex *obex, GObexDataProducer data_func, + GObexFunc complete_func, gpointer user_data, + GError **err, guint8 first_hdr_id, ...); + +gboolean g_obex_cancel_transfer(guint id); + #endif /* __GOBEX_H */ diff --git a/tools/obex-client-tool.c b/tools/obex-client-tool.c index 387c51182..ec6d1c264 100644 --- a/tools/obex-client-tool.c +++ b/tools/obex-client-tool.c @@ -33,7 +33,6 @@ #include #include -#include static GMainLoop *main_loop = NULL; static GObex *obex = NULL; diff --git a/tools/obex-server-tool.c b/tools/obex-server-tool.c index 18f6734e9..a4cf32780 100644 --- a/tools/obex-server-tool.c +++ b/tools/obex-server-tool.c @@ -29,7 +29,6 @@ #include #include -#include static GMainLoop *main_loop = NULL; diff --git a/unit/test-gobex-transfer.c b/unit/test-gobex-transfer.c index 89ea1c5c4..40ce85d07 100644 --- a/unit/test-gobex-transfer.c +++ b/unit/test-gobex-transfer.c @@ -28,7 +28,6 @@ #include #include -#include #include "util.h" -- 2.47.3