Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_uuid.h
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Adaptive Framework UUID Header
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
9 #ifndef __AFW_UUID_H__
10 #define __AFW_UUID_H__
11 
12 #include "afw_minimal.h"
13 #include "apr_uuid.h"
14 
30 
31 /* afw_uuid_t is the same as apr_uuid_t. */
32 typedef apr_uuid_t afw_uuid_t;
33 
34 /*
35  * Standard format UUID string are formatted as:
36  *
37  * 00112233-4455-6677-8899-AABBCCDDEEFF
38  */
39 
45 AFW_DECLARE(void)
47  afw_uuid_t *uuid, afw_xctx_t *xctx);
48 
49 
56 AFW_DECLARE(const afw_uuid_t *)
58  const afw_pool_t *p, afw_xctx_t *xctx);
59 
60 
61 
68 AFW_DECLARE(const afw_value_t *)
70  const afw_pool_t *p, afw_xctx_t *xctx);
71 
72 
73 
80 AFW_DECLARE(const afw_utf8_t *)
82  const afw_pool_t *p, afw_xctx_t *xctx);
83 
84 
92 AFW_DECLARE(const afw_utf8_t *)
94  const afw_uuid_t *uuid,
95  const afw_pool_t *p, afw_xctx_t *xctx);
96 
97 
104 AFW_DECLARE(void)
106  afw_uuid_t *uuid,
107  const afw_utf8_t *s,
108  afw_xctx_t *xctx);
109 
110 
118 AFW_DECLARE(const afw_uuid_t *)
120  const afw_utf8_t *s,
121  const afw_pool_t *p, afw_xctx_t *xctx);
122 
123 
124 
125 AFW_END_DECLARES
126 
129 #endif /* __AFW_UUID_H__ */
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Adaptive Framework Minimal Header.
const afw_uuid_t * afw_uuid_from_utf8(const afw_utf8_t *s, const afw_pool_t *p, afw_xctx_t *xctx)
Convert standard format UUID utf-8 string to uuid.
Definition: afw_uuid.c:117
void afw_uuid_parse(afw_uuid_t *uuid, const afw_utf8_t *s, afw_xctx_t *xctx)
Parse a standard format UUID string to a uuid.
Definition: afw_uuid.c:95
const afw_uuid_t * afw_uuid_create(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID.
Definition: afw_uuid.c:30
const afw_value_t * afw_uuid_create_string(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID as a standard format UUID utf-8 string value.
Definition: afw_uuid.c:43
const afw_utf8_t * afw_uuid_create_utf8(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID as a standard format UUID utf-8 string.
Definition: afw_uuid.c:62
void afw_uuid_generate(afw_uuid_t *uuid, afw_xctx_t *xctx)
Generate a new UUID.
Definition: afw_uuid.c:21
const afw_utf8_t * afw_uuid_to_utf8(const afw_uuid_t *uuid, const afw_pool_t *p, afw_xctx_t *xctx)
Convert uuid to a standard format UUID utf-8 string.
Definition: afw_uuid.c:79
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_value public struct.
Interface afw_xctx public struct.