aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java/com/libmailcore/IMAPAppendMessageOperation.java
blob: b626277addaed9e870d1dcb850c4df3f85c73fae (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
33
34
35
36
37
38
39
40
41
42
package com.libmailcore;

import java.util.Date;

/** Operation to append an message using IMAP. */
public class IMAPAppendMessageOperation 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;
    }

    /** Sets the received date of the message to append. */
    public native void setDate(Date date);
    /** Returns the received date of the message to append. */
    public native Date date();
    
    /**
        Returns the UID of the created message. It will have a correct value once
        the operation finished.
    */
    public native long createdUID();

    private native void finalizeNative();

    private IMAPOperationProgressListener listener;
    private native void setupNativeOperationProgressListener();
    private long nativeOperationProgressListener;
}