comparison libpurple/protocols/bonjour/mdns_types.h @ 18798:ed1def07d86e

Refactor the bonjour mdns implementation abstraction in preparation for the avahi implementation. Also fix alias assignment from the server to populate the server alias instead of the local alias.
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 05 Aug 2007 02:44:53 +0000
parents a8aa651f341f
children 44b4e8bd759b
comparison
equal deleted inserted replaced
18796:95fe5195bf98 18798:ed1def07d86e
17 #ifndef _BONJOUR_MDNS_TYPES 17 #ifndef _BONJOUR_MDNS_TYPES
18 #define _BONJOUR_MDNS_TYPES 18 #define _BONJOUR_MDNS_TYPES
19 19
20 #include <glib.h> 20 #include <glib.h>
21 #include "account.h" 21 #include "account.h"
22 #include "config.h"
23
24 #ifdef USE_BONJOUR_APPLE
25 #include "dns_sd_proxy.h"
26 #else /* USE_BONJOUR_HOWL */
27 #include <howl.h>
28 #endif
29 22
30 #define ICHAT_SERVICE "_presence._tcp." 23 #define ICHAT_SERVICE "_presence._tcp."
31 24
32 /** 25 /**
33 * Data to be used by the dns-sd connection. 26 * Data to be used by the dns-sd connection.
34 */ 27 */
35 typedef struct _BonjourDnsSd 28 typedef struct _BonjourDnsSd {
36 { 29 gpointer mdns_impl_data;
37 #ifdef USE_BONJOUR_APPLE
38 DNSServiceRef advertisement;
39 DNSServiceRef browser;
40
41 int advertisement_handler; /* hack... windows bonjour is broken, so we have to have this */
42 #else /* USE_BONJOUR_HOWL */
43 sw_discovery session;
44 sw_discovery_oid session_id;
45 #endif
46
47 PurpleAccount *account; 30 PurpleAccount *account;
48 gchar *first; 31 gchar *first;
49 gchar *last; 32 gchar *last;
50 gint port_p2pj; 33 gint port_p2pj;
51 gchar *phsh; 34 gchar *phsh;
57 typedef enum _PublishType { 40 typedef enum _PublishType {
58 PUBLISH_START, 41 PUBLISH_START,
59 PUBLISH_UPDATE 42 PUBLISH_UPDATE
60 } PublishType; 43 } PublishType;
61 44
62
63 #endif 45 #endif