| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 public: | 58 public: |
| 59 JniUpdaterCallback(JNIEnv* env, jobject callbackObject); | 59 JniUpdaterCallback(JNIEnv* env, jobject callbackObject); |
| 60 void Callback(const std::string& arg); | 60 void Callback(const std::string& arg); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class JniFilterChangeCallback : public JniCallbackBase | 63 class JniFilterChangeCallback : public JniCallbackBase |
| 64 { | 64 { |
| 65 public: | 65 public: |
| 66 JniFilterChangeCallback(JNIEnv* env, jobject callbackObject); | 66 JniFilterChangeCallback(JNIEnv* env, jobject callbackObject); |
| 67 void Callback(const std::string& arg, const AdblockPlus::JsValuePtr jsValue); | 67 void Callback(const std::string& arg, const AdblockPlus::JsValuePtr jsValue); |
| 68 | |
| 69 private: | |
| 70 JniGlobalReference<jclass>::Ptr jsValueClass; | |
|
Felix Dahlke
2014/04/16 15:24:25
You seem to make everything const that can be, so
René Jeschke
2014/04/16 17:51:47
Done.
| |
| 68 }; | 71 }; |
| 69 | 72 |
| 70 class JniLogSystemCallback : public JniCallbackBase, public AdblockPlus::LogSyst em | 73 class JniLogSystemCallback : public JniCallbackBase, public AdblockPlus::LogSyst em |
| 71 { | 74 { |
| 72 public: | 75 public: |
| 73 JniLogSystemCallback(JNIEnv* env, jobject callbackObject); | 76 JniLogSystemCallback(JNIEnv* env, jobject callbackObject); |
| 74 void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source); | 77 void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source); |
| 75 | 78 |
| 76 private: | 79 private: |
| 77 JniGlobalReference<jclass>::Ptr logLevelClass; | 80 JniGlobalReference<jclass>::Ptr logLevelClass; |
| 78 }; | 81 }; |
| 79 | 82 |
| 80 class JniWebRequest : public JniCallbackBase, public AdblockPlus::WebRequest | 83 class JniWebRequest : public JniCallbackBase, public AdblockPlus::WebRequest |
| 81 { | 84 { |
| 82 public: | 85 public: |
| 83 JniWebRequest(JNIEnv* env, jobject callbackObject); | 86 JniWebRequest(JNIEnv* env, jobject callbackObject); |
| 84 AdblockPlus::ServerResponse GET(const std::string& url, const AdblockPlus::Hea derList& requestHeaders) const; | 87 AdblockPlus::ServerResponse GET(const std::string& url, const AdblockPlus::Hea derList& requestHeaders) const; |
| 85 | 88 |
| 86 private: | 89 private: |
| 87 jobject NewTuple(JNIEnv* env, const std::string& a, const std::string& b) cons t; | 90 jobject NewTuple(JNIEnv* env, const std::string& a, const std::string& b) cons t; |
| 88 | 91 |
| 89 JniGlobalReference<jclass>::Ptr tupleClass; | 92 JniGlobalReference<jclass>::Ptr tupleClass; |
| 90 JniGlobalReference<jclass>::Ptr serverResponseClass; | 93 JniGlobalReference<jclass>::Ptr serverResponseClass; |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 #endif /* JNICALLBACKS_H */ | 96 #endif /* JNICALLBACKS_H */ |
| OLD | NEW |