libgphoto2 photo camera library (libgphoto2) API
2.5.10.1
|
Camery driver header. More...
Go to the source code of this file.
Typedefs | |
typedef int(* | CameraLibraryIdFunc) (CameraText *id) |
Returns a unique id for the camera driver. More... | |
typedef int(* | CameraLibraryAbilitiesFunc) (CameraAbilitiesList *list) |
Adds the abilities of the supported models to the supplied list. More... | |
typedef int(* | CameraLibraryInitFunc) (Camera *camera, GPContext *context) |
Initializes the camera. More... | |
Functions | |
int | camera_id (CameraText *id) |
Get a unique camera id. More... | |
int | camera_abilities (CameraAbilitiesList *list) |
Get a list of abilities of all supported cameras. More... | |
int | camera_init (Camera *camera, GPContext *context) |
Camery driver header.
typedef int(* CameraLibraryAbilitiesFunc) (CameraAbilitiesList *list) |
Adds the abilities of the supported models to the supplied list.
list | a CameraAbilitiesList |
typedef int(* CameraLibraryIdFunc) (CameraText *id) |
Initializes the camera.
The camera driver will establish a first connection to the camera and configure the camera variable (i.e. using #gp_filesystem_set_list_funcs or gp_port_get_settings).
int camera_abilities | ( | CameraAbilitiesList * | list | ) |
Get a list of abilities of all supported cameras.
list | a CameraAbilitiesList |
This function should use gp_abilities_list_append as many times as the number of models the camera driver supports. That is, fill out (in a loop) the CameraAbilities for each model and append each of those to the supplied list using gp_abilities_list_append(). Then, return GP_OK.
Fill list with abilities of the cameras supported by this camlib.
For each camera, fill a CameraAbilities structure with data about that camera and append it to the list.
The job of this function is basically to extract data from a camlib specific database and insert it into the libgphoto2 camera database. Due to redundant data and other issues, we may decide to revise that database mechanism and replace it by something more flexible and efficient.
This is a camlib API function.
References CameraAbilities::file_operations, CameraAbilities::folder_operations, gp_abilities_list_append(), GP_CAPTURE_IMAGE, GP_DRIVER_STATUS_PRODUCTION, GP_FILE_OPERATION_DELETE, GP_FILE_OPERATION_PREVIEW, GP_FOLDER_OPERATION_NONE, GP_OK, GP_OPERATION_CAPTURE_PREVIEW, GP_PORT_SERIAL, GP_PORT_USB, CameraAbilities::model, CameraAbilities::operations, CameraAbilities::port, CameraAbilities::speed, and CameraAbilities::status.
int camera_id | ( | CameraText * | id | ) |
Get a unique camera id.
id | a CameraText that receives the id string |
This function should write a unique id into id and return GP_OK. That is, choose a unique id, use strncpy in order to copy it into the id, and return GP_OK. The driver name should suffice.
Set library ID string.
Probably redundant and to be removed shortly, being replaced by the libtool module name defined in the build system.
This is a camlib API function.
References GP_OK, and CameraText::text.
Initialize a Camera object.
Sets up all the proper object function pointers, initialize camlib internal data structures, and probably establish a connection to the camera.
This is a camlib API function.
References _CameraFunctions::about, camera_about(), camera_capture(), camera_capture_preview(), camera_config_get(), camera_config_set(), camera_exit(), camera_manual(), camera_summary(), _CameraFunctions::capture, _CameraFunctions::capture_preview, _CameraFunctions::exit, _CameraFunctions::get_config, gp_filesystem_set_funcs(), GP_OK, _CameraFunctions::manual, _CameraFunctions::set_config, and _CameraFunctions::summary.