* Status code. Errors are always negative.
*/
enum bt_component_status {
- /** Memory allocation failure. */
- BT_COMPONENT_STATUS_NOMEM = -4,
-
- /** Invalid arguments. */
- BT_COMPONENT_STATUS_INVAL = -3,
-
- /** Unsupported component feature. */
- BT_COMPONENT_STATUS_UNSUPPORTED = -2,
-
- /** General error. */
- BT_COMPONENT_STATUS_ERROR = -1,
-
/** No error, okay. */
BT_COMPONENT_STATUS_OK = 0,
+ /** No more work to be done by this component. **/
+ BT_COMPONENT_STATUS_END = 1,
+ /**
+ * Component can't process a notification at this time
+ * (e.g. would block), try again later.
+ */
+ BT_COMPONENT_STATUS_AGAIN = 2,
+ /** General error. */
+ BT_COMPONENT_STATUS_ERROR = -1,
+ /** Unsupported component feature. */
+ BT_COMPONENT_STATUS_UNSUPPORTED = -2,
+ /** Invalid arguments. */
+ BT_COMPONENT_STATUS_INVALID = -3,
+ /** Memory allocation failure. */
+ BT_COMPONENT_STATUS_NOMEM = -4,
};
-
struct bt_component;
struct bt_value;
extern struct bt_component_class *bt_component_get_class(
struct bt_component *component);
-/**
- * Set component instance's error stream.
- *
- * @param component Component instance
- * @param error_stream Error stream
- * @returns One of #bt_component_status values
- */
-extern enum bt_component_status bt_component_set_error_stream(
- struct bt_component *component, FILE *error_stream);
-
#ifdef __cplusplus
}
#endif