Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

openmaiaProcessesHandler.h

Go to the documentation of this file.
00001 
00002 // This code is part of the MaiaProject free software
00003 //
00004 // Keyboard and Mouse Emulator - Virtual keyboard Engine
00005 //
00006 // Copyright (c) 2002-2003 Luca Clivio <luca.clivio@maiaproject.org>
00007 // Tel. +39-347-2538040
00008 // via B.Croce 2, 20037 Paderno Dugnano (Milano) - Italy
00009 //
00010 // Developers:
00011 //    Simone Mangano <simone.mangano@maiaproject.org>
00012 //    Andrea Tosato  <andrea.tosato@maiaproject.org>
00013 //
00014 //  -----------------------------------------------------------------------------
00015 //  This program is free software; This program is free software; 
00016 //  you can redistribute it and/or modify it under the terms of the 
00017 //  GNU General Public License as published by the Free Software Foundation; 
00018 //  either version 2 of the License, or (at your option) any later version.
00019 //  but WITHOUT ANY WARRANTY; without even the implied warranty of                              
00020 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                                
00021 //  GNU General Public License for more details.                                                
00022 //  You should have received a copy of the GNU General Public License                           
00023 //  along with this program; if not, write to the Free Software                                 
00024 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                                   
00026 
00027 
00028 #ifndef _openmaiaProcessesHandler_
00029 #define _openmaiaProcessesHandler_
00030 
00031 #include <wx/wx.h>
00032 #include <wx/process.h>
00033 
00034 // class prototipes
00035 class openmaiaProcess;
00036 
00037 #include "openmaia.h"
00038 #include "openmaiaProcess.h"
00039 
00048 class openmaiaProcessesHandler
00049 {
00050  private:
00051 
00052   // declare hashmap to associate process name with process class
00053   WX_DECLARE_STRING_HASH_MAP( openmaiaProcess *, ProcessHash);
00054 
00055   // declare hashmap to associate pid with process name
00056   WX_DECLARE_HASH_MAP( int,
00057                          wxString,
00058                          wxIntegerHash,
00059                          wxIntegerEqual,
00060                          PID2NameHashMap );
00061 
00062   // declare hashmap to associate process name with its pid
00063   WX_DECLARE_STRING_HASH_MAP( int, Name2PIDHashmap);
00064 
00065   
00066 
00067   ProcessHash process;
00068   PID2NameHashMap processName;
00069   Name2PIDHashmap processPID;
00070 
00071  public:
00072   openmaiaProcessesHandler() ;
00073 
00074   void StartProcess(wxString, wxString, wxString);
00075   void StopProcess(wxString);
00076   void StopAllProcesses();
00077   void NotifyProcessStop(int) ;
00078   int GetCount();
00079 
00080   void FlushStreams();
00081 
00082 } ;
00083 
00084 
00085 
00086 #endif  // _openmaiaProcessesHandler_