Commit c9d053ed authored by Matthieu Kermagoret's avatar Matthieu Kermagoret
Browse files

Connector SSH: moved socket_handle to the sessions namespace.

parent 37e6e3ad
......@@ -133,7 +133,7 @@ add_library("${CONNECTORLIB}"
# "${SRC_DIR}/sessions.cc"
"${SRC_DIR}/sessions/credentials.cc"
"${SRC_DIR}/sessions/listener.cc"
# "${SRC_DIR}/socket_handle.cc"
"${SRC_DIR}/sessions/socket_handle.cc"
# Headers.
# "${INC_DIR}/channel.hh"
"${INC_DIR}/checks/listener.hh"
......@@ -147,7 +147,7 @@ add_library("${CONNECTORLIB}"
# "${INC_DIR}/sessions.hh"
"${INC_DIR}/sessions/credentials.hh"
"${INC_DIR}/sessions/listener.hh"
# "${INC_DIR}/socket_handle.hh"
"${INC_DIR}/sessions/socket_handle.hh"
)
target_link_libraries(
"${CONNECTORLIB}"
......
......@@ -26,25 +26,27 @@
CCCS_BEGIN()
/**
* @class socket_handle socket_handle.hh "com/centreon/connector/ssh/socket_handle.hh"
* @brief Socket handle.
*
* Wrapper around a socket descriptor.
*/
class socket_handle : public com::centreon::handle {
public:
socket_handle(native_handle internal_handle = -1);
~socket_handle() throw ();
void close();
unsigned long read(void* data, unsigned long size);
void set_native_handle(native_handle internal_handle);
unsigned long write(void const* data, unsigned long size);
namespace sessions {
/**
* @class socket_handle socket_handle.hh "com/centreon/connector/ssh/socket_handle.hh"
* @brief Socket handle.
*
* Wrapper around a socket descriptor.
*/
class socket_handle : public com::centreon::handle {
public:
socket_handle(native_handle internal_handle = -1);
~socket_handle() throw ();
void close();
unsigned long read(void* data, unsigned long size);
void set_native_handle(native_handle internal_handle);
unsigned long write(void const* data, unsigned long size);
private:
socket_handle(socket_handle const& sh);
socket_handle& operator=(socket_handle const& sh);
};
private:
socket_handle(socket_handle const& sh);
socket_handle& operator=(socket_handle const& sh);
};
}
CCCS_END()
......
......@@ -22,11 +22,11 @@
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
#include "com/centreon/connector/ssh/socket_handle.hh"
#include "com/centreon/connector/ssh/sessions/socket_handle.hh"
#include "com/centreon/exceptions/basic.hh"
using namespace com::centreon;
using namespace com::centreon::connector::ssh;
using namespace com::centreon::connector::ssh::sessions;
/**************************************
* *
......
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