diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2009-04-10 12:43:50 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2009-04-10 12:43:50 +0000 |
commit | 5e26cd696d55683f514a574e6590afbdc5fa7bd3 (patch) | |
tree | 67b3b0a513bfe1bc3fde49843e78df6f85ccc05e /libgphoto2/gphoto2-camera.c | |
parent | c048616a7c3fdab64a2c933113ec1c004d795e0f (diff) | |
download | libgphoto2-5e26cd696d55683f514a574e6590afbdc5fa7bd3.tar.gz |
add a new trigger capture function (just triggers capture, no results)
added a new CAPTURE_COMPLETE event for wait_for_event.
some deprecated stuff removed.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11958 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2/gphoto2-camera.c')
-rw-r--r-- | libgphoto2/gphoto2-camera.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libgphoto2/gphoto2-camera.c b/libgphoto2/gphoto2-camera.c index 5d4835367..8e5afa8fe 100644 --- a/libgphoto2/gphoto2-camera.c +++ b/libgphoto2/gphoto2-camera.c @@ -1039,6 +1039,34 @@ gp_camera_capture (Camera *camera, CameraCaptureType type, } /** + * Triggers capture of one or more images. + * + * @param camera a #Camera + * @param context a #GPContext + * @return a gphoto2 error code + * + * This functions just remotely causes the shutter release and returns + * immediately. You will want to run #gp_camera_wait_event until a image + * is added which can be downloaded using #gp_camera_file_get. + **/ +int +gp_camera_trigger_capture (Camera *camera, GPContext *context) +{ + CHECK_NULL (camera); + CHECK_INIT (camera, context); + + if (!camera->functions->trigger_capture) { + gp_context_error (context, _("This camera can not trigger capture.")); + CAMERA_UNUSED (camera, context); + return (GP_ERROR_NOT_SUPPORTED); + } + CHECK_RESULT_OPEN_CLOSE (camera, camera->functions->trigger_capture (camera, + context), context); + CAMERA_UNUSED (camera, context); + return (GP_OK); +} + +/** * Captures a preview that won't be stored on the camera but returned in * supplied file. * |