Babeltrace 2 C API 2.0.6
Open-source trace manipulation framework
Loading...
Searching...
No Matches
event-class.h
1#ifndef BABELTRACE2_TRACE_IR_EVENT_CLASS_H
2#define BABELTRACE2_TRACE_IR_EVENT_CLASS_H
3
4/*
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 */
25
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
28#endif
29
30#include <stdint.h>
31
32#include <babeltrace2/types.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
276 bt_stream_class *stream_class);
277
349 bt_stream_class *stream_class, uint64_t id);
350
375 bt_event_class *event_class);
376
385 const bt_event_class *event_class);
386
412extern uint64_t bt_event_class_get_id(const bt_event_class *event_class);
413
431
457 bt_event_class *event_class, const char *name);
458
483extern const char *bt_event_class_get_name(const bt_event_class *event_class);
484
585
605 bt_event_class_log_level log_level);
606
632 const bt_event_class *event_class,
633 bt_event_class_log_level *log_level);
634
652
678 bt_event_class *event_class, const char *emf_uri);
679
705extern const char *bt_event_class_get_emf_uri(
706 const bt_event_class *event_class);
707
726
768 bt_field_class *field_class);
769
794 bt_event_class *event_class);
795
804 const bt_event_class *event_class);
805
848 bt_field_class *field_class);
849
875extern bt_field_class *
877
885extern const bt_field_class *
887 const bt_event_class *event_class);
888
918 bt_event_class *event_class, const bt_value *user_attributes);
919
945 bt_event_class *event_class);
946
955 const bt_event_class *event_class);
956
979extern void bt_event_class_get_ref(const bt_event_class *event_class);
980
996extern void bt_event_class_put_ref(const bt_event_class *event_class);
997
1012#define BT_EVENT_CLASS_PUT_REF_AND_RESET(_event_class) \
1013 do { \
1014 bt_event_class_put_ref(_event_class); \
1015 (_event_class) = NULL; \
1016 } while (0)
1017
1043#define BT_EVENT_CLASS_MOVE_REF(_dst, _src) \
1044 do { \
1045 bt_event_class_put_ref(_dst); \
1046 (_dst) = (_src); \
1047 (_src) = NULL; \
1048 } while (0)
1049
1054#ifdef __cplusplus
1055}
1056#endif
1057
1058#endif /* BABELTRACE2_TRACE_IR_EVENT_CLASS_H */
bt_property_availability
Availability of an object's property.
Definition types.h:173
const bt_stream_class * bt_event_class_borrow_stream_class_const(const bt_event_class *event_class)
Borrows the stream class which contains the event class event_class (const version).
void bt_event_class_put_ref(const bt_event_class *event_class)
Decrements the reference count of the event class event_class.
bt_property_availability bt_event_class_get_log_level(const bt_event_class *event_class, bt_event_class_log_level *log_level)
Returns the log level of the event class event_class.
const char * bt_event_class_get_name(const bt_event_class *event_class)
Returns the name of the event class event_class.
void bt_event_class_set_log_level(bt_event_class *event_class, bt_event_class_log_level log_level)
Sets the log level of the event class event_class to log_level.
bt_field_class * bt_event_class_borrow_specific_context_field_class(bt_event_class *event_class)
Borrows the specific context field class from the event class event_class.
void bt_event_class_set_user_attributes(bt_event_class *event_class, const bt_value *user_attributes)
Sets the user attributes of the event class event_class to user_attributes.
const char * bt_event_class_get_emf_uri(const bt_event_class *event_class)
Returns the Eclipse Modeling Framework (EMF) URI of the event class event_class.
const bt_value * bt_event_class_borrow_user_attributes_const(const bt_event_class *event_class)
Borrows the user attributes of the event class event_class (const version).
uint64_t bt_event_class_get_id(const bt_event_class *event_class)
Returns the numeric ID of the event class event_class.
const bt_field_class * bt_event_class_borrow_specific_context_field_class_const(const bt_event_class *event_class)
Borrows the specific context field class from the event class event_class (const version).
bt_event_class_set_emf_uri_status
Status codes for bt_event_class_set_emf_uri().
Definition event-class.h:639
bt_event_class_set_field_class_status
Status codes for bt_event_class_set_payload_field_class() and bt_event_class_set_specific_context_fie...
Definition event-class.h:713
void bt_event_class_get_ref(const bt_event_class *event_class)
Increments the reference count of the event class event_class.
bt_event_class * bt_event_class_create(bt_stream_class *stream_class)
Creates a default event class and adds it to the stream class stream_class.
bt_event_class * bt_event_class_create_with_id(bt_stream_class *stream_class, uint64_t id)
Creates a default event class with the numeric ID id and adds it to the stream class stream_class.
bt_event_class_set_field_class_status bt_event_class_set_payload_field_class(bt_event_class *event_class, bt_field_class *field_class)
Sets the payload field class of the event class event_class to field_class.
bt_event_class_set_name_status bt_event_class_set_name(bt_event_class *event_class, const char *name)
Sets the name of the event class event_class to a copy of name.
struct bt_event_class bt_event_class
Event class.
Definition types.h:51
bt_event_class_set_field_class_status bt_event_class_set_specific_context_field_class(bt_event_class *event_class, bt_field_class *field_class)
Sets the specific context field class of the event class event_class to field_class.
bt_stream_class * bt_event_class_borrow_stream_class(bt_event_class *event_class)
Borrows the stream class which contains the event class event_class.
bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri(bt_event_class *event_class, const char *emf_uri)
Sets the Eclipse Modeling Framework (EMF) URI of the event class event_class to a copy of emf_uri.
bt_value * bt_event_class_borrow_user_attributes(bt_event_class *event_class)
Borrows the user attributes of the event class event_class.
bt_event_class_set_name_status
Status codes for bt_event_class_set_name().
Definition event-class.h:418
bt_field_class * bt_event_class_borrow_payload_field_class(bt_event_class *event_class)
Borrows the payload field class from the event class event_class.
const bt_field_class * bt_event_class_borrow_payload_field_class_const(const bt_event_class *event_class)
Borrows the payload field class from the event class event_class (const version).
bt_event_class_log_level
Event class log level enumerators.
Definition event-class.h:489
@ BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK
Success.
Definition event-class.h:644
@ BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR
Out of memory.
Definition event-class.h:650
@ BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
Out of memory.
Definition event-class.h:724
@ BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
Success.
Definition event-class.h:718
@ BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR
Out of memory.
Definition event-class.h:429
@ BT_EVENT_CLASS_SET_NAME_STATUS_OK
Success.
Definition event-class.h:423
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM
Debugging information with program-level scope (set of processes).
Definition event-class.h:544
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE
Debugging information with module (executable/library) scope (set of units).
Definition event-class.h:558
@ BT_EVENT_CLASS_LOG_LEVEL_NOTICE
Normal, but significant, condition.
Definition event-class.h:524
@ BT_EVENT_CLASS_LOG_LEVEL_INFO
Informational message.
Definition event-class.h:530
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG
Debugging-level message.
Definition event-class.h:583
@ BT_EVENT_CLASS_LOG_LEVEL_ALERT
Action must be taken immediately.
Definition event-class.h:500
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION
Debugging information with function-level scope.
Definition event-class.h:571
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE
Debugging information with function-level scope.
Definition event-class.h:577
@ BT_EVENT_CLASS_LOG_LEVEL_ERROR
Error conditions.
Definition event-class.h:512
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS
Debugging information with process-level scope (set of modules).
Definition event-class.h:551
@ BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY
System is unusable.
Definition event-class.h:494
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT
Debugging information with compilation unit scope (set of functions).
Definition event-class.h:565
@ BT_EVENT_CLASS_LOG_LEVEL_WARNING
Warning conditions.
Definition event-class.h:518
@ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM
Debugging information with system-level scope (set of programs).
Definition event-class.h:537
@ BT_EVENT_CLASS_LOG_LEVEL_CRITICAL
Critical conditions.
Definition event-class.h:506
struct bt_field_class bt_field_class
Field class.
Definition types.h:54
struct bt_stream_class bt_stream_class
Stream class.
Definition types.h:104
struct bt_value bt_value
Value.
Definition types.h:107