Whole document tree
    

Whole document tree

CameraList

CameraList

Name

CameraList -- 

Description

Details

struct CameraList

struct CameraList {
	int  count;
	struct {
		char name  [128];
		char value [128];
	} entry [MAX_ENTRIES];
	int ref_count;
};


gp_list_new ()

int         gp_list_new                     (CameraList **list);

Creates a new CameraList.


gp_list_ref ()

int         gp_list_ref                     (CameraList *list);

Increments the reference count of the list.


gp_list_unref ()

int         gp_list_unref                   (CameraList *list);

Decrements the reference count of the list. If there are no references left, the list will be freed.


gp_list_free ()

int         gp_list_free                    (CameraList *list);

Frees the list. It is recommended to use gp_list_unref instead.


gp_list_count ()

int         gp_list_count                   (CameraList *list);

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 ()

int         gp_list_reset                   (CameraList *list);

Resets the list and removes all entries.


gp_list_sort ()

int         gp_list_sort                    (CameraList *list);

Sorts the list entries with respect to the names.