~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/client.h

  • Committer: Mark Atwood
  • Date: 2011-06-14 19:30:31 UTC
  • mfrom: (2318.2.41 refactor5)
  • Revision ID: me@mark.atwood.name-20110614193031-lwbrlwfgf6id4r8b
merge lp:~olafvdspek/drizzle/refactor6
 with resolved conflict in drizzled/plugin/client.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
   * Get attached session from the client object.
48
48
   * @retval Session object that is attached, NULL if none.
49
49
   */
50
 
  virtual Session *getSession(void)
 
50
  virtual Session *getSession()
51
51
  {
52
52
    return session;
53
53
  }
65
65
   * Get file descriptor associated with client object.
66
66
   * @retval File descriptor that is attached, -1 if none.
67
67
   */
68
 
  virtual int getFileDescriptor(void)= 0;
 
68
  virtual int getFileDescriptor()= 0;
69
69
 
70
70
  /**
71
71
   * Check to see if the client is currently connected.
72
72
   * @retval Boolean value representing connected state.
73
73
   */
74
 
  virtual bool isConnected(void)= 0;
75
 
 
76
 
  /**
77
 
   * Check to see if the client is actively reading.
78
 
   * @retval Boolean value representing reading state.
79
 
   */
80
 
  virtual bool isReading(void)= 0; // todo: delete
81
 
 
82
 
  /**
83
 
   * Check to see if the client is actively writing.
84
 
   * @retval Boolean value representing writing state.
85
 
   */
86
 
  virtual bool isWriting(void)= 0; // todo: delete
 
74
  virtual bool isConnected()= 0;
87
75
 
88
76
  /**
89
77
   * Flush all data that has been buffered with store() methods.
90
78
   * @retval Boolean indicating success or failure.
91
79
   */
92
 
  virtual bool flush(void)= 0;
 
80
  virtual bool flush()= 0;
93
81
 
94
82
  /**
95
83
   * Close the client object.
96
84
   */
97
 
  virtual void close(void)= 0;
 
85
  virtual void close()= 0;
98
86
 
99
87
  /**
100
88
   * Perform handshake and authorize client if needed.
101
89
   */
102
 
  virtual bool authenticate(void)= 0;
 
90
  virtual bool authenticate()= 0;
103
91
 
104
92
  virtual bool isConsole() const
105
93
  {
122
110
  virtual bool readCommand(char **packet, uint32_t& packet_length)= 0;
123
111
 
124
112
  /* Send responses. */
125
 
  virtual void sendOK(void)= 0;
126
 
  virtual void sendEOF(void)= 0;
 
113
  virtual void sendOK()= 0;
 
114
  virtual void sendEOF()= 0;
127
115
  virtual void sendError(const drizzled::error_t sql_errno, const char *err)= 0;
128
116
 
129
117
  /**
148
136
  }
149
137
 
150
138
  /* Try to remove these. */
151
 
  virtual bool haveError(void)= 0;
152
 
  virtual bool wasAborted(void)= 0;
 
139
  virtual bool haveError()= 0;
 
140
  virtual bool wasAborted()= 0;
153
141
 
154
142
};
155
143
 
156
144
} /* namespace plugin */
157
145
} /* namespace drizzled */
158