Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 * @param subscriptionUrl may contain query parameters, only the beginning of the string is used | 191 * @param subscriptionUrl may contain query parameters, only the beginning of the string is used |
192 * to find a corresponding subscription. | 192 * to find a corresponding subscription. |
193 */ | 193 */ |
194 public void updateFiltersAsync(String subscriptionUrl) | 194 public void updateFiltersAsync(String subscriptionUrl) |
195 { | 195 { |
196 updateFiltersAsync(this.ptr, subscriptionUrl); | 196 updateFiltersAsync(this.ptr, subscriptionUrl); |
197 } | 197 } |
198 | 198 |
199 /** | 199 /** |
200 * Get FilterEngine pointer | 200 * Get FilterEngine pointer |
201 * @return C++ FilterEngine instance pointer | 201 * @return C++ FilterEngine instance pointer (AdblockPlus::FilterEngine*) |
202 */ | 202 */ |
203 public long getFilterEnginePtr() { | 203 public long getNativePtr() { |
sergei
2017/09/26 12:04:29
Maybe call it `getNativePtr`?
anton
2017/09/26 12:18:40
Does not make sense for me, we can call it `getNat
sergei
2017/09/28 08:29:03
I don't insist, it's just my expectations of an AP
| |
204 return getFilterEnginePtr(this.ptr); | 204 return getNativePtr(this.ptr); |
205 } | 205 } |
diegocarloslima
2017/09/28 11:55:30
Well, this ain't a good practice to expose/share n
| |
206 | 206 |
207 private final static native void registerNatives(); | 207 private final static native void registerNatives(); |
208 | 208 |
209 private final static native boolean isFirstRun(long ptr); | 209 private final static native boolean isFirstRun(long ptr); |
210 | 210 |
211 private final static native Filter getFilter(long ptr, String text); | 211 private final static native Filter getFilter(long ptr, String text); |
212 | 212 |
213 private final static native List<Filter> getListedFilters(long ptr); | 213 private final static native List<Filter> getListedFilters(long ptr); |
214 | 214 |
215 private final static native Subscription getSubscription(long ptr, String url) ; | 215 private final static native Subscription getSubscription(long ptr, String url) ; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 private final static native String getAllowedConnectionType(long ptr); | 255 private final static native String getAllowedConnectionType(long ptr); |
256 | 256 |
257 private final static native void setAcceptableAdsEnabled(long ptr, boolean ena bled); | 257 private final static native void setAcceptableAdsEnabled(long ptr, boolean ena bled); |
258 | 258 |
259 private final static native boolean isAcceptableAdsEnabled(long ptr); | 259 private final static native boolean isAcceptableAdsEnabled(long ptr); |
260 | 260 |
261 private final static native String getAcceptableAdsSubscriptionURL(long ptr); | 261 private final static native String getAcceptableAdsSubscriptionURL(long ptr); |
262 | 262 |
263 private final static native void updateFiltersAsync(long ptr, String subscript ionUrl); | 263 private final static native void updateFiltersAsync(long ptr, String subscript ionUrl); |
264 | 264 |
265 private final static native long getFilterEnginePtr(long ptr); | 265 private final static native long getNativePtr(long ptr); |
266 } | 266 } |
LEFT | RIGHT |