| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html><head> |
| 3 |
<title>liboop: oop_www_register(), oop_www_cancel(), oop_www_memory()</title> |
| 4 |
<link rel="stylesheet" type="text/css" href="style.css"> |
| 5 |
</head><body> |
| 6 |
|
| 7 |
<h2>oop_www_register(), oop_www_cancel(), oop_www_memory()</h2> |
| 8 |
|
| 9 |
<pre> |
| 10 |
#include <oop.h> |
| 11 |
#include <HTEvent.h> |
| 12 |
#include <oop-www.h> |
| 13 |
|
| 14 |
void oop_www_register(oop_source *source); |
| 15 |
void oop_www_cancel(); |
| 16 |
void oop_www_memory(); |
| 17 |
</pre> |
| 18 |
|
| 19 |
<h3>Arguments.</h3> |
| 20 |
|
| 21 |
<dl> |
| 22 |
<dt><b>oop_source *source</b> |
| 23 |
<dd>The event source to use. The adapter will use this event source to wait |
| 24 |
asynchronously for network communication.<p> |
| 25 |
</dl> |
| 26 |
|
| 27 |
<h3>Description.</h3> |
| 28 |
|
| 29 |
<dl> |
| 30 |
<dt><b>oop_www_register</b> |
| 31 |
<dd>Register a liboop <em>source</em> with the |
| 32 |
<a href="http://www.w3.org/Library/">W3C Protocol Library</a> (libwww). |
| 33 |
The adapter acts as an event manager for the libwww |
| 34 |
<a href="http://www.w3.org/Library/src/HTEvent.html">HTEvent module</a>, |
| 35 |
replacing the |
| 36 |
<a href="http://www.w3.org/Library/src/HTEvtLst.html">default event |
| 37 |
manager</a>; it relies on the supplied source for actual event handling. |
| 38 |
Refer to the libwww documentation for the details of its event architecture.<p> |
| 39 |
|
| 40 |
<dt><b>oop_www_cancel</b> |
| 41 |
<dd>Unregister liboop with libwww. This frees resources associated with the |
| 42 |
adapter, and leaves libwww with no event manager. You may use |
| 43 |
<b>HTEventInit</b> in the |
| 44 |
<a href="http://www.w3.org/Library/src/HTInit.html">HTInit module</a> to |
| 45 |
reinstate the libwww default event manager. The adapter can have no active |
| 46 |
events when it is deleted. (Take care; libwww tends to cache persistent |
| 47 |
connections to Web servers, which may cause events to be registered even if |
| 48 |
there are no open requests.)<p> |
| 49 |
|
| 50 |
<dt><b>oop_www_memory</b> |
| 51 |
<dd>Set <a href="alloc.html">oop_malloc, oop_realloc, and oop_free</a> to |
| 52 |
<a href="http://www.w3.org/Library/src/HTMemory.html">HTMemory_malloc |
| 53 |
and HTMemory_free</a>, respectively. You do not need to do this, but it |
| 54 |
may help to keep your memory allocations consistent with the libwww |
| 55 |
framework. If you do this, do so before calling any other liboop functions. |
| 56 |
</dl> |
| 57 |
|
| 58 |
<hr><a href="ref.html">liboop reference</a></body></html> |