sofia-resolv/sres_async.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef SOFIA_RESOLV_SRES_ASYNC_H
00026 
00027 #define SOFIA_RESOLV_SRES_ASYNC_H
00028 
00047 #include "sofia-resolv/sres_config.h"
00048 
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052 
00053 #ifndef SRES_ASYNC_T 
00054 #define SRES_ASYNC_T struct sres_async_s
00055 #endif
00056 
00057 typedef SRES_ASYNC_T sres_async_t;
00058 
00072 typedef int sres_update_f(sres_async_t *async,
00073                           sres_socket_t new_socket,
00074                           sres_socket_t old_socket);
00075 
00077 SRESPUBFUN
00078 sres_async_t *sres_resolver_set_async(sres_resolver_t *res, 
00079                                       sres_update_f *update,
00080                                       sres_async_t *async,
00081                                       int update_all);
00082 
00084 SRESPUBFUN
00085 sres_async_t *sres_resolver_get_async(sres_resolver_t const *res,
00086                                       sres_update_f *update);
00087 
00089 SRESPUBFUN int sres_resolver_sockets(sres_resolver_t *, 
00090                                      sres_socket_t *sockets,
00091                                      int n);
00092 
00094 SRESPUBFUN void sres_resolver_timer(sres_resolver_t *, int dummy);
00095 
00106  typedef int sres_schedule_f(sres_async_t *async, unsigned long interval);
00107 
00109 SRESPUBFUN int sres_resolver_set_timer_cb(sres_resolver_t *res,
00110                                           sres_schedule_f *callback,
00111                                           sres_async_t *async);
00112 
00114 SRESPUBFUN int sres_resolver_receive(sres_resolver_t *, int socket);
00115 
00117 SRESPUBFUN int sres_resolver_error(sres_resolver_t *, int socket);
00118 
00119 #ifdef __cplusplus
00120 }
00121 #endif
00122 
00123 #endif /* SOFIA_RESOLV_SRES_ASYNC_H */

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