diff lib/protocols.c @ 309:cc2eeb30b793

2003-11-7 Brian Masney <masneyb@gftp.org> * lib/gftp.h lib/local.c lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c - added copy_param_options method to gftp_request structure. When a gftp_request structure is copied, if a copy_param_options method exists, this will be called so that the local protocol data can be copied over. This is only used by the FTP protocol at the moment to save the current state of Ascii or Binary transfers. * src/gtk/transfer.c (transfer_done) - when a transfer is completed, copy the local protocol options back to the main window * lib/rfc959.c (gftp_set_data_type) - check the return value of rfc959_send_command() and if there is an error, return that error. * configure.in - added 'hr' to ALL_LINGUAS
author masneyb
date Sat, 08 Nov 2003 12:23:21 +0000
parents 3b9d5797050f
children 32a6b26b7026
line wrap: on
line diff
--- a/lib/protocols.c	Fri Nov 07 18:10:04 2003 +0000
+++ b/lib/protocols.c	Sat Nov 08 12:23:21 2003 +0000
@@ -83,6 +83,22 @@
 }
 
 
+/* This function is called to copy protocol specific data from one request 
+   structure to another. This is typically called when a file transfer is
+   completed, state information can be copied back to the main window */
+void
+gftp_copy_param_options (gftp_request * dest_request,
+                         gftp_request * src_request)
+{
+  g_return_if_fail (dest_request != NULL);
+  g_return_if_fail (src_request != NULL);
+  g_return_if_fail (dest_request->protonum == src_request->protonum);
+
+  if (dest_request->copy_param_options)
+    dest_request->copy_param_options (dest_request, src_request);
+}
+
+
 void
 gftp_file_destroy (gftp_file * file)
 {