diff src/ft.h @ 8585:e4087b5c0627

[gaim-migrate @ 9335] Patch from Pekka Riikonen to allow a prpl to accept a file transfer without choosing the save filename, and then to later complete this selection. This also provides some API extension to allow a prpl to handle its own connection setups and a posteriori add the connection to gaim's file transfer list. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 05 Apr 2004 20:15:29 +0000
parents f50c059b6384
children 92cbf9713795
line wrap: on
line diff
--- a/src/ft.h	Mon Apr 05 17:33:34 2004 +0000
+++ b/src/ft.h	Mon Apr 05 20:15:29 2004 +0000
@@ -50,6 +50,7 @@
 {
 	GAIM_XFER_STATUS_UNKNOWN = 0,   /**< Unknown, the xfer may be null. */
 	GAIM_XFER_STATUS_NOT_STARTED,   /**< It hasn't started yet. */
+	GAIM_XFER_STATUS_ACCEPTED,      /**< Receive accepted, but destination file not selected yet */
 	GAIM_XFER_STATUS_STARTED,       /**< gaim_xfer_start has been called. */
 	GAIM_XFER_STATUS_DONE,          /**< The xfer completed successfully. */
 	GAIM_XFER_STATUS_CANCEL_LOCAL,  /**< The xfer was canceled by us. */
@@ -172,7 +173,11 @@
 void gaim_xfer_unref(GaimXfer *xfer);
 
 /**
- * Requests confirmation for a file transfer from the user.
+ * Requests confirmation for a file transfer from the user. If receiving
+ * a file which is known at this point, this requests user to accept and
+ * save the file. If the filename is unknown (not set) this only requests user
+ * to accept the file transfer. In this case protocol must call this function
+ * again once the filename is available.
  *
  * @param xfer The file transfer to request confirmation on.
  */
@@ -485,6 +490,14 @@
 void gaim_xfer_end(GaimXfer *xfer);
 
 /**
+ * Adds a new file transfer to the list of file transfers. Call this only
+ * if you are not using gaim_xfer_start.
+ *
+ * @param xfer The file transfer.
+ */
+void gaim_xfer_add(GaimXfer *xfer);
+
+/**
  * Cancels a file transfer on the local end.
  *
  * @param xfer The file transfer.
@@ -511,6 +524,13 @@
  */
 void gaim_xfer_error(GaimXferType type, const char *who, const char *msg);
 
+/**
+ * Updates file transfer progress.
+ *
+ * @param xfer      The file transfer.
+ */
+void gaim_xfer_update_progress(GaimXfer *xfer);
+
 /*@}*/
 
 /**************************************************************************/