1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>QOF: GUID</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>GUID<br>
<small>
[<a class="el" href="group__Entity.html">Entity: Types, Identity and Instance Framework</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Globally Unique ID's provide a way to uniquely identify some thing. A GUID is a unique, cryptographically random 128-bit value. The identifier is so random that it is safe to assume that there is no other such item on the planet Earth, and indeed, not even in the Galaxy or beyond.<p>
QOF GUID's can be used independently of any other subsystem in QOF. In particular, they do not require the use of other parts of the object subsystem.
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="guid_8h.html">guid.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">globally unique ID User API <br><br></td></tr>
<p>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>union </td><td class="memItemRight" valign=bottom><a class="el" href="union__GUID.html">_GUID</a></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga17">GUID_ENCODING_LENGTH</a> 32</td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="union__GUID.html">_GUID</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga0">GUID</a></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga1">guid_init</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga2">guid_init_with_salt</a> (const void *salt, size_t salt_len)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga3">guid_init_only_salt</a> (const void *salt, size_t salt_len)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga4">guid_shutdown</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga5">guid_new</a> (<a class="el" href="union__GUID.html">GUID</a> *guid)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="union__GUID.html">GUID</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga6">guid_new_return</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="union__GUID.html">GUID</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga7">guid_null</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="union__GUID.html">GUID</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga8">guid_malloc</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga9" doxytag="GUID::guid_free" ></a>
void </td><td class="memItemRight" valign=bottom><b>guid_free</b> (<a class="el" href="union__GUID.html">GUID</a> *guid)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga10">guid_to_string</a> (const <a class="el" href="union__GUID.html">GUID</a> *guid)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>char * </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga11">guid_to_string_buff</a> (const <a class="el" href="union__GUID.html">GUID</a> *guid, char *buff)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga12">string_to_guid</a> (const char *string, <a class="el" href="union__GUID.html">GUID</a> *guid)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga13">guid_equal</a> (const <a class="el" href="union__GUID.html">GUID</a> *guid_1, const <a class="el" href="union__GUID.html">GUID</a> *guid_2)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga14" doxytag="GUID::guid_compare" ></a>
gint </td><td class="memItemRight" valign=bottom><b>guid_compare</b> (const <a class="el" href="union__GUID.html">GUID</a> *g1, const <a class="el" href="union__GUID.html">GUID</a> *g2)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>guint </td><td class="memItemRight" valign=bottom><a class="el" href="group__GUID.html#ga15">guid_hash_to_guint</a> (gconstpointer ptr)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga16" doxytag="GUID::guid_hash_table_new" ></a>
GHashTable * </td><td class="memItemRight" valign=bottom><b>guid_hash_table_new</b> (void)</td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga17" doxytag="guid.h::GUID_ENCODING_LENGTH" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define GUID_ENCODING_LENGTH 32
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
number of characters needed to encode a guid as a string not including the null terminator. </td>
</tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="guid.h::GUID" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef union <a class="el" href="union__GUID.html">_GUID</a> <a class="el" href="union__GUID.html">GUID</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The type used to store guids </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga13" doxytag="guid.h::guid_equal" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean guid_equal </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname" nowrap> <em>guid_1</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname" nowrap> <em>guid_2</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Given two GUIDs, return TRUE if they are non-NULL and equal. Return FALSE, otherwise. </td>
</tr>
</table>
<a class="anchor" name="ga15" doxytag="guid.h::guid_hash_to_guint" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> guint guid_hash_to_guint </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">gconstpointer </td>
<td class="mdname1" valign="top" nowrap> <em>ptr</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Given a GUID *, hash it to a guint </td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="guid.h::guid_init" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void guid_init </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Initialize the id generator with a variety of random sources.<p>
<dl compact><dt><b>Note:</b></dt><dd>Only one of <a class="el" href="group__GUID.html#ga21">guid_init()</a>, <a class="el" href="group__GUID.html#ga22">guid_init_with_salt()</a> and <a class="el" href="group__GUID.html#ga23">guid_init_only_salt()</a> should be called. Calling any initialization function a second time will reset the generator and erase the effect of the first call. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="guid.h::guid_init_only_salt" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void guid_init_only_salt </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const void * </td>
<td class="mdname" nowrap> <em>salt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>size_t </td>
<td class="mdname" nowrap> <em>salt_len</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Initialize the id generator with the data given in the salt argument, but not with any other source. Calling this function with a specific argument will reliably produce a specific sequence of ids.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>salt</em> </td><td>The additional random values to add to the generator.</td></tr>
<tr><td valign=top><em>salt_len</em> </td><td>The length of the additional random values.</td></tr>
</table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>Only one of <a class="el" href="group__GUID.html#ga21">guid_init()</a>, <a class="el" href="group__GUID.html#ga22">guid_init_with_salt()</a> and <a class="el" href="group__GUID.html#ga23">guid_init_only_salt()</a> should be called. Calling any initialization function a second time will reset the generator and erase the effect of the first call. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="guid.h::guid_init_with_salt" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void guid_init_with_salt </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const void * </td>
<td class="mdname" nowrap> <em>salt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>size_t </td>
<td class="mdname" nowrap> <em>salt_len</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Initialize the id generator with a variety of random sources. and with the data given in the salt argument. This argument can be used to add additional randomness to the generated ids.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>salt</em> </td><td>The additional random values to add to the generator.</td></tr>
<tr><td valign=top><em>salt_len</em> </td><td>The length of the additional random values.</td></tr>
</table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>Only one of <a class="el" href="group__GUID.html#ga21">guid_init()</a>, <a class="el" href="group__GUID.html#ga22">guid_init_with_salt()</a> and <a class="el" href="group__GUID.html#ga23">guid_init_only_salt()</a> should be called. Calling any initialization function a second time will reset the generator and erase the effect of the first call. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="guid.h::guid_malloc" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="union__GUID.html">GUID</a>* guid_malloc </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Efficiently allocate & free memory for GUIDs </td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="guid.h::guid_new" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void guid_new </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>guid</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Generate a new id. If no initialization function has been called, <a class="el" href="group__GUID.html#ga21">guid_init()</a> will be called before the id is created.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>guid</em> </td><td>A pointer to an existing guid data structure. The existing value will be replaced with a new value.</td></tr>
</table>
</dl>
This routine uses the md5 algorithm to build strong random guids. Note that while guid's are generated randomly, the odds of this routine returning a non-unique id are astronomically small. (Literally astronomically: If you had Cray's on every solar system in the universe running for the entire age of teh universe, you'd still have less than a one-in-a-million chance of coming up with a duplicate id. 2^128 == 10^38 is a really really big number.) </td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="guid.h::guid_new_return" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="union__GUID.html">GUID</a> guid_new_return </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Generate a new id. If no initialization function has been called, <a class="el" href="group__GUID.html#ga21">guid_init()</a> will be called before the id is created.<p>
<dl compact><dt><b>Returns:</b></dt><dd>guid A pointer to a data structure contaiing a new GUID. The memory pointed to is owned by this routine and the guid must be copied out. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="guid.h::guid_null" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="union__GUID.html">GUID</a>* guid_null </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Returns a GUID which is guaranteed to never reference any entity. </td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="guid.h::guid_shutdown" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void guid_shutdown </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Release the memory chunk associated with gui storage. Use this only when shutting down the program, as it invalidates *all* GUIDs at once. </td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="guid.h::guid_to_string" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const char* guid_to_string </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>guid</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__GUID.html#ga29">guid_to_string()</a> routine returns a null-terminated string encoding of the id. String encodings of identifiers are hex numbers printed only with the characters '0' through '9' and 'a' through 'f'. The encoding will always be GUID_ENCODING_LENGTH characters long.<p>
XXX This routine is not thread safe and is deprecated. Please use the routine <a class="el" href="group__GUID.html#ga30">guid_to_string_buff()</a> instead.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>guid</em> </td><td>The guid to print.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to the starting character of the string. The returned memory is owned by this routine and may not be freed by the caller. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="guid.h::guid_to_string_buff" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char* guid_to_string_buff </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname" nowrap> <em>guid</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>buff</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__GUID.html#ga30">guid_to_string_buff()</a> routine puts a null-terminated string encoding of the id into the memory pointed at by buff. The buffer must be at least GUID_ENCODING_LENGTH+1 characters long. This routine is handy for avoiding a malloc/free cycle. It returns a pointer to the >>end<< of what was written. (i.e. it can be used like 'stpcpy' during string concatenation)<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>guid</em> </td><td>The guid to print.</td></tr>
<tr><td valign=top><em>buff</em> </td><td>The buffer to print it into.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to the terminating null character of the string. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga12" doxytag="guid.h::string_to_guid" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean string_to_guid </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>string</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="union__GUID.html">GUID</a> * </td>
<td class="mdname" nowrap> <em>guid</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Given a string, decode the id into the guid if guid is non-NULL. The function returns TRUE if the string was a valid 32 character hexadecimal number. This function accepts both upper and lower case hex digits. If the return value is FALSE, the effect on guid is undefined. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun May 23 15:41:47 2004 for QOF by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>
|