Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef NULL_TRANSPORT_H_
7 #define NULL_TRANSPORT_H_
9 #include "mozilla/Attributes.h"
11 #include "webrtc/common_types.h"
13 namespace mozilla {
15 /**
16 * NullTransport is registered as ExternalTransport to throw away data
17 */
18 class NullTransport : public webrtc::Transport
19 {
20 public:
21 virtual int SendPacket(int channel, const void *data, int len)
22 {
23 (void) channel; (void) data;
24 return len;
25 }
27 virtual int SendRTCPPacket(int channel, const void *data, int len)
28 {
29 (void) channel; (void) data;
30 return len;
31 }
33 NullTransport() {}
35 virtual ~NullTransport() {}
37 private:
38 NullTransport(const NullTransport& other) MOZ_DELETE;
39 void operator=(const NullTransport& other) MOZ_DELETE;
40 };
42 } // end namespace
44 #endif