ekg2  GIT master
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje Grupay Strony
Funkcje | Zmienne
Dokumentacja pliku configfile.c
#include "ekg2.h"
#include <glib/gstdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "internal.h"

Funkcje

static char * strip_quotes (char *line)
 
void config_postread ()
 
gboolean ekg_fprintf (GOutputStream *f, const gchar *format,...)
 
static GObject * config_open_real (const gchar *path, const gchar *mode)
 
static const char * prepare_old_path (const char *filename)
 
GObject * config_open (const gchar *path_format, const gchar *mode,...)
 
gboolean config_commit (void)
 
int config_read_plugins ()
 
int config_read (const gchar *plugin_name)
 
static void config_write_variable (GOutputStream *f, variable_t *v)
 
static void config_write_plugins (GOutputStream *f)
 
static void config_write_main (GOutputStream *f)
 
void config_write ()
 
int config_write_partly (plugin_t *plugin, const char **vars)
 
void debug_write_crash ()
 

Zmienne

static GPtrArray * config_openfiles = NULL
 
static GCancellable * config_cancellable = NULL
 

Dokumentacja funkcji

gboolean config_commit ( void  )

config_commit()

Close all configuration files open for writing, and commit changes to them if written successfully. Otherwise, just leave old files intact.

Zwraca
TRUE if new config was saved, FALSE otherwise.
GObject* config_open ( const gchar *  path_format,
const gchar *  mode,
  ... 
)

config_open()

Open a configuration file, formatting the name if necessary. Choose correct location and file encoding.

Parametry
path_format- format string for file name. Should be utf8-encoded.
mode- string mode for opening the file (r or w).
Zwraca
Open GIOChannel or NULL if open failed. The GIOChannel instance must be unrefed using g_object_unref().
static GObject* config_open_real ( const gchar *  path,
const gchar *  mode 
)
static
void config_postread ( )
int config_read ( const gchar *  plugin_name)
int config_read_plugins ( )
void config_write ( )
static void config_write_main ( GOutputStream *  f)
static
int config_write_partly ( plugin_t plugin,
const char **  vars 
)
static void config_write_plugins ( GOutputStream *  f)
static
static void config_write_variable ( GOutputStream *  f,
variable_t v 
)
static
void debug_write_crash ( )
gboolean ekg_fprintf ( GOutputStream *  f,
const gchar *  format,
  ... 
)

ekg_fprintf()

Output formatted string to a GOutputStream.

Parametry
f- writable GOutputStream.
format- the format string.
Zwraca
TRUE on success, FALSE otherwise.
Nota
The channel must be open for writing in blocking mode.
static const char* prepare_old_path ( const char *  filename)
static
static char* strip_quotes ( char *  line)
static

Dokumentacja zmiennych

GCancellable* config_cancellable = NULL
static
GPtrArray* config_openfiles = NULL
static