Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 39907065f1eb3c6a70bcb6d8d4286f7f > files > 29

globus-gram-protocol-doc-9.7-6.fc14.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<!-- THIS FILE IS AUTOMATICALLY GENERATED FROM THE GLOBUS SOURCE CODE
     DO NOT MODIFY.
-->
<title>Globus Reference Manual</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <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>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__globus__gram__protocol__framing.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Message Framing</div>  </div>
<div class="ingroups"><a class="el" href="group__globus__gram__protocol__functions.html">Functions</a></div></div>
<div class="contents">

<p>The functions in this section frame a GRAM request, query, or reply message with HTTP headers compatible with the GRAM2 protocol parsers in GT2 GT3, and GT4.  
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Message Framing:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__globus__gram__protocol__framing.png" border="0" alt="" usemap="#group____globus____gram____protocol____framing"/>
<map name="group____globus____gram____protocol____framing" id="group____globus____gram____protocol____framing">
<area shape="rect" id="node2" href="group__globus__gram__protocol__functions.html" title="Functions" alt="" coords="7,5,84,35"/></map>
</td></tr></table></center>
</div>
<h2><a name="func-members"></a>
Functions</h2>
<ul>
<li>int <a class="el" href="group__globus__gram__protocol__framing.html#ga802c7ddc5d740a8924c4d8ea4da34ccf">globus_gram_protocol_frame_request</a> (const char *url, const globus_byte_t *msg, globus_size_t msgsize, globus_byte_t **framedmsg, globus_size_t *framedsize)
<li>int <a class="el" href="group__globus__gram__protocol__framing.html#gad36cdae83ef495c64ef51eb4a4e0c59b">globus_gram_protocol_frame_reply</a> (int code, const globus_byte_t *msg, globus_size_t msgsize, globus_byte_t **framedmsg, globus_size_t *framedsize)
</ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>The functions in this section frame a GRAM request, query, or reply message with HTTP headers compatible with the GRAM2 protocol parsers in GT2 GT3, and GT4. </p>
<p>These functions should be used when an application wants to control the way that the GRAM Protocol messages are sent, while still using the standard message formatting and framing routines. An alternative set of functions in the <a class="el" href="group__globus__gram__protocol__io.html">Message I/O</a> section of the manual combine message framing with callback-driven I/O. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga802c7ddc5d740a8924c4d8ea4da34ccf"></a><!-- doxytag: member="globus_gram_protocol_frame.c::globus_gram_protocol_frame_request" ref="ga802c7ddc5d740a8924c4d8ea4da34ccf" args="(const char *url, const globus_byte_t *msg, globus_size_t msgsize, globus_byte_t **framedmsg, globus_size_t *framedsize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int globus_gram_protocol_frame_request </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const globus_byte_t *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">globus_size_t&#160;</td>
          <td class="paramname"><em>msgsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">globus_byte_t **&#160;</td>
          <td class="paramname"><em>framedmsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">globus_size_t *&#160;</td>
          <td class="paramname"><em>framedsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a HTTP-framed copy of a GRAM request. </p>
<p>The <a class="el" href="group__globus__gram__protocol__framing.html#ga802c7ddc5d740a8924c4d8ea4da34ccf" title="Create a HTTP-framed copy of a GRAM request.">globus_gram_protocol_frame_request()</a> function adds HTTP 1.1 framing around the input message. The framed message includes HTTP headers relating the the destination URL and the length of the message content. The framed message is returned by modifying <em>framedmsg</em> to point to a newly allocated string. The integer pointed to by the <em>framedsize</em> parameter is set to the length of this message.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>The URL of the GRAM resource to contact. This is parsed and used to generate the HTTP POST operation destination and the Host HTTP header. </td></tr>
    <tr><td class="paramname">msg</td><td>A string containing the message content to be framed. </td></tr>
    <tr><td class="paramname">msgsize</td><td>The length of the string pointed to by <em>msg</em> </td></tr>
    <tr><td class="paramname">framedmsg</td><td>An output parameter which will be set to a copy of the <em>msg</em> string with an HTTP frame around it. </td></tr>
    <tr><td class="paramname">framedsize</td><td>An output parameter which will be set to the length of the framed message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Upon success, <a class="el" href="group__globus__gram__protocol__framing.html#ga802c7ddc5d740a8924c4d8ea4da34ccf" title="Create a HTTP-framed copy of a GRAM request.">globus_gram_protocol_frame_request()</a> will return GLOBUS_SUCCESS and the <em>framedmsg</em> and <em>framedsize</em> parameters will be modified to point to the new framed message string and its length respectively. When this occurs, the caller is responsible for freeing the string pointed to by <em>framedmsg</em>. If an error occurs, its value will returned and the <em>framedmsg</em> and <em>framedsize</em> parameters will be uninitialized.</dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">GLOBUS_SUCCESS</td><td>Success </td></tr>
    <tr><td class="paramname">GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT</td><td>Invalid job contact </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gad36cdae83ef495c64ef51eb4a4e0c59b"></a><!-- doxytag: member="globus_gram_protocol_frame.c::globus_gram_protocol_frame_reply" ref="gad36cdae83ef495c64ef51eb4a4e0c59b" args="(int code, const globus_byte_t *msg, globus_size_t msgsize, globus_byte_t **framedmsg, globus_size_t *framedsize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int globus_gram_protocol_frame_reply </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const globus_byte_t *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">globus_size_t&#160;</td>
          <td class="paramname"><em>msgsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">globus_byte_t **&#160;</td>
          <td class="paramname"><em>framedmsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">globus_size_t *&#160;</td>
          <td class="paramname"><em>framedsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a HTTP-framed copy of a GRAM reply. </p>
<p>The <a class="el" href="group__globus__gram__protocol__framing.html#gad36cdae83ef495c64ef51eb4a4e0c59b" title="Create a HTTP-framed copy of a GRAM reply.">globus_gram_protocol_frame_reply()</a> function adds HTTP 1.1 framing around the input message. The framed message includes HTTP headers relating the the status of the operation being replied to and the length of the message content. The framed message is returned by modifying <em>framedmsg</em> to point to a newly allocated string. The integer pointed to by the <em>framedsize</em> parameter is set to the length of this message.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">code</td><td>The HTTP response code to send along with this reply. </td></tr>
    <tr><td class="paramname">msg</td><td>A string containing the reply message content to be framed. </td></tr>
    <tr><td class="paramname">msgsize</td><td>The length of the string pointed to by <em>msg</em>. </td></tr>
    <tr><td class="paramname">framedmsg</td><td>An output parameter which will be set to a copy of the <em>msg</em> string with an HTTP reply frame around it. </td></tr>
    <tr><td class="paramname">framedsize</td><td>An output parameter which will be set to the length of the framed reply string pointed to by <em>framedmsg</em>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Upon success, <a class="el" href="group__globus__gram__protocol__framing.html#gad36cdae83ef495c64ef51eb4a4e0c59b" title="Create a HTTP-framed copy of a GRAM reply.">globus_gram_protocol_frame_reply()</a> will return GLOBUS_SUCCESS and the <em>framedmsg</em> and <em>framedsize</em> parameters will be modified to point to the new framed message string and its length respectively. When this occurs, the caller is responsible for freeing the string pointed to by <em>framedmsg</em>. If an error occurs, its value will returned and the <em>framedmsg</em> and <em>framedsize</em> parameters will be uninitialized.</dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">GLOBUS_SUCCESS</td><td>Success </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<hr>
<p align="center">
<a href="http://www.globus.org/toolkit/about.html" target="_top">about globus</a> |
<a href="http://www.globus.org/toolkit/" target="_top">globus toolkit</a> |
<a href="https://dev.globus.org/wiki/Welcome/" target="_top">dev.globus</a>
<br>
<br>
Comments? <a href="mailto:webmaster@globus.org">webmaster@globus.org</a>

</body>
</html>