michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #ifndef NULL_TRANSPORT_H_ michael@0: #define NULL_TRANSPORT_H_ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #include "webrtc/common_types.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: /** michael@0: * NullTransport is registered as ExternalTransport to throw away data michael@0: */ michael@0: class NullTransport : public webrtc::Transport michael@0: { michael@0: public: michael@0: virtual int SendPacket(int channel, const void *data, int len) michael@0: { michael@0: (void) channel; (void) data; michael@0: return len; michael@0: } michael@0: michael@0: virtual int SendRTCPPacket(int channel, const void *data, int len) michael@0: { michael@0: (void) channel; (void) data; michael@0: return len; michael@0: } michael@0: michael@0: NullTransport() {} michael@0: michael@0: virtual ~NullTransport() {} michael@0: michael@0: private: michael@0: NullTransport(const NullTransport& other) MOZ_DELETE; michael@0: void operator=(const NullTransport& other) MOZ_DELETE; michael@0: }; michael@0: michael@0: } // end namespace michael@0: michael@0: #endif