~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/client.h

  • Committer: Lee Bieber
  • Date: 2010-11-14 23:15:42 UTC
  • mfrom: (1929.1.42 warning-stack-frame)
  • Revision ID: kalebral@gmail.com-20101114231542-fnnu6ydd2p17n582
Merge Monty - fix bug 672372: some functions use > 32k stack

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, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
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>
 
23
#include <drizzled/sql_list.h>
26
24
#include <drizzled/item.h>
27
 
#include <drizzled/sql_list.h>
28
 
 
29
 
#include "drizzled/visibility.h"
30
25
 
31
26
namespace drizzled
32
27
{
43
38
 * file-descriptor based, so for non-fd client sources (like from another
44
39
 * thread), derived classes will need to use a pipe() for event notifications.
45
40
 */
46
 
class DRIZZLED_API Client
 
41
class Client
47
42
{
48
43
protected:
49
44
  Session *session;
109
104
   */
110
105
  virtual bool authenticate(void)= 0;
111
106
 
112
 
  virtual bool isConsole()
113
 
  {
114
 
    return false;
115
 
  }
116
 
 
117
 
  virtual catalog::Instance::shared_ptr catalog()
118
 
  {
119
 
    return catalog::local();
120
 
  }
121
 
 
122
107
  /**
123
108
   * Read command from client.
124
109
   */
127
112
  /* Send responses. */
128
113
  virtual void sendOK(void)= 0;
129
114
  virtual void sendEOF(void)= 0;
130
 
  virtual void sendError(const drizzled::error_t sql_errno, const char *err)= 0;
 
115
  virtual void sendError(uint32_t sql_errno, const char *err)= 0;
131
116
 
132
117
  /**
133
118
   * Send field list for result set.
142
127
  virtual bool store(int64_t from)= 0;
143
128
  virtual bool store(uint64_t from)= 0;
144
129
  virtual bool store(double from, uint32_t decimals, String *buffer)= 0;
145
 
  virtual bool store(const type::Time *from);
 
130
  virtual bool store(const DRIZZLE_TIME *from);
146
131
  virtual bool store(const char *from);
147
132
  virtual bool store(const char *from, size_t length)= 0;
148
133
  virtual bool store(const std::string &from)