source: nscp/modules/CheckHelpers/CheckHelpers.h @ 7515d00

0.4.00.4.10.4.2
Last change on this file since 7515d00 was a78a985, checked in by Michael Medin <michael@…>, 21 months ago
  • Cleaned up some dependencies (on config.h)
  • Fixed invalid data in config.h.in
  • Property mode set to 100644
File size: 3.1 KB
Line 
1/**************************************************************************
2*   Copyright (C) 2004-2007 by Michael Medin <michael@medin.name>         *
3*                                                                         *
4*   This code is part of NSClient++ - http://trac.nakednuns.org/nscp      *
5*                                                                         *
6*   This program is free software; you can redistribute it and/or modify  *
7*   it under the terms of the GNU General Public License as published by  *
8*   the Free Software Foundation; either version 2 of the License, or     *
9*   (at your option) any later version.                                   *
10*                                                                         *
11*   This program is distributed in the hope that it will be useful,       *
12*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14*   GNU General Public License for more details.                          *
15*                                                                         *
16*   You should have received a copy of the GNU General Public License     *
17*   along with this program; if not, write to the                         *
18*   Free Software Foundation, Inc.,                                       *
19*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20***************************************************************************/
21NSC_WRAPPERS_MAIN();
22//#include <config.h>
23#include <strEx.h>
24
25class CheckHelpers : public nscapi::impl::simple_command_handler, public nscapi::impl::simple_plugin {
26private:
27
28public:
29        CheckHelpers();
30        virtual ~CheckHelpers();
31        // Module calls
32        bool loadModule();
33        bool loadModuleEx(std::wstring alias, NSCAPI::moduleLoadMode mode);
34        bool unloadModule();
35
36
37        static std::wstring getModuleName() {
38                return _T("Helper function");
39        }
40        static nscapi::plugin_wrapper::module_version getModuleVersion() {
41                nscapi::plugin_wrapper::module_version version = {0, 3, 0 };
42                return version;
43        }
44        static std::wstring getModuleDescription() {
45                return _T("Various helper function to extend other checks.\nThis is also only supported through NRPE.");
46        }
47
48        bool hasCommandHandler();
49        bool hasMessageHandler();
50        NSCAPI::nagiosReturn handleCommand(const std::wstring &target, const std::wstring &command, std::list<std::wstring> &arguments, std::wstring &message, std::wstring &perf);
51
52        // Check commands
53        NSCAPI::nagiosReturn checkMultiple(const std::list<std::wstring> arguments, std::wstring &message, std::wstring &perf);
54        NSCAPI::nagiosReturn checkSimpleStatus(NSCAPI::nagiosReturn status, const std::list<std::wstring> arguments, std::wstring &message, std::wstring &perf);
55        NSCAPI::nagiosReturn checkSimpleStatus(NSCAPI::nagiosReturn status, const unsigned int argLen, wchar_t **char_args, std::wstring &msg, std::wstring &perf);
56        NSCAPI::nagiosReturn timeout(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf);
57        NSCAPI::nagiosReturn negate(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf);
58};
Note: See TracBrowser for help on using the repository browser.