14#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
18 mUserAgent(userAgent),
19 mSubscriptionHandle(handle),
34 return mSubscriptionHandle;
48UserAgentClientSubscription::notifyReceived(
const Data& notifyData)
50 size_t hash = notifyData.
hash();
51 if(hash != mLastNotifyHash)
53 mLastNotifyHash = hash;
64 InfoLog(<<
"onUpdatePending(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg.
brief());
80 InfoLog(<<
"onUpdateActive(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg.
brief());
96 InfoLog(<<
"onUpdateExtension(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg.
brief());
112 unsigned int statusCode = 0;
118 if (statusCode >= 300)
120 WarningLog(<<
"onTerminated(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg->
brief());
124 InfoLog(<<
"onTerminated(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg->
brief());
129 InfoLog(<<
"onTerminated(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg->
brief());
138 WarningLog(<<
"onTerminated(ClientSubscriptionHandle): handle=" << mSubscriptionHandle);
147 InfoLog(<<
"onNewSubscription(ClientSubscriptionHandle): handle=" << mSubscriptionHandle <<
", " << msg.
brief());
#define WarningLog(args_)
static const Data bodyData("Body")
virtual void onUpdateActive(resip::ClientSubscriptionHandle h, const resip::SipMessage ¬ify, bool outOfOrder)
UserAgentClientSubscription(UserAgent &userAgent, resip::DialogUsageManager &dum, unsigned int handle)
virtual void onNewSubscription(resip::ClientSubscriptionHandle h, const resip::SipMessage ¬ify)
virtual void onUpdatePending(resip::ClientSubscriptionHandle h, const resip::SipMessage ¬ify, bool outOfOrder)
virtual int onRequestRetry(resip::ClientSubscriptionHandle h, int retryMinimum, const resip::SipMessage ¬ify)
SubscriptionHandle getSubscriptionHandle()
virtual ~UserAgentClientSubscription()
virtual void onTerminated(resip::ClientSubscriptionHandle h, const resip::SipMessage *notify)
virtual void onUpdateExtension(resip::ClientSubscriptionHandle, const resip::SipMessage ¬ify, bool outOfOrder)
This class is one of two main classes of concern to an application using the UserAgent library.
virtual void onSubscriptionNotify(SubscriptionHandle handle, const resip::Data ¬ifyData)
Callback used when a subscription has received an event notification from the server.
void unregisterSubscription(UserAgentClientSubscription *)
std::shared_ptr< UserAgentMasterProfile > getUserAgentMasterProfile() const noexcept
void registerSubscription(UserAgentClientSubscription *)
virtual void onSubscriptionTerminated(SubscriptionHandle handle, unsigned int statusCode)
Callback used when a subscription is terminated.
virtual Data getBodyData() const
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
size_t hash() const
Creates a 32-bit hash based on the contents of this Data.
virtual Brief brief() const
return a facet for brief encoding of message
Represents a SIP message.
Contents * getContents() const
Retrieves the body of a SIP message.
const RequestLine & header(const RequestLineType &l) const
Returns the RequestLine. This is only valid for request messages.
bool isResponse() const
Returns true if message is a response, false otherwise.
unsigned int SubscriptionHandle
dcm! – add UnusedChecking(_enum) below;
StatusLineType h_StatusLine