Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int camera_abilities ( CameraAbilitiesList list  ) 

Get a list of abilities of all supported cameras.

camera_abilities: : list of abilities

Returns a list of what any of the cameras supported by this driver can do. Each entry of the list will represent one camera model.

Returns: list of abilities in

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.

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.

a gphoto2 error code

Definition at line 198 of file adc65.c.

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_NONE, GP_FILE_OPERATION_PREVIEW, GP_FOLDER_OPERATION_NONE, GP_OK, GP_OPERATION_CAPTURE_PREVIEW, GP_OPERATION_NONE, GP_PORT_SERIAL, GP_PORT_USB, CameraAbilities::model, CameraAbilities::operations, CameraAbilities::port, CameraAbilities::speed, and CameraAbilities::status.

      CameraAbilities a;

      memset(&a, 0, sizeof(a));
      /* Fill in the appropriate flags/data */
      strcpy(a.model, "Achiever Digital:Adc65");
      a.port      = GP_PORT_SERIAL;
      a.speed[0]  = 115200;
      a.speed[1]  = 230400;
      a.speed[2]  = 0;
      a.operations        = GP_OPERATION_NONE;
      a.file_operations   = GP_FILE_OPERATION_NONE;
      a.folder_operations = GP_FOLDER_OPERATION_NONE;
      return gp_abilities_list_append(list, a);

Generated by  Doxygen 1.6.0   Back to index