summaryrefslogtreecommitdiff
path: root/lib/uuid.h
diff options
context:
space:
mode:
authorElvis Pfützenreuter <epx@signove.com>2011-03-14 15:53:56 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2011-03-15 10:42:50 +0200
commitbb096e674c6a143db73fb636aa611a392cdb92f8 (patch)
treebf960dd50051a7c2802a8b04553b075415f0a003 /lib/uuid.h
parent3ed993262f2e172971fabb13aea9cf5d28bd9ed3 (diff)
downloadbluez-bb096e674c6a143db73fb636aa611a392cdb92f8.tar.gz
Add more functions for new UUID handling
This patch adds more functions that are necessary to handle the new bt_uuid_t type, and moves basic things like byte-swapping functions and uint128_t type to bluetooth.h.
Diffstat (limited to 'lib/uuid.h')
-rw-r--r--lib/uuid.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/uuid.h b/lib/uuid.h
index 01457dadd..9c082d304 100644
--- a/lib/uuid.h
+++ b/lib/uuid.h
@@ -30,13 +30,11 @@ extern "C" {
#endif
#include <stdint.h>
-
-typedef struct {
- uint8_t data[16];
-} uint128_t;
+#include <bluetooth/bluetooth.h>
typedef struct {
enum {
+ BT_UUID_UNSPEC = 0,
BT_UUID16 = 16,
BT_UUID32 = 32,
BT_UUID128 = 128,
@@ -55,6 +53,11 @@ int bt_uuid128_create(bt_uuid_t *btuuid, uint128_t value);
int bt_uuid_cmp(const bt_uuid_t *uuid1, const bt_uuid_t *uuid2);
void bt_uuid_to_uuid128(const bt_uuid_t *src, bt_uuid_t *dst);
+#define MAX_LEN_UUID_STR 37
+
+int bt_uuid_to_string(const bt_uuid_t *uuid, char *str, size_t n);
+int bt_string_to_uuid(bt_uuid_t *uuid, const char *string);
+
#ifdef __cplusplus
}
#endif