heraia_io.c File Reference

Here I want to see everything that deals with I/O, files, disk and so on. More...

#include <libheraia.h>
Include dependency graph for heraia_io.c:

Go to the source code of this file.

Functions

static GtkBuilder * load_xml_if_it_exists (char *file_to_load)
gboolean load_file_to_analyse (heraia_struct_t *main_struct, gchar *filename)
 Loads the file 'filename' to analyse and populates the corresponfing structure 'main_struct' as needed thus main_struct and filename must NOT be NULL pointers.
static GtkBuilder * load_xml_if_it_exists (gchar *file_to_load)
 Checks if file_to_load exists and is valid and if possible, loads it in the xml structure.
GtkBuilder * load_xml_file (GList *location_list, gchar *filename)
 loads the GtkBuilder xml file ('filename') that describes an interface, tries all the paths defined in the location_list and put the definition in the 'xml' variable.
gboolean load_preference_file (prefs_t *prefs)
 Load the preference file from the disk.
gboolean save_preferences_to_file (prefs_t *prefs)
 Saves the preferences to the file preferences.

Detailed Description

Here I want to see everything that deals with I/O, files, disk and so on.

Definition in file heraia_io.c.


Function Documentation

gboolean load_file_to_analyse ( heraia_struct_t main_struct,
gchar *  filename 
)

Loads the file 'filename' to analyse and populates the corresponfing structure 'main_struct' as needed thus main_struct and filename must NOT be NULL pointers.

Parameters:
main_struct : main structure (it must not be NULL)
filename : filename of the file to load (it must not be NULL)
Returns:
TRUE if everything went ok, FALSE otherwise

Definition at line 40 of file heraia_io.c.

References add_new_tab_in_main_window(), grey_main_widgets(), heraia_hex_document_new(), doc_t::hex_widget, log_message(), xml_t::main, update_main_window_name(), and heraia_struct_t::xmls.

Referenced by load_mp_files_filenames(), main(), and on_open_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean load_preference_file ( prefs_t prefs  ) 

Load the preference file from the disk.

Parameters:
main_struct : main structure
Returns:
TRUE if everything went ok, FALSE otherwise

Definition at line 173 of file heraia_io.c.

References prefs_t::file, and prefs_t::filename.

Referenced by load_preferences().

Here is the caller graph for this function:

GtkBuilder* load_xml_file ( GList *  location_list,
gchar *  filename 
)

loads the GtkBuilder xml file ('filename') that describes an interface, tries all the paths defined in the location_list and put the definition in the 'xml' variable.

A frontend to load_xml_if_it_exists function

Parameters:
location_list : a Glist containing paths where we might found the file
filename : GtkBuilder filename that we want to load (possibly)
Returns:
returns the GtkBuilder XML structure if any, NULL otherwise

Definition at line 145 of file heraia_io.c.

References load_xml_if_it_exists().

Referenced by load_heraia_xml(), and load_plugin_xml().

Here is the call graph for this function:

Here is the caller graph for this function:

static GtkBuilder* load_xml_if_it_exists ( gchar *  file_to_load  )  [static]

Checks if file_to_load exists and is valid and if possible, loads it in the xml structure.

Parameters:
file_to_load : a filename of a possibly existing GtkBuilder file
Returns:
returns the GtkBuilder XML structure if any, NULL otherwise

Definition at line 107 of file heraia_io.c.

static GtkBuilder* load_xml_if_it_exists ( char *  file_to_load  )  [static]

Referenced by load_xml_file().

Here is the caller graph for this function:

gboolean save_preferences_to_file ( prefs_t prefs  ) 

Saves the preferences to the file preferences.

Parameters:
prefs : preferences (from prefs_t structure)
Returns:
TRUE if everything went ok, FALSE otherwise

Definition at line 191 of file heraia_io.c.

References prefs_t::file, and prefs_t::filename.

Referenced by save_preferences().

Here is the caller graph for this function:

Generated on Mon May 2 21:05:10 2011 for Heraia by  doxygen 1.6.3