src.ctf.fs: use GMappedFileUP in build_index_from_idx_file
[babeltrace.git] / src / clock-correlation-validator / clock-correlation-validator.h
CommitLineData
e0f8968a
SM
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2024 EfficiOS, Inc.
5 */
6
7#ifndef CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
8#define CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
9
10#include <glib.h>
11#include <stdbool.h>
12#include <babeltrace2/babeltrace.h>
13
14#include "common/macros.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20struct bt_clock_class;
21struct bt_message;
22
23enum bt_clock_correlation_validator_error_type
24{
25 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_NO_CLOCK_CLASS_GOT_ONE,
26 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UNIX_GOT_NONE,
27 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UNIX_GOT_OTHER,
28 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_NONE,
29 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_UNIX,
30 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_NO_UUID,
31 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_OTHER_UUID,
32 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_NO_UUID_GOT_NONE,
33 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_NO_UUID_GOT_OTHER,
34};
35
36struct bt_clock_correlation_validator *bt_clock_correlation_validator_create(
37 void) BT_NOEXCEPT;
38
39bool bt_clock_correlation_validator_validate_message(
40 struct bt_clock_correlation_validator *validator,
41 const struct bt_message *msg,
42 enum bt_clock_correlation_validator_error_type *type,
43 bt_uuid *expected_uuid,
44 const struct bt_clock_class ** const actual_clock_cls,
45 const struct bt_clock_class ** const expected_clock_cls) BT_NOEXCEPT;
46
47void bt_clock_correlation_validator_destroy(
48 struct bt_clock_correlation_validator *validator) BT_NOEXCEPT;
49
50#ifdef __cplusplus
51} /* extern "C" */
52#endif
53
54#endif /* CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H */
This page took 0.026029 seconds and 4 git commands to generate.