meetingrequest/mrgui/inc/mesmrfieldeventqueue.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:28:57 +0100
branchRCL_3
changeset 25 3533d4323edc
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  Field event queue interface
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
#ifndef MESMRFIELDEVENTQUEUE_H
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
#define MESMRFIELDEVENTQUEUE_H
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
class MESMRFieldEvent;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
class MESMRFieldEventObserver;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
/**
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
 *  MESMRFieldEventQueue defines an iterface for field event queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
 *  It provides event queue for CESMRField to send events to its
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
 *  event observers. The interface provides both synchronous and
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
 *  asynchrounous event notification methods.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
 */
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
class MESMRFieldEventQueue
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
    {
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
public:
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
    
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
    /**
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
     * Adds observer to the event queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
     *
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
     * @param aObserver the observer.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
     */
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
    virtual void AddObserverL( MESMRFieldEventObserver* aObserver ) = 0;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
    
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
    /**
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
     * Removes observer from the event queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
     *
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
     * @param aObserver the observer.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
     */
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
    virtual void RemoveObserver( MESMRFieldEventObserver* aObserver ) = 0;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
    
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
    /**
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
     * Notifies event to the event observers in the queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
     * Event is notified synchronously.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
     * 
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
     * @param aEvent the event.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
     */
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
    virtual void NotifyEventL( const MESMRFieldEvent& aEvent ) = 0;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
    /**
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
     * Enques event to event queue and notifies it asynchronously to
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
     * the observers. Ownership of the event is transferred to the queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
     * 
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
     * @param aEvent the event to enque to the event queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
     */
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
    virtual void NotifyEventAsyncL( MESMRFieldEvent* aEvent ) = 0;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
    
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
    /**
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
     * Removes event from the event queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
     * 
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
     * @param aEvent the event to remove from the event queue.
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
     */
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
    virtual void CancelEvent( MESMRFieldEvent* aEvent ) = 0;
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
    
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
protected:
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
    virtual ~MESMRFieldEventQueue() {}
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    };
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
3533d4323edc Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
#endif // MESMRFIELDEVENTQUEUE_H