summaryrefslogtreecommitdiff
path: root/unit/test-gobex-header.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-07-10 21:47:49 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-12-04 22:22:01 +0100
commit58cd14d209ae86ee99e909f034d14c52bdef1d1a (patch)
tree9bae7a28961013efc09b1af2f3346bf132fca4f7 /unit/test-gobex-header.c
parentcdcde596874e3a698b674c4ef0c47f13232bbe8c (diff)
downloadbluez-58cd14d209ae86ee99e909f034d14c52bdef1d1a.tar.gz
gobex: Remove _ID_ from header type definitions
Diffstat (limited to 'unit/test-gobex-header.c')
-rw-r--r--unit/test-gobex-header.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/unit/test-gobex-header.c b/unit/test-gobex-header.c
index 27a2ab5e1..f67b3a860 100644
--- a/unit/test-gobex-header.c
+++ b/unit/test-gobex-header.c
@@ -26,25 +26,25 @@
#include "util.h"
-static uint8_t hdr_connid[] = { G_OBEX_HDR_ID_CONNECTION, 1, 2, 3, 4 };
-static uint8_t hdr_name_ascii[] = { G_OBEX_HDR_ID_NAME, 0x00, 0x0b,
+static uint8_t hdr_connid[] = { G_OBEX_HDR_CONNECTION, 1, 2, 3, 4 };
+static uint8_t hdr_name_ascii[] = { G_OBEX_HDR_NAME, 0x00, 0x0b,
0x00, 'f', 0x00, 'o', 0x00, 'o',
0x00, 0x00 };
-static uint8_t hdr_name_umlaut[] = { G_OBEX_HDR_ID_NAME, 0x00, 0x0b,
+static uint8_t hdr_name_umlaut[] = { G_OBEX_HDR_NAME, 0x00, 0x0b,
0x00, 0xe5, 0x00, 0xe4, 0x00, 0xf6,
0x00, 0x00 };
-static uint8_t hdr_body[] = { G_OBEX_HDR_ID_BODY, 0x00, 0x07, 1, 2, 3, 4 };
-static uint8_t hdr_actionid[] = { G_OBEX_HDR_ID_ACTION, 0xab };
+static uint8_t hdr_body[] = { G_OBEX_HDR_BODY, 0x00, 0x07, 1, 2, 3, 4 };
+static uint8_t hdr_actionid[] = { G_OBEX_HDR_ACTION, 0xab };
-static uint8_t hdr_uint32_nval[] = { G_OBEX_HDR_ID_CONNECTION, 1, 2 };
-static uint8_t hdr_unicode_nval_short[] = { G_OBEX_HDR_ID_NAME, 0x12, 0x34,
+static uint8_t hdr_uint32_nval[] = { G_OBEX_HDR_CONNECTION, 1, 2 };
+static uint8_t hdr_unicode_nval_short[] = { G_OBEX_HDR_NAME, 0x12, 0x34,
0x00, 'a', 0x00, 'b',
0x00, 0x00 };
-static uint8_t hdr_unicode_nval_data[] = { G_OBEX_HDR_ID_NAME, 0x00, 0x01,
+static uint8_t hdr_unicode_nval_data[] = { G_OBEX_HDR_NAME, 0x00, 0x01,
0x00, 'a', 0x00, 'b' };
-static uint8_t hdr_bytes_nval_short[] = { G_OBEX_HDR_ID_BODY, 0xab, 0xcd,
+static uint8_t hdr_bytes_nval_short[] = { G_OBEX_HDR_BODY, 0xab, 0xcd,
0x01, 0x02, 0x03 };
-static uint8_t hdr_bytes_nval_data[] = { G_OBEX_HDR_ID_BODY, 0xab };
+static uint8_t hdr_bytes_nval_data[] = { G_OBEX_HDR_BODY, 0xab };
static void test_header_name_ascii(void)
{
@@ -52,7 +52,7 @@ static void test_header_name_ascii(void)
uint8_t buf[1024];
size_t len;
- header = g_obex_header_new_unicode(G_OBEX_HDR_ID_NAME, "foo");
+ header = g_obex_header_new_unicode(G_OBEX_HDR_NAME, "foo");
g_assert(header != NULL);
@@ -69,7 +69,7 @@ static void test_header_name_umlaut(void)
uint8_t buf[1024];
size_t len;
- header = g_obex_header_new_unicode(G_OBEX_HDR_ID_NAME, "åäö");
+ header = g_obex_header_new_unicode(G_OBEX_HDR_NAME, "åäö");
g_assert(header != NULL);
@@ -86,8 +86,7 @@ static void test_header_bytes(void)
uint8_t buf[1024], data[] = { 1, 2, 3, 4 };
size_t len;
- header = g_obex_header_new_bytes(G_OBEX_HDR_ID_BODY, data,
- sizeof(data));
+ header = g_obex_header_new_bytes(G_OBEX_HDR_BODY, data, sizeof(data));
g_assert(header != NULL);
len = g_obex_header_encode(header, buf, sizeof(buf));
@@ -103,7 +102,7 @@ static void test_header_uint8(void)
uint8_t buf[1024];
size_t len;
- header = g_obex_header_new_uint8(G_OBEX_HDR_ID_ACTION, 0xab);
+ header = g_obex_header_new_uint8(G_OBEX_HDR_ACTION, 0xab);
g_assert(header != NULL);
@@ -120,9 +119,7 @@ static void test_header_uint32(void)
uint8_t buf[1024];
size_t len;
- header = g_obex_header_new_uint32(G_OBEX_HDR_ID_CONNECTION,
- 0x01020304);
-
+ header = g_obex_header_new_uint32(G_OBEX_HDR_CONNECTION, 0x01020304);
len = g_obex_header_encode(header, buf, sizeof(buf));
assert_memequal(hdr_connid, sizeof(hdr_connid), buf, len);