Blame | Last modification | View Log | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>liboop: oop_www_register(), oop_www_cancel(), oop_www_memory()</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head><body>
<h2>oop_www_register(), oop_www_cancel(), oop_www_memory()</h2>
<pre>
#include <oop.h>
#include <HTEvent.h>
#include <oop-www.h>
void oop_www_register(oop_source *source);
void oop_www_cancel();
void oop_www_memory();
</pre>
<h3>Arguments.</h3>
<dl>
<dt><b>oop_source *source</b>
<dd>The event source to use. The adapter will use this event source to wait
asynchronously for network communication.<p>
</dl>
<h3>Description.</h3>
<dl>
<dt><b>oop_www_register</b>
<dd>Register a liboop <em>source</em> with the
<a href="http://www.w3.org/Library/">W3C Protocol Library</a> (libwww).
The adapter acts as an event manager for the libwww
<a href="http://www.w3.org/Library/src/HTEvent.html">HTEvent module</a>,
replacing the
<a href="http://www.w3.org/Library/src/HTEvtLst.html">default event
manager</a>; it relies on the supplied source for actual event handling.
Refer to the libwww documentation for the details of its event architecture.<p>
<dt><b>oop_www_cancel</b>
<dd>Unregister liboop with libwww. This frees resources associated with the
adapter, and leaves libwww with no event manager. You may use
<b>HTEventInit</b> in the
<a href="http://www.w3.org/Library/src/HTInit.html">HTInit module</a> to
reinstate the libwww default event manager. The adapter can have no active
events when it is deleted. (Take care; libwww tends to cache persistent
connections to Web servers, which may cause events to be registered even if
there are no open requests.)<p>
<dt><b>oop_www_memory</b>
<dd>Set <a href="alloc">oop_malloc, oop_realloc, and oop_free</a> to
<a href="http://www.w3.org/Library/src/HTMemory.html">HTMemory_malloc
and HTMemory_free</a>, respectively. You do not need to do this, but it
may help to keep your memory allocations consistent with the libwww
framework. If you do this, do so before calling any other liboop functions.
</dl>
<hr><a href="ref">liboop reference</a></body></html>