2 * Copyright (C) 2018 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 #ifndef RELAY_INDEX_FILE_H
19 #define RELAY_INDEX_FILE_H
22 #include <common/index/ctf-index.h>
24 struct relay_index_file
;
27 * create and open have refcount of 1. Use put to decrement the
28 * refcount. Destroys when reaching 0. Use "get" to increment refcount.
30 struct relay_index_file
*relay_index_file_create(const char *path_name
,
31 const char *stream_name
, uint64_t size
,
32 uint64_t count
, uint32_t major
, uint32_t minor
);
33 struct relay_index_file
*relay_index_file_open(const char *path_name
,
34 const char *channel_name
, uint64_t tracefile_count
,
35 uint64_t tracefile_count_current
);
37 int relay_index_file_write(const struct relay_index_file
*index_file
,
38 const struct ctf_packet_index
*element
);
39 int relay_index_file_read(const struct relay_index_file
*index_file
,
40 struct ctf_packet_index
*element
);
42 int relay_index_file_seek_end(struct relay_index_file
*index_file
);
44 void relay_index_file_get(struct relay_index_file
*index_file
);
45 void relay_index_file_put(struct relay_index_file
*index_file
);
47 #endif /* RELAY_INDEX_FILE_H */
This page took 0.031246 seconds and 5 git commands to generate.