Mercurial > pidgin
annotate src/protocols/bonjour/dns_sd.h @ 13936:669898e6aa11
[gaim-migrate @ 16467]
Minor enhancements for the combobox.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 09 Jul 2006 00:54:31 +0000 |
parents | 8264f52a1142 |
children |
rev | line source |
---|---|
11477 | 1 /* |
2 * This program is free software; you can redistribute it and/or modify | |
3 * it under the terms of the GNU General Public License as published by | |
4 * the Free Software Foundation; either version 2 of the License, or | |
5 * (at your option) any later version. | |
6 * | |
7 * This program is distributed in the hope that it will be useful, | |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 * GNU Library General Public License for more details. | |
11 * | |
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 | |
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
15 */ | |
11539 | 16 |
11477 | 17 #ifndef _BONJOUR_DNS_SD |
18 #define _BONJOUR_DNS_SD | |
19 | |
20 #include <howl.h> | |
21 #include <glib.h> | |
22 #include "account.h" | |
11539 | 23 |
11477 | 24 #define ICHAT_SERVICE "_presence._tcp." |
25 | |
26 /** | |
27 * Data to be used by the dns-sd connection. | |
28 */ | |
11539 | 29 typedef struct _BonjourDnsSd |
30 { | |
12104 | 31 sw_discovery session; |
11477 | 32 sw_discovery_oid session_id; |
11539 | 33 GaimAccount *account; |
34 gchar *name; | |
35 gchar *txtvers; | |
36 gchar *version; | |
37 gchar *first; | |
38 gchar *last; | |
11477 | 39 gint port_p2pj; |
11539 | 40 gchar *phsh; |
41 gchar *status; | |
42 gchar *email; | |
43 gchar *vc; | |
44 gchar *jid; | |
45 gchar *AIM; | |
46 gchar *msg; | |
47 GHashTable *buddies; | |
48 } BonjourDnsSd; | |
11477 | 49 |
11539 | 50 typedef enum _PublishType { |
11477 | 51 PUBLISH_START, |
52 PUBLISH_UPDATE | |
11539 | 53 } PublishType; |
11477 | 54 |
55 /** | |
56 * Allocate space for the dns-sd data. | |
57 */ | |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12104
diff
changeset
|
58 BonjourDnsSd *bonjour_dns_sd_new(void); |
11477 | 59 |
60 /** | |
61 * Deallocate the space of the dns-sd data. | |
62 */ | |
11539 | 63 void bonjour_dns_sd_free(BonjourDnsSd *data); |
11477 | 64 |
65 /** | |
66 * Send a new dns-sd packet updating our status. | |
67 */ | |
11496 | 68 void bonjour_dns_sd_send_status(BonjourDnsSd *data, const char *status, const char *status_message); |
11477 | 69 |
70 /** | |
11539 | 71 * Advertise our presence within the dns-sd daemon and start |
72 * browsing for other bonjour peers. | |
11477 | 73 */ |
11927 | 74 gboolean bonjour_dns_sd_start(BonjourDnsSd *data); |
11539 | 75 |
11477 | 76 /** |
77 * Unregister the "_presence._tcp" service at the mDNS daemon. | |
78 */ | |
11927 | 79 void bonjour_dns_sd_stop(BonjourDnsSd *data); |
11477 | 80 |
81 #endif |