upnpsettings/multiselectionui/inc/cupnpmultiselectionui.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     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:      Multiselection UI class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CUPNPMULTISELECTIONUI
       
    25 #define CUPNPMULTISELECTIONUI
       
    26 
       
    27 // INCLUDES
       
    28 #include <e32base.h>
       
    29 #include "upnpfilesharingengine.h" // included to know THomeConnectMediaType
       
    30 #include <eiklbv.h> // for CListBoxView::CSelectionIndexArray
       
    31 // CONSTANTS
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CAknViewAppUi;
       
    35 class CEikonEnv;
       
    36 class CUPnPAppMultiselectionDialog;
       
    37 class CUPnPAppMultiselectionPopup;
       
    38 
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43  * CUPnPMultiselectionUi class
       
    44  *
       
    45  * UI for showing the filesharing window either in popup or dialog style
       
    46  *
       
    47  * @lib upnpmultiselectionui.lib
       
    48  */
       
    49 class CUPnPMultiselectionUi : public CBase
       
    50     {
       
    51 
       
    52 public:     // Constructors and destructor
       
    53 
       
    54     enum TUiStyle
       
    55         {
       
    56         EDialog,
       
    57         EPopup
       
    58         };
       
    59 
       
    60     /**
       
    61      * Two-phased constructor.
       
    62      * @since S60 3.1
       
    63      * @param aMediaType. Media type for UI. Either Images&videos or music.
       
    64      * @param aFileSharingEngine. Pointer to filesharingengine.
       
    65      * @param aAlbumContainer. Container for the items user has selected.
       
    66      * @param aVisualSharingState. State of the sharing for the home.
       
    67      * network UI
       
    68      * @param aSelectionIndexArray. Array for initial selection.
       
    69      * @param aUiStyle. Describes if popup or dialog style ui is used.
       
    70      */
       
    71     IMPORT_C static CUPnPMultiselectionUi* NewL(
       
    72         THomeConnectMediaType aMediaType,
       
    73         CUPnPFileSharingEngine* aFileSharingEngine,
       
    74         TInt& aVisualSharingState,
       
    75         CListBoxView::CSelectionIndexArray* aSelectionIndexArray = NULL,
       
    76         TUiStyle aUiStyle = EDialog,
       
    77         const HBufC* aHeading = NULL
       
    78         );
       
    79  
       
    80     /**
       
    81      * Sets marked items to popup dialog
       
    82      * 
       
    83      * @param aMarkedItems
       
    84      */
       
    85     IMPORT_C void SetMarkedItemsL( CArrayFix<TInt>& aMarkedItems );
       
    86     
       
    87     /**
       
    88      * Destructor.
       
    89      */
       
    90     virtual ~CUPnPMultiselectionUi();
       
    91 
       
    92 public:
       
    93 
       
    94     /**
       
    95      * Executes the file sharing UI as a dialog style
       
    96      *
       
    97      * @since S60 3.1
       
    98      * @return TInt, Error code
       
    99      */
       
   100     IMPORT_C TInt ExecuteDlgLD();
       
   101 
       
   102     /**
       
   103      * Executes the file sharing UI as a popup style
       
   104      *
       
   105      * @since S60 3.1
       
   106      * @return TInt, Error code
       
   107      */
       
   108     IMPORT_C TInt ExecutePopupLD();
       
   109 
       
   110 private:
       
   111 
       
   112     /**
       
   113      * C++ default constructor
       
   114      */
       
   115     CUPnPMultiselectionUi();
       
   116 
       
   117 
       
   118     /**
       
   119      * Symbian default constructor.
       
   120      */
       
   121     void ConstructL(
       
   122         THomeConnectMediaType aMediaType,
       
   123         CUPnPFileSharingEngine* aFileSharingEngine,
       
   124         TInt& aVisualSharingState,
       
   125         CListBoxView::CSelectionIndexArray* aSelectionIndexArray,
       
   126         TUiStyle aStyle,
       
   127         const HBufC* aHeading
       
   128         );
       
   129 
       
   130 
       
   131 private:    // Data
       
   132     /**
       
   133      * Resource file offse
       
   134      */
       
   135     TInt                        iResFileOffset;   // Resource file offset
       
   136     /**
       
   137      * Pointer to CEikonEnv
       
   138      */
       
   139     CEikonEnv*                  iCoeEnv;
       
   140     /**
       
   141      * Pointer to multiselection dialog
       
   142      */
       
   143     CUPnPAppMultiselectionDialog* iDlg;
       
   144     /**
       
   145      * Pointer to multiselection dialog
       
   146      */
       
   147     CUPnPAppMultiselectionPopup* iPopup;
       
   148     
       
   149     /**
       
   150      * Flag the FeatureManager is initialized or not
       
   151      */
       
   152     TBool                       iFeatureManagerInitialized;  
       
   153     };
       
   154 
       
   155 #endif  // CUPNPMULTISELECTIONUI
       
   156 
       
   157 // End of File