sresolv 1.12.11devel
Loading...
Searching...
No Matches
sres_async.h
Go to the documentation of this file.
1/*
2 * This file is part of the Sofia-SIP package
3 *
4 * Copyright (C) 2005 Nokia Corporation.
5 *
6 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef SOFIA_RESOLV_SRES_ASYNC_H
27#define SOFIA_RESOLV_SRES_ASYNC_H
28
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53#ifndef SRES_ASYNC_T
54#define SRES_ASYNC_T struct sres_async_s
55#endif
57typedef SRES_ASYNC_T sres_async_t;
58
72typedef int sres_update_f(sres_async_t *async,
73 sres_socket_t new_socket,
74 sres_socket_t old_socket);
75
79 sres_update_f *update,
80 sres_async_t *async,
81 int update_all);
82
86 sres_update_f *update);
87
90 sres_socket_t *sockets,
91 int n);
92
95
106 typedef int sres_schedule_f(sres_async_t *async, unsigned long interval);
107
110 sres_schedule_f *callback,
111 sres_async_t *async);
112
115
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif /* SOFIA_RESOLV_SRES_ASYNC_H */
struct sres_resolver_s sres_resolver_t
Opaque type of DNS resolver object.
Definition sres.h:95
int sres_update_f(sres_async_t *async, sres_socket_t new_socket, sres_socket_t old_socket)
Prototype for update function.
Definition sres_async.h:72
SRES_ASYNC_T sres_async_t
Application-defined type for context used by asynchronous operation.
Definition sres_async.h:57
SRESPUBFUN int sres_resolver_set_timer_cb(sres_resolver_t *res, sres_schedule_f *callback, sres_async_t *async)
Register resolver timer callback.
Definition sres.c:899
SRESPUBFUN void sres_resolver_timer(sres_resolver_t *, int dummy)
Resolver timer function.
Definition sres.c:2995
SRESPUBFUN int sres_resolver_receive(sres_resolver_t *, int socket)
Receive DNS response from socket.
Definition sres.c:3447
SRESPUBFUN int sres_resolver_sockets(sres_resolver_t *, sres_socket_t *sockets, int n)
Create sockets for resolver.
Definition sres.c:3185
SRESPUBFUN int sres_resolver_error(sres_resolver_t *, int socket)
Receive error message from socket.
Definition sres.c:3362
SRESPUBFUN sres_async_t * sres_resolver_get_async(sres_resolver_t const *res, sres_update_f *update)
Get async operation data.
Definition sres.c:885
int sres_schedule_f(sres_async_t *async, unsigned long interval)
Prototype for scheduler function.
Definition sres_async.h:106
SRESPUBFUN sres_async_t * sres_resolver_set_async(sres_resolver_t *res, sres_update_f *update, sres_async_t *async, int update_all)
Set asynchronous operation data.
Definition sres.c:865
Configuration for Sofia DNS Resolver.
int sres_socket_t
Socket descriptor.
Definition sres_config.h:74
#define SRESPUBFUN
SRESPUBFUN declares an exported function.
Definition sres_config.h:41

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.