1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
|
<HTML>
<HEAD>
<TITLE>class MimeHeaderLine</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class MimeHeaderLine</h1>
</TD>
<TD valign="top" align="right" colspan="1">MIME header line. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::MimeHeaderLine</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="yatemime_h.html">yatemime.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__NamedString.html">TelEngine::NamedString</A> <small>[public ]</small></TD></TR>
<TR><TH>Inherited by</TH><TD><A HREF="TelEngine__MimeAuthLine.html">MimeAuthLine</A></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__MimeHeaderLine.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI> <b><A HREF="#ref1">MimeHeaderLine</A></b> (const char* name, const String& value, char sep = 0)
</LI>
<LI> <b><A HREF="#ref2">MimeHeaderLine</A></b> (const MimeHeaderLine& original, const char* newName = 0)
</LI>
<LI>virtual <b><A HREF="#ref3">~MimeHeaderLine</A></b> ()
</LI>
<LI>virtual void* <b><A HREF="#ref4">getObject</A></b> (const String& name) const
</LI>
<LI>virtual MimeHeaderLine* <b><A HREF="#ref5">clone</A></b> (const char* newName = 0) const
</LI>
<LI>virtual void <b><A HREF="#ref6">buildLine</A></b> (String& line) const
</LI>
<LI>inline MimeHeaderLine& <b><A HREF="#ref7">operator=</A></b> (const char* value)
</LI>
<LI>inline const ObjList& <b><A HREF="#ref8">params</A></b> () const
</LI>
<LI>inline char <b><A HREF="#ref9">separator</A></b> () const
</LI>
<LI>void <b><A HREF="#ref10">setParam</A></b> (const char* name, const char* value = 0)
</LI>
<LI>void <b><A HREF="#ref11">delParam</A></b> (const char* name)
</LI>
<LI>const NamedString* <b><A HREF="#ref12">getParam</A></b> (const char* name) const
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static void <b><A HREF="#ref13">addQuotes</A></b> (String& str, bool force = false)
</LI>
<LI>static void <b><A HREF="#ref14">delQuotes</A></b> (String& str, bool force = false)
</LI>
<LI>static String <b><A HREF="#ref15">quote</A></b> (const String& str, bool force = false)
</LI>
<LI>static String <b><A HREF="#ref16">unquote</A></b> (const String& str, bool force = false)
</LI>
<LI>static int <b><A HREF="#ref17">findSep</A></b> (const char* str, char sep, int offs = 0)
</LI>
<LI>static void <b><A HREF="#ref18">buildHeaders</A></b> (String& buf, const ObjList& headers)
</LI>
</ul><h4>Protected Members</h4><ul><LI>ObjList <b><A HREF="#ref19">m_params</A></b></LI>
<LI>char <b><A HREF="#ref20">m_separator</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
A MIME header line.
The NamedString's value contain the first parameter after the header name
</p>
<A NAME="MimeHeaderLine"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>MimeHeaderLine</strong> (const char* name, const String& value, char sep = 0)
<br></td><td align="right"><h3><strong>MimeHeaderLine</strong></h3></td></tr></table><p></p><p>
Constructor.
Builds a MIME header line from a string buffer.
Splits the value into header parameters
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">The header name
</TD></TR>
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">The header value
</TD></TR>
<TR><TD align="left" valign="top"><i>sep</i></TD><TD align="left" valign="top">Optional parameter separator. If 0, the default ';' will be used
</TD></TR>
</TABLE></P>
<A NAME="MimeHeaderLine"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>MimeHeaderLine</strong> (const MimeHeaderLine& original, const char* newName = 0)
<br></td><td align="right"><h3><strong>MimeHeaderLine</strong></h3></td></tr></table><p></p><p>
Constructor.
Builds this MIME header line from another one
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>original</i></TD><TD align="left" valign="top">Original header line to build from.
</TD></TR>
<TR><TD align="left" valign="top"><i>newName</i></TD><TD align="left" valign="top">Optional new header name. If 0, the original name will be used
</TD></TR>
</TABLE></P>
<A NAME="~MimeHeaderLine"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~MimeHeaderLine</strong> ()
<br></td><td align="right"><h3><strong>~MimeHeaderLine</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Destructor.
</p>
<A NAME="getObject"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void* <strong>getObject</strong> (const String& name)
<br></td><td align="right"><h3><strong>getObject</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
RTTI method, get a pointer to a derived class given the class name.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of the class we are asking for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the requested class or NULL if this object doesn't implement it
</p>
<p>Reimplemented from <A HREF="TelEngine__NamedString.html#getObject">NamedString</A>.</p>
<A NAME="clone"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> MimeHeaderLine* <strong>clone</strong> (const char* newName = 0)
<br></td><td align="right"><h3><strong>clone</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Duplicate this MIME header line.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>newName</i></TD><TD align="left" valign="top">Optional new header name. If 0, this header's name will be used
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Copy of this MIME header line
</p>
<A NAME="buildLine"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>buildLine</strong> (String& line)
<br></td><td align="right"><h3><strong>buildLine</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Build a string line from this MIME header without adding a line separator
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>line</i></TD><TD align="left" valign="top">Destination string
</TD></TR>
</TABLE></P>
<A NAME="operator="></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline MimeHeaderLine& <strong>operator=</strong> (const char* value)
<br></td><td align="right"><h3><strong>operator=</strong></h3></td></tr></table><p></p><p>
Assignement operator. Set the header's value
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">The new headr value
</TD></TR>
</TABLE></P>
<p>Reimplemented from <A HREF="TelEngine__NamedString.html#operator=">NamedString</A>.</p>
<A NAME="params"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline const ObjList& <strong>params</strong> ()
<br></td><td align="right"><h3><strong>params</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the header's parameters
</p>
<p><b>Returns</b>: This header's list of parameters
</p>
<A NAME="separator"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline char <strong>separator</strong> ()
<br></td><td align="right"><h3><strong>separator</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the character used as separator in header line
</p>
<p><b>Returns</b>: This header's separator
</p>
<A NAME="setParam"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setParam</strong> (const char* name, const char* value = 0)
<br></td><td align="right"><h3><strong>setParam</strong></h3></td></tr></table><p></p><p>
Replace the value of an existing parameter or add a new one
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Parameter's name
</TD></TR>
<TR><TD align="left" valign="top"><i>value</i></TD><TD align="left" valign="top">Parameter's value
</TD></TR>
</TABLE></P>
<A NAME="delParam"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>delParam</strong> (const char* name)
<br></td><td align="right"><h3><strong>delParam</strong></h3></td></tr></table><p></p><p>
Remove a parameter from list
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Parameter's name
</TD></TR>
</TABLE></P>
<A NAME="getParam"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const NamedString* <strong>getParam</strong> (const char* name)
<br></td><td align="right"><h3><strong>getParam</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get a header parameter
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Parameter's name
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the desired parameter or 0 if not found
</p>
<A NAME="addQuotes"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>addQuotes</strong> (String& str, bool force = false)
<br></td><td align="right"><h3><strong>addQuotes</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Utility function, puts quotes around a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to put quotes around.
</TD></TR>
<TR><TD align="left" valign="top"><i>force</i></TD><TD align="left" valign="top">True to force quoting even if was already quoted
</TD></TR>
</TABLE></P>
<A NAME="delQuotes"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>delQuotes</strong> (String& str, bool force = false)
<br></td><td align="right"><h3><strong>delQuotes</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Utility function, removes quotes around a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to remove quotes.
</TD></TR>
<TR><TD align="left" valign="top"><i>force</i></TD><TD align="left" valign="top">True to force unquoting even if wasn't properly quoted
</TD></TR>
</TABLE></P>
<A NAME="quote"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td> String <strong>quote</strong> (const String& str, bool force = false)
<br></td><td align="right"><h3><strong>quote</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Utility function, puts quotes around a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to put quotes around.
</TD></TR>
<TR><TD align="left" valign="top"><i>force</i></TD><TD align="left" valign="top">True to force quoting even if was already quoted
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The input string enclosed in quotes.
</p>
<A NAME="unquote"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td> String <strong>unquote</strong> (const String& str, bool force = false)
<br></td><td align="right"><h3><strong>unquote</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Utility function, removes quotes around a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to remove quotes around.
</TD></TR>
<TR><TD align="left" valign="top"><i>force</i></TD><TD align="left" valign="top">True to force unquoting even if wasn't properly quoted
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The input string with enclosing quotes removed.
</p>
<A NAME="findSep"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td> int <strong>findSep</strong> (const char* str, char sep, int offs = 0)
<br></td><td align="right"><h3><strong>findSep</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Utility function to find a separator not in "quotes" or inside \<uri\>.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">Input string used to find the separator.
</TD></TR>
<TR><TD align="left" valign="top"><i>sep</i></TD><TD align="left" valign="top">The separator to find.
</TD></TR>
<TR><TD align="left" valign="top"><i>offs</i></TD><TD align="left" valign="top">Starting offset in input string.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The position of the separator in input string or -1 if not found.
</p>
<A NAME="buildHeaders"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>buildHeaders</strong> (String& buf, const ObjList& headers)
<br></td><td align="right"><h3><strong>buildHeaders</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Build a string from a list of MIME header lines.
Add a CR/LF terminator after each line
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>buf</i></TD><TD align="left" valign="top">Destination string
</TD></TR>
<TR><TD align="left" valign="top"><i>headers</i></TD><TD align="left" valign="top">The list with the header lines
</TD></TR>
</TABLE></P>
<A NAME="m_params"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList <strong>m_params</strong>
</td><td align="right"><h3><strong>m_params</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_separator"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>char <strong>m_separator</strong>
</td><td align="right"><h3><strong>m_separator</strong></h3></td></tr></table><p> <small>[protected]</small></p><HR>
<table>
<tr><td><small>Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|