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

Delta Between Two Patch Sets: libadblockplus-android/jni/JniCallbacks.h

Issue 29422558: Issue 5167 - Update to use libadblockplus revision dca8df9af1a7 (Closed)
Left Patch Set: updated dependencies (..-binaries) Created May 3, 2017, 2:08 p.m.
Right Patch Set: updated dependencies (..-binaries) Created May 10, 2017, 6:54 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « dependencies ('k') | libadblockplus-android/jni/JniEventCallback.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 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 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 private: 47 private:
48 JavaVM* javaVM; 48 JavaVM* javaVM;
49 const JniGlobalReference<jobject>::Ptr callbackObject; 49 const JniGlobalReference<jobject>::Ptr callbackObject;
50 }; 50 };
51 51
52 class JniEventCallback : public JniCallbackBase 52 class JniEventCallback : public JniCallbackBase
53 { 53 {
54 public: 54 public:
55 JniEventCallback(JNIEnv* env, jobject callbackObject); 55 JniEventCallback(JNIEnv* env, jobject callbackObject);
56 void Callback(const AdblockPlus::JsValueList& params); 56 void Callback(AdblockPlus::JsValueList&& params);
57 }; 57 };
58 58
59 class JniUpdateAvailableCallback : public JniCallbackBase 59 class JniUpdateAvailableCallback : public JniCallbackBase
60 { 60 {
61 public: 61 public:
62 JniUpdateAvailableCallback(JNIEnv* env, jobject callbackObject); 62 JniUpdateAvailableCallback(JNIEnv* env, jobject callbackObject);
63 void Callback(const std::string& arg); 63 void Callback(const std::string& arg);
64 }; 64 };
65 65
66 class JniUpdateCheckDoneCallback : public JniCallbackBase 66 class JniUpdateCheckDoneCallback : public JniCallbackBase
67 { 67 {
68 public: 68 public:
69 JniUpdateCheckDoneCallback(JNIEnv* env, jobject callbackObject); 69 JniUpdateCheckDoneCallback(JNIEnv* env, jobject callbackObject);
70 void Callback(const std::string& arg); 70 void Callback(const std::string& arg);
71 }; 71 };
72 72
73 class JniFilterChangeCallback : public JniCallbackBase 73 class JniFilterChangeCallback : public JniCallbackBase
74 { 74 {
75 public: 75 public:
76 JniFilterChangeCallback(JNIEnv* env, jobject callbackObject); 76 JniFilterChangeCallback(JNIEnv* env, jobject callbackObject);
77 void Callback(const std::string& arg, const AdblockPlus::JsValue& jsValue); 77 void Callback(const std::string& arg, AdblockPlus::JsValue&& jsValue);
78 }; 78 };
79 79
80 class JniLogSystemCallback : public JniCallbackBase, public AdblockPlus::LogSyst em 80 class JniLogSystemCallback : public JniCallbackBase, public AdblockPlus::LogSyst em
81 { 81 {
82 public: 82 public:
83 JniLogSystemCallback(JNIEnv* env, jobject callbackObject); 83 JniLogSystemCallback(JNIEnv* env, jobject callbackObject);
84 void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source); 84 void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source);
85 }; 85 };
86 86
87 class JniShowNotificationCallback : public JniCallbackBase 87 class JniShowNotificationCallback : public JniCallbackBase
88 { 88 {
89 public: 89 public:
90 JniShowNotificationCallback(JNIEnv* env, jobject callbackObject); 90 JniShowNotificationCallback(JNIEnv* env, jobject callbackObject);
91 void Callback(AdblockPlus::Notification&); 91 void Callback(AdblockPlus::Notification&&);
92 }; 92 };
93 93
94 class JniWebRequest : public JniCallbackBase, public AdblockPlus::WebRequest 94 class JniWebRequest : public JniCallbackBase, public AdblockPlus::WebRequest
95 { 95 {
96 public: 96 public:
97 JniWebRequest(JNIEnv* env, jobject callbackObject); 97 JniWebRequest(JNIEnv* env, jobject callbackObject);
98 AdblockPlus::ServerResponse GET(const std::string& url, const AdblockPlus::Hea derList& requestHeaders) const; 98 AdblockPlus::ServerResponse GET(const std::string& url, const AdblockPlus::Hea derList& requestHeaders) const;
99 99
100 private: 100 private:
101 jobject NewTuple(JNIEnv* env, const std::string& a, const std::string& b) cons t; 101 jobject NewTuple(JNIEnv* env, const std::string& a, const std::string& b) cons t;
102 }; 102 };
103 103
104 class JniIsAllowedConnectionTypeCallback : public JniCallbackBase 104 class JniIsAllowedConnectionTypeCallback : public JniCallbackBase
105 { 105 {
106 public: 106 public:
107 JniIsAllowedConnectionTypeCallback(JNIEnv* env, jobject callbackObject); 107 JniIsAllowedConnectionTypeCallback(JNIEnv* env, jobject callbackObject);
108 bool Callback(const std::string* allowedConnectionType); 108 bool Callback(const std::string* allowedConnectionType);
109 }; 109 };
110 110
111 #endif /* JNICALLBACKS_H */ 111 #endif /* JNICALLBACKS_H */
LEFTRIGHT

Powered by Google App Engine
This is Rietveld