~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/error_message.h

  • Committer: Brian Aker
  • Date: 2010-01-27 18:58:12 UTC
  • Revision ID: brian@gaz-20100127185812-n62n0vwetnx8jrjy
Remove dead code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Definitions required for Error Message plugin
 
5
 *
 
6
 *  Copyright (C) 2008 Sun Microsystems
 
7
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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
 
20
 */
 
21
 
 
22
#ifndef DRIZZLED_PLUGIN_ERROR_MESSAGE_H
 
23
#define DRIZZLED_PLUGIN_ERROR_MESSAGE_H
 
24
 
 
25
#include "drizzled/plugin/plugin.h"
 
26
 
 
27
#include <stdarg.h>
 
28
 
 
29
#include <string>
 
30
 
 
31
class Session;
 
32
 
 
33
namespace drizzled
 
34
{
 
35
namespace plugin
 
36
{
 
37
 
 
38
class ErrorMessage : public Plugin
 
39
{
 
40
  ErrorMessage();
 
41
  ErrorMessage(const ErrorMessage &);
 
42
  ErrorMessage& operator=(const ErrorMessage &);
 
43
public:
 
44
  explicit ErrorMessage(std::string name_arg)
 
45
   : Plugin(name_arg, "ErrorMessage")
 
46
  {}
 
47
  virtual ~ErrorMessage() {}
 
48
 
 
49
  virtual bool errmsg(Session *session, int priority,
 
50
                      const char *format, va_list ap)=0;
 
51
 
 
52
  static bool addPlugin(plugin::ErrorMessage *handler);
 
53
  static void removePlugin(plugin::ErrorMessage *handler);
 
54
 
 
55
  static bool vprintf(Session *session, int priority, char const *format,
 
56
                      va_list ap);
 
57
};
 
58
 
 
59
} /* namespace plugin */
 
60
} /* namespace drizzled */
 
61
 
 
62
#endif /* DRIZZLED_PLUGIN_ERROR_MESSAGE_H */