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/. */
7 // Original author: ekr@rtfm.com
9 #ifndef transportlayerlog_h__
10 #define transportlayerlog_h__
12 #include "m_cpp_utils.h"
13 #include "transportflow.h"
14 #include "transportlayer.h"
18 class TransportLayerLogging
: public TransportLayer
{
20 TransportLayerLogging() {}
22 // Overrides for TransportLayer
23 virtual TransportResult
SendPacket(const unsigned char *data
, size_t len
);
25 // Signals (forwarded to upper layer)
26 void StateChange(TransportLayer
*layer
, State state
);
27 void PacketReceived(TransportLayer
* layer
, const unsigned char *data
,
30 TRANSPORT_LAYER_ID("log")
33 virtual void WasInserted();
36 DISALLOW_COPY_ASSIGN(TransportLayerLogging
);