|
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 "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: Event class for native soft notifications. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSOFTNOTIFICATIONEVENT_H |
|
20 #define CSOFTNOTIFICATIONEVENT_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <mevents.h> |
|
24 #include "CSoftNotificationEventSource.h" |
|
25 |
|
26 |
|
27 // CLASS DECLARATION |
|
28 /** |
|
29 * Observer event for soft notification. |
|
30 * This class delegates native events to java implementation. |
|
31 * |
|
32 * @since 3.2 |
|
33 */ |
|
34 NONSHARABLE_CLASS(CSoftNotificationEvent) : |
|
35 public CJavaEvent<CSoftNotificationEventSource> |
|
36 { |
|
37 public: // Constructors |
|
38 |
|
39 /** |
|
40 * Constructor. |
|
41 * |
|
42 * @param aNotifyObject Object to be notified. |
|
43 * @param aHandleEventMethod Java method to be called. |
|
44 * @param aEventData Data to be posted. |
|
45 */ |
|
46 CSoftNotificationEvent( |
|
47 jobject aNotifyObject, |
|
48 jmethodID aHandleEventMethod, |
|
49 TInt aEventData); |
|
50 |
|
51 private: // From CJavaEvent |
|
52 |
|
53 /** |
|
54 * Dispatches the event. |
|
55 * |
|
56 * @param aJni JNI environment to be used in dispatching. |
|
57 */ |
|
58 void Dispatch(JNIEnv& aJni); |
|
59 |
|
60 private: // Event data |
|
61 jobject iListenerObject; // Object to be notified. |
|
62 jmethodID iEventHandlerMethod; // Java method to be called. |
|
63 TInt iEventData; // Data to be posted. |
|
64 }; |
|
65 |
|
66 #endif // CSOFTNOTIFICATIONEVENT_H |
|
67 |
|
68 |