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