videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/inc/hal_stub.h
branchRCL_3
changeset 10 ce5ada96ab30
parent 0 96612d01cf9f
equal deleted inserted replaced
6:7d91903f795f 10:ce5ada96ab30
    13  *
    13  *
    14  * Description:  Test Harness for Video Playback Views
    14  * Description:  Test Harness for Video Playback Views
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 // Version : %version: ou1cpsw#2 %
    18 // Version : %version: 3 %
    19 
    19 
    20 #ifndef __HAL_STUB_H__
    20 #ifndef __HAL_STUB_H__
    21 #define __HAL_STUB_H__
    21 #define __HAL_STUB_H__
    22 
    22 
    23 #include <e32def.h>
    23 #include <e32base.h>
    24 #include <hal_data.h>
       
    25 #include <e32property.h>
       
    26 
    24 
       
    25 enum TLightStatus
       
    26             {
       
    27             ELightStatusUnknown = 0,
       
    28             ELightOn,              
       
    29             ELightOff,             
       
    30             ELightBlink            
       
    31             };
    27 
    32 
    28 static TInt  iBacklightState = 1;
    33 static TLightStatus  iBacklightState = ELightOn;
    29 
    34 
    30 /**
    35 /**
    31 @publishedPartner
    36 @publishedPartner
    32 @released
    37 @released
    33 
    38 
    34 A set of static functions to get and set HAL attributes.
    39 A set of static functions to get and set HAL attributes.
    35 
    40 
    36 @see HALData
    41 @see CHWRMLight
    37 */
    42 */
    38 class HAL : public HALData
    43 class CHWRMLight : public CBase
    39 	{
    44 {
    40 public:
    45     public:
    41     
       
    42     HAL();
       
    43     virtual ~HAL();
       
    44     
       
    45     /**
       
    46     Gets the value of the specified HAL attribute.
       
    47 
    46 
    48     @param aAttribute The HAL attribute.
    47        enum TLightTarget
    49     @param aValue      On successful return, contains the attribute value.
    48             {
       
    49             ENoTarget                    = 0x0,    
       
    50             EPrimaryDisplay              = 0x1,     
       
    51             ESystemTarget                = 0x80000000  
       
    52 		    };
    50 
    53 
    51     @return  KErrNone, if successful;
    54     public:
    52              KErrNotSupported, if the attribute is not defined in the list
       
    53              of attributes, or is not meaningful for this device.
       
    54          
       
    55     @see HALData::TAttribute
       
    56     @see HALData::TAttributeProperty
       
    57     */
       
    58 	static TInt Get(TAttribute aAttribute, TInt& aValue);
       
    59 
    55 
    60 	
    56         static CHWRMLight* NewL();
    61 	/**
       
    62     Sets the specified HAL attribute.
       
    63 
    57 
    64     @param aAttribute The HAL attribute.
    58         void ConstructL(); 
    65     @param aValue      The attribute value.
       
    66 
    59 
    67     @return  KErrNone, if successful;
    60         CHWRMLight();
    68              KErrNotSupported, if the attribute is not defined in the list
       
    69              of attributes, or is not meaningful for this device, or is
       
    70              not settable.
       
    71          
       
    72     @see HALData::TAttribute
       
    73     @see HALData::TAttributeProperty
       
    74 
    61 
    75     @capability WriteDeviceData or other capability specified
    62         ~CHWRMLight();
    76     for individual attributes in TAttribute
    63 
    77     */
    64     public: 
    78 	static TInt Set(TAttribute aAttribute, TInt aValue);
    65         void ReserveLightL(TInt aTarget);
    79 	
    66 
    80 	};
    67         void ReleaseLight(TInt aTarget);
       
    68 
       
    69         void LightOnL(TInt aTarget);
       
    70 
       
    71    	    void LightOffL(TInt aTarget);
       
    72 
       
    73         TLightStatus LightStatus(TInt aTarget) const;
       
    74 
       
    75 };
    81 
    76 
    82 #endif
    77 #endif