00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 K-10 Distributed Processing - Lium, Le Mans 00004 Copyright (C) 2006 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public License 00008 as published by the Free Software Foundation; either version 2 00009 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef CONNECTION_H 00022 #define CONNECTION_H 00023 00024 #include <string> 00025 #include <stdio.h> 00026 #include <stdlib.h> 00027 #include <list> 00028 00029 using namespace std; 00030 00042 class Connection 00043 { 00044 public: 00049 Connection(){} 00054 virtual ~Connection(){} 00055 00061 virtual void connect(string aString)=0; 00068 virtual list<list<string> > executeQuery(string aQuery)=0; 00075 virtual int executeUpdate(string aQuery)=0; 00080 virtual void closeConnection()=0; 00081 }; 00082 #endif