libgphoto2 photo camera library (libgphoto2) API  2.5.24
gphoto2-endian.h
1 /* This file is generated automatically by configure */
2 /* It is valid only for the system type x86_64-slackware-linux-gnu */
3 
4 #ifndef __BYTEORDER_H
5 #define __BYTEORDER_H
6 
7 /* ntohl and relatives live here */
8 #include <arpa/inet.h>
9 #define __HAVE_NTOHL
10 
11 /* Define generic byte swapping functions */
12 #include <byteswap.h>
13 #define swap16(x) bswap_16(x)
14 #define swap32(x) bswap_32(x)
15 #define swap64(x) bswap_64(x)
16 
17 /* The byte swapping macros have the form: */
18 /* EENN[a]toh or htoEENN[a] where EE is be (big endian) or */
19 /* le (little-endian), NN is 16 or 32 (number of bits) and a, */
20 /* if present, indicates that the endian side is a pointer to an */
21 /* array of uint8_t bytes instead of an integer of the specified length. */
22 /* h refers to the host's ordering method. */
23 
24 /* So, to convert a 32-bit integer stored in a buffer in little-endian */
25 /* format into a uint32_t usable on this machine, you could use: */
26 /* uint32_t value = le32atoh(&buf[3]); */
27 /* To put that value back into the buffer, you could use: */
28 /* htole32a(&buf[3], value); */
29 
30 /* Define aliases for the standard byte swapping macros */
31 /* Arguments to these macros must be properly aligned on natural word */
32 /* boundaries in order to work properly on all architectures */
33 #ifndef htobe16
34 # ifdef __HAVE_NTOHL
35 # define htobe16(x) htons(x)
36 # else
37 # ifdef WORDS_BIGENDIAN
38 # define htobe16(x) (x)
39 # else
40 # define htobe16(x) swap16(x)
41 # endif
42 # endif
43 #endif
44 #ifndef htobe32
45 # ifdef __HAVE_NTOHL
46 # define htobe32(x) htonl(x)
47 # else
48 # ifdef WORDS_BIGENDIAN
49 # define htobe32(x) (x)
50 # else
51 # define htobe32(x) swap32(x)
52 # endif
53 # endif
54 #endif
55 #ifndef be16toh
56 # define be16toh(x) htobe16(x)
57 #endif
58 #ifndef be32toh
59 # define be32toh(x) htobe32(x)
60 #endif
61 
62 #define HTOBE16(x) (x) = htobe16(x)
63 #define HTOBE32(x) (x) = htobe32(x)
64 #define BE32TOH(x) (x) = be32toh(x)
65 #define BE16TOH(x) (x) = be16toh(x)
66 
67 /* On little endian machines, these macros are null */
68 #ifndef htole16
69 # define htole16(x) (x)
70 #endif
71 #ifndef htole32
72 # define htole32(x) (x)
73 #endif
74 #ifndef htole64
75 # define htole64(x) (x)
76 #endif
77 #ifndef le16toh
78 # define le16toh(x) (x)
79 #endif
80 #ifndef le32toh
81 # define le32toh(x) (x)
82 #endif
83 #ifndef le64toh
84 # define le64toh(x) (x)
85 #endif
86 
87 #define HTOLE16(x) (void) (x)
88 #define HTOLE32(x) (void) (x)
89 #define HTOLE64(x) (void) (x)
90 #define LE16TOH(x) (void) (x)
91 #define LE32TOH(x) (void) (x)
92 #define LE64TOH(x) (void) (x)
93 
94 /* These don't have standard aliases */
95 #ifndef htobe64
96 # define htobe64(x) swap64(x)
97 #endif
98 #ifndef be64toh
99 # define be64toh(x) swap64(x)
100 #endif
101 
102 #define HTOBE64(x) (x) = htobe64(x)
103 #define BE64TOH(x) (x) = be64toh(x)
104 
105 /* Define the C99 standard length-specific integer types */
106 #include <_stdint.h>
107 
108 /* Here are some macros to create integers from a byte array */
109 /* These are used to get and put integers from/into a uint8_t array */
110 /* with a specific endianness. This is the most portable way to generate */
111 /* and read messages to a network or serial device. Each member of a */
112 /* packet structure must be handled separately. */
113 
114 /* Non-optimized but portable macros */
115 #define be16atoh(x) ((uint16_t)(((x)[0]<<8)|(x)[1]))
116 #define be32atoh(x) ((uint32_t)(((x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3]))
117 #define be64atoh_x(x,off,shift) (((uint64_t)((x)[off]))<<shift)
118 #define be64atoh(x) ((uint64_t)(be64atoh_x(x,0,56)|be64atoh_x(x,1,48)|be64atoh_x(x,2,40)| \
119  be64atoh_x(x,3,32)|be64atoh_x(x,4,24)|be64atoh_x(x,5,16)|be64atoh_x(x,6,8)|((x)[7])))
120 #define le16atoh(x) ((uint16_t)(((x)[1]<<8)|(x)[0]))
121 #define le32atoh(x) ((uint32_t)(((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
122 #define le64atoh_x(x,off,shift) (((uint64_t)(x)[off])<<shift)
123 #define le64atoh(x) ((uint64_t)(le64atoh_x(x,7,56)|le64atoh_x(x,6,48)|le64atoh_x(x,5,40)| \
124  le64atoh_x(x,4,32)|le64atoh_x(x,3,24)|le64atoh_x(x,2,16)|le64atoh_x(x,1,8)|((x)[0])))
125 
126 #define htobe16a(a,x) (a)[0]=(uint8_t)((x)>>8), (a)[1]=(uint8_t)(x)
127 #define htobe32a(a,x) (a)[0]=(uint8_t)((x)>>24), (a)[1]=(uint8_t)((x)>>16), \
128  (a)[2]=(uint8_t)((x)>>8), (a)[3]=(uint8_t)(x)
129 #define htobe64a(a,x) (a)[0]=(uint8_t)((x)>>56), (a)[1]=(uint8_t)((x)>>48), \
130  (a)[2]=(uint8_t)((x)>>40), (a)[3]=(uint8_t)((x)>>32), \
131  (a)[4]=(uint8_t)((x)>>24), (a)[5]=(uint8_t)((x)>>16), \
132  (a)[6]=(uint8_t)((x)>>8), (a)[7]=(uint8_t)(x)
133 #define htole16a(a,x) (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
134 #define htole32a(a,x) (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \
135  (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
136 #define htole64a(a,x) (a)[7]=(uint8_t)((x)>>56), (a)[6]=(uint8_t)((x)>>48), \
137  (a)[5]=(uint8_t)((x)>>40), (a)[4]=(uint8_t)((x)>>32), \
138  (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \
139  (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
140 
141 #endif /*__BYTEORDER_H*/
gp_file_unref
int gp_file_unref(CameraFile *file)
Decrease reference counter for CameraFile object.
Definition: gphoto2-file.c:184
gp_abilities_list_detect
int gp_abilities_list_detect(CameraAbilitiesList *list, GPPortInfoList *info_list, CameraList *l, GPContext *context)
Definition: gphoto2-abilities-list.c:400
gp_camera_file_read
int gp_camera_file_read(Camera *camera, const char *folder, const char *file, CameraFileType type, uint64_t offset, char *buf, uint64_t *size, GPContext *context)
Definition: gphoto2-camera.c:1714
CameraAbilities
Describes the properties of a specific camera.
Definition: gphoto2-abilities-list.h:120
GP_OPERATION_CAPTURE_PREVIEW
@ GP_OPERATION_CAPTURE_PREVIEW
Definition: gphoto2-abilities-list.h:66
_GPPortInfo
Definition: gphoto2-port-info.h:32
gp_camera_capture_preview
int gp_camera_capture_preview(Camera *camera, CameraFile *file, GPContext *context)
Definition: gphoto2-camera.c:1388
gp_port_info_get_path
int gp_port_info_get_path(GPPortInfo info, char **path)
Get path of a specific port entry.
Definition: gphoto2-port-info-list.c:523
gp_widget_set_value
int gp_widget_set_value(CameraWidget *widget, const void *value)
Sets the value of the widget.
Definition: gphoto2-widget.c:384
_CameraPrivateCore
Definition: gphoto2-camera.c:219
gp_port_get_info
int gp_port_get_info(GPPort *port, GPPortInfo *info)
Retreives information about the port.
Definition: gphoto2-port.c:255
gp_camera_folder_remove_dir
int gp_camera_folder_remove_dir(Camera *camera, const char *folder, const char *name, GPContext *context)
Definition: gphoto2-camera.c:1802
gp_camera_set_port_speed
int gp_camera_set_port_speed(Camera *camera, int speed)
Definition: gphoto2-camera.c:456
gp_file_new
int gp_file_new(CameraFile **file)
Definition: gphoto2-file.c:83
gp_camera_ref
int gp_camera_ref(Camera *camera)
Definition: gphoto2-camera.c:507
gp_widget_count_children
int gp_widget_count_children(CameraWidget *widget)
Counts the children of the CameraWidget.
Definition: gphoto2-widget.c:529
GP_FOLDER_OPERATION_NONE
@ GP_FOLDER_OPERATION_NONE
Definition: gphoto2-abilities-list.h:87
gp_context_new
GPContext * gp_context_new(void)
Creates a new context.
Definition: gphoto2-context.c:74
gp_port_get_settings
int gp_port_get_settings(GPPort *port, GPPortSettings *settings)
Get the current port settings.
Definition: gphoto2-port.c:632
GP_OPERATION_CAPTURE_IMAGE
@ GP_OPERATION_CAPTURE_IMAGE
Definition: gphoto2-abilities-list.h:63
CameraAbilities::model
char model[128]
name of camera model
Definition: gphoto2-abilities-list.h:121
GP_FILE_OPERATION_AUDIO
@ GP_FILE_OPERATION_AUDIO
Definition: gphoto2-abilities-list.h:79
GP_FOLDER_OPERATION_DELETE_ALL
@ GP_FOLDER_OPERATION_DELETE_ALL
Definition: gphoto2-abilities-list.h:88
_CameraFunctions::set_single_config
CameraSetSingleConfigFunc set_single_config
Called for setting a single configuration widget.
Definition: gphoto2-camera.h:297
CameraAbilities::usb_vendor
int usb_vendor
USB Vendor D.
Definition: gphoto2-abilities-list.h:134
gp_camera_file_delete
int gp_camera_file_delete(Camera *camera, const char *folder, const char *file, GPContext *context)
Definition: gphoto2-camera.c:1752
gp_filesystem_get_info
int gp_filesystem_get_info(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo *info, GPContext *context)
Get information about the specified file.
Definition: gphoto2-filesys.c:1858
gp_abilities_list_append
int gp_abilities_list_append(CameraAbilitiesList *list, CameraAbilities abilities)
Append the abilities to the list.
Definition: gphoto2-abilities-list.c:510
_GPPortInfoList
Definition: gphoto2-port-info-list.c:74
gp_list_get_name
int gp_list_get_name(CameraList *list, int index, const char **name)
Definition: gphoto2-list.c:280
gp_abilities_list_lookup_model
int gp_abilities_list_lookup_model(CameraAbilitiesList *list, const char *model)
Search the list for an entry of given model name.
Definition: gphoto2-abilities-list.c:607
gp_filesystem_make_dir
int gp_filesystem_make_dir(CameraFilesystem *fs, const char *folder, const char *name, GPContext *context)
Create a subfolder within a folder.
Definition: gphoto2-filesys.c:1184
GP_ERROR_FILE_NOT_FOUND
#define GP_ERROR_FILE_NOT_FOUND
Specified file was not found.
Definition: gphoto2-result.h:75
gp_camera_get_storageinfo
int gp_camera_get_storageinfo(Camera *camera, CameraStorageInformation **sifs, int *nrofsifs, GPContext *context)
Gets information on the camera attached storage.
Definition: gphoto2-camera.c:1837
GP_DRIVER_STATUS_DEPRECATED
@ GP_DRIVER_STATUS_DEPRECATED
Definition: gphoto2-abilities-list.h:45
CameraWidgetType
CameraWidgetType
Type of the widget to be created.
Definition: gphoto2-widget.h:54
_CameraFunctions::trigger_capture
CameraTriggerCaptureFunc trigger_capture
Remote control the camera to trigger capture.
Definition: gphoto2-camera.h:301
gp_port_info_list_lookup_path
int gp_port_info_list_lookup_path(GPPortInfoList *list, const char *path)
Lookup a specific path in the list.
Definition: gphoto2-port-info-list.c:336
gp_port_new
int gp_port_new(GPPort **port)
Create new GPPort.
Definition: gphoto2-port.c:94
GP_ERROR_UNKNOWN_PORT
#define GP_ERROR_UNKNOWN_PORT
Unknown libgphoto2 port passed.
Definition: gphoto2-port-result.h:50
gp_abilities_list_load
int gp_abilities_list_load(CameraAbilitiesList *list, GPContext *context)
Scans the system for camera drivers.
Definition: gphoto2-abilities-list.c:302
gp_port_set_info
int gp_port_set_info(GPPort *port, GPPortInfo info)
Configure a port.
Definition: gphoto2-port.c:149
CameraFile
File structure.
GP_FILE_INFO_TYPE
@ GP_FILE_INFO_TYPE
The MIME type is set.
Definition: gphoto2-filesys.h:57
_CameraFunctions::get_config
CameraGetConfigFunc get_config
Called for requesting the configuration widgets.
Definition: gphoto2-camera.h:292
gp_camera_set_timeout_funcs
void gp_camera_set_timeout_funcs(Camera *camera, CameraTimeoutStartFunc start_func, CameraTimeoutStopFunc stop_func, void *data)
Definition: gphoto2-camera.c:1867
gp_list_count
int gp_list_count(CameraList *list)
Definition: gphoto2-list.c:229
gp_port_set_settings
int gp_port_set_settings(GPPort *port, GPPortSettings settings)
Set port settings.
Definition: gphoto2-port.c:590
gp_camera_file_get_info
int gp_camera_file_get_info(Camera *camera, const char *folder, const char *file, CameraFileInfo *info, GPContext *context)
Definition: gphoto2-camera.c:1578
gp_context_cancel
GPContextFeedback gp_context_cancel(GPContext *context)
Definition: gphoto2-context.c:323
CameraAbilities::usb_product
int usb_product
USB Product ID.
Definition: gphoto2-abilities-list.h:135
gp_filesystem_reset
int gp_filesystem_reset(CameraFilesystem *fs)
Clear the filesystem.
Definition: gphoto2-filesys.c:631
GP_FILE_TYPE_PREVIEW
@ GP_FILE_TYPE_PREVIEW
Definition: gphoto2-file.h:74
_CameraFunctions::capture_preview
CameraCapturePreviewFunc capture_preview
Preview viewfinder content.
Definition: gphoto2-camera.h:302
gp_port_info_list_load
int gp_port_info_list_load(GPPortInfoList *list)
Load system ports.
Definition: gphoto2-port-info-list.c:274
CameraAbilities::library
char library[1024]
(Internal) library filename
Definition: gphoto2-abilities-list.h:141
gp_list_reset
int gp_list_reset(CameraList *list)
Definition: gphoto2-list.c:148
gp_widget_set_name
int gp_widget_set_name(CameraWidget *widget, const char *name)
Sets the name of the widget.
Definition: gphoto2-widget.c:250
GP_ERROR_NO_MEMORY
#define GP_ERROR_NO_MEMORY
Out of memory.
Definition: gphoto2-port-result.h:42
gp_camera_set_single_config
int gp_camera_set_single_config(Camera *camera, const char *name, CameraWidget *widget, GPContext *context)
Definition: gphoto2-camera.c:1134
gp_context_unref
void gp_context_unref(GPContext *context)
Decrements reference count of a context.
Definition: gphoto2-context.c:115
_CameraFunctions::capture
CameraCaptureFunc capture
Remote control the camera to capture.
Definition: gphoto2-camera.h:300
gp_context_question
GPContextFeedback gp_context_question(GPContext *context, const char *format,...)
Ask frontend user a question.
Definition: gphoto2-context.c:291
CameraFileType
CameraFileType
The type of view on the specified file.
Definition: gphoto2-file.h:73
gp_file_get_data_and_size
int gp_file_get_data_and_size(CameraFile *file, const char **data, unsigned long int *size)
Definition: gphoto2-file.c:398
gp_list_get_value
int gp_list_get_value(CameraList *list, int index, const char **value)
Definition: gphoto2-list.c:301
gp_port_usb_find_device
int gp_port_usb_find_device(GPPort *port, int idvendor, int idproduct)
Find USB device by vendor/product.
Definition: gphoto2-port.c:790
gp_file_set_name
int gp_file_set_name(CameraFile *file, const char *name)
Definition: gphoto2-file.c:996
gp_list_free
int gp_list_free(CameraList *list)
Definition: gphoto2-list.c:120
gp_context_progress_start
unsigned int gp_context_progress_start(GPContext *context, float target, const char *format,...)
Start progress tracking.
Definition: gphoto2-context.c:155
gp_port_open
int gp_port_open(GPPort *port)
Open a port.
Definition: gphoto2-port.c:273
GP_DRIVER_STATUS_PRODUCTION
@ GP_DRIVER_STATUS_PRODUCTION
Definition: gphoto2-abilities-list.h:42
GP_FOLDER_OPERATION_PUT_FILE
@ GP_FOLDER_OPERATION_PUT_FILE
Definition: gphoto2-abilities-list.h:89
gp_filesystem_set_info
int gp_filesystem_set_info(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo info, GPContext *context)
Set information about a file.
Definition: gphoto2-filesys.c:2368
GP_ERROR_MODEL_NOT_FOUND
#define GP_ERROR_MODEL_NOT_FOUND
Specified camera model was not found.
Definition: gphoto2-result.h:59
GP_OPERATION_CONFIG
@ GP_OPERATION_CONFIG
Definition: gphoto2-abilities-list.h:67
gp_camera_new
int gp_camera_new(Camera **camera)
Definition: gphoto2-camera.c:317
gp_camera_get_port_speed
int gp_camera_get_port_speed(Camera *camera)
Definition: gphoto2-camera.c:491
gp_filesystem_delete_file
int gp_filesystem_delete_file(CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
Delete a file from a folder.
Definition: gphoto2-filesys.c:1114
gp_port_free
int gp_port_free(GPPort *port)
Free the port structure.
Definition: gphoto2-port.c:341
gp_port_info_list_get_info
int gp_port_info_list_get_info(GPPortInfoList *list, int n, GPPortInfo *info)
Get port information of specific entry.
Definition: gphoto2-port-info-list.c:460
GP_FILE_OPERATION_RAW
@ GP_FILE_OPERATION_RAW
Definition: gphoto2-abilities-list.h:78
_CameraFileInfoPreview::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:113
CameraLibraryInitFunc
int(* CameraLibraryInitFunc)(Camera *camera, GPContext *context)
Initializes the camera.
Definition: gphoto2-library.h:65
_GPPort
The GPhoto port structure.
Definition: gphoto2-port.h:143
gp_filesystem_free
int gp_filesystem_free(CameraFilesystem *fs)
Free filesystem struct.
Definition: gphoto2-filesys.c:690
GP_FILE_TYPE_NORMAL
@ GP_FILE_TYPE_NORMAL
Definition: gphoto2-file.h:75
_Camera
Definition: gphoto2-camera.h:325
_CameraFunctions::wait_for_event
CameraWaitForEvent wait_for_event
Wait for a specific event from the camera.
Definition: gphoto2-camera.h:310
gp_list_append
int gp_list_append(CameraList *list, const char *name, const char *value)
Definition: gphoto2-list.c:174
_CameraFileInfoFile::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:96
gp_widget_get_choice
int gp_widget_get_choice(CameraWidget *widget, int choice_number, const char **choice)
Retrieves the choice number choice_number.
Definition: gphoto2-widget.c:799
gp_widget_get_value
int gp_widget_get_value(CameraWidget *widget, void *value)
Retrieves the value of the CameraWidget.
Definition: gphoto2-widget.c:434
_GPPortSettings::serial
GPPortSettingsSerial serial
Serial specific settings.
Definition: gphoto2-port.h:115
gp_camera_folder_make_dir
int gp_camera_folder_make_dir(Camera *camera, const char *folder, const char *name, GPContext *context)
Definition: gphoto2-camera.c:1778
gp_filesystem_put_file
int gp_filesystem_put_file(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, GPContext *context)
Upload a file to a folder on the device filesystem.
Definition: gphoto2-filesys.c:1293
CameraAbilities::id
char id[1024]
(Internal) camera ID name
Definition: gphoto2-abilities-list.h:142
gphoto2-result.h
GP_FILE_OPERATION_EXIF
@ GP_FILE_OPERATION_EXIF
Definition: gphoto2-abilities-list.h:80
gp_widget_add_choice
int gp_widget_add_choice(CameraWidget *widget, const char *choice)
Adds a choice to the CameraWidget.
Definition: gphoto2-widget.c:760
_CameraFunctions::get_single_config
CameraGetSingleConfigFunc get_single_config
Called for requesteing a single widget.
Definition: gphoto2-camera.h:296
gp_camera_get_abilities
int gp_camera_get_abilities(Camera *camera, CameraAbilities *abilities)
Definition: gphoto2-camera.c:396
gp_abilities_list_new
int gp_abilities_list_new(CameraAbilitiesList **list)
Allocate the memory for a new abilities list.
Definition: gphoto2-abilities-list.c:101
gp_widget_get_type
int gp_widget_get_type(CameraWidget *widget, CameraWidgetType *type)
Retrieves the type of the CameraWidget.
Definition: gphoto2-widget.c:344
foreach_data_t
Definition: gphoto2-abilities-list.c:137
GP_WIDGET_DATE
@ GP_WIDGET_DATE
Date entering widget.
Definition: gphoto2-widget.h:65
CameraLibraryAbilitiesFunc
int(* CameraLibraryAbilitiesFunc)(CameraAbilitiesList *list)
Adds the abilities of the supported models to the supplied list.
Definition: gphoto2-library.h:51
GP_PORT_USB
@ GP_PORT_USB
USB port.
Definition: gphoto2-port-info-list.h:37
gp_camera_unref
int gp_camera_unref(Camera *camera)
Definition: gphoto2-camera.c:528
GP_ERROR_BAD_PARAMETERS
#define GP_ERROR_BAD_PARAMETERS
Bad parameters passed.
Definition: gphoto2-port-result.h:38
GP_PORT_USB_SCSI
@ GP_PORT_USB_SCSI
USB Mass Storage raw SCSI port.
Definition: gphoto2-port-info-list.h:41
gp_port_info_list_free
int gp_port_info_list_free(GPPortInfoList *list)
Free a GPPortInfo list.
Definition: gphoto2-port-info-list.c:135
_CameraWidget
Definition: gphoto2-widget.c:38
gp_filesystem_list_files
int gp_filesystem_list_files(CameraFilesystem *fs, const char *folder, CameraList *list, GPContext *context)
Get the list of files in a folder.
Definition: gphoto2-filesys.c:953
_CameraFileInfoPreview::size
uint64_t size
Size of the preview.
Definition: gphoto2-filesys.h:115
_CameraAbilitiesList
Definition: gphoto2-abilities-list.c:62
gp_filesystem_read_file
int gp_filesystem_read_file(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, uint64_t offset, char *buf, uint64_t *size, GPContext *context)
Get partial file data from the filesystem.
Definition: gphoto2-filesys.c:1768
GP_OK
#define GP_OK
Everything is OK.
Definition: gphoto2-port-result.h:30
gp_abilities_list_count
int gp_abilities_list_count(CameraAbilitiesList *list)
Count the entries in the supplied list.
Definition: gphoto2-abilities-list.c:560
_CameraFunctions::exit
CameraExitFunc exit
Function called on closing the camera.
Definition: gphoto2-camera.h:289
gp_abilities_list_reset
int gp_abilities_list_reset(CameraAbilitiesList *list)
Reset the list.
Definition: gphoto2-abilities-list.c:541
gp_camera_trigger_capture
int gp_camera_trigger_capture(Camera *camera, GPContext *context)
Definition: gphoto2-camera.c:1358
gp_camera_get_config
int gp_camera_get_config(Camera *camera, CameraWidget **window, GPContext *context)
Definition: gphoto2-camera.c:858
CameraEventType
CameraEventType
Specify what event we received from the camera.
Definition: gphoto2-camera.h:103
GP_DEVICE_AUDIO_PLAYER
@ GP_DEVICE_AUDIO_PLAYER
Definition: gphoto2-abilities-list.h:54
gp_port_close
int gp_port_close(GPPort *port)
Close a port.
Definition: gphoto2-port.c:297
gp_file_get_mime_type
int gp_file_get_mime_type(CameraFile *file, const char **mime_type)
Definition: gphoto2-file.c:979
GP_OPERATION_CAPTURE_AUDIO
@ GP_OPERATION_CAPTURE_AUDIO
Definition: gphoto2-abilities-list.h:65
GP_WIDGET_SECTION
@ GP_WIDGET_SECTION
Section widget (think Tab)
Definition: gphoto2-widget.h:58
gp_widget_count_choices
int gp_widget_count_choices(CameraWidget *widget)
Counts the choices of the CameraWidget.
Definition: gphoto2-widget.c:780
gp_camera_get_about
int gp_camera_get_about(Camera *camera, CameraText *about, GPContext *context)
Definition: gphoto2-camera.c:1294
gp_widget_set_readonly
int gp_widget_set_readonly(CameraWidget *widget, int readonly)
Tells that the widget is readonly.
Definition: gphoto2-widget.c:310
gp_camera_capture
int gp_camera_capture(Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context)
Definition: gphoto2-camera.c:1327
gp_camera_get_single_config
int gp_camera_get_single_config(Camera *camera, const char *name, CameraWidget **widget, GPContext *context)
Definition: gphoto2-camera.c:891
gp_widget_set_changed
int gp_widget_set_changed(CameraWidget *widget, int changed)
Tells that the widget has been changed.
Definition: gphoto2-widget.c:289
GP_FOLDER_OPERATION_MAKE_DIR
@ GP_FOLDER_OPERATION_MAKE_DIR
Definition: gphoto2-abilities-list.h:90
gp_file_clean
int gp_file_clean(CameraFile *file)
Definition: gphoto2-file.c:699
GP_FILE_OPERATION_DELETE
@ GP_FILE_OPERATION_DELETE
Definition: gphoto2-abilities-list.h:76
gp_widget_get_label
int gp_widget_get_label(CameraWidget *widget, const char **label)
Retrieves the label of the CameraWidget.
Definition: gphoto2-widget.c:361
gp_list_sort
int gp_list_sort(CameraList *list)
Definition: gphoto2-list.c:213
gp_widget_get_child
int gp_widget_get_child(CameraWidget *widget, int child_number, CameraWidget **child)
Retrieves the child number child_number of the parent.
Definition: gphoto2-widget.c:546
GP_WIDGET_TOGGLE
@ GP_WIDGET_TOGGLE
Toggle widget (think check box)
Definition: gphoto2-widget.h:61
GP_ERROR_IO_USB_FIND
#define GP_ERROR_IO_USB_FIND
Error when trying to find USB device.
Definition: gphoto2-port-result.h:106
gp_port_info_get_name
int gp_port_info_get_name(GPPortInfo info, char **name)
Get name of a specific port entry.
Definition: gphoto2-port-info-list.c:492
gp_camera_autodetect
int gp_camera_autodetect(CameraList *list, GPContext *context)
Definition: gphoto2-camera.c:618
gp_camera_stop_timeout
void gp_camera_stop_timeout(Camera *camera, unsigned int id)
Definition: gphoto2-camera.c:1934
GP_PORT_USB_DISK_DIRECT
@ GP_PORT_USB_DISK_DIRECT
Direct IO to an usb mass storage device.
Definition: gphoto2-port-info-list.h:40
gp_port_info_list_new
int gp_port_info_list_new(GPPortInfoList **list)
Create a new GPPortInfoList.
Definition: gphoto2-port-info-list.c:111
_CameraFunctions::about
CameraAboutFunc about
A little About text, including authors and credits.
Definition: gphoto2-camera.h:307
gp_port_message_codeset
const char * gp_port_message_codeset(const char *)
Specify codeset for translations.
Definition: gphoto2-port-info-list.c:96
gp_widget_get_range
int gp_widget_get_range(CameraWidget *range, float *min, float *max, float *increment)
Retrieves some range parameters of the CameraWidget.
Definition: gphoto2-widget.c:738
gp_port_info_get_type
int gp_port_info_get_type(GPPortInfo info, GPPortType *type)
Get type of a specific port entry.
Definition: gphoto2-port-info-list.c:554
gp_context_ref
void gp_context_ref(GPContext *context)
Definition: gphoto2-context.c:93
_CameraFileInfo
File information structure.
Definition: gphoto2-filesys.h:141
GP_WIDGET_RANGE
@ GP_WIDGET_RANGE
Slider widget.
Definition: gphoto2-widget.h:60
gphoto2-camera.h
Implement Camera object representing a camera attached to the system.
GP_PORT_NONE
@ GP_PORT_NONE
No specific type associated.
Definition: gphoto2-port-info-list.h:35
GP_ERROR
#define GP_ERROR
Generic Error.
Definition: gphoto2-port-result.h:34
_CameraFileInfoPreview::type
char type[64]
MIME type of the preview.
Definition: gphoto2-filesys.h:116
gp_camera_init
int gp_camera_init(Camera *camera, GPContext *context)
Definition: gphoto2-camera.c:683
gp_camera_exit
int gp_camera_exit(Camera *camera, GPContext *context)
Definition: gphoto2-camera.c:264
gp_abilities_list_free
int gp_abilities_list_free(CameraAbilitiesList *list)
Free the given CameraAbilitiesList object.
Definition: gphoto2-abilities-list.c:125
GP_DEVICE_STILL_CAMERA
@ GP_DEVICE_STILL_CAMERA
Definition: gphoto2-abilities-list.h:53
GP_WIDGET_WINDOW
@ GP_WIDGET_WINDOW
Window widget This is the toplevel configuration widget. It should likely contain multiple GP_WIDGET_...
Definition: gphoto2-widget.h:55
gp_port_info_list_count
int gp_port_info_list_count(GPPortInfoList *list)
Number of ports in the list.
Definition: gphoto2-port-info-list.c:305
gp_widget_new
int gp_widget_new(CameraWidgetType type, const char *label, CameraWidget **widget)
Create a new widget.
Definition: gphoto2-widget.c:93
GP_PORT_SERIAL
@ GP_PORT_SERIAL
Serial port.
Definition: gphoto2-port-info-list.h:36
gp_camera_get_summary
int gp_camera_get_summary(Camera *camera, CameraText *summary, GPContext *context)
Definition: gphoto2-camera.c:1231
gp_filesystem_new
int gp_filesystem_new(CameraFilesystem **fs)
Create a new filesystem struct.
Definition: gphoto2-filesys.c:659
GP_FILE_OPERATION_PREVIEW
@ GP_FILE_OPERATION_PREVIEW
Definition: gphoto2-abilities-list.h:77
GP_LOG_ERROR
@ GP_LOG_ERROR
Log message is an error infomation.
Definition: gphoto2-port-log.h:31
GP_DRIVER_STATUS_TESTING
@ GP_DRIVER_STATUS_TESTING
Definition: gphoto2-abilities-list.h:43
gp_message_codeset
const char * gp_message_codeset(const char *codeset)
Set the current character codeset libgphoto2 is operating in.
Definition: gphoto2-abilities-list.c:84
gp_camera_wait_for_event
int gp_camera_wait_for_event(Camera *camera, int timeout, CameraEventType *eventtype, void **eventdata, GPContext *context)
Definition: gphoto2-camera.c:1438
gp_context_message
void gp_context_message(GPContext *context, const char *format,...)
Print a message to the context.
Definition: gphoto2-context.c:257
gp_widget_get_readonly
int gp_widget_get_readonly(CameraWidget *widget, int *readonly)
Retrieves the readonly state of the CameraWidget.
Definition: gphoto2-widget.c:327
_GPPortSettings
Union of port settings.
Definition: gphoto2-port.h:114
CameraText::text
char text[32 *1024]
Character string containing the translated text.
Definition: gphoto2-camera.h:69
CameraFilePath
A structure created by the capture operation.
Definition: gphoto2-camera.h:79
gp_list_new
int gp_list_new(CameraList **list)
Creates a new CameraList.
Definition: gphoto2-list.c:63
GP_WIDGET_TEXT
@ GP_WIDGET_TEXT
Text widget.
Definition: gphoto2-widget.h:59
GP_OPERATION_NONE
@ GP_OPERATION_NONE
Definition: gphoto2-abilities-list.h:62
gp_camera_free
int gp_camera_free(Camera *camera)
Definition: gphoto2-camera.c:562
gp_context_idle
void gp_context_idle(GPContext *context)
Notify frontend of a brief idle time.
Definition: gphoto2-context.c:135
CameraAbilities::usb_class
int usb_class
USB device class.
Definition: gphoto2-abilities-list.h:136
gp_camera_folder_put_file
int gp_camera_folder_put_file(Camera *camera, const char *folder, const char *filename, CameraFileType type, CameraFile *file, GPContext *context)
Definition: gphoto2-camera.c:1548
GP_CONTEXT_FEEDBACK_CANCEL
@ GP_CONTEXT_FEEDBACK_CANCEL
Definition: gphoto2-context.h:57
gp_camera_file_set_info
int gp_camera_file_set_info(Camera *camera, const char *folder, const char *file, CameraFileInfo info, GPContext *context)
Definition: gphoto2-camera.c:1644
GP_FILE_INFO_SIZE
@ GP_FILE_INFO_SIZE
The filesize is set.
Definition: gphoto2-filesys.h:58
GP_CONTEXT_FEEDBACK_OK
@ GP_CONTEXT_FEEDBACK_OK
Definition: gphoto2-context.h:56
CameraAbilities::usb_protocol
int usb_protocol
USB device protocol.
Definition: gphoto2-abilities-list.h:138
GP_DRIVER_STATUS_EXPERIMENTAL
@ GP_DRIVER_STATUS_EXPERIMENTAL
Definition: gphoto2-abilities-list.h:44
gp_camera_folder_list_files
int gp_camera_folder_list_files(Camera *camera, const char *folder, CameraList *list, GPContext *context)
Definition: gphoto2-camera.c:1467
GP_WIDGET_RADIO
@ GP_WIDGET_RADIO
Radio button widget.
Definition: gphoto2-widget.h:62
_CameraList
Definition: gphoto2-list.c:47
gphoto2-port-log.h
gp_abilities_list_get_abilities
int gp_abilities_list_get_abilities(CameraAbilitiesList *list, int index, CameraAbilities *abilities)
Retrieve the camera abilities of entry with supplied index number.
Definition: gphoto2-abilities-list.c:636
gp_port_set_error
int gp_port_set_error(GPPort *port, const char *format,...)
Set verbose port error message.
Definition: gphoto2-port.c:1180
gp_filesystem_get_file
int gp_filesystem_get_file(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, GPContext *context)
Get file data from the filesystem.
Definition: gphoto2-filesys.c:1635
_CameraFunctions::manual
CameraManualFunc manual
Give a brief manual about any specific items a user has to know, translated.
Definition: gphoto2-camera.h:306
CameraText
CameraText structure used in various functions.
Definition: gphoto2-camera.h:68
GP_ERROR_LIBRARY
#define GP_ERROR_LIBRARY
Error in the camera driver.
Definition: gphoto2-port-result.h:46
gp_port_usb_find_device_by_class
int gp_port_usb_find_device_by_class(GPPort *port, int mainclass, int subclass, int protocol)
Find USB device by interface class.
Definition: gphoto2-port.c:814
GP_PORT_DISK
@ GP_PORT_DISK
Disk / local mountpoint port.
Definition: gphoto2-port-info-list.h:38
gp_camera_get_manual
int gp_camera_get_manual(Camera *camera, CameraText *manual, GPContext *context)
Definition: gphoto2-camera.c:1262
gp_widget_get_name
int gp_widget_get_name(CameraWidget *widget, const char **name)
Gets the name of the widget.
Definition: gphoto2-widget.c:233
CameraLibraryIdFunc
int(* CameraLibraryIdFunc)(CameraText *id)
Returns a unique id for the camera driver.
Definition: gphoto2-library.h:42
gphoto2-abilities-list.h
List of supported camera models including their abilities.
gp_filesystem_remove_dir
int gp_filesystem_remove_dir(CameraFilesystem *fs, const char *folder, const char *name, GPContext *context)
Remove a subfolder from within a folder.
Definition: gphoto2-filesys.c:1218
gp_filesystem_get_storageinfo
int gp_filesystem_get_storageinfo(CameraFilesystem *fs, CameraStorageInformation **storageinfo, int *nrofstorageinfos, GPContext *context)
Get the storage information about this filesystem.
Definition: gphoto2-filesys.c:2450
_CameraFunctions
Various camera specific functions.
Definition: gphoto2-camera.h:285
CameraAbilities::usb_subclass
int usb_subclass
USB device subclass.
Definition: gphoto2-abilities-list.h:137
gp_camera_folder_list_folders
int gp_camera_folder_list_folders(Camera *camera, const char *folder, CameraList *list, GPContext *context)
Definition: gphoto2-camera.c:1495
GPContextFeedback
enum _GPContextFeedback GPContextFeedback
Return codes that can be returned by progress handling.
GP_FILE_INFO_NONE
@ GP_FILE_INFO_NONE
No fields set.
Definition: gphoto2-filesys.h:56
gp_widget_get_child_by_name
int gp_widget_get_child_by_name(CameraWidget *widget, const char *name, CameraWidget **child)
Retrieves the child with name name of the widget.
Definition: gphoto2-widget.c:638
gp_log
void gp_log(GPLogLevel level, const char *domain, const char *format,...)
Log a debug or error message.
Definition: gphoto2-port-log.c:331
CameraCaptureType
CameraCaptureType
Type of the capture to do.
Definition: gphoto2-camera.h:90
gp_camera_set_config
int gp_camera_set_config(Camera *camera, CameraWidget *window, GPContext *context)
Definition: gphoto2-camera.c:1102
gp_filesystem_delete_all
int gp_filesystem_delete_all(CameraFilesystem *fs, const char *folder, GPContext *context)
Delete all files in specified folder.
Definition: gphoto2-filesys.c:892
_CameraFunctions::summary
CameraSummaryFunc summary
Give a summary about the current camera status, translated.
Definition: gphoto2-camera.h:305
gp_camera_set_abilities
int gp_camera_set_abilities(Camera *camera, CameraAbilities abilities)
Sets the camera abilities.
Definition: gphoto2-camera.c:368
_CameraFunctions::set_config
CameraSetConfigFunc set_config
Called after a configuration was changed.
Definition: gphoto2-camera.h:293
GP_FILE_OPERATION_NONE
@ GP_FILE_OPERATION_NONE
Definition: gphoto2-abilities-list.h:75
gp_widget_free
int gp_widget_free(CameraWidget *widget)
Frees a CameraWidget.
Definition: gphoto2-widget.c:132
GP_ERROR_CANCEL
#define GP_ERROR_CANCEL
Cancellation successful.
Definition: gphoto2-result.h:107
GP_FOLDER_OPERATION_REMOVE_DIR
@ GP_FOLDER_OPERATION_REMOVE_DIR
Definition: gphoto2-abilities-list.h:91
_Camera::pc
CameraPrivateCore * pc
Definition: gphoto2-camera.h:335
CameraAbilities::port
GPPortType port
Supported port types.
Definition: gphoto2-abilities-list.h:125
gp_widget_set_range
int gp_widget_set_range(CameraWidget *range, float min, float max, float increment)
Sets some range parameters of the CameraWidget.
Definition: gphoto2-widget.c:715
gp_camera_folder_delete_all
int gp_camera_folder_delete_all(Camera *camera, const char *folder, GPContext *context)
Definition: gphoto2-camera.c:1522
_GPPort::type
GPPortType type
Actual type of this port.
Definition: gphoto2-port.h:145
gphoto2-context.h
Context callback operation functions.
gp_filesystem_list_folders
int gp_filesystem_list_folders(CameraFilesystem *fs, const char *folder, CameraList *list, GPContext *context)
List all subfolders within a filesystem folder.
Definition: gphoto2-filesys.c:1019
_CameraFunctions::list_config
CameraListConfigFunc list_config
Called for listing the available configuration widgets.
Definition: gphoto2-camera.h:295
gphoto2-library.h
Camery driver header.
GP_OPERATION_CAPTURE_VIDEO
@ GP_OPERATION_CAPTURE_VIDEO
Definition: gphoto2-abilities-list.h:64
GP_WIDGET_BUTTON
@ GP_WIDGET_BUTTON
Button press widget.
Definition: gphoto2-widget.h:64
GP_ERROR_DIRECTORY_NOT_FOUND
#define GP_ERROR_DIRECTORY_NOT_FOUND
Specified directory was not found.
Definition: gphoto2-result.h:67
gp_file_get_name_by_type
int gp_file_get_name_by_type(CameraFile *file, const char *basename, CameraFileType type, char **newname)
Definition: gphoto2-file.c:899
GP_ERROR_NOT_SUPPORTED
#define GP_ERROR_NOT_SUPPORTED
Functionality not supported.
Definition: gphoto2-port-result.h:54
gp_camera_start_timeout
int gp_camera_start_timeout(Camera *camera, unsigned int timeout, CameraTimeoutFunc func)
Definition: gphoto2-camera.c:1893
_GPContext
Definition: gphoto2-context.c:38
GP_PORT_PTPIP
@ GP_PORT_PTPIP
PTP/IP port.
Definition: gphoto2-port-info-list.h:39
gp_camera_file_get
int gp_camera_file_get(Camera *camera, const char *folder, const char *file, CameraFileType type, CameraFile *camera_file, GPContext *context)
Definition: gphoto2-camera.c:1671
GP_WIDGET_MENU
@ GP_WIDGET_MENU
Menu widget (same as RADIO).
Definition: gphoto2-widget.h:63
_GPPortSettingsSerial::speed
int speed
Definition: gphoto2-port.h:68
_CameraStorageInformation
Storage information structue.
Definition: gphoto2-filesys.h:214
GPPortType
GPPortType
The gphoto port type.
Definition: gphoto2-port-info-list.h:34