summaryrefslogtreecommitdiffstats
path: root/stack/obx/hdrs/obx_eopt.c
blob: e0b0487cd6d119b77c61e1d9dd8dcf2652bd271b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*****************************************************************************
**
**  Name:         obx_eopt.c
**
**  File:         OBEX Headers Encode Utility functions
**                - optional functions
**
**  Copyright (c) 2003-2004, WIDCOMM Inc., All Rights Reserved.
**  WIDCOMM Bluetooth Core. Proprietary and confidential.
**
*****************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "obx_api.h"



/*******************************************************************************
**
** Function     OBX_AddTimeHdr
**
** Description  This function is called to add an OBEX Time header
**              to an OBEX packet.
**
** Returns      TRUE, if the header is added successfully.
**              FALSE, if the operation failed. p_pkt is not altered.
**
*******************************************************************************/
BOOLEAN OBX_AddTimeHdr(BT_HDR *p_pkt, char *p_time)
{
    return OBX_AddByteStrHdr(p_pkt, OBX_HI_TIME, (UINT8 *)p_time, (UINT16)strlen(p_time));
}


/*******************************************************************************
**
** Function     OBX_AddHttpHdr
**
** Description  This function is called to add an OBEX HTTP header
**              to an OBEX packet.
**
** Returns      TRUE, if the header is added successfully.
**              FALSE, if the operation failed. p_pkt is not altered.
**
*******************************************************************************/
BOOLEAN OBX_AddHttpHdr(BT_HDR *p_pkt, UINT8 *p_http, UINT16 len)
{
    return OBX_AddByteStrHdr(p_pkt, OBX_HI_HTTP, p_http, len);
}