libgphoto2 photo camera library (libgphoto2) API  2.5.10.1
gphoto2-abilities-list.h File Reference

List of supported camera models including their abilities. More...

Include dependency graph for gphoto2-abilities-list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CameraAbilities
 Describes the properties of a specific camera. More...
 

Typedefs

typedef struct _CameraAbilitiesList CameraAbilitiesList
 List of supported camera models including their abilities. More...
 

Enumerations

enum  CameraDriverStatus { GP_DRIVER_STATUS_PRODUCTION, GP_DRIVER_STATUS_TESTING, GP_DRIVER_STATUS_EXPERIMENTAL, GP_DRIVER_STATUS_DEPRECATED }
 
enum  GphotoDeviceType { GP_DEVICE_STILL_CAMERA = 0, GP_DEVICE_AUDIO_PLAYER = 1 << 0 }
 
enum  CameraOperation {
  GP_OPERATION_NONE = 0, GP_OPERATION_CAPTURE_IMAGE = 1 << 0, GP_OPERATION_CAPTURE_VIDEO = 1 << 1, GP_OPERATION_CAPTURE_AUDIO = 1 << 2,
  GP_OPERATION_CAPTURE_PREVIEW = 1 << 3, GP_OPERATION_CONFIG = 1 << 4, GP_OPERATION_TRIGGER_CAPTURE = 1 << 5
}
 
enum  CameraFileOperation {
  GP_FILE_OPERATION_NONE = 0, GP_FILE_OPERATION_DELETE = 1 << 1, GP_FILE_OPERATION_PREVIEW = 1 << 3, GP_FILE_OPERATION_RAW = 1 << 4,
  GP_FILE_OPERATION_AUDIO = 1 << 5, GP_FILE_OPERATION_EXIF = 1 << 6
}
 
enum  CameraFolderOperation {
  GP_FOLDER_OPERATION_NONE = 0, GP_FOLDER_OPERATION_DELETE_ALL = 1 << 0, GP_FOLDER_OPERATION_PUT_FILE = 1 << 1, GP_FOLDER_OPERATION_MAKE_DIR = 1 << 2,
  GP_FOLDER_OPERATION_REMOVE_DIR = 1 << 3
}
 

Functions

int gp_abilities_list_new (CameraAbilitiesList **list)
 Allocate the memory for a new abilities list. More...
 
int gp_abilities_list_free (CameraAbilitiesList *list)
 Free the given CameraAbilitiesList object. More...
 
int gp_abilities_list_load (CameraAbilitiesList *list, GPContext *context)
 Scans the system for camera drivers. More...
 
int gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir, GPContext *context)
 
int gp_abilities_list_reset (CameraAbilitiesList *list)
 Reset the list. More...
 
int gp_abilities_list_detect (CameraAbilitiesList *list, GPPortInfoList *info_list, CameraList *l, GPContext *context)
 
int gp_abilities_list_append (CameraAbilitiesList *list, CameraAbilities abilities)
 Append the abilities to the list. More...
 
int gp_abilities_list_count (CameraAbilitiesList *list)
 Count the entries in the supplied list. More...
 
int gp_abilities_list_lookup_model (CameraAbilitiesList *list, const char *model)
 Search the list for an entry of given model name. More...
 
int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index, CameraAbilities *abilities)
 Retrieve the camera abilities of entry with supplied index number. More...
 
const char * gp_message_codeset (const char *)
 Set the current character codeset libgphoto2 is operating in. More...
 

Detailed Description

List of supported camera models including their abilities.

Author
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Typedef Documentation

List of supported camera models including their abilities.

The internals of this list are hidden - use the access functions.

Enumeration Type Documentation

Current implementation status of the camera driver.

Enumerator
GP_DRIVER_STATUS_PRODUCTION 

Driver is production ready.

GP_DRIVER_STATUS_TESTING 

Driver is beta quality.

GP_DRIVER_STATUS_EXPERIMENTAL 

Driver is alpha quality and might even not work.

GP_DRIVER_STATUS_DEPRECATED 

Driver is no longer recommended to use and will be removed.

A bitmask of image related operations of the device.

Enumerator
GP_FILE_OPERATION_NONE 

No special file operations, just download.

GP_FILE_OPERATION_DELETE 

Deletion of files is possible.

GP_FILE_OPERATION_PREVIEW 

Previewing viewfinder content is possible.

GP_FILE_OPERATION_RAW 

Raw retrieval is possible (used by non-JPEG cameras)

GP_FILE_OPERATION_AUDIO 

Audio retrieval is possible.

GP_FILE_OPERATION_EXIF 

EXIF retrieval is possible.

A bitmask of filesystem related operations of the device.

Enumerator
GP_FOLDER_OPERATION_NONE 

No special filesystem operation.

GP_FOLDER_OPERATION_DELETE_ALL 

Deletion of all files on the device.

GP_FOLDER_OPERATION_PUT_FILE 

Upload of files to the device possible.

GP_FOLDER_OPERATION_MAKE_DIR 

Making directories on the device possible.

GP_FOLDER_OPERATION_REMOVE_DIR 

Removing directories from the device possible.

A bitmask of remote control related operations of the device. Some drivers might support additional dynamic capabilities (like the PTP driver).

Enumerator
GP_OPERATION_NONE 

No remote control operation supported.

GP_OPERATION_CAPTURE_IMAGE 

Capturing images supported.

GP_OPERATION_CAPTURE_VIDEO 

Capturing videos supported.

GP_OPERATION_CAPTURE_AUDIO 

Capturing audio supported.

GP_OPERATION_CAPTURE_PREVIEW 

Capturing image previews supported.

GP_OPERATION_CONFIG 

Camera and Driver configuration supported.

GP_OPERATION_TRIGGER_CAPTURE 

Camera can trigger capture and wait for events.

Type of the device represented. Currently we have Still Cameras and MTP Audio Players.

Enumerator
GP_DEVICE_STILL_CAMERA 

Traditional still camera

GP_DEVICE_AUDIO_PLAYER 

Audio player

Function Documentation

int gp_abilities_list_append ( CameraAbilitiesList list,
CameraAbilities  abilities 
)

Append the abilities to the list.

Parameters
listCameraAbilitiesList
abilitiesCameraAbilities
Returns
a gphoto2 error code

This function is called by a camera library on camera_abilities() in order to inform libgphoto2 about a supported camera model.

References GP_OK, and CameraAbilities::model.

Referenced by camera_abilities().

int gp_abilities_list_count ( CameraAbilitiesList list)

Count the entries in the supplied list.

Parameters
lista CameraAbilitiesList
Returns
The number of entries or a gphoto2 error code

References GP_ERROR, GP_OK, CameraAbilities::id, and CameraAbilities::model.

Referenced by gp_abilities_list_load().

int gp_abilities_list_detect ( CameraAbilitiesList list,
GPPortInfoList info_list,
CameraList l,
GPContext context 
)
Parameters
lista CameraAbilitiesList
info_listthe GPPortInfoList of ports to use for detection
la CameraList that contains the autodetected cameras after the call
contexta GPContext

Tries to detect any camera connected to the computer using the supplied list of supported cameras and the supplied info_list of ports.

Returns
a gphoto2 error code

References gp_list_append(), gp_list_reset(), GP_OK, GP_PORT_DISK, gp_port_free(), gp_port_info_get_path(), gp_port_info_get_type(), gp_port_info_list_count(), gp_port_info_list_get_info(), gp_port_new(), GP_PORT_PTPIP, gp_port_set_error(), gp_port_set_info(), GP_PORT_USB, GP_PORT_USB_DISK_DIRECT, GP_PORT_USB_SCSI, and CameraAbilities::model.

Referenced by gp_camera_autodetect(), and gp_camera_init().

int gp_abilities_list_free ( CameraAbilitiesList list)

Free the given CameraAbilitiesList object.

Parameters
lista CameraAbilitiesList
Returns
a gphoto2 error code

References gp_abilities_list_reset(), and GP_OK.

Referenced by gp_camera_autodetect(), and gp_camera_init().

int gp_abilities_list_get_abilities ( CameraAbilitiesList list,
int  index,
CameraAbilities abilities 
)

Retrieve the camera abilities of entry with supplied index number.

Parameters
lista CameraAbilitiesList
indexindex
abilitiespointer to CameraAbilities for returned data.
Returns
a gphoto2 error code

Retrieves the camera abilities of entry with supplied index number. Typically, you would call gp_camera_set_abilities() afterwards in order to prepare the initialization of a camera.

References GP_DEVICE_AUDIO_PLAYER, GP_DEVICE_STILL_CAMERA, GP_DRIVER_STATUS_DEPRECATED, GP_DRIVER_STATUS_EXPERIMENTAL, GP_DRIVER_STATUS_PRODUCTION, GP_DRIVER_STATUS_TESTING, GP_FILE_OPERATION_AUDIO, GP_FILE_OPERATION_DELETE, GP_FILE_OPERATION_EXIF, GP_FILE_OPERATION_NONE, GP_FILE_OPERATION_PREVIEW, GP_FILE_OPERATION_RAW, GP_FOLDER_OPERATION_DELETE_ALL, GP_FOLDER_OPERATION_MAKE_DIR, GP_FOLDER_OPERATION_NONE, GP_FOLDER_OPERATION_PUT_FILE, GP_FOLDER_OPERATION_REMOVE_DIR, GP_OK, GP_OPERATION_CAPTURE_AUDIO, GP_OPERATION_CAPTURE_IMAGE, GP_OPERATION_CAPTURE_PREVIEW, GP_OPERATION_CAPTURE_VIDEO, GP_OPERATION_CONFIG, and GP_OPERATION_NONE.

Referenced by gp_camera_init().

int gp_abilities_list_load ( CameraAbilitiesList list,
GPContext context 
)

Scans the system for camera drivers.

Parameters
lista CameraAbilitiesList
contexta GPContext
Returns
a gphoto2 error code

All supported camera models will then be added to the list.

References gp_abilities_list_count(), GP_ERROR_IO_USB_FIND, GP_OK, gp_port_usb_find_device(), gp_port_usb_find_device_by_class(), CameraAbilities::model, CameraAbilities::port, _GPPort::type, CameraAbilities::usb_class, CameraAbilities::usb_product, CameraAbilities::usb_protocol, CameraAbilities::usb_subclass, and CameraAbilities::usb_vendor.

Referenced by gp_camera_autodetect(), and gp_camera_init().

int gp_abilities_list_lookup_model ( CameraAbilitiesList list,
const char *  model 
)

Search the list for an entry of given model name.

Parameters
lista CameraAbilitiesList
modela camera model name
Returns
Index of entry or gphoto2 error code

References GP_ERROR_MODEL_NOT_FOUND, and CameraAbilities::model.

Referenced by gp_camera_init().

int gp_abilities_list_new ( CameraAbilitiesList **  list)

Allocate the memory for a new abilities list.

Function to allocate the memory for a new abilities list.

Parameters
listCameraAbilitiesList object to initialize
Returns
gphoto2 error code

You would then call gp_abilities_list_load() in order to populate it.

References GP_OK.

Referenced by gp_camera_autodetect(), and gp_camera_init().

int gp_abilities_list_reset ( CameraAbilitiesList list)

Reset the list.

Parameters
lista CameraAbilitiesList
Returns
a gphoto2 error code

References GP_OK.

Referenced by gp_abilities_list_free().

const char* gp_message_codeset ( const char *  codeset)

Set the current character codeset libgphoto2 is operating in.

Set the codeset for all messages returned by libgphoto2.

Parameters
codesetNew codeset for the messages. For instance "utf-8".
Returns
old codeset as returned from bind_textdomain_codeset().

You would then call gp_abilities_list_load() in order to populate it.

References gp_port_message_codeset().