LogService
libdadi: utility tools for distributed applications
PassiveTool.hh
1 /****************************************************************************/
2 /* Provides functionality to test the complete LogCentral system */
3 /* */
4 /* Author(s): */
5 /* - Georg Hoesch (hoesch@in.tum.de) */
6 /* - Cyrille Pontvieux (cyrille.pontvieux@edu.univ-fcomte.fr) */
7 /* */
8 /* This file is part of DIET . */
9 /* */
10 /* Copyright (C) 2000-2003 ENS Lyon, LIFC, INSA, INRIA and SysFera (2000) */
11 /* */
12 /* - Frederic.Desprez@ens-lyon.fr (Project Manager) */
13 /* - Eddy.Caron@ens-lyon.fr (Technical Manager) */
14 /* - Tech@sysfera.com (Maintainer and Technical Support) */
15 /* */
16 /* This software is a computer program whose purpose is to provide an */
17 /* distributed logging services. */
18 /* */
19 /* */
20 /* This software is governed by the CeCILL license under French law and */
21 /* abiding by the rules of distribution of free software. You can use, */
22 /* modify and/ or redistribute the software under the terms of the CeCILL */
23 /* license as circulated by CEA, CNRS and INRIA at the following URL */
24 /* "http://www.cecill.info". */
25 /* */
26 /* As a counterpart to the access to the source code and rights to copy, */
27 /* modify and redistribute granted by the license, users are provided */
28 /* only with a limited warranty and the software's author, the holder */
29 /* of the economic rights, and the successive licensors have only */
30 /* limited liability. */
31 /* */
32 /* In this respect, the user's attention is drawn to the risks */
33 /* associated with loading, using, modifying and/or developing or */
34 /* reproducing the software by the user in light of its specific status */
35 /* of free software, that may mean that it is complicated to */
36 /* manipulate, and that also therefore means that it is reserved for */
37 /* developers and experienced professionals having in-depth computer */
38 /* knowledge. Users are therefore encouraged to load and test the */
39 /* software's suitability as regards their requirements in conditions */
40 /* enabling the security of their systems and/or data to be ensured and, */
41 /* more generally, to use and operate it in the same conditions as */
42 /* regards security. */
43 /* */
44 /* The fact that you are presently reading this means that you have had */
45 /* knowledge of the CeCILL license and that you accept its terms. */
46 /* */
47 /****************************************************************************/
48 /* $Id$
49  * $Log$
50  * Revision 1.2 2008/07/17 01:03:12 rbolze
51  * make some change to avoid gcc warning
52  *
53  * Revision 1.1 2004/01/09 11:07:12 ghoesch
54  * Restructured the whole LogService source tree.
55  * Added autotools make process. Cleaned up code.
56  * Removed some testers. Ready to release.
57  *
58  ****************************************************************************/
59 
60 #ifndef _PASSIVETOOL_HH_
61 #define _PASSIVETOOL_HH_
62 
63 #include "ToolMsgReceiver_impl.hh"
64 #include "LogTypes.hh"
65 #include "LogTool.hh"
66 
74 class PassiveTool {
75 public:
76  PassiveTool();
77  ~PassiveTool();
78 
79  void
80  activate(PortableServer::POA_var poa, LogCentralTool_var aLCTref);
81 
82  void
83  checkConnect(const char* toolName, int retValExpected, bool* success);
84 
85  void
86  checkDisconnect(bool* success);
87 
88  void
89  checkDisconnect(const char* toolName, int retValExpected, bool* success);
90 
91  void
92  checkAddFilter(filter_t filter, bool* success);
93 
94  void
95  checkAddFilter(const char* toolName, filter_t filter, int retValExpected,
96  bool* success);
97 
98  void
99  checkRemoveFilter(const char* filterName, bool* success);
100 
101  void
102  checkRemoveFilter(const char* toolName, const char* filterName,
103  int retValExpected, bool* success);
104 
105  void
106  checkFlushAllFilters(bool* success);
107 
108  void
109  checkFlushAllFilters(const char* toolName, int retValExpected,
110  bool* success);
111 
112  void
113  setExpectedMsgBuf(log_msg_buf_t expectedMsgBuf);
114 
115  void
116  addExpectedMsg(const char* componentName, const char* msg, const char* tag);
117 
118  void
119  addExpectedMsg(log_msg_t msg);
120 
121  void
122  checkMsgBuf(bool* success);
123 
124 private:
125  CORBA::String_var toolName;
126  ToolMsgReceiver_impl* myTMR;
127  PortableServer::ObjectId_var myTMRid;
128  ToolMsgReceiver_var aTMRref;
129 
130  LogCentralTool_var aLCTref;
131 
132  log_msg_buf_t expectedMsgBuf;
133  log_msg_buf_t receivedMsgBuf;
134 };
135 
136 #endif
Definition: LogTypes.hh:77
Definition: PassiveTool.hh:74
Definition: LogTypes.hh:107
Definition: LogToolBase.hh:64
Definition: LogTool.hh:73