homesync/contentmanager/mediaservant/inc/msappui.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:  Definition for MediaServant appui class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CMSAPPUI_H
       
    20 #define C_CMSAPPUI_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknViewAppUi.h>
       
    24 #include <GSPluginInterface.h>
       
    25 #include <GSFWViewUIDs.h>
       
    26 #include <GSPluginLoader.h>
       
    27 
       
    28 #include "msparameteragent.h"
       
    29 #include "msfillrulecontroller.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CMSEngine;
       
    33 class CMSStoreListController;
       
    34 class CCmDriveInfo;
       
    35 class CMSGSInterface;
       
    36 
       
    37 /**
       
    38  *  Application UI class.
       
    39  *
       
    40  *  @since S60 5.1
       
    41  */
       
    42 NONSHARABLE_CLASS( CMSAppUi ): public CAknViewAppUi
       
    43     {
       
    44 
       
    45     public:
       
    46 
       
    47 
       
    48         /**
       
    49          * Destructor.
       
    50          */
       
    51         ~CMSAppUi();
       
    52 
       
    53         /**
       
    54          * Changes active view according to parameters.
       
    55          * @since S60 3.1
       
    56          * @param aOldView current view
       
    57          * @param aNewView new view
       
    58          */
       
    59         void ChangeViewL(const TUid& aOldView, const TUid& aNewView);
       
    60 
       
    61         /**
       
    62          * Returns fill rule controller
       
    63          * @since S60 3.1
       
    64          * @return CMSFillRuleController, controller pointer
       
    65          */
       
    66         CMSFillRuleController* FillRuleController();
       
    67 
       
    68         /**
       
    69          * Returns store rule controller
       
    70          * @since S60 5.0
       
    71          * @return CCmStoreListController, pointer to controller
       
    72          */
       
    73         CMSStoreListController* StoreListController();
       
    74 
       
    75         /**
       
    76          * Refresh store and fill lists
       
    77          * @since S60 3.1
       
    78          */
       
    79         void RefreshListsL();
       
    80 
       
    81         /**
       
    82          * File server session
       
    83          * @since S60 3.1
       
    84          * return RFs, file server session
       
    85          */
       
    86         RFs& FsSession();
       
    87 
       
    88         /**
       
    89          * Returns msengine
       
    90          * @since S60 3.1
       
    91          * @return CMSEngine, pointer to engine
       
    92          */
       
    93         CMSEngine* MSEngine();
       
    94 
       
    95         /**
       
    96          * Reads memory info
       
    97          * @since S60 3.1
       
    98          * @param aCapasity, size of memory
       
    99          * @param aFreeSpace, free space of memory
       
   100          * @return TInt, error code
       
   101          */
       
   102         TInt ReadMMCInfoL( TInt64& aCapasity, TInt64& aFreeSpace );
       
   103         /**
       
   104          * Get Filled Files Size
       
   105          * @since S60 3.1
       
   106          * @param aSize, size of filled files
       
   107          * @param aID, fill rule ID
       
   108          */
       
   109         void GetFilledFilesSize( TInt64& aSize, const TInt aID );
       
   110 
       
   111         /**
       
   112          * Returns pointer to parameter agent
       
   113          * @since S60 3.1
       
   114          * @return CMSParameterAgent, parameter agent
       
   115          */
       
   116         CMSParameterAgent* ParameterAgent();
       
   117 
       
   118         /**
       
   119          * drive selection indicator
       
   120          * @since S60 3.1
       
   121          * @return TBool, ETrue if selected, EFalse otherwise
       
   122          */
       
   123         TBool DriveSelectedL();
       
   124 
       
   125         /**
       
   126          * drive selection indicator
       
   127          * @since S60 3.1
       
   128          * @return TBool, ETrue if selected, EFalse otherwise
       
   129          */
       
   130         CMSGSInterface* SettingsPlugin();
       
   131 
       
   132         /**
       
   133          * Compares IDs of two drives
       
   134          * @since S60 3.1
       
   135          * @return TBool, ETrue if match, EFalse otherwise
       
   136          */
       
   137 
       
   138         static TBool CompareIds( const CCmDriveInfo& aStoredDrive,
       
   139                                  const CCmDriveInfo& aDrive );
       
   140 
       
   141         /**
       
   142          * Start wizard
       
   143          * 
       
   144          * @since S60 5.1
       
   145          * @return TInt, wizard exit code
       
   146          */
       
   147         TInt RunWizardL();
       
   148         
       
   149 protected:
       
   150 
       
   151 // From base class CAknViewAppUi
       
   152 
       
   153         /**
       
   154          * From CAknViewAppUi
       
   155          * See base class definition
       
   156          */
       
   157         void HandleCommandL( TInt aCommand );
       
   158 
       
   159 private:
       
   160         /**
       
   161          * Performs the second phase construction.
       
   162          */
       
   163         void ConstructL();
       
   164 
       
   165         /**
       
   166          * Checks if selected memory is on the device
       
   167          * @since S60 3.1
       
   168          * @return TBool, ETrue if found, EFalse otherwise
       
   169          */
       
   170         TBool MemoryAttachedL();
       
   171 
       
   172 
       
   173         /**
       
   174          * Loads gs plugin ( settings view )
       
   175          * @since S60 3.1
       
   176          */
       
   177         void LoadSettingsPluginL();
       
   178 
       
   179        /**
       
   180          * Check memory selected status, if none of drives have been selected
       
   181          * the mass memory will be selected as default drive
       
   182          * @since S60 3.2
       
   183          */
       
   184         void CheckDrivesSelectedL();
       
   185 
       
   186 private:
       
   187 
       
   188         /**
       
   189          * view which is currently active
       
   190          */
       
   191         TInt iActiveView;
       
   192         /** 
       
   193          * focus index of main view
       
   194          */        
       
   195         TInt iMainFocusIndex;
       
   196         /**
       
   197          * pointer to application engine
       
   198          */
       
   199         CMSEngine*                  iMSEngine;              // owned
       
   200         /**
       
   201          * parameter class
       
   202          */
       
   203         CMSParameterAgent*          iParameterAgent;        // owned
       
   204         /**
       
   205          * fill list controller
       
   206          */
       
   207         CMSFillRuleController*      iFillRuleController;    // owned
       
   208         /**
       
   209          * store list controller
       
   210          */
       
   211         CMSStoreListController*     iStoreListController;   // owned
       
   212         /**
       
   213          * GS plugin ( settings view )
       
   214          */
       
   215         CMSGSInterface*             iPlugin;                // owned
       
   216     };
       
   217 #endif // C_CMSAPPUI_H
       
   218 
       
   219 // End of File