homesync/contentmanager/mediaservant/inc/msmainview.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 main view class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef C_MSMAINVIEW_H
       
    23 #define C_MSMAINVIEW_H
       
    24 
       
    25 // INCLUDES
       
    26 #include "msbaseview.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CMSAppUi;
       
    30 class CMSMainContainer;
       
    31 class CMSEngine;
       
    32 class CMSSettingsView;
       
    33 class CGSPluginInterface;
       
    34 
       
    35 /**
       
    36  * CMSMainView view class. Main view is visible when
       
    37  * application is launched
       
    38  *
       
    39  *  @since S60 5.1
       
    40  */
       
    41 NONSHARABLE_CLASS( CMSMainView ): public CMSBaseView
       
    42     {
       
    43     public:
       
    44         /**
       
    45          * Constructor.
       
    46          */
       
    47         CMSMainView( CMSAppUi& aAppUi );
       
    48 
       
    49         /**
       
    50          * Symbian default constructor.
       
    51          */
       
    52         void ConstructL();
       
    53 
       
    54         /**
       
    55          * Destructor.
       
    56          */
       
    57         virtual ~CMSMainView();
       
    58 
       
    59         /**
       
    60          * Changes cba according to hinghlighted item index
       
    61          * @since S60 3.2
       
    62          * @param aHighlightedIndex, highlighted item index
       
    63          */
       
    64         void SetCbaL( TInt aHighlightedIndex );
       
    65 
       
    66         /**
       
    67          * ListBox focus index
       
    68          * @since S60 5.1
       
    69          * @return TInt, focus index
       
    70          */
       
    71         TInt FocusIndex() const;
       
    72 
       
    73         /**
       
    74          * Checks if MMC card has been changed
       
    75          * @since S60 5.1
       
    76          */
       
    77         void CheckMemoryCardL();
       
    78 
       
    79     protected:
       
    80 
       
    81 // From base class CAknView
       
    82 
       
    83         /**
       
    84          * From CAknView
       
    85          * See base class definition
       
    86          */
       
    87         TUid Id() const;
       
    88 
       
    89         /**
       
    90          * From CAknView
       
    91          * See base class definition
       
    92          */
       
    93         void HandleCommandL( TInt aCommand );
       
    94 
       
    95         /**
       
    96          * From CAknView
       
    97          * See base class definition
       
    98          */
       
    99         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   100                           TUid aCustomMessageId,
       
   101                           const TDesC8& aCustomMessage );
       
   102 
       
   103         /**
       
   104          * From CAknView
       
   105          * See base class definition
       
   106          */
       
   107         void DoDeactivate();
       
   108 
       
   109 // From base class MEikMenuObserver
       
   110 
       
   111         /**
       
   112          * From MEikMenuObserver
       
   113          */
       
   114         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   115 
       
   116     private:
       
   117 
       
   118         /**
       
   119          * Show memory card query and handles selection
       
   120          * @since S60 5.1
       
   121          * @param RPointerArray<CCmDriveInfo>&, stored drive array
       
   122          * @param RPointerArray<CCmDriveInfo>&, device drive array
       
   123          * @param TInt, mmc drive index
       
   124          */
       
   125         void ShowAndHandleMMCQueryL(
       
   126                              RPointerArray<CCmDriveInfo>& aStoredArray,
       
   127                              RPointerArray<CCmDriveInfo>& aDriveArray,
       
   128                              TInt index );
       
   129 
       
   130         /**
       
   131          * Starts the wizard when run first time, callback for CIdle
       
   132          * @since S60 5.1
       
   133          * @param aPtr, Pointer to this class
       
   134          * @return TBool, EFalse because of one time call
       
   135          */
       
   136         static TBool InitializeWizardL( TAny* aPtr );
       
   137 
       
   138         /**
       
   139          * Starts the new memory card dialog when new
       
   140          * memory card inserted, callback for CIdle
       
   141          * @since S60 5.1
       
   142          * @param aPtr, Pointer to this class
       
   143          */
       
   144         static TInt InitializeMemoryCardL( TAny* aPtr );
       
   145 
       
   146         /**
       
   147          * Do starts the wizard when run first time
       
   148          * @since S60 5.1
       
   149          * @return TBool, EFalse because of one time call
       
   150          */
       
   151         TBool DoInitializeWizardL();
       
   152 
       
   153         /**
       
   154          * Do starts the new memory card dialog when new
       
   155          * memory card inserted
       
   156          * @since S60 5.1
       
   157          * @return TBool, EFalse because of one time call
       
   158          */
       
   159         void DoInitializeMemoryCardL();
       
   160 
       
   161     private:
       
   162 
       
   163         /**
       
   164          * pointer to AppUi object
       
   165          */
       
   166         CMSAppUi*                           iAppUi;         // not owned
       
   167 
       
   168         /**
       
   169          * view's container
       
   170          */
       
   171         CMSMainContainer*                   iContainer;     // owned
       
   172 
       
   173         /**
       
   174          * Check MMC indicator
       
   175          */
       
   176         TBool                               iCheckMMC;
       
   177         /**
       
   178          * Idle loop to initialize wizard
       
   179          */
       
   180         CIdle*                              iIdle;
       
   181 
       
   182         /**
       
   183          * Flag for wizard initialization
       
   184          */
       
   185         TBool                               iWizardInitialization;
       
   186     };
       
   187 
       
   188 #endif // C_MSMAINVIEW_H
       
   189 
       
   190 
       
   191 // End of File