Commit 9baa8071 authored by Matthieu Kermagoret's avatar Matthieu Kermagoret
Browse files

Connector SSH: added base commander class.

parent ed664a0e
......@@ -123,6 +123,7 @@ set(CONNECTORLIB "centreonconnectorssh")
add_library("${CONNECTORLIB}"
# Sources.
# "${SRC_DIR}/channel.cc"
"${SRC_DIR}/commander.cc"
# "${SRC_DIR}/credentials.cc"
"${SRC_DIR}/multiplexer.cc"
# "${SRC_DIR}/session.cc"
......@@ -130,6 +131,7 @@ add_library("${CONNECTORLIB}"
# "${SRC_DIR}/std_io.cc"
# Headers.
# "${INC_DIR}/channel.hh"
"${INC_DIR}/commander.hh"
# "${INC_DIR}/credentials.hh"
"${INC_DIR}/multiplexer.hh"
"${INC_DIR}/namespace.hh"
......
/*
** Copyright 2011 Merethis
**
** This file is part of Centreon Connector SSH.
**
** Centreon Connector SSH is free software: you can redistribute it
** and/or modify it under the terms of the GNU Affero General Public
** License as published by the Free Software Foundation, either version
** 3 of the License, or (at your option) any later version.
**
** Centreon Connector SSH is distributed in the hope that it will be
** useful, but WITHOUT ANY WARRANTY; without even the implied warranty
** of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public
** License along with Centreon Connector SSH. If not, see
** <http://www.gnu.org/licenses/>.
*/
#ifndef CCCS_COMMANDER_HH
# define CCCS_COMMANDER_HH
# include "com/centreon/connector/ssh/namespace.hh"
# include "com/centreon/handle_listener.hh"
CCCS_BEGIN()
/**
* @class commander commander.hh "com/centreon/connector/ssh/commander.hh"
* @brief Handle command from upstairs.
*
* Handle check execution command from the monitoring engine.
*/
class commander : public com::centreon::handle_listener {
public:
commander();
~commander() throw ();
private:
commander(commander const& c);
commander& operator=(commander const& c);
};
CCCS_END()
#endif // !CCCS_COMMANDER_HH
/*
** Copyright 2011 Merethis
**
** This file is part of Centreon Connector SSH.
**
** Centreon Connector SSH is free software: you can redistribute it
** and/or modify it under the terms of the GNU Affero General Public
** License as published by the Free Software Foundation, either version
** 3 of the License, or (at your option) any later version.
**
** Centreon Connector SSH is distributed in the hope that it will be
** useful, but WITHOUT ANY WARRANTY; without even the implied warranty
** of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public
** License along with Centreon Connector SSH. If not, see
** <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <stdlib.h>
#include "com/centreon/connector/ssh/commander.hh"
using namespace com::centreon::connector::ssh;
/**************************************
* *
* Public Methods *
* *
**************************************/
/**
* Default constructor.
*/
commander::commander() {}
/**
* Destructor.
*/
commander::~commander() throw () {}
/**************************************
* *
* Private Methods *
* *
**************************************/
/**
* @brief Copy constructor.
*
* Any call to this constructor will result in a call to abort().
*
* @param[in] c Unused.
*/
commander::commander(commander const& c)
: com::centreon::handle_listener() {
(void)c;
assert(!"commander cannot be copied");
abort();
}
/**
* @brief Assignment operator.
*
* Any call to this method will result in a call to abort().
*
* @param[in] c Unused.
*
* @return This object.
*/
commander& commander::operator=(commander const& c) {
(void)c;
assert(!"commander cannot be copied");
abort();
return (*this);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment