|
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 the base class for phonebook phone number selection queries. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include "CPbkPhoneNumberSelectBase.h" |
|
23 #include <aknnotewrappers.h> |
|
24 #include <StringLoader.h> // StringLoader |
|
25 #include <PbkView.rsg> |
|
26 #include <CPbkFieldInfo.h> |
|
27 #include <CPbkContactItem.h> |
|
28 |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ======================= |
|
31 |
|
32 EXPORT_C TBool CPbkPhoneNumberSelectBase::AddressField(const TPbkContactItemField& aField) const |
|
33 { |
|
34 // Return true for non-empty phonenumber fields |
|
35 return (aField.FieldInfo().IsPhoneNumberField() && !aField.IsEmptyOrAllSpaces()); |
|
36 } |
|
37 |
|
38 EXPORT_C void CPbkPhoneNumberSelectBase::NoAddressesL() |
|
39 { |
|
40 HBufC* title = ContactItem().GetContactTitleOrNullL(); |
|
41 if (title) |
|
42 { |
|
43 CleanupStack::PushL(title); |
|
44 HBufC* prompt = StringLoader::LoadLC(R_QTN_PHOB_NOTE_NO_NUMBER_TO_NAME, *title); |
|
45 CAknInformationNote* noteDlg = new(ELeave) CAknInformationNote; |
|
46 noteDlg->ExecuteLD(*prompt); |
|
47 CleanupStack::PopAndDestroy(2); // prompt, title |
|
48 } |
|
49 else |
|
50 { |
|
51 CAknNoteWrapper* noteDlg = new(ELeave) CAknNoteWrapper; |
|
52 noteDlg->ExecuteLD(R_QTN_PHOB_NOTE_NO_NUMBER); |
|
53 } |
|
54 } |
|
55 |
|
56 // End of File |