reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
repro::PresenceSubscriptionHandler Class Reference

#include <PresenceSubscriptionHandler.hxx>

Inheritance diagram for repro::PresenceSubscriptionHandler:
[legend]

Public Member Functions

 PresenceSubscriptionHandler (resip::DialogUsageManager &dum, resip::Dispatcher *userDispatcher, bool presenceUsesRegistrationState, bool PresenceNotifyClosedStateForNonPublishedUsers)
 
virtual ~PresenceSubscriptionHandler ()
 
virtual void onNewSubscription (resip::ServerSubscriptionHandle h, const resip::SipMessage &sub)
 
virtual void onRefresh (resip::ServerSubscriptionHandle, const resip::SipMessage &sub)
 
virtual void onPublished (resip::ServerSubscriptionHandle associated, resip::ServerPublicationHandle publication, const resip::Contents *contents, const resip::SecurityAttributes *attrs)
 
virtual void onTerminated (resip::ServerSubscriptionHandle)
 
virtual void onError (resip::ServerSubscriptionHandle, const resip::SipMessage &msg)
 
virtual bool mergeETag (resip::Contents *eTagDest, resip::Contents *eTagSrc, bool isFirst)
 
virtual void onAorModified (const resip::Uri &aor, const resip::ContactList &contacts)
 
virtual void onDocumentModified (bool sync, const resip::Data &eventType, const resip::Data &documentKey, const resip::Data &eTag, uint64_t expirationTime, uint64_t lastUpdated, const resip::Contents *contents, const resip::SecurityAttributes *securityAttributes)
 
virtual void onDocumentRemoved (bool sync, const resip::Data &eventType, const resip::Data &documentKey, const resip::Data &eTag, uint64_t lastUpdated)
 
- Public Member Functions inherited from resip::ServerSubscriptionHandler
virtual ~ServerSubscriptionHandler ()
 
virtual void onNewSubscriptionFromRefer (ServerSubscriptionHandle, const SipMessage &sub)
 
virtual void onNotifyAccepted (ServerSubscriptionHandle, const SipMessage &msg)
 
virtual void onNotifyRejected (ServerSubscriptionHandle, const SipMessage &msg)
 
virtual void onReadyToSend (ServerSubscriptionHandle, SipMessage &msg)
 
virtual void onExpiredByClient (ServerSubscriptionHandle, const SipMessage &sub, SipMessage &notify)
 
virtual void onExpired (ServerSubscriptionHandle, SipMessage &notify)
 
virtual void onFlowTerminated (ServerSubscriptionHandle)
 Called when a TCP or TLS flow to the server has terminated.
 
virtual void getExpires (const SipMessage &msg, uint32_t &expires, int &errorResponseCode)
 Default behavior is to use the expires value in the SipMessage, if it exists.
 
virtual bool hasDefaultExpires () const
 dcm! – a bit clunky, but really want these objects to not have state
 
virtual uint32_t getDefaultExpires () const
 
virtual bool hasMinExpires () const
 
virtual uint32_t getMinExpires () const
 
virtual bool hasMaxExpires () const
 
virtual uint32_t getMaxExpires () const
 
const Mimes & getSupportedMimeTypes () const
 
- Public Member Functions inherited from resip::PublicationPersistenceManager::ETagMerger
virtual ~ETagMerger ()=default
 
- Public Member Functions inherited from resip::InMemorySyncRegDbHandler
 InMemorySyncRegDbHandler (HandlerMode mode=SyncServer)
 
virtual ~InMemorySyncRegDbHandler ()
 
HandlerMode getMode ()
 
virtual void onInitialSyncAor (unsigned int connectionId, const resip::Uri &aor, const ContactList &contacts)
 
- Public Member Functions inherited from resip::InMemorySyncPubDbHandler
 InMemorySyncPubDbHandler (HandlerMode mode=SyncServer)
 
virtual ~InMemorySyncPubDbHandler ()=default
 
HandlerMode getMode () const noexcept
 
virtual void onDocumentModified (bool sync, const Data &eventType, const Data &documentKey, const Data &eTag, uint64_t expirationTime, uint64_t lastUpdated, const Contents *contents, const SecurityAttributes *securityAttributes)=0
 
virtual void onDocumentRemoved (bool sync, const Data &eventType, const Data &documentKey, const Data &eTag, uint64_t lastUpdated)=0
 
virtual void onInitialSyncDocument (unsigned int connectionId, const Data &eventType, const Data &documentKey, const Data &eTag, uint64_t expirationTime, uint64_t lastUpdated, const Contents *contents, const SecurityAttributes *securityAttributes)
 

Protected Member Functions

void notifyPresence (resip::ServerSubscriptionHandle h, bool sendAcceptReject)
 
void notifyPresenceNoPublication (resip::ServerSubscriptionHandle h, bool sendAcceptReject, const resip::Uri &aor, bool isRegistered, uint64_t regMaxExpires)
 
bool sendPublishedPresence (resip::ServerSubscriptionHandle h, bool sendAcceptReject)
 
void adjustNotifyExpiresTime (resip::SipMessage &notify, uint64_t regMaxExpires)
 
void fabricateSimplePresence (resip::ServerSubscriptionHandle h, bool sendAcceptReject, const resip::Uri &aor, bool online, uint64_t regMaxExpires)
 
void continueNotifyPresenceAfterUserExistsCheck (resip::ServerSubscriptionHandle h, bool sendAcceptReject, const resip::Uri &aor, bool userExists)
 
bool checkRegistrationStateChanged (const resip::Uri &aor, bool registered, uint64_t regMaxExpires)
 
void notifySubscriptions (const resip::Data &documentKey)
 
void checkExpired (const resip::Data &documentKey, const resip::Data &eTag, uint64_t lastUpdated)
 

Protected Attributes

resip::DialogUsageManager & mDum
 
resip::InMemorySyncPubDb * mPublicationDb
 
resip::InMemorySyncRegDb * mRegistrationDb
 
bool mPresenceUsesRegistrationState
 
bool mPresenceNotifyClosedStateForNonPublishedUsers
 
resip::Dispatcher * mUserDispatcher
 
std::set< resip::Uri > mOnlineAors
 
- Protected Attributes inherited from resip::InMemorySyncRegDbHandler
HandlerMode mMode
 
- Protected Attributes inherited from resip::InMemorySyncPubDbHandler
HandlerMode mMode
 

Friends

class PresenceServerSubscriptionRegFunctor
 
class PresenceServerSubscriptionFunctor
 
class PresenceServerRegStateChangeCommand
 
class PresenceServerDocStateChangeCommand
 
class PresenceServerCheckDocExpiredCommand
 
class PresenceUserExists
 

Additional Inherited Members

- Public Types inherited from resip::InMemorySyncRegDbHandler
enum  HandlerMode { SyncServer , AllChanges }
 
- Public Types inherited from resip::InMemorySyncPubDbHandler
enum  HandlerMode { SyncServer , AllChanges }
 

Detailed Description

Definition at line 63 of file PresenceSubscriptionHandler.hxx.

Constructor & Destructor Documentation

◆ PresenceSubscriptionHandler()

PresenceSubscriptionHandler::PresenceSubscriptionHandler ( resip::DialogUsageManager &  dum,
resip::Dispatcher *  userDispatcher,
bool  presenceUsesRegistrationState,
bool  PresenceNotifyClosedStateForNonPublishedUsers 
)

Definition at line 19 of file PresenceSubscriptionHandler.cxx.

◆ ~PresenceSubscriptionHandler()

PresenceSubscriptionHandler::~PresenceSubscriptionHandler ( )
virtual

Definition at line 41 of file PresenceSubscriptionHandler.cxx.

Member Function Documentation

◆ adjustNotifyExpiresTime()

void PresenceSubscriptionHandler::adjustNotifyExpiresTime ( resip::SipMessage &  notify,
uint64_t  regMaxExpires 
)
protected

Definition at line 269 of file PresenceSubscriptionHandler.cxx.

◆ checkExpired()

void PresenceSubscriptionHandler::checkExpired ( const resip::Data &  documentKey,
const resip::Data &  eTag,
uint64_t  lastUpdated 
)
protected

Definition at line 514 of file PresenceSubscriptionHandler.cxx.

◆ checkRegistrationStateChanged()

bool PresenceSubscriptionHandler::checkRegistrationStateChanged ( const resip::Uri &  aor,
bool  registered,
uint64_t  regMaxExpires 
)
protected

Definition at line 391 of file PresenceSubscriptionHandler.cxx.

◆ continueNotifyPresenceAfterUserExistsCheck()

void PresenceSubscriptionHandler::continueNotifyPresenceAfterUserExistsCheck ( resip::ServerSubscriptionHandle  h,
bool  sendAcceptReject,
const resip::Uri &  aor,
bool  userExists 
)
protected

Definition at line 199 of file PresenceSubscriptionHandler.cxx.

◆ fabricateSimplePresence()

void PresenceSubscriptionHandler::fabricateSimplePresence ( resip::ServerSubscriptionHandle  h,
bool  sendAcceptReject,
const resip::Uri &  aor,
bool  online,
uint64_t  regMaxExpires 
)
protected

Definition at line 295 of file PresenceSubscriptionHandler.cxx.

◆ mergeETag()

bool PresenceSubscriptionHandler::mergeETag ( resip::Contents *  eTagDest,
resip::Contents *  eTagSrc,
bool  isFirst 
)
virtual

◆ notifyPresence()

void PresenceSubscriptionHandler::notifyPresence ( resip::ServerSubscriptionHandle  h,
bool  sendAcceptReject 
)
protected

Definition at line 117 of file PresenceSubscriptionHandler.cxx.

◆ notifyPresenceNoPublication()

void PresenceSubscriptionHandler::notifyPresenceNoPublication ( resip::ServerSubscriptionHandle  h,
bool  sendAcceptReject,
const resip::Uri &  aor,
bool  isRegistered,
uint64_t  regMaxExpires 
)
protected

Definition at line 161 of file PresenceSubscriptionHandler.cxx.

◆ notifySubscriptions()

void PresenceSubscriptionHandler::notifySubscriptions ( const resip::Data &  documentKey)
protected

Definition at line 508 of file PresenceSubscriptionHandler.cxx.

◆ onAorModified()

void PresenceSubscriptionHandler::onAorModified ( const resip::Uri &  aor,
const resip::ContactList &  contacts 
)
virtual

Implements resip::InMemorySyncRegDbHandler.

Definition at line 425 of file PresenceSubscriptionHandler.cxx.

◆ onDocumentModified()

void PresenceSubscriptionHandler::onDocumentModified ( bool  sync,
const resip::Data &  eventType,
const resip::Data &  documentKey,
const resip::Data &  eTag,
uint64_t  expirationTime,
uint64_t  lastUpdated,
const resip::Contents *  contents,
const resip::SecurityAttributes *  securityAttributes 
)
virtual

Definition at line 521 of file PresenceSubscriptionHandler.cxx.

◆ onDocumentRemoved()

void PresenceSubscriptionHandler::onDocumentRemoved ( bool  sync,
const resip::Data &  eventType,
const resip::Data &  documentKey,
const resip::Data &  eTag,
uint64_t  lastUpdated 
)
virtual

Definition at line 546 of file PresenceSubscriptionHandler.cxx.

◆ onError()

void PresenceSubscriptionHandler::onError ( resip::ServerSubscriptionHandle  h,
const resip::SipMessage &  msg 
)
virtual

Reimplemented from resip::ServerSubscriptionHandler.

Definition at line 111 of file PresenceSubscriptionHandler.cxx.

◆ onNewSubscription()

void PresenceSubscriptionHandler::onNewSubscription ( resip::ServerSubscriptionHandle  h,
const resip::SipMessage &  sub 
)
virtual

Implements resip::ServerSubscriptionHandler.

Definition at line 51 of file PresenceSubscriptionHandler.cxx.

◆ onPublished()

void PresenceSubscriptionHandler::onPublished ( resip::ServerSubscriptionHandle  associated,
resip::ServerPublicationHandle  publication,
const resip::Contents *  contents,
const resip::SecurityAttributes *  attrs 
)
virtual

Reimplemented from resip::ServerSubscriptionHandler.

Definition at line 85 of file PresenceSubscriptionHandler.cxx.

◆ onRefresh()

void PresenceSubscriptionHandler::onRefresh ( resip::ServerSubscriptionHandle  h,
const resip::SipMessage &  sub 
)
virtual

Reimplemented from resip::ServerSubscriptionHandler.

Definition at line 57 of file PresenceSubscriptionHandler.cxx.

◆ onTerminated()

void PresenceSubscriptionHandler::onTerminated ( resip::ServerSubscriptionHandle  h)
virtual

Implements resip::ServerSubscriptionHandler.

Definition at line 105 of file PresenceSubscriptionHandler.cxx.

◆ sendPublishedPresence()

bool PresenceSubscriptionHandler::sendPublishedPresence ( resip::ServerSubscriptionHandle  h,
bool  sendAcceptReject 
)
protected

Definition at line 251 of file PresenceSubscriptionHandler.cxx.

Friends And Related Symbol Documentation

◆ PresenceServerCheckDocExpiredCommand

◆ PresenceServerDocStateChangeCommand

◆ PresenceServerRegStateChangeCommand

◆ PresenceServerSubscriptionFunctor

◆ PresenceServerSubscriptionRegFunctor

◆ PresenceUserExists

Member Data Documentation

◆ mDum

resip::DialogUsageManager& repro::PresenceSubscriptionHandler::mDum
protected

Definition at line 96 of file PresenceSubscriptionHandler.hxx.

◆ mOnlineAors

std::set<resip::Uri> repro::PresenceSubscriptionHandler::mOnlineAors
protected

Definition at line 118 of file PresenceSubscriptionHandler.hxx.

◆ mPresenceNotifyClosedStateForNonPublishedUsers

bool repro::PresenceSubscriptionHandler::mPresenceNotifyClosedStateForNonPublishedUsers
protected

Definition at line 116 of file PresenceSubscriptionHandler.hxx.

◆ mPresenceUsesRegistrationState

bool repro::PresenceSubscriptionHandler::mPresenceUsesRegistrationState
protected

Definition at line 115 of file PresenceSubscriptionHandler.hxx.

◆ mPublicationDb

resip::InMemorySyncPubDb* repro::PresenceSubscriptionHandler::mPublicationDb
protected

Definition at line 97 of file PresenceSubscriptionHandler.hxx.

◆ mRegistrationDb

resip::InMemorySyncRegDb* repro::PresenceSubscriptionHandler::mRegistrationDb
protected

Definition at line 98 of file PresenceSubscriptionHandler.hxx.

◆ mUserDispatcher

resip::Dispatcher* repro::PresenceSubscriptionHandler::mUserDispatcher
protected

Definition at line 117 of file PresenceSubscriptionHandler.hxx.


The documentation for this class was generated from the following files: