1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Definitions required for Error Message plugin
6
* Copyright (C) 2008 Sun Microsystems
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; version 2 of the License.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#ifndef DRIZZLED_PLUGIN_ERROR_MESSAGE_H
23
#define DRIZZLED_PLUGIN_ERROR_MESSAGE_H
33
class ErrorMessage : public Plugin
36
ErrorMessage(const ErrorMessage &);
38
explicit ErrorMessage(std::string name_arg): Plugin(name_arg) {}
39
virtual ~ErrorMessage() {}
41
virtual bool errmsg(Session *session, int priority,
42
const char *format, va_list ap)=0;
44
static void add(plugin::ErrorMessage *handler);
45
static void remove(plugin::ErrorMessage *handler);
47
static bool vprintf(Session *session, int priority, char const *format,
51
} /* namespace plugin */
52
} /* namespace drizzled */
54
#endif /* DRIZZLED_PLUGIN_ERROR_MESSAGE_H */