|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef NATIVEHTTPSESSION_H |
|
19 #define NATIVEHTTPSESSION_H |
|
20 |
|
21 #include <e32def.h> |
|
22 #include <jni.h> |
|
23 #include "http/rhttpsession.h" |
|
24 #include "functionserver.h" |
|
25 #include "monitor.h" |
|
26 using namespace java::util; |
|
27 |
|
28 class CJavaValidationFilter; |
|
29 class MMidHttpProxyPlugin; |
|
30 class HttpSessionClient; |
|
31 |
|
32 class NativeHttpSession : public FunctionServer //CJavaEventSource<NativeHttpSession> |
|
33 { |
|
34 public: |
|
35 |
|
36 static TInt NewL(JNIEnv& aJni, jobject aPeer,/* TJavaEventServer aServer,*/ TInt aSuiteId, TInt aAPNId, TInt *err, TInt * apnerr); |
|
37 TInt CreateTransactionL(JNIEnv* aJni, jobject aPeer, jstring aUri, jstring aRequestMethod); |
|
38 //RHTTPSession& Session(); |
|
39 //void doSubmitCallback(TInt aStatus); |
|
40 void doSubmitCallback(TInt aStatus,jobject &aPeer); |
|
41 //void doReadCallback(TInt aStatus); |
|
42 void doReadCallback(TInt aStatus,jobject &aPeer); |
|
43 |
|
44 void vmAttached(); |
|
45 |
|
46 private: |
|
47 NativeHttpSession(); |
|
48 |
|
49 |
|
50 TInt ConstructL(JNIEnv& aJni, jobject aPeer, /*TJavaEventServer aServer,*/TInt aType, TInt aAPNId, TInt * apnerr); |
|
51 private: |
|
52 |
|
53 TInt ExecuteCreateHttpSessionL(int aSelf, TInt aType, TInt aAPNId, TInt* apnerr); |
|
54 |
|
55 private: |
|
56 HttpSessionClient* iHttpSessionClient; |
|
57 TInt iSuiteId; |
|
58 jmethodID iSubmitCallbackMethodID; |
|
59 jmethodID iReadCallbackMethodID; |
|
60 public: |
|
61 java::util::Monitor *iMonitor; |
|
62 }; |
|
63 |
|
64 #endif // NATIVEHTTPSESSION_H |