2 ** Copyright (C) 1998-1999 Greg Stein. All Rights Reserved.
4 ** By using this file, you agree to the terms and conditions set forth in
5 ** the LICENSE.html file which can be found at the top level of the mod_dav
6 ** distribution or at http://www.webdav.org/mod_dav/license-1.html.
8 ** Contact information:
9 ** Greg Stein, PO Box 3151, Redmond, WA, 98073
10 ** gstein@lyra.org, http://www.webdav.org/mod_dav/
14 ** DAV opaquelocktoken scheme implementation
16 ** Written 5/99 by Keith Wannamaker, wannamak@us.ibm.com
17 ** Adapted from ISO/DCE RPC spec and a former Internet Draft
19 ** http://www.ics.uci.edu/pub/ietf/webdav/uuid-guid/draft-leach-uuids-guids-01
21 ** Portions of the code are covered by the following license:
23 ** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
24 ** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
25 ** Digital Equipment Corporation, Maynard, Mass.
26 ** Copyright (c) 1998 Microsoft.
27 ** To anyone who acknowledges that this file is provided "AS IS"
28 ** without any express or implied warranty: permission to use, copy,
29 ** modify, and distribute this file for any purpose is hereby
30 ** granted without fee, provided that the above copyright notices and
31 ** this notice appears in all source code copies, and that none of
32 ** the names of Open Software Foundation, Inc., Hewlett-Packard
33 ** Company, or Digital Equipment Corporation be used in advertising
34 ** or publicity pertaining to distribution of the software without
35 ** specific, written prior permission. Neither Open Software
36 ** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment
37 ** Corporation makes any representations about the suitability of
38 ** this software for any purpose.
44 typedef unsigned long unsigned32;
45 typedef unsigned short unsigned16;
46 typedef unsigned char unsigned8;
54 typedef struct _uuid_t
58 unsigned16 time_hi_and_version;
59 unsigned8 clock_seq_hi_and_reserved;
60 unsigned8 clock_seq_low;
64 /* data type for UUID generator persistent state */
67 uuid_node_t node; /* saved node ID */
68 unsigned16 cs; /* saved clock sequence */
71 extern const uuid_t null_locktoken;
73 /* in dav_opaquelock.c */
74 int create_token(uuid_state *st, uuid_t *u);
75 void create_uuid_state(uuid_state *st);
76 void format_token(char *target, const uuid_t *u);
77 int compare_token(const uuid_t a, const uuid_t b);
78 int parse_token(const char *char_token, uuid_t *bin_token);
80 #endif /* _TOKEN_H_ */