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
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:    LandmarksUi Content File -    This class provides functionality for selecting either one or
williamr@2
    15
*                multiple landmarks.
williamr@2
    16
*
williamr@2
    17
*/
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
williamr@2
    24
williamr@2
    25
#ifndef CLMKLANDMARKSELECTORDLG_H
williamr@2
    26
#define CLMKLANDMARKSELECTORDLG_H
williamr@2
    27
williamr@2
    28
//  INCLUDES
williamr@2
    29
#include <e32base.h>            // CBase
williamr@2
    30
#include <e32std.h>			//RArray and RPointerArray
williamr@2
    31
#include <EPos_Landmarks.h>     // Lm typedefs, constants etc.
williamr@2
    32
#include <EPos_CPosLandmarkDatabase.h>
williamr@2
    33
williamr@2
    34
// FORWARD DECLARATIONS
williamr@2
    35
//class CPosLandmarkDatabase;
williamr@2
    36
class CLmkDlgSelectorImplBase;
williamr@2
    37
class MObjectProvider;
williamr@2
    38
williamr@2
    39
// For multiple database support
williamr@2
    40
class TLmkItemIdDbCombiInfo;
williamr@2
    41
williamr@2
    42
// CLASS DECLARATION
williamr@2
    43
williamr@2
    44
/**
williamr@2
    45
*  This is a dialog class, which is used to launch landmark selector dialog and
williamr@2
    46
*  to get the selected landmark ids.It displays the landmarks present in landmarks
williamr@2
    47
*  database,as a list.The dialog can be a single selector or multiple selector dialog,
williamr@2
    48
*  depending upon argument passed by the client (in ExecuteLD function)  at the time
williamr@2
    49
*  when it is launched.Based on whether it is a single selector or multiple selector
williamr@2
    50
*  dialog, user can select single landmark or multiple landmarks.
williamr@2
    51
*/
williamr@2
    52
class CLmkLandmarkSelectorDlg : public CBase
williamr@2
    53
    {
williamr@2
    54
    public:  // Constructors and destructor
williamr@2
    55
        /**
williamr@2
    56
        * This is a static function, which creates and returns an instance of this class.
williamr@2
    57
        * All the landmarks present in the landmark database are shown in the selector.
williamr@2
    58
    	*
williamr@2
    59
        * @leave  Leaves with KErrNotSupported if framework functionality is not available.
williamr@2
    60
        * @panic  Panics with system-wide panic codes.
williamr@2
    61
        * @return new instance of this class
williamr@2
    62
        */
williamr@2
    63
        IMPORT_C static CLmkLandmarkSelectorDlg* NewL();
williamr@2
    64
williamr@2
    65
        /**
williamr@2
    66
        * Destructor.
williamr@2
    67
        */
williamr@2
    68
        IMPORT_C ~CLmkLandmarkSelectorDlg();
williamr@2
    69
williamr@2
    70
    public: // New functions
williamr@2
    71
        /**
williamr@2
    72
        * This function sets the context - that is, the enclosing parent control - for this control.
williamr@2
    73
        *
williamr@2
    74
        * @param [in] aParent The parent object which is the context for the control.
williamr@2
    75
        * @panic Panics with KLmkPanicNullMember, if the selector is not
williamr@2
    76
        *        constructed properly.
williamr@2
    77
        */
williamr@2
    78
        IMPORT_C void SetMopParent( MObjectProvider* aParent );
williamr@2
    79
williamr@2
    80
        /**
williamr@2
    81
        * This function launches the landmark selector dialog. Client uses this function
williamr@2
    82
        * to launch single landmark selector dialog.
williamr@2
    83
        * This object is destroyed when this function returns or leaves.
williamr@2
    84
        * @param [in/out] aSelected Passed as reference and when the function returns,
williamr@2
    85
        *                contains the selected landmark id.
williamr@2
    86
        * @leave Leaves with system-wide leave codes.
williamr@2
    87
        * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
williamr@2
    88
        * @return Returns non-zero if accepted, else zero.
williamr@2
    89
        */
williamr@2
    90
        IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
williamr@2
    91
williamr@2
    92
        /**
williamr@2
    93
        * This function launches the landmark selector dialog. Client uses this function
williamr@2
    94
        * to launch multiple landmark selector dialog.
williamr@2
    95
        * This object is destroyed when this function returns or leaves.
williamr@2
    96
        * If the array(aSelectedItems) is passed with already filled landmark ids, then
williamr@2
    97
        * such landmarks will be shown as selected when the dialog is launched, but if
williamr@2
    98
        * any of these ids do not exist in landmarks database, it will be ignored.
williamr@2
    99
        *
williamr@2
   100
        * @param [in/out] aSelectedItems Passed as reference, either filled with landmark
williamr@2
   101
        *                ids for pre-selection or an empty array. On return of the function
williamr@2
   102
        *                contains the selected landmark ids.
williamr@2
   103
	    * @leave Leaves with system-wide leave codes.
williamr@2
   104
	    * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
williamr@2
   105
        * @return Returns non-zero if accepted, else zero.
williamr@2
   106
        */
williamr@2
   107
        IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
williamr@2
   108
    private:
williamr@2
   109
        /**
williamr@2
   110
        * C++ default constructor.
williamr@2
   111
        * @return newly instantiated object
williamr@2
   112
        */
williamr@2
   113
        CLmkLandmarkSelectorDlg();
williamr@2
   114
williamr@2
   115
        /**
williamr@2
   116
        * By default Symbian 2nd phase constructor is private.
williamr@2
   117
        */
williamr@2
   118
williamr@2
   119
        void ConstructL( );
williamr@2
   120
williamr@2
   121
williamr@2
   122
    private:    // Data
williamr@2
   123
        // ETrue if executed in multiple item selector mode
williamr@2
   124
        TBool iIsMultiSelector;
williamr@2
   125
williamr@2
   126
        /// Own: Search implementor object
williamr@2
   127
        CLmkDlgSelectorImplBase* iSelector;
williamr@2
   128
williamr@2
   129
        // Set to ETrue in destructor
williamr@2
   130
        TBool* iDestroyedPtr;
williamr@2
   131
williamr@2
   132
        // For multiple database support
williamr@2
   133
        RPointerArray <CPosLandmarkDatabase> iDbs; //
williamr@2
   134
williamr@2
   135
williamr@2
   136
    };
williamr@2
   137
williamr@2
   138
#endif      // CLMKLANDMARKSELECTORDLG_H
williamr@2
   139
williamr@2
   140
// End of File