blob: 2cb5eb47a751e45246e11b2a759dcd43fba5d2bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_QNX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_QNX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
#include <map>
#include <string>
#include <vector>
#include <netinet/in.h>
#include "transport_manager/tcp/network_interface_listener.h"
#include "utils/macro.h"
#include "utils/threads/thread_delegate.h"
class Thread;
struct ifaddrmsg;
namespace transport_manager {
namespace transport_adapter {
class TcpClientListener;
/**
* @brief Listener to detect various events on network interfaces
*/
class PlatformSpecificNetworkInterfaceListener
: public NetworkInterfaceListener {
public:
/**
* @brief Constructor
*
* @param tcp_client_listener an instance of TcpClientListener which receives
* status updates
* @param designated_interface if we want to listen only on a specific
* network interface, specify its name
*/
PlatformSpecificNetworkInterfaceListener(
TcpClientListener* tcp_client_listener,
const std::string designated_interface = "");
/**
* @brief Destructor
*/
virtual ~PlatformSpecificNetworkInterfaceListener();
/**
* @brief Initialize this listener
*/
bool Init() OVERRIDE;
/**
* @brief Deinitialize this listener
*/
void Deinit() OVERRIDE;
/**
* @brief Start this listener
*/
bool Start() OVERRIDE;
/**
* @brief Stop this listener
*/
bool Stop() OVERRIDE;
private:
};
} // namespace transport_adapter
} // namespace transport_manager
#endif // SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TCP_PLATFORM_SPECIFIC_QNX_PLATFORM_SPECIFIC_NETWORK_INTERFACE_LISTENER_H_
|