~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/logging_handler.h

  • Committer: Brian Aker
  • Date: 2009-05-15 17:06:35 UTC
  • mto: This revision was merged to the branch mainline in revision 1023.
  • Revision ID: brian@gaz-20090515170635-croy1u63a3gqdn9n
Dead convert functions for character sets.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
  Definitions required for Logging plugin 
3
 
*/
 
2
 -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
3
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
4
 
 
5
 *  Definitions required for Query Logging plugin
 
6
 
 
7
 *  Copyright (C) 2008 Sun Microsystems
 
8
 *
 
9
 *  This program is free software; you can redistribute it and/or modify
 
10
 *  it under the terms of the GNU General Public License as published by
 
11
 *  the Free Software Foundation; version 2 of the License.
 
12
 *
 
13
 *  This program is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with this program; if not, write to the Free Software
 
20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
21
 */
4
22
 
5
23
#ifndef DRIZZLED_PLUGIN_LOGGING_H
6
24
#define DRIZZLED_PLUGIN_LOGGING_H
7
25
 
8
 
typedef struct logging_st
 
26
#include <string>
 
27
 
 
28
class Logging_handler
9
29
{
10
 
  bool (*logging_pre)(THD *thd);
11
 
  bool (*logging_post)(THD *thd);
12
 
} logging_t;
 
30
  std::string name;
 
31
public:
 
32
  Logging_handler(std::string name_arg): name(name_arg)  {}
 
33
  Logging_handler(const char *name_arg): name(name_arg)  {}
 
34
  virtual ~Logging_handler() {}
 
35
 
 
36
  std::string getName() { return name; }
 
37
  /**
 
38
   * Make these no-op rather than pure-virtual so that it's easy for a plugin
 
39
   * to only 
 
40
   */
 
41
  virtual bool pre(Session *) {return false;}
 
42
  virtual bool post(Session *) {return false;}
 
43
};
13
44
 
14
45
#endif /* DRIZZLED_PLUGIN_LOGGING_H */