The compiler almost certainly knows better.
[oweals/opkg-lede.git] / libopkg / opkg_message.h
1 /* opkg_message.h - the opkg package management system
2
3    Copyright (C) 2003 Daniele Nicolodi <daniele@grinta.net>
4
5    This program is free software; you can redistribute it and/or
6    modify it under the terms of the GNU General Public License as
7    published by the Free Software Foundation; either version 2, or (at
8    your option) any later version.
9
10    This program is distributed in the hope that it will be useful, but
11    WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    General Public License for more details.
14 */
15
16 #ifndef _OPKG_MESSAGE_H_
17 #define _OPKG_MESSAGE_H_
18
19 #include "opkg_conf.h"
20
21 typedef enum {
22      OPKG_ERROR,        /* error conditions */
23      OPKG_NOTICE,       /* normal but significant condition */
24      OPKG_INFO,         /* informational message */
25      OPKG_DEBUG,        /* debug level message */
26      OPKG_DEBUG2,       /* more debug level message */
27 } message_level_t;
28
29 typedef int (*opkg_message_callback)(opkg_conf_t *conf, message_level_t level, 
30         char *msg);
31
32 extern void opkg_message(opkg_conf_t *conf, message_level_t level, char *fmt, ...);
33
34 #endif /* _OPKG_MESSAGE_H_ */