Commit 424429ad authored by Pekka Pessi's avatar Pekka Pessi

Remove ancient doc file sdp.html.

darcs-hash:20050928111828-65a35-4cb1ee998e0661760b92727fe2bac5f0d3422ee5.gz
parent b9e78f1c
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>sdp - SDP Parser Interface</title>
<style type="text/css"><!--
P, BODY, BLOCKQUOTE { font-family : serif; }
SMALL { font-size: smaller }
H1 { font: oblique bold large sans-serif; text-align:center; }
H2 { font: normal bold 14pt/16pt sans-serif; }
H3 { font: normal bold medium sans-serif; }
H4 { font: italic 500 medium sans-serif; }
PRE, SAMP, CODE { font-family: monospace; }
--></style>
</head>
<body bgcolor=White text=Black link="#0018ce" vlink=Purple>
<table cellspacing=0 cellpadding=2 border=0 width="99%">
<tr>
<td width="50%"><img src="../pictures/nokia.gif" alt="Nokia">
<td>SPECIFICATION
</tr>
<tr>
<td>&nbsp;Nokia Research Center
<td>
<td>Draft #1
</tr>
<tr>
<td>&nbsp;Pekka Pessi
<td>21-Feb-2000
</tr>
</table>
<hr>
<h1>UNFINISHED!</h1>
<h1><code>sdp</code> - SDP Parser Interface</h1>
<h2>Change History</h2>
<table width="80%" cellspacing=0 cellpadding=3 border=1 align=center>
<tr>
<th align=left width="15%">Issue
<th align=left width="15%">Date
<th align=left width="20%">Handled by
<th align=left width="50%">Comments
</tr>
<tr>
<td>Draft #1 ""
<td>21-Feb-2000
<td>Pekka Pessi
<td>Initial version
</tr>
</table>
<h2>Introduction</h2>
<p>The <code>sdp</code> module provides a simple "C" parser interface for
SDP [<a href="ftp://ftp.funet.fi/rfc/rfc2327.txt">RFC2327</a>].
</p>
<h1>Parsing Functions</h1>
<p>Typically, the SDP parser is used as follows:
<blockquote>
<table border=1 cellspacing=0><tr><td>
<pre>#include &lt;sdp.h&gt;
...
sdp_parser parser = sdp_parse(message, len, 0);
if (!sdp_parsing_error(parser)) {
sdp_session_t *sdp = sdp_session(parser);
...</pre>
<div align=center><i>act upon session description</i></div>
<pre>
...
}
else {
show(sdp_parsing_error(parser));
}
sdp_free_parser(parser);
...
</pre>
</tr></table>
</blockquote>
<a name="sdp_parse"></a>
<h3>Function <code>sdp_parse()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>sdp_parser sdp_parse(char const message[], int size, int flags);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
<p>This function parses an SDP <var>message</var> with given <var>size</var>.
The <var>flags</var> specify parsing options as follows: </p>
<a name="sdp_parse_flags_e"></a>
<div align=center>
<i>Table 1. The flags for sdp_parse().</i></div>
<p>
<table width="95%" cellspacing=0 cellpadding=3 border=1>
<tr>
<th>Field
<th width="70%">Description
</tr>
<tr>
<td valign=top><code>sdp_strict</code>
<td>Parser should accept only messages conforming strictly to the
specification.
</tr>
<tr>
<td valign=top><code>sdp_anynet</code>
<td>Parser accepts unknown network or address types,
</tr>
</table>
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_parse()</code> returns a handle to a
<code>sdp_parser</code> object.
</blockquote>
<a name="sdp_session"></a>
<h3>Function <code>sdp_session()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>sdp_session_t *sdp_session(sdp_parser);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function returns a pointer to an <a href="#sdp_session_t">SDP session
structure</a>. The pointer and all the data in the structure are valid until
<a href="#sdp_free_parser"><code>sdp_free_parser()</code></a> is called.
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_session()</code> returns a pointer to an parsed SDP
message or <code>NULL</code>, if an error has occurred.
</blockquote>
<a name="sdp_parsing_error"></a>
<h3>Function <code>sdp_parsing_error()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>char const *sdp_parsing_error(sdp_parser);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function returns a C string describing the parsing errors, if any.
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_parsing_error()</code> returns a pointer to C string
describing parsing errors, or <code>NULL</code> if no parsing errors were
encountered.
</blockquote>
<a name="sdp_free_parser"></a>
<h3>Function <code>sdp_free_parser()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>void sdp_free_parser(sdp_parser object);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function frees the parsing <var>object</var>, the buffers and the SDP
session structure associated with it.
</blockquote>
<h1>Printing Functions</h1>
<p>Typically, the SDP printer is used as follows:
<blockquote>
<table border=1 cellspacing=0><tr><td>
<pre>#include &lt;sdp.h&gt;
...
char buffer[512];
sdp_printer printer = sdp_print(session, buffer, sizeof(buffer), 0);
if (!sdp_parsing_error(printer)) {
char const *msg = sdp_message(printer);
int msgsize = sdp_msgsize(printer);
...</pre>
<div align=center><i>send the session description</i></div>
<pre>
...
}
else {
show_critical_error(sdp_printing_error(printer));
}
sdp_free_printer(printer);
...
</pre>
</tr></table>
</blockquote>
<a name="sdp_print"></a>
<h3>Function <code>sdp_print()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>#include &lt;sdp.h&gt;
sdp_printer sdp_print(sdp_session_t *session,
char msgbuf[], int maxmsgsize, int flags);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function prints the contents of the SDP session structure to the
<var>msgbuf</var>. The <var>msgbuf</var> buffer has size
<var>maxmsgsize</var> bytes. If <var>msgbuf</var> is <code>NULL</code>, the
<code>sdp_print()</code> function allocates the required buffer from the
heap.
<p>
The <var>flags</var> specify printing options as follows: </p>
<a name="sdp_parse_flags_e"></a>
<div align=center>
<i>Table 2. The flags for sdp_print().</i></div>
<p>
<table width="95%" cellspacing=0 cellpadding=3 border=1>
<tr>
<th>Field
<th width="70%">Description
</tr>
<tr>
<td valign=top><code>sdp_strict</code>
<td>Printer should only emit messages conforming strictly to the
specification.
</tr>
<tr>
<td valign=top><code>sdp_realloc</code>
<td>If the <var>msgbuf</var> is too small for the resulting SDP message,
<code>sdp_print()</code> may allocate a new buffer for it from the
heap.
</tr>
</table>
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_print()</code> returns a handle to
<code>sdp_printer</code> object.
</blockquote>
<a name="sdp_message"></a>
<h3>Function <code>sdp_message()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>char const *sdp_message(sdp_printer object);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function returns a pointer to a C string containing the SDP message.
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_message()</code> returns a pointer to a C string
containing the emitted SDP message, or <code>NULL</code> upon an error.
</blockquote>
<a name="sdp_msgsize"></a>
<h3>Function <code>sdp_msgsize()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>int sdp_msgsize(sdp_printer object);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function returns the size of the emitted SDP message
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_msgsize()</code> returns ... or <code>NULL</code> upon an error.
</blockquote>
<a name="sdp_printing_error"></a>
<h3>Function <code>sdp_printing_error()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>char const *sdp_printing_error(sdp_printer object);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function returns the error message, if any.
</blockquote>
<h4>Return Value</h4>
<blockquote>
The function <code>sdp_printing_error()</code> returns a pointer to C string
descibing printing errors, or <code>NULL</code> if no error were
encountered.
</blockquote>
<a name="sdp_free_printer"></a>
<h3>Function <code>sdp_free_printer()</code></h3>
<h4>Synopsis</h4>
<blockquote>
<pre>void sdp_free_printer(sdp_printer object);</pre>
</blockquote>
<h4>Description</h4>
<blockquote>
This function frees the printing <var>object</var> and the message buffer
possibly associated with it.
</blockquote>
<h2>Data Types and Structures</h2>
<h2>Errata</h2>
<p>
The following errors in SDP specification
[<a href="ftp://ftp.funet.fi/rfc/rfc2327.txt">RFC2327</a>] are fixed in
<code>sdp</code>:</p>
<ul>
<li><p><code>"z="</code> was omitted from zone-adjustments,
<li><p>protocol on <var>media-field</var> is restricted to
<var>alpha-numeric</var> but the included example (<code>RTP/AVP</code>)
contains also "/",
<li><p><var>bwtype</var> is restricted to <var>alpha-numeric</var>, but
the RFC text discusses extensions like <code>b=x-y:100</code>, and
<li><p><var>att-field</var> is restricted to <var>alpha-numeric</var>, but
the RFC text discusses extensions like <code>a=x-nokia-foo</code>.
</ul>
<hr>
<small>$Id: sdp.html,v 1.1.1.1 2005/07/20 20:35:36 kaiv Exp $</small>
<hr>
<a href="mailto:Pekka.Pessi@nokia.com"><address
>Pekka.Pessi@nokia.com</address></a><div>
<!-- hhmts start -->
This document was updated Wed Mar 1 14:38:45 2000.<!-- hhmts end -->
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment