1997-04-29 18:53:37 +04:00
|
|
|
/*
|
|
|
|
* Public include file for the UUID library
|
1997-04-29 20:17:09 +04:00
|
|
|
*
|
1998-12-04 11:13:52 +03:00
|
|
|
* Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
|
1997-04-29 20:17:09 +04:00
|
|
|
*
|
|
|
|
* %Begin-Header%
|
2000-04-08 00:06:04 +04:00
|
|
|
* This file may be redistributed under the terms of the GNU
|
|
|
|
* Library General Public License.
|
1997-04-29 20:17:09 +04:00
|
|
|
* %End-Header%
|
1997-04-29 18:53:37 +04:00
|
|
|
*/
|
|
|
|
|
2001-06-23 04:51:42 +04:00
|
|
|
#ifndef _UUID_UUID_H
|
|
|
|
#define _UUID_UUID_H
|
|
|
|
|
1998-12-04 11:13:52 +03:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
1997-04-29 18:53:37 +04:00
|
|
|
typedef unsigned char uuid_t[16];
|
|
|
|
|
1999-06-18 04:32:03 +04:00
|
|
|
/* UUID Variant definitions */
|
|
|
|
#define UUID_VARIANT_NCS 0
|
|
|
|
#define UUID_VARIANT_DCE 1
|
|
|
|
#define UUID_VARIANT_MICROSOFT 2
|
|
|
|
#define UUID_VARIANT_OTHER 3
|
|
|
|
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
1997-04-29 18:53:37 +04:00
|
|
|
/* clear.c */
|
|
|
|
void uuid_clear(uuid_t uu);
|
|
|
|
|
|
|
|
/* compare.c */
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
int uuid_compare(const uuid_t uu1, const uuid_t uu2);
|
1997-04-29 18:53:37 +04:00
|
|
|
|
|
|
|
/* copy.c */
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
void uuid_copy(uuid_t dst, const uuid_t src);
|
1997-04-29 18:53:37 +04:00
|
|
|
|
|
|
|
/* gen_uuid.c */
|
|
|
|
void uuid_generate(uuid_t out);
|
1999-10-26 18:29:22 +04:00
|
|
|
void uuid_generate_random(uuid_t out);
|
|
|
|
void uuid_generate_time(uuid_t out);
|
1997-04-29 18:53:37 +04:00
|
|
|
|
|
|
|
/* isnull.c */
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
int uuid_is_null(const uuid_t uu);
|
1997-04-29 18:53:37 +04:00
|
|
|
|
|
|
|
/* parse.c */
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
int uuid_parse(const char *in, uuid_t uu);
|
1997-04-29 18:53:37 +04:00
|
|
|
|
|
|
|
/* unparse.c */
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
void uuid_unparse(const uuid_t uu, char *out);
|
1997-04-29 18:53:37 +04:00
|
|
|
|
1998-12-04 11:13:52 +03:00
|
|
|
/* uuid_time.c */
|
compare.c (uuid_compare), copy.c (uuid_copy),
isnull.c (uuid_is_null), pack.c (uuid_pack),
parse.c (uuid_parse), unpack.c (uuid_unpack),
unparse.c (uuid_unparse), uuid.h, uuidP.h,
uuid_time.c (uuid_time, uuid_type, uuid_variant):
Use const for pointer variables that we don't modify. Add
the appropriate ifdef's in uuid.h to make it be C++ friendly.
2001-09-11 04:30:09 +04:00
|
|
|
time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
|
|
|
|
int uuid_type(const uuid_t uu);
|
|
|
|
int uuid_variant(const uuid_t uu);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2001-06-23 04:51:42 +04:00
|
|
|
|
|
|
|
#endif /* _UUID_UUID_H */
|