|
1 /* |
|
2 * Copyright (c) 2008 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 file contains the header file of the |
|
15 * : CSsServiceHandlerVoip class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CSSSERVICEHANDLERVOIP_H |
|
22 #define CSSSERVICEHANDLERVOIP_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "cservicehandler.h" |
|
26 #include <e32base.h> |
|
27 #include <badesca.h> |
|
28 #include <AknIconArray.h> |
|
29 #include <gulicon.h> |
|
30 |
|
31 // CONSTANTS |
|
32 //None |
|
33 |
|
34 // MACROS |
|
35 //None |
|
36 |
|
37 // DATA TYPES |
|
38 //None. |
|
39 |
|
40 // FUNCTION PROTOTYPES |
|
41 //None |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 class CSsConnectionHandler; |
|
45 class CSsUiUtilities; |
|
46 class CSsSettingsHandler; |
|
47 class CSPSettingsVoIPUtils; |
|
48 class CSsBsHandler; |
|
49 |
|
50 // CLASS DECLARATION |
|
51 |
|
52 /** |
|
53 * VoIP service handler class for service selector |
|
54 * |
|
55 * @lib ServiceSelector.lib |
|
56 * @since Series60_5.0 |
|
57 */ |
|
58 NONSHARABLE_CLASS( CSsServiceHandlerVoip ) |
|
59 : public CServiceHandler |
|
60 { |
|
61 public: // Constructors and destructor |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 */ |
|
66 static CSsServiceHandlerVoip* NewL(); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 virtual ~CSsServiceHandlerVoip(); |
|
72 |
|
73 public: // New functions |
|
74 |
|
75 |
|
76 protected: // New functions |
|
77 |
|
78 /** |
|
79 * From MServiceHandler |
|
80 */ |
|
81 void ExecuteServiceSelectionL( |
|
82 CConvergedServiceSelector::TSsResult& aResult, |
|
83 CConvergedServiceSelector::TSsCallType aCallType, |
|
84 TUint aServiceId, |
|
85 TBool aSendKey, |
|
86 const TDesC& aString = KNullDesC ); |
|
87 |
|
88 private: // New functions |
|
89 |
|
90 /** |
|
91 * Gets calling service by known service id. |
|
92 * @param aResult Selection results are returned by this param. |
|
93 * @param aServiceId Current service id of the call. |
|
94 * @param aSendKey Is sendkey used for call. |
|
95 * @param aString Known number/address. |
|
96 */ |
|
97 void GetServiceByServiceId( |
|
98 CConvergedServiceSelector::TSsResult& aResult, |
|
99 TUint aServiceId, |
|
100 TBool aSendKey, |
|
101 const TDesC& aString ) const; |
|
102 |
|
103 /** |
|
104 * Gets calling service without service id. |
|
105 * Leaves on failure. |
|
106 * -Leaves with KErrCancel if some user query canceled by |
|
107 * the user |
|
108 * @param aResult Selection results are returned by this param. |
|
109 */ |
|
110 void GetCallingServiceL( |
|
111 CConvergedServiceSelector::TSsResult& aResult ); |
|
112 |
|
113 /** |
|
114 * Fills results by parameters and shows list query for the user |
|
115 * if more that one possible service available. |
|
116 * Leaves on failure. |
|
117 * -Leaves with KErrCancel if some user query canceled by |
|
118 * the user. |
|
119 * @param aResult Selection results are returned by this param. |
|
120 * @param aServices Known service id's. |
|
121 * @param aRegistered Services registered or not. |
|
122 */ |
|
123 void SelectServiceL( |
|
124 CConvergedServiceSelector::TSsResult& aResult, |
|
125 RArray<TUint>& aServices, |
|
126 TBool aRegistered ); |
|
127 |
|
128 /** |
|
129 * Returns reference to uiutilities class |
|
130 * @return UiUtils class. |
|
131 */ |
|
132 CSsUiUtilities& UiUtilitiesL(); |
|
133 |
|
134 /** |
|
135 * Returns reference to settings handler class |
|
136 * @return SettingsHandler class. |
|
137 */ |
|
138 CSsSettingsHandler& SettingsHandlerL(); |
|
139 |
|
140 /** |
|
141 * Returns reference to branding handler class |
|
142 * @return CSsBsHandler class. |
|
143 */ |
|
144 CSsBsHandler& BrandingHandlerL(); |
|
145 |
|
146 /** |
|
147 * Checks should voip call be changed as cs voice call. |
|
148 * @param aServices Known service id. |
|
149 * @param aString Known number/address. |
|
150 * @return ETrue if CS voice call should be made. |
|
151 */ |
|
152 TBool ChangeTypeAsCsVoice( |
|
153 TUint aServiceId, |
|
154 const TDesC& aString ) const; |
|
155 |
|
156 /** |
|
157 * Adds icon to the list. |
|
158 * @param aIcons On completion, contains new icon |
|
159 * @param aServiceId Used Service Id |
|
160 * @param aIconId On completion, contains icon's icon list id |
|
161 */ |
|
162 void AddBrandIconL( CArrayPtr<CGulIcon>* aIcons, |
|
163 TUint aServiceId, |
|
164 TInt& aIconId ); |
|
165 |
|
166 /** |
|
167 * Gets item text array and icons for the query list box |
|
168 * by service id list. |
|
169 * @param aServices Used Services. |
|
170 * @param aLbxItems On completion, contains list box item texts. |
|
171 * @param aIcons On completion, contains list icons. |
|
172 */ |
|
173 void GetListBoxItemsAndIconsL( |
|
174 RArray<TUint>& aServices, |
|
175 CDesCArrayFlat* aLbxItems, |
|
176 CArrayPtr<CGulIcon>* aIcons ); |
|
177 |
|
178 /** |
|
179 * Gets branded bitmap for service. |
|
180 * @param aServiceId Used Service Id. |
|
181 * @param aBrandedBitmap Branded bitmap. |
|
182 * @param aBrandedBitmapMask Bitmap mask. |
|
183 */ |
|
184 void GetBrandIconL( TUint aServiceId, |
|
185 CFbsBitmap*& aBrandedBitmap, |
|
186 CFbsBitmap*& aBrandedBitmapMask ); |
|
187 |
|
188 private: |
|
189 |
|
190 /** |
|
191 * C++ default constructor. |
|
192 */ |
|
193 CSsServiceHandlerVoip(); |
|
194 |
|
195 /** |
|
196 * By default Symbian 2nd phase constructor is private. |
|
197 */ |
|
198 void ConstructL(); |
|
199 |
|
200 |
|
201 private: // Data |
|
202 |
|
203 // Pointer to Connection Handler |
|
204 CSsConnectionHandler* iConnectionHandler; |
|
205 |
|
206 // Pointer to UI Utils |
|
207 CSsUiUtilities* iUiUtils; |
|
208 |
|
209 // Pointer to Settings handler |
|
210 CSsSettingsHandler* iSettings; |
|
211 |
|
212 // Pointer to voip utils |
|
213 CSPSettingsVoIPUtils* iVoipUtils; |
|
214 |
|
215 // Pointer to branding handler |
|
216 CSsBsHandler* iBsHandler; |
|
217 }; |
|
218 |
|
219 #endif // CSSSERVICEHANDLERVOIP_H |
|
220 |
|
221 // End of File |