Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_port_info_list_count ( GPPortInfoList list  ) 

Number of ports in the list.

list a GPPortInfoList
Returns the number of entries in the passed list.

The number of entries or a gphoto2 error code

Definition at line 306 of file gphoto2-port-info-list.c.

References CHECK_NULL, _GPPortInfoList::count, gp_log(), GP_LOG_DEBUG, _GPPortInfoList::info, and _GPPortInfo::name.

Referenced by gp_abilities_list_detect().

      int count, i;

      CHECK_NULL (list);

      gp_log (GP_LOG_DEBUG, "gphoto2-port-info-list", _("Counting entries "
            "(%i available)..."), list->count);

      /* Ignore generic entries */
      count = list->count;
      for (i = 0; i < list->count; i++)
            if (!strlen (list->info[i].name))

      gp_log (GP_LOG_DEBUG, "gphoto2-port-info-list", _("%i regular entries "
            "available."), count);
      return (count);

Generated by  Doxygen 1.6.0   Back to index