CredentialDB Class Reference

#include <CredentialDB.h>

List of all members.

Public Member Functions

OsStatus store ()
 Flush the current database to the persistent store.
UtlBoolean insertRow (const Url &uri, const UtlString &realm, const UtlString &userid, const UtlString &passToken, const UtlString &pinToken, const UtlString &authType="DIGEST")
 Load a database row.
UtlBoolean insertRow (const UtlHashMap &nvPairs)
void removeRows (const Url &uri, const UtlString &realm)
void removeRows (const Url &uri)
 Remove all rows matching the specified identity.
void removeAllRows ()
 Delete all rows in the current database.
void getAllRows (ResultSet &rResultset) const
 Utility method for retrieving all rows.
int getRowCount () const
 Count rows in table.
UtlBoolean getCredentialByUserid (const Url &uri, const UtlString &realm, const UtlString &userid, UtlString &passtoken, UtlString &authType) const
 Retrieve the SIP credential check values for a given identity, realm, and userid.
UtlBoolean getCredential (const Url &uri, const UtlString &realm, UtlString &userid, UtlString &passtoken, UtlString &authType) const
 Retrieve the SIP credential check values for a given identity and realm.
UtlBoolean getCredential (const UtlString &userid, const UtlString &realm, Url &uri, UtlString &passtoken, UtlString &authType) const
 Retrieve the SIP credential check values for a given userid and realm.
UtlBoolean getUserPin (const Url &uri, const UtlString &realm, UtlString &userid, UtlString &pintoken, UtlString &authType) const
 Retrieve the User PIN check values for a given identity and realm.
UtlBoolean getUserPin (const UtlString &userid, const UtlString &realm, Url &uri, UtlString &pintoken, UtlString &authType) const
 Retrieve the User PIN check values for a given userid and realm.
void getAllCredentials (const Url &uri, ResultSet &cursor) const
 Utility method for retrieving all information for a given identity.
UtlBoolean isUriDefined (const Url &uri, UtlString &realm, UtlString &authType) const
 Determine whether or not a given identity is in the credentials database.
bool isLoaded ()

Static Public Member Functions

static CredentialDBgetInstance (const UtlString &name="credential")
 Singleton Accessor.
static void releaseInstance ()
 releaseInstance - cleans up the singleton (for use at exit)

Static Public Attributes

static const UtlString sType
static const UtlString sXmlNamespace

Private Member Functions

OsStatus load ()
 Reads the persistent store into the database.
 CredentialDB (const UtlString &name="credentials")
virtual ~CredentialDB ()

Private Attributes

dbDatabasem_pFastDB
 Fast DB instance.
UtlString mDatabaseName
 the persistent filename for loading/saving
bool mTableLoaded

Static Private Attributes

static CredentialDBspInstance = NULL
static OsMutex sLockMutex
 Singleton and Serialization mutex.
static UtlString gUriKey
static UtlString gRealmKey
static UtlString gUseridKey
static UtlString gPasstokenKey
static UtlString gPintokenKey
static UtlString gAuthtypeKey


Constructor & Destructor Documentation

CredentialDB ( const UtlString name = "credentials"  )  [private]

~CredentialDB (  )  [private, virtual]


Member Function Documentation

CredentialDB * getInstance ( const UtlString name = "credential"  )  [static]

Singleton Accessor.

Returns:
the instance pointer to the database singleton Loads the database from the persistent store on the first access.

void releaseInstance (  )  [static]

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

Ensures that the current database is flushed to the persistent store.

OsStatus store (  ) 

Flush the current database to the persistent store.

UtlBoolean insertRow ( const Url uri,
const UtlString realm,
const UtlString userid,
const UtlString passToken,
const UtlString pinToken,
const UtlString authType = "DIGEST" 
)

Load a database row.

UtlBoolean insertRow ( const UtlHashMap nvPairs  ) 

void removeRows ( const Url uri,
const UtlString realm 
)

void removeRows ( const Url uri  ) 

Remove all rows matching the specified identity.

void removeAllRows (  ) 

Delete all rows in the current database.

void getAllRows ( ResultSet rResultset  )  const

Utility method for retrieving all rows.

This should not be used for any normal operational purpose.

int getRowCount (  )  const

Count rows in table.

UtlBoolean getCredentialByUserid ( const Url uri,
const UtlString realm,
const UtlString userid,
UtlString passtoken,
UtlString authType 
) const

Retrieve the SIP credential check values for a given identity, realm, and userid.

UtlBoolean getCredential ( const Url uri,
const UtlString realm,
UtlString userid,
UtlString passtoken,
UtlString authType 
) const

Retrieve the SIP credential check values for a given identity and realm.

UtlBoolean getCredential ( const UtlString userid,
const UtlString realm,
Url uri,
UtlString passtoken,
UtlString authType 
) const

Retrieve the SIP credential check values for a given userid and realm.

UtlBoolean getUserPin ( const Url uri,
const UtlString realm,
UtlString userid,
UtlString pintoken,
UtlString authType 
) const

Retrieve the User PIN check values for a given identity and realm.

UtlBoolean getUserPin ( const UtlString userid,
const UtlString realm,
Url uri,
UtlString pintoken,
UtlString authType 
) const

Retrieve the User PIN check values for a given userid and realm.

void getAllCredentials ( const Url uri,
ResultSet cursor 
) const

Utility method for retrieving all information for a given identity.

UtlBoolean isUriDefined ( const Url uri,
UtlString realm,
UtlString authType 
) const

Determine whether or not a given identity is in the credentials database.

bool isLoaded (  ) 

OsStatus load (  )  [private]

Reads the persistent store into the database.

This is executed implicitly when the singleton is instantiated.


Member Data Documentation

const UtlString sType [static]

const UtlString sXmlNamespace [static]

CredentialDB * spInstance = NULL [static, private]

OsMutex sLockMutex [static, private]

Singleton and Serialization mutex.

UtlString gUriKey [static, private]

UtlString gRealmKey [static, private]

UtlString gUseridKey [static, private]

UtlString gPasstokenKey [static, private]

UtlString gPintokenKey [static, private]

UtlString gAuthtypeKey [static, private]

dbDatabase* m_pFastDB [private]

Fast DB instance.

the persistent filename for loading/saving

bool mTableLoaded [private]


Online Library Docs

sipXecs home page

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