summaryrefslogtreecommitdiff
path: root/gobex/gobex-packet.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-07-12 00:37:25 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-12-04 22:22:01 +0100
commitd9ef079522891a0a256e455158704e82228370d7 (patch)
tree98d3420c5862f3b37ffcd53e22cad1df2730809c /gobex/gobex-packet.c
parentb0341a13d519b401c972127c0738a530acd5f944 (diff)
downloadbluez-d9ef079522891a0a256e455158704e82228370d7.tar.gz
gobex: Add g_obex_packet_get_body convenience function
Diffstat (limited to 'gobex/gobex-packet.c')
-rw-r--r--gobex/gobex-packet.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
index 679a2dd9f..8303456c3 100644
--- a/gobex/gobex-packet.c
+++ b/gobex/gobex-packet.c
@@ -60,6 +60,17 @@ GObexHeader *g_obex_packet_get_header(GObexPacket *pkt, guint8 id)
return NULL;
}
+GObexHeader *g_obex_packet_get_body(GObexPacket *pkt)
+{
+ GObexHeader *body;
+
+ body = g_obex_packet_get_header(pkt, G_OBEX_HDR_BODY);
+ if (body != NULL)
+ return body;
+
+ return g_obex_packet_get_header(pkt, G_OBEX_HDR_BODY_END);
+}
+
guint8 g_obex_packet_get_operation(GObexPacket *pkt, gboolean *final)
{
if (final)