pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJLIB Reference

Globally Unique Identifier
[Data Structure.]


Detailed Description

This module provides API to create string that is globally unique. If application doesn't require that strong requirement, it can just use pj_create_random_string() instead.


Defines

#define PJ_GUID_MAX_LENGTH   36

Functions

unsigned pj_GUID_STRING_LENGTH (void)
pj_str_tpj_generate_unique_string (pj_str_t *str)
void pj_create_unique_string (pj_pool_t *pool, pj_str_t *str)

Variables

const unsigned PJ_GUID_STRING_LENGTH


Define Documentation

#define PJ_GUID_MAX_LENGTH   36

PJ_GUID_MAX_LENGTH specifies the maximum length of GUID string, regardless of which algorithm to use.


Function Documentation

void pj_create_unique_string ( pj_pool_t pool,
pj_str_t str 
)

Generate a unique string.

Parameters:
pool Pool to allocate memory from.
str The string.

pj_str_t* pj_generate_unique_string ( pj_str_t str  ) 

Create a globally unique string, which length is PJ_GUID_STRING_LENGTH characters. Caller is responsible for preallocating the storage used in the string.

Parameters:
str The string to store the result.
Returns:
The string.

unsigned pj_GUID_STRING_LENGTH ( void   ) 

Get PJ_GUID_STRING_LENGTH constant.


Variable Documentation

const unsigned PJ_GUID_STRING_LENGTH

PJ_GUID_STRING_LENGTH specifies length of GUID string. The value is dependent on the algorithm used internally to generate the GUID string. If real GUID generator is used, then the length will be between 32 and 36 bytes. Application should not assume which algorithm will be used by GUID generator.

Regardless of the actual length of the GUID, it will not exceed PJ_GUID_MAX_LENGTH characters.

See also:
pj_GUID_STRING_LENGTH()

PJ_GUID_MAX_LENGTH

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
(C)2001-2008 Benny Prijono