Commit | Line | Data |
---|---|---|
6650af14 BS |
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 | { | |
92beaba3 | 20 | |
6650af14 BS |
21 | public: |
22 | ||
23 | typedef boost::shared_ptr<IPService> Ptr; | |
24 | ||
52833f2d BS |
25 | virtual ~IPService() {}; |
26 | ||
c9d27cb6 | 27 | virtual void connect(const std::string& _hostname, const std::string& _port) = 0; |
6650af14 BS |
28 | |
29 | virtual std::string read_from_socket() = 0; | |
30 | ||
83ae2edf | 31 | virtual void write_to_socket(const std::string& data) = 0; |
6650af14 | 32 | |
31beb90a | 33 | virtual void close() = 0; |
6650af14 BS |
34 | }; |
35 | ||
36 | #endif |