/usr/include/resip/dum/DialogEventStateManager.hxx is in libresiprocate-1.11-dev 1:1.11.0~beta5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #if !defined(RESIP_DialogEventStateManager_HXX)
#define RESIP_DialogEventStateManager_HXX
#include "resip/dum/DialogEventInfo.hxx"
#include "resip/dum/DialogEventHandler.hxx"
#include "resip/dum/InviteSessionHandler.hxx"
#include "resip/dum/Dialog.hxx"
#include "resip/dum/DialogSet.hxx"
namespace resip
{
/**
* Implements the FSM for dialog state as spec'd in RFC 4235.
* Called from DialogSet, ClientInviteSession, and ServerInviteSession.
*/
class DialogEventStateManager
{
public:
typedef std::vector<DialogEventInfo> DialogEventInfos;
DialogEventInfos getDialogEventInfo() const;
DialogEventInfos getDialogEventInfo(const Uri& entityUri, bool bMatchRemoteIdentityOnly = false) const;
virtual ~DialogEventStateManager();
private:
DialogEventStateManager();
void onTryingUas(Dialog& dialog, const SipMessage& invite);
void onTryingUac(DialogSet& dialogSet, const SipMessage& invite);
void onProceedingUac(const DialogSet& dialogSet, const SipMessage& response);
//?dcm? how is direction determined when the onEarly is the first use of
//this dialog?
void onEarly(const Dialog& dialog, InviteSessionHandle is);
void onConfirmed(const Dialog& dialog, InviteSessionHandle is);
void onTerminated(const Dialog& dialog, const SipMessage& msg, InviteSessionHandler::TerminatedReason reason);
void onTerminated(const DialogSet& dialogSet, const SipMessage& msg, InviteSessionHandler::TerminatedReason reason);
// order by DialogSet, such that the following ordering occurs
// DialogSetId remoteTag
// a null
// a 1
// a 2
// b 1
// b 2
class DialogIdComparator
{
public:
bool operator()(const DialogId& x, const DialogId& y) const
{
if (x.getDialogSetId() == y.getDialogSetId())
{
return (x.getRemoteTag() < y.getRemoteTag());
}
return (x.getDialogSetId() < y.getDialogSetId());
}
};
DialogEventInfo* findOrCreateDialogInfo(const Dialog& dialog);
void onDialogSetTerminatedImpl(const DialogSetId& dialogSetId, const SipMessage& msg, InviteSessionHandler::TerminatedReason reason);
TerminatedDialogEvent* onDialogTerminatedImpl(DialogEventInfo* eventInfo, InviteSessionHandler::TerminatedReason reason,
int responseCode = 0, Uri* remoteTarget = NULL);
static int getResponseCode(const SipMessage& msg);
static Uri* getFrontContact(const SipMessage& msg);
private:
friend class DialogUsageManager;
friend class ServerInviteSession;
friend class ClientInviteSession;
friend class InviteSession;
friend class DialogSet;
// disabled
DialogEventStateManager(const DialogEventStateManager& orig);
// .jjg. we'll only have the DialogSetId if we aren't yet in the 'early' state;
// once we get to early, we'll remove the DialogSetId in favour of the DialogId.
// The comparator/key of the map must have an ordering so that a key can be
// contructed which points to the beginning of a dialogSet. This could be done by
// no remote tag being always, which might be the existing behaviour, but
// shouldn't be relied on.
std::map<DialogId, DialogEventInfo*, DialogIdComparator> mDialogIdToEventInfo;
DialogEventHandler* mDialogEventHandler;
};
}
#endif
|