reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
Rlmi.cxx
Go to the documentation of this file.
1
#if defined(HAVE_CONFIG_H)
2
#include "config.h"
3
#endif
4
5
#include "
resip/stack/Rlmi.hxx
"
6
#include "
resip/stack/SipMessage.hxx
"
7
#include "
resip/stack/Symbols.hxx
"
8
#include "
rutil/Logger.hxx
"
9
#include "
rutil/ParseBuffer.hxx
"
10
#include "
rutil/WinLeakCheck.hxx
"
11
12
using namespace
resip
;
13
using namespace
std;
14
15
#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
16
17
bool
18
Rlmi::init
()
19
{
20
static
ContentsFactory<Rlmi>
factory;
21
(void)factory;
22
return
true
;
23
}
24
25
Rlmi::Rlmi
()
26
:
Contents
(getStaticType())
27
{}
28
29
Rlmi::Rlmi
(
const
HeaderFieldValue
& hfv,
const
Mime
& contentsType)
30
:
Contents
(hfv, contentsType)
31
{
32
}
33
34
Rlmi::Rlmi
(
const
Rlmi
& rhs)
35
:
Contents
(rhs)
36
{
37
mText = rhs.mText;
38
}
39
40
Rlmi::~Rlmi
()
41
{
42
}
43
44
Rlmi
&
45
Rlmi::operator=
(
const
Rlmi
& rhs)
46
{
47
if
(
this
!= &rhs)
48
{
49
mText = rhs.mText;
50
}
51
return
*
this
;
52
}
53
54
Contents
*
55
Rlmi::clone
()
const
56
{
57
return
new
Rlmi
(*
this
);
58
}
59
60
const
Mime
&
61
Rlmi::getStaticType
()
62
{
63
static
Mime
type(
"application"
,
"rlmi+xml"
);
64
return
type;
65
}
66
67
EncodeStream
&
68
Rlmi::encodeParsed
(EncodeStream& str)
const
69
{
70
//DebugLog(<< "Rlmi::encodeParsed " << mText);
71
str << mText;
72
73
return
str;
74
}
75
76
void
77
Rlmi::parse
(
ParseBuffer
& pb)
78
{
79
const
char
* anchor = pb.
position
();
80
pb.
skipToEnd
();
81
pb.
data
(mText, anchor);
82
}
83
84
const
Data
&
85
Rlmi::get
()
86
{
87
checkParsed
();
88
return
mText;
89
}
90
91
void
92
Rlmi::set
(
const
Data
& text)
93
{
94
mText = text;
95
}
96
97
/* ====================================================================
98
* The Vovida Software License, Version 1.0
99
*
100
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
101
*
102
* Redistribution and use in source and binary forms, with or without
103
* modification, are permitted provided that the following conditions
104
* are met:
105
*
106
* 1. Redistributions of source code must retain the above copyright
107
* notice, this list of conditions and the following disclaimer.
108
*
109
* 2. Redistributions in binary form must reproduce the above copyright
110
* notice, this list of conditions and the following disclaimer in
111
* the documentation and/or other materials provided with the
112
* distribution.
113
*
114
* 3. The names "VOCAL", "Vovida Open Communication Application Library",
115
* and "Vovida Open Communication Application Library (VOCAL)" must
116
* not be used to endorse or promote products derived from this
117
* software without prior written permission. For written
118
* permission, please contact vocal@vovida.org.
119
*
120
* 4. Products derived from this software may not be called "VOCAL", nor
121
* may "VOCAL" appear in their name, without prior written
122
* permission of Vovida Networks, Inc.
123
*
124
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
125
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
126
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
127
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
128
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
129
* IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
130
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
131
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
132
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
133
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
134
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
135
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
136
* DAMAGE.
137
*
138
* ====================================================================
139
*
140
* This software consists of voluntary contributions made by Vovida
141
* Networks, Inc. and many individuals on behalf of Vovida Networks,
142
* Inc. For more information on Vovida Networks, Inc., please see
143
* <http://www.vovida.org/>.
144
*
145
*/
Logger.hxx
ParseBuffer.hxx
Rlmi.hxx
SipMessage.hxx
Symbols.hxx
WinLeakCheck.hxx
resip::ContentsFactory
Definition
ContentsFactory.hxx:16
resip::Contents
Base class for all SIP body types.
Definition
Contents.hxx:51
resip::Data
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition
Data.hxx:90
resip::HeaderFieldValue
Definition
HeaderFieldValue.hxx:21
resip::LazyParser::checkParsed
void checkParsed() const
Definition
LazyParser.hxx:102
resip::Mime
Represents the "media-type" element in the RFC 3261 grammar.
Definition
Mime.hxx:20
resip::ParseBuffer
Provides string-parsing functionality with protection from buffer overflow.
Definition
ParseBuffer.hxx:18
resip::ParseBuffer::skipToEnd
CurrentPosition skipToEnd()
Definition
ParseBuffer.hxx:195
resip::ParseBuffer::position
CurrentPosition position() const
Definition
ParseBuffer.hxx:114
resip::ParseBuffer::data
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
Definition
ParseBuffer.cxx:530
resip::Rlmi
SIP body type for holding RLMI contents (MIME content-type application/rlmi+xml).
Definition
Rlmi.hxx:17
resip::Rlmi::clone
virtual Contents * clone() const
duplicate an Rlmi object
Definition
Rlmi.cxx:55
resip::Rlmi::Rlmi
Rlmi()
Definition
Rlmi.cxx:25
resip::Rlmi::getStaticType
static const Mime & getStaticType()
Definition
Rlmi.cxx:61
resip::Rlmi::set
void set(const Data &text)
Definition
Rlmi.cxx:92
resip::Rlmi::get
const Data & get()
Definition
Rlmi.cxx:85
resip::Rlmi::init
static bool init()
Definition
Rlmi.cxx:18
resip::Rlmi::parse
virtual void parse(ParseBuffer &pb)
Definition
Rlmi.cxx:77
resip::Rlmi::operator=
Rlmi & operator=(const Rlmi &rhs)
Definition
Rlmi.cxx:45
resip::Rlmi::encodeParsed
virtual EncodeStream & encodeParsed(EncodeStream &str) const
Definition
Rlmi.cxx:68
resip::Rlmi::~Rlmi
virtual ~Rlmi()
Definition
Rlmi.cxx:40
resip
dcm! – add UnusedChecking(_enum) below;
Definition
AbstractFifo.hxx:16
EncodeStream
#define EncodeStream
Definition
resipfaststreams.hxx:461
resip
stack
Rlmi.cxx
Generated by
1.9.8