|
1 /* |
|
2 * Copyright (c) 2005-2006 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: This observer is used by |
|
15 * ECOM clients to get function call from the availability Plug-in |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MUSAVASIPOBSERVERIMP_H__ |
|
22 #define __MUSAVASIPOBSERVERIMP_H__ |
|
23 |
|
24 #include "musavasipadapter.h" |
|
25 #include "musavasipconnectionadapter.h" |
|
26 #include "musunittesting.h" |
|
27 #include <sipconnection.h> |
|
28 #include <e32base.h> |
|
29 #include <e32def.h> |
|
30 |
|
31 #ifdef MUS_UNITTEST |
|
32 #undef IMPORT_C |
|
33 #define IMPORT_C |
|
34 #endif |
|
35 |
|
36 /** |
|
37 * MusAvailability Observer base class |
|
38 * |
|
39 * Observer interface for ECOM clients. |
|
40 * |
|
41 * @lib musavailabilityplugin.lib |
|
42 * @since S60 v3.2 |
|
43 */ |
|
44 |
|
45 class CMusAvaSipAdapterImp : public CBase, |
|
46 public MMusAvaSipAdapter, |
|
47 public MMusAvaSipConnectionAdapter |
|
48 |
|
49 { |
|
50 public: |
|
51 |
|
52 enum |
|
53 { |
|
54 }; |
|
55 |
|
56 /** |
|
57 * Two-phased constructor |
|
58 * |
|
59 * @since S60 v3.2 |
|
60 * @param |
|
61 * @return Returns pointer to CMusAvaController object |
|
62 */ |
|
63 |
|
64 static CMusAvaSipAdapterImp* NewL( ); |
|
65 |
|
66 /** |
|
67 * Destructor |
|
68 * |
|
69 * @since S60 v3.2 |
|
70 * @param |
|
71 * @return |
|
72 */ |
|
73 |
|
74 ~CMusAvaSipAdapterImp(); |
|
75 |
|
76 protected: |
|
77 |
|
78 /** |
|
79 * Constructor |
|
80 * |
|
81 * @since S60 v3.2 |
|
82 * @return |
|
83 */ |
|
84 |
|
85 CMusAvaSipAdapterImp( ); |
|
86 |
|
87 /** |
|
88 * Perform the second phase construction of a |
|
89 * CMusAvaController object |
|
90 * |
|
91 * @since S60 v3.2 |
|
92 * @param |
|
93 * @return |
|
94 */ |
|
95 |
|
96 void ConstructL(); |
|
97 |
|
98 public: // from base class MMusAvaSipAdapter |
|
99 |
|
100 TInt IncomingRequest( TUint32 aIapId, |
|
101 CSIPServerTransaction* aTransaction ); |
|
102 |
|
103 TInt TimedOut( CSIPServerTransaction& aTransaction ); |
|
104 |
|
105 public: // from base class MMusAvaSipConnectionAdapter |
|
106 |
|
107 TInt IncomingRequest( CSIPServerTransaction* aTransaction ); |
|
108 |
|
109 TInt IncomingRequest( CSIPServerTransaction* aTransaction, |
|
110 CSIPDialog& aDialog ); |
|
111 |
|
112 TInt IncomingResponse( CSIPClientTransaction& aTransaction ); |
|
113 |
|
114 TInt IncomingResponse ( |
|
115 CSIPClientTransaction& aTransaction, |
|
116 CSIPDialogAssocBase& aDialogAssoc ); |
|
117 |
|
118 TInt IncomingResponse( |
|
119 CSIPClientTransaction& aTransaction, |
|
120 CSIPInviteDialogAssoc* aDialogAssoc ); |
|
121 |
|
122 TInt IncomingResponse( CSIPClientTransaction& aTransaction, |
|
123 CSIPRegistrationBinding& aRegistration ); |
|
124 |
|
125 TInt ErrorOccured( TInt aError, |
|
126 CSIPTransactionBase& aTransaction ); |
|
127 |
|
128 TInt ErrorOccured( TInt aError, |
|
129 CSIPClientTransaction& aTransaction, |
|
130 CSIPRegistrationBinding& aRegistration ); |
|
131 TInt ErrorOccured( TInt aError, |
|
132 CSIPTransactionBase& aTransaction, |
|
133 CSIPDialogAssocBase& aDialogAssoc ); |
|
134 |
|
135 TInt ErrorOccured( TInt aError, CSIPRefresh& aSIPRefresh ); |
|
136 |
|
137 TInt ErrorOccured( TInt aError, CSIPRegistrationBinding& aRegistration ); |
|
138 |
|
139 TInt ErrorOccured( TInt aError, |
|
140 CSIPDialogAssocBase& aDialogAssoc ) ; |
|
141 |
|
142 TInt InviteCompleted( CSIPClientTransaction& aTransaction ); |
|
143 |
|
144 TInt InviteCanceled( CSIPServerTransaction& aTransaction ); |
|
145 |
|
146 TInt ConnectionStateChanged( CSIPConnection::TState aState ); |
|
147 |
|
148 public: |
|
149 |
|
150 void Reset(); |
|
151 void CleanServerTransaction(); |
|
152 void SetServerTransaction( CSIPServerTransaction& aTransaction ); |
|
153 void SetServerTransaction( CSIPServerTransaction* aTransaction ); |
|
154 |
|
155 public: |
|
156 |
|
157 CSIPClientTransaction* iClientTransaction; |
|
158 CSIPServerTransaction* iServerTransaction; |
|
159 CSIPConnection::TState iState; |
|
160 TInt iError; |
|
161 CSIPRegistrationBinding* iRegBinding; |
|
162 CSIPRefresh* iRefresh; |
|
163 CSIPDialogAssocBase* iDialogAssoc; |
|
164 CSIPDialog* iDialog; |
|
165 TUint32 iIapId; |
|
166 CSIPInviteDialogAssoc* iInviteAssoc; |
|
167 CSIPTransactionBase* iTransaction; |
|
168 TBool iServerTransctionOwned; |
|
169 TInt iReturnCode; |
|
170 }; |
|
171 |
|
172 |
|
173 #endif // __MUSAVASIPOBSERVERIMP_H__ |
|
174 |