Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

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 retrieved value
GPhoto error code
This function retrieves the setting key for a specific frontend id and copies the value into the passed value pointer.

Definition at line 70 of file gphoto2-setting.c.

References CHECK_NULL, GP_ERROR, and GP_OK.

        int x;

      CHECK_NULL (id && key);

      if (!glob_setting_count)
            load_settings ();

        for (x=0; x<glob_setting_count; x++) {
                if ((strcmp(glob_setting[x].id, id)==0) &&
                (strcmp(glob_setting[x].key, key)==0)) {
                        strcpy(value, glob_setting[x].value);
                        return (GP_OK);
        strcpy(value, "");

Generated by  Doxygen 1.6.0   Back to index