Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

hk_drivermanager.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2004 Horst Knorr <hk_classes@knoda.org>  
00003 // This file is part of the hk_classes library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_DRIVERMANAGER_H
00012 #define HK_DRIVERMANAGER_H
00013 #include "hk_definitions.h"
00014 #include <list>
00015 #include <vector>
00016 #include "hk_class.h"
00017 #include "hk_definitions.h"
00018 #include "hk_string.h"
00019 using namespace std;
00020 
00021 class hk_connection;
00022 class hk_drivermanagerprivate;
00023 typedef hk_string requestdialogtype(void);
00024 
00036 class hk_drivermanager: public hk_class
00037 {
00038     friend class hk_connection;
00039     public:
00043         hk_drivermanager(void);
00044         hk_drivermanager(bool runtime);
00045  virtual       ~hk_drivermanager(void);
00054         hk_connection* new_connection(const hk_string& drivername="",enum_interaction i=interactive);
00058         hk_connection* find_existing_connection(const hk_string& drivername,const hk_string& host,unsigned int tcp_port,const hk_string& user);
00059 
00060         static   vector<hk_string>* driverlist(void);
00064         static   void set_path(const hk_string& path);
00065         static   hk_string path(void);
00070         static void set_driverselectdialog(requestdialogtype* dialog);
00071         static hk_string show_driverselectdialog(void);
00072 
00073     protected:
00074 
00075     private:
00076         void init(bool runtime);
00077         void load_preferences(void);
00078         void set_preferences(const hk_string& preferences);
00079 
00080         void    connection_remove(hk_connection* c);
00081         static   hk_string p_hk_classespath;
00082         static   vector<hk_string> p_driverlist;
00083         static   void scan_directory(void);
00084         static requestdialogtype* p_driverselectdialog;
00085         list<hk_connection*> p_connections;
00086         hk_drivermanagerprivate* p_private;
00087 };
00088 
00089 
00090 #endif

Generated on Tue Mar 22 19:28:08 2005 for Databaseconnectionclasses by  doxygen 1.4.1