Commit | Line | Data |
---|---|---|
7591bab1 MD |
1 | #ifndef _STREAM_FD_H |
2 | #define _STREAM_FD_H | |
3 | ||
4 | /* | |
5 | * Copyright (C) 2015 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
0048db42 | 6 | * 2018 - Jérémie Galarneau <jeremie.galarneau@efficios.com> |
7591bab1 MD |
7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License, version 2 only, as | |
10 | * published by the Free Software Foundation. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
15 | * more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License along with | |
18 | * this program; if not, write to the Free Software Foundation, Inc., 51 | |
19 | * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 | */ | |
21 | ||
0048db42 | 22 | #include <stdint.h> |
7591bab1 | 23 | |
0048db42 | 24 | struct stream_fd; |
7591bab1 | 25 | |
0048db42 JG |
26 | struct stream_fd *stream_fd_open(const char *path); |
27 | struct stream_fd *stream_fd_create(const char *path_name, const char *file_name, | |
28 | uint64_t size, uint64_t count, const char *suffix); | |
29 | int stream_fd_rotate(struct stream_fd *sf, const char *path_name, | |
30 | const char *file_name, uint64_t size, | |
31 | uint64_t count, uint64_t *new_count); | |
7591bab1 MD |
32 | void stream_fd_get(struct stream_fd *sf); |
33 | void stream_fd_put(struct stream_fd *sf); | |
0048db42 JG |
34 | int stream_fd_get_fd(struct stream_fd *sf); |
35 | void stream_fd_put_fd(struct stream_fd *sf); | |
7591bab1 MD |
36 | |
37 | #endif /* _STREAM_FD_H */ |