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

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

Retrieve the camera abilities of entry with supplied index number.

Parameters:
list a CameraAbilitiesList
index index
abilities pointer 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.

Definition at line 650 of file gphoto2-abilities-list.c.

References _CameraAbilitiesList::abilities, CHECK_NULL, _CameraAbilitiesList::count, GP_ERROR_BAD_PARAMETERS, and GP_OK.

Referenced by gp_camera_init().

{
      CHECK_NULL (list && abilities);

      if (index < 0 || index >= list->count)
            return (GP_ERROR_BAD_PARAMETERS);

      memcpy (abilities, &list->abilities[index], sizeof (CameraAbilities));

      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index