Commit 592402a1 authored by Matthieu Kermagoret's avatar Matthieu Kermagoret
Browse files

Connector SSH: added orders::listener class.

parent 2b435964
......@@ -127,6 +127,7 @@ add_library("${CONNECTORLIB}"
# "${SRC_DIR}/commander.cc"
# "${SRC_DIR}/credentials.cc"
"${SRC_DIR}/multiplexer.cc"
"${SRC_DIR}/orders/listener.cc"
# "${SRC_DIR}/session.cc"
# "${SRC_DIR}/sessions.cc"
# "${SRC_DIR}/socket_handle.cc"
......@@ -136,7 +137,8 @@ add_library("${CONNECTORLIB}"
# "${INC_DIR}/commander.hh"
# "${INC_DIR}/credentials.hh"
"${INC_DIR}/multiplexer.hh"
# "${INC_DIR}/namespace.hh"
"${INC_DIR}/namespace.hh"
"${INC_DIR}/orders/listener.hh"
# "${INC_DIR}/session.hh"
# "${INC_DIR}/sessions.hh"
# "${INC_DIR}/socket_handle.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_ORDERS_LISTENER_HH
# define CCCS_ORDERS_LISTENER_HH
# include <string>
# include <time.h>
# include "com/centreon/connector/ssh/namespace.hh"
CCCS_BEGIN()
namespace orders {
/**
* @class listener listener.hh "com/centreon/connector/ssh/orders/listener.hh"
* @brief Listen orders issued by the monitoring engine.
*
* Wait for orders from the monitoring engine and take actions
* accordingly.
*/
class listener {
public:
listener();
listener(listener const& l);
virtual ~listener();
listener& operator=(listener const& l);
virtual void on_execute(
unsigned long long cmd_id,
time_t timeout,
std::string const& host,
std::string const& user,
std::string const& password,
std::string const& cmd) = 0;
virtual void on_quit() = 0;
virtual void on_version() = 0;
};
}
CCCS_END()
#endif // !CCCS_ORDERS_LISTENER_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 "com/centreon/connector/ssh/orders/listener.hh"
using namespace com::centreon::connector::ssh::orders;
/**************************************
* *
* Public Methods *
* *
**************************************/
/**
* Default constructor.
*/
listener::listener() {}
/**
* Copy constructor.
*
* @param[in] l Unused.
*/
listener::listener(listener const& l) {
(void)l;
}
/**
* Destructor.
*/
listener::~listener() {}
/**
* Assignment operator.
*
* @param[in] l Unused.
*
* @return This object.
*/
listener& listener::operator=(listener const& l) {
(void)l;
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