Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SOFIA_SIP_SRES_SIP_H
00026
00027 #define SOFIA_SIP_SRES_SIP_H
00028
00035 #ifndef SU_TYPES_H
00036 #include <sofia-sip/su_types.h>
00037 #endif
00038
00039 #ifndef SU_ADDRINFO_H
00040 #include <sofia-sip/su_addrinfo.h>
00041 #endif
00042
00043 #ifndef URL_H
00044 #include <sofia-sip/url.h>
00045 #endif
00046
00047 #ifndef SOFIA_RESOLV_SRES_H
00048 #include <sofia-resolv/sres.h>
00049 #endif
00050
00051 SOFIA_BEGIN_DECLS
00052
00053 typedef struct sres_sip_s sres_sip_t;
00054
00055 #ifndef SRES_SIP_MAGIC_T
00056
00060 #define SRES_SIP_MAGIC_T struct sres_sip_magic_s
00061 #endif
00062
00064 typedef SRES_SIP_MAGIC_T sres_sip_magic_t;
00065
00066 typedef void sres_sip_notify_f(sres_sip_magic_t *context,
00067 sres_sip_t *resolver,
00068 int error);
00069
00070 SOFIAPUBFUN sres_sip_t *sres_sip_new(
00071 sres_resolver_t *sres,
00072 url_string_t const *url,
00073 su_addrinfo_t const *hints,
00074 int naptr, int srv,
00075 sres_sip_notify_f *callback,
00076 sres_sip_magic_t *magic);
00077
00078 SOFIAPUBFUN sres_sip_t *sres_sip_ref(sres_sip_t *);
00079 SOFIAPUBFUN void sres_sip_unref(sres_sip_t *);
00080
00081 SOFIAPUBFUN su_addrinfo_t const *sres_sip_results(sres_sip_t *);
00082
00083 SOFIAPUBFUN su_addrinfo_t const *sres_sip_next(sres_sip_t *);
00084
00085 SOFIAPUBFUN int sres_sip_next_step(sres_sip_t *nr);
00086
00087 SOFIAPUBFUN int sres_sip_error(sres_sip_t *nr);
00088
00089
00090 enum {
00091 SRES_SIP_ERR_FAULT = -1,
00092 SRES_SIP_ERR_BAD_URI = -2,
00093 SRES_SIP_ERR_BAD_HINTS = -3,
00094 SRES_SIP_ERR_NO_NAME = -4,
00095 SRES_SIP_ERR_NO_DATA = -5,
00096 SRES_SIP_ERR_NO_TPORT = -6,
00097 SRES_SIP_ERR_FAIL = -7,
00098 SRES_SIP_ERR_AGAIN = -8,
00099 SRES_SIP_ERR_INTERNAL = -9,
00100 _SRES_SIP_ERR_LAST
00101 };
00102
00103
00104 enum {
00105 TPPROTO_TCP = 6,
00106 TPPROTO_UDP = 17,
00107 TPPROTO_SCTP = 132,
00108 TPPROTO_SECURE = 256,
00109 TPPROTO_TLS = TPPROTO_SECURE | TPPROTO_TCP,
00110 TPPROTO_NONE = 0
00111 };
00112
00113 #define TPPROTO_TCP TPPROTO_TCP
00114 #define TPPROTO_UDP TPPROTO_UDP
00115 #define TPPROTO_SCTP TPPROTO_SCTP
00116 #define TPPROTO_TLS TPPROTO_TLS
00117 #define TPPROTO_NONE TPPROTO_NONE
00118
00119 SOFIA_END_DECLS
00120
00121 #endif