* Component can't process a notification at this time
* (e.g. would block), try again later.
*/
- BT_COMPONENT_STATUS_AGAIN = 2,
+ BT_COMPONENT_STATUS_AGAIN = 11,
/** Refuse port connection. */
- BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION = 3,
+ BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION = 111,
/** General error. */
BT_COMPONENT_STATUS_ERROR = -1,
/** Unsupported component feature. */
BT_COMPONENT_STATUS_UNSUPPORTED = -2,
/** Invalid arguments. */
- BT_COMPONENT_STATUS_INVALID = -3,
+ BT_COMPONENT_STATUS_INVALID = -22,
/** Memory allocation failure. */
- BT_COMPONENT_STATUS_NOMEM = -4,
+ BT_COMPONENT_STATUS_NOMEM = -12,
/** Element not found. */
- BT_COMPONENT_STATUS_NOT_FOUND = -5,
+ BT_COMPONENT_STATUS_NOT_FOUND = -19,
};
#ifdef __cplusplus
enum bt_graph_status {
/** No sink can consume at the moment. */
- BT_GRAPH_STATUS_AGAIN = 2,
+ BT_GRAPH_STATUS_AGAIN = 11,
/** Downstream component does not support multiple inputs. */
BT_GRAPH_STATUS_END = 1,
BT_GRAPH_STATUS_OK = 0,
- /** Downstream component does not support multiple inputs. */
- BT_GRAPH_STATUS_MULTIPLE_INPUTS_UNSUPPORTED = -1,
/** Component is already part of another graph. */
BT_GRAPH_STATUS_ALREADY_IN_A_GRAPH = -2,
/** Invalid arguments. */
- BT_GRAPH_STATUS_INVALID = -3,
+ BT_GRAPH_STATUS_INVALID = -22,
/** No sink in graph. */
- BT_GRAPH_STATUS_NO_SINK = -4,
+ BT_GRAPH_STATUS_NO_SINK = -6,
/** General error. */
- BT_GRAPH_STATUS_ERROR = -5,
+ BT_GRAPH_STATUS_ERROR = -1,
};
typedef void (*bt_graph_port_added_listener)(struct bt_port *port,
*/
enum bt_notification_iterator_status {
/** Try again. */
- BT_NOTIFICATION_ITERATOR_STATUS_AGAIN = 2,
+ BT_NOTIFICATION_ITERATOR_STATUS_AGAIN = 11,
/** No more notifications to be delivered. */
BT_NOTIFICATION_ITERATOR_STATUS_END = 1,
/** No error, okay. */
BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
/** Invalid arguments. */
- BT_NOTIFICATION_ITERATOR_STATUS_INVAL = -1,
+ BT_NOTIFICATION_ITERATOR_STATUS_INVALID = -22,
/** General error. */
- BT_NOTIFICATION_ITERATOR_STATUS_ERROR = -2,
+ BT_NOTIFICATION_ITERATOR_STATUS_ERROR = -1,
/** Out of memory. */
- BT_NOTIFICATION_ITERATOR_STATUS_NOMEM = -3,
+ BT_NOTIFICATION_ITERATOR_STATUS_NOMEM = -12,
/** Unsupported iterator feature. */
- BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -4,
+ BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -2,
};
BT_NOTIFICATION_ITERATOR_STATUS_OK;
if (!iterator) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_INVAL;
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_INVALID;
goto end;
}
end:
bt_notification_iterator_from_private(private_iterator);
if (!iterator) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_INVAL;
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_INVALID;
goto end;
}
struct bt_private_notification_iterator *priv_iterator =
bt_private_notification_iterator_from_notification_iterator(iterator);
bt_component_class_notification_iterator_next_method next_method = NULL;
- struct bt_notification_iterator_next_return next_return;
- enum bt_notification_iterator_status status =
- BT_NOTIFICATION_ITERATOR_STATUS_OK;
+ struct bt_notification_iterator_next_return next_return = {
+ .status = BT_NOTIFICATION_ITERATOR_STATUS_OK,
+ .notification = NULL,
+ };
if (!iterator) {
- status = BT_NOTIFICATION_ITERATOR_STATUS_INVAL;
+ next_return.status = BT_NOTIFICATION_ITERATOR_STATUS_INVALID;
goto end;
}
next_return = next_method(priv_iterator);
if (next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_OK) {
if (!next_return.notification) {
- status = BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
+ next_return.status =
+ BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
goto end;
}
ctf_fs = bt_private_component_get_user_data(priv_comp);
if (!ctf_fs) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_INVAL;
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_INVALID;
goto error;
}
port_data = bt_private_port_get_user_data(port);
if (!port_data) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_INVAL;
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_INVALID;
goto error;
}