-#ifndef CTF_BFCR_H
-#define CTF_BFCR_H
-
/*
- * Babeltrace - CTF binary field class reader (BFCR)
+ * SPDX-License-Identifier: MIT
*
* Copyright (c) 2015-2016 EfficiOS Inc. and Linux Foundation
* Copyright (c) 2015-2016 Philippe Proulx <pproulx@efficios.com>
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Babeltrace - CTF binary field class reader (BFCR)
*/
+#ifndef CTF_BFCR_H
+#define CTF_BFCR_H
+
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
* @returns New binary class reader on success, or \c NULL on error
*/
BT_HIDDEN
-struct bt_bfcr *bt_bfcr_create(struct bt_bfcr_cbs cbs, void *data);
+struct bt_bfcr *bt_bfcr_create(struct bt_bfcr_cbs cbs, void *data,
+ bt_logging_level log_level, bt_self_component *self_comp);
/**
* Destroys a CTF binary class reader, freeing all internal resources.
{
switch (status) {
case BT_BFCR_STATUS_ENOMEM:
- return "BT_BFCR_STATUS_ENOMEM";
+ return "ENOMEM";
case BT_BFCR_STATUS_EOF:
- return "BT_BFCR_STATUS_EOF";
+ return "EOF";
case BT_BFCR_STATUS_INVAL:
- return "BT_BFCR_STATUS_INVAL";
+ return "INVAL";
case BT_BFCR_STATUS_ERROR:
- return "BT_BFCR_STATUS_ERROR";
+ return "ERROR";
case BT_BFCR_STATUS_OK:
- return "BT_BFCR_STATUS_OK";
+ return "OK";
default:
return "(unknown)";
}