libgphoto2 photo camera library (libgphoto2) API: gphoto2/gphoto2-filesys.h Source File

libgphoto2 photo camera library (libgphoto2) API 2.5.32

Loading...
Searching...
No Matches
gphoto2-filesys.h
Go to the documentation of this file.
1
29
30#ifndef LIBGPHOTO2_GPHOTO2_FILESYS_H
31#define LIBGPHOTO2_GPHOTO2_FILESYS_H
32
33#include <time.h>
34#include <stdint.h>
35
36#include <gphoto2/gphoto2-context.h>
37#include <gphoto2/gphoto2-list.h>
38#include <gphoto2/gphoto2-file.h>
39
40#ifdef __cplusplus
41extern "C" {
42#endif /* __cplusplus */
43
55 typedef enum {
56 GP_FILE_INFO_NONE = 0,
57 GP_FILE_INFO_TYPE = 1 << 0,
58 GP_FILE_INFO_SIZE = 1 << 2,
59 GP_FILE_INFO_WIDTH = 1 << 3,
60 GP_FILE_INFO_HEIGHT = 1 << 4,
61 GP_FILE_INFO_PERMISSIONS = 1 << 5,
62 GP_FILE_INFO_STATUS = 1 << 6,
63 GP_FILE_INFO_MTIME = 1 << 7,
64 GP_FILE_INFO_ALL = 0xFF
65} CameraFileInfoFields;
66
72 typedef enum {
73 GP_FILE_PERM_NONE = 0,
74 GP_FILE_PERM_READ = 1 << 0,
75 GP_FILE_PERM_DELETE = 1 << 1,
76 GP_FILE_PERM_ALL = 0xFF
77} CameraFilePermissions;
78
84 typedef enum {
85 GP_FILE_STATUS_NOT_DOWNLOADED,
86 GP_FILE_STATUS_DOWNLOADED
87} CameraFileStatus;
88
95 typedef struct _CameraFileInfoFile {
96 CameraFileInfoFields fields;
97 CameraFileStatus status;
98 uint64_t size;
99 char type[64];
100 uint32_t width;
101 uint32_t height;
102 CameraFilePermissions permissions;
103 time_t mtime;
104} CameraFileInfoFile;
105
112 typedef struct _CameraFileInfoPreview {
113 CameraFileInfoFields fields;
114 CameraFileStatus status;
115 uint64_t size;
116 char type[64];
117
118 uint32_t width;
119 uint32_t height;
120} CameraFileInfoPreview;
121
128 typedef struct _CameraFileInfoAudio {
129 CameraFileInfoFields fields;
130 CameraFileStatus status;
131 uint64_t size;
132 char type[64];
133} CameraFileInfoAudio;
134
141 typedef struct _CameraFileInfo {
142 CameraFileInfoPreview preview;
143 CameraFileInfoFile file;
144 CameraFileInfoAudio audio;
145} CameraFileInfo;
146
153 typedef enum {
154 GP_STORAGEINFO_BASE = (1<<0),
157 GP_STORAGEINFO_LABEL = (1<<1),
160 GP_STORAGEINFO_DESCRIPTION = (1<<2),
161 GP_STORAGEINFO_ACCESS = (1<<3),
162 GP_STORAGEINFO_STORAGETYPE = (1<<4),
163 GP_STORAGEINFO_FILESYSTEMTYPE = (1<<5),
164 GP_STORAGEINFO_MAXCAPACITY = (1<<6),
165 GP_STORAGEINFO_FREESPACEKBYTES = (1<<7),
166 GP_STORAGEINFO_FREESPACEIMAGES = (1<<8)
167} CameraStorageInfoFields;
168
175 typedef enum {
176 GP_STORAGEINFO_ST_UNKNOWN = 0,
177 GP_STORAGEINFO_ST_FIXED_ROM = 1,
178 GP_STORAGEINFO_ST_REMOVABLE_ROM = 2,
179 GP_STORAGEINFO_ST_FIXED_RAM = 3,
180 GP_STORAGEINFO_ST_REMOVABLE_RAM = 4
181} CameraStorageType;
182
189 typedef enum {
190 GP_STORAGEINFO_AC_READWRITE = 0,
191 GP_STORAGEINFO_AC_READONLY = 1,
192 GP_STORAGEINFO_AC_READONLY_WITH_DELETE = 2
193} CameraStorageAccessType;
194
201 typedef enum {
202 GP_STORAGEINFO_FST_UNDEFINED = 0,
203 GP_STORAGEINFO_FST_GENERICFLAT = 1,
204 GP_STORAGEINFO_FST_GENERICHIERARCHICAL = 2,
205 GP_STORAGEINFO_FST_DCF = 3
206} CameraStorageFilesystemType;
207
214 typedef struct _CameraStorageInformation {
215 CameraStorageInfoFields fields;
216 char basedir[256];
217 char label[256];
218 char description[256];
219 CameraStorageType type;
220 CameraStorageFilesystemType fstype;
221 CameraStorageAccessType access;
222 uint64_t capacitykbytes;
223 uint64_t freekbytes;
224 uint64_t freeimages;
225} CameraStorageInformation;
226
234 typedef struct _CameraFilesystem CameraFilesystem;
235
236int gp_filesystem_new (CameraFilesystem **fs);
237int gp_filesystem_free (CameraFilesystem *fs);
238
239/* Manual editing */
240int gp_filesystem_append (CameraFilesystem *fs, const char *folder,
241 const char *filename, GPContext *context);
242int gp_filesystem_set_info_noop (CameraFilesystem *fs,
243 const char *folder, const char *filename,
244 CameraFileInfo info, GPContext *context);
245int gp_filesystem_set_info_dirty (CameraFilesystem *fs,
246 const char *folder, const char *filename,
247 GPContext *context);
248int gp_filesystem_set_file_noop (CameraFilesystem *fs,
249 const char *folder, const char *filename,
250 CameraFileType type,
251 CameraFile *file, GPContext *context);
252int gp_filesystem_delete_file_noop (CameraFilesystem *fs, const char *folder,
253 const char *filename, GPContext *context);
254int gp_filesystem_reset (CameraFilesystem *fs);
255
256/* Information retrieval */
257int gp_filesystem_count (CameraFilesystem *fs, const char *folder,
258 GPContext *context);
259int gp_filesystem_name (CameraFilesystem *fs, const char *folder,
260 int filenumber, const char **filename,
261 GPContext *context);
262int gp_filesystem_get_folder (CameraFilesystem *fs, const char *filename,
263 char **folder, GPContext *context);
264int gp_filesystem_number (CameraFilesystem *fs, const char *folder,
265 const char *filename, GPContext *context);
266
267/* Listings */
268typedef int (*CameraFilesystemListFunc) (CameraFilesystem *fs,
269 const char *folder, CameraList *list,
270 void *data, GPContext *context);
271int gp_filesystem_list_files (CameraFilesystem *fs, const char *folder,
272 CameraList *list, GPContext *context);
273int gp_filesystem_list_folders (CameraFilesystem *fs, const char *folder,
274 CameraList *list, GPContext *context);
275
276/* File information */
277typedef int (*CameraFilesystemSetInfoFunc) (CameraFilesystem *fs,
278 const char *folder,
279 const char *filename,
280 CameraFileInfo info, void *data,
281 GPContext *context);
282typedef int (*CameraFilesystemGetInfoFunc) (CameraFilesystem *fs,
283 const char *folder,
284 const char *filename,
285 CameraFileInfo *info, void *data,
286 GPContext *context);
287int gp_filesystem_get_info (CameraFilesystem *fs, const char *folder,
288 const char *filename, CameraFileInfo *info,
289 GPContext *context);
290int gp_filesystem_set_info (CameraFilesystem *fs, const char *folder,
291 const char *filename, CameraFileInfo info,
292 GPContext *context);
293
294/* Files */
295typedef int (*CameraFilesystemGetFileFunc) (CameraFilesystem *fs,
296 const char *folder,
297 const char *filename,
298 CameraFileType type,
299 CameraFile *file, void *data,
300 GPContext *context);
301typedef int (*CameraFilesystemReadFileFunc) (CameraFilesystem *fs,
302 const char *folder,
303 const char *filename,
304 CameraFileType type,
305 uint64_t offset,
306 char *buf,
307 uint64_t *size,
308 void *data,
309 GPContext *context);
310typedef int (*CameraFilesystemDeleteFileFunc) (CameraFilesystem *fs,
311 const char *folder,
312 const char *filename,
313 void *data, GPContext *context);
314int gp_filesystem_get_file (CameraFilesystem *fs, const char *folder,
315 const char *filename, CameraFileType type,
316 CameraFile *file, GPContext *context);
317int gp_filesystem_read_file (CameraFilesystem *fs, const char *folder,
318 const char *filename, CameraFileType type,
319 uint64_t offset, char *buf, uint64_t *size,
320 GPContext *context);
321int gp_filesystem_delete_file (CameraFilesystem *fs, const char *folder,
322 const char *filename, GPContext *context);
323
324/* Folders */
325typedef int (*CameraFilesystemPutFileFunc) (CameraFilesystem *fs,
326 const char *folder,
327 const char *filename,
328 CameraFileType type,
329 CameraFile *file,
330 void *data,
331 GPContext *context);
332typedef int (*CameraFilesystemDeleteAllFunc) (CameraFilesystem *fs,
333 const char *folder, void *data,
334 GPContext *context);
335typedef int (*CameraFilesystemDirFunc) (CameraFilesystem *fs,
336 const char *folder,
337 const char *name, void *data,
338 GPContext *context);
339
340typedef int (*CameraFilesystemStorageInfoFunc) (CameraFilesystem *fs,
341 CameraStorageInformation **,
342 int *nrofstorageinformations,
343 void *data, GPContext *context);
344
345int gp_filesystem_get_storageinfo (CameraFilesystem *fs,
346 CameraStorageInformation **,
347 int *nrofstorageinformations,
348 GPContext *context);
349
350typedef struct _CameraFilesystemFuncs CameraFilesystemFuncs;
351 struct _CameraFilesystemFuncs {
352 CameraFilesystemListFunc file_list_func;
353 CameraFilesystemListFunc folder_list_func;
354 CameraFilesystemPutFileFunc put_file_func;
355 CameraFilesystemDeleteAllFunc delete_all_func;
356 CameraFilesystemGetInfoFunc get_info_func;
357 CameraFilesystemSetInfoFunc set_info_func;
358 CameraFilesystemDirFunc make_dir_func;
359 CameraFilesystemDirFunc remove_dir_func;
360 CameraFilesystemGetFileFunc get_file_func;
361 CameraFilesystemReadFileFunc read_file_func;
362 CameraFilesystemDeleteFileFunc del_file_func;
363 CameraFilesystemStorageInfoFunc storage_info_func;
364
365 /* for later use. Remove one if you add a new function */
366 void *unused[31];
367};
368int gp_filesystem_set_funcs (CameraFilesystem *fs,
369 CameraFilesystemFuncs *funcs,
370 void *data);
371int gp_filesystem_put_file (CameraFilesystem *fs, const char *folder, const char *filename,
372 CameraFileType type, CameraFile *file, GPContext *context);
373int gp_filesystem_delete_all (CameraFilesystem *fs, const char *folder,
374 GPContext *context);
375int gp_filesystem_make_dir (CameraFilesystem *fs, const char *folder,
376 const char *name, GPContext *context);
377int gp_filesystem_remove_dir (CameraFilesystem *fs, const char *folder,
378 const char *name, GPContext *context);
379
380/* For debugging */
381int gp_filesystem_dump (CameraFilesystem *fs);
382
383#ifdef __cplusplus
384}
385#endif /* __cplusplus */
386
387#endif /* !defined(LIBGPHOTO2_GPHOTO2_FILESYS_H) */
gphoto2-context.h
Context callback operation functions.
GPContext
struct _GPContext GPContext
The gphoto context structure.
Definition gphoto2-context.h:41
gphoto2-file.h
Abstracted gphoto2 file operations.
CameraFileType
CameraFileType
The type of view on the specified file.
Definition gphoto2-file.h:77
gp_filesystem_get_folder
int gp_filesystem_get_folder(CameraFilesystem *fs, const char *filename, char **folder, GPContext *context)
Search a folder that contains a given filename.
Definition gphoto2-filesys.c:1494
gp_filesystem_free
int gp_filesystem_free(CameraFilesystem *fs)
Free filesystem struct.
Definition gphoto2-filesys.c:674
gp_filesystem_dump
int gp_filesystem_dump(CameraFilesystem *fs)
Dump the current filesystem.
Definition gphoto2-filesys.c:789
CameraFilesystem
struct _CameraFilesystem CameraFilesystem
Filesystem structure, only exposed to camera drivers.
Definition gphoto2-filesys.h:234
CameraFilePermissions
CameraFilePermissions
Bitmask containing the file permission flags.
Definition gphoto2-filesys.h:72
GP_FILE_PERM_ALL
@ GP_FILE_PERM_ALL
Internal.
Definition gphoto2-filesys.h:76
GP_FILE_PERM_DELETE
@ GP_FILE_PERM_DELETE
Write permissions.
Definition gphoto2-filesys.h:75
GP_FILE_PERM_READ
@ GP_FILE_PERM_READ
Read permissions.
Definition gphoto2-filesys.h:74
GP_FILE_PERM_NONE
@ GP_FILE_PERM_NONE
No permissions.
Definition gphoto2-filesys.h:73
gp_filesystem_new
int gp_filesystem_new(CameraFilesystem **fs)
Create a new filesystem struct.
Definition gphoto2-filesys.c:643
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:2381
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:1165
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:1095
gp_filesystem_set_info_noop
int gp_filesystem_set_info_noop(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo info, GPContext *context)
Store the file information in the virtual fs.
Definition gphoto2-filesys.c:2318
CameraFileInfo
struct _CameraFileInfo CameraFileInfo
File information structure.
gp_filesystem_reset
int gp_filesystem_reset(CameraFilesystem *fs)
Clear the filesystem.
Definition gphoto2-filesys.c:615
CameraFileInfoAudio
struct _CameraFileInfoAudio CameraFileInfoAudio
File information of an audio file.
CameraFileInfoPreview
struct _CameraFileInfoPreview CameraFileInfoPreview
File information of a preview file.
gp_filesystem_set_info_dirty
int gp_filesystem_set_info_dirty(CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
Mark the file info as dirty.
Definition gphoto2-filesys.c:2350
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:875
CameraFileInfoFields
CameraFileInfoFields
Bitmask on what fields are set in the CameraFileInfo structure.
Definition gphoto2-filesys.h:55
GP_FILE_INFO_WIDTH
@ GP_FILE_INFO_WIDTH
The width is set.
Definition gphoto2-filesys.h:59
GP_FILE_INFO_HEIGHT
@ GP_FILE_INFO_HEIGHT
The height is set.
Definition gphoto2-filesys.h:60
GP_FILE_INFO_TYPE
@ GP_FILE_INFO_TYPE
The MIME type is set.
Definition gphoto2-filesys.h:57
GP_FILE_INFO_STATUS
@ GP_FILE_INFO_STATUS
The status is set (downloaded).
Definition gphoto2-filesys.h:62
GP_FILE_INFO_NONE
@ GP_FILE_INFO_NONE
No fields set.
Definition gphoto2-filesys.h:56
GP_FILE_INFO_ALL
@ GP_FILE_INFO_ALL
All possible fields set. Internal.
Definition gphoto2-filesys.h:64
GP_FILE_INFO_SIZE
@ GP_FILE_INFO_SIZE
The filesize is set.
Definition gphoto2-filesys.h:58
GP_FILE_INFO_MTIME
@ GP_FILE_INFO_MTIME
The modification time is set.
Definition gphoto2-filesys.h:63
GP_FILE_INFO_PERMISSIONS
@ GP_FILE_INFO_PERMISSIONS
The access permissions are set.
Definition gphoto2-filesys.h:61
gp_filesystem_set_funcs
int gp_filesystem_set_funcs(CameraFilesystem *fs, CameraFilesystemFuncs *funcs, void *data)
Set all filesystem related function pointers.
Definition gphoto2-filesys.c:1807
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:1613
gp_filesystem_set_file_noop
int gp_filesystem_set_file_noop(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, GPContext *context)
Attach file content to a specified file.
Definition gphoto2-filesys.c:2183
gp_filesystem_count
int gp_filesystem_count(CameraFilesystem *fs, const char *folder, GPContext *context)
Count files a folder of a filesystem.
Definition gphoto2-filesys.c:1058
CameraFileInfoFile
struct _CameraFileInfoFile CameraFileInfoFile
File information of a regular file.
gp_filesystem_get_storageinfo
int gp_filesystem_get_storageinfo(CameraFilesystem *fs, CameraStorageInformation **, int *nrofstorageinformations, GPContext *context)
Get the storage information about this filesystem.
Definition gphoto2-filesys.c:2463
CameraFileStatus
CameraFileStatus
Possible status values.
Definition gphoto2-filesys.h:84
GP_FILE_STATUS_NOT_DOWNLOADED
@ GP_FILE_STATUS_NOT_DOWNLOADED
Definition gphoto2-filesys.h:85
GP_FILE_STATUS_DOWNLOADED
@ GP_FILE_STATUS_DOWNLOADED
Definition gphoto2-filesys.h:86
CameraStorageInformation
struct _CameraStorageInformation CameraStorageInformation
Storage information structure.
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:936
gp_filesystem_delete_file_noop
int gp_filesystem_delete_file_noop(CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
Delete a virtual file from a folder in the filesystem.
Definition gphoto2-filesys.c:1139
gp_filesystem_name
int gp_filesystem_name(CameraFilesystem *fs, const char *folder, int filenumber, const char **filename, GPContext *context)
Lookup the filename of an indexed file within a folder.
Definition gphoto2-filesys.c:1320
CameraStorageType
CameraStorageType
Hardware storage types.
Definition gphoto2-filesys.h:175
GP_STORAGEINFO_ST_FIXED_ROM
@ GP_STORAGEINFO_ST_FIXED_ROM
A fixed ROM storage.
Definition gphoto2-filesys.h:177
GP_STORAGEINFO_ST_REMOVABLE_ROM
@ GP_STORAGEINFO_ST_REMOVABLE_ROM
A removable ROM storage.
Definition gphoto2-filesys.h:178
GP_STORAGEINFO_ST_UNKNOWN
@ GP_STORAGEINFO_ST_UNKNOWN
Unknown storage type.
Definition gphoto2-filesys.h:176
GP_STORAGEINFO_ST_FIXED_RAM
@ GP_STORAGEINFO_ST_FIXED_RAM
A fixed RAM storage. (e.g. SDRAM).
Definition gphoto2-filesys.h:179
GP_STORAGEINFO_ST_REMOVABLE_RAM
@ GP_STORAGEINFO_ST_REMOVABLE_RAM
A removable RAM storage. (any kind of cards etc).
Definition gphoto2-filesys.h:180
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:1840
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:1274
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:1000
CameraStorageInfoFields
CameraStorageInfoFields
Storage information flags.
Definition gphoto2-filesys.h:153
GP_STORAGEINFO_FREESPACEKBYTES
@ GP_STORAGEINFO_FREESPACEKBYTES
Free space in kbytes.
Definition gphoto2-filesys.h:165
GP_STORAGEINFO_FILESYSTEMTYPE
@ GP_STORAGEINFO_FILESYSTEMTYPE
Filesystem type.
Definition gphoto2-filesys.h:163
GP_STORAGEINFO_MAXCAPACITY
@ GP_STORAGEINFO_MAXCAPACITY
Maximum capacity in kbytes.
Definition gphoto2-filesys.h:164
GP_STORAGEINFO_ACCESS
@ GP_STORAGEINFO_ACCESS
Access permissions.
Definition gphoto2-filesys.h:161
GP_STORAGEINFO_LABEL
@ GP_STORAGEINFO_LABEL
Label of the filesystem. Could also be a DOS label.
Definition gphoto2-filesys.h:157
GP_STORAGEINFO_FREESPACEIMAGES
@ GP_STORAGEINFO_FREESPACEIMAGES
Free space in images.
Definition gphoto2-filesys.h:166
GP_STORAGEINFO_DESCRIPTION
@ GP_STORAGEINFO_DESCRIPTION
More verbose description.
Definition gphoto2-filesys.h:160
GP_STORAGEINFO_BASE
@ GP_STORAGEINFO_BASE
The base directory. Usually / if just 1 storage is attached.
Definition gphoto2-filesys.h:154
GP_STORAGEINFO_STORAGETYPE
@ GP_STORAGEINFO_STORAGETYPE
Hardware type.
Definition gphoto2-filesys.h:162
CameraStorageFilesystemType
CameraStorageFilesystemType
Filesystem hierarchy types.
Definition gphoto2-filesys.h:201
GP_STORAGEINFO_FST_GENERICFLAT
@ GP_STORAGEINFO_FST_GENERICFLAT
Generic flat storage (all in 1 directory).
Definition gphoto2-filesys.h:203
GP_STORAGEINFO_FST_GENERICHIERARCHICAL
@ GP_STORAGEINFO_FST_GENERICHIERARCHICAL
Generic tree hierarchy.
Definition gphoto2-filesys.h:204
GP_STORAGEINFO_FST_DCF
@ GP_STORAGEINFO_FST_DCF
DCIM style storage.
Definition gphoto2-filesys.h:205
GP_STORAGEINFO_FST_UNDEFINED
@ GP_STORAGEINFO_FST_UNDEFINED
Undefined or unknown filesystem hierarchy.
Definition gphoto2-filesys.h:202
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:1746
CameraStorageAccessType
CameraStorageAccessType
Storage access modes.
Definition gphoto2-filesys.h:189
GP_STORAGEINFO_AC_READONLY
@ GP_STORAGEINFO_AC_READONLY
Storage is Ready Only.
Definition gphoto2-filesys.h:191
GP_STORAGEINFO_AC_READWRITE
@ GP_STORAGEINFO_AC_READWRITE
Storage is Read / Write.
Definition gphoto2-filesys.h:190
GP_STORAGEINFO_AC_READONLY_WITH_DELETE
@ GP_STORAGEINFO_AC_READONLY_WITH_DELETE
Storage is Ready Only, but allows Delete.
Definition gphoto2-filesys.h:192
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:1199
gp_filesystem_number
int gp_filesystem_number(CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
Get the index of a file in specified folder.
Definition gphoto2-filesys.c:1366
gphoto2-list.h
CameraList
struct _CameraList CameraList
A generic list.
Definition gphoto2-list.h:66
CameraFile
File structure.
_CameraFileInfoAudio
File information of an audio file.
Definition gphoto2-filesys.h:128
_CameraFileInfoAudio::status
CameraFileStatus status
Status of the preview file.
Definition gphoto2-filesys.h:130
_CameraFileInfoAudio::size
uint64_t size
Size of the audio file.
Definition gphoto2-filesys.h:131
_CameraFileInfoAudio::type
char type[64]
MIME type of the audio file.
Definition gphoto2-filesys.h:132
_CameraFileInfoAudio::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition gphoto2-filesys.h:129
_CameraFileInfoFile
File information of a regular file.
Definition gphoto2-filesys.h:95
_CameraFileInfoFile::status
CameraFileStatus status
Status of the file.
Definition gphoto2-filesys.h:97
_CameraFileInfoFile::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition gphoto2-filesys.h:96
_CameraFileInfoFile::permissions
CameraFilePermissions permissions
Permissions of the file.
Definition gphoto2-filesys.h:102
_CameraFileInfoFile::size
uint64_t size
Size of the file.
Definition gphoto2-filesys.h:98
_CameraFileInfoFile::type
char type[64]
MIME type of the file.
Definition gphoto2-filesys.h:99
_CameraFileInfoFile::width
uint32_t width
Height of the file.
Definition gphoto2-filesys.h:100
_CameraFileInfoFile::mtime
time_t mtime
Modification time of the file.
Definition gphoto2-filesys.h:103
_CameraFileInfoFile::height
uint32_t height
Width of the file.
Definition gphoto2-filesys.h:101
_CameraFileInfoPreview
File information of a preview file.
Definition gphoto2-filesys.h:112
_CameraFileInfoPreview::status
CameraFileStatus status
Status of the preview.
Definition gphoto2-filesys.h:114
_CameraFileInfoPreview::width
uint32_t width
Width of the preview.
Definition gphoto2-filesys.h:118
_CameraFileInfoPreview::height
uint32_t height
Height of the preview.
Definition gphoto2-filesys.h:119
_CameraFileInfoPreview::type
char type[64]
MIME type of the preview.
Definition gphoto2-filesys.h:116
_CameraFileInfoPreview::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition gphoto2-filesys.h:113
_CameraFileInfoPreview::size
uint64_t size
Size of the preview.
Definition gphoto2-filesys.h:115
_CameraFileInfo
File information structure.
Definition gphoto2-filesys.h:141
_CameraFilesystemFuncs
Definition gphoto2-filesys.h:351
_CameraFilesystem
The internal camera filesystem structure.
Definition gphoto2-filesys.c:226
_CameraStorageInformation
Storage information structure.
Definition gphoto2-filesys.h:214
_CameraStorageInformation::freekbytes
uint64_t freekbytes
Free space in kbytes.
Definition gphoto2-filesys.h:223
_CameraStorageInformation::fields
CameraStorageInfoFields fields
Bitmask of struct members that are specified.
Definition gphoto2-filesys.h:215
_CameraStorageInformation::description
char description[256]
Description of the storage.
Definition gphoto2-filesys.h:218
_CameraStorageInformation::basedir
char basedir[256]
Basedirectory of the storage. Will be "/" if just 1 storage on the camera.
Definition gphoto2-filesys.h:216
_CameraStorageInformation::capacitykbytes
uint64_t capacitykbytes
Total capacity in kbytes.
Definition gphoto2-filesys.h:222
_CameraStorageInformation::freeimages
uint64_t freeimages
Free space in images (guessed by camera).
Definition gphoto2-filesys.h:224
_CameraStorageInformation::type
CameraStorageType type
Hardware type of the storage.
Definition gphoto2-filesys.h:219
_CameraStorageInformation::fstype
CameraStorageFilesystemType fstype
Hierarchy type of the filesystem.
Definition gphoto2-filesys.h:220
_CameraStorageInformation::access
CameraStorageAccessType access
Access permissions.
Definition gphoto2-filesys.h:221
_CameraStorageInformation::label
char label[256]
Label of the storage. Similar to DOS label.
Definition gphoto2-filesys.h:217