LCOV - code coverage report
Current view: top level - media/webrtc/signaling/src/sdp - SdpAttributeList.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 9 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 6 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 _SDPATTRIBUTELIST_H_
       8             : #define _SDPATTRIBUTELIST_H_
       9             : 
      10             : #include "mozilla/UniquePtr.h"
      11             : #include "mozilla/Attributes.h"
      12             : 
      13             : #include "signaling/src/sdp/SdpAttribute.h"
      14             : 
      15             : namespace mozilla
      16             : {
      17             : 
      18           0 : class SdpAttributeList
      19             : {
      20             : public:
      21           0 :   virtual ~SdpAttributeList() {}
      22             :   typedef SdpAttribute::AttributeType AttributeType;
      23             : 
      24             :   // Avoid default params on virtual functions
      25             :   bool
      26           0 :   HasAttribute(AttributeType type) const
      27             :   {
      28           0 :     return HasAttribute(type, true);
      29             :   }
      30             : 
      31             :   const SdpAttribute*
      32           0 :   GetAttribute(AttributeType type) const
      33             :   {
      34           0 :     return GetAttribute(type, true);
      35             :   }
      36             : 
      37             :   virtual bool HasAttribute(AttributeType type, bool sessionFallback) const = 0;
      38             :   virtual const SdpAttribute* GetAttribute(AttributeType type,
      39             :                                            bool sessionFallback) const = 0;
      40             :   // The setter takes an attribute of any type, and takes ownership
      41             :   virtual void SetAttribute(SdpAttribute* attr) = 0;
      42             :   virtual void RemoveAttribute(AttributeType type) = 0;
      43             :   virtual void Clear() = 0;
      44             : 
      45             :   virtual const SdpConnectionAttribute& GetConnection() const = 0;
      46             :   virtual const SdpOptionsAttribute& GetIceOptions() const = 0;
      47             :   virtual const SdpRtcpAttribute& GetRtcp() const = 0;
      48             :   virtual const SdpRemoteCandidatesAttribute& GetRemoteCandidates() const = 0;
      49             :   virtual const SdpSetupAttribute& GetSetup() const = 0;
      50             :   virtual const SdpDtlsMessageAttribute& GetDtlsMessage() const = 0;
      51             : 
      52             :   // These attributes can appear multiple times, so the returned
      53             :   // classes actually represent a collection of values.
      54             :   virtual const std::vector<std::string>& GetCandidate() const = 0;
      55             :   virtual const SdpExtmapAttributeList& GetExtmap() const = 0;
      56             :   virtual const SdpFingerprintAttributeList& GetFingerprint() const = 0;
      57             :   virtual const SdpFmtpAttributeList& GetFmtp() const = 0;
      58             :   virtual const SdpGroupAttributeList& GetGroup() const = 0;
      59             :   virtual const SdpImageattrAttributeList& GetImageattr() const = 0;
      60             :   virtual const SdpSimulcastAttribute& GetSimulcast() const = 0;
      61             :   virtual const SdpMsidAttributeList& GetMsid() const = 0;
      62             :   virtual const SdpMsidSemanticAttributeList& GetMsidSemantic() const = 0;
      63             :   virtual const SdpRidAttributeList& GetRid() const = 0;
      64             :   virtual const SdpRtcpFbAttributeList& GetRtcpFb() const = 0;
      65             :   virtual const SdpRtpmapAttributeList& GetRtpmap() const = 0;
      66             :   virtual const SdpSctpmapAttributeList& GetSctpmap() const = 0;
      67             :   virtual uint32_t GetSctpPort() const = 0;
      68             :   virtual uint32_t GetMaxMessageSize() const = 0;
      69             :   virtual const SdpSsrcAttributeList& GetSsrc() const = 0;
      70             :   virtual const SdpSsrcGroupAttributeList& GetSsrcGroup() const = 0;
      71             : 
      72             :   // These attributes are effectively simple types, so we'll make life
      73             :   // easy by just returning their value.
      74             :   virtual const std::string& GetIcePwd() const = 0;
      75             :   virtual const std::string& GetIceUfrag() const = 0;
      76             :   virtual const std::string& GetIdentity() const = 0;
      77             :   virtual const std::string& GetLabel() const = 0;
      78             :   virtual unsigned int GetMaxptime() const = 0;
      79             :   virtual const std::string& GetMid() const = 0;
      80             :   virtual unsigned int GetPtime() const = 0;
      81             : 
      82             :   // This is "special", because it's multiple things
      83             :   virtual SdpDirectionAttribute::Direction GetDirection() const = 0;
      84             : 
      85             :   virtual void Serialize(std::ostream&) const = 0;
      86             : };
      87             : 
      88           0 : inline std::ostream& operator<<(std::ostream& os, const SdpAttributeList& al)
      89             : {
      90           0 :   al.Serialize(os);
      91           0 :   return os;
      92             : }
      93             : 
      94             : } // namespace mozilla
      95             : 
      96             : #endif

Generated by: LCOV version 1.13