Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DC_DESCRIPTOR_ITERATOR(3)   Library Functions Manual DC_DESCRIPTOR_ITERATOR(3)

NAME
       dc_descriptor_iterator -- get all supported dive	computers

LIBRARY
       library "libdivecomputer"

SYNOPSIS
       #include	<libdivecomputer/descriptor.h>

       dc_status_t
       dc_descriptor_iterator(dc_iterator_t **iterator);

DESCRIPTION
       Gets  all  descriptors available	to library "libdivecomputer".  It must
       be  matched  with  dc_iterator_free(3)	if   the   return   value   is
       DC_STATUS_SUCCESS.   The	 dc_iterator_next(3)  function must be used to
       iterate over the	iterator.  You must use	dc_descriptor_free(3)  on  the
       returned	descriptor value.

RETURN VALUES
       This  returns  DC_STATUS_SUCCESS	 and  fills in the iterator pointer on
       success.

EXAMPLES
       The following iterates over all descriptors, printing the vendor,  then
       frees the iterator.  It does no error checking.

       dc_descriptor_iterator(&iter));
       while (dc_iterator_next(iter, &desc) == DC_STATUS_SUCCESS) {
	       printf("%s\n", dc_descriptor_get_vendor(desc));
	       dc_descriptor_free(desc);
       }
       dc_iterator_free(iter);

SEE ALSO
       dc_descriptor_free(3), dc_iterator_free(3), dc_iterator_next(3)

AUTHORS
       The  library  "libdivecomputer"	library	 was  written  by Jef Driesen,
       jef@libdivecomputer.org.	 The manpages were written by
       Kristaps	Dzonsons, kristaps@bsd.lv.

FreeBSD	Ports 14.quarterly	January	5, 2017	     DC_DESCRIPTOR_ITERATOR(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dc_descriptor_iterator&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help