htiui/HtiServicePlugins/HtiSysInfoServicePlugin/inc/HtiSysInfoServicePlugin.h
branchRCL_3
changeset 18 48060abbbeaf
parent 17 d40e813b23c0
child 19 b3cee849fa46
equal deleted inserted replaced
17:d40e813b23c0 18:48060abbbeaf
     1 /*
       
     2 * Copyright (c) 2009 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:  Implementation of ECOM plug-in service interface. Provides
       
    15 *                system info service.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef HTISYSINFOPLUGIN_H
       
    21 #define HTISYSINFOPLUGIN_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "../../../symbian_version.hrh"
       
    25 
       
    26 #include <e32property.h>
       
    27 #include <f32file.h>
       
    28 #include <HtiServicePluginInterface.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CHtiLightsController;
       
    32 class CHtiPropertySubscriber;
       
    33 class CMGXFileManager;
       
    34 class CMGXFileNotificationHandler;
       
    35 class MDesCArray;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39 * System info service plugin.
       
    40 */
       
    41 class CHtiSysInfoServicePlugin : public CHTIServicePluginInterface
       
    42     {
       
    43     public:
       
    44 
       
    45         static CHtiSysInfoServicePlugin* NewL();
       
    46 
       
    47         // Interface implementation
       
    48         void ProcessMessageL( const TDesC8& aMessage,
       
    49                               THtiMessagePriority aPriority );
       
    50 
       
    51         void NotifyMemoryChange( TInt aAvailableMemory );
       
    52 
       
    53 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 )
       
    54         static TInt HandleAllowSSPropertyChange( TAny* aPtr );
       
    55 #endif
       
    56 
       
    57     protected:
       
    58 
       
    59         CHtiSysInfoServicePlugin();
       
    60         void ConstructL();
       
    61         virtual ~CHtiSysInfoServicePlugin();
       
    62 
       
    63 
       
    64     private: // private helper methods
       
    65 
       
    66         void HandleGetHalAttrL( const TDesC8& aMessage );
       
    67         void HandleGetImeiL( const TDesC8& aMessage );
       
    68         void HandleGetSwVersionL( const TDesC8& aMessage );
       
    69         void HandleGetLangVersionL( const TDesC8& aMessage );
       
    70         void HandleGetSwLangVersionL( const TDesC8& aMessage );
       
    71         void HandleGetUserAgentStringL( const TDesC8& aMessage );
       
    72         void HandleGetFreeRamL( const TDesC8& aMessage );
       
    73         void HandleGetUsedRamL( const TDesC8& aMessage );
       
    74         void HandleGetTotalRamL( const TDesC8& aMessage );
       
    75         void HandleEatRamL( const TDesC8& aMessage );
       
    76         void HandleReleaseRamL( const TDesC8& aMessage );
       
    77         void HandleGetFreeDiskSpaceL( const TDesC8& aMessage );
       
    78         void HandleGetUsedDiskSpaceL( const TDesC8& aMessage );
       
    79         void HandleGetTotalDiskSpaceL( const TDesC8& aMessage );
       
    80         void HandleEatDiskSpaceL( const TDesC8& aMessage );
       
    81         void HandleReleaseDiskSpaceL( const TDesC8& aMessage );
       
    82         void HandleSetHomeTimeL( const TDesC8& aMessage );
       
    83         void HandleGetHomeTimeL( const TDesC8& aMessage );
       
    84         void HandleLightsCommandL( const TDesC8& aMessage );
       
    85         void HandleScreenSaverCommandL( const TDesC8& aMessage );
       
    86         void HandleScreenSaverTimeoutCommandL( const TDesC8& aMessage );
       
    87         void HandleNetworkModeCommandL( const TDesC8& aMessage );
       
    88         void HandleIrActivateCommandL( const TDesC8& aMessage );
       
    89         void HandleBtPowerCommandL( const TDesC8& aMessage );
       
    90         void HandleBtSettingsCommandL( const TDesC8& aMessage );
       
    91         void HandleBtDeletePairingsL( const TDesC8& aMessage );
       
    92         void HandleKeyLockToggleL( const TDesC8& aMessage );
       
    93         void HandleAutoKeyGuardTimeL( const TDesC8& aMessage );
       
    94         void HandleEmptyDrmRightsDbL( const TDesC8& aMessage );
       
    95         void HandleBatteryStatusL( const TDesC8& aMessage );
       
    96         void HandleSignalStrengthL( const TDesC8& aMessage );
       
    97         void HandleSetDateTimeFormatL( const TDesC8& aMessage );
       
    98         void HandleHsdpaCommandL( const TDesC8& aMessage );
       
    99         void HandleUpdateMediaGalleryL( const TDesC8& aMessage );
       
   100         void HandleActivateSkinL( const TDesC8& aMessage );
       
   101         void HandleSetLanguageL( const TDesC8& aMessage );
       
   102 
       
   103         void SetDefaultNumberModeL(TInt aMode, TInt aNbrModeType);
       
   104         void ParseTimeDataL( const TDesC8& aTimeData, TTime& aResult );
       
   105         TInt CleanUpTempFiles();
       
   106         TBool CanTurnBluetoothOnL( const TBool aUseForce );
       
   107         TInt CreatFileToEatDiskSpace( TFileName aPath, TInt64 aSpaceToEat  );
       
   108 
       
   109     private: // private data
       
   110         RFs iFs;
       
   111         CFileMan* iFileMan;
       
   112         HBufC8* iMemEater;
       
   113         HBufC8* iReply;
       
   114         CHtiLightsController* iLightsController;
       
   115         CHtiPropertySubscriber* iAllowSSSubscriber;
       
   116 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 )
       
   117         TInt iAllowSSValue;
       
   118         RProperty iAllowSSProperty;
       
   119         TBool iAllowSSPropertyAttached;
       
   120 #endif
       
   121         TBool iGalleryUpdateSupported;
       
   122     };
       
   123 
       
   124 
       
   125 // CLASS DECLARATION
       
   126 /**
       
   127 *  Helper class to wait the async requests.
       
   128 */
       
   129 class CAsyncWaiter : public CActive
       
   130     {
       
   131     public:
       
   132         static CAsyncWaiter* NewL( TInt aPriority = EPriorityStandard );
       
   133         static CAsyncWaiter* NewLC( TInt aPriority = EPriorityStandard );
       
   134         ~CAsyncWaiter();
       
   135 
       
   136         void StartAndWait();
       
   137         TInt Result() const;
       
   138 
       
   139     private:
       
   140         CAsyncWaiter( TInt aPriority );
       
   141 
       
   142         // from CActive
       
   143         void RunL();
       
   144         void DoCancel();
       
   145 
       
   146     private:
       
   147         CActiveSchedulerWait* iWait;
       
   148         TInt iResult;
       
   149         
       
   150     };
       
   151 
       
   152 
       
   153 // CLASS DECLARATION
       
   154 /**
       
   155 *  Copied from MGXFileManagerFactory.h
       
   156 */
       
   157 class MGXFileManagerFactory
       
   158     {
       
   159     public:
       
   160         static CMGXFileManager* NewFileManagerL( RFs& aFs );
       
   161         static CMGXFileNotificationHandler* NewFileNotificationHandlerL();
       
   162     };
       
   163 
       
   164 
       
   165 // CLASS DECLARATION
       
   166 /**
       
   167 *  Copied from CMGXFileManager.h
       
   168 */
       
   169 class CMGXFileManager : public CBase
       
   170     {
       
   171     public:
       
   172         virtual TBool SuccessFileNameL( const TDesC& aFileName,
       
   173                                         TDriveNumber aDrive ) = 0;
       
   174         virtual void UpdateL() = 0;
       
   175         virtual void UpdateL( const TDesC& aFullPath ) = 0;
       
   176         virtual void UpdateL( const TDesC& aOldName,
       
   177                               const TDesC& aNewName ) = 0;
       
   178         virtual void UpdateL( const MDesCArray& aFileNameArray ) = 0;
       
   179     };
       
   180 
       
   181 
       
   182 #endif // HTISYSINFOPLUGIN_H
       
   183 
       
   184 // End of file