Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
uuid_util.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2021 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
17 /*
18  * uuid_util.h
19  *
20  * Created on: 30 Apr 2021
21  * Author: billy
22  */
23 
24 #ifndef CORE_SHARED_UUID_INCLUDE_UUID_UTIL_H_
25 #define CORE_SHARED_UUID_INCLUDE_UUID_UTIL_H_
26 
27 
28 #include "uuid_util_library.h"
29 #include "typedefs.h"
30 #include "string_linked_list.h"
31 
32 #include "uuid_defs.h"
33 
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
40 
50 
51 
61 GRASSROOTS_UUID_API void ConvertUUIDToString (const uuid_t id, char *uuid_s);
62 
63 
64 
73 GRASSROOTS_UUID_API bool ConvertStringToUUID (char *id_s, uuid_t id);
74 
75 
83 GRASSROOTS_UUID_API void FreeUUIDString (char *uuid_s);
84 
85 
86 
95 
96 
108 GRASSROOTS_UUID_API LinkedList *GetUUIDSList (const char *ids_s);
109 
110 
111 GRASSROOTS_UUID_API void PrintUUIDT (const uuid_t *u_p, const char *prefix_s);
112 
113 
114 #ifdef UUID
115  GRASSROOTS_UUID_API void PrintUUID (const UUID *w_p, const char *prefix_s);
116 #endif
117 
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 
124 #endif /* CORE_SHARED_UUID_INCLUDE_UUID_UTIL_H_ */
GetUUIDAsString
char * GetUUIDAsString(const uuid_t id)
Get the string representation of a uuid_t.
StringListNode::GetUUIDSList
LinkedList * GetUUIDSList(const char *ids_s)
Create a LinkedList of StringListNodes with each entry being a uuid.
FreeUUIDString
void FreeUUIDString(char *uuid_s)
Free a string representation of a uuid_t.
uuid_util_library.h
uuid_defs.h
typedefs.h
PrintUUIDT
void PrintUUIDT(const uuid_t *u_p, const char *prefix_s)
LinkedList
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
PrintUUID
void PrintUUID(const UUID *w_p, const char *prefix_s)
ConvertUUIDToString
void ConvertUUIDToString(const uuid_t id, char *uuid_s)
Convert a uuid_t into a given string buffer.
ConvertStringToUUID
bool ConvertStringToUUID(char *id_s, uuid_t id)
Convert the string representation of a uuid_t to a uuid_t.
GRASSROOTS_UUID_API
#define GRASSROOTS_UUID_API
Definition: uuid_util_library.h:49
string_linked_list.h
A doubly-linked list of strings.
uuid_t
Definition: windows_uuid.h:43
IsUUIDSet
bool IsUUIDSet(uuid_t id)
Test whether a uuid_t contains a valid value.