sresolv  1.12.11devel
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sres_cache.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_CACHE_H
26 
27 #define SOFIA_RESOLV_SRES_CACHE_H
28 
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #ifndef SRES_CACHE_T
50 #define SRES_CACHE_T
51 
52 typedef struct sres_cache sres_cache_t;
53 #endif
54 
55 #ifndef SRES_RECORD_T
56 #define SRES_RECORD_T
57 
58 typedef union sres_record sres_record_t;
59 #endif
60 
61 enum {
64 #define SRES_CACHE_TIMER_INTERVAL (SRES_CACHE_TIMER_INTERVAL)
65 };
66 
69 
72 
75 
78  uint16_t type,
79  char const *domain,
80  sres_record_t ***return_cached);
81 
84  sres_record_t **answers,
85  uint16_t type);
86 
89 
92 
96 
98 SRESPUBFUN void sres_cache_clean(sres_cache_t *cache, time_t now);
99 
103  sres_record_t const *template,
104  size_t extra);
105 
107 SRESPUBFUN void sres_cache_free_record(sres_cache_t *cache, void *rr);
108 
111 
114  char const *domain,
115  char const *target,
116  uint16_t port,
117  uint32_t newttl,
118  uint16_t newprio);
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* SOFIA_RESOLV_SRES_CACHED_H */

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