Index: libadblockplus-android/src/org/adblockplus/libadblockplus/WebRequest.java |
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/WebRequest.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/WebRequest.java |
index c5e83998d0d4cfbc35dbf704988fbc940960afbf..35f43f58235984a73851a3ad928b366642d48ffa 100644 |
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/WebRequest.java |
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/WebRequest.java |
@@ -19,50 +19,7 @@ package org.adblockplus.libadblockplus; |
import java.util.List; |
-public abstract class WebRequest implements Disposable |
+public interface WebRequest |
{ |
- private final Disposer disposer; |
- protected final long ptr; |
- |
- static |
- { |
- System.loadLibrary("adblockplus-jni"); |
- registerNatives(); |
- } |
- |
- public WebRequest() |
- { |
- this.ptr = ctor(this); |
- this.disposer = new Disposer(this, new DisposeWrapper(this.ptr)); |
- } |
- |
- public abstract ServerResponse httpGET(String url, List<HeaderEntry> headers); |
- |
- @Override |
- public void dispose() |
- { |
- this.disposer.dispose(); |
- } |
- |
- private final static class DisposeWrapper implements Disposable |
- { |
- private final long ptr; |
- |
- public DisposeWrapper(final long ptr) |
- { |
- this.ptr = ptr; |
- } |
- |
- @Override |
- public void dispose() |
- { |
- dtor(this.ptr); |
- } |
- } |
- |
- private final static native void registerNatives(); |
- |
- private final static native long ctor(Object callbackObject); |
- |
- private final static native void dtor(long ptr); |
+ ServerResponse httpGET(String url, List<HeaderEntry> headers); |
} |