|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Provides methods for phonebook video call number selection dialog. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include "CPbkVideoNumberSelect.h" |
|
23 #include <avkon.hrh> // AVKON softkey codes |
|
24 #include <aknnotewrappers.h> // AVKON Notes |
|
25 #include <StringLoader.h> // StringLoader |
|
26 #include <PbkView.rsg> // PbkView resources |
|
27 #include <CPbkContactItem.h> |
|
28 |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ======================= |
|
31 |
|
32 EXPORT_C CPbkVideoNumberSelect::CPbkVideoNumberSelect() |
|
33 { |
|
34 // CBase::operator new(TLeave) resets member data |
|
35 } |
|
36 |
|
37 EXPORT_C CPbkVideoNumberSelect::TParams::TParams |
|
38 (const CPbkContactItem& aContact) : |
|
39 TBaseParams(aContact, aContact.DefaultVideoNumberField()) |
|
40 { |
|
41 } |
|
42 |
|
43 EXPORT_C TBool CPbkVideoNumberSelect::ExecuteLD(TParams& aParams) |
|
44 { |
|
45 return CPbkAddressSelect::ExecuteLD(aParams); |
|
46 } |
|
47 |
|
48 EXPORT_C CPbkVideoNumberSelect::~CPbkVideoNumberSelect() |
|
49 { |
|
50 delete iQueryTitle; |
|
51 } |
|
52 |
|
53 /** |
|
54 * Makes video call number query return selection if Call key is pressed. |
|
55 */ |
|
56 EXPORT_C TKeyResponse CPbkVideoNumberSelect::PbkControlKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
|
57 { |
|
58 if (aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend) |
|
59 { |
|
60 // Event is Send key, tell field selection dialog to accept current selection |
|
61 AttemptExitL(ETrue); |
|
62 return EKeyWasConsumed; |
|
63 } |
|
64 return EKeyWasNotConsumed; |
|
65 } |
|
66 |
|
67 EXPORT_C const TDesC& CPbkVideoNumberSelect::QueryTitleL() |
|
68 { |
|
69 if (!iQueryTitle) |
|
70 { |
|
71 HBufC* title = ContactItem().GetContactTitleL(); |
|
72 CleanupStack::PushL(title); |
|
73 iQueryTitle = StringLoader::LoadL(R_QTN_PHOB_QTL_CALL_TO_NAME, *title); |
|
74 CleanupStack::PopAndDestroy(title); |
|
75 } |
|
76 return *iQueryTitle; |
|
77 } |
|
78 |
|
79 EXPORT_C TInt CPbkVideoNumberSelect::QuerySoftkeysResource() const |
|
80 { |
|
81 return R_PBK_SOFTKEYS_CALL_CANCEL; |
|
82 } |
|
83 |
|
84 |
|
85 // End of File |