The Free and Open Productivity Suite
Follow us on Twitter: @ApacheOO

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


Global Functions in Global Namespace C++
in Sourcefile uuid.h


rtl_compareUuid
extern "C"
sal_Int32 rtl_compareUuid(
const sal_uInt8 * pUUID1,
const sal_uInt8 * pUUID2 );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Compare two UUID's lexically
Description

Note: lexical ordering is not temporal ordering!

Note: For equalnesschecking, a memcmp(pUUID1,pUUID2,16) is more efficient

Return
  • -1 u1 is lexically before u2
  • 0 u1 is equal to u2
  • 1 u1 is lexically after u2

rtl_createNamedUuid
extern "C"
void rtl_createNamedUuid(
sal_uInt8 * pTargetUUID,
const sal_uInt8 * pNameSpaceUUID,
const rtl_String * pName );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Creates named UUIDs.
Description

The version 3 UUID is meant for generating UUIDs from names that are drawn from, and unique within, some name space. 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.

The requirements for such UUIDs are as follows:

  • The UUIDs generated at different times from the same name in the same namespace MUST be equal
  • The UUIDs generated from two different names in the same namespace should be different (with very high probability)
  • The UUIDs generated from the same name in two different namespaces should be different with (very high probability)
  • 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).
Parameters
pTargetUUID
pointer to at least 16 bytes of memory. After the call
                       it contains the newly generated uuid in network byte order.
    
pNameSpaceUUID
The namespace uuid. Below are some predefined ones,
                          but any arbitray uuid can be used as namespace.

    
pName
the name
 

rtl_createUuid
extern "C"
void rtl_createUuid(
sal_uInt8 * pTargetUUID,
const sal_uInt8 * pPredecessorUUID,
sal_Bool bUseEthernetAddress );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Generates a new Version 4 (random number based) UUID (Universally Unique IDentifier).
Parameters
pTargetUUID
pointer to at least 16 bytes of memory. After the call it contains
                            the newly generated uuid in network byte order.
pPredecessorUUID
ignored (was used when this function returned
                            Version 1 instead of Version 4 UUIDs).
bUseEthernetAddress
ignored (was used when this function returned
                            Version 1 instead of Version 4 UUIDs).

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Website Feedback | Contact Us | Donate | Thanks

Apache, the Apache feather logo, and OpenOffice are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.