add:core:GPX logs now include the current profile name of the logging vehicle
[navit-package] / navit / log.h
1 /**
2  * Navit, a modular navigation system.
3  * Copyright (C) 2005-2008 Navit Team
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * version 2 as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA  02110-1301, USA.
18  */
19
20 #ifndef NAVIT_LOG_H
21 #define NAVIT_LOG_H
22 /* prototypes */
23 enum attr_type;
24 struct attr;
25 struct attr_iter;
26 struct log;
27 int log_get_attr(struct log *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
28 struct log *log_new(struct attr * parent,struct attr **attrs);
29 void log_set_header(struct log *this_, char *data, int len);
30 void log_set_trailer(struct log *this_, char *data, int len);
31 void log_write(struct log *this_, char *data, int len);
32 void log_destroy(struct log *this_);
33
34 #define LOG_BUFFER_SIZE 256
35 /**
36  * printf-style writing to the log file. A buffer of LOG_BUFFER_SIZE
37  * bytes is preallocated for the complete format message, longer
38  * messages will be truncated.
39  */
40 void log_printf(struct log *this_, char *fmt, ...);
41
42 /* end of prototypes */
43 #endif