epoc32/include/app/clmklandmarkselectordlg.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2004 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 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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:    LandmarksUi Content File -    This class provides functionality for selecting either one or
    15 *                multiple landmarks.
    16 *
    17 */
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 #ifndef CLMKLANDMARKSELECTORDLG_H
    26 #define CLMKLANDMARKSELECTORDLG_H
    27 
    28 //  INCLUDES
    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>
    33 
    34 // FORWARD DECLARATIONS
    35 //class CPosLandmarkDatabase;
    36 class CLmkDlgSelectorImplBase;
    37 class MObjectProvider;
    38 
    39 // For multiple database support
    40 class TLmkItemIdDbCombiInfo;
    41 
    42 // CLASS DECLARATION
    43 
    44 /**
    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.
    51 */
    52 class CLmkLandmarkSelectorDlg : public CBase
    53     {
    54     public:  // Constructors and destructor
    55         /**
    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.
    58     	*
    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
    62         */
    63         IMPORT_C static CLmkLandmarkSelectorDlg* NewL();
    64 
    65         /**
    66         * Destructor.
    67         */
    68         IMPORT_C ~CLmkLandmarkSelectorDlg();
    69 
    70     public: // New functions
    71         /**
    72         * This function sets the context - that is, the enclosing parent control - for this control.
    73         *
    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.
    77         */
    78         IMPORT_C void SetMopParent( MObjectProvider* aParent );
    79 
    80         /**
    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.
    89         */
    90         IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
    91 
    92         /**
    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.
    99         *
   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.
   106         */
   107         IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
   108     private:
   109         /**
   110         * C++ default constructor.
   111         * @return newly instantiated object
   112         */
   113         CLmkLandmarkSelectorDlg();
   114 
   115         /**
   116         * By default Symbian 2nd phase constructor is private.
   117         */
   118 
   119         void ConstructL( );
   120 
   121 
   122     private:    // Data
   123         // ETrue if executed in multiple item selector mode
   124         TBool iIsMultiSelector;
   125 
   126         /// Own: Search implementor object
   127         CLmkDlgSelectorImplBase* iSelector;
   128 
   129         // Set to ETrue in destructor
   130         TBool* iDestroyedPtr;
   131 
   132         // For multiple database support
   133         RPointerArray <CPosLandmarkDatabase> iDbs; //
   134 
   135 
   136     };
   137 
   138 #endif      // CLMKLANDMARKSELECTORDLG_H
   139 
   140 // End of File