blob: f335444158aee2c268d28089d5dab2a81c6c2c70 [file] [log] [blame]
<html>
<head>
<title>Global Functions in Namespace in Sourcefile uuid.h</title>
<style> h1 { font-size:20pt; margin-top:3pt; margin-bottom:7pt; }
h2 { font-family:"Arial"; font-size:16pt; margin-top:3pt; margin-bottom:5pt; }
h3 { font-size:13pt; margin-top:2pt; margin-bottom:3pt; }
h4 { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }
dl { margin-top:1pt; margin-bottom:1pt; }
dl.member { margin-top:1pt; margin-bottom:1pt; background-color:#eeeeff; }
dt { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }
dt.member { font-size:13pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }
dt.simple { font-size:10pt; font-weight:normal; margin-top:2pt; margin-bottom:1pt; }
dd { font-size:10pt; margin-top:1pt; margin-bottom:1pt; }
dd.member { font-size:10pt; margin-top:1pt; margin-bottom:1pt; background-color:#ffffff; }
p { font-size:10pt; margin-top:3pt; margin-bottom:1pt; }
pre { font-family: Times, serif; font-size:10pt; margin-top:1pt; margin-bottom:1pt; }
tr { font-size:10pt; }
td { font-size:10pt; }
</style>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff">
<a name="_top_"> </a>
<table border="0" cellpadding="1" cellspacing="0">
<tr align="center" valign="top">
<td bgcolor="#eeeeff">&nbsp;<a href="../index.html" alt><font family="Arial" color="#000000" size="+1"><b>Overview</b></font></a>&nbsp;</td>
<td bgcolor="#eeeeff">&nbsp;<a href="index.html" alt><font family="Arial" color="#000000" size="+1"><b>Namespace</b></font></a>&nbsp;</td>
<td bgcolor="#eeeeff">&nbsp;<font family="Arial" color="#000000" size="+1">Class</font>&nbsp;</td>
<td bgcolor="#eeeeff">&nbsp;<a href="../index-files/index-1.html" alt><font family="Arial" color="#000000" size="+1"><b>Index</b></font></a>&nbsp;</td>
<td bgcolor="#eeeeff">&nbsp;<a href="../help.html" alt><font family="Arial" color="#000000" size="+1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
<table cellpadding="0" cellspacing="3"></table>
<hr>
<div align="center" style="background-color:#ccccff; line-height:26pt;"><h2>Global Functions in Global Namespace C++<br>
in Sourcefile uuid.h</h2>
</div><hr>
<dl class="member">
<dt class="member"><a name="rtl_compareUuid-478"> </a>
rtl_compareUuid</dt>
<dd class="member"><dl>
<dt class="simple">extern &quot;C&quot;<br>
<a href="t-sal_Int32.html">sal_Int32</a> <strong>rtl_compareUuid</strong>(</dt>
<dd><table>
<tr>
<td>const <a href="t-sal_uInt8.html">sal_uInt8</a> * </td>
<td> pUUID1,</td>
</tr>
<tr>
<td>const <a href="t-sal_uInt8.html">sal_uInt8</a> *</td>
<td>pUUID2 );</td>
</tr>
</table>
</dd>
</dl>
<br>
</dd>
<dd class="member"><table border cellspacing="0">
<tr>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td>
</tr>
<tr>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td>
</tr>
</table>
<br>
</dd>
<dd class="member"><dl>
<dt>Summary</dt>
<dd>Compare two UUID's lexically
</dd>
<dt>Description</dt>
<dd> <p>
Note: lexical ordering is not temporal ordering!
<p>
Note: For equalnesschecking, a memcmp(pUUID1,pUUID2,16) is more efficient
</dd>
<dt>Return</dt>
<dd>
<ul>
<li>-1 u1 is lexically before u2
<li>0 u1 is equal to u2
<li>1 u1 is lexically after u2
</ul>
</dd>
</dl>
</dd>
</dl>
<hr>
<dl class="member">
<dt class="member"><a name="rtl_createNamedUuid-479"> </a>
rtl_createNamedUuid</dt>
<dd class="member"><dl>
<dt class="simple">extern &quot;C&quot;<br>
void <strong>rtl_createNamedUuid</strong>(</dt>
<dd><table>
<tr>
<td><a href="t-sal_uInt8.html">sal_uInt8</a> * </td>
<td> pTargetUUID,</td>
</tr>
<tr>
<td>const <a href="t-sal_uInt8.html">sal_uInt8</a> *</td>
<td>pNameSpaceUUID,</td>
</tr>
<tr>
<td>const <a href="t-rtl_String.html">rtl_String</a> *</td>
<td>pName );</td>
</tr>
</table>
</dd>
</dl>
<br>
</dd>
<dd class="member"><table border cellspacing="0">
<tr>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td>
</tr>
<tr>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td>
</tr>
</table>
<br>
</dd>
<dd class="member"><dl>
<dt>Summary</dt>
<dd>Creates named UUIDs.
</dd>
<dt>Description</dt>
<dd> <p>
The version 3 UUID is meant for generating UUIDs from <em>names</em> that
are drawn from, and unique within, some <em>name space</em>. Some examples
of names (and, implicitly, name spaces) might be DNS names, URLs, ISO
Object IDs (OIDs), reserved words in a programming language, or X.500
Distinguished Names (DNs); thus, the concept of name and name space
should be broadly construed, and not limited to textual names.
<p>
The requirements for such UUIDs are as follows:
<ul>
<li> The UUIDs generated at different times from the same name in the
same namespace MUST be equal
<li> The UUIDs generated from two different names in the same namespace
should be different (with very high probability)
<li> The UUIDs generated from the same name in two different namespaces
should be different with (very high probability)
<li> If two UUIDs that were generated from names are equal, then they
were generated from the same name in the same namespace (with very
high probability).
</ul>
</dd>
<dt>Parameters</dt>
<dd><table border="0" width="100%" cellpadding="3" cellspacing="0">
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">pTargetUUID</td>
<td><pre>pointer to at least 16 bytes of memory. After the call
it contains the newly generated uuid in network byte order.
</pre></td>
</tr>
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">pNameSpaceUUID</td>
<td><pre>The namespace uuid. Below are some predefined ones,
but any arbitray uuid can be used as namespace.
</pre></td>
</tr>
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">pName</td>
<td><pre>the name
</pre></td>
</tr>
</table>
</dd>
</dl>
</dd>
</dl>
<hr>
<dl class="member">
<dt class="member"><a name="rtl_createUuid-477"> </a>
rtl_createUuid</dt>
<dd class="member"><dl>
<dt class="simple">extern &quot;C&quot;<br>
void <strong>rtl_createUuid</strong>(</dt>
<dd><table>
<tr>
<td><a href="t-sal_uInt8.html">sal_uInt8</a> * </td>
<td> pTargetUUID,</td>
</tr>
<tr>
<td>const <a href="t-sal_uInt8.html">sal_uInt8</a> *</td>
<td>pPredecessorUUID,</td>
</tr>
<tr>
<td><a href="t-sal_Bool.html">sal_Bool</a></td>
<td>bUseEthernetAddress );</td>
</tr>
</table>
</dd>
</dl>
<br>
</dd>
<dd class="member"><table border cellspacing="0">
<tr>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td>
<td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td>
</tr>
<tr>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt;">NO</td>
<td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td>
</tr>
</table>
<br>
</dd>
<dd class="member"><dl>
<dt>Description</dt>
<dd>Generates a new UUID (Universally Unique IDentifier).
If available, the ethernetaddress of a networkcard is used, otherwise
a 6 Byte random number is generated( for which rtlRandomPool is used ).
</dd>
<dt>Parameters</dt>
<dd><table border="0" width="100%" cellpadding="3" cellspacing="0">
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">pTargetUUID</td>
<td><pre>pointer to at least 16 bytes of memory. After the call it contains
the newly generated uuid in network byte order.
</pre></td>
</tr>
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">pPredecessorUUID</td>
<td><pre>pointer to the previously generated uuid in network byte
order. The generator reuses the 6-Byte random value
and the two byte context value and ensures,
that pTargetUUID is generated with a later timestamp.
Set pPredecessorUUID to 0 if no predecessor is available.
The caller is responsible for making the value persistent
(if desired).
</pre></td>
</tr>
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">bUseEthernetAddress</td>
<td><pre>if <code>sal_True</code>, the generator uses the ethernet
address of a network card (if available).
if <code>sal_False</code>, the generator generates a new
6-Byte random
value each time it is called with pPredecessorUUID = 0.
</pre></td>
</tr>
</table>
</dd>
</dl>
</dd>
</dl>
<hr>
<a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.</p>
</body>