comparison src/dnssrv.h @ 12686:5f65a0cca87c

[gaim-migrate @ 15029] Clean up the STUN / SRV API a bit. I don't use this stuff, so there was no testing beyond compiling it. I think it's right, though I couldn't find where the STUN discovery status was ever set to 1 (discovering). Anyone know something about that? committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 03 Jan 2006 00:23:24 +0000
parents 9563b768e8e2
children
comparison
equal deleted inserted replaced
12685:e9f279f0ef02 12686:5f65a0cca87c
21 */ 21 */
22 22
23 #ifndef _GAIM_DNSSRV_H 23 #ifndef _GAIM_DNSSRV_H
24 #define _GAIM_DNSSRV_H 24 #define _GAIM_DNSSRV_H
25 25
26 struct srv_response { 26 typedef struct _GaimSrvResponse GaimSrvResponse;
27
28 struct _GaimSrvResponse {
27 char hostname[256]; 29 char hostname[256];
28 int port; 30 int port;
29 int weight; 31 int weight;
30 int pref; 32 int pref;
31 }; 33 };
32 34
33 typedef void (*SRVCallback)(struct srv_response *resp, int results, gpointer data); 35 typedef void (*GaimSRVCallback)(GaimSrvResponse *resp, int results, gpointer data);
34 36
35 /** 37 /**
36 * Queries an SRV record. 38 * Queries an SRV record.
37 * 39 *
38 * @param protocol Name of the protocol (e.g. "sip") 40 * @param protocol Name of the protocol (e.g. "sip")
39 * @param transport Name of the transport ("tcp" or "udp") 41 * @param transport Name of the transport ("tcp" or "udp")
40 * @param domain Domainname to query (e.g. "blubb.com") 42 * @param domain Domainname to query (e.g. "blubb.com")
41 * @param cb A callback which will be called with the results 43 * @param cb A callback which will be called with the results
42 * @param extradata Extra data to be passed to the callback 44 * @param extradata Extra data to be passed to the callback
43 */ 45 */
44 void gaim_srv_resolve(const char *protocol, const char *transport, const char *domain, SRVCallback cb, gpointer extradata); 46 void gaim_srv_resolve(const char *protocol, const char *transport, const char *domain, GaimSRVCallback cb, gpointer extradata);
45 47
46 #endif /* _GAIM_DNSSRV_H */ 48 #endif /* _GAIM_DNSSRV_H */