source: nscp/modules/WEBConfiguration/WEBConfiguration.h @ 440c0cb

0.4.00.4.10.4.2
Last change on this file since 440c0cb 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.5 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#include <utils.h>
25#include <checkHelpers.hpp>
26#include <boost/thread/thread.hpp>
27
28namespace http {
29        namespace server {
30                class Server;
31                class Configuration;
32        }
33}
34namespace Wt {
35        class WebController;
36        class Configuration;
37        class HTTPStream;
38}
39class WEBConfiguration {
40private:
41
42public:
43        WEBConfiguration();
44        virtual ~WEBConfiguration();
45        // Module calls
46        bool loadModule(NSCAPI::moduleLoadMode mode);
47        bool unloadModule();
48
49        std::wstring getModuleName() {
50                return _T("WEBConfiguration");
51        }
52        std::wstring getModuleDescription() {
53                return _T("WEBConfiguration Allows remote configuration and administration of NSCP.");
54        }
55        NSCModuleWrapper::module_version getModuleVersion() {
56                NSCModuleWrapper::module_version version = {0, 0, 1 };
57                return version;
58        }
59
60        bool hasCommandHandler();
61        bool hasMessageHandler();
62        NSCAPI::nagiosReturn handleCommand(const strEx::blindstr command, const unsigned int argLen, TCHAR **char_args, std::wstring &message, std::wstring &perf);
63        int commandLineExec(const TCHAR* command,const unsigned int argLen,TCHAR** args);
64
65        // Check commands
66        NSCAPI::nagiosReturn writeConf(const unsigned int argLen, TCHAR **char_args, std::wstring &message);
67        NSCAPI::nagiosReturn readConf(const unsigned int argLen, TCHAR **char_args, std::wstring &message);
68        NSCAPI::nagiosReturn setVariable(const unsigned int argLen, TCHAR **char_args, std::wstring &message);
69        NSCAPI::nagiosReturn getVariable(const unsigned int argLen, TCHAR **char_args, std::wstring &message);
70
71private:
72        typedef checkHolders::CheckConatiner<checkHolders::MaxMinBoundsDiscSize> PathConatiner;
73        typedef checkHolders::CheckConatiner<checkHolders::MaxMinPercentageBoundsDiskSize> DriveConatiner;
74        boost::thread **threads;
75        http::server::Server *server;
76        Wt::WebController *controller;
77        Wt::Configuration *wtConfiguration;
78        Wt::HTTPStream    *stream;
79        http::server::Configuration *config;
80};
Note: See TracBrowser for help on using the repository browser.