2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: LandmarksUi Content File - This class provides functionality for selecting either one or
25 #ifndef CLMKLANDMARKSELECTORDLG_H
26 #define CLMKLANDMARKSELECTORDLG_H
29 #include <e32base.h> // CBase
30 #include <e32std.h> //RArray and RPointerArray
31 #include <EPos_Landmarks.h> // Lm typedefs, constants etc.
32 #include <EPos_CPosLandmarkDatabase.h>
34 // FORWARD DECLARATIONS
35 //class CPosLandmarkDatabase;
36 class CLmkDlgSelectorImplBase;
37 class MObjectProvider;
39 // For multiple database support
40 class TLmkItemIdDbCombiInfo;
45 * This is a dialog class, which is used to launch landmark selector dialog and
46 * to get the selected landmark ids.It displays the landmarks present in landmarks
47 * database,as a list.The dialog can be a single selector or multiple selector dialog,
48 * depending upon argument passed by the client (in ExecuteLD function) at the time
49 * when it is launched.Based on whether it is a single selector or multiple selector
50 * dialog, user can select single landmark or multiple landmarks.
52 class CLmkLandmarkSelectorDlg : public CBase
54 public: // Constructors and destructor
56 * This is a static function, which creates and returns an instance of this class.
57 * All the landmarks present in the landmark database are shown in the selector.
59 * @leave Leaves with KErrNotSupported if framework functionality is not available.
60 * @panic Panics with system-wide panic codes.
61 * @return new instance of this class
63 IMPORT_C static CLmkLandmarkSelectorDlg* NewL();
68 IMPORT_C ~CLmkLandmarkSelectorDlg();
70 public: // New functions
72 * This function sets the context - that is, the enclosing parent control - for this control.
74 * @param [in] aParent The parent object which is the context for the control.
75 * @panic Panics with KLmkPanicNullMember, if the selector is not
76 * constructed properly.
78 IMPORT_C void SetMopParent( MObjectProvider* aParent );
81 * This function launches the landmark selector dialog. Client uses this function
82 * to launch single landmark selector dialog.
83 * This object is destroyed when this function returns or leaves.
84 * @param [in/out] aSelected Passed as reference and when the function returns,
85 * contains the selected landmark id.
86 * @leave Leaves with system-wide leave codes.
87 * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
88 * @return Returns non-zero if accepted, else zero.
90 IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
93 * This function launches the landmark selector dialog. Client uses this function
94 * to launch multiple landmark selector dialog.
95 * This object is destroyed when this function returns or leaves.
96 * If the array(aSelectedItems) is passed with already filled landmark ids, then
97 * such landmarks will be shown as selected when the dialog is launched, but if
98 * any of these ids do not exist in landmarks database, it will be ignored.
100 * @param [in/out] aSelectedItems Passed as reference, either filled with landmark
101 * ids for pre-selection or an empty array. On return of the function
102 * contains the selected landmark ids.
103 * @leave Leaves with system-wide leave codes.
104 * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
105 * @return Returns non-zero if accepted, else zero.
107 IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
110 * C++ default constructor.
111 * @return newly instantiated object
113 CLmkLandmarkSelectorDlg();
116 * By default Symbian 2nd phase constructor is private.
123 // ETrue if executed in multiple item selector mode
124 TBool iIsMultiSelector;
126 /// Own: Search implementor object
127 CLmkDlgSelectorImplBase* iSelector;
129 // Set to ETrue in destructor
130 TBool* iDestroyedPtr;
132 // For multiple database support
133 RPointerArray <CPosLandmarkDatabase> iDbs; //
138 #endif // CLMKLANDMARKSELECTORDLG_H