~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.h

Moved more drizzleclient/NET specific code to Protocol class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
class Field;
27
27
class String;
 
28
class Session;
28
29
class i_string;
29
 
class Session;
30
30
class my_decimal;
 
31
typedef struct st_vio Vio;
31
32
typedef struct st_drizzle_field DRIZZLE_FIELD;
32
33
typedef struct st_drizzle_rows DRIZZLE_ROWS;
33
34
typedef struct st_drizzle_time DRIZZLE_TIME;
40
41
  String *convert;
41
42
  uint32_t field_pos;
42
43
  uint32_t field_count;
 
44
  Vio* save_vio;
43
45
  bool net_store_data(const unsigned char *from, size_t length);
44
46
  bool net_store_data(const unsigned char *from, size_t length,
45
47
                      const CHARSET_INFO * const fromcs, const CHARSET_INFO * const tocs);
51
53
  virtual ~Protocol() {}
52
54
  void init(Session* session_arg);
53
55
 
 
56
  bool io_ok();
 
57
  void end_statement(void);
 
58
  void set_read_timeout(uint32_t timeout);
 
59
  void set_write_timeout(uint32_t timeout);
 
60
  void set_retry_count(uint32_t count);
 
61
  void set_error(char error);
 
62
  bool have_error(void);
 
63
  bool have_compression(void);
 
64
  void disable_results(void);
 
65
  void enable_results(void);
 
66
 
54
67
  enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 };
55
68
  virtual bool send_fields(List<Item> *list, uint32_t flags);
56
69
 
156
169
 
157
170
void send_warning(Session *session, uint32_t sql_errno, const char *err=0);
158
171
void net_send_error(Session *session, uint32_t sql_errno=0, const char *err=0);
159
 
void drizzleclient_net_end_statement(Session *session);
160
172
unsigned char *net_store_data(unsigned char *to,const unsigned char *from, size_t length);
161
173
unsigned char *net_store_data(unsigned char *to,int32_t from);
162
174
unsigned char *net_store_data(unsigned char *to,int64_t from);