upnpsettings/multiselectionui/inc/upnpappmultiselectiondialog.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     2 * Copyright (c) 2008 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:      CUPnPAppMultiselectionDialog class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef UPNPAPPMULTISELECTIONDIALOG_H
       
    24 #define UPNPAPPMULTISELECTIONDIALOG_H
       
    25 
       
    26 // INCLUDES
       
    27 #include <AknDialog.h>
       
    28 #include <aknselectionlist.h>
       
    29 #include <aknsfld.h>
       
    30 #include <aknnavide.h>
       
    31 #include <akntitle.h> //for status pane
       
    32 #include <AknIconArray.h>
       
    33 #include <AknWaitNoteWrapper.h>
       
    34 
       
    35 #include "upnpfilesharingengine.h" // included to know THomeConnectMediaType
       
    36 #include "upnpmultiselectionutility.h"
       
    37 
       
    38 
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 class CAknColumnListBox;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 * CUPnPAppMultiselectionDialog dialog class
       
    47 * @since S60 3.1
       
    48 */
       
    49 NONSHARABLE_CLASS( CUPnPAppMultiselectionDialog ) : 
       
    50     public CAknSelectionListDialog,
       
    51     MAknBackgroundProcess
       
    52     {
       
    53     public: // Constructors and destructor
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @since S60 3.1
       
    57         * @param aMediaType. Media type for UI. Either Images Or videos or \
       
    58 music.
       
    59         * @param aFileSharingEngine. Pointer to filesharingengine.
       
    60         * @param aSelectionIndexArray. Array for initial selection.
       
    61         */
       
    62         static CUPnPAppMultiselectionDialog* NewL(
       
    63                             THomeConnectMediaType aMediaType,
       
    64                             CUPnPFileSharingEngine* aFileSharingEngine,
       
    65                             CArrayFix<TInt>* aSelectionIndexArray );
       
    66 
       
    67         /**
       
    68         * Destructor.
       
    69         */
       
    70        virtual ~CUPnPAppMultiselectionDialog();
       
    71 
       
    72 
       
    73     protected:  // New functions
       
    74         void ConstructL(THomeConnectMediaType aMediaType,
       
    75                         CUPnPFileSharingEngine* aFileSharingEngine,
       
    76                         CArrayFix<TInt>* aSelectionIndexArray );
       
    77 
       
    78     protected:  // Functions from base classes
       
    79         /**
       
    80         * From MAknBackgroundProcess, handles backround processing
       
    81         * @since S60 3.1
       
    82         */
       
    83         virtual void StepL();
       
    84 
       
    85         /**
       
    86         * From MAknBackgroundProcess, handles backround processing
       
    87         * @since S60 3.1
       
    88         * @return TBool, ETrue when the process is done
       
    89         */
       
    90         virtual TBool IsProcessDone() const;
       
    91 
       
    92         /**
       
    93         * From CAknSelectionListDialog, handles layout initialization
       
    94         * @since S60 3.1
       
    95         */
       
    96         void PreLayoutDynInitL();
       
    97 
       
    98         /**
       
    99         * From CAknSelectionListDialog, handles initialization
       
   100         * that doesn't affect layout
       
   101         * @since S60 3.1
       
   102         */
       
   103         void PostLayoutDynInitL();
       
   104 
       
   105         /**
       
   106         * From CAknSelectionListDialog, handles key events.
       
   107         * @since S60 3.1
       
   108         * @param TKeyEvent, Event to handled.
       
   109         * @param TEventCode, Type of the key event.
       
   110         * @return TKeyResponse, response code 
       
   111         * (EKeyWasConsumed, EKeyWasNotConsumed).
       
   112         */
       
   113         TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent,
       
   114                                      TEventCode aType);
       
   115 
       
   116         /**
       
   117         * From CAknSelectionListDialog, handles focus changes of the dialog
       
   118         * @since S60 3.1
       
   119         * @param TInt, pressed button id
       
   120         * @return TBool, ETrue if ready to close dialog, EFalse otherwise
       
   121         */
       
   122         TBool OkToExitL( TInt aButtonId );
       
   123 
       
   124 
       
   125     private:
       
   126         /**
       
   127         * C++ default constructor.
       
   128         */
       
   129         CUPnPAppMultiselectionDialog();
       
   130 
       
   131     private: //data
       
   132         // dialog control item
       
   133         CAknColumnListBox*              iListBox; // not owned
       
   134         // Mediatype selected from listbox
       
   135         THomeConnectMediaType           iMediaType;
       
   136         // File sharing engine member
       
   137         CUPnPFileSharingEngine*         iFileSharingEngine; //not owned
       
   138         // title pane
       
   139         CAknTitlePane*                  iTitlePane;
       
   140         // selected item - needed for creation of CAknSelectionListDialog
       
   141         TInt                            iSelectedItem;
       
   142 
       
   143         CAknWaitNoteWrapper*            iWaitNoteWrapper;
       
   144         // array of marked (shared) items.
       
   145         CArrayFix<TInt>*           iMarkedItems; //not owned
       
   146 
       
   147         CUpnpMultiselectionUtility*      iUtility; //owned
       
   148         
       
   149         CAknFilteredTextListBoxModel* iModel; //not owned
       
   150 
       
   151         CDesCArray* iSettingsTextArray; //not owned
       
   152 
       
   153         // Variable to transfer information about wait note end
       
   154         TBool iDone;
       
   155 
       
   156         /**
       
   157          * Msk's label. (Owned)
       
   158          */
       
   159         HBufC* iMskSelectText;
       
   160 
       
   161         /**
       
   162          * Msk's label. (Owned)
       
   163          */
       
   164         HBufC* iMskUnselectText;
       
   165 
       
   166         /**
       
   167          * Internal state
       
   168          */
       
   169         enum TState
       
   170             {
       
   171             ELoadNone = 0,
       
   172             ELoadContent,
       
   173             ELoadIndexes,
       
   174             ELoadDone
       
   175             };
       
   176         TState iState;
       
   177     };
       
   178 
       
   179 #endif // UPNPAPPMULTISELECTIONDIALOG_H
       
   180 
       
   181 // End of File