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
27namespace Networking {
28
29class NetJNI {
30#ifdef USE_HTTP
31 friend class ConnectionManagerAndroid;
32 friend class NetworkReadStreamAndroid;
33#endif
34 friend class AndroidSocket;
35 friend class AndroidURL;
36
37public:
38 static void init(JNIEnv *env);
39
40private:
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 jclass _CLS_HTTPManager;
59
60 static jmethodID _MID_manager_init;
61 static jmethodID _MID_manager_startRequest;
62 static jmethodID _MID_manager_poll;
63 static jfieldID _FID_manager__empty;
64
65 static const JNINativeMethod _natives_request[];
66
67 static jclass _CLS_HTTPRequest;
68
69 static jmethodID _MID_request_bufinit;
70 static jmethodID _MID_request_forminit;
71 static jmethodID _MID_request_cancel;
72 static jmethodID _MID_request_getURL;
73#endif
74
75 static bool _init;
76};
77
78} // End of namespace Networking
79
80#endif
81
Definition: socket.h:30
Definition: url.h:30
Definition: connectionmanager-android.h:31
Definition: jni.h:29
Definition: networkreadstream-android.h:32