Kannel: Open Source WAP and SMS gateway  svn-r5335
gw_uuid.h
Go to the documentation of this file.
1 /*
2  * Public include file for the UUID library
3  *
4  * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
5  *
6  * %Begin-Header%
7  * This file may be redistributed under the terms of the GNU
8  * Library General Public License.
9  * %End-Header%
10  */
11 
12 #ifndef _UUID_UUID_H
13 #define _UUID_UUID_H
14 
15 #include <sys/types.h>
16 #include <sys/time.h>
17 #include <time.h>
18 
19 #define UUID_STR_LEN 36
20 
21 #ifdef DARWIN
22 
23 #ifndef _POSIX_C_SOURCE
24 #ifndef _UUID_T
25 #define _UUID_T
26 typedef __darwin_uuid_t uuid_t;
27 #endif /* _UUID_T */
28 #endif /* _POSIX_C_SOURCE */
29 
30 #else
31 
32 typedef unsigned char uuid_t[16];
33 
34 #endif
35 
36 /* UUID Variant definitions */
37 #define UUID_VARIANT_NCS 0
38 #define UUID_VARIANT_DCE 1
39 #define UUID_VARIANT_MICROSOFT 2
40 #define UUID_VARIANT_OTHER 3
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* initialize uuid library */
47 void uuid_init(void);
48 
49 /* shutdown uuid library */
50 void uuid_shutdown(void);
51 
52 /* clear.c */
53 void uuid_clear(uuid_t uu);
54 
55 /* compare.c */
56 int uuid_compare(const uuid_t uu1, const uuid_t uu2);
57 
58 /* copy.c */
59 void uuid_copy(uuid_t dst, const uuid_t src);
60 
61 /* gen_uuid.c */
62 void uuid_generate(uuid_t out);
64 void uuid_generate_time(uuid_t out);
65 
66 /* isnull.c */
67 int uuid_is_null(const uuid_t uu);
68 
69 /* parse.c */
70 int uuid_parse(const char *in, uuid_t uu);
71 
72 /* unparse.c */
73 void uuid_unparse(const uuid_t uu, char *out);
74 
75 /* uuid_time.c */
76 time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
77 int uuid_type(const uuid_t uu);
78 int uuid_variant(const uuid_t uu);
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* _UUID_UUID_H */
void uuid_unparse(const uuid_t uu, char *out)
Definition: gw_uuid.c:562
void uuid_init(void)
Definition: gw_uuid.c:86
time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
Definition: gw_uuid.c:587
void uuid_generate_random(uuid_t out)
Definition: gw_uuid.c:374
void uuid_generate(uuid_t out)
Definition: gw_uuid.c:393
void uuid_clear(uuid_t uu)
Definition: gw_uuid.c:105
int uuid_parse(const char *in, uuid_t uu)
Definition: gw_uuid.c:476
int uuid_variant(const uuid_t uu)
Definition: gw_uuid.c:617
int uuid_is_null(const uuid_t uu)
Definition: gw_uuid.c:413
void uuid_copy(uuid_t dst, const uuid_t src)
Definition: gw_uuid.c:150
void uuid_shutdown(void)
Definition: gw_uuid.c:97
int uuid_compare(const uuid_t uu1, const uuid_t uu2)
Definition: gw_uuid.c:126
unsigned char uuid_t[16]
Definition: gw_uuid.h:32
int uuid_type(const uuid_t uu)
Definition: gw_uuid.c:609
void uuid_generate_time(uuid_t out)
Definition: gw_uuid.c:347
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.