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

FreeBSD Manual Pages

  
 
  

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

NAME
       dc_usbhid_iterator_new  --  Create an iterator to enumerate the USB HID
       devices.

LIBRARY
       library "libdivecomputer"

SYNOPSIS
       #include	<libdivecomputer/usbhid.h>

       dc_status_t
       dc_usbhid_iterator_new(dc_iterator_t **iterator,	dc_context_t *context,
	   dc_descriptor_t *descriptor);

DESCRIPTION
       Iterates	through	the available  USB  HID	 devices  matching  the	 given
       descriptor.   Accepts  a	 context  opened  with dc_context_new(3) and a
       descriptor      usually	    found      by      searching       through
       dc_descriptor_iterator(3).

       On   returning  DC_STATUS_SUCCESS  the  iterator	 will  be  set	to  an
       dc_iterator_t which can be used to iterate the available	 USB  HID  de-
       vices using dc_iterator_next(3).

       The  value  type	 of  the iterator is of	type dc_usbhid_device_t.  This
       value can be used in functions to extract information about  this  spe-
       cific   USB   HID   device,   namely   dc_usbhid_device_get_pid(3)  and
       dc_usbhid_device_get_vid(3).  When done the USB HID device needs	to  be
       freed with dc_usbhid_device_free(3).

       After	iterating    the    iterator   needs   to   be	 freed	 using
       dc_iterator_free(3).

RETURN VALUES
       Returns DC_STATUS_SUCCESS on success, or	another	 dc_status_t  code  on
       failure.

       On  DC_STATUS_SUCCESS the returned iterator needs to be freed when done
       using dc_iterator_free(3).

SEE ALSO
       dc_context_new(3),			 dc_bluetooth_iterator_new(3),
       dc_serial_iterator_new(3),		      dc_irda_iterator_new(3),
       dc_usbhid_device_get_pid(3), dc_usbhid_device_get_vid(3).

AUTHORS
       The library "libdivecomputer"  library  was  written  by	 Jef  Driesen,
       jef@libdivecomputer.org.
       This manpage is written by
       Vincent Hagen, vinnie@script4web.nl.

FreeBSD	Ports 14.quarterly	 June 5, 2020	     DC_USBHID_ITERATOR_NEW(3)

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

home | help