-
Notifications
You must be signed in to change notification settings - Fork 1
/
tl-logger.h
37 lines (30 loc) · 1.05 KB
/
tl-logger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef TLLOGGER_H
#define TLLOGGER_H
#include <glib.h>
typedef struct _TLLoggerLogItemData
{
gchar *name;
gint64 value;
gint offset;
gdouble unit;
guint list_item;
gint8 source;
gboolean list_index;
gchar *list_parent;
GHashTable *index_table;
GHashTable *list_table;
}TLLoggerLogItemData;
typedef void (*TLLoggerQueryResultCallback)(gboolean begin_time_set,
gint64 begin_time, gboolean end_time_set, gint64 end_time,
GHashTable *log_table, gpointer user_data);
gboolean tl_logger_init(const gchar *storage_base_path);
void tl_logger_uninit();
void tl_logger_current_data_update(const TLLoggerLogItemData *item_data);
GHashTable *tl_logger_current_data_get(gboolean *updated);
void *tl_logger_log_query_start(gboolean begin_time_set, gint64 begin_time,
gboolean end_time_set, gint64 end_time,
TLLoggerQueryResultCallback callback, gpointer user_data);
void tl_logger_log_query_stop(void *handler);
guint tl_logger_log_update_timeout_get();
void tl_logger_log_update_timeout_set(guint timeout);
#endif // TLLOGGER_H