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_adns_new(), oop_adns_delete()</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head><body>
<h2>oop_adns_new(), oop_adns_delete()</h2>
<pre>
#include <oop.h>
#include <adns.h>
#include <oop-adns.h>
oop_adapter_adns *oop_adns_new(oop_source *source,adns_initflags flags,FILE *diag);
void oop_adns_delete(oop_adapter_adns *adapter);
</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>
<dt><b>adns_initflags flags</b>
<dd>Any initialization flags used to create the instance of adns. Refer to the
adns documentation for details.<p>
<dt><b>FILE *diag</b>
<dd>The file to send adns diagnostics to. Refer to the adns documentation for
details.<p>
<dt><b>oop_adapter_adns *adapter</b>
<dd>An adns adapter to delete, with no outstanding
<a href="oop_adns_query">queries</a>.<p>
</dl>
<h3>Description.</h3>
<dl>
<dt><b>oop_adns_new</b>
<dd>Create a new liboop adns adapter. This adapter manages an instance of
<a href="http://www.chiark.greenend.org.uk/~ian/adns/">Ian Jackson's
asychronous DNS resolver</a> and supplies it with events from <em>source</em>.
The adns instance is initialized with the supplied <em>flags</em> and
<em>diag</em> file; refer to the adns documentation for details.<p>
If a malloc failure or other catastrophic system error occurs creating the
adapter, NULL is returned. The caller must handle this failure.<p>
<dt><b>oop_adns_delete</b>
<dd>Destroy the liboop adns adapter <em>adns</em>. This frees all resources
associated with the adapter, including the underlying adns instance. Any
callbacks registered with the event source are cancelled. The adapter can have
no active queries when it is deleted.<p>
</dl>
<hr><a href="ref">liboop reference</a></body></html>