Clean up return code types

* Remove dds_return_t / dds_retcode_t distinction (now there is only
  dds_return_t and all error codes are always negative)

* Remove Q_ERR_... error codes and replace them by DDS_RETCODE_...
  ones so that there is only one set of error codes

* Replace a whole bunch "int" return types that were used to return
  Q_ERR_... codes by "dds_return_t" return types

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-05-23 16:51:43 +02:00 committed by eboasson
parent a652ecb78e
commit 19aec98b8a
126 changed files with 1565 additions and 1722 deletions

View file

@ -26,17 +26,10 @@
#include "dds/export.h"
/* TODO: Move to appropriate location */
/**
* Return code indicating success (DDS_RETCODE_OK) or failure. If a given
* operation failed the value will be a unique error code and dds_err_nr() must
* be used to extract the DDS_RETCODE_* value.
*/
typedef int32_t dds_return_t;
/**
* Handle to an entity. A valid entity handle will always have a positive
* integer value. Should the value be negative, the value represents a unique
* error code. dds_err_nr() can be used to extract the DDS_RETCODE_* value.
* integer value. Should the value be negative, it is one of the DDS_RETCODE_*
* error codes.
*/
typedef int32_t dds_entity_t;
@ -1223,7 +1216,7 @@ dds_create_reader(
* @returns a status, 0 on success, TIMEOUT on timeout or a negative value to indicate error.
*/
/* TODO: Complete list of error codes */
DDS_EXPORT int
DDS_EXPORT dds_return_t
dds_reader_wait_for_historical_data(
dds_entity_t reader,
dds_duration_t max_wait);