Remmina - The GTK+ Remote Desktop Client  v1.4.2
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_file.h
Go to the documentation of this file.
1 /*
2  * Remmina - The GTK+ Remote Desktop Client
3  * Copyright (C) 2009-2011 Vic Lee
4  * Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
5  * Copyright (C) 2016-2020 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 #include "remmina/types.h"
38 
39 #pragma once
40 
41 G_BEGIN_DECLS
42 
43 struct _RemminaFile {
44  gchar * filename;
45  GHashTable * settings;
46  GHashTable * spsettings;
47  gboolean prevent_saving;
48 };
49 
50 enum {
52 };
53 
54 
55 #define TOOLBAR_OPACITY_LEVEL 8
56 #define TOOLBAR_OPACITY_MIN 0.2
57 
58 /* Create a empty .remmina file */
62 void remmina_file_set_filename(RemminaFile *remminafile, const gchar *filename);
63 const gchar *remmina_file_get_filename(RemminaFile *remminafile);
64 /* Load a new .remmina file and return the allocated RemminaFile object */
66 /* Settings get/set functions */
67 void remmina_file_set_string(RemminaFile *remminafile, const gchar *setting, const gchar *value);
68 void remmina_file_set_string_ref(RemminaFile *remminafile, const gchar *setting, gchar *value);
69 const gchar *remmina_file_get_string(RemminaFile *remminafile, const gchar *setting);
70 gchar *remmina_file_get_secret(RemminaFile *remminafile, const gchar *setting);
71 gchar *remmina_file_format_properties(RemminaFile *remminafile, const gchar *setting);
72 void remmina_file_set_int(RemminaFile *remminafile, const gchar *setting, gint value);
73 gint remmina_file_get_int(RemminaFile *remminafile, const gchar *setting, gint default_value);
74 void remmina_file_store_secret_plugin_password(RemminaFile *remminafile, const gchar *key, const gchar *value);
75 gboolean remmina_file_remove_key(RemminaFile *remminafile, const gchar *setting);
76 /* Create or overwrite the .remmina file */
77 void remmina_file_save(RemminaFile *remminafile);
78 /* Free the RemminaFile object */
79 void remmina_file_free(RemminaFile *remminafile);
80 /* Duplicate a RemminaFile object */
82 /* Get the protocol icon name */
83 const gchar *remmina_file_get_icon_name(RemminaFile *remminafile);
84 /* Duplicate a temporary RemminaFile and change the protocol */
85 RemminaFile *remmina_file_dup_temp_protocol(RemminaFile *remminafile, const gchar *new_protocol);
86 /* Delete a .remmina file */
87 void remmina_file_delete(const gchar *filename);
88 /* Delete a "password" field and save into .remmina file */
90 /* Function used to update the atime and mtime of a given remmina file, partially
91  * taken from suckless sbase */
92 gchar *remmina_file_get_datetime(RemminaFile *remminafile);
93 /* Function used to update the atime and mtime of a given remmina file */
94 void remmina_file_touch(RemminaFile *remminafile);
95 
96 G_END_DECLS
GHashTable * spsettings
Definition: remmina_file.h:46
void remmina_file_set_string_ref(RemminaFile *remminafile, const gchar *setting, gchar *value)
Definition: remmina_file.c:429
typedefG_BEGIN_DECLS struct _RemminaFile RemminaFile
Definition: types.h:41
void remmina_file_delete(const gchar *filename)
Definition: remmina_file.c:723
void remmina_file_touch(RemminaFile *remminafile)
Update the atime and mtime of a given filename.
Definition: remmina_file.c:839
RemminaFile * remmina_file_new(void)
Definition: remmina_file.c:90
gboolean remmina_file_remove_key(RemminaFile *remminafile, const gchar *setting)
RemminaFile * remmina_file_copy(const gchar *filename)
Definition: remmina_file.c:191
RemminaFile * remmina_file_dup_temp_protocol(RemminaFile *remminafile, const gchar *new_protocol)
Definition: remmina_file.c:711
gchar * remmina_file_get_datetime(RemminaFile *remminafile)
Return the string date of the last time a file has been modified.
Definition: remmina_file.c:789
void remmina_file_store_secret_plugin_password(RemminaFile *remminafile, const gchar *key, const gchar *value)
Definition: remmina_file.c:660
gboolean prevent_saving
Definition: remmina_file.h:47
void remmina_file_set_filename(RemminaFile *remminafile, const gchar *filename)
Definition: remmina_file.c:176
RemminaFile * remmina_file_dup(RemminaFile *remminafile)
Definition: remmina_file.c:679
gint remmina_file_get_int(RemminaFile *remminafile, const gchar *setting, gint default_value)
Definition: remmina_file.c:524
void remmina_file_generate_filename(RemminaFile *remminafile)
Definition: remmina_file.c:108
void remmina_file_set_int(RemminaFile *remminafile, const gchar *setting, gint value)
Definition: remmina_file.c:518
void remmina_file_free(RemminaFile *remminafile)
Definition: remmina_file.c:548
gchar * remmina_file_format_properties(RemminaFile *remminafile, const gchar *setting)
Definition: remmina_file.c:494
void remmina_file_save(RemminaFile *remminafile)
Definition: remmina_file.c:561
const gchar * remmina_file_get_string(RemminaFile *remminafile, const gchar *setting)
Definition: remmina_file.c:449
void remmina_file_unsave_passwords(RemminaFile *remminafile)
Definition: remmina_file.c:736
const gchar * remmina_file_get_icon_name(RemminaFile *remminafile)
Definition: remmina_file.c:697
RemminaFile * remmina_file_load(const gchar *filename)
Definition: remmina_file.c:327
gchar * filename
Definition: remmina_file.h:44
gchar * remmina_file_get_secret(RemminaFile *remminafile, const gchar *setting)
Definition: remmina_file.c:484
void remmina_file_set_string(RemminaFile *remminafile, const gchar *setting, const gchar *value)
Definition: remmina_file.c:423
GHashTable * settings
Definition: remmina_file.h:45
const gchar * remmina_file_get_filename(RemminaFile *remminafile)
Definition: remmina_file.c:184