Remmina - The GTK+ Remote Desktop Client  v1.4.34
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
remmina_ftp_client.h
Go to the documentation of this file.
1 /*
2  * Remmina - The GTK+ Remote Desktop Client
3  * Copyright (C) 2009-2010 Vic Lee
4  * Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
5  * Copyright (C) 2016-2023 Antenore Gatta, Giovanni Panozzo
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  * In addition, as a special exception, the copyright holders give
23  * permission to link the code of portions of this program with the
24  * OpenSSL library under certain conditions as described in each
25  * individual source file, and distribute linked combinations
26  * including the two.
27  * You must obey the GNU General Public License in all respects
28  * for all of the code used other than OpenSSL. * If you modify
29  * file(s) with this exception, you may extend this exception to your
30  * version of the file(s), but you are not obligated to do so. * If you
31  * do not wish to do so, delete this exception statement from your
32  * version. * If you delete this exception statement from all source
33  * files in the program, then also delete it here.
34  *
35  */
36 
37 #pragma once
38 
39 #include <gtk/gtk.h>
40 #include "remmina_file.h"
41 
42 G_BEGIN_DECLS
43 
44 #define REMMINA_TYPE_FTP_CLIENT (remmina_ftp_client_get_type())
45 #define REMMINA_FTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), REMMINA_TYPE_FTP_CLIENT, RemminaFTPClient))
46 #define REMMINA_FTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), REMMINA_TYPE_FTP_CLIENT, RemminaFTPClientClass))
47 #define REMMINA_IS_FTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), REMMINA_TYPE_FTP_CLIENT))
48 #define REMMINA_IS_FTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), REMMINA_TYPE_FTP_CLIENT))
49 #define REMMINA_FTP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), REMMINA_TYPE_FTP_CLIENT, RemminaFTPClientClass))
50 
51 typedef struct _RemminaFTPClientPriv RemminaFTPClientPriv;
52 
53 typedef struct _RemminaFTPClient {
54  GtkBox vbox;
55 
58 
59 typedef struct _RemminaFTPClientClass {
60  GtkBoxClass parent_class;
61 
62  void (*open_dir)(RemminaFTPClient *client);
63  void (*new_task)(RemminaFTPClient *client);
64  void (*cancel_task)(RemminaFTPClient *client);
65  void (*delete_file)(RemminaFTPClient *client);
67 
69 G_GNUC_CONST;
70 
71 enum {
76 };
77 
78 enum {
86  REMMINA_FTP_FILE_COLUMN_NAME_SORT, /* Auto populate */
88 };
89 
90 enum {
92 };
93 
94 enum {
100 };
101 
102 enum {
114 };
115 
116 typedef struct _RemminaFTPTask {
117  /* Read-only */
118  gint type;
119  gchar * name;
120  gint taskid;
121  gint tasktype;
122  gchar * remotedir;
123  gchar * localdir;
124  GtkTreeRowReference * rowref;
125  /* Updatable */
126  gfloat size;
127  gint status;
128  gfloat donesize;
129  gchar * tooltip;
131 
132 GtkWidget *remmina_ftp_client_new(void);
133 
136 
137 void remmina_ftp_client_set_show_hidden(RemminaFTPClient *client, gboolean show_hidden);
139 /* column, value, …, -1 */
141 /* Set the current directory. Should be called by opendir signal handler */
142 void remmina_ftp_client_set_dir(RemminaFTPClient *client, const gchar *dir);
143 /* Get the current directory as newly allocated string */
145 /* Get the next waiting task */
147 /* Update the task */
149 /* Free the RemminaFTPTask object */
151 /* Get/Set Set overwrite_all status */
152 void remmina_ftp_client_set_overwrite_status(RemminaFTPClient *client, gboolean status);
154 /* Get/Set Set resume_all status */
155 void remmina_ftp_client_set_resume_status(RemminaFTPClient *client, gboolean status);
157 
158 G_END_DECLS
@ REMMINA_FTP_TASK_TYPE_UPLOAD
@ REMMINA_FTP_TASK_N_TYPES
@ REMMINA_FTP_TASK_TYPE_DOWNLOAD
struct _RemminaFTPClientClass RemminaFTPClientClass
struct _RemminaFTPClient RemminaFTPClient
void remmina_ftp_client_set_dir(RemminaFTPClient *client, const gchar *dir)
gboolean remmina_ftp_client_get_overwrite_status(RemminaFTPClient *client)
void remmina_ftp_client_save_state(RemminaFTPClient *client, RemminaFile *remminafile)
void remmina_ftp_client_load_state(RemminaFTPClient *client, RemminaFile *remminafile)
void remmina_ftp_client_add_file(RemminaFTPClient *client,...)
RemminaFTPTask * remmina_ftp_client_get_waiting_task(RemminaFTPClient *client)
GType remmina_ftp_client_get_type(void) G_GNUC_CONST
@ REMMINA_FTP_FILE_TYPE_LINK
@ REMMINA_FTP_FILE_N_TYPES
@ REMMINA_FTP_FILE_TYPE_FILE
@ REMMINA_FTP_FILE_TYPE_DIR
void remmina_ftp_task_free(RemminaFTPTask *task)
gchar * remmina_ftp_client_get_dir(RemminaFTPClient *client)
@ REMMINA_FTP_FILE_COLUMN_PERMISSION
@ REMMINA_FTP_FILE_COLUMN_MODIFIED
@ REMMINA_FTP_FILE_COLUMN_NAME_SORT
@ REMMINA_FTP_FILE_COLUMN_USER
@ REMMINA_FTP_FILE_COLUMN_GROUP
@ REMMINA_FTP_FILE_COLUMN_NAME
@ REMMINA_FTP_FILE_N_COLUMNS
@ REMMINA_FTP_FILE_COLUMN_TYPE
@ REMMINA_FTP_FILE_COLUMN_SIZE
@ REMMINA_FTP_TASK_COLUMN_TOOLTIP
@ REMMINA_FTP_TASK_COLUMN_LOCALDIR
@ REMMINA_FTP_TASK_COLUMN_STATUS
@ REMMINA_FTP_TASK_COLUMN_TASKTYPE
@ REMMINA_FTP_TASK_COLUMN_DONESIZE
@ REMMINA_FTP_TASK_COLUMN_SIZE
@ REMMINA_FTP_TASK_COLUMN_TASKID
@ REMMINA_FTP_TASK_COLUMN_TYPE
@ REMMINA_FTP_TASK_COLUMN_NAME
@ REMMINA_FTP_TASK_COLUMN_REMOTEDIR
@ REMMINA_FTP_TASK_N_COLUMNS
void remmina_ftp_client_set_resume_status(RemminaFTPClient *client, gboolean status)
struct _RemminaFTPClientPriv RemminaFTPClientPriv
GtkWidget * remmina_ftp_client_new(void)
@ REMMINA_FTP_TASK_N_STATUSES
@ REMMINA_FTP_TASK_STATUS_WAIT
@ REMMINA_FTP_TASK_STATUS_FINISH
@ REMMINA_FTP_TASK_STATUS_ERROR
@ REMMINA_FTP_TASK_STATUS_RUN
gboolean remmina_ftp_client_get_resume_status(RemminaFTPClient *client)
void remmina_ftp_client_update_task(RemminaFTPClient *client, RemminaFTPTask *task)
void remmina_ftp_client_set_show_hidden(RemminaFTPClient *client, gboolean show_hidden)
void remmina_ftp_client_set_overwrite_status(RemminaFTPClient *client, gboolean status)
struct _RemminaFTPTask RemminaFTPTask
void remmina_ftp_client_clear_file_list(RemminaFTPClient *client)
void(* open_dir)(RemminaFTPClient *client)
void(* delete_file)(RemminaFTPClient *client)
void(* cancel_task)(RemminaFTPClient *client)
void(* new_task)(RemminaFTPClient *client)
RemminaFTPClientPriv * priv
GtkTreeRowReference * rowref
typedefG_BEGIN_DECLS struct _RemminaFile RemminaFile
Definition: types.h:44