diff --git a/gobex/gobex-header.c b/gobex/gobex-header.c index 281f8ea21..fe70c8b35 100644 --- a/gobex/gobex-header.c +++ b/gobex/gobex-header.c @@ -425,7 +425,7 @@ GObexHeader *g_obex_header_new_bytes(guint8 id, const void *data, gsize len) return header; } -GObexHeader *g_obex_header_new_apparam(GObexApparam *apparam) +GObexHeader *g_obex_header_new_tag(guint8 id, GObexApparam *apparam) { guint8 buf[1024]; gssize len; @@ -434,7 +434,12 @@ GObexHeader *g_obex_header_new_apparam(GObexApparam *apparam) if (len < 0) return NULL; - return g_obex_header_new_bytes(G_OBEX_HDR_APPARAM, buf, len); + return g_obex_header_new_bytes(id, buf, len); +} + +GObexHeader *g_obex_header_new_apparam(GObexApparam *apparam) +{ + return g_obex_header_new_tag(G_OBEX_HDR_APPARAM, apparam); } GObexHeader *g_obex_header_new_uint8(guint8 id, guint8 val) diff --git a/gobex/gobex-header.h b/gobex/gobex-header.h index 42a2a0cb1..c2f975f22 100644 --- a/gobex/gobex-header.h +++ b/gobex/gobex-header.h @@ -85,6 +85,7 @@ GObexHeader *g_obex_header_new_unicode(guint8 id, const char *str); GObexHeader *g_obex_header_new_bytes(guint8 id, const void *data, gsize len); GObexHeader *g_obex_header_new_uint8(guint8 id, guint8 val); GObexHeader *g_obex_header_new_uint32(guint8 id, guint32 val); +GObexHeader *g_obex_header_new_tag(guint8 id, GObexApparam *apparam); GObexHeader *g_obex_header_new_apparam(GObexApparam *apparam); GSList *g_obex_header_create_list(guint8 first_hdr_id, va_list args,