~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_data.h

  • Committer: Monty Taylor
  • Author(s): Andrew Hutchings
  • Date: 2011-02-21 13:59:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2190.
  • Revision ID: andrew@linuxjedi.co.uk-20110221135906-mywndoq7oypdumya
Separate the server detection functions into a .h file
Include the new .h in drizzle to detect if we are connecting to drizzled
If we are connecting to drizzled output TRUE/FALSE for boolean

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#define DRIZZLE_MAX_LINE_LENGTH 1024*1024L-1025
24
24
#include "client_priv.h"
 
25
#include "server_detect.h"
25
26
#include <string>
26
27
#include <iostream>
27
28
#include <iomanip>
214
215
    drizzle_con_st connection;
215
216
    std::string hostName;
216
217
    bool drizzleProtocol;
217
 
    int serverType;
 
218
    ServerDetect::server_type serverType;
 
219
    std::string serverVersion;
218
220
 
219
221
  public:
220
 
    enum server_type {
221
 
      SERVER_MYSQL_FOUND,
222
 
      SERVER_DRIZZLE_FOUND,
223
 
      SERVER_UNKNOWN_FOUND
224
 
    };
225
222
    DrizzleDumpConnection(std::string &host, uint16_t port,
226
223
      std::string &username, std::string &password, bool drizzle_protocol);
227
224
    ~DrizzleDumpConnection();
244
241
    bool setDB(std::string databaseName);
245
242
    bool usingDrizzleProtocol(void) const { return drizzleProtocol; }
246
243
    bool getServerType(void) const { return serverType; }
247
 
    const char* getServerVersion(void) { return drizzle_con_server_version(&connection); }
 
244
    std::string getServerVersion(void) const { return serverVersion; }
248
245
};
249
246
 
250
247
class DrizzleStringBuf : public std::streambuf