Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > b5fdf68d1ef6711be4a04d1550358feb > files > 72

libopendkim-devel-2.4.2-5.fc14.x86_64.rpm

<html>
<head><title>dkim_set_dns_callback()</title></head>
<body>
<!--
$Id: dkim_set_dns_callback.html,v 1.3 2010/07/24 04:52:15 cm-msk Exp $
-->
<h1>dkim_set_dns_callback()</h1>
<p align="right"><a href="index.html">[back to index]</a></p>

<table border="0" cellspacing=4 cellpadding=4>
<!---------- Synopsis ----------->
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
<pre>
#include &lt;dkim.h&gt;
<a href="dkim_stat.html"><tt>DKIM_STAT</tt></a> dkim_set_dns_callback(
	<a href="dkim_lib.html"><tt>DKIM_LIB</tt></a> *libopendkim,
        void (*func)(const void *context),
        unsigned int interval);
);
</pre>
Define a function which should be called from time to time while waiting
for a DNS response to become available.  This is particularly meant for
use when libopendkim is being used by an application which is timeout-sensitive
where a heartbeat ("still alive, operation in progress") message is
desirable. <p>

When defined, the specified function will be called at the specified interval
even if the DNS response has not yet arrived, using the caller-specific
context pointer set by the
<a href="dkim_set_user_context.html"><tt>dkim_set_user_context()</tt></a>
function (if any) as the parameter to that function.
</td></tr>

<!----------- Description ---------->
<tr><th valign="top" align=left>DESCRIPTION</th><td>
<table border="1" cellspacing=1 cellpadding=4>
<tr align="left" valign=top>
<th width="80">Called When</th>
<td><tt>dkim_set_dns_callback()</tt> can called at any time.  </td>
</tr>
</table>

<!----------- Arguments ---------->
<tr><th valign="top" align=left>ARGUMENTS</th><td>
    <table border="1" cellspacing=0>
    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
    <tr valign="top"><td>libopendkim</td>
	<td>Library-specific handle, returned by
        <a href="dkim_init.html"><tt>dkim_init()</tt></a>.
	</td></tr>
    <tr valign="top"><td>func</td>
	<td>A pointer to a function which takes a single void pointer
        which should be called at the requested interval while waiting
        for a DNS reply.  If NULL, no callback will be used.
	</td></tr>
    <tr valign="top"><td>interval</td>
	<td>Desired interval, in seconds, between calls to <tt>func</tt>.
	</td></tr>
    </table>
</td></tr>

<!----------- Return Values ---------->
<tr>
<th valign="top" align=left>RETURN VALUES</th> 
<td>
<ul>
<li>DKIM_STAT_OK -- the callback and interval were successfully registered
<li>DKIM_STAT_NOTIMPLEMENT -- the underlying DNS resolution service does not
    provide a callback facility
</ul>
</td>
</tr>
</table>

<hr size="1">
<font size="-1">
Copyright (c) 2007 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
Copyright (c) 2009, 2010, The OpenDKIM Project.  All rights reserved.

<br>
By using this file, you agree to the terms and conditions set
forth in the respective licenses.
</font>
</body>
</html>