WebrtcTCPSocketCallback.h (844B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef webrtc_tcp_socket_callback_h__ 8 #define webrtc_tcp_socket_callback_h__ 9 10 #include "nsTArray.h" 11 12 namespace mozilla::net { 13 14 class WebrtcTCPSocketCallback { 15 public: 16 NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING 17 18 virtual void OnClose(nsresult aReason) = 0; 19 virtual void OnConnected(const nsACString& aProxyType) = 0; 20 virtual void OnRead(nsTArray<uint8_t>&& aReadData) = 0; 21 22 protected: 23 virtual ~WebrtcTCPSocketCallback() = default; 24 }; 25 26 } // namespace mozilla::net 27 28 #endif // webrtc_tcp_socket_callback_h__