CallerAliasDB Class Reference

#include <CallerAliasDB.h>

List of all members.


Detailed Description

Database of all information acquired through REGISTER messages.

Public Member Functions

int getRowCount () const
 Count rows in table.
void insertRow (const UtlString identity, const UtlString domain, const UtlString alias)
 Add a single mapping to the database.
bool getCallerAlias (const UtlString &identity, const UtlString &domain, UtlString &callerAlias) const
 Get the caller alias for this combination of caller identity and target domain.
void removeAllRows ()
OsStatus store ()
bool isLoaded ()

Static Public Member Functions

static CallerAliasDBgetInstance (const UtlString &name=DbName)
static void releaseInstance ()
 releaseInstance - cleans up the singleton (for use at exit)

Static Public Attributes

static const UtlString DbName

Protected Member Functions

OsStatus load ()
void getAllRows (ResultSet &rResultSet) const
 Utility method for dumping all rows.
 CallerAliasDB (const UtlString &name)

Protected Attributes

dbDatabasempFastDB
UtlString mDatabaseName
bool mTableLoaded

Static Protected Attributes

static dbDatabasespDBInstance
static CallerAliasDBspInstance = NULL
static OsMutex sLockMutex
static const UtlString IdentityKey
static const UtlString DomainKey
static const UtlString AliasKey
static const UtlString sType
static const UtlString sXmlNamespace

Private Member Functions

 ~CallerAliasDB ()
 No destructor, no no no.

Static Private Attributes

static UtlString nullString

Constructor & Destructor Documentation

CallerAliasDB ( const UtlString name  )  [protected]

~CallerAliasDB (  )  [private]

No destructor, no no no.


Member Function Documentation

CallerAliasDB * getInstance ( const UtlString name = DbName  )  [static]

void releaseInstance (  )  [static]

releaseInstance - cleans up the singleton (for use at exit)

int getRowCount (  )  const

Count rows in table.

void insertRow ( const UtlString  identity,
const UtlString  domain,
const UtlString  alias 
)

Add a single mapping to the database.

The identity value may be the null string; this is a wildcard entry that matches any caller to the given domain.

Parameters:
identity  identity of caller in 'user' form (no scheme)
domain  domain and optional port for target ( 'example.com' or 'example.com:5099' )
alias  returned alias

bool getCallerAlias ( const UtlString identity,
const UtlString domain,
UtlString callerAlias 
) const

Get the caller alias for this combination of caller identity and target domain.

Returns:
true if an alias was found for this caller, false if not
This looks in the database for an exact match of identity and domain The caller must decide whether or not to pass a null identity for wildcards. If no match is found, callerAlias is set to the null string.
Parameters:
identity  identity of caller in 'user' form (no scheme)
domain  domain and optional port for target ( 'example.com' or 'example.com:5099' )
callerAlias  returned alias

void removeAllRows (  ) 

OsStatus store (  ) 

bool isLoaded (  ) 

OsStatus load (  )  [protected]

void getAllRows ( ResultSet rResultSet  )  const [protected]

Utility method for dumping all rows.


Member Data Documentation

const UtlString DbName [static]

dbDatabase* spDBInstance [static, protected]

dbDatabase* mpFastDB [protected]

CallerAliasDB * spInstance = NULL [static, protected]

OsMutex sLockMutex [static, protected]

UtlString mDatabaseName [protected]

const UtlString IdentityKey [static, protected]

const UtlString DomainKey [static, protected]

const UtlString AliasKey [static, protected]

const UtlString sType [static, protected]

const UtlString sXmlNamespace [static, protected]

bool mTableLoaded [protected]

UtlString nullString [static, private]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:13:23 build16 abuild