HomePort
Macros | Functions
discovery_id.c File Reference
Include dependency graph for discovery_id.c:

Go to the source code of this file.

Macros

#define DISCOVERY_FIND_ADAPTER(ID, ADAPTER)
 
#define DISCOVERY_FIND_DEVICE(ID, DEVICE)
 
#define DISCOVERY_FIND_PARAMETER(ID, PARAMETER)
 
#define DISCOVERY_FIND_SERVICE(ID, SERVICE)
 

Functions

hpd_error_t discovery_alloc_aid (hpd_adapter_id_t **id, hpd_t *hpd, const char *aid)
 
hpd_error_t discovery_alloc_did (hpd_device_id_t **id, hpd_t *hpd, const char *aid, const char *did)
 
hpd_error_t discovery_alloc_pid (hpd_parameter_id_t **id, hpd_t *hpd, const char *aid, const char *did, const char *sid, const char *pid)
 
hpd_error_t discovery_alloc_sid (hpd_service_id_t **id, hpd_t *hpd, const char *aid, const char *did, const char *sid)
 
hpd_error_t discovery_copy_aid (hpd_adapter_id_t **dst, const hpd_adapter_id_t *src)
 
hpd_error_t discovery_copy_did (hpd_device_id_t **dst, const hpd_device_id_t *src)
 
hpd_error_t discovery_copy_pid (hpd_parameter_id_t **dst, const hpd_parameter_id_t *src)
 
hpd_error_t discovery_copy_sid (hpd_service_id_t **dst, const hpd_service_id_t *src)
 
hpd_error_t discovery_find_adapter (const hpd_adapter_id_t *id, hpd_adapter_t **adapter)
 
hpd_error_t discovery_find_device (const hpd_device_id_t *id, hpd_device_t **device)
 
hpd_error_t discovery_find_parameter (const hpd_parameter_id_t *id, hpd_parameter_t **parameter)
 
hpd_error_t discovery_find_service (const hpd_service_id_t *id, hpd_service_t **service)
 
hpd_error_t discovery_free_aid (hpd_adapter_id_t *id)
 
hpd_error_t discovery_free_did (hpd_device_id_t *id)
 
hpd_error_t discovery_free_pid (hpd_parameter_id_t *id)
 
hpd_error_t discovery_free_sid (hpd_service_id_t *id)
 
hpd_error_t discovery_get_adapter_hpd (const hpd_adapter_id_t *aid, hpd_t **hpd)
 
hpd_error_t discovery_get_device_adapter (const hpd_device_id_t *did, hpd_adapter_id_t **aid)
 
hpd_error_t discovery_get_device_hpd (const hpd_device_id_t *did, hpd_t **hpd)
 
hpd_error_t discovery_get_parameter_adapter (const hpd_parameter_id_t *pid, hpd_adapter_id_t **aid)
 
hpd_error_t discovery_get_parameter_device (const hpd_parameter_id_t *pid, hpd_device_id_t **did)
 
hpd_error_t discovery_get_parameter_hpd (const hpd_parameter_id_t *pid, hpd_t **hpd)
 
hpd_error_t discovery_get_parameter_service (const hpd_parameter_id_t *pid, hpd_service_id_t **sid)
 
hpd_error_t discovery_get_service_adapter (const hpd_service_id_t *sid, hpd_adapter_id_t **aid)
 
hpd_error_t discovery_get_service_device (const hpd_service_id_t *sid, hpd_device_id_t **did)
 
hpd_error_t discovery_get_service_hpd (const hpd_service_id_t *sid, hpd_t **hpd)
 
hpd_error_t discovery_set_aid (hpd_adapter_id_t *id, hpd_t *hpd, const char *aid)
 HPD_E_ALLOC: id might be partially updated. More...
 
hpd_error_t discovery_set_did (hpd_device_id_t *id, hpd_t *hpd, const char *aid, const char *did)
 HPD_E_ALLOC: id might be partially updated. More...
 
hpd_error_t discovery_set_pid (hpd_parameter_id_t *id, hpd_t *hpd, const char *aid, const char *did, const char *sid, const char *pid)
 HPD_E_ALLOC: id might be partially updated. More...
 
hpd_error_t discovery_set_sid (hpd_service_id_t *id, hpd_t *hpd, const char *aid, const char *did, const char *sid)
 HPD_E_ALLOC: id might be partially updated. More...
 

Macro Definition Documentation

#define DISCOVERY_FIND_ADAPTER (   ID,
  ADAPTER 
)
Value:
do { \
(ADAPTER) = NULL; \
TAILQ_FOREACH((ADAPTER), &(ID)->hpd->configuration->adapters, HPD_TAILQ_FIELD) \
if (strcmp((ADAPTER)->id, (ID)->aid) == 0) break; \
if (!(ADAPTER)) return HPD_E_NOT_FOUND; \
} while (0)
#define HPD_TAILQ_FIELD
Definition: hpd_queue.h:37
hpd_configuration_t * configuration
Definition: daemon.h:52
hpd_adapters_t adapters
Definition: model.h:59
Definition: daemon.h:50

Definition at line 205 of file discovery_id.c.

#define DISCOVERY_FIND_DEVICE (   ID,
  DEVICE 
)
Value:
do { \
hpd_adapter_t *a = NULL; \
DISCOVERY_FIND_ADAPTER(&(ID)->adapter, a); \
(DEVICE) = NULL; \
TAILQ_FOREACH((DEVICE), a->devices, HPD_TAILQ_FIELD) \
if (strcmp((DEVICE)->id, (ID)->did) == 0) break; \
if (!(DEVICE)) return HPD_E_NOT_FOUND; \
} while (0)
struct hpd_adapter hpd_adapter_t
Definition: hpd_types.h:43
#define HPD_TAILQ_FIELD
Definition: hpd_queue.h:37
#define DISCOVERY_FIND_ADAPTER(ID, ADAPTER)
Definition: discovery_id.c:205

Definition at line 212 of file discovery_id.c.

#define DISCOVERY_FIND_PARAMETER (   ID,
  PARAMETER 
)
Value:
do { \
hpd_service_t *s = NULL; \
DISCOVERY_FIND_SERVICE(&(ID)->service, s); \
(PARAMETER) = NULL; \
TAILQ_FOREACH((PARAMETER), s->parameters, HPD_TAILQ_FIELD) \
if (strcmp((PARAMETER)->id, (ID)->pid) == 0) break; \
if (!(PARAMETER)) return HPD_E_NOT_FOUND; \
} while (0)
#define DISCOVERY_FIND_SERVICE(ID, SERVICE)
Definition: discovery_id.c:221
#define HPD_TAILQ_FIELD
Definition: hpd_queue.h:37
struct hpd_service hpd_service_t
Definition: hpd_types.h:45

Definition at line 230 of file discovery_id.c.

#define DISCOVERY_FIND_SERVICE (   ID,
  SERVICE 
)
Value:
do { \
hpd_device_t *d = NULL; \
DISCOVERY_FIND_DEVICE(&(ID)->device, d); \
(SERVICE) = NULL; \
TAILQ_FOREACH((SERVICE), d->services, HPD_TAILQ_FIELD) \
if (strcmp((SERVICE)->id, (ID)->sid) == 0) break; \
if (!(SERVICE)) return HPD_E_NOT_FOUND; \
} while (0)
struct hpd_device hpd_device_t
Definition: hpd_types.h:44
#define HPD_TAILQ_FIELD
Definition: hpd_queue.h:37
#define DISCOVERY_FIND_DEVICE(ID, DEVICE)
Definition: discovery_id.c:212

Definition at line 221 of file discovery_id.c.

Function Documentation

hpd_error_t discovery_alloc_aid ( hpd_adapter_id_t **  id,
hpd_t hpd,
const char *  aid 
)

Definition at line 89 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_alloc_did ( hpd_device_id_t **  id,
hpd_t hpd,
const char *  aid,
const char *  did 
)

Definition at line 104 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_alloc_pid ( hpd_parameter_id_t **  id,
hpd_t hpd,
const char *  aid,
const char *  did,
const char *  sid,
const char *  pid 
)

Definition at line 134 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_alloc_sid ( hpd_service_id_t **  id,
hpd_t hpd,
const char *  aid,
const char *  did,
const char *  sid 
)

Definition at line 119 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_copy_aid ( hpd_adapter_id_t **  dst,
const hpd_adapter_id_t src 
)

Definition at line 150 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_copy_did ( hpd_device_id_t **  dst,
const hpd_device_id_t src 
)

Definition at line 155 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_copy_pid ( hpd_parameter_id_t **  dst,
const hpd_parameter_id_t src 
)

Definition at line 165 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_copy_sid ( hpd_service_id_t **  dst,
const hpd_service_id_t src 
)

Definition at line 160 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_find_adapter ( const hpd_adapter_id_t id,
hpd_adapter_t **  adapter 
)

Definition at line 239 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_find_device ( const hpd_device_id_t id,
hpd_device_t **  device 
)

Definition at line 245 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_find_parameter ( const hpd_parameter_id_t id,
hpd_parameter_t **  parameter 
)

Definition at line 257 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_find_service ( const hpd_service_id_t id,
hpd_service_t **  service 
)

Definition at line 251 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_free_aid ( hpd_adapter_id_t id)

Definition at line 171 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_free_did ( hpd_device_id_t id)

Definition at line 178 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_free_pid ( hpd_parameter_id_t id)

Definition at line 195 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_free_sid ( hpd_service_id_t id)

Definition at line 186 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_adapter_hpd ( const hpd_adapter_id_t aid,
hpd_t **  hpd 
)

Definition at line 263 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_get_device_adapter ( const hpd_device_id_t did,
hpd_adapter_id_t **  aid 
)

Definition at line 275 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_device_hpd ( const hpd_device_id_t did,
hpd_t **  hpd 
)

Definition at line 269 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_get_parameter_adapter ( const hpd_parameter_id_t pid,
hpd_adapter_id_t **  aid 
)

Definition at line 302 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_parameter_device ( const hpd_parameter_id_t pid,
hpd_device_id_t **  did 
)

Definition at line 307 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_parameter_hpd ( const hpd_parameter_id_t pid,
hpd_t **  hpd 
)

Definition at line 296 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_get_parameter_service ( const hpd_parameter_id_t pid,
hpd_service_id_t **  sid 
)

Definition at line 312 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_service_adapter ( const hpd_service_id_t sid,
hpd_adapter_id_t **  aid 
)

Definition at line 286 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_service_device ( const hpd_service_id_t sid,
hpd_device_id_t **  did 
)

Definition at line 291 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_get_service_hpd ( const hpd_service_id_t sid,
hpd_t **  hpd 
)

Definition at line 280 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_set_aid ( hpd_adapter_id_t id,
hpd_t hpd,
const char *  aid 
)

HPD_E_ALLOC: id might be partially updated.

Definition at line 37 of file discovery_id.c.

Here is the caller graph for this function:

hpd_error_t discovery_set_did ( hpd_device_id_t id,
hpd_t hpd,
const char *  aid,
const char *  did 
)

HPD_E_ALLOC: id might be partially updated.

Definition at line 50 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_set_pid ( hpd_parameter_id_t id,
hpd_t hpd,
const char *  aid,
const char *  did,
const char *  sid,
const char *  pid 
)

HPD_E_ALLOC: id might be partially updated.

Definition at line 78 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t discovery_set_sid ( hpd_service_id_t id,
hpd_t hpd,
const char *  aid,
const char *  did,
const char *  sid 
)

HPD_E_ALLOC: id might be partially updated.

Definition at line 64 of file discovery_id.c.

Here is the call graph for this function:

Here is the caller graph for this function: