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.

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

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

References 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);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index