|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: See class definition below. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __TTCSIPRECEIVED_H__ |
|
19 #define __TTCSIPRECEIVED_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CSIPClientTransaction; |
|
26 class CSIPDialog; |
|
27 class CSIPDialogAssocBase; |
|
28 class CSIPInviteDialogAssoc; |
|
29 class CSIPSubscribeDialogAssoc; |
|
30 class CSIPNotifyDialogAssoc; |
|
31 class CSIPReferDialogAssoc; |
|
32 class CSIPRefresh; |
|
33 class CSIPRegistrationBinding; |
|
34 class CSIPServerTransaction; |
|
35 class CSIPTransactionBase; |
|
36 |
|
37 // CLASS DEFINITION |
|
38 /** |
|
39 * TTcSIPReceived implements a container class for SIP notification messages. |
|
40 * Objects of this class are created and stored in CSIPConnection observer |
|
41 * functions. |
|
42 */ |
|
43 class TTcSIPReceived |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /// Possible SIP events |
|
48 enum TTcSIPEvent |
|
49 { |
|
50 ENone, |
|
51 EIncomingRequest, |
|
52 EIncomingResponse, |
|
53 EErrorOccured, |
|
54 EInviteCompleted, |
|
55 EInviteCanceled |
|
56 }; |
|
57 |
|
58 /// Default constructor |
|
59 TTcSIPReceived(); |
|
60 |
|
61 /// Destructor |
|
62 ~TTcSIPReceived(); |
|
63 |
|
64 public: // New methods |
|
65 |
|
66 /** |
|
67 * Set SIP client transaction object pointer. |
|
68 * |
|
69 * @param aTransaction SIP client transaction |
|
70 */ |
|
71 void Set( const CSIPClientTransaction* aTransaction ); |
|
72 |
|
73 /** |
|
74 * Set SIP dialog object pointer. |
|
75 * |
|
76 * @param aDialog SIP dialog |
|
77 */ |
|
78 void Set( const CSIPDialog* aDialog ); |
|
79 |
|
80 /** |
|
81 * Set SIP dialog association object pointer. |
|
82 * |
|
83 * @param aDialogAssoc SIP dialog association |
|
84 */ |
|
85 void Set( const CSIPDialogAssocBase* aDialogAssoc ); |
|
86 |
|
87 /** |
|
88 * Set SIP dialog association object pointer. |
|
89 * |
|
90 * @param aDialogAssoc SIP dialog association |
|
91 */ |
|
92 void Set( const CSIPInviteDialogAssoc* aDialogAssoc ); |
|
93 |
|
94 /** |
|
95 * Set SIP dialog association object pointer. |
|
96 * |
|
97 * @param aDialogAssoc SIP dialog association |
|
98 */ |
|
99 void Set( const CSIPNotifyDialogAssoc* aDialogAssoc ); |
|
100 |
|
101 /** |
|
102 * Set SIP dialog association object pointer. |
|
103 * |
|
104 * @param aDialogAssoc SIP dialog association |
|
105 */ |
|
106 void Set( const CSIPReferDialogAssoc* aDialogAssoc ); |
|
107 |
|
108 /** |
|
109 * Set SIP refresh object pointer. |
|
110 * |
|
111 * @param aRefresh SIP refresh |
|
112 */ |
|
113 void Set( const CSIPRefresh* aRefresh ); |
|
114 |
|
115 /** |
|
116 * Set SIP registration object pointer. |
|
117 * |
|
118 * @param aRegistration SIP registration |
|
119 */ |
|
120 void Set( const CSIPRegistrationBinding* aRegistration ); |
|
121 |
|
122 /** |
|
123 * Set SIP server transaction object pointer. |
|
124 * |
|
125 * @param aTransaction SIP server transaction |
|
126 */ |
|
127 void Set( const CSIPServerTransaction* aTransaction ); |
|
128 |
|
129 /** |
|
130 * Set SIP transaction object pointer. |
|
131 * |
|
132 * @param aTransactionBase SIP transaction |
|
133 */ |
|
134 void Set( const CSIPTransactionBase* aTransactionBase ); |
|
135 |
|
136 /** |
|
137 * Set Internet Access Point ID. |
|
138 * |
|
139 * @param aIapId Internet Access Point ID |
|
140 */ |
|
141 void Set( TInt aIapId ); |
|
142 |
|
143 /** |
|
144 * Set error code |
|
145 * |
|
146 * @param aError System-wide or SIP specific error code |
|
147 */ |
|
148 void SetError( TInt aError ); |
|
149 |
|
150 /** |
|
151 * Set received event |
|
152 * |
|
153 * @param aEvent |
|
154 */ |
|
155 void SetEvent( TTcSIPEvent aEvent ); |
|
156 |
|
157 public: // Data |
|
158 |
|
159 /// SIP client transaction pointer. Not owned. |
|
160 const CSIPClientTransaction* iClientTransaction; |
|
161 |
|
162 /// SIP dialog pointer. Not owned. |
|
163 const CSIPDialog* iDialog; |
|
164 |
|
165 /// SIP invite dialog association pointer. Not owned. |
|
166 const CSIPInviteDialogAssoc* iInviteDialogAssoc; |
|
167 |
|
168 /// SIP notify dialog association pointer. Not owned. |
|
169 const CSIPNotifyDialogAssoc* iNotifyDialogAssoc; |
|
170 |
|
171 /// SIP subscribe dialog association pointer. Not owned. |
|
172 const CSIPSubscribeDialogAssoc* iSubscribeDialogAssoc; |
|
173 |
|
174 /// SIP refer dialog association pointer. Not owned. |
|
175 const CSIPReferDialogAssoc* iReferDialogAssoc; |
|
176 |
|
177 /// SIP refresh pointer. Not owned. |
|
178 const CSIPRefresh* iRefresh; |
|
179 |
|
180 /// SIP registration pointer. Not owned. |
|
181 const CSIPRegistrationBinding* iRegistration; |
|
182 |
|
183 /// SIP server transaction pointer. Not owned. |
|
184 const CSIPServerTransaction* iServerTransaction; |
|
185 |
|
186 /// SIP transaction pointer. Not owned. |
|
187 const CSIPTransactionBase* iTransactionBase; |
|
188 |
|
189 /// Internet Access Point ID |
|
190 TInt iIapId; |
|
191 |
|
192 /// System-wide or SIP specific error code |
|
193 TInt iError; |
|
194 |
|
195 /// SIP event |
|
196 TTcSIPEvent iEvent; |
|
197 |
|
198 }; |
|
199 |
|
200 #endif // __TTCSIPRECEIVED_H__ |