1
#if !defined ServerSubscriptionEvent_hxx
2
#define ServerSubscriptionEvent_hxx
4
#include "resip/stack/SipMessage.hxx"
5
#include "tfm/Event.hxx"
6
#include "tfm/tfdum/DumEvent.hxx"
12
ServerSubscription_Refresh,
13
ServerSubscription_Published,
14
ServerSubscription_Error,
15
ServerSubscription_ExpiredByClient,
16
ServerSubscription_Expired,
17
ServerSubscription_Terminated,
18
ServerSubscription_NewSubscription,
19
ServerSubscription_NewSubscriptionFromRefer,
20
ServerSubscription_ReadyToSend
21
} ServerSubscriptionEventType;
23
static const char* ServerSubscriptionEventTypeText[] =
32
"New Subscription From Refer",
36
class ServerSubscriptionEvent : public DumEvent
39
typedef ServerSubscriptionEventType Type;
40
typedef resip::ServerSubscriptionHandle HandleType;
42
ServerSubscriptionEvent(DumUserAgent* dua, Type type, resip::ServerSubscriptionHandle h)
49
ServerSubscriptionEvent(DumUserAgent* dua, Type type, resip::ServerSubscriptionHandle h, const resip::SipMessage& msg)
56
ServerSubscriptionEvent(DumUserAgent* dua, Type type, resip::ServerSubscriptionHandle h, resip::ServerPublicationHandle pub,
57
const resip::Contents* contents, const resip::SecurityAttributes* attrs)
61
mServerPublication(pub)
65
virtual resip::Data toString() const
69
resip::DataStream strm(buffer);
70
strm << "ServerSubscriptionEvent - " << ServerSubscriptionEventTypeText[mType];
75
virtual resip::Data briefString() const
80
static resip::Data getName() { return "ServerSubscriptionEvent"; }
81
static resip::Data getTypeName(Type type) { return ServerSubscriptionEventTypeText[type]; }
83
Type getType() const { return mType; }
85
resip::ServerSubscriptionHandle& getHandle() { return mHandle; }
90
resip::ServerSubscriptionHandle mHandle;
91
resip::ServerPublicationHandle mServerPublication;