VirtualBox

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

Last change on this file since 9666 was 8245, checked in by vboxsync, 17 years ago

rebranding: IPRT files again.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/** @file
2 * IPRT - Universal Unique Identifiers (UUID).
3 */
4
5/*
6 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26 * Clara, CA 95054 USA or visit http://www.sun.com if you need
27 * additional information or have any questions.
28 */
29
30#ifndef ___iprt_uuid_h
31#define ___iprt_uuid_h
32
33#include <iprt/cdefs.h>
34#include <iprt/types.h>
35
36__BEGIN_DECLS
37
38/** @defgroup grp_rt_uuid RTUuid - Universally Unique Identifiers
39 * @ingroup grp_rt
40 * @{
41 */
42
43/**
44 * Generates new UUID value.
45 *
46 * @returns iprt status code.
47 * @param pUuid Where to store generated uuid.
48 */
49RTDECL(int) RTUuidCreate(PRTUUID pUuid);
50
51/**
52 * Makes null UUID value.
53 *
54 * @returns iprt status code.
55 * @param pUuid Where to store generated null uuid.
56 */
57RTDECL(int) RTUuidClear(PRTUUID pUuid);
58
59/**
60 * Checks if UUID is null.
61 *
62 * @returns true if UUID is null.
63 * @param pUuid uuid to check.
64 */
65RTDECL(int) RTUuidIsNull(PCRTUUID pUuid);
66
67/**
68 * Compares two UUID values.
69 *
70 * @returns 0 if eq, < 0 or > 0.
71 * @param pUuid1 First value to compare.
72 * @param pUuid2 Second value to compare.
73 */
74RTDECL(int) RTUuidCompare(PCRTUUID pUuid1, PCRTUUID pUuid2);
75
76/**
77 * Converts binary UUID to its string representation.
78 *
79 * @returns iprt status code.
80 * @param pUuid Uuid to convert.
81 * @param pszString Where to store result string.
82 * @param cchString pszString buffer length, must be >= RTUUID_STR_LENGTH.
83 */
84RTDECL(int) RTUuidToStr(PCRTUUID pUuid, char *pszString, unsigned cchString);
85
86/**
87 * Converts UUID from its string representation to binary format.
88 *
89 * @returns iprt status code.
90 * @param pUuid Where to store result Uuid.
91 * @param pszString String with UUID text data.
92 */
93RTDECL(int) RTUuidFromStr(PRTUUID pUuid, const char *pszString);
94
95/** @} */
96
97__END_DECLS
98
99#endif
100
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