source: nscp/modules/NSCAAgent/NSCAAgent.h @ 1d4878e

0.4.00.4.10.4.2
Last change on this file since 1d4878e was 5da0459, checked in by Michael Medin <michael@…>, 4 years ago

BROKEN!
First attempt at merging...

  • Property mode set to 100644
File size: 2.8 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***************************************************************************/
21#pragma once
22
23#include "NSCAThread.h"
24#include <CheckMemory.h>
25
26NSC_WRAPPERS_MAIN();
27NSC_WRAPPERS_CLI();
28
29class NSCAAgent {
30private:
31        CheckMemory memoryChecker;
32        int processMethod_;
33//      NSCAThreadImpl pdhThread;
34        std::list<NSCAThreadImpl*> extra_threads;
35
36public:
37
38public:
39        NSCAAgent();
40        virtual ~NSCAAgent();
41        // Module calls
42        bool loadModule(NSCAPI::moduleLoadMode mode);
43        bool unloadModule();
44        std::wstring getConfigurationMeta();
45
46        /**
47        * Return the module name.
48        * @return The module name
49        */
50        std::wstring getModuleName() {
51#ifdef HAVE_LIBCRYPTOPP
52                return _T("NSCAAgent (w/ encryption)");
53#else
54                return _T("NSCAAgent");
55#endif
56        }
57        /**
58        * Module version
59        * @return module version
60        */
61        NSCModuleWrapper::module_version getModuleVersion() {
62                NSCModuleWrapper::module_version version = {0, 3, 0 };
63                return version;
64        }
65        std::wstring getModuleDescription() {
66                return std::wstring(_T("Passive check support (needs NSCA on nagios server).\nAvalible crypto are: ")) + getCryptos();
67        }
68
69        bool hasCommandHandler();
70        bool hasMessageHandler();
71        NSCAPI::nagiosReturn handleCommand(const strEx::blindstr command, const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);
72        int commandLineExec(const TCHAR* command, const unsigned int argLen, TCHAR** args);
73
74        std::wstring getCryptos();
75
76};
Note: See TracBrowser for help on using the repository browser.