~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/error_message.h

  • Committer: Olaf van der Spek
  • Date: 2011-02-12 17:09:31 UTC
  • mto: (2167.1.2 build) (2172.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 2168.
  • Revision ID: olafvdspek@gmail.com-20110212170931-k1fg0lzsmm5i3ciq
casts

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#define DRIZZLED_PLUGIN_ERROR_MESSAGE_H
24
24
 
25
25
#include "drizzled/plugin/plugin.h"
 
26
#include "drizzled/error/level_t.h"
26
27
 
27
28
#include <stdarg.h>
28
29
 
29
30
#include <string>
30
31
 
 
32
#include "drizzled/visibility.h"
 
33
 
31
34
namespace drizzled
32
35
{
33
 
class Session;
34
36
 
35
37
namespace plugin
36
38
{
37
39
 
38
 
class ErrorMessage : public Plugin
 
40
class DRIZZLED_API ErrorMessage : public Plugin
39
41
{
40
42
  ErrorMessage();
41
43
  ErrorMessage(const ErrorMessage &);
42
44
  ErrorMessage& operator=(const ErrorMessage &);
 
45
 
43
46
public:
44
47
  explicit ErrorMessage(std::string name_arg)
45
48
   : Plugin(name_arg, "ErrorMessage")
46
49
  {}
47
50
  virtual ~ErrorMessage() {}
48
51
 
49
 
  virtual bool errmsg(Session *session, int priority,
50
 
                      const char *format, va_list ap)=0;
 
52
  virtual bool errmsg(error::level_t priority, const char *format, va_list ap)=0;
51
53
 
52
54
  static bool addPlugin(plugin::ErrorMessage *handler);
53
55
  static void removePlugin(plugin::ErrorMessage *handler);
54
56
 
55
 
  static bool vprintf(Session *session, int priority, char const *format,
56
 
                      va_list ap);
 
57
  static bool vprintf(error::level_t priority, char const *format, va_list ap);
 
58
 
 
59
  bool removeLast() const
 
60
  {
 
61
    return true;
 
62
  }
57
63
};
58
64
 
59
65
} /* namespace plugin */