upnpsettings/upnpgsplugin/inc/upnpgspluginview.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:      Upnp general settings view.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef UPNPGSPLUGINVIEW_H
       
    24 #define UPNPGSPLUGINVIEW_H
       
    25 
       
    26 #include <gsplugininterface.h>
       
    27 #include "upnpfilesharingengineobserver.h"
       
    28 class CUPnPAppSettingsList;
       
    29 class CAknNavigationDecorator;
       
    30 class CAknNavigationControlContainer;
       
    31 class CUPnPFileSharingEngine;
       
    32 
       
    33 /**
       
    34  *  MediaServant settings view.
       
    35  *
       
    36  *  @lib msgsplugin.lib
       
    37  */
       
    38 NONSHARABLE_CLASS( CUPnPGSPluginView ) : 
       
    39                                     public CGSPluginInterface,
       
    40                                     private MUPnPFileSharingEngineObserver
       
    41     {
       
    42 
       
    43     public:
       
    44 
       
    45         /**
       
    46          * Two phased constructor.
       
    47          */
       
    48         static CUPnPGSPluginView* NewL();
       
    49 
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         virtual ~CUPnPGSPluginView();
       
    54 
       
    55     protected:
       
    56     
       
    57     // From base class CAknView
       
    58 
       
    59         /**
       
    60          * From CAknView
       
    61          * See base class definition.
       
    62          */
       
    63         TUid Id() const;
       
    64 
       
    65         /**
       
    66          * From CAknView
       
    67          * See base class definition
       
    68          */
       
    69         void HandleCommandL( TInt aCommand );
       
    70     
       
    71         /**
       
    72          * From CAknView
       
    73          * See base class definition
       
    74          */
       
    75         void DoActivateL( const TVwsViewId& aPrevViewId,
       
    76                           TUid aCustomMessageId,
       
    77                           const TDesC8& aCustomMessage);
       
    78 
       
    79         /**
       
    80          * From CAknView
       
    81          * See base class definition
       
    82          */        
       
    83         void DoDeactivate();
       
    84                     
       
    85     // From base class CGSPluginInterface
       
    86     
       
    87         /**
       
    88          * From CGSPluginInterface
       
    89          * See base class definition
       
    90          */
       
    91         void GetCaptionL( TDes& aCaption ) const;
       
    92 
       
    93         /**
       
    94          * From CGSPluginInterface
       
    95          * See base class definition
       
    96          */
       
    97         CGulIcon* CreateIconL( const TUid aIconType );   
       
    98     
       
    99     protected: // From MEikMenuObserver
       
   100 
       
   101         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   102     
       
   103     private:  // From MUPnPFileSharingEngineObserver
       
   104 
       
   105         /**
       
   106          * Function informs when file sharing was enabled or disabled
       
   107          * @param aError, error code
       
   108          * @param aEnabled ETrue if sharing was enabled, otherwise EFalse
       
   109          */
       
   110         void OnSharingStatusChanged( TInt aError, TBool aEnabled );
       
   111 
       
   112         /**
       
   113          * Function informs when file sharing is ready
       
   114          * @param aError, error code
       
   115          */
       
   116         void OnSharingDone( TInt /*aError*/ ) {}
       
   117 
       
   118         /**
       
   119          * Informs about status of the sharing progress
       
   120          * @since S60 3.1
       
   121          * @param aProgressInfo Data type to contain information about \
       
   122                   sharing progress
       
   123         */                                          
       
   124         void OnSharingProgress( 
       
   125             const RArray<TUpnpProgressInfo>& /*aProgress*/ ) {}
       
   126 
       
   127         /**
       
   128          * Callback to inform if connection has been lost
       
   129          * @since S60 3.1
       
   130          */ 
       
   131         void OnSharingConnectionLost();
       
   132         
       
   133     private:
       
   134 
       
   135         /**
       
   136          * Default constructor.
       
   137          */
       
   138         CUPnPGSPluginView();
       
   139 
       
   140         /**
       
   141          * Second phase constructor.
       
   142          */
       
   143         void ConstructL();
       
   144     
       
   145         /**
       
   146          * Sets text by resource ID in title pane.
       
   147          *
       
   148          * @since S60 3.1
       
   149          * @param aResourceId, The ID of outline number to displayed next.
       
   150          */
       
   151         void SetTitlePaneTextL( const TInt aResourceId );    
       
   152 
       
   153     private: // data
       
   154 
       
   155         /**
       
   156          * Setting list
       
   157          */
       
   158         CUPnPAppSettingsList*               iSettingItemList;   // owned
       
   159 
       
   160         /**
       
   161          * Resource file offset
       
   162          */
       
   163         TInt                                iResFileOffset;
       
   164         
       
   165         /**
       
   166          * Control environment for file session
       
   167          */
       
   168         CEikonEnv*                          iCoeEnv;            // not owned
       
   169         
       
   170         CUPnPFileSharingEngine*         iFileSharing; //owned
       
   171          // iap ids
       
   172         TInt                            iSharingState;
       
   173         
       
   174         /**
       
   175          * View's ui to close when plugin is beign closed
       
   176          */
       
   177         TVwsViewId iViewToClose;
       
   178 
       
   179     };
       
   180 
       
   181 #endif // UPNPGSPLUGINVIEW_H