/[resiprocate]/main/resip/dum/Dialog.cxx
ViewVC logotype

Contents of /main/resip/dum/Dialog.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2521 - (show annotations) (download)
Sun Apr 4 00:42:43 2004 UTC (15 years, 8 months ago) by ken
Original Path: main/sip/resiprocate/dum/Dialog.cxx
File size: 2201 byte(s)
-Check both server and client side usages.

1 #include "resiprocate/sam/nnDialog.hxx"
2
3 using namespace resip;
4 using namespace std;
5
6 DialogId Dialog;:getId() const
7 {
8 return mId;
9 }
10
11 BaseUsage&
12 Dialog::findInvSession()
13 {
14 std::list<BaseUsage*>::iterator it = mUsages.begin();
15 BaseUsage *usage;
16 while (it != mUsages.end())
17 {
18 usage = it.next();
19 if ((dynamic_cast<ClientInviteSession*>(usage) != null) ||
20 (dynamic_cast<ServerInviteSession*>(usage) != null))
21 {
22 return *usage;
23 }
24 }
25 return BaseUsage::empty();
26 }
27
28 UsageSet
29 Dialog::findSubscriptions()
30 {
31 std::list<BaseUsage*>::iterator it = mUsages.begin();
32 BaseUsage *usage;
33 UsageSet usageSet;
34 while (it != mUsages.end())
35 {
36 usage = it.next();
37 if ((dynamic_cast<ClientSubscription*>(usage) != null) ||
38 (dynamic_cast<ServerSubscription*>(usage) != null))
39 {
40 usageSet.push_back(*usage);
41 }
42 }
43 return usageSet:
44 }
45
46 BaseUsage&
47 Dialog::findRegistration()
48 {
49 std::list<BaseUsage*>::iterator it = mUsages.begin();
50 BaseUsage *usage;
51 while (it != mUsages.end())
52 {
53 usage = it.next();
54 if ((dynamic_cast<CientRegistration*>(usage) != null) ||
55 (dynamic_cast<ServerRegistration*>(usage) != null))
56 {
57 return *usage;
58 }
59 }
60 return BaseUsage::empty();
61 }
62
63
64 BaseUsage&
65 Dialog::findPublication()
66 {
67 std::list<BaseUsage*>::iterator it = mUsages.begin();
68 BaseUsage *usage;
69 while (it != mUsages.end())
70 {
71 usage = it.next();
72 if ((dynamic_cast<CientPublication*>(usage) != null) ||
73 (dynamic_cast<ServerPublication*>(usage) != null))
74 {
75 return *usage;
76 }
77 }
78 return BaseUsage::empty();
79 }
80
81 UsageSet
82 Dialog::findOutOfDialogs()
83 {
84 std::list<BaseUsage*>::iterator it = mUsages.begin();
85 BaseUsage *usage;
86 UsageSet usageSet;
87 while (it != mUsages.end())
88 {
89 usage = it.next();
90 if ((dynamic_cast<ClientOutOfDialogReq*>(usage) != null) ||
91 (dynamic_cast<ServerOutOfDialogReq*>(usage) != null))
92 {
93 usageSet.push_back(*usage);
94 }
95 }
96 return usageSet:
97 }

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27