28 #ifndef _DPS_DISCOVERY_H 29 #define _DPS_DISCOVERY_H 92 uint8_t* payload,
size_t len);
void(* DPS_DiscoveryHandler)(DPS_DiscoveryService *service, const DPS_Publication *pub, uint8_t *payload, size_t len)
Function prototype for a discovery handler called when a discovery message is received.
Definition: discovery.h:91
void * DPS_GetDiscoveryServiceData(DPS_DiscoveryService *service)
Get application data pointer previously set by DPS_SetDiscoveryServiceData()
void(* DPS_OnDiscoveryServiceDestroyed)(DPS_DiscoveryService *service, void *data)
Function prototype for callback function called when a service is destroyed.
Definition: discovery.h:114
struct _DPS_DiscoveryService DPS_DiscoveryService
Opaque type for the discovery service.
Definition: discovery.h:52
DPS_DiscoveryService * DPS_CreateDiscoveryService(DPS_Node *node, const char *serviceId)
Allocate resources for a discovery service.
struct _DPS_Publication DPS_Publication
Opaque type for a publication.
Definition: dps.h:712
int DPS_Status
The status code type.
Definition: err.h:41
DPS_Status DPS_DiscoveryPublish(DPS_DiscoveryService *service, const uint8_t *payload, size_t len, DPS_DiscoveryHandler handler)
Publish this node's discovery information and receive other node's discovery information.
DPS_Status DPS_SetDiscoveryServiceData(DPS_DiscoveryService *service, void *data)
Store a pointer to application data in a discovery service.
DPS_Status DPS_DestroyDiscoveryService(DPS_DiscoveryService *service, DPS_OnDiscoveryServiceDestroyed cb, void *data)
Free resources for a discovery service.
struct _DPS_Node DPS_Node
Opaque type for a node.
Definition: dps.h:450