| 1 | /** @file |
| 2 | * @brief The abstract IPService interface. This class represents all IP services. |
| 3 | * |
| 4 | * |
| 5 | * |
| 6 | * @copyright Intra2net AG |
| 7 | * @license GPLv2 |
| 8 | */ |
| 9 | |
| 10 | #ifndef IPSERVICE_H |
| 11 | #define IPSERVICE_H |
| 12 | |
| 13 | #include <string> |
| 14 | |
| 15 | #include <boost/shared_ptr.hpp> |
| 16 | |
| 17 | |
| 18 | class IPService |
| 19 | { |
| 20 | |
| 21 | public: |
| 22 | |
| 23 | typedef boost::shared_ptr<IPService> Ptr; |
| 24 | |
| 25 | virtual ~IPService() {}; |
| 26 | |
| 27 | virtual void connect(const std::string& _hostname, const std::string& _port) = 0; |
| 28 | |
| 29 | virtual std::string read_from_socket() = 0; |
| 30 | |
| 31 | virtual void write_to_socket(const std::string& data) = 0; |
| 32 | |
| 33 | virtual void close() = 0; |
| 34 | }; |
| 35 | |
| 36 | #endif |