browserplugins/browsersysteminfoplugin/inc/SystemInfoMisc.h
branchRCL_3
changeset 48 8e6fa1719340
equal deleted inserted replaced
47:6385c4c93049 48:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2007 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SYSTEMINFOMISC_H
       
    20 #define SYSTEMINFOMISC_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <npscript.h>
       
    25 #include <HWRMVibra.h>
       
    26 #include <widgetregistryclient.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CHWRMLight;
       
    30 class CHWRMVibra;
       
    31 class CSystemInfoBeep;
       
    32 
       
    33 // CONSTANTS
       
    34 
       
    35 // State enum and member variable
       
    36 
       
    37 // CLASS DECLARATIONS
       
    38 /**
       
    39 *  CSystemInfoMisc.
       
    40 *  Interface to various platform services not requiring observers.
       
    41 *  @lib npSystemInfoPlugin.lib
       
    42 *  @since S60 v3.2
       
    43 */
       
    44 NONSHARABLE_CLASS(CSystemInfoMisc) : public CBase
       
    45     {
       
    46 public:
       
    47     /**
       
    48      * Two-phased constructor.
       
    49      */
       
    50     static CSystemInfoMisc* NewL();
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      */
       
    55     virtual ~CSystemInfoMisc();
       
    56 
       
    57 public:
       
    58     /**
       
    59      * Called to sound a tone.
       
    60      * @since 3.2
       
    61      * @param void
       
    62      * @return charge level
       
    63      */
       
    64     void Beep( TInt aFrequency, TTimeIntervalMicroSeconds aDuration );
       
    65 
       
    66 
       
    67     TInt VibraMinIntensity() const;
       
    68 
       
    69     TInt VibraMaxIntensity() const;
       
    70 
       
    71     TInt VibraMaxDuration() const;
       
    72 
       
    73     TInt VibraSettings() const;  // TBD rename VibraProfileEnabled a "boolean"
       
    74 
       
    75     void StartVibra( TInt aDuration, TInt aIntensity );
       
    76 
       
    77     void StopVibra();
       
    78 
       
    79 
       
    80     TInt LightMinIntensity() const;
       
    81 
       
    82     TInt LightMaxIntensity() const;
       
    83 
       
    84     TInt LightDefaultIntensity() const;
       
    85 
       
    86     TInt LightInfiniteDuration() const;
       
    87 
       
    88     TInt LightMaxDuration() const;
       
    89 
       
    90     TInt LightDefaultCycleTime() const;
       
    91 
       
    92     TInt LightTargetPrimaryDisplayAndKeyboard() const;
       
    93 
       
    94     TInt LightTargetSystem() const;
       
    95 
       
    96     void LightOn( TInt aLightTarget, TInt aDuration, TInt aIntensity, TInt aFadeIn );
       
    97 
       
    98     void LightBlink( TInt aLightTarget, TInt aDuration,
       
    99                      TInt aOnDuration, TInt aOffDuration, TInt aIntensity );
       
   100 
       
   101     void LightOff( TInt aLightTarget, TInt aDuration, TInt aFadeOut );
       
   102 
       
   103 
       
   104     TInt TotalRam();
       
   105 
       
   106     TInt FreeRam();
       
   107 
       
   108 
       
   109     void Language( TDes& aLangCode );
       
   110 
       
   111 
       
   112     void DriveList( TDes8& aDriveList );
       
   113 
       
   114     TReal DriveSize( TChar c );
       
   115 
       
   116     TReal DriveFree( TChar c );
       
   117 
       
   118 private:
       
   119     /**
       
   120      * C++ default constructor.
       
   121      */
       
   122     CSystemInfoMisc();
       
   123 
       
   124     /**
       
   125      * By default Symbian 2nd phase constructor is private.
       
   126      * @param none
       
   127      * @return void
       
   128      */
       
   129     void ConstructL();
       
   130 
       
   131     CHWRMLight* iLightControl;
       
   132     CHWRMVibra* iVibraControl;
       
   133     CSystemInfoBeep* iBeeper;
       
   134     RWidgetRegistryClientSession iWidgetRegistryClient;
       
   135     TBool iWidgetRegistryConnected; // connected to Widget Registry server ?
       
   136    };
       
   137 
       
   138 #endif // SYSTEMINFOMISC_H
       
   139 
       
   140 // End of File