Add a basic .clang-tidy file and fix typedef warnings
[lttng-tools.git] / src / common / fs-handle-internal.hpp
CommitLineData
f5ea0241 1/*
ab5be9fa 2 * Copyright (C) 2020 Jérémie Galarneau <jeremie.galarneau@efficios.com>
f5ea0241 3 *
ab5be9fa 4 * SPDX-License-Identifier: LGPL-2.1-only
f5ea0241 5 *
f5ea0241
JG
6 */
7
8#ifndef FS_HANDLE_INTERNAL_H
9#define FS_HANDLE_INTERNAL_H
10
11struct fs_handle;
12
13/*
14 * Multiple internal APIs return fs_handles. For the moment, this internal
15 * interface allows the use of different fs_handle implementations in different
16 * daemons. For instance, the trace chunk interface returns fs_handles that
17 * behave diffently depending on whether or not the trace chunk was configured
18 * to use an fd-tracker.
19 */
20
e665dfbc
JG
21using fs_handle_get_fd_cb = int (*)(struct fs_handle *);
22using fs_handle_put_fd_cb = void (*)(struct fs_handle *);
23using fs_handle_unlink_cb = int (*)(struct fs_handle *);
24using fs_handle_close_cb = int (*)(struct fs_handle *);
f5ea0241
JG
25
26struct fs_handle {
27 fs_handle_get_fd_cb get_fd;
28 fs_handle_put_fd_cb put_fd;
29 fs_handle_unlink_cb unlink;
30 fs_handle_close_cb close;
31};
32
33#endif /* FS_HANDLE_INTERNAL_H */
This page took 0.041537 seconds and 4 git commands to generate.