gphoto2-filesys.h
Go to the documentation of this file.
#ifndef __GPHOTO2_FILESYS_H__
#define __GPHOTO2_FILESYS_H__
#include <time.h>
#include <gphoto2/gphoto2-context.h>
#include <gphoto2/gphoto2-list.h>
#include <gphoto2/gphoto2-file.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef enum {
GP_FILE_INFO_NONE = 0,
GP_FILE_INFO_TYPE = 1 << 0,
GP_FILE_INFO_NAME = 1 << 1,
GP_FILE_INFO_SIZE = 1 << 2,
GP_FILE_INFO_WIDTH = 1 << 3,
GP_FILE_INFO_HEIGHT = 1 << 4,
GP_FILE_INFO_PERMISSIONS = 1 << 5,
GP_FILE_INFO_STATUS = 1 << 6,
GP_FILE_INFO_MTIME = 1 << 7,
GP_FILE_INFO_ALL = 0xFF
} CameraFileInfoFields;
typedef enum {
GP_FILE_PERM_NONE = 0,
GP_FILE_PERM_READ = 1 << 0,
GP_FILE_PERM_DELETE = 1 << 1,
GP_FILE_PERM_ALL = 0xFF
} CameraFilePermissions;
typedef enum {
GP_FILE_STATUS_NOT_DOWNLOADED,
GP_FILE_STATUS_DOWNLOADED
} CameraFileStatus;
typedef struct _CameraFileInfoFile {
CameraFileInfoFields fields;
CameraFileStatus status;
unsigned long size;
char type[64];
unsigned int width;
unsigned int height;
char name[64];
CameraFilePermissions permissions;
time_t mtime;
} CameraFileInfoFile;
typedef struct _CameraFileInfoPreview {
CameraFileInfoFields fields;
CameraFileStatus status;
unsigned long size;
char type[64];
unsigned int width;
unsigned int height;
} CameraFileInfoPreview;
typedef struct _CameraFileInfoAudio {
CameraFileInfoFields fields;
CameraFileStatus status;
unsigned long size;
char type[64];
} CameraFileInfoAudio;
typedef struct _CameraFileInfo {
CameraFileInfoPreview preview;
CameraFileInfoFile file;
CameraFileInfoAudio audio;
} CameraFileInfo;
typedef enum {
GP_STORAGEINFO_BASE = (1<<0),
GP_STORAGEINFO_LABEL = (1<<1),
GP_STORAGEINFO_DESCRIPTION = (1<<2),
GP_STORAGEINFO_ACCESS = (1<<3),
GP_STORAGEINFO_STORAGETYPE = (1<<4),
GP_STORAGEINFO_FILESYSTEMTYPE = (1<<5),
GP_STORAGEINFO_MAXCAPACITY = (1<<6),
GP_STORAGEINFO_FREESPACEKBYTES = (1<<7),
GP_STORAGEINFO_FREESPACEIMAGES = (1<<8)
} CameraStorageInfoFields;
typedef enum {
GP_STORAGEINFO_ST_UNKNOWN = 0,
GP_STORAGEINFO_ST_FIXED_ROM = 1,
GP_STORAGEINFO_ST_REMOVABLE_ROM = 2,
GP_STORAGEINFO_ST_FIXED_RAM = 3,
GP_STORAGEINFO_ST_REMOVABLE_RAM = 4
} CameraStorageType;
typedef enum {
GP_STORAGEINFO_AC_READWRITE = 0,
GP_STORAGEINFO_AC_READONLY = 1,
GP_STORAGEINFO_AC_READONLY_WITH_DELETE = 2
} CameraStorageAccessType;
typedef enum {
GP_STORAGEINFO_FST_UNDEFINED = 0,
GP_STORAGEINFO_FST_GENERICFLAT = 1,
GP_STORAGEINFO_FST_GENERICHIERARCHICAL = 2,
GP_STORAGEINFO_FST_DCF = 3
} CameraStorageFilesystemType;
typedef struct _CameraStorageInformation {
CameraStorageInfoFields fields;
char basedir[256];
char label[256];
char description[256];
CameraStorageType type;
CameraStorageFilesystemType fstype;
CameraStorageAccessType access;
unsigned long capacitykbytes;
unsigned long freekbytes;
unsigned long freeimages;
} CameraStorageInformation;
typedef struct _CameraFilesystem CameraFilesystem;
int gp_filesystem_new (CameraFilesystem **fs);
int gp_filesystem_free (CameraFilesystem *fs);
/* Manual editing */
int gp_filesystem_append (CameraFilesystem *fs, const char *folder,
const char *filename, GPContext *context);
int gp_filesystem_set_info_noop (CameraFilesystem *fs, const char *folder,
CameraFileInfo info, GPContext *context);
int gp_filesystem_set_file_noop (CameraFilesystem *fs, const char *folder,
CameraFile *file, GPContext *context);
int gp_filesystem_delete_file_noop (CameraFilesystem *fs, const char *folder,
const char *filename, GPContext *context);
int gp_filesystem_reset (CameraFilesystem *fs);
/* Information retrieval */
int gp_filesystem_count (CameraFilesystem *fs, const char *folder,
GPContext *context);
int gp_filesystem_name (CameraFilesystem *fs, const char *folder,
int filenumber, const char **filename,
GPContext *context);
int gp_filesystem_get_folder (CameraFilesystem *fs, const char *filename,
const char **folder, GPContext *context);
int gp_filesystem_number (CameraFilesystem *fs, const char *folder,
const char *filename, GPContext *context);
/* Listings */
typedef int (*CameraFilesystemListFunc) (CameraFilesystem *fs,
const char *folder, CameraList *list,
void *data, GPContext *context);
int gp_filesystem_set_list_funcs (CameraFilesystem *fs,
CameraFilesystemListFunc file_list_func,
CameraFilesystemListFunc folder_list_func,
void *data);
int gp_filesystem_list_files (CameraFilesystem *fs, const char *folder,
CameraList *list, GPContext *context);
int gp_filesystem_list_folders (CameraFilesystem *fs, const char *folder,
CameraList *list, GPContext *context);
/* File information */
typedef int (*CameraFilesystemSetInfoFunc) (CameraFilesystem *fs,
const char *folder,
const char *filename,
CameraFileInfo info, void *data,
GPContext *context);
typedef int (*CameraFilesystemGetInfoFunc) (CameraFilesystem *fs,
const char *folder,
const char *filename,
CameraFileInfo *info, void *data,
GPContext *context);
int gp_filesystem_set_info_funcs (CameraFilesystem *fs,
CameraFilesystemGetInfoFunc get_info_func,
CameraFilesystemSetInfoFunc set_info_func,
void *data);
int gp_filesystem_get_info (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileInfo *info,
GPContext *context);
int gp_filesystem_set_info (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileInfo info,
GPContext *context);
/* Files */
typedef int (*CameraFilesystemGetFileFunc) (CameraFilesystem *fs,
const char *folder,
const char *filename,
CameraFileType type,
CameraFile *file, void *data,
GPContext *context);
typedef int (*CameraFilesystemDeleteFileFunc) (CameraFilesystem *fs,
const char *folder,
const char *filename,
void *data, GPContext *context);
int gp_filesystem_set_file_funcs (CameraFilesystem *fs,
CameraFilesystemGetFileFunc get_file_func,
CameraFilesystemDeleteFileFunc del_file_func,
void *data);
int gp_filesystem_get_file (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
CameraFile *file, GPContext *context);
int gp_filesystem_delete_file (CameraFilesystem *fs, const char *folder,
const char *filename, GPContext *context);
/* Folders */
typedef int (*CameraFilesystemPutFileFunc) (CameraFilesystem *fs,
const char *folder,
CameraFile *file, void *data,
GPContext *context);
typedef int (*CameraFilesystemDeleteAllFunc) (CameraFilesystem *fs,
const char *folder, void *data,
GPContext *context);
typedef int (*CameraFilesystemDirFunc) (CameraFilesystem *fs,
const char *folder,
const char *name, void *data,
GPContext *context);
int gp_filesystem_set_folder_funcs (CameraFilesystem *fs,
CameraFilesystemPutFileFunc put_file_func,
CameraFilesystemDeleteAllFunc delete_all_func,
CameraFilesystemDirFunc make_dir_func,
CameraFilesystemDirFunc remove_dir_func,
void *data);
typedef int (*CameraFilesystemStorageInfoFunc) (CameraFilesystem *fs,
CameraStorageInformation **,
int *nrofstorageinformations,
void *data, GPContext *context);
int gp_filesystem_get_storageinfo (CameraFilesystem *fs,
CameraStorageInformation **,
int *nrofstorageinformations,
GPContext *context);
typedef struct _CameraFilesystemFuncs CameraFilesystemFuncs;
struct _CameraFilesystemFuncs {
CameraFilesystemListFunc file_list_func;
CameraFilesystemListFunc folder_list_func;
CameraFilesystemPutFileFunc put_file_func;
CameraFilesystemDeleteAllFunc delete_all_func;
CameraFilesystemGetInfoFunc get_info_func;
CameraFilesystemSetInfoFunc set_info_func;
CameraFilesystemDirFunc make_dir_func;
CameraFilesystemDirFunc remove_dir_func;
CameraFilesystemGetFileFunc get_file_func;
CameraFilesystemDeleteFileFunc del_file_func;
CameraFilesystemStorageInfoFunc storage_info_func;
/* for later use. Remove one if you add a new function */
void *unused[31];
};
int gp_filesystem_set_funcs (CameraFilesystem *fs,
CameraFilesystemFuncs *funcs,
void *data);
int gp_filesystem_put_file (CameraFilesystem *fs, const char *folder,
CameraFile *file, GPContext *context);
int gp_filesystem_delete_all (CameraFilesystem *fs, const char *folder,
GPContext *context);
int gp_filesystem_make_dir (CameraFilesystem *fs, const char *folder,
const char *name, GPContext *context);
int gp_filesystem_remove_dir (CameraFilesystem *fs, const char *folder,
const char *name, GPContext *context);
/* For debugging */
int gp_filesystem_dump (CameraFilesystem *fs);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GPHOTO2_FILESYS_H__ */
GP_STORAGEINFO_ST_FIXED_RAM
A fixed RAM storage. (e.g. SDRAM)
Definition: gphoto2-filesys.h:180
CameraStorageFilesystemType
CameraStorageFilesystemType
Filesystem hierarchy types.
Definition: gphoto2-filesys.h:202
gphoto2-list.h
_CameraFileInfoFile::type
char type[64]
MIME type of the file.
Definition: gphoto2-filesys.h:98
_CameraList
Definition: gphoto2-list.c:77
_CameraFileInfoAudio::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:130
folder_list_func
int folder_list_func(CameraFilesystem *fs, const char *folder, CameraList *list, void *data, GPContext *context)
Definition: template.c:380
gp_filesystem_free
int gp_filesystem_free(CameraFilesystem *fs)
Free filesystem struct.
Definition: gphoto2-filesys.c:693
GP_STORAGEINFO_AC_READONLY
Storage is Ready Only.
Definition: gphoto2-filesys.h:192
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:1711
_CameraFileInfoFile::mtime
time_t mtime
Modification time of the file.
Definition: gphoto2-filesys.h:104
_CameraFileInfoPreview::type
char type[64]
MIME type of the preview.
Definition: gphoto2-filesys.h:117
gp_filesystem_get_folder
int gp_filesystem_get_folder(CameraFilesystem *fs, const char *filename, const char **folder, GPContext *context)
Search a folder that contains a given filename.
Definition: gphoto2-filesys.c:1494
GP_STORAGEINFO_MAXCAPACITY
Maximum capacity in kbytes.
Definition: gphoto2-filesys.h:165
GP_STORAGEINFO_ST_UNKNOWN
Unknown storage type.
Definition: gphoto2-filesys.h:177
GP_FILE_INFO_SIZE
The filesize is set.
Definition: gphoto2-filesys.h:57
_CameraStorageInformation::capacitykbytes
unsigned long capacitykbytes
Total capacity in kbytes.
Definition: gphoto2-filesys.h:223
GP_STORAGEINFO_BASE
The base directory. Usually / if just 1 storage is attached.
Definition: gphoto2-filesys.h:155
_CameraFileInfoFile::size
unsigned long size
Size of the file.
Definition: gphoto2-filesys.h:97
_CameraFileInfoFile::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:95
GP_FILE_PERM_ALL
Internal.
Definition: gphoto2-filesys.h:75
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:1362
_CameraFileInfoPreview
File information of a preview file.
Definition: gphoto2-filesys.h:113
GP_STORAGEINFO_ST_REMOVABLE_RAM
A removable RAM storage. (any kind of cards etc)
Definition: gphoto2-filesys.h:181
_CameraFileInfoPreview::size
unsigned long size
Size of the preview.
Definition: gphoto2-filesys.h:116
gp_filesystem_delete_file_noop
int gp_filesystem_delete_file_noop(CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
Delete a virtal file from a folder in the filesystem.
Definition: gphoto2-filesys.c:1141
GP_FILE_INFO_MTIME
The modification time is set.
Definition: gphoto2-filesys.h:62
CameraFileInfoAudio
struct _CameraFileInfoAudio CameraFileInfoAudio
File information of an audio file.
_CameraStorageInformation::access
CameraStorageAccessType access
Access permissions.
Definition: gphoto2-filesys.h:222
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:1316
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:2420
CameraStorageInfoFields
CameraStorageInfoFields
Storage information flags.
Definition: gphoto2-filesys.h:154
_CameraFileInfoFile::width
unsigned int width
Height of the file.
Definition: gphoto2-filesys.h:100
GP_FILE_INFO_PERMISSIONS
The access permissions are set.
Definition: gphoto2-filesys.h:60
GP_STORAGEINFO_FREESPACEIMAGES
Free space in images.
Definition: gphoto2-filesys.h:167
GP_STORAGEINFO_FST_UNDEFINED
Undefined or unknown filesystem hierarchy.
Definition: gphoto2-filesys.h:203
GP_FILE_INFO_NONE
No fields set.
Definition: gphoto2-filesys.h:54
_CameraStorageInformation::description
char description[256]
Description of the storage.
Definition: gphoto2-filesys.h:219
CameraFileStatus
CameraFileStatus
Possible status values.
Definition: gphoto2-filesys.h:83
_CameraStorageInformation::fields
CameraStorageInfoFields fields
Bitmask of struct members that are specified.
Definition: gphoto2-filesys.h:216
_CameraFileInfoFile::name
char name[64]
Filename of the file.
Definition: gphoto2-filesys.h:102
file_list_func
int file_list_func(CameraFilesystem *fs, const char *folder, CameraList *list, void *data, GPContext *context)
Definition: template.c:400
_CameraStorageInformation::basedir
char basedir[256]
Basedirectory of the storage. Will be "/" if just 1 storage on the camera.
Definition: gphoto2-filesys.h:217
gp_filesystem_set_info_funcs
int gp_filesystem_set_info_funcs(CameraFilesystem *fs, CameraFilesystemGetInfoFunc get_info_func, CameraFilesystemSetInfoFunc set_info_func, void *data)
Set file information functions.
Definition: gphoto2-filesys.c:1840
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:935
get_file_func
int get_file_func(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, void *data, GPContext *context)
Definition: template.c:250
gp_filesystem_set_folder_funcs
int gp_filesystem_set_folder_funcs(CameraFilesystem *fs, CameraFilesystemPutFileFunc put_file_func, CameraFilesystemDeleteAllFunc delete_all_func, CameraFilesystemDirFunc make_dir_func, CameraFilesystemDirFunc remove_dir_func, void *data)
Set folder related functions of the filesystem.
Definition: gphoto2-filesys.c:1594
GP_STORAGEINFO_FREESPACEKBYTES
Free space in kbytes.
Definition: gphoto2-filesys.h:166
GP_STORAGEINFO_AC_READWRITE
Storage is Read / Write.
Definition: gphoto2-filesys.h:191
CameraFile
File structure.
gp_filesystem_new
int gp_filesystem_new(CameraFilesystem **fs)
Create a new filesystem struct.
Definition: gphoto2-filesys.c:660
GP_STORAGEINFO_ACCESS
Access permissions.
Definition: gphoto2-filesys.h:162
put_file_func
int put_file_func(CameraFilesystem *fs, const char *folder, CameraFile *file, void *data, GPContext *context)
Definition: template.c:274
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:1905
gphoto2-context.h
Context callback operation functions.
gp_filesystem_dump
int gp_filesystem_dump(CameraFilesystem *fs)
Dump the current filesystem.
Definition: gphoto2-filesys.c:788
GP_FILE_PERM_NONE
No permissions.
Definition: gphoto2-filesys.h:72
_CameraFileInfoAudio::type
char type[64]
MIME type of the audio file.
Definition: gphoto2-filesys.h:133
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:1001
GP_FILE_INFO_NAME
The name is set.
Definition: gphoto2-filesys.h:56
CameraFileInfoFile
struct _CameraFileInfoFile CameraFileInfoFile
File information of a regular file.
gp_filesystem_set_file_noop
int gp_filesystem_set_file_noop(CameraFilesystem *fs, const char *folder, CameraFile *file, GPContext *context)
Attach file content to a specified file.
Definition: gphoto2-filesys.c:2250
_CameraStorageInformation::type
CameraStorageType type
Hardware type of the storage.
Definition: gphoto2-filesys.h:220
_CameraFileInfoAudio
File information of an audio file.
Definition: gphoto2-filesys.h:129
GP_FILE_STATUS_DOWNLOADED
Definition: gphoto2-filesys.h:85
GP_FILE_INFO_TYPE
The MIME type is set.
Definition: gphoto2-filesys.h:55
gp_filesystem_set_list_funcs
int gp_filesystem_set_list_funcs(CameraFilesystem *fs, CameraFilesystemListFunc file_list_func, CameraFilesystemListFunc folder_list_func, void *data)
Set the functions to list folders and files.
Definition: gphoto2-filesys.c:1527
gp_filesystem_reset
int gp_filesystem_reset(CameraFilesystem *fs)
Clear the filesystem.
Definition: gphoto2-filesys.c:636
_CameraStorageInformation::label
char label[256]
Label of the storage. Similar to DOS label.
Definition: gphoto2-filesys.h:218
_CameraFileInfoAudio::size
unsigned long size
Size of the audio file.
Definition: gphoto2-filesys.h:132
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:1167
GP_FILE_PERM_READ
Read permissions.
Definition: gphoto2-filesys.h:73
gp_filesystem_set_file_funcs
int gp_filesystem_set_file_funcs(CameraFilesystem *fs, CameraFilesystemGetFileFunc get_file_func, CameraFilesystemDeleteFileFunc del_file_func, void *data)
Set camera filesystem file related functions.
Definition: gphoto2-filesys.c:1557
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:874
gphoto2-file.h
Abstracted gphoto2 file operations.
GP_STORAGEINFO_FST_DCF
DCIM style storage.
Definition: gphoto2-filesys.h:206
gp_filesystem_set_info_noop
int gp_filesystem_set_info_noop(CameraFilesystem *fs, const char *folder, CameraFileInfo info, GPContext *context)
Store the file information in the virtual fs.
Definition: gphoto2-filesys.c:2389
CameraStorageAccessType
CameraStorageAccessType
Storage access modes.
Definition: gphoto2-filesys.h:190
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:1060
_CameraFileInfo
File information structure.
Definition: gphoto2-filesys.h:142
_CameraStorageInformation::fstype
CameraStorageFilesystemType fstype
Hierarchy type of the filesystem.
Definition: gphoto2-filesys.h:221
set_info_func
int set_info_func(CameraFilesystem *fs, const char *folder, const char *file, CameraFileInfo info, void *data, GPContext *context)
Definition: template.c:360
GP_STORAGEINFO_LABEL
Label of the filesystem. Could also be a DOS label.
Definition: gphoto2-filesys.h:158
GP_STORAGEINFO_FILESYSTEMTYPE
Filesystem type.
Definition: gphoto2-filesys.h:164
delete_all_func
int delete_all_func(CameraFilesystem *fs, const char *folder, void *data, GPContext *context)
Definition: template.c:317
CameraStorageInformation
struct _CameraStorageInformation CameraStorageInformation
Storage information structue.
_CameraFilesystem
The internal camera filesystem structure.
Definition: gphoto2-filesys.c:241
GP_FILE_INFO_ALL
All possible fields set. Internal.
Definition: gphoto2-filesys.h:63
_CameraFileInfoFile::status
CameraFileStatus status
Status of the file.
Definition: gphoto2-filesys.h:96
_CameraStorageInformation::freeimages
unsigned long freeimages
Free space in images (guessed by camera).
Definition: gphoto2-filesys.h:225
_CameraFileInfoFile::permissions
CameraFilePermissions permissions
Permissions of the file.
Definition: gphoto2-filesys.h:103
_CameraFileInfoPreview::width
unsigned int width
Width of the preview.
Definition: gphoto2-filesys.h:119
_CameraFileInfoPreview::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:114
GP_FILE_INFO_HEIGHT
The height is set.
Definition: gphoto2-filesys.h:59
gp_filesystem_append
int gp_filesystem_append(CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
Append a file to a folder in a filesystem.
Definition: gphoto2-filesys.c:721
GP_STORAGEINFO_STORAGETYPE
Hardware type.
Definition: gphoto2-filesys.h:163
CameraStorageType
CameraStorageType
Hardware storage types.
Definition: gphoto2-filesys.h:176
_CameraFilesystemFuncs
Definition: gphoto2-filesys.h:348
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:1201
_CameraFileInfoPreview::height
unsigned int height
Height of the preview.
Definition: gphoto2-filesys.h:120
CameraFilePermissions
CameraFilePermissions
Bitmask containing the file permission flags.
Definition: gphoto2-filesys.h:71
CameraFileInfoFields
CameraFileInfoFields
Bitmask on what fields are set in the CameraFileInfo structure.
Definition: gphoto2-filesys.h:53
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:2528
_CameraFileInfoFile
File information of a regular file.
Definition: gphoto2-filesys.h:94
GP_FILE_INFO_WIDTH
The width is set.
Definition: gphoto2-filesys.h:58
GP_STORAGEINFO_DESCRIPTION
More verbose description.
Definition: gphoto2-filesys.h:161
GP_FILE_STATUS_NOT_DOWNLOADED
Definition: gphoto2-filesys.h:84
GP_STORAGEINFO_FST_GENERICFLAT
Generic flat storage (all in 1 directory).
Definition: gphoto2-filesys.h:204
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:1866
gp_filesystem_put_file
int gp_filesystem_put_file(CameraFilesystem *fs, const char *folder, CameraFile *file, GPContext *context)
Upload a file to a folder on the device filesystem.
Definition: gphoto2-filesys.c:1276
_CameraFileInfoFile::height
unsigned int height
Width of the file.
Definition: gphoto2-filesys.h:101
GP_STORAGEINFO_FST_GENERICHIERARCHICAL
Generic tree hierarchy.
Definition: gphoto2-filesys.h:205
get_info_func
int get_info_func(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo *info, void *data, GPContext *context)
Definition: template.c:342
GP_STORAGEINFO_AC_READONLY_WITH_DELETE
Storage is Ready Only, but allows Delete.
Definition: gphoto2-filesys.h:193
_CameraStorageInformation::freekbytes
unsigned long freekbytes
Free space in kbytes.
Definition: gphoto2-filesys.h:224
GP_FILE_INFO_STATUS
The status is set (downloaded).
Definition: gphoto2-filesys.h:61
CameraFileType
CameraFileType
The type of view on the specified file.
Definition: gphoto2-file.h:66
CameraFileInfoPreview
struct _CameraFileInfoPreview CameraFileInfoPreview
File information of a preview file.
_CameraStorageInformation
Storage information structue.
Definition: gphoto2-filesys.h:215
_GPContext
Definition: gphoto2-context.c:35
GP_FILE_PERM_DELETE
Write permissions.
Definition: gphoto2-filesys.h:74
_CameraFileInfoAudio::status
CameraFileStatus status
Status of the preview file.
Definition: gphoto2-filesys.h:131
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:1097
GP_STORAGEINFO_ST_REMOVABLE_ROM
A removable ROM storage.
Definition: gphoto2-filesys.h:179
_CameraFileInfoPreview::status
CameraFileStatus status
Status of the preview.
Definition: gphoto2-filesys.h:115
GP_STORAGEINFO_ST_FIXED_ROM
A fixed ROM storage.
Definition: gphoto2-filesys.h:178
CameraFileInfo
struct _CameraFileInfo CameraFileInfo
File information structure.