annotate src/protocols/rendezvous/rendezvous.h @ 10864:55e29b8e9689

[gaim-migrate @ 12548] sf patch 1189105, from Will Thompson "Completes the previously commented-out block in gtkconv.c dealing with Alt-#. Checks that the tab exists before switching to it." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 24 Apr 2005 21:26:33 +0000
parents 8bc7ba019e96
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10321
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
1 /**
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
2 * @file rendezvous.h The Gaim interface to mDNS and peer to peer Jabber.
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
3 *
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
4 * gaim
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
5 *
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
8 * source distribution.
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
9 *
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
13 * (at your option) any later version.
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
14 *
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
18 * GNU General Public License for more details.
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
19 *
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
23 *
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
24 */
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
25
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
26 #ifndef _RENDEZVOUS_H_
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
27 #define _RENDEZVOUS_H_
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
28
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
29 #include "internal.h"
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
30 #include "debug.h"
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
31
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
32 #include "mdns.h"
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
33
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
34 #define RENDEZVOUS_CONNECT_STEPS 2
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
35
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
36 #define UC_UNAVAILABLE 1
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
37 #define UC_IDLE 2
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
38
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
39 typedef struct _RendezvousData {
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
40 int fd;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
41 GHashTable *buddies;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
42 GSList *mytxtdata;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
43 unsigned short listener_port;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
44 int listener;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
45 int listener_watcher;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
46 } RendezvousData;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
47
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
48 typedef struct _RendezvousBuddy {
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
49 #if 0
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
50 guint ttltimer;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
51 #endif
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
52 gchar *firstandlast;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
53 gchar *aim;
10549
8bc7ba019e96 [gaim-migrate @ 11919]
Mark Doliner <mark@kingant.net>
parents: 10321
diff changeset
54 unsigned char ipv4[4]; /**< An IPv4 address */
8bc7ba019e96 [gaim-migrate @ 11919]
Mark Doliner <mark@kingant.net>
parents: 10321
diff changeset
55 unsigned char ipv6[16]; /**< An IPv6 address */
10321
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
56 unsigned short p2pjport;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
57 int status;
10549
8bc7ba019e96 [gaim-migrate @ 11919]
Mark Doliner <mark@kingant.net>
parents: 10321
diff changeset
58 int idle; /**< Current idle time in seconds since the epoch. */
8bc7ba019e96 [gaim-migrate @ 11919]
Mark Doliner <mark@kingant.net>
parents: 10321
diff changeset
59 gchar *msg; /**< Current status message of this buddy. */
8bc7ba019e96 [gaim-migrate @ 11919]
Mark Doliner <mark@kingant.net>
parents: 10321
diff changeset
60 int fd; /**< File descriptor of the P2PJ socket. */
8bc7ba019e96 [gaim-migrate @ 11919]
Mark Doliner <mark@kingant.net>
parents: 10321
diff changeset
61 int watcher; /**< Handle for the watcher of the P2PJ socket. */
10321
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
62 } RendezvousBuddy;
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
63
782c1b564906 [gaim-migrate @ 11528]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
64 #endif /* _RENDEZVOUS_H_ */