webengine/webkitutils/stmgesturefw/inc/gesturehelpereventsender.h
changeset 65 5bfc169077b2
parent 42 d39add9822e2
child 66 cacf6ee57968
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
     1 /*
       
     2 * Copyright (c) 2008 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:  Gesture helper implementation
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GESTUREHELPEREVENTSENDER_H_
       
    19 #define GESTUREHELPEREVENTSENDER_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <coemain.h>
       
    23 #include "stmgestureinterface.h"
       
    24 
       
    25 NONSHARABLE_CLASS(CGestureEventSender) : public CActive
       
    26     {
       
    27 public:
       
    28     enum TEventSenderState
       
    29         {
       
    30         ENoEvents,
       
    31         EEventsReady,
       
    32         EBusy
       
    33         };
       
    34     static CGestureEventSender* NewL(  MStmGestureListener& aObserver );
       
    35     ~CGestureEventSender();
       
    36     TInt AddEvent(TStmGestureUid aUid, const MStmGesture* aGestureEvent);
       
    37 protected:    
       
    38     void RunL();
       
    39     void DoCancel();
       
    40     TInt RunError(TInt aError);
       
    41 private:
       
    42     CGestureEventSender(MStmGestureListener& aObserver);
       
    43     void Complete();
       
    44     void EmitEventL( const TStmGestureEvent& aGestureEvent );
       
    45     
       
    46     MStmGestureListener& iObserver;
       
    47     RArray< TStmGestureEvent >  iEvents;
       
    48     TEventSenderState iState;
       
    49     };
       
    50 
       
    51 #endif /* GESTUREHELPEREVENTSENDER_H_ */