|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 contact store selection list query. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2STORELISTQUERY_H |
|
20 #define CPBK2STORELISTQUERY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <bamdesca.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CVPbkContactStoreUriArray; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Phonebook 2 contact store selection list query. |
|
33 */ |
|
34 class CPbk2StoreListQuery : public CBase |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Creates a new instance of this class. |
|
40 * |
|
41 * @return A new instance of this class. |
|
42 */ |
|
43 IMPORT_C static CPbk2StoreListQuery* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CPbk2StoreListQuery(); |
|
49 |
|
50 public: // Interface |
|
51 |
|
52 /** |
|
53 * Executes the selection dialog. |
|
54 * |
|
55 * @param aTitle Dialog title. |
|
56 * @param aUriArray Contains the store URIs that are shown |
|
57 * in the query if they have a name. |
|
58 * After the query the array contains the |
|
59 * selected URIs. If "All" item text has |
|
60 * been set then the array is not changed |
|
61 * and it contains all the stores. |
|
62 * @return the dialog return value |
|
63 */ |
|
64 IMPORT_C TInt ExecuteLD( |
|
65 const TDesC& aTitle, |
|
66 CVPbkContactStoreUriArray& aUriArray ); |
|
67 |
|
68 /** |
|
69 * If the list must contain an item to select all the stores then |
|
70 * this can be used to set the item. |
|
71 * |
|
72 * @param aAllItemText The text to display as an "All" text. |
|
73 * @param aUseTopPosition If ETrue the item is shown at the |
|
74 * topmost position. If EFalse the item |
|
75 * is shown at the bottom. |
|
76 */ |
|
77 IMPORT_C void SetAllItemTextL( |
|
78 const TDesC& aAllItemText, |
|
79 TBool aUseTopPosition ); |
|
80 |
|
81 private: // Implementation |
|
82 CPbk2StoreListQuery(); |
|
83 MDesCArray* CreateListItemsL( |
|
84 CVPbkContactStoreUriArray& aUriArray ); |
|
85 void SetSelection( |
|
86 CVPbkContactStoreUriArray& aUriArray, |
|
87 TInt aSelection ); |
|
88 TInt AllItemIndex( |
|
89 CVPbkContactStoreUriArray& aUriArray ); |
|
90 |
|
91 private: // Data |
|
92 /// Own: Buffer containing the "All" item text |
|
93 HBufC* iAllItemText; |
|
94 /// Own: Indicates whether the "All" item is shown at the top |
|
95 TBool iAllItemUsesTopPosition; |
|
96 }; |
|
97 |
|
98 #endif // CPBK2STORELISTQUERY_H |
|
99 |
|
100 // End of File |