diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/bfc/nsguid.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Wasabi/bfc/nsguid.h')
-rw-r--r-- | Src/Wasabi/bfc/nsguid.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Src/Wasabi/bfc/nsguid.h b/Src/Wasabi/bfc/nsguid.h new file mode 100644 index 00000000..97db9a46 --- /dev/null +++ b/Src/Wasabi/bfc/nsguid.h @@ -0,0 +1,33 @@ +#ifndef _NSGUID_H +#define _NSGUID_H +#include "../../replicant/foundation/guid.h" +#include <bfc/platform/guid.h> +//#include <bfc/common.h> + +// Some conversion functions to allow +// us to have GUIDs translatable to and from other data types. +class nsGUID { +public: + // To the "Human Readable" character format. + // {1B3CA60C-DA98-4826-B4A9-D79748A5FD73} + static char *toChar(const GUID &guid, char *target); + static wchar_t *toCharW(const GUID &guid, wchar_t *target); + static GUID fromCharW(const wchar_t *source); + // To the "C Structure" character format. + // { 0x1b3ca60c, 0xda98, 0x4826, { 0xb4, 0xa9, 0xd7, 0x97, 0x48, 0xa5, 0xfd, 0x73 } }; + static char *toCode(const GUID &guid, char *target); + static GUID fromCode(const char *source); + + // Compare function, returns -1, 0, 1 + static int compare(const GUID &a, const GUID &b); + + // strlen("{xx xxx xxx-xxxx-xxxx-xxxx-xxx xxx xxx xxx}" + enum { GUID_STRLEN = 38 }; + +#ifdef WASABI_COMPILE_CREATEGUID + static void createGuid(GUID *g); +#endif +}; + + +#endif //_NSGUID_H |