1 #ifndef __SAMPLES_H 2 #define __SAMPLES_H 3 #include <gphoto2/gphoto2-camera.h> 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 extern int sample_autodetect (CameraList *list, GPContext *context); 10 extern int sample_open_camera (Camera ** camera, const char *model, const char *port, GPContext *context); 11 extern GPContext* sample_create_context(void); 12 13 extern int get_config_value_string (Camera *, const char *, char **, GPContext *); 14 extern int set_config_value_string (Camera *, const char *, const char *, GPContext *); 15 int canon_enable_capture (Camera *camera, int onoff, GPContext *context); 16 17 extern int camera_auto_focus (Camera *list, GPContext *context, int onoff); 18 extern int camera_eosviewfinder (Camera *list, GPContext *context, int onoff); 19 extern int camera_manual_focus (Camera *list, int tgt, GPContext *context); 20 21 #if !defined (O_BINARY) 22 /*To have portable binary open() on *nix and on Windows */ 23 #define O_BINARY 0 24 #endif 25 26 #ifdef __cplusplus 27 }; 28 #endif 29 30 #endif 31