~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/oldlibdrizzle/oldlibdrizzle.h

Merge Stewart's dead code removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef PLUGIN_DRIZZLE_PROTOCOL_DRIZZLE_PROTOCOL_H
21
 
#define PLUGIN_DRIZZLE_PROTOCOL_DRIZZLE_PROTOCOL_H
 
20
#ifndef PLUGIN_OLDLIBDRIZZLE_OLDLIBDRIZZLE_H
 
21
#define PLUGIN_OLDLIBDRIZZLE_OLDLIBDRIZZLE_H
22
22
 
23
23
#include <drizzled/plugin/listen_tcp.h>
24
24
#include <drizzled/plugin/client.h>
25
25
 
26
26
#include "net_serv.h"
27
27
 
28
 
namespace drizzle_protocol
29
 
{
30
 
 
31
 
class ListenDrizzleProtocol: public drizzled::plugin::ListenTcp
32
 
{
33
 
private:
34
 
  bool using_mysql41_protocol;
35
 
 
 
28
class ListenOldLibdrizzle: public drizzled::plugin::ListenTcp
 
29
{
36
30
public:
37
 
  ListenDrizzleProtocol(std::string name_arg, bool using_mysql41_protocol_arg):
38
 
   drizzled::plugin::ListenTcp(name_arg),
39
 
   using_mysql41_protocol(using_mysql41_protocol_arg)
 
31
  ListenOldLibdrizzle(std::string name_arg)
 
32
   : drizzled::plugin::ListenTcp(name_arg)
40
33
  { }
41
34
  virtual const char* getHost(void) const;
42
35
  virtual in_port_t getPort(void) const;
43
36
  virtual drizzled::plugin::Client *getClient(int fd);
44
37
};
45
38
 
46
 
class ClientDrizzleProtocol: public drizzled::plugin::Client
 
39
class ClientOldLibdrizzle: public drizzled::plugin::Client
47
40
{
48
41
private:
49
42
  NET net;
50
 
  drizzled::String packet;
 
43
  String packet;
51
44
  uint32_t client_capabilities;
52
 
  bool using_mysql41_protocol;
53
45
 
54
46
  bool checkConnection(void);
55
47
  bool netStoreData(const unsigned char *from, size_t length);
56
48
  void writeEOFPacket(uint32_t server_status, uint32_t total_warn_count);
57
49
 
58
50
public:
59
 
  ClientDrizzleProtocol(int fd, bool using_mysql41_protocol_arg);
60
 
  virtual ~ClientDrizzleProtocol();
 
51
  ClientOldLibdrizzle(int fd);
 
52
  virtual ~ClientOldLibdrizzle();
61
53
 
62
54
  virtual int getFileDescriptor(void);
63
55
  virtual bool isConnected();
73
65
  virtual void sendEOF(void);
74
66
  virtual void sendError(uint32_t sql_errno, const char *err);
75
67
 
76
 
  virtual bool sendFields(drizzled::List<drizzled::Item> *list);
 
68
  virtual bool sendFields(List<Item> *list);
77
69
 
78
70
  using Client::store;
79
 
  virtual bool store(drizzled::Field *from);
 
71
  virtual bool store(Field *from);
80
72
  virtual bool store(void);
81
73
  virtual bool store(int32_t from);
82
74
  virtual bool store(uint32_t from);
83
75
  virtual bool store(int64_t from);
84
76
  virtual bool store(uint64_t from);
85
 
  virtual bool store(double from, uint32_t decimals, drizzled::String *buffer);
 
77
  virtual bool store(double from, uint32_t decimals, String *buffer);
86
78
  virtual bool store(const char *from, size_t length);
87
79
 
88
80
  virtual bool haveError(void);
90
82
  virtual bool wasAborted(void);
91
83
};
92
84
 
93
 
} /* namespace drizzle_protocol */
94
 
 
95
 
#endif /* PLUGIN_DRIZZLE_PROTOCOL_DRIZZLE_PROTOCOL_H */
 
85
#endif /* PLUGIN_OLDLIBDRIZZLE_OLDLIBDRIZZLE_H */