accessoryservices/accessoryremotecontrol/inc/remconkeyeventconverter/RemConKeyEvent.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     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:  Key event class used internally by the converter. Used to map
       
    15 *                operation IDs, key actions etc. with key event data passed from
       
    16 *                bearer plugins. 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CREMCONKEYEVENT_H
       
    23 #define CREMCONKEYEVENT_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include    "RemConKeyEventData.h"
       
    27 #include    <remconcoreapi.h>
       
    28 #include    <e32std.h>
       
    29 #include    <e32cmn.h>
       
    30 #include    <e32base.h>
       
    31 
       
    32 // CONSTANTS
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  Key event class used internally by the converter.
       
    38 *
       
    39 *  @lib RemConKeyEventConverter.dll (ECom plugin)
       
    40 *  @since S60 3.0
       
    41 */
       
    42 class CRemConKeyEvent : public CBase
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CRemConKeyEvent* NewL( const TRemConKeyEventData& aKeyEvent, 
       
    50             const TUid& aInterfaceUid, 
       
    51             const TUint& aOperationID, 
       
    52             const TRemConCoreApiButtonAction& aButtonAction );
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         */    
       
    57         static CRemConKeyEvent* NewL( const TRemConKeyEventData& aKeyEvent, 
       
    58     		const TUid& aInterfaceUid, 
       
    59     		const TUint& aOperationID,
       
    60     		TDesC8& aParameter );
       
    61         
       
    62         /**
       
    63         * Destructor.
       
    64         */
       
    65         virtual ~CRemConKeyEvent();
       
    66 
       
    67     public: // New functions
       
    68         
       
    69         /**
       
    70         * Compares two TRemConKeyEventData instances for equality.
       
    71         * @since S60 3.0
       
    72         * @param TRemConKeyEventData The key event against which this event is
       
    73         * compared to.
       
    74         * @return ETrue if the events match, otherwise EFalse.
       
    75         */
       
    76         TBool Compare( const TRemConKeyEventData& aKeyEvent ) const;
       
    77 		        
       
    78         /**
       
    79         * Return the interface UID of this key event.
       
    80         * @since S60 3.0
       
    81         * @param none
       
    82         * @return The interface UID of this key event
       
    83         */
       
    84         TUid InterfaceUID() const;
       
    85         
       
    86         /**
       
    87         * Return the operation ID of this key event.
       
    88         * @since S60 3.0
       
    89         * @param none
       
    90         * @return The operation ID of this key event
       
    91         */
       
    92         TUint OperationID() const;
       
    93 
       
    94         /**
       
    95         * Returns parameter of this key event.
       
    96         * @since S60 3.1
       
    97         * @param none
       
    98         * @return The parameter of this key event
       
    99         */
       
   100         TDesC8& Parameter() const;
       
   101         
       
   102     private:
       
   103 
       
   104         /**
       
   105         * C++ default constructor.
       
   106         */
       
   107         CRemConKeyEvent();
       
   108 
       
   109         /**
       
   110         * By default Symbian 2nd phase constructor is private.
       
   111         */
       
   112         void ConstructL( const TRemConKeyEventData& aKeyEvent, 
       
   113             const TUid& aInterfaceUid, 
       
   114             const TUint& aOperationID, 
       
   115             TDesC8& aParameter );
       
   116 
       
   117     private:    // Data
       
   118     
       
   119         // The key event data of this key event.
       
   120         TRemConKeyEventData iKeyEvent;
       
   121 
       
   122         // The interface UID of this key event.
       
   123         TUid iInterfaceUID;
       
   124         
       
   125         // The operation ID of this key event.
       
   126         TUint iOperationID;
       
   127        	
       
   128 		// The parameter of this key event.
       
   129         HBufC8* iParameter;
       
   130     
       
   131     };
       
   132 
       
   133 #endif      // CREMCONKEYEVENT_H   
       
   134             
       
   135 // End of File