VirtualBox

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

Last change on this file since 3810 was 3630, checked in by vboxsync, 17 years ago

iprt_hdr_h -> _iprt_hdr_h

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 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 * If you received this file as part of a commercial VirtualBox
17 * distribution, then only the terms of your commercial VirtualBox
18 * license agreement apply instead of the previous paragraph.
19 */
20
21#ifndef ___iprt_uuid_h
22#define ___iprt_uuid_h
23
24#include <iprt/cdefs.h>
25#include <iprt/types.h>
26
27__BEGIN_DECLS
28
29/** @defgroup grp_rt_uuid RTUuid - Universally Unique Identifiers
30 * @ingroup grp_rt
31 * @{
32 */
33
34/**
35 * Generates new UUID value.
36 *
37 * @returns iprt status code.
38 * @param pUuid Where to store generated uuid.
39 */
40RTDECL(int) RTUuidCreate(PRTUUID pUuid);
41
42/**
43 * Makes null UUID value.
44 *
45 * @returns iprt status code.
46 * @param pUuid Where to store generated null uuid.
47 */
48RTDECL(int) RTUuidClear(PRTUUID pUuid);
49
50/**
51 * Checks if UUID is null.
52 *
53 * @returns true if UUID is null.
54 * @param pUuid uuid to check.
55 */
56RTDECL(int) RTUuidIsNull(PCRTUUID pUuid);
57
58/**
59 * Compares two UUID values.
60 *
61 * @returns 0 if eq, < 0 or > 0.
62 * @param pUuid1 First value to compare.
63 * @param pUuid2 Second value to compare.
64 */
65RTDECL(int) RTUuidCompare(PCRTUUID pUuid1, PCRTUUID pUuid2);
66
67/**
68 * Converts binary UUID to its string representation.
69 *
70 * @returns iprt status code.
71 * @param pUuid Uuid to convert.
72 * @param pszString Where to store result string.
73 * @param cchString pszString buffer length, must be >= RTUUID_STR_LENGTH.
74 */
75RTDECL(int) RTUuidToStr(PCRTUUID pUuid, char *pszString, unsigned cchString);
76
77/**
78 * Converts UUID from its string representation to binary format.
79 *
80 * @returns iprt status code.
81 * @param pUuid Where to store result Uuid.
82 * @param pszString String with UUID text data.
83 */
84RTDECL(int) RTUuidFromStr(PRTUUID pUuid, const char *pszString);
85
86/** @} */
87
88__END_DECLS
89
90#endif
91
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