#include "config.h"
#include <gphoto2/gphoto2-list.h>
#include <gphoto2/gphoto2-port-log.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gphoto2/gphoto2-result.h>
Include dependency graph for gphoto2-list.c:
Defines | |
#define | CHECK_NULL(r) {if (!(r)) return (GP_ERROR_BAD_PARAMETERS);} |
#define | CHECK_RESULT(result) {int r = (result); if (r < 0) return (r);} |
#define | CHECK_LIST(list) |
#define | CAMERALIST_STRUCT_COMPATIBILITY |
#define | MAX_ENTRIES 1024 |
#define | CHECK_INDEX_RANGE(list, index) |
Functions | |
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_reset (CameraList *list) |
int | gp_list_append (CameraList *list, const char *name, const char *value) |
int | gp_list_sort (CameraList *list) |
int | gp_list_count (CameraList *list) |
int | gp_list_find_by_name (CameraList *list, int *index, const char *name) |
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_set_value (CameraList *list, int index, const char *value) |
int | gp_list_set_name (CameraList *list, int index, const char *name) |
int | gp_list_populate (CameraList *list, const char *format, int count) |
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Whether to preserve binary compatibility for structure internals. FIXME: Find out whether any libgphoto2 frontend relies on those internals. |
|
Value: do { \ if (index < 0 || index >= list->count) { \ return (GP_ERROR_BAD_PARAMETERS); \ } \ } while (0) |
|
Value: do { \ if (NULL == list) { \ return (GP_ERROR_BAD_PARAMETERS); \ } else if (list->ref_count == 0) { \ /* catch calls to already freed list */ \ return (GP_ERROR_BAD_PARAMETERS); \ } \ } while (0) |
|
Internal _CameraList data structure |
|
Appends
|
|
Counts the entries in the
|
|
Retrieves the
|
|
Frees the
|
|
Retrieves the
|
|
Retrieves the value of entry with
|
|
Creates a new #CameraList.
|
|
Adds
|
|
Increments the reference count of the .
|
|
Resets the
|
|
Sets the name of an entry.
|
|
Sets the
|
|
Sorts the
|
|
Decrements the reference count of the
list will be freed. |