Remmina - The GTK+ Remote Desktop Client  v1.3.1
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.c File Reference

Go to the source code of this file.

Functions

static RemminaFileremmina_file_new_empty (void)
 
RemminaFileremmina_file_new (void)
 
void remmina_file_generate_filename (RemminaFile *remminafile)
 
void remmina_file_set_filename (RemminaFile *remminafile, const gchar *filename)
 
const gchar * remmina_file_get_filename (RemminaFile *remminafile)
 
RemminaFileremmina_file_copy (const gchar *filename)
 
static const RemminaProtocolSettingfind_protocol_setting (const gchar *name, RemminaProtocolPlugin *protocol_plugin)
 
RemminaFileremmina_file_load (const gchar *filename)
 
void remmina_file_set_string (RemminaFile *remminafile, const gchar *setting, const gchar *value)
 
void remmina_file_set_string_ref (RemminaFile *remminafile, const gchar *setting, gchar *value)
 
const gchar * remmina_file_get_string (RemminaFile *remminafile, const gchar *setting)
 
gchar * remmina_file_get_secret (RemminaFile *remminafile, const gchar *setting)
 
void remmina_file_set_int (RemminaFile *remminafile, const gchar *setting, gint value)
 
gint remmina_file_get_int (RemminaFile *remminafile, const gchar *setting, gint default_value)
 
static GKeyFile * remmina_file_get_keyfile (RemminaFile *remminafile)
 
void remmina_file_free (RemminaFile *remminafile)
 
void remmina_file_save (RemminaFile *remminafile)
 
void remmina_file_store_secret_plugin_password (RemminaFile *remminafile, const gchar *key, const gchar *value)
 
RemminaFileremmina_file_dup (RemminaFile *remminafile)
 
const gchar * remmina_file_get_icon_name (RemminaFile *remminafile)
 
RemminaFileremmina_file_dup_temp_protocol (RemminaFile *remminafile, const gchar *new_protocol)
 
void remmina_file_delete (const gchar *filename)
 
void remmina_file_unsave_password (RemminaFile *remminafile)
 
gchar * remmina_file_get_datetime (RemminaFile *remminafile)
 Return the string date of the last time a file has been modified. More...
 
void remmina_file_touch (RemminaFile *remminafile)
 Update the atime and mtime of a given filename. More...
 

Variables

static struct timespec times [2]
 

Function Documentation

◆ find_protocol_setting()

static const RemminaProtocolSetting* find_protocol_setting ( const gchar *  name,
RemminaProtocolPlugin protocol_plugin 
)
static

Definition at line 202 of file remmina_file.c.

◆ remmina_file_copy()

RemminaFile* remmina_file_copy ( const gchar *  filename)

Definition at line 189 of file remmina_file.c.

◆ remmina_file_delete()

void remmina_file_delete ( const gchar *  filename)

Definition at line 574 of file remmina_file.c.

◆ remmina_file_dup()

RemminaFile* remmina_file_dup ( RemminaFile remminafile)

Definition at line 529 of file remmina_file.c.

◆ remmina_file_dup_temp_protocol()

RemminaFile* remmina_file_dup_temp_protocol ( RemminaFile remminafile,
const gchar *  new_protocol 
)

Definition at line 562 of file remmina_file.c.

◆ remmina_file_free()

void remmina_file_free ( RemminaFile remminafile)

Definition at line 425 of file remmina_file.c.

◆ remmina_file_generate_filename()

void remmina_file_generate_filename ( RemminaFile remminafile)

functions we can use g_strstrip( string ) Removes leading and trailing whitespace from a string g_strdelimit (str, invalid_chars, '-')) Convert each invalid_chars in a hyphen g_ascii_strdown(string) all lowercase To be safe we should remove control characters as well (but I'm lazy) https://rosettacode.org/wiki/Strip_control_codes_and_extended_characters_from_a_string#C g_utf8_strncpy (gchar *dest, const gchar *src, gsize n); copies a given number of characters instead of a given number of bytes. The src string must be valid UTF-8 encoded text. g_utf8_validate (const gchar *str, gssize max_len, const gchar **end); Validates UTF-8 encoded text.

Definition at line 106 of file remmina_file.c.

◆ remmina_file_get_datetime()

gchar* remmina_file_get_datetime ( RemminaFile remminafile)

Return the string date of the last time a file has been modified.

This is used to return the modification date of a file and it’s used to return the modification date and time of a givwn remmina file. If it fails it will return "26/01/1976 23:30:00", that is just a date to don't return an empty string (challenge: what was happened that day at that time?).

Returns
A date string in the form "%d/%m/%Y %H:%M:%S".
Todo:
This should be moved to remmina_utils.c

Definition at line 642 of file remmina_file.c.

◆ remmina_file_get_filename()

const gchar* remmina_file_get_filename ( RemminaFile remminafile)

Definition at line 182 of file remmina_file.c.

◆ remmina_file_get_icon_name()

const gchar* remmina_file_get_icon_name ( RemminaFile remminafile)

Definition at line 548 of file remmina_file.c.

◆ remmina_file_get_int()

gint remmina_file_get_int ( RemminaFile remminafile,
const gchar *  setting,
gint  default_value 
)

Definition at line 401 of file remmina_file.c.

◆ remmina_file_get_keyfile()

static GKeyFile* remmina_file_get_keyfile ( RemminaFile remminafile)
static

Definition at line 411 of file remmina_file.c.

◆ remmina_file_get_secret()

gchar* remmina_file_get_secret ( RemminaFile remminafile,
const gchar *  setting 
)

Definition at line 385 of file remmina_file.c.

◆ remmina_file_get_string()

const gchar* remmina_file_get_string ( RemminaFile remminafile,
const gchar *  setting 
)

Definition at line 350 of file remmina_file.c.

◆ remmina_file_load()

RemminaFile* remmina_file_load ( const gchar *  filename)

Definition at line 233 of file remmina_file.c.

◆ remmina_file_new()

RemminaFile* remmina_file_new ( void  )

Definition at line 88 of file remmina_file.c.

◆ remmina_file_new_empty()

static RemminaFile* remmina_file_new_empty ( void  )
static

Definition at line 72 of file remmina_file.c.

◆ remmina_file_save()

void remmina_file_save ( RemminaFile remminafile)

Definition at line 438 of file remmina_file.c.

◆ remmina_file_set_filename()

void remmina_file_set_filename ( RemminaFile remminafile,
const gchar *  filename 
)

Definition at line 174 of file remmina_file.c.

◆ remmina_file_set_int()

void remmina_file_set_int ( RemminaFile remminafile,
const gchar *  setting,
gint  value 
)

Definition at line 395 of file remmina_file.c.

◆ remmina_file_set_string()

void remmina_file_set_string ( RemminaFile remminafile,
const gchar *  setting,
const gchar *  value 
)

Definition at line 324 of file remmina_file.c.

◆ remmina_file_set_string_ref()

void remmina_file_set_string_ref ( RemminaFile remminafile,
const gchar *  setting,
gchar *  value 
)

Definition at line 330 of file remmina_file.c.

◆ remmina_file_store_secret_plugin_password()

void remmina_file_store_secret_plugin_password ( RemminaFile remminafile,
const gchar *  key,
const gchar *  value 
)

Definition at line 510 of file remmina_file.c.

◆ remmina_file_touch()

void remmina_file_touch ( RemminaFile remminafile)

Update the atime and mtime of a given filename.

Function used to update the atime and mtime of a given remmina file, partially taken from suckless sbase

See also
https://git.suckless.org/sbase/tree/touch.c
Todo:
This should be moved to remmina_utils.c

Definition at line 692 of file remmina_file.c.

◆ remmina_file_unsave_password()

void remmina_file_unsave_password ( RemminaFile remminafile)

Definition at line 587 of file remmina_file.c.

Variable Documentation

◆ times

struct timespec times[2]
static

Definition at line 69 of file remmina_file.c.