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

dao/src/AgentInfo.h

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 AGENTINFO_H
00022 #define AGENTINFO_H
00023 
00024 // STL
00025 #include <iostream>
00026 #include <sstream>
00027 #include <string>
00028 #include <list>
00029 #include <map>
00030 
00031 #include <libpq-fe.h>
00032 
00033 using namespace std;
00034 
00047 class AgentInfo 
00048 {
00049 public:
00054   AgentInfo(){}
00055 
00060   virtual ~AgentInfo(){}
00061 
00062   // get the list of agents 
00068   virtual list<string> getAvailableAgents() = 0;
00069 
00075   virtual list<string> getInUseAgents() = 0;
00076 
00082   virtual list<string> getAgents() = 0;
00083 
00090   virtual void saveAgent(string aName,map<string,string> aInfo) = 0;
00091 
00099   virtual void updateAgent(string aName,string aIp,string aPort,map<string,string> aInfo) = 0;
00100 
00101   // can get the values : 
00102   // 0 : available
00103   // 1 : in use
00104 
00110   virtual void changeStateToAvailable(string aName) = 0;
00111 
00117   virtual void changeStateToInUse(string aName) = 0;
00118 
00124   virtual void changeStateToUnrcvInfo(string aName) = 0;
00125 
00131   virtual void changeStateToRcvInfo(string aName) = 0;
00132 
00139   virtual bool checkStateToRcvInfo(string aName) = 0;
00140 
00146   virtual void deleteAgent(string aAgent) = 0;
00147 
00154   virtual map<string,string> getInformations(string aAgent) = 0;
00155 };
00156 #endif

Generated on Fri May 19 22:56:55 2006 for k10-controller by  doxygen 1.4.4