1 /* |
|
2 * Copyright (c) 2002 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: This class is used to post events to the java. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMAOUTPUTSTREAMEVENT_H |
|
20 #define CMMAOUTPUTSTREAMEVENT_H |
|
21 |
|
22 #include "cmmaevent.h" |
|
23 |
|
24 |
|
25 // CLASS DECLARATION |
|
26 /** |
|
27 * This class is used to post events to the java. |
|
28 * |
|
29 * |
|
30 */ |
|
31 |
|
32 NONSHARABLE_CLASS(CMMAOutputStreamEvent): public CMMAEvent |
|
33 { |
|
34 public: |
|
35 enum TMMAOutputStreamState |
|
36 { |
|
37 EMMAEventActive, // event is waiting dispatching |
|
38 EMMAEventNotActive, // not added to event server |
|
39 EMMADeleteEvent // dispatch deletes this event |
|
40 }; |
|
41 public: |
|
42 CMMAOutputStreamEvent(jmethodID aHandleEventMethod, |
|
43 jobject aNotifyObject); |
|
44 |
|
45 // status of the source stream |
|
46 void SetStatus(TInt aStatus); |
|
47 |
|
48 // length of the available output stream data |
|
49 void SetLength(TInt aLength); |
|
50 |
|
51 /** |
|
52 * Sets new state. |
|
53 * @param aState TMMAOutputStreamState. |
|
54 */ |
|
55 void SetState(TMMAOutputStreamState aState); |
|
56 |
|
57 TMMAOutputStreamState State(); |
|
58 private: // from CJavaEvent |
|
59 void Dispatch(JNIEnv& aJni); |
|
60 |
|
61 private: |
|
62 jmethodID iHandleEventMethod; |
|
63 jobject iListenerObject; |
|
64 TInt iLength; |
|
65 TInt iStatus; |
|
66 |
|
67 /** |
|
68 * State of this event. |
|
69 */ |
|
70 TMMAOutputStreamState iState; |
|
71 }; |
|
72 |
|
73 #endif // CMMAOUTPUTSTREAMEVENT_H |
|