![]() |
BSB Developer Docs
|
mDNS network discovery service API. More...
#include <core/string.h>Go to the source code of this file.
Data Structures | |
| struct | DiscoveryServiceInfo |
| Announced service information structure. More... | |
Macros | |
| #define | RECORD_DISCOVERY "discovery" |
| The string key for Discovery instance access. | |
Typedefs | |
| typedef struct Discovery | Discovery |
| Discovery service opaque type. | |
| typedef bool(* | DiscoveryTxtCallback) (size_t index, FuriString *txt_out, void *context) |
| Called to request one DNS-SD TXT record. | |
Enumerations | |
| enum | DiscoveryTransportType { DiscoveryTransportTypeTcp , DiscoveryTransportTypeUdp } |
| Enumeration of supported transport protocol types. More... | |
Functions | |
| bool | discovery_add_service (Discovery *discovery, const DiscoveryServiceInfo *info, void *context) |
| Add a service to be announced to the local network. | |
mDNS network discovery service API.
| typedef struct Discovery Discovery |
Discovery service opaque type.
Get the instance pointer by calling furi_record_open(RECORD_DISCOVERY)
| typedef bool(* DiscoveryTxtCallback) (size_t index, FuriString *txt_out, void *context) |
Called to request one DNS-SD TXT record.
| [in] | index | Index of the record that this function should return |
| [out] | txt_out | pointer to the output buffer string |
| [in,out] | context | pointer to the user-specific object (may be NULL) |
true if data was given and iteration should continue, false if no data was given and iteration should stop | bool discovery_add_service | ( | Discovery * | discovery, |
| const DiscoveryServiceInfo * | info, | ||
| void * | context ) |
Add a service to be announced to the local network.
info and context must live forever (i.e. must NOT be deleted after the call to this function).| [in,out] | discovery | Discovery service |
| [in] | info | Service info to be announced |
| [in,out] | context | Context for txt_callback (may be NULL) |
true on success, false otherwise