ScummVM API documentation
jni.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BACKENDS_NETWORKING_BASIC_ANDROID_JNI_H
23 #define BACKENDS_NETWORKING_BASIC_ANDROID_JNI_H
24 
25 #include <jni.h>
26 
27 namespace Networking {
28 
29 class NetJNI {
30 #ifdef USE_HTTP
31  friend class ConnectionManagerAndroid;
32  friend class NetworkReadStreamAndroid;
33 #endif
34  friend class AndroidSocket;
35  friend class AndroidURL;
36 
37 public:
38  static void init(JNIEnv *env);
39 
40 private:
41  static jclass _CLS_URL;
42 
43  static jmethodID _MID_url_init;
44  static jmethodID _MID_url_getProtocol;
45  static jmethodID _MID_url_getHost;
46  static jmethodID _MID_url_getPort;
47  static jmethodID _MID_url_getDefaultPort;
48 
49  static jclass _CLS_Socket;
50 
51  static jmethodID _MID_socket_init;
52  static jmethodID _MID_socket_ready;
53  static jmethodID _MID_socket_send;
54  static jmethodID _MID_socket_recv;
55  static jmethodID _MID_socket_close;
56 
57 #ifdef USE_HTTP
58  static jmethodID _MID_manager_init;
59  static jmethodID _MID_manager_startRequest;
60  static jmethodID _MID_manager_poll;
61  static jfieldID _FID_manager__empty;
62 
63  static const JNINativeMethod _natives_request[];
64 
65  static jclass _CLS_HTTPRequest;
66 
67  static jmethodID _MID_request_bufinit;
68  static jmethodID _MID_request_forminit;
69  static jmethodID _MID_request_cancel;
70  static jmethodID _MID_request_getURL;
71 #endif
72 
73  static bool _init;
74 };
75 
76 } // End of namespace Networking
77 
78 #endif
79 
Definition: networkreadstream-android.h:31
Definition: scummvmcloud.h:32
Definition: connectionmanager-android.h:31
Definition: jni.h:29
Definition: url.h:30
Definition: socket.h:30