aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java/com/libmailcore/IMAPFetchContentOperation.java
blob: 02238c1a84bdf98ac79f52e3dd774d0e0720f69c (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
28
29
30
31
32
package com.libmailcore;

/** Operation to fetch a message or an attachment from the IMAP server. */
public class IMAPFetchContentOperation extends IMAPOperation {
    protected void finalize() throws Throwable
    {
        finalizeNative();
        super.finalize();
    }
    
    /** Sets the progress listener. */
    public void setProgressListener(IMAPOperationProgressListener aListener)
    {
        listener = aListener;
        setupNativeOperationProgressListener();
    }
    
    /** Returns the progress listener. */
    public IMAPOperationProgressListener progressListener()
    {
        return listener;
    }
    
    /** Content of the message or the attachment. */
    public native byte[] data();
    
    private native void finalizeNative();
    
    private IMAPOperationProgressListener listener;
    private native void setupNativeOperationProgressListener();
    private long nativeOperationProgressListener;
}