reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SdpCodec.hxx
Go to the documentation of this file.
1#if !defined(SdpCodec_hxx)
2#define SdpCodec_hxx
3
4#include "rutil/compat.hxx"
5#include "rutil/Data.hxx"
6
7namespace sdpcontainer
8{
9
11{
12public:
13
14 SdpCodec(unsigned int payloadType,
15 const char* mimeType,
16 const char* mimeSubType,
17 unsigned int rate,
18 unsigned int packetTime,
19 unsigned int numChannels,
20 const char* formatParameters);
21
23
24 virtual ~SdpCodec();
25
27
28 void setPayloadType(unsigned int payloadType) { mPayloadType = payloadType; }
29 void setMimeType(const resip::Data& mimeType) { mMimeType = mimeType; }
30 void setMimeSubtype(const resip::Data& mimeSubtype) { mMimeSubtype = mimeSubtype; }
31 void setRate(unsigned int rate) { mRate = rate; }
32 void setNumChannels(unsigned int numChannels) { mNumChannels = numChannels; }
33 void setPacketTime(unsigned int packetTime) { mPacketTime = packetTime; }
35
36 unsigned int getPayloadType() const { return mPayloadType; }
37 const resip::Data& getMimeType() const { return mMimeType; }
38 const resip::Data& getMimeSubtype() const { return mMimeSubtype; }
39 unsigned int getRate() const { return mRate; }
40 unsigned int getNumChannels() const { return mNumChannels; }
41 unsigned int getPacketTime() const { return mPacketTime; }
42 const resip::Data& getFormatParameters() const { return mFormatParameters; }
43
45
46private:
47 unsigned int mPayloadType;
48 resip::Data mMimeType;
49 resip::Data mMimeSubtype;
50 unsigned int mRate;
51 unsigned int mPacketTime; // ptime
52 unsigned int mNumChannels;
53 resip::Data mFormatParameters;
54
56};
57
59
60} // namespace
61
62#endif
63
64/* ====================================================================
65
66 Copyright (c) 2007-2008, Plantronics, Inc.
67 All rights reserved.
68
69 Redistribution and use in source and binary forms, with or without
70 modification, are permitted provided that the following conditions are
71 met:
72
73 1. Redistributions of source code must retain the above copyright
74 notice, this list of conditions and the following disclaimer.
75
76 2. Redistributions in binary form must reproduce the above copyright
77 notice, this list of conditions and the following disclaimer in the
78 documentation and/or other materials provided with the distribution.
79
80 3. Neither the name of Plantronics nor the names of its contributors
81 may be used to endorse or promote products derived from this
82 software without specific prior written permission.
83
84 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
85 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
86 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
87 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
88 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
89 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
90 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
91 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
92 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
93 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
94 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95
96 ==================================================================== */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
friend EncodeStream & operator<<(EncodeStream &strm, const SdpCodec &)
const resip::Data & getFormatParameters() const
Definition SdpCodec.hxx:42
const resip::Data & getMimeType() const
Definition SdpCodec.hxx:37
void setMimeType(const resip::Data &mimeType)
Definition SdpCodec.hxx:29
unsigned int getPacketTime() const
Definition SdpCodec.hxx:41
void toString(resip::Data &sdpCodecString) const
SdpCodec & operator=(const SdpCodec &rhs)
Definition SdpCodec.cxx:32
void setFormatParameters(const resip::Data &formatParameters)
Definition SdpCodec.hxx:34
void setPayloadType(unsigned int payloadType)
Definition SdpCodec.hxx:28
unsigned int getPayloadType() const
Definition SdpCodec.hxx:36
void setPacketTime(unsigned int packetTime)
Definition SdpCodec.hxx:33
void setMimeSubtype(const resip::Data &mimeSubtype)
Definition SdpCodec.hxx:30
const resip::Data & getMimeSubtype() const
Definition SdpCodec.hxx:38
void setRate(unsigned int rate)
Definition SdpCodec.hxx:31
unsigned int getNumChannels() const
Definition SdpCodec.hxx:40
unsigned int getRate() const
Definition SdpCodec.hxx:39
void setNumChannels(unsigned int numChannels)
Definition SdpCodec.hxx:32
This file is used to handle compatibility fixes/tweaks so reSIProcate can function on multiple platfo...
EncodeStream & operator<<(EncodeStream &strm, const Sdp &)
Definition Sdp.cxx:304
#define EncodeStream
void list()
Definition userAdmin.cxx:66