Navit SVN

/work/compile/navit/src/navit/log.h

00001 
00020 #ifndef NAVIT_LOG_H
00021 #define NAVIT_LOG_H
00022 #define LOG_BUFFER_SIZE 256
00023 
00029 enum log_flags {
00030         log_flag_replace_buffer=1,
00031         log_flag_force_flush=2,
00032         log_flag_keep_pointer=4,
00033         log_flag_keep_buffer=8,
00034         log_flag_truncate=16,
00035 };
00036 /* prototypes */
00037 enum attr_type;
00038 enum log_flags;
00039 struct attr;
00040 struct attr_iter;
00041 struct log;
00042 int log_get_attr(struct log *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
00043 struct log *log_new(struct attr *parent, struct attr **attrs);
00044 void log_set_header(struct log *this_, char *data, int len);
00045 void log_set_trailer(struct log *this_, char *data, int len);
00046 void log_write(struct log *this_, char *data, int len, enum log_flags flags);
00047 void *log_get_buffer(struct log *this_, int *len);
00048 void log_printf(struct log *this_, char *fmt, ...);
00049 void log_destroy(struct log *this_);
00050 /* end of prototypes */
00051 #endif