Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: jni/AndroidWebRequest.h

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Even more review issues fixed. Created April 28, 2014, 10:18 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « jni/AndroidLogSystem.cpp ('k') | jni/AndroidWebRequest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH
4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef ADBLOCK_PLUS_WEB_REQUEST_ANDROID_H
19 #define ADBLOCK_PLUS_WEB_REQUEST_ANDROID_H
20
21 #include <jni.h>
22 #include <AdblockPlus/WebRequest.h>
23
24 class AndroidWebRequest : public AdblockPlus::WebRequest
25 {
26 JavaVM* globalJvm;
27
28 jclass jUrlClass;
29 jmethodID jUrlConstructorID;
30 jmethodID jUrlOpenConnectionID;
31 jclass jConnectionClass;
32 jmethodID jConnectionSetMethodID;
33 jmethodID jConnectionSetRequestPropertyID;
34 jmethodID jConnectionConnectID;
35 jmethodID jConnectionGetContentLengthID;
36 jmethodID jConnectionGetResponseCodeID;
37 jmethodID jConnectionGetContentEncodingID;
38 jmethodID jConnectionGetInputStreamID;
39 jclass jInputStreamReaderClass;
40 jmethodID jInputStreamReaderConstructorID;
41 jclass jBufferedReaderClass;
42 jmethodID jBufferedReaderConstructorID;
43 jclass jStringBuilderClass;
44 jmethodID jStringBuilderConstructorID;
45 jmethodID jBufferedReaderReadID;
46 jmethodID jStringBuilderAppendID;
47 jmethodID jStringBuilderToStringID;
48 jmethodID jBufferedReaderCloseID;
49 jmethodID jConnectionGetHeaderFieldKeyID;
50 jmethodID jConnectionGetHeaderFieldID;
51
52 public:
53 AndroidWebRequest(JavaVM*& gJvm);
54 ~AndroidWebRequest();
55 AdblockPlus::ServerResponse GET(const std::string& url, const AdblockPlus::Hea derList& requestHeaders) const;
56 };
57 #endif
OLDNEW
« no previous file with comments | « jni/AndroidLogSystem.cpp ('k') | jni/AndroidWebRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld