| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_P2P_BASE_PORTINTERFACE_H_ | 11 #ifndef WEBRTC_P2P_BASE_PORTINTERFACE_H_ |
| 12 #define WEBRTC_P2P_BASE_PORTINTERFACE_H_ | 12 #define WEBRTC_P2P_BASE_PORTINTERFACE_H_ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "webrtc/p2p/base/transport.h" | 16 #include "webrtc/p2p/base/transport.h" |
| 17 #include "webrtc/base/asyncpacketsocket.h" |
| 17 #include "webrtc/base/socketaddress.h" | 18 #include "webrtc/base/socketaddress.h" |
| 18 | 19 |
| 19 namespace rtc { | 20 namespace rtc { |
| 20 class Network; | 21 class Network; |
| 21 struct PacketOptions; | 22 struct PacketOptions; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace cricket { | 25 namespace cricket { |
| 25 class Connection; | 26 class Connection; |
| 26 class IceMessage; | 27 class IceMessage; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 sigslot::signal1<PortInterface*> SignalRoleConflict; | 106 sigslot::signal1<PortInterface*> SignalRoleConflict; |
| 106 | 107 |
| 107 // Normally, packets arrive through a connection (or they result signaling of | 108 // Normally, packets arrive through a connection (or they result signaling of |
| 108 // unknown address). Calling this method turns off delivery of packets | 109 // unknown address). Calling this method turns off delivery of packets |
| 109 // through their respective connection and instead delivers every packet | 110 // through their respective connection and instead delivers every packet |
| 110 // through this port. | 111 // through this port. |
| 111 virtual void EnablePortPackets() = 0; | 112 virtual void EnablePortPackets() = 0; |
| 112 sigslot::signal4<PortInterface*, const char*, size_t, | 113 sigslot::signal4<PortInterface*, const char*, size_t, |
| 113 const rtc::SocketAddress&> SignalReadPacket; | 114 const rtc::SocketAddress&> SignalReadPacket; |
| 114 | 115 |
| 116 // Emitted each time a packet is sent on this port. |
| 117 sigslot::signal2<PortInterface*, const rtc::SentPacket&> SignalSentPacket; |
| 118 |
| 115 virtual std::string ToString() const = 0; | 119 virtual std::string ToString() const = 0; |
| 116 | 120 |
| 117 protected: | 121 protected: |
| 118 PortInterface() {} | 122 PortInterface() {} |
| 119 }; | 123 }; |
| 120 | 124 |
| 121 } // namespace cricket | 125 } // namespace cricket |
| 122 | 126 |
| 123 #endif // WEBRTC_P2P_BASE_PORTINTERFACE_H_ | 127 #endif // WEBRTC_P2P_BASE_PORTINTERFACE_H_ |
| OLD | NEW |