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

int gp_abilities_list_lookup_model ( CameraAbilitiesList list,
const char *  model 

Search the list for an entry of given model name.

list a CameraAbilitiesList
model a camera model name
Index of entry or gphoto2 error code

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

References _CameraAbilitiesList::abilities, CHECK_NULL, _CameraAbilitiesList::count, GP_ERROR_MODEL_NOT_FOUND, gp_log(), GP_LOG_ERROR, and CameraAbilities::model.

Referenced by gp_camera_init().

      int x;

      CHECK_NULL (list && model);

      for (x = 0; x < list->count; x++) {
            if (!strcasecmp (list->abilities[x].model, model))
                  return (x);

      gp_log (GP_LOG_ERROR, "gphoto2-abilities-list", _("Could not find "
            "any driver for '%s'"), model);
      return (GP_ERROR_MODEL_NOT_FOUND);

Generated by  Doxygen 1.6.0   Back to index