* #BT_CTF_BTR_STATUS_EOF is returned to complete the decoding
* process of a given type.
*/
- BT_CTF_BTR_STATUS_EOF = -4,
+ BT_CTF_BTR_STATUS_EOF = 1,
/** Invalid argument. */
BT_CTF_BTR_STATUS_INVAL = -3,
*
* @param cbs User callback functions
* @param data User data (passed to user callback functions)
- * @param err_stream Error stream (can be \c NULL to disable)
* @returns New binary type reader on success, or \c NULL on error
*/
-struct bt_ctf_btr *bt_ctf_btr_create(struct bt_ctf_btr_cbs cbs, void *data,
- FILE *err_stream);
+struct bt_ctf_btr *bt_ctf_btr_create(struct bt_ctf_btr_cbs cbs, void *data);
/**
* Destroys a CTF binary type reader, freeing all internal resources.
const uint8_t *buf, size_t sz,
enum bt_ctf_btr_status *status);
+static inline
+const char *bt_ctf_btr_status_string(enum bt_ctf_btr_status status)
+{
+ switch (status) {
+ case BT_CTF_BTR_STATUS_ENOMEM:
+ return "BT_CTF_BTR_STATUS_ENOMEM";
+ case BT_CTF_BTR_STATUS_EOF:
+ return "BT_CTF_BTR_STATUS_EOF";
+ case BT_CTF_BTR_STATUS_INVAL:
+ return "BT_CTF_BTR_STATUS_INVAL";
+ case BT_CTF_BTR_STATUS_ERROR:
+ return "BT_CTF_BTR_STATUS_ERROR";
+ case BT_CTF_BTR_STATUS_OK:
+ return "BT_CTF_BTR_STATUS_OK";
+ default:
+ return "(unknown)";
+ }
+}
+
#endif /* CTF_BTR_H */