Whole document tree
CameraList
Synopsis
struct CameraList ;
int gp_list_new (CameraList **list);
int gp_list_ref (CameraList *list);
int gp_list_unref (CameraList *list);
int gp_list_free (CameraList *list);
int gp_list_count (CameraList *list);
int gp_list_set_name (CameraList *list,
int index,
const char *name);
int gp_list_set_value (CameraList *list,
int index,
const char *value);
int gp_list_get_name (CameraList *list,
int index,
const char **name);
int gp_list_get_value (CameraList *list,
int index,
const char **value);
int gp_list_append (CameraList *list,
const char *name,
const char *value);
int gp_list_populate (CameraList *list,
const char *format,
int count);
int gp_list_reset (CameraList *list);
int gp_list_sort (CameraList *list);
Details struct CameraListstruct CameraList {
int count;
struct {
char name [128];
char value [128];
} entry [MAX_ENTRIES];
int ref_count;
};
gp_list_ref ()Increments the reference count of the list .
gp_list_unref ()Decrements the reference count of the list . If there are no references
left, the list will be freed.
gp_list_free ()Frees the list . It is recommended to use gp_list_unref instead.
gp_list_count ()Counts the entries in the list .
gp_list_set_name ()int gp_list_set_name (CameraList *list,
int index,
const char *name);
Sets the name of an entry.
gp_list_set_value ()int gp_list_set_value (CameraList *list,
int index,
const char *value);
Sets the value of an entry.
gp_list_get_name ()int gp_list_get_name (CameraList *list,
int index,
const char **name);
Retrieves the name of entry with index .
gp_list_get_value ()int gp_list_get_value (CameraList *list,
int index,
const char **value);
Retrieves the value of entry with index .
gp_list_append ()int gp_list_append (CameraList *list,
const char *name,
const char *value);
Appends name and value to the list .
gp_list_populate ()int gp_list_populate (CameraList *list,
const char *format,
int count);
Adds count entries to the list. Typically, this function is called by
a camera driver when there is no way of retrieving the real name of a
picture. In this case, when asked for a file list
(see CameraFilesystemListFunc ), the list is populated with dummy
names generated by this function.
gp_list_reset ()Resets the list and removes all entries.
gp_list_sort ()Sorts the list entries with respect to the names.