cmmanager/cmmgr/Framework/Inc/selectdestinationdlg.h
changeset 20 9c97ad6591ae
parent 18 fcbbe021d614
child 21 b8e8e15e80f2
child 23 7ec726f93df1
child 28 860702281757
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
     1 /*
       
     2 * Copyright (c) 2006 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:  Shows the "Select destination:" dialog, where the user can 
       
    15                  select one of the available destinations.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef SELECTDESTINATIONDLG_H
       
    20 #define SELECTDESTINATIONDLG_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknlistquerydialog.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CCmManagerImpl;
       
    27 class CCmDestinationImpl;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  *  Show a query containing a title, a message box (contain a short explanation
       
    33  *  of the query) and a listbox. The listbox contains a list of available
       
    34  *  destinations from which the user can choose.
       
    35  *
       
    36  *  @lib cmmanager.lib
       
    37  *  @since S60 v3.2
       
    38  */
       
    39 NONSHARABLE_CLASS( CSelectDestinationDlg ) : public CAknListQueryDialog
       
    40     {
       
    41     public: // Constructors, destructor
       
    42     
       
    43         /**
       
    44         * Two-phase constructor.
       
    45         * @param aDestinationId Variable reference used to hold the return
       
    46         * value of list selection.
       
    47         * @param aCmManager Reference to CM Manager implementation used for
       
    48         * querying destination specific data.
       
    49         * @return Newly created dialog object.
       
    50         */
       
    51         static CSelectDestinationDlg* NewL( 
       
    52                                         TUint32& aDestinationId,
       
    53                                         CCmManagerImpl& aCmManager,
       
    54                                         RArray<TUint32>* aDestArray = NULL);
       
    55 
       
    56         /**
       
    57         * Two-phase constructor.
       
    58         * @param aDestinationId Variable reference used to hold the return
       
    59         * value of list selection.
       
    60         * @param aCmManager Reference to CM Manager implementation used for
       
    61         * querying destination specific data.
       
    62         * @return Newly created dialog object.
       
    63         */
       
    64         static CSelectDestinationDlg* NewLC( 
       
    65                                         TUint32& aDestinationId,
       
    66                                         CCmManagerImpl& aCmManager,
       
    67                                         RArray<TUint32>* aDestArray = NULL);
       
    68 
       
    69         /**
       
    70         * Destructor.
       
    71         */
       
    72         ~CSelectDestinationDlg();
       
    73 
       
    74     private: // constructors
       
    75     
       
    76         /**
       
    77         * Constructor.
       
    78         */
       
    79         CSelectDestinationDlg( TInt aDummyIndex, TUint32& aDestinationId );
       
    80 
       
    81         /**
       
    82         * Second-phase constructor.
       
    83         * @param aCmManager Reference to CM Manager implementation used for
       
    84         * querying destination specific data.
       
    85         */
       
    86         void ConstructL( CCmManagerImpl& aCmManager, 
       
    87                          RArray<TUint32>* aDestArray );
       
    88 
       
    89     private: // From CAknListQueryDialog
       
    90     
       
    91         /**
       
    92         * @see CAknListQueryDialog
       
    93         */
       
    94         virtual void PreLayoutDynInitL();
       
    95 
       
    96         /**
       
    97         * @see CAknListQueryDialog
       
    98         */
       
    99         TBool OkToExitL( TInt aButtonId );
       
   100 
       
   101     private: // internal helper methods
       
   102     
       
   103         /**
       
   104         * Handle resource change events. 
       
   105         * @param aType: The type of resources that have changed
       
   106         */
       
   107         void HandleResourceChange( TInt aType );
       
   108 
       
   109     private:  // New functions
       
   110 
       
   111         /**
       
   112         * Sets graphic icons
       
   113         */
       
   114         void SetIconsL();
       
   115 
       
   116     private: //data
       
   117 
       
   118         TUint32& iDestinationId;
       
   119         RPointerArray<CCmDestinationImpl> iDestinations;
       
   120     };
       
   121 
       
   122 #endif  // SELECTDESTINATIONDLG_H