LogService
libdadi: utility tools for distributed applications
|
00001 /****************************************************************************/ 00002 /* Provides functionality to test the complete LogCentral system */ 00003 /* */ 00004 /* Author(s): */ 00005 /* - Georg Hoesch (hoesch@in.tum.de) */ 00006 /* - Cyrille Pontvieux (cyrille.pontvieux@edu.univ-fcomte.fr) */ 00007 /* */ 00008 /* This file is part of DIET . */ 00009 /* */ 00010 /* Copyright (C) 2000-2003 ENS Lyon, LIFC, INSA, INRIA and SysFera (2000) */ 00011 /* */ 00012 /* - Frederic.Desprez@ens-lyon.fr (Project Manager) */ 00013 /* - Eddy.Caron@ens-lyon.fr (Technical Manager) */ 00014 /* - Tech@sysfera.com (Maintainer and Technical Support) */ 00015 /* */ 00016 /* This software is a computer program whose purpose is to provide an */ 00017 /* distributed logging services. */ 00018 /* */ 00019 /* */ 00020 /* This software is governed by the CeCILL license under French law and */ 00021 /* abiding by the rules of distribution of free software. You can use, */ 00022 /* modify and/ or redistribute the software under the terms of the CeCILL */ 00023 /* license as circulated by CEA, CNRS and INRIA at the following URL */ 00024 /* "http://www.cecill.info". */ 00025 /* */ 00026 /* As a counterpart to the access to the source code and rights to copy, */ 00027 /* modify and redistribute granted by the license, users are provided */ 00028 /* only with a limited warranty and the software's author, the holder */ 00029 /* of the economic rights, and the successive licensors have only */ 00030 /* limited liability. */ 00031 /* */ 00032 /* In this respect, the user's attention is drawn to the risks */ 00033 /* associated with loading, using, modifying and/or developing or */ 00034 /* reproducing the software by the user in light of its specific status */ 00035 /* of free software, that may mean that it is complicated to */ 00036 /* manipulate, and that also therefore means that it is reserved for */ 00037 /* developers and experienced professionals having in-depth computer */ 00038 /* knowledge. Users are therefore encouraged to load and test the */ 00039 /* software's suitability as regards their requirements in conditions */ 00040 /* enabling the security of their systems and/or data to be ensured and, */ 00041 /* more generally, to use and operate it in the same conditions as */ 00042 /* regards security. */ 00043 /* */ 00044 /* The fact that you are presently reading this means that you have had */ 00045 /* knowledge of the CeCILL license and that you accept its terms. */ 00046 /* */ 00047 /****************************************************************************/ 00048 /* $Id$ 00049 * $Log$ 00050 * Revision 1.2 2008/07/17 01:03:12 rbolze 00051 * make some change to avoid gcc warning 00052 * 00053 * Revision 1.1 2004/01/09 11:07:12 ghoesch 00054 * Restructured the whole LogService source tree. 00055 * Added autotools make process. Cleaned up code. 00056 * Removed some testers. Ready to release. 00057 * 00058 ****************************************************************************/ 00059 00060 #ifndef _PASSIVETOOL_HH_ 00061 #define _PASSIVETOOL_HH_ 00062 00063 #include "ToolMsgReceiver_impl.hh" 00064 #include "LogTypes.hh" 00065 #include "LogTool.hh" 00066 00074 class PassiveTool { 00075 public: 00076 PassiveTool(); 00077 ~PassiveTool(); 00078 00079 void 00080 activate(PortableServer::POA_var poa, LogCentralTool_var aLCTref); 00081 00082 void 00083 checkConnect(const char* toolName, int retValExpected, bool* success); 00084 00085 void 00086 checkDisconnect(bool* success); 00087 00088 void 00089 checkDisconnect(const char* toolName, int retValExpected, bool* success); 00090 00091 void 00092 checkAddFilter(filter_t filter, bool* success); 00093 00094 void 00095 checkAddFilter(const char* toolName, filter_t filter, int retValExpected, 00096 bool* success); 00097 00098 void 00099 checkRemoveFilter(const char* filterName, bool* success); 00100 00101 void 00102 checkRemoveFilter(const char* toolName, const char* filterName, 00103 int retValExpected, bool* success); 00104 00105 void 00106 checkFlushAllFilters(bool* success); 00107 00108 void 00109 checkFlushAllFilters(const char* toolName, int retValExpected, 00110 bool* success); 00111 00112 void 00113 setExpectedMsgBuf(log_msg_buf_t expectedMsgBuf); 00114 00115 void 00116 addExpectedMsg(const char* componentName, const char* msg, const char* tag); 00117 00118 void 00119 addExpectedMsg(log_msg_t msg); 00120 00121 void 00122 checkMsgBuf(bool* success); 00123 00124 private: 00125 CORBA::String_var toolName; 00126 ToolMsgReceiver_impl* myTMR; 00127 PortableServer::ObjectId_var myTMRid; 00128 ToolMsgReceiver_var aTMRref; 00129 00130 LogCentralTool_var aLCTref; 00131 00132 log_msg_buf_t expectedMsgBuf; 00133 log_msg_buf_t receivedMsgBuf; 00134 }; 00135 00136 #endif