libgphoto2 photo camera library (libgphoto2) Internals
2.5.23
|
Go to the documentation of this file.
24 #define _DEFAULT_SOURCE
36 #define CHECK_RESULT(result) {int r = (result); if (r < 0) return (r);}
67 C_MEM (*list = calloc (1,
sizeof (
CameraList)));
69 (*list)->ref_count = 1;
125 for (i=0;i<list->
used;i++) {
153 for (i=0;i<list->
used;i++) {
199 const struct _entry *ca = a;
200 const struct _entry *cb = b;
258 for (i=list->
used-1; i >= 0; i--) {
284 C_PARAMS (0 <= index && index < list->used);
305 C_PARAMS (0 <= index && index < list->used);
327 C_PARAMS (0 <= index && index < list->used);
329 C_MEM (newval = strdup(
value));
350 C_PARAMS (0 <= index && index < list->used);
352 C_MEM (newname = strdup(
name));
382 for (x = 0; x < count; x++) {
383 snprintf (buf,
sizeof (buf), format, x + 1);
int gp_list_ref(CameraList *list)
Increments the reference count of the list.
int gp_list_get_name(CameraList *list, int index, const char **name)
static int cmp_list(const void *a, const void *b)
int gp_list_populate(CameraList *list, const char *format, int count)
int gp_list_count(CameraList *list)
int gp_list_reset(CameraList *list)
int gp_list_get_value(CameraList *list, int index, const char **value)
int gp_list_free(CameraList *list)
int gp_list_append(CameraList *list, const char *name, const char *value)
int gp_list_set_name(CameraList *list, int index, const char *name)
int gp_list_find_by_name(CameraList *list, int *index, const char *name)
#define GP_OK
Everything is OK.
#define CHECK_RESULT(result)
int gp_list_sort(CameraList *list)
#define GP_ERROR
Generic Error.
int gp_list_new(CameraList **list)
Creates a new CameraList.
int gp_list_unref(CameraList *list)
Decrements the reference count of the list.
int gp_list_set_value(CameraList *list, int index, const char *value)