Re: [PATCH BlueZ 1/4] gobex/header: Add g_obex_header_new_tag function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Mar 28, 2014 at 3:38 PM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> This function can be used to set tag using GObexApparam as argument but
> for arbritary headers.
> ---
>  gobex/gobex-header.c | 9 +++++++--
>  gobex/gobex-header.h | 1 +
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/gobex/gobex-header.c b/gobex/gobex-header.c
> index 281f8ea..fe70c8b 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 42a2a0c..c2f975f 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,
> --
> 1.8.5.3

Please hold on reviewing this set since I found a problem with it.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux