systemswstubs/hwrmstubplugins/inc/VibraPlugin.h
branchRCL_3
changeset 44 b5894bb67e73
parent 35 37b610eb7fe3
equal deleted inserted replaced
35:37b610eb7fe3 44:b5894bb67e73
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Hardware Resource Manager stub plugins Vibra plugin header
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __VIBRAPLUGIN_H_
       
    20 #define __VIBRAPLUGIN_H_
       
    21 
       
    22 #include <hwrmpluginservice.h>
       
    23 #include "PluginTimer.h"
       
    24 
       
    25 #ifdef PUBLISH_STATE_INFO
       
    26 #include <e32property.h>
       
    27 #include <HWRMVibra.h>
       
    28 const TUint32 KHWRMTestVibraCommand             = 0x11110001;
       
    29 const TUint32 KHWRMTestVibraDataPckg            = 0x11110002;
       
    30 #endif // PUBLISH_STATE_INFO
       
    31 
       
    32 class CPluginTimer;
       
    33 
       
    34 class CVibraPlugin : public CHWRMPluginService,
       
    35                      public MPluginTimerCallback
       
    36     {
       
    37     public:
       
    38 
       
    39         static CVibraPlugin* NewL();
       
    40         ~CVibraPlugin();
       
    41 
       
    42         /**
       
    43         * Method to invoke a particular command in the plugin
       
    44         * @param aCommandId Command ID
       
    45         * @param aTransId   Transaction ID
       
    46         * @param aData      Data associated with command
       
    47         */
       
    48         virtual void ProcessCommandL( const TInt aCommandId,
       
    49                                       const TUint8 aTransId,
       
    50                                       TDesC8& aData );
       
    51 
       
    52         /**
       
    53         * Method to cancel a particular command
       
    54         * @param aTransId   Transaction ID
       
    55         * @param aCommandId Command ID to optionally double check with the 
       
    56         *                   transaction ID
       
    57         */
       
    58         virtual void CancelCommandL( const TUint8 aTransId, 
       
    59                                      const TInt aCommandId);
       
    60 
       
    61         // From MPluginTimerCallback
       
    62         void GenericTimerFired(MHWRMPluginCallback* aService,
       
    63                          const TInt aCommandId,
       
    64                          const TUint8 aTransId,
       
    65                          TInt aRetVal);
       
    66 
       
    67     private: // Construction
       
    68 
       
    69         CVibraPlugin();
       
    70         void ConstructL();
       
    71         
       
    72         RPointerArray<CPluginTimer> iTimers;
       
    73         
       
    74 #ifdef PUBLISH_STATE_INFO
       
    75         RProperty iCmdProperty;   // for publishing command ID
       
    76         RProperty iDataProperty;  // for publishing data
       
    77 #endif // PUBLISH_STATE_INFO        
       
    78 
       
    79     };
       
    80 
       
    81 #endif // __VIBRAPLUGIN_H_