blob: 587a139e48800d03f452af0f232de86d6dfba4c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package com.libmailcore;
public class Operation extends NativeObject {
/** Cancel the operation. */
public native void cancel();
/** Returns whether the operation has been cancelled. */
public native boolean isCancelled();
/** Starts the operation. Calls the aCallback.succeeded() when the operation is finished.
@see com.libmailcore.OperationCallback#succeeded() */
public void start(OperationCallback aCallback)
{
callback = aCallback;
nativeStart();
}
private native void nativeStart();
protected void callCallback()
{
if (callback != null) {
callback.succeeded();
}
}
protected OperationCallback callback;
}
|