Distributed Publish & Subscribe for IoT
discovery.h File Reference

Discovery service. More...

Go to the source code of this file.

Typedefs

typedef 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. More...
 
typedef struct _DPS_DiscoveryService DPS_DiscoveryService
 Opaque type for the discovery service.
 
typedef void(* DPS_OnDiscoveryServiceDestroyed) (DPS_DiscoveryService *service, void *data)
 Function prototype for callback function called when a service is destroyed. More...
 

Functions

DPS_DiscoveryServiceDPS_CreateDiscoveryService (DPS_Node *node, const char *serviceId)
 Allocate resources for a discovery service. More...
 
DPS_Status DPS_DestroyDiscoveryService (DPS_DiscoveryService *service, DPS_OnDiscoveryServiceDestroyed cb, void *data)
 Free resources for a discovery service. More...
 
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. More...
 
void * DPS_GetDiscoveryServiceData (DPS_DiscoveryService *service)
 Get application data pointer previously set by DPS_SetDiscoveryServiceData() More...
 
DPS_Status DPS_SetDiscoveryServiceData (DPS_DiscoveryService *service, void *data)
 Store a pointer to application data in a discovery service. More...
 

Detailed Description

Discovery service.