Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 7f3e5f74d754b480ec33648905c4afae > files > 517

glibmm2.4-doc-2.22.1-1mdv2010.0.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>glibmm: URI Utilities</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>URI Utilities</h1>
<p>Various uri-related functions. <a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__UriUtils.html#ga0c070cac984dc463fd60ccbdb4237e25">Glib::uri_unescape_string</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; escaped_string, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; illegal_characters=<a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Unescapes a whole escaped string. <a href="#ga0c070cac984dc463fd60ccbdb4237e25"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__UriUtils.html#ga0cc4270d6796b2166964f08a5cb746b3">Glib::uri_parse_scheme</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; uri)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the scheme portion of a URI. <a href="#ga0cc4270d6796b2166964f08a5cb746b3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__UriUtils.html#gad902095ab5049111caa9207770b0a437">Glib::uri_escape_string</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; unescaped, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; reserved_chars_allowed=<a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>(), bool allow_utf8=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Escapes a string for use in a URI. <a href="#gad902095ab5049111caa9207770b0a437"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Various uri-related functions. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gad902095ab5049111caa9207770b0a437"></a><!-- doxytag: member="Glib::uri_escape_string" ref="gad902095ab5049111caa9207770b0a437" args="(const std::string &amp;unescaped, const std::string &amp;reserved_chars_allowed=std::string(), bool allow_utf8=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::uri_escape_string </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>unescaped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>reserved_chars_allowed</em> = <code><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>allow_utf8</em> = <code>true</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Escapes a string for use in a URI. </p>
<p>Normally all characters that are not "unreserved" (i.e. ASCII alphanumerical characters plus dash, dot, underscore and tilde) are escaped. But if you specify characters in <em>reserved_chars_allowed</em> they are not escaped. This is useful for the "reserved" characters in the URI specification, since those are allowed unescaped in some portions of a URI.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unescaped</em>&#160;</td><td>The unescaped input string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reserved_chars_allowed</em>&#160;</td><td>A string of reserved characters that are allowed to be used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>allow_utf8</em>&#160;</td><td>true if the result can include UTF-8 characters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An escaped version of <em>unescaped</em>.</dd></dl>
<dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000009">Since glibmm 2.16:</a></b></dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="ga0cc4270d6796b2166964f08a5cb746b3"></a><!-- doxytag: member="Glib::uri_parse_scheme" ref="ga0cc4270d6796b2166964f08a5cb746b3" args="(const std::string &amp;uri)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::uri_parse_scheme </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>uri</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the scheme portion of a URI. </p>
<p>RFC 3986 decodes the scheme as: </p>
<div class="fragment"><pre class="fragment"> URI = scheme <span class="stringliteral">&quot;:&quot;</span> hier-part [ <span class="stringliteral">&quot;?&quot;</span> query ] [ <span class="stringliteral">&quot;#&quot;</span> fragment ] </pre></div><p> Common schemes include "file", "http", "svn+ssh", etc.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>uri</em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The "Scheme" component of the URI, or an empty string on error.</dd></dl>
<dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000008">Since glibmm 2.16:</a></b></dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="ga0c070cac984dc463fd60ccbdb4237e25"></a><!-- doxytag: member="Glib::uri_unescape_string" ref="ga0c070cac984dc463fd60ccbdb4237e25" args="(const std::string &amp;escaped_string, const std::string &amp;illegal_characters=std::string())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::uri_unescape_string </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>escaped_string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>illegal_characters</em> = <code><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>()</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unescapes a whole escaped string. </p>
<p>If any of the characters in <em>illegal_characters</em> or the character zero appears as an escaped character in <em>escaped_string</em> then that is an error and an empty string will be returned. This is useful it you want to avoid, for instance, having a slash being expanded in an escaped path element, which might confuse pathname handling.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>escaped_string</em>&#160;</td><td>An escaped string to be unescaped. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>illegal_characters</em>&#160;</td><td>An optional string of illegal characters not to be allowed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An unescaped version of <em>escaped_string</em>.</dd></dl>
<dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000007">Since glibmm 2.16:</a></b></dt><dd></dd></dl>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:19 2009 for glibmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>