libgphoto2 photo camera library (libgphoto2) API  2.5.10.1
gphoto2-setting.c File Reference
#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>
Include dependency graph for gphoto2-setting.c:

Data Structures

struct  Setting
 

Macros

#define _BSD_SOURCE
 
#define CHECK_RESULT(result)    {int r = (result); if (r < 0) return (r);}
 

Functions

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...
 

Detailed Description

Author
Copyright 2000 Scott Fritzinger
License
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Function Documentation

int gp_setting_get ( char *  id,
char *  key,
char *  value 
)

Retrieve a specific gphoto setting.

Parameters
idthe frontend id of the caller
keythe key the frontend queries
valueretrieved value
Returns
GPhoto error code

This function retrieves the setting key for a specific frontend id and copies the value into the passed value pointer.

References GP_ERROR, and GP_OK.

Referenced by gp_filesystem_get_info().

int gp_setting_set ( char *  id,
char *  key,
char *  value 
)

Set a specific gphoto setting.

Parameters
idthe frontend id of the caller
keythe key the frontend queries
valueretrieved value
Returns
GPhoto error code

This function sets the setting key for a specific frontend id to the value.

References GP_ERROR, GP_OK, and gp_system_mkdir().

Referenced by gp_filesystem_get_info().