media/mtransport/transportlayerlog.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:a5d412702f1d
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 "transportflow.h"
14 #include "transportlayer.h"
15
16 namespace mozilla {
17
18 class TransportLayerLogging : public TransportLayer {
19 public:
20 TransportLayerLogging() {}
21
22 // Overrides for TransportLayer
23 virtual TransportResult SendPacket(const unsigned char *data, size_t len);
24
25 // Signals (forwarded to upper layer)
26 void StateChange(TransportLayer *layer, State state);
27 void PacketReceived(TransportLayer* layer, const unsigned char *data,
28 size_t len);
29
30 TRANSPORT_LAYER_ID("log")
31
32 protected:
33 virtual void WasInserted();
34
35 private:
36 DISALLOW_COPY_ASSIGN(TransportLayerLogging);
37 };
38
39
40 } // close namespace
41 #endif

mercurial