libgphoto2 photo camera library (libgphoto2) API 2.5.24

jpeg.h
Go to the documentation of this file.
1
24 #ifndef __GPHOTO2_JPEG_H__
25 #define __GPHOTO2_JPEG_H__
26
27 #include <gphoto2/gphoto2-file.h>
28
29 typedef enum {
30 JPEG_START=0xD8, JPEG_COMMENT=0xFE, JPEG_APPO=0xE0,
31 JPEG_QUANTIZATION=0xDB, JPEG_HUFFMAN=0xC4, JPEG_SOFC0=0xC0,
32 JPEG_SSSEAHAL=0xDA, JPEG_EOI=0xD9
33 } jpegmarker;
34
35 typedef struct chunk{
36 int size;
37 unsigned char *data;
38 } chunk;
39
40 typedef char jpeg_quantization_table[64];
41
42 typedef struct jpeg {
43 int count;
44 struct chunk *marker[20]; /* I think this should be big enough */
45 }jpeg;
46
47 chunk *gpi_jpeg_chunk_new(int length);
48 chunk *gpi_jpeg_chunk_new_filled(int length, char *data);
49 void gpi_jpeg_chunk_destroy(chunk *mychunk);
50 void gpi_jpeg_chunk_print(chunk *mychunk);
51
52 char gpi_jpeg_findff(int *location, chunk *picture);
53 char gpi_jpeg_findactivemarker(char *id, int *location, chunk *picture);
54 char *gpi_jpeg_markername(unsigned int c);
55
56 jpeg *gpi_jpeg_new (void);
57 void gpi_jpeg_destroy (jpeg *myjpeg);
58 void gpi_jpeg_add_marker (jpeg *myjpeg, chunk *picture, int start, int end);
59 void gpi_jpeg_add_chunk (jpeg *myjpeg, chunk *source);
60 void gpi_jpeg_parse (jpeg *myjpeg, chunk *picture);
61 void gpi_jpeg_print (jpeg *myjpeg);
62
63 chunk *gpi_jpeg_make_start (void);
64 chunk *gpi_jpeg_make_SOFC (int width, int height,
65 char vh1, char vh2, char vh3,
66 char q1, char q2, char q3);
67 chunk *gpi_jpeg_makeSsSeAhAl (int huffset1, int huffset2, int huffset3);
68
69 void gpi_jpeg_print_quantization_table(jpeg_quantization_table *table);
70 chunk *gpi_jpeg_make_quantization(const jpeg_quantization_table * table, char number);
71 jpeg_quantization_table *gpi_jpeg_quantization2table(chunk *qmarker);
72
73 jpeg *gpi_jpeg_header(int width, int height,
74 char vh1, char vh2, char vh3,
75 char q1, char q2, char q3,
76 const jpeg_quantization_table *quant1, const jpeg_quantization_table *quant2,
77 char huffset1, char huffset2, char huffset3,
78 chunk *huff1, chunk *huff2, chunk *huff3, chunk *huff4);
79
80 char gpi_jpeg_write(CameraFile *file, const char *name, jpeg *myjpeg);
81 #endif
gp_file_set_mime_type
int gp_file_set_mime_type(CameraFile *file, const char *mime_type)
Definition: gphoto2-file.c:1013
gp_list_ref
int gp_list_ref(CameraList *list)
Increments the reference count of the list.
Definition: gphoto2-list.c:82
gp_file_unref
int gp_file_unref(CameraFile *file)
Decrease reference counter for CameraFile object.
Definition: gphoto2-file.c:184
gp_widget_changed
int gp_widget_changed(CameraWidget *widget)
Tells if the widget has been changed.
Definition: gphoto2-widget.c:823
gp_file_adjust_name_for_mime_type
int gp_file_adjust_name_for_mime_type(CameraFile *file)
Definition: gphoto2-file.c:1083
Setting
Definition: gphoto2-setting.c:47
gp_setting_set
int gp_setting_set(char *id, char *key, char *value)
Set a specific gphoto setting.
Definition: gphoto2-setting.c:107
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
gp_file_get_mtime
int gp_file_get_mtime(CameraFile *file, time_t *mtime)
Definition: gphoto2-file.c:1130
gp_file_new
int gp_file_new(CameraFile **file)
Definition: gphoto2-file.c:83
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:1516
gp_widget_count_children
int gp_widget_count_children(CameraWidget *widget)
Counts the children of the CameraWidget.
Definition: gphoto2-widget.c:529
gphoto2-widget.h
gp_file_append
int gp_file_append(CameraFile *file, const char *data, unsigned long int size)
Definition: gphoto2-file.c:205
_CameraFilesystemFolder
Definition: gphoto2-filesys.c:87
GP_ERROR_IO
#define GP_ERROR_IO
Generic I/O error.
Definition: gphoto2-port-result.h:58
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_list_get_name
int gp_list_get_name(CameraList *list, int index, const char **name)
Definition: gphoto2-list.c:280
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
CameraWidgetType
CameraWidgetType
Type of the widget to be created.
Definition: gphoto2-widget.h:54
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:1077
_CameraFile
Definition: gphoto2-file.c:55
gp_widget_get_child_by_label
int gp_widget_get_child_by_label(CameraWidget *widget, const char *label, CameraWidget **child)
Retrieves the child with label label of the CameraWidget.
Definition: gphoto2-widget.c:566
CameraFile
File structure.
GP_FILE_INFO_TYPE
@ GP_FILE_INFO_TYPE
The MIME type is set.
Definition: gphoto2-filesys.h:57
gp_list_populate
int gp_list_populate(CameraList *list, const char *format, int count)
Definition: gphoto2-list.c:373
GP_ERROR_IO_READ
#define GP_ERROR_IO_READ
I/O during read.
Definition: gphoto2-port-result.h:84
gp_list_count
int gp_list_count(CameraList *list)
Definition: gphoto2-list.c:229
camera_abilities
int camera_abilities(CameraAbilitiesList *list)
Get a list of abilities of all supported cameras.
Definition: gphoto2-library.c:56
gp_widget_prepend
int gp_widget_prepend(CameraWidget *widget, CameraWidget *child)
Prepends a CameraWidget to a CameraWidget.
Definition: gphoto2-widget.c:496
gp_filesystem_dump
int gp_filesystem_dump(CameraFilesystem *fs)
Dump the current filesystem.
Definition: gphoto2-filesys.c:806
gp_filesystem_reset
int gp_filesystem_reset(CameraFilesystem *fs)
Clear the filesystem.
Definition: gphoto2-filesys.c:631
GP_ERROR_CAMERA_ERROR
#define GP_ERROR_CAMERA_ERROR
Unspecified camera error.
Definition: gphoto2-result.h:117
GP_FILE_TYPE_PREVIEW
@ GP_FILE_TYPE_PREVIEW
Definition: gphoto2-file.h:74
_CameraFileInfoAudio::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:129
_CameraFileInfoFile::permissions
CameraFilePermissions permissions
Permissions of the file.
Definition: gphoto2-filesys.h:102
gp_list_reset
int gp_list_reset(CameraList *list)
Definition: gphoto2-list.c:148
gp_widget_get_id
int gp_widget_get_id(CameraWidget *widget, int *id)
Retrieves the unique id of the CameraWidget.
Definition: gphoto2-widget.c:269
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
gphoto2-version.h
GP_FILE_INFO_HEIGHT
@ GP_FILE_INFO_HEIGHT
The height is set.
Definition: gphoto2-filesys.h:60
GP_FILE_INFO_WIDTH
@ GP_FILE_INFO_WIDTH
The width is set.
Definition: gphoto2-filesys.h:59
GP_ERROR_FILE_EXISTS
#define GP_ERROR_FILE_EXISTS
File already exists.
Definition: gphoto2-result.h:50
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_FILE_ACCESSTYPE_MEMORY
@ GP_FILE_ACCESSTYPE_MEMORY
Definition: gphoto2-file.h:91
gp_list_get_value
int gp_list_get_value(CameraList *list, int index, const char **value)
Definition: gphoto2-list.c:301
gp_file_free
int gp_file_free(CameraFile *file)
descruct a CameraFile object.
Definition: gphoto2-file.c:147
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_FILE_INFO_STATUS
@ GP_FILE_INFO_STATUS
The status is set (downloaded).
Definition: gphoto2-filesys.h:62
jpeg
Definition: jpeg.h:42
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_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_ERROR_IO_WRITE
#define GP_ERROR_IO_WRITE
I/O during write.
Definition: gphoto2-port-result.h:88
_CameraFileInfoPreview::fields
CameraFileInfoFields fields
Bitmask containing the set members.
Definition: gphoto2-filesys.h:113
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
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
chunk
Definition: jpeg.h:35
gp_widget_get_value
int gp_widget_get_value(CameraWidget *widget, void *value)
Retrieves the value of the CameraWidget.
Definition: gphoto2-widget.c:434
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
gphoto2-result.h
CameraWidgetCallback
int(* CameraWidgetCallback)(Camera *, CameraWidget *, GPContext *)
Callback handler for Button widgets.
Definition: gphoto2-widget.h:71
gp_list_set_name
int gp_list_set_name(CameraList *list, int index, const char *name)
Definition: gphoto2-list.c:345
gp_widget_append
int gp_widget_append(CameraWidget *widget, CameraWidget *child)
Appends a CameraWidget to a CameraWidget.
Definition: gphoto2-widget.c:470
_CameraFileHandler
Definition: gphoto2-file.h:97
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
GP_FILE_TYPE_RAW
@ GP_FILE_TYPE_RAW
Definition: gphoto2-file.h:76
gp_widget_get_type
int gp_widget_get_type(CameraWidget *widget, CameraWidgetType *type)
Retrieves the type of the CameraWidget.
Definition: gphoto2-widget.c:344
GP_WIDGET_DATE
@ GP_WIDGET_DATE
Date entering widget.
Definition: gphoto2-widget.h:65
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:2201
gp_list_find_by_name
int gp_list_find_by_name(CameraList *list, int *index, const char *name)
Definition: gphoto2-list.c:249
GP_ERROR_BAD_PARAMETERS
#define GP_ERROR_BAD_PARAMETERS
Bad parameters passed.
Definition: gphoto2-port-result.h:38
gp_system_mkdir
int gp_system_mkdir(const char *dirname)
mkdir UNIX functionality
Definition: gphoto2-port-portability.c:180
_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
_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
PICTURES_TO_KEEP
#define PICTURES_TO_KEEP
Definition: gphoto2-filesys.c:102
GP_OK
#define GP_OK
Everything is OK.
Definition: gphoto2-port-result.h:30
gp_file_get_name
int gp_file_get_name(CameraFile *file, const char **name)
Definition: gphoto2-file.c:873
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:1825
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:1158
gp_widget_ref
int gp_widget_ref(CameraWidget *widget)
Increments the reference count for the CameraWidget.
Definition: gphoto2-widget.c:160
gphoto2-setting.h
gp_file_get_mime_type
int gp_file_get_mime_type(CameraFile *file, const char **mime_type)
Definition: gphoto2-file.c:979
GP_FILE_TYPE_EXIF
@ GP_FILE_TYPE_EXIF
Definition: gphoto2-file.h:80
gp_file_ref
int gp_file_ref(CameraFile *file)
Increase reference counter for CameraFile object.
Definition: gphoto2-file.c:167
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_widget_set_readonly
int gp_widget_set_readonly(CameraWidget *widget, int readonly)
Tells that the widget is readonly.
Definition: gphoto2-widget.c:310
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_widget_unref
int gp_widget_unref(CameraWidget *widget)
Decrements the reference count for the CameraWidget.
Definition: gphoto2-widget.c:177
gp_file_clean
int gp_file_clean(CameraFile *file)
Definition: gphoto2-file.c:699
gp_file_new_from_fd
int gp_file_new_from_fd(CameraFile **file, int fd)
Definition: gphoto2-file.c:105
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_widget_get_child_by_id
int gp_widget_get_child_by_id(CameraWidget *widget, int id, CameraWidget **child)
Retrieves the child with id id of the widget.
Definition: gphoto2-widget.c:603
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
_CameraFileInfoFile::mtime
time_t mtime
Modification time of the file.
Definition: gphoto2-filesys.h:103
_CameraFilesystemFile
Definition: gphoto2-filesys.c:68
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:2336
GP_ERROR_PATH_NOT_ABSOLUTE
#define GP_ERROR_PATH_NOT_ABSOLUTE
Path is not absolute.
Definition: gphoto2-result.h:99
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
gphoto2-filesys.h
Filesystem related operations and declarations.
_CameraFileInfo
File information structure.
Definition: gphoto2-filesys.h:141
GP_WIDGET_RANGE
@ GP_WIDGET_RANGE
Slider widget.
Definition: gphoto2-widget.h:60
gp_widget_get_info
int gp_widget_get_info(CameraWidget *widget, const char **info)
Retrieves the information about the widget.
Definition: gphoto2-widget.c:198
GP_ERROR
#define GP_ERROR
Generic Error.
Definition: gphoto2-port-result.h:34
gp_setting_get
int gp_setting_get(char *id, char *key, char *value)
Retrieve a specific gphoto setting.
Definition: gphoto2-setting.c:75
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_file_save
int gp_file_save(CameraFile *file, const char *filename)
Definition: gphoto2-file.c:486
GP_FILE_INFO_PERMISSIONS
@ GP_FILE_INFO_PERMISSIONS
The access permissions are set.
Definition: gphoto2-filesys.h:61
gp_widget_new
int gp_widget_new(CameraWidgetType type, const char *label, CameraWidget **widget)
Create a new widget.
Definition: gphoto2-widget.c:93
gphoto2-list.h
gp_result_as_string
const char * gp_result_as_string(int result)
Translate a gphoto error code into a localized string.
Definition: gphoto2-result.c:73
gp_file_slurp
int gp_file_slurp(CameraFile *file, char *data, size_t size, size_t *readlen)
Definition: gphoto2-file.c:254
gp_filesystem_new
int gp_filesystem_new(CameraFilesystem **fs)
Create a new filesystem struct.
Definition: gphoto2-filesys.c:659
_entry
Definition: gphoto2-list.c:42
GP_FILE_TYPE_AUDIO
@ GP_FILE_TYPE_AUDIO
Definition: gphoto2-file.h:79
gp_widget_get_root
int gp_widget_get_root(CameraWidget *widget, CameraWidget **root)
Retrieves the root of the CameraWidget.
Definition: gphoto2-widget.c:692
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
gp_widget_get_parent
int gp_widget_get_parent(CameraWidget *widget, CameraWidget **parent)
Retrieves the parent of a CameraWidget.
Definition: gphoto2-widget.c:674
CameraText::text
char text[32 *1024]
Character string containing the translated text.
Definition: gphoto2-camera.h:69
gp_list_new
int gp_list_new(CameraList **list)
Creates a new CameraList.
Definition: gphoto2-list.c:63
camera_id
int camera_id(CameraText *id)
Get a unique camera id.
Definition: gphoto2-library.c:38
GP_WIDGET_TEXT
@ GP_WIDGET_TEXT
Text widget.
Definition: gphoto2-widget.h:59
gp_widget_set_info
int gp_widget_set_info(CameraWidget *widget, const char *info)
Sets the information about the widget.
Definition: gphoto2-widget.c:216
gp_file_set_mtime
int gp_file_set_mtime(CameraFile *file, time_t mtime)
Definition: gphoto2-file.c:1147
GP_ERROR_CAMERA_BUSY
#define GP_ERROR_CAMERA_BUSY
The camera is already busy.
Definition: gphoto2-result.h:90
_CameraFilesystemFuncs
Definition: gphoto2-filesys.h:348
GP_FILE_INFO_SIZE
@ GP_FILE_INFO_SIZE
The filesize is set.
Definition: gphoto2-filesys.h:58
gp_list_unref
int gp_list_unref(CameraList *list)
Decrements the reference count of the list.
Definition: gphoto2-list.c:101
gp_file_new_from_handler
int gp_file_new_from_handler(CameraFile **file, CameraFileHandler *handler, void *private)
Definition: gphoto2-file.c:126
GP_FILE_ACCESSTYPE_HANDLER
@ GP_FILE_ACCESSTYPE_HANDLER
Definition: gphoto2-file.h:93
GP_ERROR_NO_SPACE
#define GP_ERROR_NO_SPACE
Not enough space.
Definition: gphoto2-result.h:132
gp_file_detect_mime_type
int gp_file_detect_mime_type(CameraFile *file)
Definition: gphoto2-file.c:1029
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_ERROR_CORRUPTED_DATA
#define GP_ERROR_CORRUPTED_DATA
Corrupted data received.
Definition: gphoto2-result.h:42
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
_CameraFilesystem
The internal camera filesystem structure.
Definition: gphoto2-filesys.c:242
gp_file_copy
int gp_file_copy(CameraFile *destination, CameraFile *source)
Definition: gphoto2-file.c:729
CameraFileAccessType
CameraFileAccessType
File storage type.
Definition: gphoto2-file.h:90
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:1385
GP_FILE_TYPE_METADATA
@ GP_FILE_TYPE_METADATA
Definition: gphoto2-file.h:81
CameraText
CameraText structure used in various functions.
Definition: gphoto2-camera.h:68
camera_init
int camera_init(Camera *camera)
Initialize the camera.
Definition: gphoto2-library.c:84
GP_FILE_INFO_MTIME
@ GP_FILE_INFO_MTIME
The modification time is set.
Definition: gphoto2-filesys.h:63
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
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
gp_file_open
int gp_file_open(CameraFile *file, const char *filename)
Definition: gphoto2-file.c:603
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:1339
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_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
gp_list_set_value
int gp_list_set_value(CameraList *list, int index, const char *value)
Definition: gphoto2-list.c:322
gp_file_set_data_and_size
int gp_file_set_data_and_size(CameraFile *file, char *data, unsigned long int size)
Definition: gphoto2-file.c:313
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
gphoto2-file.h
Abstracted gphoto2 file operations.
GP_ERROR_OS_FAILURE
#define GP_ERROR_OS_FAILURE
Unspecified failure of the operating system.
Definition: gphoto2-result.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_ERROR_DIRECTORY_EXISTS
#define GP_ERROR_DIRECTORY_EXISTS
Specified directory already exists.
Definition: gphoto2-result.h:83
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
gphoto2-library.h
Camery driver header.
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_port_result_as_string
const char * gp_port_result_as_string(int result)
Definition: gphoto2-port-result.c:54
GP_ERROR_NOT_SUPPORTED
#define GP_ERROR_NOT_SUPPORTED
Functionality not supported.
Definition: gphoto2-port-result.h:54
_GPContext
Definition: gphoto2-context.c:38
GP_FILE_ACCESSTYPE_FD
@ GP_FILE_ACCESSTYPE_FD
Definition: gphoto2-file.h:92
jpeg.h
GP_WIDGET_MENU
@ GP_WIDGET_MENU
Menu widget (same as RADIO).
Definition: gphoto2-widget.h:63
_CameraStorageInformation
Storage information structue.
Definition: gphoto2-filesys.h:214