Config

Config — Configuration files

Synopsis

int                 flickcurl_config_read_ini           (flickcurl *fc,
                                                         const char *filename,
                                                         const char *section,
                                                         void *user_data,
                                                         set_config_var_handler handler);
void                flickcurl_config_var_handler        (void *userdata,
                                                         const char *key,
                                                         const char *value);
int                 flickcurl_config_write_ini          (flickcurl *fc,
                                                         const char *filename,
                                                         const char *section);

Description

Configuration files

Details

flickcurl_config_read_ini ()

int                 flickcurl_config_read_ini           (flickcurl *fc,
                                                         const char *filename,
                                                         const char *section,
                                                         void *user_data,
                                                         set_config_var_handler handler);

Read flickcurl library configuration in .INI format from a filename

fc :

flickcurl config

filename :

filename

section :

section name to use

user_data :

user data pointer for handler (usually the fc )

handler :

config variable handler function (usually flickcurl_config_var_handler() )

Returns :

non-0 on failure

flickcurl_config_var_handler ()

void                flickcurl_config_var_handler        (void *userdata,
                                                         const char *key,
                                                         const char *value);

Standard handler for flickcurl_config_read_ini()

userdata :

user data pointing to flickcurl object

key :

var key

value :

var value

flickcurl_config_write_ini ()

int                 flickcurl_config_write_ini          (flickcurl *fc,
                                                         const char *filename,
                                                         const char *section);

Write flickcurl library configuration in INI file format to the given file

fc :

flickcurl object

filename :

filename

section :

section name to use

Returns :

non-0 on failure