00001 /* 00002 * Public include file for the UUID library 00003 * 00004 * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. 00005 * 00006 * %Begin-Header% 00007 * This file may be redistributed under the terms of the GNU 00008 * Library General Public License. 00009 * %End-Header% 00010 */ 00011 00012 #ifndef _UUID_UUID_H 00013 #define _UUID_UUID_H 00014 00015 #include <sys/types.h> 00016 #include <sys/time.h> 00017 #include <time.h> 00018 00019 typedef unsigned char uuid_t[16]; 00020 00021 /* UUID Variant definitions */ 00022 #define UUID_VARIANT_NCS 0 00023 #define UUID_VARIANT_DCE 1 00024 #define UUID_VARIANT_MICROSOFT 2 00025 #define UUID_VARIANT_OTHER 3 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 /* clear.c */ 00032 void uuid_clear(uuid_t uu); 00033 00034 /* compare.c */ 00035 int uuid_compare(const uuid_t uu1, const uuid_t uu2); 00036 00037 /* copy.c */ 00038 void uuid_copy(uuid_t dst, const uuid_t src); 00039 00040 /* gen_uuid.c */ 00041 void uuid_generate(uuid_t out); 00042 void uuid_generate_random(uuid_t out); 00043 void uuid_generate_time(uuid_t out); 00044 00045 /* isnull.c */ 00046 int uuid_is_null(const uuid_t uu); 00047 00048 /* parse.c */ 00049 int uuid_parse(const char *in, uuid_t uu); 00050 00051 /* unparse.c */ 00052 void uuid_unparse(const uuid_t uu, char *out); 00053 00054 /* uuid_time.c */ 00055 time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); 00056 int uuid_type(const uuid_t uu); 00057 int uuid_variant(const uuid_t uu); 00058 00059 #ifdef __cplusplus 00060 } 00061 #endif 00062 00063 #endif /* _UUID_UUID_H */
1.6.1