libgphoto2 photo camera library (libgphoto2) Internals
2.5.26
|
#include "config.h"
#include <gphoto2/gphoto2-setting.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gphoto2/gphoto2-result.h>
#include <gphoto2/gphoto2-port-log.h>
#include <gphoto2/gphoto2-port-portability.h>
Go to the source code of this file.
Data Structures | |
struct | Setting |
Macros | |
#define | _DEFAULT_SOURCE |
#define | CHECK_RESULT(result) {int r = (result); if (r < 0) return (r);} |
Functions | |
static int | save_settings (void) |
static int | load_settings (void) |
int | gp_setting_get (char *id, char *key, char *value) |
Retrieve a specific gphoto setting. More... | |
int | gp_setting_set (char *id, char *key, char *value) |
Set a specific gphoto setting. More... | |
static int | verify_settings (char *settings_file) |
Variables | |
static int | glob_setting_count = 0 |
static Setting | glob_setting [512] |
Definition in file gphoto2-setting.c.
#define _DEFAULT_SOURCE |
Definition at line 24 of file gphoto2-setting.c.
Definition at line 60 of file gphoto2-setting.c.
int gp_setting_get | ( | char * | id, |
char * | key, | ||
char * | value | ||
) |
Retrieve a specific gphoto setting.
id | the frontend id of the caller |
key | the key the frontend queries |
value | changed value |
This function retrieves the setting key for a specific frontend id and copies the value into the passed value pointer.
Definition at line 75 of file gphoto2-setting.c.
References glob_setting, glob_setting_count, GP_ERROR, GP_OK, and load_settings().
Referenced by gp_filesystem_lru_update().
int gp_setting_set | ( | char * | id, |
char * | key, | ||
char * | value | ||
) |
Set a specific gphoto setting.
id | the frontend id of the caller |
key | the key the frontend queries |
value | new value |
This function sets the setting key for a specific frontend id to the value.
Definition at line 107 of file gphoto2-setting.c.
References glob_setting, glob_setting_count, GP_OK, load_settings(), and save_settings().
Referenced by gp_filesystem_lru_update().
|
static |
Definition at line 172 of file gphoto2-setting.c.
References glob_setting, glob_setting_count, GP_ERROR, GP_OK, gp_system_mkdir(), and verify_settings().
Referenced by gp_setting_get(), and gp_setting_set().
|
static |
Definition at line 229 of file gphoto2-setting.c.
References glob_setting, glob_setting_count, and GP_OK.
Referenced by gp_setting_set().
|
static |
Definition at line 135 of file gphoto2-setting.c.
References GP_ERROR, and GP_OK.
Referenced by load_settings().
|
static |
Definition at line 56 of file gphoto2-setting.c.
Referenced by gp_setting_get(), gp_setting_set(), load_settings(), and save_settings().
|
static |
Definition at line 55 of file gphoto2-setting.c.
Referenced by gp_setting_get(), gp_setting_set(), load_settings(), and save_settings().