navit 0.5.3-trunk
Loading...
Searching...
No Matches
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
36/* prototypes */
37enum attr_type;
38enum log_flags;
39struct attr;
40struct attr_iter;
41struct log;
42int log_get_attr(struct log *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
43struct log *log_new(struct attr *parent, struct attr **attrs);
44void log_set_header(struct log *this_, char *data, int len);
45void log_set_trailer(struct log *this_, char *data, int len);
46void log_write(struct log *this_, char *data, int len, enum log_flags flags);
47void *log_get_buffer(struct log *this_, int *len);
48void log_printf(struct log *this_, char *fmt, ...);
49void log_destroy(struct log *this_);
50/* end of prototypes */
51#endif
attr_type
Definition attr_type_def.h:11
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
struct log * log_new(struct attr *parent, struct attr **attrs)
Creates and initializes a new log object.
Definition log.c:363
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_get_buffer(struct log *this_, int *len)
Returns the data buffer of a log object and its length.
Definition log.c:495
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
Definition config_.c:47
Definition attr.h:136
Definition log.c:59
Definition gpx2navit_txt.h:51