1 |
#if !defined(RESIP_DIALOG_ID_HXX) |
2 |
#define RESIP_DIALOG_ID_HXX |
3 |
|
4 |
#include "resiprocate/os/Data.hxx" |
5 |
#include "resiprocate/dum/DialogSetId.hxx" |
6 |
|
7 |
namespace resip |
8 |
{ |
9 |
|
10 |
class DialogId |
11 |
{ |
12 |
public: |
13 |
DialogId(const SipMessage& msg ); |
14 |
DialogId(const Data& callId, const Data& localTag, const Data& remoteTag ); |
15 |
DialogId(const DialogSetId id, const Data& remoteTag ); |
16 |
|
17 |
bool operator==(const DialogId& rhs) const; |
18 |
bool operator!=(const DialogId& rhs) const; |
19 |
bool operator<(const DialogId& rhs) const; |
20 |
|
21 |
const DialogSetId& getDialogSetId() const; |
22 |
|
23 |
const Data& getCallId() const { return getDialogSetId().getCallId(); } |
24 |
const Data& getLocalTag() const { return getDialogSetId().getLocalTag(); } |
25 |
const Data& getRemoteTag() const { return mRemoteTag; } |
26 |
|
27 |
size_t hash() const; |
28 |
|
29 |
#if defined(HASH_MAP_NAMESPACE) |
30 |
friend struct HASH_MAP_NAMESPACE::hash<resip::DialogId>; |
31 |
#elif defined(__INTEL_COMPILER ) |
32 |
friend size_t hash_value(const resip::DialogId& id); |
33 |
#endif |
34 |
|
35 |
private: |
36 |
DialogSetId mDialogSetId; |
37 |
Data mRemoteTag; |
38 |
}; |
39 |
} |
40 |
#if defined(HASH_MAP_NAMESPACE) |
41 |
namespace HASH_MAP_NAMESPACE |
42 |
{ |
43 |
struct hash<resip::DialogId> |
44 |
{ |
45 |
size_t operator()(const resip::DialogId& id) const; |
46 |
}; |
47 |
} |
48 |
#elif defined(__INTEL_COMPILER) |
49 |
namespace std { size_t hash_value(const resip::DialogId& id); } |
50 |
#endif |
51 |
|
52 |
|
53 |
#endif |