organizing code
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@1014 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
## Process this file with automake to generate a GNU Makefile
|
||||
|
||||
gphotoheaddir = $(prefix)/include/gphoto2
|
||||
gphotohead_HEADERS= gphoto2.h \
|
||||
gphoto2-core.h \
|
||||
gphoto2-datatypes.h \
|
||||
gphoto2-interface.h \
|
||||
gphoto2-library.h
|
||||
gphotohead_HEADERS= \
|
||||
gphoto2.h \
|
||||
gphoto2-camera.h \
|
||||
gphoto2-core.h \
|
||||
gphoto2-datatypes.h \
|
||||
gphoto2-file.h \
|
||||
gphoto2-filesys.h \
|
||||
gphoto2-library.h \
|
||||
gphoto2-lists.h \
|
||||
gphoto2-settings.h \
|
||||
gphoto2-widget.h
|
||||
|
||||
42
include/gphoto2-camera.h
Normal file
42
include/gphoto2-camera.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Header file for gPhoto2
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
int gp_camera_count ();
|
||||
int gp_camera_name (int camera_number, char *camera_name);
|
||||
|
||||
int gp_camera_abilities (int camera_number, CameraAbilities *abilities);
|
||||
int gp_camera_abilities_by_name (char *camera_name, CameraAbilities *abilities);
|
||||
|
||||
int gp_camera_new (Camera **camera, int camera_number, CameraPortInfo *port);
|
||||
int gp_camera_new_by_name (Camera **camera, char *camera_name, CameraPortInfo *port);
|
||||
|
||||
int gp_camera_free (Camera *camera);
|
||||
|
||||
int gp_camera_folder_list (Camera *camera, CameraList *list, char *folder);
|
||||
int gp_camera_file_list (Camera *camera, CameraList *list, char *folder);
|
||||
|
||||
int gp_camera_file_get (Camera *camera, CameraFile *file,
|
||||
char *folder, char *filename);
|
||||
int gp_camera_file_get_preview (Camera *camera, CameraFile *file,
|
||||
char *folder, char *filename);
|
||||
|
||||
int gp_camera_file_put (Camera *camera, CameraFile *file, char *folder);
|
||||
int gp_camera_file_delete (Camera *camera, char *folder, char *filename);
|
||||
|
||||
int gp_camera_capture (Camera *camera, CameraFile *file, CameraCaptureInfo *info);
|
||||
|
||||
int gp_camera_summary (Camera *camera, CameraText *summary);
|
||||
int gp_camera_manual (Camera *camera, CameraText *manual);
|
||||
int gp_camera_about (Camera *camera, CameraText *about);
|
||||
|
||||
int gp_camera_config_get (Camera *camera, CameraWidget *window);
|
||||
int gp_camera_config_set (Camera *camera, CameraSetting *setting, int count);
|
||||
|
||||
int gp_camera_status (Camera *camera, char *status);
|
||||
int gp_camera_message (Camera *camera, char *message);
|
||||
int gp_camera_confirm (Camera *camera, char *message);
|
||||
int gp_camera_progress (Camera *camera, CameraFile *file, float percentage);
|
||||
@@ -184,6 +184,8 @@ typedef struct {
|
||||
long int size;
|
||||
char *data;
|
||||
int bytes_read;
|
||||
|
||||
int session;
|
||||
} CameraFile;
|
||||
|
||||
/* Entry in a folder on the camera */
|
||||
@@ -279,6 +281,8 @@ typedef struct Camera {
|
||||
|
||||
void *camlib_data;
|
||||
void *frontend_data;
|
||||
|
||||
int session;
|
||||
} Camera;
|
||||
|
||||
/* Interface function pointers */
|
||||
|
||||
17
include/gphoto2-file.h
Normal file
17
include/gphoto2-file.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Header file for gPhoto2
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
CameraFile* gp_file_new ();
|
||||
|
||||
int gp_file_save (CameraFile *file, char *filename);
|
||||
int gp_file_open (CameraFile *file, char *filename);
|
||||
|
||||
int gp_file_clean (CameraFile *file);
|
||||
int gp_file_free (CameraFile *file);
|
||||
|
||||
int gp_file_append (CameraFile *file, char *data, int size);
|
||||
int gp_file_get_last_chunk (CameraFile *file, char **data, int *size);
|
||||
32
include/gphoto2-filesys.h
Normal file
32
include/gphoto2-filesys.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/* Header file for gPhoto2
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
|
||||
/* NOTE: These functions are provided for cameras that do not support filenames. */
|
||||
/* This sets up an emulation layer to let those cameras work properly with the */
|
||||
/* filename-centric gPhoto2 API. */
|
||||
|
||||
CameraFilesystem* gp_filesystem_new ();
|
||||
int gp_filesystem_free (CameraFilesystem *fs);
|
||||
|
||||
int gp_filesystem_populate (CameraFilesystem *fs, char *folder,
|
||||
char *format, int count);
|
||||
|
||||
int gp_filesystem_append (CameraFilesystem *fs, char *folder,
|
||||
char *filename);
|
||||
|
||||
int gp_filesystem_format (CameraFilesystem *fs);
|
||||
int gp_filesystem_delete (CameraFilesystem *fs, char *folder,
|
||||
char *filename);
|
||||
|
||||
int gp_filesystem_count (CameraFilesystem *fs, char *folder);
|
||||
|
||||
|
||||
char* gp_filesystem_name (CameraFilesystem *fs, char *folder,
|
||||
int filenumber);
|
||||
int gp_filesystem_number (CameraFilesystem *fs, char *folder,
|
||||
char *filename);
|
||||
@@ -1,22 +0,0 @@
|
||||
/* Header file for gPhoto 0.5-Dev
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
|
||||
/* Functions required to be provided by the front-end interface
|
||||
---------------------------------------------------------------- */
|
||||
|
||||
/* Displays the current status on an operation in the camera */
|
||||
int gp_interface_status (Camera *camera, char *status);
|
||||
|
||||
/* Displays a percentage done in the current operation */
|
||||
int gp_interface_progress (Camera *camera, CameraFile *file, float percentage);
|
||||
|
||||
/* Displays a message (error, very important info) */
|
||||
int gp_interface_message (Camera *camera, char *message);
|
||||
|
||||
/* Displays a configuration */
|
||||
int gp_interface_confirm (Camera *camera, char *message);
|
||||
26
include/gphoto2-lists.h
Normal file
26
include/gphoto2-lists.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/* Header file for gPhoto2
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
CameraList* gp_list_new ();
|
||||
int gp_list_free (CameraList *list);
|
||||
|
||||
int gp_list_count (CameraList *list);
|
||||
|
||||
int gp_list_append (CameraList *list, char *name, CameraListType type);
|
||||
|
||||
CameraListEntry* gp_list_entry (CameraList *list, int entrynum);
|
||||
|
||||
CameraAbilities* gp_abilities_new ();
|
||||
int gp_abilities_free (CameraAbilities *abilities);
|
||||
|
||||
CameraAbilitiesList* gp_abilities_list_new ();
|
||||
int gp_abilities_list_free (CameraAbilitiesList *list);
|
||||
|
||||
int gp_abilities_list_dump (CameraAbilitiesList *list);
|
||||
|
||||
int gp_abilities_list_append (CameraAbilitiesList *list,
|
||||
CameraAbilities *abilities);
|
||||
11
include/gphoto2-settings.h
Normal file
11
include/gphoto2-settings.h
Normal file
@@ -0,0 +1,11 @@
|
||||
/* Header file for gPhoto2
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
|
||||
int gp_setting_set (char *id, char *key, char *value);
|
||||
|
||||
int gp_setting_get (char *id, char *key, char *value);
|
||||
34
include/gphoto2-widget.h
Normal file
34
include/gphoto2-widget.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Header file for gPhoto2
|
||||
|
||||
Author: Scott Fritzinger <scottf@unr.edu>
|
||||
|
||||
This library is covered by the LGPL.
|
||||
*/
|
||||
|
||||
CameraWidget* gp_widget_new (CameraWidgetType type, char *label);
|
||||
int gp_widget_free (CameraWidget *widget);
|
||||
|
||||
int gp_widget_append (CameraWidget *parent, CameraWidget *child);
|
||||
int gp_widget_prepend (CameraWidget *parent, CameraWidget *child);
|
||||
|
||||
int gp_widget_child_count(CameraWidget *parent);
|
||||
|
||||
CameraWidget* gp_widget_child(CameraWidget *parent, int child_number);
|
||||
CameraWidget* gp_widget_child_by_label(CameraWidget *parent, char *child_label);
|
||||
|
||||
int gp_widget_type (CameraWidget *widget);
|
||||
char* gp_widget_label(CameraWidget *widget);
|
||||
|
||||
int gp_widget_value_set (CameraWidget *widget, char *value);
|
||||
char* gp_widget_value_get (CameraWidget *widget);
|
||||
|
||||
int gp_widget_range_set (CameraWidget *range, float low, float high,
|
||||
float increment);
|
||||
int gp_widget_range_get (CameraWidget *range, float *low, float *high,
|
||||
float *increment);
|
||||
|
||||
int gp_widget_choice_add (CameraWidget *widget, char *choice);
|
||||
int gp_widget_choice_count (CameraWidget *widget);
|
||||
char* gp_widget_choice (CameraWidget *widget, int choice_number);
|
||||
|
||||
int gp_widget_dump (CameraWidget *widget);
|
||||
@@ -18,7 +18,13 @@
|
||||
|
||||
#include <gpio.h>
|
||||
#include <gphoto2-datatypes.h>
|
||||
#include <gphoto2-camera.h>
|
||||
#include <gphoto2-core.h>
|
||||
#include <gphoto2-file.h>
|
||||
#include <gphoto2-filesys.h>
|
||||
#include <gphoto2-library.h>
|
||||
#include <gphoto2-lists.h>
|
||||
#include <gphoto2-settings.h>
|
||||
#include <gphoto2-widget.h>
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user