00001 /* ODBCConnHandle.h 00002 * A container that stores useful information around an odbc::Connection. 00003 * Allows for fun things like string names and observers. 00004 * author: Matt Hauer, matthew.hauer@pnl.gov, 6/4/07 - *** 00005 */ 00006 00007 #ifndef _ODBCCONNHANDLE_H_ 00008 #define _ODBCCONNHANDLE_H_ 00009 00010 #include <list> 00011 #include <string.h> 00012 00013 #include <odbc++/connection.h> 00014 #include <odbc++/drivermanager.h> 00015 00016 #include "ODBCTapeStream.h" 00017 00018 using std::list; 00019 00020 class ODBCTapeStream; 00021 00022 class ODBCConnHandle{ 00023 public: 00024 ODBCConnHandle(); 00025 ODBCConnHandle(Connection *, char *); 00026 ~ODBCConnHandle(); 00027 00028 void Reset(); 00029 int CheckName(char *); 00030 void DisconnectTape(ODBCTapeStream *); 00031 void Disconnect(); 00032 int RegisterStream(ODBCTapeStream *); 00033 00034 odbc::Connection *GetConn(){return conn;} 00035 private: 00036 odbc::Connection *conn; 00037 char servername[128]; 00038 int tapect; 00039 list<ODBCTapeStream *> tapelist; 00040 }; 00041 00042 #endif