webengine/webkitutils/rt_gesturehelper/src/gesturehelpereventsender.h
changeset 0 dd21522fd290
child 8 7c90e6132015
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 <rt_gesturehelper.h>
       
    24 
       
    25 namespace RT_GestureHelper
       
    26 {
       
    27 class MGestureObserver;
       
    28 class CGestureEvent;
       
    29 
       
    30 NONSHARABLE_CLASS(CGestureEventSender) : public CActive
       
    31     {
       
    32 public:
       
    33     enum TEventSenderState
       
    34         {
       
    35         ENoEvents,
       
    36         EEventsReady,
       
    37         EBusy
       
    38         };
       
    39     static CGestureEventSender* NewL( MGestureObserver& aObserver );
       
    40     ~CGestureEventSender();
       
    41     TInt AddEvent(const CGestureEvent* aGestureEvent);
       
    42 protected:    
       
    43     void RunL();
       
    44     void DoCancel();
       
    45     TInt RunError(TInt aError);
       
    46 private:
       
    47     CGestureEventSender(MGestureObserver& aObserver);
       
    48     void Complete();
       
    49     void EmitEventL( const CGestureEvent& aGestureEvent );
       
    50     
       
    51     RPointerArray< CGestureEvent >  iEvents;
       
    52     MGestureObserver& iObserver;
       
    53     TEventSenderState iState;
       
    54     };
       
    55 }
       
    56 #endif /* GESTUREHELPEREVENTSENDER_H_ */