Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
 Overview   Namespace   Class   Index   Help 

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

Description
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 ).
Parameters
pTargetUUID
pointer to at least 16 bytes of memory. After the call it contains
                            the newly generated uuid in network byte order.
pPredecessorUUID
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).
bUseEthernetAddress
if sal_True, the generator uses the ethernet
                            address of a network card (if available). 
                            if sal_False, the generator generates a new
                            6-Byte random
                            value each time it is called with pPredecessorUUID = 0.

Top of Page

Apache Software Foundation

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

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