navit  0.5.3-trunk
log.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_LOG_H
21 #define NAVIT_LOG_H
22 #define LOG_BUFFER_SIZE 256
29 enum log_flags {
35 };
36 /* prototypes */
37 enum attr_type;
38 enum log_flags;
39 struct attr;
40 struct attr_iter;
41 struct log;
42 int log_get_attr(struct log *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
43 struct log *log_new(struct attr *parent, struct attr **attrs);
44 void log_set_header(struct log *this_, char *data, int len);
45 void log_set_trailer(struct log *this_, char *data, int len);
46 void log_write(struct log *this_, char *data, int len, enum log_flags flags);
47 void *log_get_buffer(struct log *this_, int *len);
48 void log_printf(struct log *this_, char *fmt, ...);
49 void log_destroy(struct log *this_);
50 /* end of prototypes */
51 #endif
attr_type
Definition: attr.h:34
char data
Definition: garmin_img.c:2
char type[3]
Definition: garmin_img.c:2
flags
Definition: gui_internal.h:26
int log_get_attr(struct log *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Gets an attribute.
Definition: log.c:350
void log_destroy(struct log *this_)
Destroys a log object and frees up its memory.
Definition: log.c:531
void log_set_header(struct log *this_, char *data, int len)
Sets the header for a log file.
Definition: log.c:424
void log_write(struct log *this_, char *data, int len, enum log_flags flags)
Writes to a log.
Definition: log.c:468
log_flags
Definition: log.h:29
@ log_flag_truncate
Definition: log.h:34
@ log_flag_keep_buffer
Definition: log.h:33
@ log_flag_force_flush
Definition: log.h:31
@ log_flag_keep_pointer
Definition: log.h:32
@ log_flag_replace_buffer
Definition: log.h:30
void log_printf(struct log *this_, char *fmt,...)
Writes a formatted string to a log.
Definition: log.c:512
void log_set_trailer(struct log *this_, char *data, int len)
Sets the trailer for a log file.
Definition: log.c:440
void * log_get_buffer(struct log *this_, int *len)
Returns the data buffer of a log object and its length.
Definition: log.c:495
struct log * log_new(struct attr *parent, struct attr **attrs)
Creates and initializes a new log object.
Definition: log.c:363
Definition: config_.c:47
Definition: attr.h:157
Definition: log.c:59
Definition: gpx2navit_txt.h:51