mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-30 10:12:06 +01:00
Initial transfer status was not being set.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3634 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
422317e238
commit
aa4b965001
1 changed files with 21 additions and 11 deletions
|
@ -42,7 +42,7 @@ public abstract class FileTransfer {
|
||||||
|
|
||||||
private String peer;
|
private String peer;
|
||||||
|
|
||||||
private org.jivesoftware.smackx.filetransfer.FileTransfer.Status status;
|
private org.jivesoftware.smackx.filetransfer.FileTransfer.Status status = Status.INITIAL;
|
||||||
|
|
||||||
private final Object statusMonitor = new Object();
|
private final Object statusMonitor = new Object();
|
||||||
|
|
||||||
|
@ -249,12 +249,12 @@ public abstract class FileTransfer {
|
||||||
*
|
*
|
||||||
* @see FileTransfer#getError()
|
* @see FileTransfer#getError()
|
||||||
*/
|
*/
|
||||||
public static final Status ERROR = new Status();
|
public static final Status ERROR = new Status("Error");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The initial status of the file transfer.
|
* The initial status of the file transfer.
|
||||||
*/
|
*/
|
||||||
public static final Status INITIAL = new Status();
|
public static final Status INITIAL = new Status("Initial");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The file transfer is being negotiated with the peer. The party
|
* The file transfer is being negotiated with the peer. The party
|
||||||
|
@ -264,13 +264,13 @@ public abstract class FileTransfer {
|
||||||
*
|
*
|
||||||
* @see #NEGOTIATING_STREAM
|
* @see #NEGOTIATING_STREAM
|
||||||
*/
|
*/
|
||||||
public static final Status NEGOTIATING_TRANSFER = new Status();
|
public static final Status NEGOTIATING_TRANSFER = new Status("Negotiating Transfer");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The peer has refused the file transfer request halting the file
|
* The peer has refused the file transfer request halting the file
|
||||||
* transfer negotiation process.
|
* transfer negotiation process.
|
||||||
*/
|
*/
|
||||||
public static final Status REFUSED = new Status();
|
public static final Status REFUSED = new Status("Refused");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The stream to transfer the file is being negotiated over the chosen
|
* The stream to transfer the file is being negotiated over the chosen
|
||||||
|
@ -279,31 +279,41 @@ public abstract class FileTransfer {
|
||||||
*
|
*
|
||||||
* @see #NEGOTIATED
|
* @see #NEGOTIATED
|
||||||
*/
|
*/
|
||||||
public static final Status NEGOTIATING_STREAM = new Status();
|
public static final Status NEGOTIATING_STREAM = new Status("Negotiating Stream");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* After the stream negotitation has completed the intermediate state
|
* After the stream negotitation has completed the intermediate state
|
||||||
* between the time when the negotiation is finished and the actual
|
* between the time when the negotiation is finished and the actual
|
||||||
* transfer begins.
|
* transfer begins.
|
||||||
*/
|
*/
|
||||||
public static final Status NEGOTIATED = new Status();
|
public static final Status NEGOTIATED = new Status("Negotiated");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The transfer is in progress.
|
* The transfer is in progress.
|
||||||
*
|
*
|
||||||
* @see FileTransfer#getProgress()
|
* @see FileTransfer#getProgress()
|
||||||
*/
|
*/
|
||||||
public static final Status IN_PROGRESS = new Status();
|
public static final Status IN_PROGRESS = new Status("In Progress");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The transfer has completed successfully.
|
* The transfer has completed successfully.
|
||||||
*/
|
*/
|
||||||
public static final Status COMPLETE = new Status();
|
public static final Status COMPLETE = new Status("Complete");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The file transfer was canceled
|
* The file transfer was canceled
|
||||||
*/
|
*/
|
||||||
public static final Status CANCLED = new Status();
|
public static final Status CANCLED = new Status("Cancled");
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
private Status(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue