Bugfix: memory and thread-deleting problems
[monky] / src / fs.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */
2
3 #ifndef _FS_H
4 #define _FS_H
5
6 #include "conky.h"      /* DEFAULT_TEXT_BUFFER_SIZE */
7
8 /* needed here and by fs.c */
9 struct fs_stat {
10         char path[DEFAULT_TEXT_BUFFER_SIZE];
11         char type[DEFAULT_TEXT_BUFFER_SIZE];
12         long long size;
13         long long avail;
14         long long free;
15         char set;
16 };
17
18 /* forward declare to make gcc happy (fs.h <-> text_object.h include) */
19 struct text_object;
20
21 void init_fs_bar(struct text_object *, const char *);
22 void print_fs_bar(struct text_object *, int, char *, int);
23
24 void init_fs(struct text_object *, const char *);
25 void print_fs_perc(struct text_object *, int, char *, int);
26 void print_fs_free(struct text_object *, char *, int);
27 void print_fs_size(struct text_object *, char *, int);
28 void print_fs_used(struct text_object *, char *, int);
29 void print_fs_type(struct text_object *, char *, int);
30
31 int update_fs_stats(void);
32 struct fs_stat *prepare_fs_stat(const char *path);
33 void clear_fs_stats(void);
34
35 #endif /* _FS_H */