comparison src/uicommon/gftpui.h @ 367:d5409bf03ff1

2003-1-18 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_parse_url) - if the URL is the local filesystem, skip over the whitespace at the beginning. * lib/rfc959.c (rfc959_syst) - allow the string MVS and OS/MVS for the MVS directory listings. * src/gtk/gtkui_transfer.c src/gtk/transfer.c src/gtk/gftpui.c - started to move the transfer functionality into the uicommon directory. Added the text and GTK+ UI specific transfer functions. * src/gtk/Makefile.am po/POTFILES.in - added gtkui_transfer.c * src/gtk/dnd.c src/gtk/gtkui_transfer.c src/gtk/view_dialog.c - s/add_file_transfer/gtkui_common_add_file_transfer/ * src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h - removed transfer_mutex * src/gtk/gtkui.c src/text/textui.c - added gftpui_add_file_to_transfer() * src/uicommon/gftpui_callbacks.c src/uicommon/gftpui.c - in all of the thread callback functions, don't alter the return value in the function. Return it as is.
author masneyb
date Sun, 18 Jan 2004 20:09:28 +0000
parents 7cb3327f96f7
children d207b8241e96
comparison
equal deleted inserted replaced
366:2e408d9918d4 367:d5409bf03ff1
31 gftp_request * request; 31 gftp_request * request;
32 void *uidata; 32 void *uidata;
33 char *input_string, 33 char *input_string,
34 *source_string; 34 *source_string;
35 GList * files; 35 GList * files;
36 int retries;
36 int (*run_function) (gftpui_callback_data * cdata); 37 int (*run_function) (gftpui_callback_data * cdata);
37 }; 38 };
38 39
39 40
40 typedef enum _gftpui_common_request_type 41 typedef enum _gftpui_common_request_type
53 gftpui_common_request_type reqtype; 54 gftpui_common_request_type reqtype;
54 char *cmd_description; 55 char *cmd_description;
55 int (*subhelp_func) (char *topic); 56 int (*subhelp_func) (char *topic);
56 } gftpui_common_methods; 57 } gftpui_common_methods;
57 58
59 typedef struct _gftpui_common_curtrans_data
60 {
61 gftp_transfer * transfer;
62 GList * curfle;
63 } gftpui_common_curtrans_data;
64
58 #define gftpui_common_use_threads(request) (gftp_protocols[(request)->protonum].use_threads) 65 #define gftpui_common_use_threads(request) (gftp_protocols[(request)->protonum].use_threads)
59 66
60 #define GFTPUI_COMMON_COLOR_BLACK "\033[30m" 67 #define GFTPUI_COMMON_COLOR_BLACK "\033[30m"
61 #define GFTPUI_COMMON_COLOR_RED "\033[31m" 68 #define GFTPUI_COMMON_COLOR_RED "\033[31m"
62 #define GFTPUI_COMMON_COLOR_GREEN "\033[32m" 69 #define GFTPUI_COMMON_COLOR_GREEN "\033[32m"
70 #define GFTPUI_COMMON_COLOR_NONE "" 77 #define GFTPUI_COMMON_COLOR_NONE ""
71 78
72 extern sigjmp_buf gftpui_common_jmp_environment; 79 extern sigjmp_buf gftpui_common_jmp_environment;
73 extern volatile int gftpui_common_use_jmp_environment; 80 extern volatile int gftpui_common_use_jmp_environment;
74 extern gftpui_common_methods gftpui_common_commands[]; 81 extern gftpui_common_methods gftpui_common_commands[];
82 extern GStaticMutex gftpui_common_transfer_mutex;
75 83
76 /* gftpui.c */ 84 /* gftpui.c */
77 int gftpui_run_callback_function ( gftpui_callback_data * cdata ); 85 int gftpui_run_callback_function ( gftpui_callback_data * cdata );
78 86
79 int gftpui_common_run_callback_function ( gftpui_callback_data * cdata ); 87 int gftpui_common_run_callback_function ( gftpui_callback_data * cdata );
88 void *remui, 96 void *remui,
89 gftp_request * remreq ); 97 gftp_request * remreq );
90 98
91 int gftpui_common_process_command ( const char *command ); 99 int gftpui_common_process_command ( const char *command );
92 100
101 int gftpui_common_cmd_open ( void *uidata,
102 gftp_request * request,
103 char *command );
104
105 gftp_transfer * gftpui_common_add_file_transfer ( gftp_request * fromreq,
106 gftp_request * toreq,
107 void *fromuidata,
108 void *touidata,
109 GList * files );
110
111 int gftpui_common_transfer_files ( gftp_transfer * tdata );
112
93 /* gftpuicallback.c */ 113 /* gftpuicallback.c */
94 int gftpui_common_run_mkdir ( gftpui_callback_data * cdata ); 114 int gftpui_common_run_mkdir ( gftpui_callback_data * cdata );
95 115
96 int gftpui_common_run_rename ( gftpui_callback_data * cdata ); 116 int gftpui_common_run_rename ( gftpui_callback_data * cdata );
97 117
104 int gftpui_common_run_ls ( gftpui_callback_data * cdata ); 124 int gftpui_common_run_ls ( gftpui_callback_data * cdata );
105 125
106 int gftpui_common_run_delete ( gftpui_callback_data * cdata ); 126 int gftpui_common_run_delete ( gftpui_callback_data * cdata );
107 127
108 int gftpui_common_run_rmdir ( gftpui_callback_data * cdata ); 128 int gftpui_common_run_rmdir ( gftpui_callback_data * cdata );
129
130 int gftpui_common_run_connect ( gftpui_callback_data * cdata );
109 131
110 /* UI Functions that must be implemented by each distinct UI */ 132 /* UI Functions that must be implemented by each distinct UI */
111 void gftpui_lookup_file_colors ( gftp_file * fle, 133 void gftpui_lookup_file_colors ( gftp_file * fle,
112 char **start_color, 134 char **start_color,
113 char ** end_color ); 135 char ** end_color );
123 gftp_request * request ); 145 gftp_request * request );
124 146
125 char *gftpui_prompt_password ( void *uidata, 147 char *gftpui_prompt_password ( void *uidata,
126 gftp_request * request ); 148 gftp_request * request );
127 149
150 void gftpui_add_file_to_transfer ( gftp_transfer * tdata,
151 GList * curfle,
152 char *filepos );
153
154 void gftpui_ask_transfer ( gftp_transfer * tdata );
155
128 #endif 156 #endif