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

dao/src/PGAgentInfo.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 PGAGENTINFO_H
00022 #define PGAGENTINFO_H
00023 
00024 #include "AgentInfo.h"
00025 #include "PGConnection.h"
00026 
00027 using namespace std;
00028 
00040 class PGAgentInfo: public AgentInfo
00041 {
00042 private:
00043   //get the path for connection to a database
00044   string mPathDb;
00045 
00046 public:
00051   PGAgentInfo(string aPath);
00052 
00057   ~PGAgentInfo();
00058 
00059   // get the list of agents 
00065   list<string> getAvailableAgents();
00066 
00072   list<string> getInUseAgents();
00073 
00079   list<string> getAgents();
00080 
00087   void saveAgent(string aName,map<string,string> aInfo);
00088 
00096   void updateAgent(string aName,string aIp,string aPort,map<string,string> aInfo);
00097   // can get the values : 
00098   // 0 : available
00099   // 1 : in use
00105   void changeStateToAvailable(string aName);
00106 
00112   void changeStateToInUse(string aName);
00113 
00119   void changeStateToRcvInfo(string aName);
00120 
00126   void changeStateToUnrcvInfo(string aName);
00127 
00134   bool checkStateToRcvInfo(string aName);
00135 
00141   void deleteAgent(string aAgent);
00142 
00149   map<string,string> getInformations(string aAgent);
00150 };
00151 
00152 #endif

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