OSDN Git Service

Implement package installer for tar archives.
[mingw/mingw-get.git] / src / dmh.h
1 #ifndef DMH_H
2 /*
3  * dmh.h
4  *
5  * $Id$
6  *
7  * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8  * Copyright (C) 2009, MinGW Project
9  *
10  *
11  * This header file provides the public API declarations for the
12  * diagnostic message handling subsystem.
13  *
14  *
15  * This is free software.  Permission is granted to copy, modify and
16  * redistribute this software, under the provisions of the GNU General
17  * Public License, Version 3, (or, at your option, any later version),
18  * as published by the Free Software Foundation; see the file COPYING
19  * for licensing details.
20  *
21  * Note, in particular, that this software is provided "as is", in the
22  * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
23  * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
24  * PARTICULAR PURPOSE.  Under no circumstances will the author, or the
25  * MinGW Project, accept liability for any damages, however caused,
26  * arising from the use of this software.
27  *
28  */
29 #define DMH_H  1
30
31 #include <stdint.h>
32
33 #undef EXTERN_C
34 #ifdef __cplusplus
35 # define EXTERN_C  extern "C"
36 #else
37 # define EXTERN_C
38 #endif
39
40 typedef
41 enum dmh_class
42 {
43   DMH_SUBSYSTEM_TTY = 0,
44   DMH_SUBSYSTEM_GUI
45 } dmh_class;
46
47 typedef
48 enum dmh_severity
49 {
50   DMH_INFO = 0,
51   DMH_WARNING,
52   DMH_ERROR,
53   DMH_FATAL
54 } dmh_severity;
55
56 EXTERN_C void dmh_init( const dmh_class, const char* );
57 EXTERN_C int dmh_notify( const dmh_severity, const char *fmt, ... );
58 EXTERN_C int dmh_printf( const char *fmt, ... );
59
60 #define DMH_BEGIN_DIGEST  0x0001U, ~0x0001U
61 #define DMH_END_DIGEST    0x0100U,  0x0000U
62
63 EXTERN_C uint16_t dmh_control( const uint16_t, const uint16_t );
64
65 #endif /* DMH_H: $RCSfile$: end of file */