Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

gphoto2-camera.h File Reference


Detailed Description

Implement Camera object representing a camera attached to the system.

Copyright 2000 Scott Fritzinger

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file gphoto2-camera.h.

#include <gphoto2-context.h>
#include <gphoto2-port.h>
#include <gphoto2-port-info-list.h>
#include <gphoto2-widget.h>
#include <gphoto2-list.h>
#include <gphoto2-file.h>
#include <gphoto2-filesys.h>
#include <gphoto2-abilities-list.h>
#include <gphoto2-result.h>

Go to the source code of this file.

Classes

struct  _Camera
struct  _CameraFunctions
struct  CameraFilePath
struct  CameraText

Some cameras need 'keep-alive-messages'.

typedef int(* CameraTimeoutFunc )(Camera *camera, GPContext *context)
typedef unsigned int(* CameraTimeoutStartFunc )(Camera *camera, unsigned int timeout, CameraTimeoutFunc func, void *data)
typedef void(* CameraTimeoutStopFunc )(Camera *camera, unsigned int id, void *data)
void gp_camera_set_timeout_funcs (Camera *camera, CameraTimeoutStartFunc start_func, CameraTimeoutStopFunc stop_func, void *data)
int gp_camera_start_timeout (Camera *camera, unsigned int timeout, CameraTimeoutFunc func)
void gp_camera_stop_timeout (Camera *camera, unsigned int id)
 Stop periodic calls to keepalive function.

Typedefs

typedef struct _Camera Camera
 Object representing a camera attached to the system.
typedef struct _CameraFunctions CameraFunctions
typedef GPPort CameraPort
typedef GPPortInfo CameraPortInfo
typedef int(* CameraPrePostFunc )(Camera *camera, GPContext *context)
typedef struct _CameraPrivateCore CameraPrivateCore
typedef struct
_CameraPrivateLibrary 
CameraPrivateLibrary
Camera object member functions
These functions must be implemented by a camlib and the camlib's camera_init() function will add them to a Camera object.

typedef int(* CameraAboutFunc )(Camera *camera, CameraText *text, GPContext *context)
typedef int(* CameraCaptureFunc )(Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context)
typedef int(* CameraCapturePreviewFunc )(Camera *camera, CameraFile *file, GPContext *context)
typedef int(* CameraExitFunc )(Camera *camera, GPContext *context)
typedef int(* CameraGetConfigFunc )(Camera *camera, CameraWidget **widget, GPContext *context)
typedef int(* CameraManualFunc )(Camera *camera, CameraText *text, GPContext *context)
typedef int(* CameraSetConfigFunc )(Camera *camera, CameraWidget *widget, GPContext *context)
typedef int(* CameraSummaryFunc )(Camera *camera, CameraText *text, GPContext *context)
typedef int(* CameraWaitForEvent )(Camera *camera, int timeout, CameraEventType *eventtype, void **eventdata, GPContext *context)

Enumerations

enum  CameraCaptureType { GP_CAPTURE_IMAGE, GP_CAPTURE_MOVIE, GP_CAPTURE_SOUND }
enum  CameraEventType { GP_EVENT_UNKNOWN, GP_EVENT_TIMEOUT, GP_EVENT_FILE_ADDED, GP_EVENT_FOLDER_ADDED }

Functions

int gp_camera_new (Camera **camera)
 Allocates the memory for a Camera.
Operations on cameras
int gp_camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context)
int gp_camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
int gp_camera_free (Camera *camera)
 Free the camera.
int gp_camera_get_about (Camera *camera, CameraText *about, GPContext *context)
int gp_camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
 Retrieve a configuration window for the camera.
int gp_camera_get_manual (Camera *camera, CameraText *manual, GPContext *context)
int gp_camera_get_summary (Camera *camera, CameraText *summary, GPContext *context)
int gp_camera_ref (Camera *camera)
 Increment the reference count of a .
int gp_camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
int gp_camera_unref (Camera *camera)
 Decrements the reference count of a Camera.
int gp_camera_wait_for_event (Camera *camera, int timeout, CameraEventType *eventtype, void **eventdata, GPContext *context)
 Wait for an event from the camera.
Initialization
int gp_camera_exit (Camera *camera, GPContext *context)
 Close connection to camera.
int gp_camera_init (Camera *camera, GPContext *context)
 Initiate a connection to the camera.
Operations on files
int gp_camera_file_delete (Camera *camera, const char *folder, const char *file, GPContext *context)
int gp_camera_file_get (Camera *camera, const char *folder, const char *file, CameraFileType type, CameraFile *camera_file, GPContext *context)
int gp_camera_file_get_info (Camera *camera, const char *folder, const char *file, CameraFileInfo *info, GPContext *context)
int gp_camera_file_set_info (Camera *camera, const char *folder, const char *file, CameraFileInfo info, GPContext *context)
Operations on folders
int gp_camera_folder_delete_all (Camera *camera, const char *folder, GPContext *context)
int gp_camera_folder_list_files (Camera *camera, const char *folder, CameraList *list, GPContext *context)
int gp_camera_folder_list_folders (Camera *camera, const char *folder, CameraList *list, GPContext *context)
int gp_camera_folder_make_dir (Camera *camera, const char *folder, const char *name, GPContext *context)
int gp_camera_folder_put_file (Camera *camera, const char *folder, CameraFile *file, GPContext *context)
int gp_camera_folder_remove_dir (Camera *camera, const char *folder, const char *name, GPContext *context)
Preparing initialization
int gp_camera_get_abilities (Camera *camera, CameraAbilities *abilities)
 Retrieve the abilities of the camera.
int gp_camera_get_port_info (Camera *camera, GPPortInfo *info)
int gp_camera_set_abilities (Camera *camera, CameraAbilities abilities)
 Sets the camera abilities.
int gp_camera_set_port_info (Camera *camera, GPPortInfo info)
camera speed
You normally don't use that. If you do, you prevent the camera driver from selecting the optimal speed.

int gp_camera_get_port_speed (Camera *camera)
 Retrieve the current speed.
int gp_camera_set_port_speed (Camera *camera, int speed)
 Set the camera speed.


Generated by  Doxygen 1.6.0   Back to index