sipxtacklib
Version 3.3
|
Class for maintaining SUBSCRIBE dialog information in subscription server. More...
#include <SipSubscriptionMgr.h>
Public Member Functions | |
SipSubscriptionMgr () | |
Default constructor. More... | |
virtual | ~SipSubscriptionMgr () |
Destructor. More... | |
virtual UtlBoolean | updateDialogInfo (const SipMessage &subscribeRequest, const UtlString &resourceId, const UtlString &eventTypeKey, OsMsgQ *subscriptionTimeoutQueue, UtlString &subscribeDialogHandle, UtlBoolean &isNew, UtlBoolean &isExpired, SipMessage &subscribeResponse) |
Add/Update subscription for the given SUBSCRIBE request. More... | |
virtual UtlBoolean | getNotifyDialogInfo (const UtlString &subscribeDialogHandle, SipMessage ¬ifyRequest) |
Set the subscription dialog information and cseq for the next NOTIFY request. More... | |
virtual UtlBoolean | createNotifiesDialogInfo (const char *resourceId, const char *eventTypeKey, int &numNotifiesCreated, UtlString **&acceptHeaderValuesArray, SipMessage **¬ifyArray) |
Construct a NOTIFY request for each subscription/dialog subscribed to the given resourceId and eventTypeKey. More... | |
virtual void | freeNotifies (int numNotifies, UtlString **acceptHeaderValues, SipMessage **notifiesArray) |
frees up the notifies created in createNotifiesDialogInfo More... | |
virtual UtlBoolean | endSubscription (const UtlString &dialogHandle) |
End the dialog for the subscription indicated, by the dialog handle. More... | |
int | dumpOldSubscriptions (long oldEpochTimeSeconds) |
Dump to syslog states considered old. More... | |
int | removeOldSubscriptions (long oldEpochTimeSeconds) |
Remove old subscriptions that expired before given date. More... | |
void | setMaxExpiration (int expiresSeconds) |
Set maximum subscription period in seconds. More... | |
SipDialogMgr * | getDialogMgr () |
Get the dialog manager. More... | |
int | getStateCount () |
Get count of subscription states/dialogs being managed. More... | |
virtual UtlBoolean | dialogExists (UtlString &dialogHandle) |
inquire if the dialog exists More... | |
virtual UtlBoolean | isExpired (UtlString &dialogHandle) |
inquire if the dialog has already expired More... | |
Class for maintaining SUBSCRIBE dialog information in subscription server.
Default constructor.
|
virtual |
Destructor.
|
virtual |
Add/Update subscription for the given SUBSCRIBE request.
|
virtual |
Set the subscription dialog information and cseq for the next NOTIFY request.
|
virtual |
Construct a NOTIFY request for each subscription/dialog subscribed to the given resourceId and eventTypeKey.
Allocates a SipMessage* array and allocates a SipMessage and sets the dialog information for the NOTIFY request for each subscription.
numNotifiesCreated | - number of pointers to NOTIFY requests in the returned notifyArray |
notifyArray | - if numNotifiesCreated > 0 array is allocated of sufficient size to hold a SipMessage for each subscription. |
|
virtual |
frees up the notifies created in createNotifiesDialogInfo
|
virtual |
End the dialog for the subscription indicated, by the dialog handle.
Finds a matching dialog and expires the subscription if it has not already expired.
dialogHandle | - a fully established SIP dialog handle Returns TRUE if a matching dialog was found regardless of whether the subscription was already expired or not. |
int dumpOldSubscriptions | ( | long | oldEpochTimeSeconds | ) |
Dump to syslog states considered old.
int removeOldSubscriptions | ( | long | oldEpochTimeSeconds | ) |
Remove old subscriptions that expired before given date.
void setMaxExpiration | ( | int | expiresSeconds | ) |
Set maximum subscription period in seconds.
SipDialogMgr * getDialogMgr | ( | ) |
Get the dialog manager.
WARNING: the application must be aware of the lifetime of the dialog manager, as no reference counting is done on the dialog manager. The application is responsible for knowing when the dialog manager will go way.
int getStateCount | ( | ) |
Get count of subscription states/dialogs being managed.
|
virtual |
inquire if the dialog exists
|
virtual |
inquire if the dialog has already expired