reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SdpHelper.hxx
Go to the documentation of this file.
1#if !defined(SdpHelper_hxx)
2#define SdpHelper_hxx
3
4#include "Sdp.hxx"
5#include "SdpMediaLine.hxx"
7
8using namespace sdpcontainer;
9
10namespace resip
11{
12 class ParseBuffer;
13 class Data;
14}
15
24{
25public:
26 // The main method use to create a higher level Sdp object from a SdpContents object
28
29 // Helper methods to convert from SdpContents address type to sdpcontainer address type
31 // Helper method to convert from SdpContents encryption key type to sdpcontainer encryption method
33
34 // Helper methods to parse specific SDP attribute lines that SdpContents class doesn't provide parsing for
37 static bool parseTransportCapabilitiesLine(const resip::Data& tcapLine, std::list<sdpcontainer::SdpMediaLine::SdpTransportProtocolCapabilities>& tcapList);
38 static bool parsePotentialConfigurationLine(const resip::Data& pcfgLine, std::list<sdpcontainer::SdpMediaLine::SdpPotentialConfiguration>& pcfgList);
39
40private:
42 static void parseCryptoParams(resip::ParseBuffer& pb,
45 unsigned int& srtpLifetime,
46 unsigned int& srtpMkiValue,
47 unsigned int& srtpMkiLength);
48
49};
50
51#endif // _SdpHelper_hxx_
52
53
54/* ====================================================================
55
56 Copyright (c) 2026, SIP Spectrum, Inc. https://www.sipspectrum.com
57 Copyright (c) 2007-2008, Plantronics, Inc.
58 All rights reserved.
59
60 Redistribution and use in source and binary forms, with or without
61 modification, are permitted provided that the following conditions are
62 met:
63
64 1. Redistributions of source code must retain the above copyright
65 notice, this list of conditions and the following disclaimer.
66
67 2. Redistributions in binary form must reproduce the above copyright
68 notice, this list of conditions and the following disclaimer in the
69 documentation and/or other materials provided with the distribution.
70
71 3. Neither the name of Plantronics nor the names of its contributors
72 may be used to endorse or promote products derived from this
73 software without specific prior written permission.
74
75 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
76 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
77 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
78 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
79 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
80 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
81 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
82 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
83 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
84 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
85 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
86
87 ==================================================================== */
This class is used to form a higher level representation of SDP from a resiprocate representation.
Definition SdpHelper.hxx:24
static sdpcontainer::SdpMediaLine::SdpEncryptionMethod convertResipEncryptionMethod(resip::SdpContents::Session::Encryption::KeyType resipMethod)
Definition SdpHelper.cxx:20
static bool parsePotentialConfigurationLine(const resip::Data &pcfgLine, std::list< sdpcontainer::SdpMediaLine::SdpPotentialConfiguration > &pcfgList)
static sdpcontainer::Sdp::SdpAddressType convertResipAddressType(resip::SdpContents::AddrType resipAddrType)
Definition SdpHelper.cxx:15
static bool parseTransportCapabilitiesLine(const resip::Data &tcapLine, std::list< sdpcontainer::SdpMediaLine::SdpTransportProtocolCapabilities > &tcapList)
static bool parseFingerPrintLine(const resip::Data &fingerprintLine, sdpcontainer::SdpMediaLine::SdpFingerPrintHashFuncType &hashType, resip::Data &fingerPrint)
static sdpcontainer::Sdp * createSdpFromResipSdp(const resip::SdpContents &resipSdp)
Definition SdpHelper.cxx:37
static sdpcontainer::SdpMediaLine::SdpCrypto * parseCryptoLine(const resip::Data &cryptoLine)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Provides string-parsing functionality with protection from buffer overflow.
process m= (media announcement) blocks
Provides an interface to read and modify SDP bodies.
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66