VirtualBox

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

Last change on this file since 2889 was 204, checked in by vboxsync, 18 years ago

runtime.h now includes everything. Created a new header, initterm.h, which includes the RT*Init/Term() prototypes.

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