~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to drizzled/plugin/null_client.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

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) 2008 Sun Microsystems
 
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; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef DRIZZLED_PLUGIN_NULL_CLIENT_H
 
21
#define DRIZZLED_PLUGIN_NULL_CLIENT_H
 
22
 
 
23
#include <drizzled/plugin/client.h>
 
24
 
 
25
namespace drizzled
 
26
{
 
27
namespace plugin
 
28
{
 
29
 
 
30
/**
 
31
 * This class is an empty client implementation for internal used.
 
32
 */
 
33
class NullClient: public Client
 
34
{
 
35
public:
 
36
  virtual int getFileDescriptor(void) { return -1; }
 
37
  virtual bool isConnected(void) { return true; }
 
38
  virtual bool isReading(void) { return false; }
 
39
  virtual bool isWriting(void) { return false; }
 
40
  virtual bool flush(void) { return false; }
 
41
  virtual void close(void) {}
 
42
  virtual bool authenticate(void) { return true; }
 
43
  virtual bool readCommand(char**, uint32_t*) { return false; }
 
44
  virtual void sendOK(void) {}
 
45
  virtual void sendEOF(void) {}
 
46
  virtual void sendError(uint32_t, const char*) {}
 
47
  virtual bool sendFields(List<Item>*) { return false; }
 
48
  virtual bool store(Field *) { return false; }
 
49
  virtual bool store(void) { return false; }
 
50
  virtual bool store(int32_t) { return false; }
 
51
  virtual bool store(uint32_t) { return false; }
 
52
  virtual bool store(int64_t) { return false; }
 
53
  virtual bool store(uint64_t) { return false; }
 
54
  virtual bool store(double, uint32_t, String*) { return false; }
 
55
  virtual bool store(const DRIZZLE_TIME*) { return false; }
 
56
  virtual bool store(const char*) { return false; }
 
57
  virtual bool store(const char*, size_t) { return false; }
 
58
  virtual bool store(const std::string &) { return false; }
 
59
  virtual bool haveMoreData(void) { return false; }
 
60
  virtual bool haveError(void) { return false; }
 
61
  virtual bool wasAborted(void) { return false; }
 
62
};
 
63
 
 
64
} /* namespace plugin */
 
65
} /* namespace drizzled */
 
66
 
 
67
#endif /* DRIZZLED_PLUGIN_NULL_CLIENT_H */