VirtualBox

source: vbox/trunk/include/iprt/uuid.h@ 4287

Last change on this file since 4287 was 4071, checked in by vboxsync, 17 years ago

Biggest check-in ever. New source code headers for all (C) innotek files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/** @file
2 * innotek Portable Runtime - Universal Unique Identifiers (UUID).
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License as published by the Free Software Foundation,
12 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13 * distribution. VirtualBox OSE is distributed in the hope that it will
14 * be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef ___iprt_uuid_h
18#define ___iprt_uuid_h
19
20#include <iprt/cdefs.h>
21#include <iprt/types.h>
22
23__BEGIN_DECLS
24
25/** @defgroup grp_rt_uuid RTUuid - Universally Unique Identifiers
26 * @ingroup grp_rt
27 * @{
28 */
29
30/**
31 * Generates new UUID value.
32 *
33 * @returns iprt status code.
34 * @param pUuid Where to store generated uuid.
35 */
36RTDECL(int) RTUuidCreate(PRTUUID pUuid);
37
38/**
39 * Makes null UUID value.
40 *
41 * @returns iprt status code.
42 * @param pUuid Where to store generated null uuid.
43 */
44RTDECL(int) RTUuidClear(PRTUUID pUuid);
45
46/**
47 * Checks if UUID is null.
48 *
49 * @returns true if UUID is null.
50 * @param pUuid uuid to check.
51 */
52RTDECL(int) RTUuidIsNull(PCRTUUID pUuid);
53
54/**
55 * Compares two UUID values.
56 *
57 * @returns 0 if eq, < 0 or > 0.
58 * @param pUuid1 First value to compare.
59 * @param pUuid2 Second value to compare.
60 */
61RTDECL(int) RTUuidCompare(PCRTUUID pUuid1, PCRTUUID pUuid2);
62
63/**
64 * Converts binary UUID to its string representation.
65 *
66 * @returns iprt status code.
67 * @param pUuid Uuid to convert.
68 * @param pszString Where to store result string.
69 * @param cchString pszString buffer length, must be >= RTUUID_STR_LENGTH.
70 */
71RTDECL(int) RTUuidToStr(PCRTUUID pUuid, char *pszString, unsigned cchString);
72
73/**
74 * Converts UUID from its string representation to binary format.
75 *
76 * @returns iprt status code.
77 * @param pUuid Where to store result Uuid.
78 * @param pszString String with UUID text data.
79 */
80RTDECL(int) RTUuidFromStr(PRTUUID pUuid, const char *pszString);
81
82/** @} */
83
84__END_DECLS
85
86#endif
87
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette