Coverage Report

Created: 2025-11-05 06:27

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/resiprocate/resip/stack/Rlmi.cxx
Line
Count
Source
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
4
{
20
4
   static ContentsFactory<Rlmi> factory;
21
4
   (void)factory;
22
4
   return true;
23
4
}
24
25
Rlmi::Rlmi()
26
0
   : Contents(getStaticType())
27
0
{}
28
29
Rlmi::Rlmi(const HeaderFieldValue& hfv, const Mime& contentsType)
30
6.07k
   : Contents(hfv, contentsType)
31
6.07k
{
32
6.07k
}
33
 
34
Rlmi::Rlmi(const Rlmi& rhs)
35
0
   : Contents(rhs)
36
0
{
37
0
   mText = rhs.mText;
38
0
}
39
40
Rlmi::~Rlmi()
41
6.07k
{
42
6.07k
}
43
44
Rlmi&
45
Rlmi::operator=(const Rlmi& rhs)
46
0
{
47
0
   if (this != &rhs)
48
0
   {
49
0
      mText = rhs.mText;
50
0
   }
51
0
   return *this;
52
0
}
53
54
Contents* 
55
Rlmi::clone() const
56
0
{
57
0
   return new Rlmi(*this);
58
0
}
59
60
const Mime& 
61
Rlmi::getStaticType() 
62
2
{
63
2
   static Mime type("application","rlmi+xml");
64
2
   return type;
65
2
}
66
67
EncodeStream& 
68
Rlmi::encodeParsed(EncodeStream& str) const
69
0
{
70
   //DebugLog(<< "Rlmi::encodeParsed " << mText);
71
0
   str << mText;
72
   
73
0
   return str;
74
0
}
75
76
void 
77
Rlmi::parse(ParseBuffer& pb)
78
6.07k
{
79
6.07k
   const char* anchor = pb.position();
80
6.07k
   pb.skipToEnd();
81
6.07k
   pb.data(mText, anchor);
82
6.07k
}
83
84
const Data&
85
Rlmi::get()
86
0
{
87
0
   checkParsed();
88
0
   return mText;
89
0
}
90
91
void
92
Rlmi::set(const Data& text)
93
0
{
94
0
   mText = text;
95
0
}
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
 */