#include <SubscriptionDB.h>
Public Member Functions | |
| OsStatus | store () |
| int | getRowCount () const |
| Count rows in table. | |
| UtlBoolean | insertRow (const UtlString &component, const UtlString &uri, const UtlString &callid, const UtlString &contact, const int &expires, const int &subscribeCseq, const UtlString &eventTypeKey, const UtlString &eventType, const UtlString &id, const UtlString &to, const UtlString &from, const UtlString &key, const UtlString &recordRoute, const int ¬ifyCseq, const UtlString &accept, const int &version) |
| void | removeRow (const UtlString &component, const UtlString &to, const UtlString &from, const UtlString &callid, const int &subscribeCseq) |
| void | removeErrorRow (const UtlString &component, const UtlString &to, const UtlString &from, const UtlString &callid) |
| UtlBoolean | subscriptionExists (const UtlString &component, const UtlString &to, const UtlString &from, const UtlString &callid, const int timeNow) |
| Return true if a subscription with the specified identifiers exists (and has not yet expired). | |
| void | removeRows (const UtlString &uri) |
| void | removeAllRows () |
| void | removeExpired (const UtlString &component, const int timeNow) |
| Clean out any expired rows. | |
| void | getAllRows (ResultSet &rResultSet) const |
| void | getUnexpiredSubscriptions (const UtlString &component, const UtlString &key, const UtlString &eventTypeKey, const int &timeNow, ResultSet &rResultSet) |
| void | getUnexpiredContactsFieldsContaining (UtlString &substringToMatch, const int &timeNow, UtlSList &matchingContactFields) const |
| Return a list of contact fields that are unexpired and contain a specified substring. The caller is responsible for de-allocating the memory for the entries contained in the list. | |
| void | updateNotifyUnexpiredSubscription (const UtlString &component, const UtlString &to, const UtlString &from, const UtlString &callid, const UtlString &eventTypeKey, const UtlString &id, int timeNow, int updatedNotifyCseq, int version) const |
| UtlBoolean | updateSubscribeUnexpiredSubscription (const UtlString &component, const UtlString &to, const UtlString &from, const UtlString &callid, const UtlString &eventTypeKey, const UtlString &id, const int &timeNow, const int &expires, const int &updatedSubscribeCseq) const |
| void | updateToTag (const UtlString &callid, const UtlString &fromtag, const UtlString &totag) const |
| UtlBoolean | findFromAndTo (const UtlString &callid, const UtlString &fromtag, const UtlString &totag, UtlString &from, UtlString &to) const |
| int | getMaxVersion (const UtlString &uri) const |
| bool | isLoaded () |
Static Public Member Functions | |
| static SubscriptionDB * | getInstance (const UtlString &name="subscription") |
| static void | releaseInstance () |
| releaseInstance - cleans up the singleton (for use at exit) | |
Static Public Attributes | |
| static const UtlString | gComponentKey |
| static const UtlString | gUriKey |
| static const UtlString | gCallidKey |
| static const UtlString | gContactKey |
| static const UtlString | gNotifycseqKey |
| static const UtlString | gSubscribecseqKey |
| static const UtlString | gExpiresKey |
| static const UtlString | gEventtypekeyKey |
| static const UtlString | gEventtypeKey |
| static const UtlString | gIdKey |
| static const UtlString | gToKey |
| static const UtlString | gFromKey |
| static const UtlString | gFileKey |
| static const UtlString | gKeyKey |
| static const UtlString | gRecordrouteKey |
| static const UtlString | gAcceptKey |
| static const UtlString | gVersionKey |
| static const UtlString | sComponentStatus |
| static const UtlString | sAcceptSimpleMessage |
| static const UtlString | nullString |
| static const UtlString | sType |
| static const UtlString | sXmlNamespace |
Protected Member Functions | |
| OsStatus | load () |
| SubscriptionDB (const UtlString &name) | |
| UtlBoolean | insertRow (const UtlHashMap &nvPairs) |
| void | removeExpiredInternal (const UtlString &component, const int timeNow) |
| Clean out any expired rows. | |
Protected Attributes | |
| dbDatabase * | m_pFastDB |
| UtlString | mDatabaseName |
| bool | mTableLoaded |
Static Protected Attributes | |
| static SubscriptionDB * | spInstance = NULL |
| static dbDatabase * | spDBInstance |
| static OsMutex | sLockMutex |
Private Member Functions | |
| virtual | ~SubscriptionDB () |
| SubscriptionDB | ( | const UtlString & | name | ) | [protected] |
| ~SubscriptionDB | ( | ) | [private, virtual] |
| SubscriptionDB * getInstance | ( | const UtlString & | name = "subscription" |
) | [static] |
| void releaseInstance | ( | ) | [static] |
releaseInstance - cleans up the singleton (for use at exit)
| OsStatus store | ( | ) |
| int getRowCount | ( | ) | const |
Count rows in table.
| UtlBoolean insertRow | ( | const UtlString & | component, | |
| const UtlString & | uri, | |||
| const UtlString & | callid, | |||
| const UtlString & | contact, | |||
| const int & | expires, | |||
| const int & | subscribeCseq, | |||
| const UtlString & | eventTypeKey, | |||
| const UtlString & | eventType, | |||
| const UtlString & | id, | |||
| const UtlString & | to, | |||
| const UtlString & | from, | |||
| const UtlString & | key, | |||
| const UtlString & | recordRoute, | |||
| const int & | notifyCseq, | |||
| const UtlString & | accept, | |||
| const int & | version | |||
| ) |
| void removeRow | ( | const UtlString & | component, | |
| const UtlString & | to, | |||
| const UtlString & | from, | |||
| const UtlString & | callid, | |||
| const int & | subscribeCseq | |||
| ) |
| void removeErrorRow | ( | const UtlString & | component, | |
| const UtlString & | to, | |||
| const UtlString & | from, | |||
| const UtlString & | callid | |||
| ) |
| UtlBoolean subscriptionExists | ( | const UtlString & | component, | |
| const UtlString & | to, | |||
| const UtlString & | from, | |||
| const UtlString & | callid, | |||
| const int | timeNow | |||
| ) |
Return true if a subscription with the specified identifiers exists (and has not yet expired).
| void removeRows | ( | const UtlString & | uri | ) |
| void removeAllRows | ( | ) |
| void removeExpired | ( | const UtlString & | component, | |
| const int | timeNow | |||
| ) |
Clean out any expired rows.
| void getAllRows | ( | ResultSet & | rResultSet | ) | const |
| void getUnexpiredSubscriptions | ( | const UtlString & | component, | |
| const UtlString & | key, | |||
| const UtlString & | eventTypeKey, | |||
| const int & | timeNow, | |||
| ResultSet & | rResultSet | |||
| ) |
| void getUnexpiredContactsFieldsContaining | ( | UtlString & | substringToMatch, | |
| const int & | timeNow, | |||
| UtlSList & | matchingContactFields | |||
| ) | const |
Return a list of contact fields that are unexpired and contain a specified substring. The caller is responsible for de-allocating the memory for the entries contained in the list.
| void updateNotifyUnexpiredSubscription | ( | const UtlString & | component, | |
| const UtlString & | to, | |||
| const UtlString & | from, | |||
| const UtlString & | callid, | |||
| const UtlString & | eventTypeKey, | |||
| const UtlString & | id, | |||
| int | timeNow, | |||
| int | updatedNotifyCseq, | |||
| int | version | |||
| ) | const |
| UtlBoolean updateSubscribeUnexpiredSubscription | ( | const UtlString & | component, | |
| const UtlString & | to, | |||
| const UtlString & | from, | |||
| const UtlString & | callid, | |||
| const UtlString & | eventTypeKey, | |||
| const UtlString & | id, | |||
| const int & | timeNow, | |||
| const int & | expires, | |||
| const int & | updatedSubscribeCseq | |||
| ) | const |
| void updateToTag | ( | const UtlString & | callid, | |
| const UtlString & | fromtag, | |||
| const UtlString & | totag | |||
| ) | const |
| UtlBoolean findFromAndTo | ( | const UtlString & | callid, | |
| const UtlString & | fromtag, | |||
| const UtlString & | totag, | |||
| UtlString & | from, | |||
| UtlString & | to | |||
| ) | const |
| int getMaxVersion | ( | const UtlString & | uri | ) | const |
| bool isLoaded | ( | ) |
| OsStatus load | ( | ) | [protected] |
| UtlBoolean insertRow | ( | const UtlHashMap & | nvPairs | ) | [protected] |
| void removeExpiredInternal | ( | const UtlString & | component, | |
| const int | timeNow | |||
| ) | [protected] |
Clean out any expired rows.
Clean out any expired rows -- caller must hold lock and have db attached.
const UtlString gComponentKey [static] |
const UtlString gCallidKey [static] |
const UtlString gContactKey [static] |
const UtlString gNotifycseqKey [static] |
const UtlString gSubscribecseqKey [static] |
const UtlString gExpiresKey [static] |
const UtlString gEventtypekeyKey [static] |
const UtlString gEventtypeKey [static] |
const UtlString gRecordrouteKey [static] |
const UtlString gAcceptKey [static] |
const UtlString gVersionKey [static] |
const UtlString sComponentStatus [static] |
const UtlString sAcceptSimpleMessage [static] |
const UtlString nullString [static] |
const UtlString sXmlNamespace [static] |
SubscriptionDB * spInstance = NULL [static, protected] |
dbDatabase* spDBInstance [static, protected] |
OsMutex sLockMutex [static, protected] |
dbDatabase* m_pFastDB [protected] |
UtlString mDatabaseName [protected] |
bool mTableLoaded [protected] |