~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/drizzle_protocol/status_table.h

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

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
 *  Copyright (C) 2010 Andrew Hutchings
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#ifndef PLUGIN_DRIZZLE_PROTOCOL_STATUS_TABLE_H
 
22
#define PLUGIN_DRIZZLE_PROTOCOL_STATUS_TABLE_H
 
23
 
 
24
#include "drizzled/plugin/table_function.h"
 
25
 
 
26
namespace drizzle_plugin
 
27
{
 
28
namespace drizzle_protocol
 
29
{
 
30
 
 
31
 
 
32
class StatusTable : public drizzled::plugin::TableFunction
 
33
{
 
34
public:
 
35
  StatusTable() :
 
36
    drizzled::plugin::TableFunction("DATA_DICTIONARY","DRIZZLE_PROTOCOL_STATUS")
 
37
  {
 
38
    add_field("VARIABLE_NAME");
 
39
    add_field("VARIABLE_VALUE");
 
40
  }
 
41
 
 
42
  class Generator : public drizzled::plugin::TableFunction::Generator
 
43
  {
 
44
 
 
45
  public:
 
46
    Generator(drizzled::Field **fields) :
 
47
      drizzled::plugin::TableFunction::Generator(fields)
 
48
    {
 
49
    }
 
50
 
 
51
    bool populate()
 
52
    {
 
53
      return false;
 
54
    }
 
55
  };
 
56
 
 
57
  Generator *generator(drizzled::Field **arg)
 
58
  {
 
59
    return new Generator(arg);
 
60
  }
 
61
};
 
62
 
 
63
} /* namespace drizzle_protocol */
 
64
} /* namespace drizzle_plugin */
 
65
 
 
66
#endif /* PLUGIN_DRIZZLE_PROTOCOL_STATUS_TABLE_H */