Query#

group Query

Functions

cuestStatus_t cuestQuery(
cuestHandle_t handle,
cuestType_t type,
const void *object,
int attribute,
void *attributeValue,
size_t attributeValueSize
)#

Query an attribute of a cuEST opaque handle.

The result pointer attributeValue must reference sufficient memory for the type matching the specified attribute. Note that char* attributes are allocated internally and must be freed by the caller using free().

Parameters:
  • handle[in] cuEST handle. Must not be NULL.

  • type[in] enum indicating which type of object is being queried

  • object[in] cuEST object to be queried (opaque handle). Must not be NULL.

  • attribute[in] Attribute/property to query. (Should be an enum appropriate to the type of object.)

  • attributeValue[out] Pointer to memory for result (type depends on attribute).

  • attributeValueSize[in] Number of bytes in attributeValue. Must match sizeof(type).

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_NULL_POINTER if object or attributeValue is NULL;

  • CUEST_STATUS_INVALID_TYPE if object is not of the specified type;

  • CUEST_STATUS_INVALID_SIZE if attributeValueSize does not match attribute type size;

  • CUEST_STATUS_INVALID_ATTRIBUTE if attribute is not recognized;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR for internal errors.