Use int instead of bool as result

Prefer to use an int return from a function instead of bool because
it can contain more info about failures.
This commit is contained in:
Wim Taymans 2017-12-18 11:38:30 +01:00
parent e5e360d5df
commit 4d6ac37398
38 changed files with 308 additions and 297 deletions

View file

@ -81,8 +81,8 @@ struct pw_client_node_transport {
/** Get next message from a transport
* \param trans the transport to get the message of
* \param[out] message the message to read
* \return 0 on success, < 0 on error, SPA_RESULT_ENUM_END when no more messages
* are available.
* \return < 0 on error, 1 when a message is available,
* 0 when no more messages are available.
*
* Get the skeleton next message from \a trans into \a message. This function will
* only read the head and object body of the message.

View file

@ -32,7 +32,7 @@ extern "C" {
#define PW_TYPE_PROTOCOL_NATIVE_BASE PW_TYPE_PROTOCOL__Native ":"
struct pw_protocol_native_demarshal {
bool (*func) (void *object, void *data, size_t size);
int (*func) (void *object, void *data, size_t size);
#define PW_PROTOCOL_NATIVE_REMAP (1<<0)
#define PW_PROTOCOL_NATIVE_PERM_W (1<<1)