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

Contents of /main/sip/resiprocate/dum/Dialog.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2520 - (show annotations) (download)
Sat Apr 3 23:54:45 2004 UTC (15 years, 9 months ago) by ken
File size: 2000 byte(s)
-First cut of Dialog implementation.

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 {
21 return *usage;
22 }
23 }
24 // FixMe: is it possible not to have an invite session?
25 assert(0);
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 {
39 usageSet.push_back(*usage);
40 }
41 }
42 return usageSet:
43 }
44
45 BaseUsage&
46 Dialog::findRegistration()
47 {
48 std::list<BaseUsage*>::iterator it = mUsages.begin();
49 BaseUsage *usage;
50 while (it != mUsages.end())
51 {
52 usage = it.next();
53 if (dynamic_cast<CientRegistration*>(usage) != null)
54 {
55 return *usage;
56 }
57 }
58 // FixMe: is it possible not to have a registration?
59 assert(0);
60 }
61
62
63 BaseUsage&
64 Dialog::findPublication()
65 {
66 std::list<BaseUsage*>::iterator it = mUsages.begin();
67 BaseUsage *usage;
68 while (it != mUsages.end())
69 {
70 usage = it.next();
71 if (dynamic_cast<CientPublication*>(usage) != null)
72 {
73 return *usage;ppppppppp
74 }
75 }
76 // FixMe: is it possible not to have a publication?
77 assert(0);
78 }
79
80 UsageSet
81 Dialog::findOutOfDialogs()
82 {
83 std::list<BaseUsage*>::iterator it = mUsages.begin();
84 BaseUsage *usage;
85 UsageSet usageSet;
86 while (it != mUsages.end())
87 {
88 usage = it.next();
89 if (dynamic_cast<ClientOutOfDialogReq*>(usage) != null)
90 {
91 usageSet.push_back(*usage);
92 }
93 }
94 return usageSet:
95 }

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27