tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

transportlayerlog.h (1016B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      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 // Original author: ekr@rtfm.com
      8 
      9 #ifndef transportlayerlog_h__
     10 #define transportlayerlog_h__
     11 
     12 #include "m_cpp_utils.h"
     13 #include "transportlayer.h"
     14 
     15 namespace mozilla {
     16 
     17 class TransportLayerLogging : public TransportLayer {
     18 public:
     19  TransportLayerLogging() = default;
     20 
     21  // Overrides for TransportLayer
     22  TransportResult SendPacket(MediaPacket& packet) override;
     23 
     24  // Signals (forwarded to upper layer)
     25  void StateChange(TransportLayer* layer, State state);
     26  void PacketReceived(TransportLayer* layer, MediaPacket& packet);
     27 
     28  TRANSPORT_LAYER_ID("log")
     29 
     30 protected:
     31  void WasInserted() override;
     32 
     33 private:
     34  DISALLOW_COPY_ASSIGN(TransportLayerLogging);
     35 };
     36 
     37 }  // namespace mozilla
     38 #endif