1 /*
2  * Copyright (C) 2021 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.
3  *
4  * This file is part of MooseFS.
5  *
6  * MooseFS is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, version 2 (only).
9  *
10  * MooseFS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with MooseFS; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA
18  * or visit http://www.gnu.org/licenses/gpl-2.0.html
19  */
20 
21 #ifndef _CHANGELOG_H_
22 #define _CHANGELOG_H_
23 
24 #include <inttypes.h>
25 
26 uint32_t changelog_get_old_changes(uint64_t version,void (*sendfn)(void *,uint64_t,uint8_t *,uint32_t),void *userdata,uint32_t limit);
27 uint64_t changelog_get_minversion(void);
28 
29 void changelog_rotate(void);
30 void changelog_mr(uint64_t version,const char *data);
31 
32 #ifdef __printflike
33 void changelog(const char *format,...) __printflike(1, 2);
34 #else
35 void changelog(const char *format,...);
36 #endif
37 
38 char* changelog_generate_gids(uint32_t gids,uint32_t *gid);
39 char* changelog_escape_name(uint32_t nleng,const uint8_t *name);
40 int changelog_init(void);
41 
42 uint64_t changelog_findfirstversion(const char *fname);
43 uint64_t changelog_findlastversion(const char *fname);
44 int changelog_checkname(const char *fname);
45 
46 #endif
47