OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 { | 23 { |
24 System.loadLibrary("adblockplus-jni"); | 24 System.loadLibrary("adblockplus-jni"); |
25 registerNatives(); | 25 registerNatives(); |
26 } | 26 } |
27 | 27 |
28 private Subscription(final long ptr) | 28 private Subscription(final long ptr) |
29 { | 29 { |
30 super(ptr); | 30 super(ptr); |
31 } | 31 } |
32 | 32 |
| 33 public boolean isDisabled() |
| 34 { |
| 35 return isDisabled(this.ptr); |
| 36 } |
| 37 |
| 38 public void setDisabled(boolean disabled) |
| 39 { |
| 40 setDisabled(this.ptr, disabled); |
| 41 } |
| 42 |
33 public boolean isListed() | 43 public boolean isListed() |
34 { | 44 { |
35 return isListed(this.ptr); | 45 return isListed(this.ptr); |
36 } | 46 } |
37 | 47 |
38 public void addToList() | 48 public void addToList() |
39 { | 49 { |
40 addToList(this.ptr); | 50 addToList(this.ptr); |
41 } | 51 } |
42 | 52 |
(...skipping 29 matching lines...) Expand all Loading... |
72 if (!(o instanceof Subscription)) | 82 if (!(o instanceof Subscription)) |
73 { | 83 { |
74 return false; | 84 return false; |
75 } | 85 } |
76 | 86 |
77 return operatorEquals(this.ptr, ((Subscription)o).ptr); | 87 return operatorEquals(this.ptr, ((Subscription)o).ptr); |
78 } | 88 } |
79 | 89 |
80 private final static native void registerNatives(); | 90 private final static native void registerNatives(); |
81 | 91 |
| 92 private final static native boolean isDisabled(long ptr); |
| 93 |
| 94 private final static native void setDisabled(long ptr, boolean disabled); |
| 95 |
82 private final static native boolean isListed(long ptr); | 96 private final static native boolean isListed(long ptr); |
83 | 97 |
84 private final static native void addToList(long ptr); | 98 private final static native void addToList(long ptr); |
85 | 99 |
86 private final static native void removeFromList(long ptr); | 100 private final static native void removeFromList(long ptr); |
87 | 101 |
88 private final static native void updateFilters(long ptr); | 102 private final static native void updateFilters(long ptr); |
89 | 103 |
90 private final static native boolean isUpdating(long ptr); | 104 private final static native boolean isUpdating(long ptr); |
91 | 105 |
92 private final static native boolean operatorEquals(long ptr, long other); | 106 private final static native boolean operatorEquals(long ptr, long other); |
93 | 107 |
94 private final static native boolean isAcceptableAds(long ptr); | 108 private final static native boolean isAcceptableAds(long ptr); |
95 } | 109 } |
OLD | NEW |