diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2011-07-05 19:36:41 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-04 22:21:59 +0100 |
commit | b50f20a501bc0563a66a674bca9dba665aff4202 (patch) | |
tree | 7d9eb31a4c0d96108d2ea5d06f8cf106d2a8a0b9 /gobex/gobex-packet.c | |
parent | 0a4824ddb1c8724a7032935c1e23d726666ac145 (diff) | |
download | bluez-b50f20a501bc0563a66a674bca9dba665aff4202.tar.gz |
gobex: Use GObexDataProducer type instead of (custom) GObexPacketDataFunc
Diffstat (limited to 'gobex/gobex-packet.c')
-rw-r--r-- | gobex/gobex-packet.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c index 6051fc4c8..b3165530f 100644 --- a/gobex/gobex-packet.c +++ b/gobex/gobex-packet.c @@ -22,6 +22,7 @@ #include <string.h> #include <errno.h> +#include "gobex-defs.h" #include "gobex-packet.h" #define FINAL_BIT 0x80 @@ -41,7 +42,7 @@ struct _GObexPacket { gsize hlen; /* Length of all encoded headers */ GSList *headers; - GObexPacketDataFunc get_body; + GObexDataProducer get_body; gpointer get_body_data; }; @@ -97,7 +98,7 @@ gboolean g_obex_packet_add_header(GObexPacket *pkt, GObexHeader *header) return TRUE; } -gboolean g_obex_packet_add_body(GObexPacket *pkt, GObexPacketDataFunc func, +gboolean g_obex_packet_add_body(GObexPacket *pkt, GObexDataProducer func, gpointer user_data) { if (pkt->get_body != NULL) @@ -280,7 +281,7 @@ static gssize get_body(GObexPacket *pkt, guint8 *buf, gsize len) if (len < 3) return -ENOBUFS; - ret = pkt->get_body(pkt, buf + 3, len - 3, pkt->get_body_data); + ret = pkt->get_body(buf + 3, len - 3, pkt->get_body_data); if (ret < 0) return ret; |