~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/client.h

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
20
20
#ifndef DRIZZLED_PLUGIN_CLIENT_H
21
21
#define DRIZZLED_PLUGIN_CLIENT_H
22
22
 
 
23
#include <drizzled/catalog/instance.h>
 
24
#include <drizzled/catalog/local.h>
 
25
#include <drizzled/error_t.h>
 
26
#include <drizzled/item.h>
23
27
#include <drizzled/sql_list.h>
24
 
#include <drizzled/item.h>
 
28
 
 
29
#include <drizzled/visibility.h>
25
30
 
26
31
namespace drizzled
27
32
{
38
43
 * file-descriptor based, so for non-fd client sources (like from another
39
44
 * thread), derived classes will need to use a pipe() for event notifications.
40
45
 */
41
 
class Client
 
46
class DRIZZLED_API Client
42
47
{
43
48
protected:
44
49
  Session *session;
104
109
   */
105
110
  virtual bool authenticate(void)= 0;
106
111
 
 
112
  virtual bool isConsole()
 
113
  {
 
114
    return false;
 
115
  }
 
116
 
 
117
  virtual catalog::Instance::shared_ptr catalog()
 
118
  {
 
119
    return catalog::local();
 
120
  }
 
121
 
107
122
  /**
108
123
   * Read command from client.
109
124
   */
112
127
  /* Send responses. */
113
128
  virtual void sendOK(void)= 0;
114
129
  virtual void sendEOF(void)= 0;
115
 
  virtual void sendError(uint32_t sql_errno, const char *err)= 0;
 
130
  virtual void sendError(const drizzled::error_t sql_errno, const char *err)= 0;
116
131
 
117
132
  /**
118
133
   * Send field list for result set.
127
142
  virtual bool store(int64_t from)= 0;
128
143
  virtual bool store(uint64_t from)= 0;
129
144
  virtual bool store(double from, uint32_t decimals, String *buffer)= 0;
130
 
  virtual bool store(const DRIZZLE_TIME *from);
 
145
  virtual bool store(const type::Time *from);
131
146
  virtual bool store(const char *from);
132
147
  virtual bool store(const char *from, size_t length)= 0;
133
148
  virtual bool store(const std::string &from)