Mercurial > pidgin.yaz
comparison src/protocols/bonjour/dns_sd.h @ 11539:5a2c38d33eb4
[gaim-migrate @ 13794]
Formatting and whitespace
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 14 Sep 2005 02:58:30 +0000 |
parents | 3f038da50a18 |
children | 0d9c6d2ad64b |
comparison
equal
deleted
inserted
replaced
11538:5c6c2e893803 | 11539:5a2c38d33eb4 |
---|---|
11 * | 11 * |
12 * You should have received a copy of the GNU General Public License | 12 * You should have received a copy of the GNU General Public License |
13 * along with this program; if not, write to the Free Software | 13 * along with this program; if not, write to the Free Software |
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
15 */ | 15 */ |
16 | 16 |
17 #ifndef _BONJOUR_DNS_SD | 17 #ifndef _BONJOUR_DNS_SD |
18 #define _BONJOUR_DNS_SD | 18 #define _BONJOUR_DNS_SD |
19 | 19 |
20 #include <howl.h> | 20 #include <howl.h> |
21 #include <glib.h> | 21 #include <glib.h> |
22 #include "account.h" | 22 #include "account.h" |
23 | 23 |
24 #define BONJOUR_DEFAULT_PORT "5298" | 24 #define BONJOUR_DEFAULT_PORT "5298" |
25 #define BONJOUR_DEFAULT_PORT_INT 5298 | 25 #define BONJOUR_DEFAULT_PORT_INT 5298 |
26 #define ICHAT_SERVICE "_presence._tcp." | 26 #define ICHAT_SERVICE "_presence._tcp." |
27 | 27 |
28 /** | 28 /** |
29 * Data to be used by the dns-sd connection. | 29 * Data to be used by the dns-sd connection. |
30 */ | 30 */ |
31 typedef struct _bonjour_dns_sd{ | 31 typedef struct _BonjourDnsSd |
32 sw_discovery* session; | 32 { |
33 sw_discovery *session; | |
33 sw_discovery_oid session_id; | 34 sw_discovery_oid session_id; |
34 GaimAccount* account; | 35 GaimAccount *account; |
35 gchar* name; | 36 gchar *name; |
36 gchar* txtvers; | 37 gchar *txtvers; |
37 gchar* version; | 38 gchar *version; |
38 gchar* first; | 39 gchar *first; |
39 gchar* last; | 40 gchar *last; |
40 gint port_p2pj; | 41 gint port_p2pj; |
41 gchar* phsh; | 42 gchar *phsh; |
42 gchar* status; | 43 gchar *status; |
43 gchar* email; | 44 gchar *email; |
44 gchar* vc; | 45 gchar *vc; |
45 gchar* jid; | 46 gchar *jid; |
46 gchar* AIM; | 47 gchar *AIM; |
47 gchar* msg; | 48 gchar *msg; |
48 GHashTable* buddies; | 49 GHashTable *buddies; |
49 }BonjourDnsSd; | 50 } BonjourDnsSd; |
50 | 51 |
51 typedef enum _PublishType{ | 52 typedef enum _PublishType { |
52 PUBLISH_START, | 53 PUBLISH_START, |
53 PUBLISH_UPDATE | 54 PUBLISH_UPDATE |
54 }PublishType; | 55 } PublishType; |
55 | 56 |
56 /** | 57 /** |
57 * Allocate space for the dns-sd data. | 58 * Allocate space for the dns-sd data. |
58 */ | 59 */ |
59 BonjourDnsSd* bonjour_dns_sd_new(); | 60 BonjourDnsSd *bonjour_dns_sd_new(); |
60 | 61 |
61 /** | 62 /** |
62 * Deallocate the space of the dns-sd data. | 63 * Deallocate the space of the dns-sd data. |
63 */ | 64 */ |
64 void bonjour_dns_sd_free(BonjourDnsSd* data); | 65 void bonjour_dns_sd_free(BonjourDnsSd *data); |
65 | 66 |
66 /** | 67 /** |
67 * Send a new dns-sd packet updating our status. | 68 * Send a new dns-sd packet updating our status. |
68 */ | 69 */ |
69 void bonjour_dns_sd_send_status(BonjourDnsSd *data, const char *status, const char *status_message); | 70 void bonjour_dns_sd_send_status(BonjourDnsSd *data, const char *status, const char *status_message); |
70 | 71 |
71 /** | 72 /** |
72 * Advertise our presence within the dns-sd daemon and start browsing for other | 73 * Advertise our presence within the dns-sd daemon and start |
73 * bonjour peers. | 74 * browsing for other bonjour peers. |
74 */ | 75 */ |
75 void bonjour_dns_sd_start(BonjourDnsSd* data); | 76 void bonjour_dns_sd_start(BonjourDnsSd *data); |
76 | 77 |
77 /** | 78 /** |
78 * Unregister the "_presence._tcp" service at the mDNS daemon. | 79 * Unregister the "_presence._tcp" service at the mDNS daemon. |
79 */ | 80 */ |
80 int bonjour_dns_sd_stop(BonjourDnsSd* data); | 81 int bonjour_dns_sd_stop(BonjourDnsSd *data); |
81 | 82 |
82 #endif | 83 #endif |