DC_BLUETOOTH_ITERATOR_NEW(3)

๐Ÿ“ฆ version 0.9.0, in nixos 26.05, nixpkgs unstable

okay bestie, welcome to the dc_bluetooth_iterator_new page ๐Ÿ’– โ€” the header up top says DC_BLUETOOTH_ITERATOR_NE(3) (yes, NE, iykyk), the manual name is Library Functions Manual, and weโ€™re repping library โ€œlibdivecomputerโ€. This is all about making a bluetooth-device iterator, and itโ€™s giving main-character energy โœจ

๐Ÿ’– NAME ๐Ÿ’–

dc_bluetooth_iterator_new โ€” Create an iterator to enumerate the bluetooth devices.

๐Ÿซถ LIBRARY ๐Ÿซถ

library โ€œlibdivecomputerโ€

โœจ SYNOPSIS โœจ

#include <libdivecomputer/bluetooth.h>

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

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so this one iterates through the available bluetooth devices which matches the given descriptor. It accepts a context opened with dc_context_new(3) and a descriptor usually found by searching through dc_descriptor_iterator_new(3).

On returning DC_STATUS_SUCCESS the iterator will be set to an dc_iterator_t which can be used to iterate the available bluetooth devices using dc_iterator_next(3).

The value type of the iterator is of type dc_bluetooth_device_t. This value can be used in functions to extract information about this specific bluetooth device, namely dc_bluetooth_device_get_name(3) and dc_bluetooth_device_get_address(3). When done the bluetooth device needs to be freed with dc_bluetooth_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 ๐Ÿฆ‹

๐ŸŒˆ AUTHORS ๐ŸŒˆ

The library โ€œlibdivecomputerโ€ library was written by Jef Driesen, jef@libdivecomputer.org.

This manpage is written by Vincent Hagen, vinnie@script4web.nl.


xoxo, Debian ยท June 5, 2020 ยท DC_BLUETOOTH_ITERATOR_NEW(3) ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from