|
1 /* |
|
2 * Copyright (c) 2004-2005 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: Parameter class definitions. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHCLTBASEPARAMS_H |
|
20 #define CPHCLTBASEPARAMS_H |
|
21 |
|
22 #include <CPhCltImageParams.h> |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 /** |
|
27 * Logo types |
|
28 * |
|
29 * @since Series60 3.0 |
|
30 * |
|
31 * EPhCltLogoTypeOTA - OTA operator logo |
|
32 * EPhCltLogoTypeProgrammable - programmable operator logo |
|
33 */ |
|
34 enum TPhCltExtOperatorLogoType |
|
35 { |
|
36 EPhCltLogoTypeOTA, |
|
37 EPhCltLogoTypeProgrammable |
|
38 }; |
|
39 |
|
40 // Country code type definition. |
|
41 typedef TInt TPhCltCountryCode; |
|
42 |
|
43 // Network code type definition. |
|
44 typedef TInt TPhCltNetworkCode; |
|
45 |
|
46 // Constant to be used when deleting operator logo(s). |
|
47 const TInt KPhCltDeleteOperatorLogo = 0; |
|
48 |
|
49 struct TTelephonyOTALogoUpdate |
|
50 { |
|
51 /** |
|
52 * EPSTelephonyLogoChanged - Logo was added or replaced |
|
53 * EPSTelephonyLogoDeleted - Logo was deleted |
|
54 */ |
|
55 enum TPSOperatorLogoUpdateEvent |
|
56 { |
|
57 EPSTelephonyLogoChanged, |
|
58 EPSTelephonyLogoDeleted, |
|
59 EPSTelephonyAllLogosDeleted |
|
60 }; |
|
61 |
|
62 // Event type |
|
63 TPSOperatorLogoUpdateEvent iEvent; |
|
64 |
|
65 /** |
|
66 * Country code associated to logo, N/A if event |
|
67 * is EPSTelephonyAllLogosDeleted |
|
68 */ |
|
69 TPhCltCountryCode iMCC; |
|
70 |
|
71 /** |
|
72 * Network code associated to logo, N/A if event |
|
73 * is EPSTelephonyAllLogosDeleted |
|
74 */ |
|
75 TPhCltNetworkCode iMNC; |
|
76 |
|
77 typedef TPckg<TTelephonyOTALogoUpdate> TOTALogoUpdatePckg; |
|
78 }; |
|
79 |
|
80 // CLASS DECLARATION |
|
81 /** |
|
82 * Parameter storage class. |
|
83 * |
|
84 * @lib PhoneClient.lib |
|
85 * @since Series60 3.2 |
|
86 */ |
|
87 NONSHARABLE_CLASS( CPhCltBaseImageParams ) |
|
88 : public CPhCltImageParams |
|
89 { |
|
90 public: |
|
91 /** |
|
92 * Returns class type. |
|
93 * @return type number; |
|
94 */ |
|
95 virtual TPhCltImageType Type() const; |
|
96 |
|
97 /** |
|
98 * Adds an image. |
|
99 * @param aHandle handle to an image. |
|
100 */ |
|
101 virtual void AddImageL( TInt aHandle ); |
|
102 |
|
103 /** |
|
104 * Assignment operator |
|
105 * @param aParamClass parameter class. |
|
106 * @return 'deep' copied parameter class. |
|
107 */ |
|
108 virtual CPhCltBaseImageParams& operator=( |
|
109 const CPhCltBaseImageParams& aParamClass ); |
|
110 |
|
111 /** |
|
112 * Gets an image. |
|
113 * @param aIndex index of the image to get. |
|
114 * @return image handle |
|
115 */ |
|
116 virtual TInt GetImageL( const TInt aIndex ) const; |
|
117 |
|
118 /** |
|
119 * Gets image count. |
|
120 * @return image count |
|
121 */ |
|
122 virtual TInt Count() const; |
|
123 |
|
124 /** |
|
125 * Get all the images |
|
126 * @return package buffered image struct |
|
127 */ |
|
128 virtual TPckgBuf< TPhCltImageArray >& Images(); |
|
129 |
|
130 protected: |
|
131 /** |
|
132 * Cleans class content. |
|
133 */ |
|
134 void Clean(); |
|
135 |
|
136 public: // Constructor and destructor. |
|
137 /** |
|
138 * Destructor. |
|
139 */ |
|
140 virtual ~CPhCltBaseImageParams(); |
|
141 |
|
142 protected: |
|
143 |
|
144 /** |
|
145 * Constructor. |
|
146 */ |
|
147 CPhCltBaseImageParams( const TPhCltImageType aType ); |
|
148 |
|
149 public: // Data. |
|
150 TPckgBuf< TPhCltImageArray > iImages; |
|
151 }; |
|
152 |
|
153 // CLASS DECLARATION |
|
154 /** |
|
155 * Parameter storage class. |
|
156 * |
|
157 * @lib PhoneClient.lib |
|
158 * @since Series60 3.2 |
|
159 */ |
|
160 NONSHARABLE_CLASS( CPhCltExtVTImageParams ) : public CPhCltBaseImageParams |
|
161 { |
|
162 public: // Constructor and destructor. |
|
163 /** |
|
164 * Destructor. |
|
165 */ |
|
166 ~CPhCltExtVTImageParams(); |
|
167 |
|
168 /** |
|
169 * Symbian 2 phase constructor. |
|
170 */ |
|
171 static CPhCltExtVTImageParams* NewL( const TPhCltImageType aType ); |
|
172 |
|
173 private: |
|
174 |
|
175 /** |
|
176 * Constructor. |
|
177 */ |
|
178 CPhCltExtVTImageParams( const TPhCltImageType aType ); |
|
179 }; |
|
180 |
|
181 // CLASS DECLARATION |
|
182 /** |
|
183 * Parameter storage class. |
|
184 * |
|
185 * @lib PhoneClient.lib |
|
186 * @since Series60 3.2 |
|
187 */ |
|
188 NONSHARABLE_CLASS( CPhCltExtOperatorLogoParams ) |
|
189 : public CPhCltBaseImageParams |
|
190 { |
|
191 public: // Constructor and destructor. |
|
192 /** |
|
193 * Destructor. |
|
194 */ |
|
195 ~CPhCltExtOperatorLogoParams(); |
|
196 |
|
197 /** |
|
198 * Symbian 2 phase constructor. |
|
199 */ |
|
200 static CPhCltExtOperatorLogoParams* NewL( ); |
|
201 |
|
202 public: // New functions. |
|
203 |
|
204 /** |
|
205 * @see CPhCltImageParams::operator=. |
|
206 */ |
|
207 CPhCltBaseImageParams& operator=( |
|
208 const CPhCltBaseImageParams& aParamClass ); |
|
209 |
|
210 /** |
|
211 * @see CPhCltImageParams::AddImageL. |
|
212 * NOTE: when deleting, set image to KPhCltDeleteOperatorLogo |
|
213 * @see CPhCltExtOperatorLogoParams::SetCodesL |
|
214 */ |
|
215 void AddImageL( TInt aHandle ); |
|
216 |
|
217 /** |
|
218 * Sets country and network code for operator logo. |
|
219 * @param aCountryCode country code |
|
220 * @param aNetworkCode network code |
|
221 * @param aLogoType OTA/programmable logo |
|
222 * NOTE: delete all: set codes to KPhCltDeleteOperatorLogo |
|
223 */ |
|
224 virtual void SetCodesL( |
|
225 const TPhCltCountryCode aCountryCode, |
|
226 const TPhCltNetworkCode aNetworkCode, |
|
227 const TPhCltExtOperatorLogoType aLogoType ); |
|
228 |
|
229 private: |
|
230 |
|
231 /** |
|
232 * Constructor. |
|
233 */ |
|
234 CPhCltExtOperatorLogoParams(); |
|
235 }; |
|
236 |
|
237 #endif // CPHCLTBASEPARAMS_H |
|
238 |
|
239 // End of file. |