Update portability notes.
[darkstat] / graph_db.h
1 /* darkstat 3
2 * copyright (c) 2006-2011 Emil Mikulic.
3 *
4 * graph_db.h: round robin database for graph data
5 */
6 #ifndef __DARKSTAT_GRAPH_DB_H
7 #define __DARKSTAT_GRAPH_DB_H
8
9 #include <stdint.h> /* for uint64_t on Linux and OS X */
10
11 enum graph_dir {
12 MIN_GRAPH_DIR = 1,
13 GRAPH_IN = 1,
14 GRAPH_OUT = 2,
15 MAX_GRAPH_DIR = 2
16 };
17
18 void graph_init(void);
19 void graph_reset(void);
20 void graph_free(void);
21 void graph_acct(uint64_t amount, enum graph_dir dir);
22 void graph_rotate(void);
23 int graph_import(const int fd);
24 int graph_export(const int fd);
25
26 struct str *html_front_page(void);
27 struct str *xml_graphs(void);
28
29 #endif
30 /* vim:set ts=3 sw=3 tw=78 expandtab: */