|
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 * Phonebook generic address selection dialog class methods. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include "CPbkURLAddressSelect.h" |
|
23 #include <avkon.hrh> // AVKON softkey codes |
|
24 #include <avkon.rsg> // R_AVKON_SOFTKEYS_SELECT_CANCEL; |
|
25 #include <aknnotewrappers.h> |
|
26 #include <StringLoader.h> // StringLoader |
|
27 #include <PbkView.rsg> |
|
28 #include <CPbkFieldInfo.h> |
|
29 #include <CPbkContactItem.h> |
|
30 |
|
31 |
|
32 // ================= MEMBER FUNCTIONS ======================= |
|
33 |
|
34 EXPORT_C CPbkURLAddressSelect::TParams::TParams |
|
35 (const CPbkContactItem& aContact) : |
|
36 TBaseParams(aContact, aContact.DefaultMmsField()) |
|
37 { |
|
38 } |
|
39 |
|
40 EXPORT_C CPbkURLAddressSelect::CPbkURLAddressSelect() |
|
41 { |
|
42 } |
|
43 |
|
44 EXPORT_C TPtrC CPbkURLAddressSelect::ExecuteLD(TParams& aParams) |
|
45 { |
|
46 TPtrC result; |
|
47 if (CPbkAddressSelect::ExecuteLD(aParams)) |
|
48 { |
|
49 result.Set(aParams.SelectedField()->Text()); |
|
50 } |
|
51 return result; |
|
52 } |
|
53 |
|
54 EXPORT_C CPbkURLAddressSelect::~CPbkURLAddressSelect() |
|
55 { |
|
56 delete iQueryTitle; |
|
57 } |
|
58 |
|
59 EXPORT_C TBool CPbkURLAddressSelect::AddressField |
|
60 (const TPbkContactItemField& aField) const |
|
61 { |
|
62 // Return true for non-empty URL fields |
|
63 return ((aField.FieldInfo().FieldId() == EPbkFieldIdURL) && |
|
64 !aField.IsEmptyOrAllSpaces()); |
|
65 } |
|
66 |
|
67 EXPORT_C void CPbkURLAddressSelect::NoAddressesL() |
|
68 { |
|
69 // This never gets used, since when focus is on contact |
|
70 // without URL the go to URL menu item is not shown |
|
71 } |
|
72 |
|
73 EXPORT_C const TDesC& CPbkURLAddressSelect::QueryTitleL() |
|
74 { |
|
75 if (!iQueryTitle) |
|
76 { |
|
77 iQueryTitle = ContactItem().GetContactTitleL(); |
|
78 } |
|
79 return *iQueryTitle; |
|
80 } |
|
81 |
|
82 EXPORT_C TInt CPbkURLAddressSelect::QuerySoftkeysResource() const |
|
83 { |
|
84 return R_PBK_SOFTKEYS_GOTO_CANCEL; |
|
85 } |
|
86 |
|
87 |
|
88 // End of File |