win32_uuid.h
Go to the documentation of this file.
1 /* @file win32_uuid.h
2  * @brief Provide UUID functions compatible with libuuid from util-linux-ng.
3  */
4 /* Copyright 2008 Lemur Consulting Ltd
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_WIN32_UUID_H
22 #define XAPIAN_INCLUDED_WIN32_UUID_H
23 
24 #if !defined USE_WIN32_UUID_API
25 # error Including win32_uuid.h but USE_WIN32_UUID_API not defined
26 #endif
27 
28 #if !defined __CYGWIN__ && !defined __WIN32__
29 # error Including win32_uuid.h, but neither __CYGWIN__ nor __WIN32__ defined!
30 #endif
31 
32 #include "safewindows.h"
33 #include <rpc.h>
34 
35 // Unfortunately Windows defines uuid_t as GUID, so we redefine it to match the
36 // Unix definition.
37 #undef uuid_t
38 typedef unsigned char uuid_t[16];
39 
40 void uuid_generate(uuid_t uu);
41 
42 int uuid_parse(const char * in, uuid_t uu);
43 
44 void uuid_unparse_lower(const uuid_t uu, char * out);
45 
46 void uuid_clear(uuid_t uu);
47 
48 int uuid_is_null(const uuid_t uu);
49 
50 #endif /* XAPIAN_INCLUDED_WIN32_UUID_H */
int uuid_parse(const char *in, uuid_t uu)
Definition: proc_uuid.cc:65
void uuid_clear(uuid_t uu)
Definition: proc_uuid.cc:86
void uuid_generate(uuid_t uu)
Definition: proc_uuid.cc:49
include <windows.h> without all the bloat and damage.
void uuid_unparse_lower(const uuid_t uu, char *out)
Definition: proc_uuid.cc:74
unsigned char uuid_t[16]
Definition: win32_uuid.h:38
int uuid_is_null(const uuid_t uu)
Definition: proc_uuid.cc:91

Documentation for Xapian (version 1.4.7).
Generated on Fri Jul 20 2018 by Doxygen 1.8.13.