homesync/contentmanager/mediaservant/inc/msfillbrowsecontainer.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:  Definition for MediaServant fill list browse container class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_MSFILLBROWSECONTAINER_H
       
    20 #define C_MSFILLBROWSECONTAINER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknlists.h>
       
    24 
       
    25 #include "msengineobserver.h"
       
    26 #include "msbasecontainer.h"
       
    27 #include "msitembrowser.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CMSAppUi;
       
    31 class CMSFillBrowseView;
       
    32 class CCmFillRule;
       
    33 
       
    34 
       
    35 /**
       
    36  * CMSFillBrowseContainer class
       
    37  *
       
    38  * @since S60 5.1
       
    39  */
       
    40 NONSHARABLE_CLASS( CMSFillBrowseContainer ): public CMSItemBrowser,
       
    41                                              public MMSEngineObserver
       
    42     {
       
    43     public:
       
    44         
       
    45         /**
       
    46          * Default constructor.
       
    47          */
       
    48         CMSFillBrowseContainer( CMSAppUi& aAppUi,
       
    49                                 CMSFillBrowseView& aView );
       
    50 
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         virtual ~CMSFillBrowseContainer();
       
    55 
       
    56         /**
       
    57          * Randomizes list
       
    58          * @since S60 5.1
       
    59          * @param None
       
    60          * @return None
       
    61          */
       
    62         void RandomizeListL();
       
    63 
       
    64         /**
       
    65          * Checks if current list has random rule
       
    66          * @since S60 5.1
       
    67          * @param None         
       
    68          * @return TBool, ETrue if random rule exists
       
    69          */
       
    70         TBool HasListRandomRule();
       
    71 
       
    72         /**
       
    73          * Sets file statuses
       
    74          * @Since S60 5.1
       
    75          * @param None
       
    76          * @return None
       
    77          */
       
    78         void SetFileStatusesL();
       
    79 
       
    80         /**
       
    81          * Sets status of files
       
    82          * @param aStatus, file status
       
    83          * @return None
       
    84          */
       
    85         void SetStatusOfFiles( TCmListItemStatus aStatus );
       
    86 
       
    87     protected: 
       
    88     
       
    89 // From base class MMSEngineObserver
       
    90 
       
    91         /**
       
    92          * From MMSEngineObserver
       
    93          * See base class definition
       
    94          */
       
    95         void ReadyL( TCmService aService, TInt aError );
       
    96 
       
    97 // From base class CoeControl
       
    98         
       
    99         /**
       
   100          * From CoeControl
       
   101          * See base class definition
       
   102          */
       
   103         void GetHelpContext(TCoeHelpContext& aContext) const;
       
   104 
       
   105 // From base class CMSItemBrowser    
       
   106 
       
   107         /**
       
   108          * Gets browse data from server
       
   109          * See base class definition
       
   110          */
       
   111         void GetBrowseDataL();
       
   112 
       
   113     private:
       
   114     
       
   115         /**
       
   116          * Detects the KEikDynamicLayoutVariantSwitch
       
   117          * message and re-layouts controls from this.
       
   118          * @since S60 5.1
       
   119          * @param aType, change type
       
   120          * @return None
       
   121          */
       
   122         void HandleResourceChange(TInt aType);
       
   123 
       
   124         /**
       
   125          * Checks if file status has been changed
       
   126          * @Since S60 5.1
       
   127          * @param None
       
   128          * @return TBool, ETrue if changed, EFalse otherwise
       
   129          */
       
   130         TBool CheckIfStatusChanged();
       
   131         
       
   132         /**
       
   133          * Creates and sets navi pane text
       
   134          * @Since S60 5.1
       
   135          * @param aCount, item count
       
   136          * @param aSize, list size
       
   137          * @return None
       
   138          */
       
   139         void CreateAndSetNaviPaneTextL( TUint32 aCount, TUint32 aSize );
       
   140 
       
   141     private:
       
   142         /**
       
   143          * selected rule
       
   144          */
       
   145         CCmFillRule*                        iRule;  // not owned
       
   146         /**
       
   147          * containers view
       
   148          */
       
   149         CMSFillBrowseView*                  iView;  // not owned
       
   150         /**
       
   151          * array of item status
       
   152          * list order can't be changed so we don't have to copy
       
   153          * whole item
       
   154          */
       
   155         RArray<TCmListItemStatus>           iStatusArray;
       
   156 
       
   157     };
       
   158 
       
   159 
       
   160 
       
   161 #endif // C_MSFILLBROWSECONTAINER_H