~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/logging.h

Renamed namespace slot to namespace service.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef DRIZZLED_PLUGIN_LOGGING_H
23
23
#define DRIZZLED_PLUGIN_LOGGING_H
24
24
 
25
 
#include "drizzled/plugin/plugin.h"
26
 
 
27
25
#include <string>
28
26
 
29
27
namespace drizzled
30
28
{
31
 
class Session;
32
 
 
33
29
namespace plugin
34
30
{
35
31
 
36
 
class Logging : public Plugin
 
32
class Logging
37
33
{
38
 
  Logging();
39
 
  Logging(const Logging &);
40
 
  Logging& operator=(const Logging &);
 
34
  std::string name;
41
35
public:
42
 
  explicit Logging(std::string name_arg)
43
 
    : Plugin(name_arg, "Logging")
44
 
  {}
 
36
  Logging(std::string name_arg): name(name_arg)  {}
45
37
  virtual ~Logging() {}
46
38
 
 
39
  std::string getName() { return name; }
47
40
  /**
48
41
   * Make these no-op rather than pure-virtual so that it's easy for a plugin
49
42
   * to only implement one.
50
43
   */
51
44
  virtual bool pre(Session *) {return false;}
52
45
  virtual bool post(Session *) {return false;}
53
 
  virtual bool postEnd(Session*) {return false;}
54
 
  virtual bool resetGlobalScoreboard() {return false;}
55
 
 
56
 
  static bool addPlugin(Logging *handler);
57
 
  static void removePlugin(Logging *handler);
58
 
  static bool preDo(Session *session);
59
 
  static bool postDo(Session *session);
60
 
  static bool postEndDo(Session *session);
61
 
  static bool resetStats(Session *session);
62
46
};
63
47
 
64
48
} /* namespace plugin */