|
1 /* |
|
2 * Copyright (c) 2007-2009 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: Field event queue interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MESMRFIELDEVENTQUEUE_H |
|
20 #define MESMRFIELDEVENTQUEUE_H |
|
21 |
|
22 class MESMRFieldEvent; |
|
23 class MESMRFieldEventObserver; |
|
24 |
|
25 /** |
|
26 * MESMRFieldEventQueue defines an iterface for field event queue. |
|
27 * It provides event queue for CESMRField to send events to its |
|
28 * event observers. The interface provides both synchronous and |
|
29 * asynchrounous event notification methods. |
|
30 */ |
|
31 class MESMRFieldEventQueue |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Adds observer to the event queue. |
|
38 * |
|
39 * @param aObserver the observer. |
|
40 */ |
|
41 virtual void AddObserverL( MESMRFieldEventObserver* aObserver ) = 0; |
|
42 |
|
43 /** |
|
44 * Removes observer from the event queue. |
|
45 * |
|
46 * @param aObserver the observer. |
|
47 */ |
|
48 virtual void RemoveObserver( MESMRFieldEventObserver* aObserver ) = 0; |
|
49 |
|
50 /** |
|
51 * Notifies event to the event observers in the queue. |
|
52 * Event is notified synchronously. |
|
53 * |
|
54 * @param aEvent the event. |
|
55 */ |
|
56 virtual void NotifyEventL( const MESMRFieldEvent& aEvent ) = 0; |
|
57 |
|
58 /** |
|
59 * Enques event to event queue and notifies it asynchronously to |
|
60 * the observers. Ownership of the event is transferred to the queue. |
|
61 * |
|
62 * @param aEvent the event to enque to the event queue. |
|
63 */ |
|
64 virtual void NotifyEventAsyncL( MESMRFieldEvent* aEvent ) = 0; |
|
65 |
|
66 /** |
|
67 * Removes event from the event queue. |
|
68 * |
|
69 * @param aEvent the event to remove from the event queue. |
|
70 */ |
|
71 virtual void CancelEvent( MESMRFieldEvent* aEvent ) = 0; |
|
72 |
|
73 protected: |
|
74 |
|
75 virtual ~MESMRFieldEventQueue() {} |
|
76 |
|
77 }; |
|
78 |
|
79 #endif // MESMRFIELDEVENTQUEUE_H |