00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HK_MYSQLCONNECTION
00012 #define HK_MYSQLCONNECTION
00013 #include <mysql.h>
00014 #include <hk_connection.h>
00015 #include <list>
00016 #include <vector>
00017 #include <algorithm>
00018
00019 class hk_drivermanager;
00020 extern "C"
00021 {
00022 hk_connection* create_connection(hk_drivermanager*);
00023 hk_string hk_classesversion(void);
00024 }
00025
00026
00027 class hk_mysqldatabase;
00028 class hk_mysqlconnection: public hk_connection
00029 {
00030 public:
00031 hk_mysqlconnection(hk_drivermanager* c);
00032 ~hk_mysqlconnection();
00033 MYSQL* dbhandler(void);
00034 void servermessage(void);
00035
00036 virtual bool server_supports(support_enum)const;
00037
00038 virtual bool server_needs(need_enum)const;
00039 virtual hk_string drivername(void) const;
00040 virtual unsigned int default_tcp_port(void) const;
00041
00042 protected:
00043 bool driver_specific_connect();
00044 bool driver_specific_disconnect();
00045 bool driver_specific_new_password(const hk_string&);
00046 vector<hk_string>* driver_specific_dblist(void);
00047 hk_database* driver_specific_new_database(void);
00048
00049 private:
00050
00051 MYSQL* p_SQL_Connection;
00052
00053 } ;
00054 #endif