playersd.h
void player_sd_lock(player_sd_t *sd)
Lock access to playersd structures, such as the local device cache.
player_sd_dev_t * devs
List of devices discovered by browsing.
Definition: playersd.h:97
int player_sd_find_devices(player_sd_t *sd, player_sd_dev_t *result, size_t result_len, const char *name, const char *hostname, int robot, int interf, int index)
Find a device in the local cache that matches the given criteria.
int player_sd_register(player_sd_t *sd, const char *name, player_devaddr_t addr)
Register the named device.
int player_sd_browse_stop(player_sd_t *sd)
Stop browsing. Returns 0 on success, non-zero on error.
player_sd_dev_t * player_sd_get_device(player_sd_t *sd, const char *name)
Look up a device by name.
int player_sd_update(player_sd_t *sd, double timeout)
Check for new device updates, waiting for timeout s.
int player_sd_browse(player_sd_t *sd, double timeout, int keepalive, player_sd_browse_callback_fn_t cb)
Browse for player devices.
void(* player_sd_browse_callback_fn_t)(player_sd_t *sd, player_sd_dev_t *dev)
Prototype for a callback function that can be invoked when devices are added or removed.
Definition: playersd.h:128
void * sdRef
Opaque pointer to underlying zeroconf client object.
Definition: playersd.h:95
player_sd_dev_t * _player_sd_add_device(player_sd_t *sd, const char *name)
Add a device to the local cache.
void player_sd_unlock(player_sd_t *sd)
Unlock access to playersd structures, such as the local device cache.
void player_sd_printcache(player_sd_t *sd)
Print the contents of the local device cache to the console.
player_sd_t * player_sd_init(void)
Initialize service discovery, passing back a pointer that will be passed into all future calls...
#define PLAYER_SD_NAME_MAXLEN
A device, represented by its name and address.
Definition: playersd.h:69
void player_sd_fini(player_sd_t *sd)
Finalize service discovery, freeing associated resources.
int player_sd_unregister(player_sd_t *sd, const char *name)
Unregister (terminate) the named device.