Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/media/mtransport/transportlayersrtp.h
Line
Count
Source (jump to first uncovered line)
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
#ifndef transportlayersrtp_h__
8
#define transportlayersrtp_h__
9
10
#include <string>
11
12
#include "transportlayer.h"
13
#include "mozilla/RefPtr.h"
14
#include "SrtpFlow.h"
15
16
namespace mozilla {
17
18
class TransportLayerDtls;
19
20
class TransportLayerSrtp final : public TransportLayer {
21
  public:
22
    explicit TransportLayerSrtp(TransportLayerDtls& dtls);
23
0
    virtual ~TransportLayerSrtp() {};
24
25
    // Transport layer overrides.
26
    void WasInserted() override;
27
    TransportResult SendPacket(MediaPacket& packet) override;
28
29
    // Signals
30
    void StateChange(TransportLayer *layer, State state);
31
    void PacketReceived(TransportLayer* layer, MediaPacket& packet);
32
33
    TRANSPORT_LAYER_ID("srtp")
34
35
  private:
36
    bool Setup();
37
    DISALLOW_COPY_ASSIGN(TransportLayerSrtp);
38
    RefPtr<SrtpFlow> mSendSrtp;
39
    RefPtr<SrtpFlow> mRecvSrtp;
40
};
41
42
43
}  // close namespace
44
#endif