26 #ifndef __GPHOTO2_FILE_H__ 27 #define __GPHOTO2_FILE_H__ 36 #define GP_MIME_TXT "text/plain" 37 #define GP_MIME_WAV "audio/wav" 38 #define GP_MIME_RAW "image/x-raw" 39 #define GP_MIME_PNG "image/png" 40 #define GP_MIME_PGM "image/x-portable-graymap" 41 #define GP_MIME_PPM "image/x-portable-pixmap" 42 #define GP_MIME_PNM "image/x-portable-anymap" 43 #define GP_MIME_JPEG "image/jpeg" 44 #define GP_MIME_TIFF "image/tiff" 45 #define GP_MIME_BMP "image/bmp" 46 #define GP_MIME_QUICKTIME "video/quicktime" 47 #define GP_MIME_AVI "video/x-msvideo" 48 #define GP_MIME_CRW "image/x-canon-raw" 49 #define GP_MIME_CR2 "image/x-canon-cr2" 50 #define GP_MIME_NEF "image/x-nikon-nef" 51 #define GP_MIME_UNKNOWN "application/octet-stream" 52 #define GP_MIME_EXIF "application/x-exif" 53 #define GP_MIME_MP3 "audio/mpeg" 54 #define GP_MIME_OGG "application/ogg" 55 #define GP_MIME_WMA "audio/x-wma" 56 #define GP_MIME_ASF "audio/x-asf" 57 #define GP_MIME_MPEG "video/mpeg" 58 #define GP_MIME_AVCHD "video/mp2t" 59 #define GP_MIME_RW2 "image/x-panasonic-raw2" 60 #define GP_MIME_ARW "image/x-sony-arw" 97 int (*size) (
void*priv, uint64_t *size);
98 int (*read) (
void*priv,
unsigned char *data, uint64_t *len);
99 int (*write) (
void*priv,
unsigned char *data, uint64_t *len);
133 unsigned long int size);
135 unsigned long int *size);
160 int gp_file_open (CameraFile *file,
const char *filename);
161 int gp_file_save (CameraFile *file,
const char *filename);
163 int gp_file_copy (CameraFile *destination, CameraFile *source);
168 unsigned long int size);
170 size_t size,
size_t *readlen);
Definition: gphoto2-file.h:74
int gp_file_save(CameraFile *file, const char *filename)
Definition: gphoto2-file.c:480
Definition: gphoto2-file.h:91
int gp_file_free(CameraFile *file)
descruct a CameraFile object.
Definition: gphoto2-file.c:145
Definition: gphoto2-file.h:73
Definition: gphoto2-file.h:79
int gp_file_new_from_fd(CameraFile **file, int fd)
Definition: gphoto2-file.c:103
int gp_file_new_from_handler(CameraFile **file, CameraFileHandler *handler, void *priv)
Definition: gphoto2-file.c:124
int gp_file_get_name_by_type(CameraFile *file, const char *basename, CameraFileType type, char **newname)
Definition: gphoto2-file.c:893
int gp_file_set_mtime(CameraFile *file, time_t mtime)
Definition: gphoto2-file.c:1141
int gp_file_get_mime_type(CameraFile *file, const char **mime_type)
Definition: gphoto2-file.c:973
Definition: gphoto2-file.h:80
Definition: gphoto2-file.h:75
Definition: gphoto2-file.h:92
int gp_file_detect_mime_type(CameraFile *file)
Definition: gphoto2-file.c:1023
int gp_file_adjust_name_for_mime_type(CameraFile *file)
Definition: gphoto2-file.c:1077
int gp_file_new(CameraFile **file)
Definition: gphoto2-file.c:83
int gp_file_set_data_and_size(CameraFile *, char *data, unsigned long int size)
Definition: gphoto2-file.c:311
int gp_file_get_name(CameraFile *file, const char **name)
Definition: gphoto2-file.c:867
int gp_file_set_mime_type(CameraFile *file, const char *mime_type)
Definition: gphoto2-file.c:1007
Definition: gphoto2-file.h:78
int gp_file_open(CameraFile *file, const char *filename)
Definition: gphoto2-file.c:597
int gp_file_slurp(CameraFile *, char *data, size_t size, size_t *readlen)
Definition: gphoto2-file.c:252
int gp_file_get_mtime(CameraFile *file, time_t *mtime)
Definition: gphoto2-file.c:1124
Definition: gphoto2-file.h:96
Definition: gphoto2-file.h:90
int gp_file_clean(CameraFile *file)
Definition: gphoto2-file.c:693
int gp_file_get_data_and_size(CameraFile *, const char **data, unsigned long int *size)
Definition: gphoto2-file.c:392
int gp_file_append(CameraFile *, const char *data, unsigned long int size)
Definition: gphoto2-file.c:203
int gp_file_copy(CameraFile *destination, CameraFile *source)
Definition: gphoto2-file.c:723
CameraFileAccessType
File storage type.
Definition: gphoto2-file.h:89
int gp_file_ref(CameraFile *file)
Increase reference counter for CameraFile object.
Definition: gphoto2-file.c:165
int gp_file_set_name(CameraFile *file, const char *name)
Definition: gphoto2-file.c:990
int gp_file_unref(CameraFile *file)
Decrease reference counter for CameraFile object.
Definition: gphoto2-file.c:182
CameraFileType
The type of view on the specified file.
Definition: gphoto2-file.h:72
Definition: gphoto2-file.c:55