|
1 /* |
|
2 * Copyright (c) 2002-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: It defines dial data. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TPHCLTEXTPHONEDIALDATA_H |
|
20 #define TPHCLTEXTPHONEDIALDATA_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include "PhCltTypes.h" |
|
25 |
|
26 // Constant used as window group id to indicate that we wish to go to idle. |
|
27 const TInt KPhCltGoToIdle = 0; |
|
28 |
|
29 // Constants used in Redial parameter |
|
30 const TInt KPhCltRedialDefault = -1; // Default redial. |
|
31 const TInt KPhCltRedialOff = -2; // Redial is off. |
|
32 const TInt KPhCltRedialWithDefaultTime = -3; // Redial on, with default time. |
|
33 const TInt KPhCltRedial = 0; // Forced redial. |
|
34 |
|
35 // Other constants used in TPhCltExtPhoneDialData ( default values ) |
|
36 const TBool KPhCltDefaultAllowMatch = ETrue; // Match is allowed |
|
37 const TBool KPhCltDefaultNumberEntry = EFalse; // No return to number entry. |
|
38 const TInt KPhCltDefaultNumberType = -1; // No number type. |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * It defines the structure containing dial information. |
|
44 * |
|
45 * Fields: |
|
46 * |
|
47 * window group - When call is ended, set window group is actived. |
|
48 * show number - Permission to show number. ETrue iff it is allowed. |
|
49 * redial - Automatic redial override. |
|
50 * name - Name corresponding to number. Name must be defined |
|
51 * if shown number equals to EFalse. |
|
52 * contact id - Contact id. you should put always when you are dialing |
|
53 * from phonebook contact. |
|
54 * tel number - String that is to be dialled. |
|
55 * number type - Number type override. See PbkFields.hrh. Only phone |
|
56 * number fields are supported. |
|
57 * allow match - Permission to allow match. ETrue iff match is to be done. |
|
58 * If you are dialing from sim pd or fdn, then this should |
|
59 * be EFalse. |
|
60 * number entry - not used. |
|
61 * end other calls - Information if the existing calls are ended before |
|
62 * this new one is made. |
|
63 * emergency - Information whether this is an emergency call or not. |
|
64 * Not mandatory. Set only if you know that the call is an |
|
65 * emergency call. |
|
66 * subaddress - The calling party subaddress. Supports SAT features. |
|
67 * Defined in ITU-T I.330 and 3GPP TS 11.14. |
|
68 * SATCall - Set whether this is SAT originated call or not. |
|
69 * Supports SAT features. |
|
70 * bearer - Bearer capabilities. Supports SAT features. |
|
71 * |
|
72 * CallType - The type of the call, i.e. voice (default) or video. |
|
73 * |
|
74 * SendKey - Call made with SendKey, optional. |
|
75 * |
|
76 * Redial maximum duration - Automatic redial maximum duration |
|
77 * |
|
78 * @lib phoneclient.lib |
|
79 * @since 1.0 |
|
80 */ |
|
81 class TPhCltExtPhoneDialData |
|
82 { |
|
83 public: |
|
84 |
|
85 /** |
|
86 * Construct a dial data package |
|
87 */ |
|
88 IMPORT_C TPhCltExtPhoneDialData(); |
|
89 |
|
90 /** |
|
91 * Construct a dial data package |
|
92 * |
|
93 * @param aNumber Number to be used in this package. |
|
94 * @param aContactId Contact ID to be used in this package. |
|
95 */ |
|
96 IMPORT_C TPhCltExtPhoneDialData( |
|
97 const TPhCltTelephoneNumber& aNumber, |
|
98 TPhCltContactId aContactId ); |
|
99 |
|
100 /** |
|
101 * Construct a dial data package |
|
102 * |
|
103 * @param aNumber Number to be used in the package. |
|
104 * @param aWindowGroupId Windoww Group ID to be used in this package. |
|
105 */ |
|
106 IMPORT_C TPhCltExtPhoneDialData( |
|
107 const TPhCltTelephoneNumber& aNumber, |
|
108 TInt aWindowGroupId ); |
|
109 |
|
110 /** |
|
111 * Construct a dial data package |
|
112 * |
|
113 * @param aNumber Number to be used in the package. |
|
114 * @param aContactId Contact ID to be used in this package. |
|
115 * @param aWindowGroupId Windoww Group ID to be used in this package. |
|
116 */ |
|
117 IMPORT_C TPhCltExtPhoneDialData( |
|
118 const TPhCltTelephoneNumber& aNumber, |
|
119 TPhCltContactId aContactId, |
|
120 TInt aWindowGroupId ); |
|
121 |
|
122 /** |
|
123 * Construct a dial data package |
|
124 * |
|
125 * @param aName Name to be used in the package. |
|
126 * @param aNumber Number to be used in the package. |
|
127 * @param aContactId Contact ID to be used in this package. |
|
128 * @param aWindowGroupId Windoww Group ID to be used in this package. |
|
129 */ |
|
130 IMPORT_C TPhCltExtPhoneDialData( |
|
131 const TPhCltNameBuffer& aName, |
|
132 const TPhCltTelephoneNumber& aNumber, |
|
133 TPhCltContactId aContactId, |
|
134 TInt aWindowGroupId ); |
|
135 |
|
136 |
|
137 public: // Access - Setters |
|
138 |
|
139 /** |
|
140 * Set the window group of requesting application. |
|
141 * |
|
142 * @param aWindowGroupId The window group identifier. |
|
143 */ |
|
144 IMPORT_C void SetWindowGroup( TInt aWindowGroupId ); |
|
145 |
|
146 /** |
|
147 * Set the number visibility in the phone app. |
|
148 * |
|
149 * If this is set to EFalse, then number is not shown or written to |
|
150 * log event. |
|
151 * |
|
152 * @param aShowNumber Whether or not to show the number. |
|
153 */ |
|
154 IMPORT_C void SetShowNumber( TBool aShowNumber ); |
|
155 |
|
156 /** |
|
157 * Change the redial mode. |
|
158 * |
|
159 * @param aRedial The new redial status |
|
160 */ |
|
161 IMPORT_C void SetRedial( TInt aRedial ); |
|
162 |
|
163 /** |
|
164 * Set the value of RedialMaximumDuration. |
|
165 * |
|
166 * @param aMaxDuration The value of duration in seconds. |
|
167 */ |
|
168 IMPORT_C void SetRedialMaximumDuration( TTimeIntervalSeconds aMaximumRedialDuration ); |
|
169 |
|
170 /** |
|
171 * Set the name of the person who is to be called. |
|
172 * |
|
173 * @param aName The name of the person being called. |
|
174 */ |
|
175 IMPORT_C void SetName( const TPhCltNameBuffer& aName ); |
|
176 |
|
177 /** |
|
178 * Set the contact Id of the person being called. |
|
179 * |
|
180 * @param aContactId The contacts model contact id of the person being |
|
181 * called. |
|
182 */ |
|
183 IMPORT_C void SetContactId( TPhCltContactId aContactId ); |
|
184 |
|
185 /** |
|
186 * Set the number of the person to be called. |
|
187 * This is mandatory. |
|
188 * |
|
189 * @param aNumber The number of the person being called. |
|
190 */ |
|
191 IMPORT_C void SetTelephoneNumber( |
|
192 const TPhCltTelephoneNumber& aNumber ); |
|
193 |
|
194 /** |
|
195 * Set whether to return to number entry. |
|
196 * |
|
197 * @param aReturn Whether to return to the number entry editor. |
|
198 */ |
|
199 IMPORT_C void SetReturnToNumberEntryOnFailure( TBool aReturn ); |
|
200 |
|
201 /** |
|
202 * Set whether the name entered in SetName should be matched |
|
203 * against the personal directory (=phonebook). |
|
204 * |
|
205 * This should be set EFalse only if phone number has not been |
|
206 * taken from phonebook. |
|
207 * |
|
208 * @param aAllowMatch Whether to allow matches. |
|
209 */ |
|
210 IMPORT_C void SetAllowMatch( TBool aAllowMatch ); |
|
211 |
|
212 /** |
|
213 * Set the number type. |
|
214 * |
|
215 * See PbkFields.hrh. Only phone number fields are supported. |
|
216 * |
|
217 * @param aNumberType The number type. |
|
218 */ |
|
219 IMPORT_C void SetNumberType( TInt aNumberType ); |
|
220 |
|
221 /** |
|
222 * Set parameter for end other calls. |
|
223 * |
|
224 * If this is set to ETrue, other calls will be terminated before |
|
225 * dial. Default is EFalse. |
|
226 * |
|
227 * @param aEndCalls Are the other calls ended. |
|
228 */ |
|
229 IMPORT_C void SetEndOtherCalls( TBool aEndCalls ); |
|
230 |
|
231 /** |
|
232 * Set whether this is known to be an emergency call or not. |
|
233 * If this function is not called, it is assumed that the call |
|
234 * is not an emergency call. However, in Phone application side it is |
|
235 * checked whether the call actually is an emergency call or not before |
|
236 * dialing. |
|
237 * |
|
238 * @param aEmergency |
|
239 * ETrue if the call is known to be an emergency call. |
|
240 * EFalse if the call is not known to be an emergency call |
|
241 * (default). |
|
242 */ |
|
243 IMPORT_C void SetEmergency( TBool aEmergency ); |
|
244 |
|
245 /** |
|
246 * Set the calling party subaddress. |
|
247 * Defined in ITU-T I.330 and 3GPP TS 11.14. |
|
248 * |
|
249 * @param aSubAddress The calling party subaddress. |
|
250 */ |
|
251 IMPORT_C void SetSubAddress( const TPhCltSubAddress& aSubAddress ); |
|
252 |
|
253 /** |
|
254 * Set wheteher this is a SAT originated call or not. |
|
255 * If this function is not called, the originator is assumed to |
|
256 * be other than SAT. |
|
257 * |
|
258 * @param aSATCall ETrue if SAT originated the call, EFalse otherwise. |
|
259 */ |
|
260 IMPORT_C void SetSATCall( TBool aSATCall ); |
|
261 |
|
262 /** |
|
263 * Set the bearer capability. |
|
264 * |
|
265 * @param aBearer The bearer capabilities as defined in GSM 04.08. |
|
266 */ |
|
267 IMPORT_C void SetBearer( const TPhCltBearerCapability& aBearer ); |
|
268 |
|
269 /** |
|
270 * Set the call type. |
|
271 * |
|
272 * @param aCallType The call type. |
|
273 */ |
|
274 IMPORT_C void SetCallType( TPhCltCallType aCallType ); |
|
275 |
|
276 /** |
|
277 * Set the value of SendKey. |
|
278 * |
|
279 * @param aSendKey The value of SendKey. |
|
280 */ |
|
281 IMPORT_C void SetSendKeyPressed( TBool aSendKey ); |
|
282 |
|
283 |
|
284 public: // Access - Getters |
|
285 |
|
286 /** |
|
287 * Return the window group id. |
|
288 * |
|
289 * @return Returns KPhCltGoToIdle if no id has previously been specified. |
|
290 */ |
|
291 IMPORT_C TInt WindowGroupId() const; |
|
292 |
|
293 /** |
|
294 * Redial information. |
|
295 * |
|
296 * @return Return the redial status, |
|
297 */ |
|
298 IMPORT_C TInt Redial() const; |
|
299 |
|
300 /** |
|
301 * Automatic redial maximum duration . |
|
302 * |
|
303 * @return value of duration in seconds. |
|
304 */ |
|
305 IMPORT_C TTimeIntervalSeconds RedialMaximumDuration( ) const; |
|
306 |
|
307 /** |
|
308 * Number type. |
|
309 * |
|
310 * @return Return the number type. |
|
311 */ |
|
312 IMPORT_C TInt NumberType() const; |
|
313 |
|
314 /** |
|
315 * Return in failure. |
|
316 * |
|
317 * @return Returns whether to return to the number entry. |
|
318 */ |
|
319 IMPORT_C TBool ReturnToNumberEntryOnFailure() const; |
|
320 |
|
321 /** |
|
322 * Is match allowed. |
|
323 * |
|
324 * @return Returns the allow match setting. |
|
325 */ |
|
326 IMPORT_C TBool AllowMatch() const; |
|
327 |
|
328 /** |
|
329 * Number showing. |
|
330 * |
|
331 * @return Returns the number visibility. |
|
332 */ |
|
333 IMPORT_C TBool ShowNumber() const; |
|
334 |
|
335 /** |
|
336 * Name |
|
337 * |
|
338 * @return Return the name of the recipient. |
|
339 */ |
|
340 IMPORT_C const TPhCltNameBuffer& Name() const; |
|
341 |
|
342 /** |
|
343 * Contact ID |
|
344 * |
|
345 * @return Returns the contact id or KPhCltNoContact if none specified. |
|
346 */ |
|
347 IMPORT_C TPhCltContactId ContactId() const; |
|
348 |
|
349 /** |
|
350 * Telephone number |
|
351 * |
|
352 * @return Returns the telephone number. |
|
353 */ |
|
354 IMPORT_C const TPhCltTelephoneNumber& TelephoneNumber() const; |
|
355 |
|
356 /** |
|
357 * End other calls |
|
358 * |
|
359 * @return Returns ETrue if other calls should be ended before dial. |
|
360 */ |
|
361 IMPORT_C TBool EndOtherCalls() const; |
|
362 |
|
363 /** |
|
364 * Emergency status (is emergency call or not). |
|
365 * |
|
366 * @return Returns ETrue if the call is emergency call. |
|
367 * EFalse if the call is not emergency call. |
|
368 */ |
|
369 IMPORT_C TBool Emergency() const; |
|
370 |
|
371 /** |
|
372 * Calling party subaddress. |
|
373 * |
|
374 * @return Returns the calling party subaddress. |
|
375 */ |
|
376 IMPORT_C const TPhCltSubAddress& SubAddress() const; |
|
377 |
|
378 /** |
|
379 * SAT call information. |
|
380 * |
|
381 * @return Returns ETrue if SAT is the originator of the call. |
|
382 * EFalse otherwise. |
|
383 */ |
|
384 IMPORT_C TBool SATCall( ) const; |
|
385 |
|
386 /** |
|
387 * Bearer capability. |
|
388 * |
|
389 * @return Returns the bearer capabilities as defined in GSM 04.08. |
|
390 */ |
|
391 IMPORT_C const TPhCltBearerCapability& Bearer( ) const; |
|
392 |
|
393 /** |
|
394 * Call type. |
|
395 * |
|
396 * @return Return the call type. |
|
397 */ |
|
398 IMPORT_C TPhCltCallType CallType() const; |
|
399 |
|
400 /** |
|
401 * SendKey pressed. |
|
402 * |
|
403 * @return Return ETrue if SendKey used. |
|
404 */ |
|
405 IMPORT_C TBool SendKeyPressed() const; |
|
406 |
|
407 |
|
408 public: |
|
409 |
|
410 /** |
|
411 * Returns the call argumets through the parameter. |
|
412 * |
|
413 * @param aReturn The call arguments are stored here. |
|
414 */ |
|
415 IMPORT_C void AsIPCStruct( TPhCltCallArgs& aReturn ) const; |
|
416 |
|
417 |
|
418 private: // Member data |
|
419 |
|
420 // The window group identifier storage. |
|
421 TInt iWindowGroup; |
|
422 |
|
423 // The new redial status storage. |
|
424 TInt iRedial; |
|
425 |
|
426 //Automatic redial maximum duration |
|
427 TTimeIntervalSeconds iRedialMaximumDuration; |
|
428 |
|
429 // The number type information storage. |
|
430 TInt iNumberType; |
|
431 |
|
432 // The number visibility information storage. |
|
433 TBool iShowNumber; |
|
434 |
|
435 // Return to the number entry editor information storage. |
|
436 TBool iReturnToNumberEntryOnFailure; |
|
437 |
|
438 // Allow match information storage. |
|
439 TBool iAllowMatch; |
|
440 |
|
441 // The name information storage. |
|
442 TPhCltNameBuffer iName; |
|
443 |
|
444 // The contact ID storage. |
|
445 TPhCltContactId iContactId; |
|
446 |
|
447 // Telephony number storage. |
|
448 TPhCltTelephoneNumber iTelNumber; |
|
449 |
|
450 // Information storage of the other call termination. |
|
451 TBool iEndOtherCalls; |
|
452 |
|
453 // The emergency call information. |
|
454 TBool iEmergencyCall; |
|
455 |
|
456 // The calling party subaddress. |
|
457 TPhCltSubAddress iSubAddress; |
|
458 |
|
459 // The information whether this is SAT originated call or not. |
|
460 TBool iSATCall; |
|
461 |
|
462 // The bearer capability. |
|
463 TPhCltBearerCapability iBearer; |
|
464 |
|
465 // Call type. |
|
466 TPhCltCallType iCallType; |
|
467 |
|
468 // SendKey |
|
469 TBool iSendKey; |
|
470 |
|
471 }; |
|
472 |
|
473 #endif // TPHCLTEXTPHONEDIALDATA_H |
|
474 |
|
475 // End of File |