epoc32/include/app/clmklandmarkselectordlg.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/app/clmklandmarkselectordlg.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/app/clmklandmarkselectordlg.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,140 @@
     1.4 -clmklandmarkselectordlg.h
     1.5 +/*
     1.6 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:    LandmarksUi Content File -    This class provides functionality for selecting either one or
    1.19 +*                multiple landmarks.
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +
    1.25 +
    1.26 +
    1.27 +
    1.28 +
    1.29 +#ifndef CLMKLANDMARKSELECTORDLG_H
    1.30 +#define CLMKLANDMARKSELECTORDLG_H
    1.31 +
    1.32 +//  INCLUDES
    1.33 +#include <e32base.h>            // CBase
    1.34 +#include <e32std.h>			//RArray and RPointerArray
    1.35 +#include <EPos_Landmarks.h>     // Lm typedefs, constants etc.
    1.36 +#include <EPos_CPosLandmarkDatabase.h>
    1.37 +
    1.38 +// FORWARD DECLARATIONS
    1.39 +//class CPosLandmarkDatabase;
    1.40 +class CLmkDlgSelectorImplBase;
    1.41 +class MObjectProvider;
    1.42 +
    1.43 +// For multiple database support
    1.44 +class TLmkItemIdDbCombiInfo;
    1.45 +
    1.46 +// CLASS DECLARATION
    1.47 +
    1.48 +/**
    1.49 +*  This is a dialog class, which is used to launch landmark selector dialog and
    1.50 +*  to get the selected landmark ids.It displays the landmarks present in landmarks
    1.51 +*  database,as a list.The dialog can be a single selector or multiple selector dialog,
    1.52 +*  depending upon argument passed by the client (in ExecuteLD function)  at the time
    1.53 +*  when it is launched.Based on whether it is a single selector or multiple selector
    1.54 +*  dialog, user can select single landmark or multiple landmarks.
    1.55 +*/
    1.56 +class CLmkLandmarkSelectorDlg : public CBase
    1.57 +    {
    1.58 +    public:  // Constructors and destructor
    1.59 +        /**
    1.60 +        * This is a static function, which creates and returns an instance of this class.
    1.61 +        * All the landmarks present in the landmark database are shown in the selector.
    1.62 +    	*
    1.63 +        * @leave  Leaves with KErrNotSupported if framework functionality is not available.
    1.64 +        * @panic  Panics with system-wide panic codes.
    1.65 +        * @return new instance of this class
    1.66 +        */
    1.67 +        IMPORT_C static CLmkLandmarkSelectorDlg* NewL();
    1.68 +
    1.69 +        /**
    1.70 +        * Destructor.
    1.71 +        */
    1.72 +        IMPORT_C ~CLmkLandmarkSelectorDlg();
    1.73 +
    1.74 +    public: // New functions
    1.75 +        /**
    1.76 +        * This function sets the context - that is, the enclosing parent control - for this control.
    1.77 +        *
    1.78 +        * @param [in] aParent The parent object which is the context for the control.
    1.79 +        * @panic Panics with KLmkPanicNullMember, if the selector is not
    1.80 +        *        constructed properly.
    1.81 +        */
    1.82 +        IMPORT_C void SetMopParent( MObjectProvider* aParent );
    1.83 +
    1.84 +        /**
    1.85 +        * This function launches the landmark selector dialog. Client uses this function
    1.86 +        * to launch single landmark selector dialog.
    1.87 +        * This object is destroyed when this function returns or leaves.
    1.88 +        * @param [in/out] aSelected Passed as reference and when the function returns,
    1.89 +        *                contains the selected landmark id.
    1.90 +        * @leave Leaves with system-wide leave codes.
    1.91 +        * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
    1.92 +        * @return Returns non-zero if accepted, else zero.
    1.93 +        */
    1.94 +        IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
    1.95 +
    1.96 +        /**
    1.97 +        * This function launches the landmark selector dialog. Client uses this function
    1.98 +        * to launch multiple landmark selector dialog.
    1.99 +        * This object is destroyed when this function returns or leaves.
   1.100 +        * If the array(aSelectedItems) is passed with already filled landmark ids, then
   1.101 +        * such landmarks will be shown as selected when the dialog is launched, but if
   1.102 +        * any of these ids do not exist in landmarks database, it will be ignored.
   1.103 +        *
   1.104 +        * @param [in/out] aSelectedItems Passed as reference, either filled with landmark
   1.105 +        *                ids for pre-selection or an empty array. On return of the function
   1.106 +        *                contains the selected landmark ids.
   1.107 +	    * @leave Leaves with system-wide leave codes.
   1.108 +	    * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
   1.109 +        * @return Returns non-zero if accepted, else zero.
   1.110 +        */
   1.111 +        IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
   1.112 +    private:
   1.113 +        /**
   1.114 +        * C++ default constructor.
   1.115 +        * @return newly instantiated object
   1.116 +        */
   1.117 +        CLmkLandmarkSelectorDlg();
   1.118 +
   1.119 +        /**
   1.120 +        * By default Symbian 2nd phase constructor is private.
   1.121 +        */
   1.122 +
   1.123 +        void ConstructL( );
   1.124 +
   1.125 +
   1.126 +    private:    // Data
   1.127 +        // ETrue if executed in multiple item selector mode
   1.128 +        TBool iIsMultiSelector;
   1.129 +
   1.130 +        /// Own: Search implementor object
   1.131 +        CLmkDlgSelectorImplBase* iSelector;
   1.132 +
   1.133 +        // Set to ETrue in destructor
   1.134 +        TBool* iDestroyedPtr;
   1.135 +
   1.136 +        // For multiple database support
   1.137 +        RPointerArray <CPosLandmarkDatabase> iDbs; //
   1.138 +
   1.139 +
   1.140 +    };
   1.141 +
   1.142 +#endif      // CLMKLANDMARKSELECTORDLG_H
   1.143 +
   1.144 +// End of File