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

FreeBSD Manual Pages

  
 
  

home | help
DC_DESCRIPTOR_GET_TRANSP(3) Library Functions ManuaDC_DESCRIPTOR_GET_TRANSP(3)

NAME
       dc_descriptor_get_transports  --	 Gets  the transports supported	by the
       given descriptor.

LIBRARY
       library "libdivecomputer"

SYNOPSIS
       #include	<libdivecomputer/descriptor.h>

       unsigned	int
       dc_descriptor_get_transports(dc_descriptor_t *descriptor);

DESCRIPTION
       Gets the	transports supported by	the given descriptor.  The  descriptor
       usually found by	searching through dc_descriptor_iterator(3).

RETURN VALUES
       Returns	a  union (bitwise OR) of the transports	supported by the given
       descriptor.

       The result is  combination  of  DC_TRANSPORT_USB,  DC_TRANSPORT_USBHID,
       DC_TRANSPORT_BLE,      DC_TRANSPORT_BLUETOOTH,	  DC_TRANSPORT_SERIAL,
       DC_TRANSPORT_IRDA

       To determine if a specific transport is	supported  use	the  following
       code

	     unsigned int transports = dc_descriptor_get_transports(descriptor);
	     if(transports & DC_TRANSPORT_USBHID) {
		 // Device supports USB	HID as transport
	     }

SEE ALSO
       dc_descriptor_iterator(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_DESCRIPTOR_GET_TRANSPORTS(3)

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

home | help