OSDN Git Service

Discontinue formal use of the build-aux submodule.
[mingw/mingw-get.git] / src / dmhcore.h
1 #ifndef DMHCORE_H
2 /*
3  * dmhcore.h
4  *
5  * $Id$
6  *
7  * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8  * Copyright (C) 2009, 2012, 2013, MinGW.org Project
9  *
10  *
11  * Declaration of the classes on which the implementation of the
12  * diagnostic message handling subsystem is based.
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 DMHCORE_H  1
30
31 #include "dmh.h"
32 #include <stdarg.h>
33
34 class dmhTypeGeneric
35 {
36   /* Abstract base class, from which message handlers are derived.
37    */
38   public:
39     dmhTypeGeneric( const char* );
40     virtual void set_console_hook( void * ){}
41     virtual uint16_t control( const uint16_t, const uint16_t ) = 0;
42     virtual int notify( const dmh_severity, const char*, va_list ) = 0;
43     virtual int printf( const char*, va_list ) = 0;
44
45   protected:
46     const char *progname;
47     static const char *severity_tag( dmh_severity );
48     static const char *notification_format;
49 };
50
51 EXTERN_C dmhTypeGeneric *dmh_bind( dmhTypeGeneric* );
52
53 #endif /* DMHCORE_H: $RCSfile$: end of file */