Loading...
Searching...
No Matches
sres_async.h
Go to the documentation of this file.
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SOFIA_RESOLV_SRES_ASYNC_H
#define SOFIA_RESOLV_SRES_ASYNC_H
#include "sofia-resolv/sres_config.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef SRES_ASYNC_T
#define SRES_ASYNC_T struct sres_async_s
#endif
typedef SRES_ASYNC_T sres_async_t;
typedef int sres_update_f(sres_async_t *async,
sres_socket_t new_socket,
sres_socket_t old_socket);
SRESPUBFUN
sres_async_t *sres_resolver_set_async(sres_resolver_t *res,
sres_update_f *update,
sres_async_t *async,
int update_all);
SRESPUBFUN
sres_async_t *sres_resolver_get_async(sres_resolver_t const *res,
sres_update_f *update);
SRESPUBFUN int sres_resolver_sockets(sres_resolver_t *,
sres_socket_t *sockets,
int n);
SRESPUBFUN void sres_resolver_timer(sres_resolver_t *, int dummy);
typedef int sres_schedule_f(sres_async_t *async, unsigned long interval);
SRESPUBFUN int sres_resolver_set_timer_cb(sres_resolver_t *res,
sres_schedule_f *callback,
sres_async_t *async);
SRESPUBFUN int sres_resolver_receive(sres_resolver_t *, int socket);
SRESPUBFUN int sres_resolver_error(sres_resolver_t *, int socket);
#ifdef __cplusplus
}
#endif
#endif /* SOFIA_RESOLV_SRES_ASYNC_H */
sres_resolver_t
struct sres_resolver_s sres_resolver_t
Opaque type of DNS resolver object.
Definition sres.h:95
sres_update_f
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 sres_async_t
Application-defined type for context used by asynchronous operation.
Definition sres_async.h:57
sres_resolver_set_timer_cb
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
sres_resolver_timer
SRESPUBFUN void sres_resolver_timer(sres_resolver_t *, int dummy)
Resolver timer function.
Definition sres.c:2995
sres_resolver_receive
SRESPUBFUN int sres_resolver_receive(sres_resolver_t *, int socket)
Receive DNS response from socket.
Definition sres.c:3447
sres_resolver_sockets
SRESPUBFUN int sres_resolver_sockets(sres_resolver_t *, sres_socket_t *sockets, int n)
Create sockets for resolver.
Definition sres.c:3185
sres_resolver_error
SRESPUBFUN int sres_resolver_error(sres_resolver_t *, int socket)
Receive error message from socket.
Definition sres.c:3362
sres_resolver_get_async
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
sres_schedule_f
int sres_schedule_f(sres_async_t *async, unsigned long interval)
Prototype for scheduler function.
Definition sres_async.h:106
sres_resolver_set_async
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
sres_config.h
Configuration for Sofia DNS Resolver.
sres_socket_t
int sres_socket_t
Socket descriptor.
Definition sres_config.h:74
SRESPUBFUN
#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.