annotate libpurple/protocols/jabber/google.h @ 27108:38c4973b5222

Add a function to remove a port mapping (UPnP or NAT-PMP) given a file descriptor. Adapt the XMPP PRPL to use this to remove port mappings when a file transfer is done. There is still no support for removing left-over mappings at exit, since I've found no good way of calling purple_upnp_remove_port_mapping (which relies on callbacks) from purple_network_uninit (since the main thread terminates after the _uninit functions have finished)...
author Marcus Lundblad <ml@update.uu.se>
date Mon, 15 Jun 2009 21:43:25 +0000
parents 72bcdcb0629f
children 51d507e6c8f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15522
diff changeset
2 * Purple is the legal property of its developers, whose names are too numerous
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 * to list here. Please refer to the COPYRIGHT file distributed with this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * source distribution.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
19681
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 15822
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20
26481
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 26480
diff changeset
21 #ifndef PURPLE_JABBER_GOOGLE_H_
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 26480
diff changeset
22 #define PURPLE_JABBER_GOOGLE_H_
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 /* This is a place for Google Talk-specific XMPP extensions to live
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 * such that they don't intermingle with code for the XMPP RFCs and XEPs :) */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #include "jabber.h"
25005
44a528094cbf Support initiating voice calls to GTalk and Gmail.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 23769
diff changeset
28 #include "media.h"
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
26335
d06236d07c9e Move and rename GTALK_CAP to GOOGLE_VOICE_CAP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26080
diff changeset
30 #define GOOGLE_VOICE_CAP "http://www.google.com/xmpp/protocol/voice/v1"
26997
72bcdcb0629f Add Gmail video support.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26481
diff changeset
31 #define GOOGLE_VIDEO_CAP "http://www.google.com/xmpp/protocol/video/v1"
26080
88f183f7dfc7 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <ml@update.uu.se>
parents: 25005
diff changeset
32 #define GOOGLE_JINGLE_INFO_NAMESPACE "google:jingleinfo"
88f183f7dfc7 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <ml@update.uu.se>
parents: 25005
diff changeset
33
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 void jabber_gmail_init(JabberStream *js);
25648
050052891c55 Pass IQ handlers type, from, id, and the child node
Paul Aurich <paul@darkrain42.org>
parents: 25433
diff changeset
35 void jabber_gmail_poke(JabberStream *js, const char *from, JabberIqType type,
050052891c55 Pass IQ handlers type, from, id, and the child node
Paul Aurich <paul@darkrain42.org>
parents: 25433
diff changeset
36 const char *id, xmlnode *new_mail);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 void jabber_google_roster_init(JabberStream *js);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item);
15466
2c81b0a81790 Make deleting Google Talk buddies work
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
40
2c81b0a81790 Make deleting Google Talk buddies work
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
41 /* Returns FALSE if this should short-circuit processing of this roster item, or TRUE
2c81b0a81790 Make deleting Google Talk buddies work
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
42 * if this roster item should continue to be processed
2c81b0a81790 Make deleting Google Talk buddies work
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
43 */
2c81b0a81790 Make deleting Google Talk buddies work
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
44 gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item);
20571
c97e3ab9ef11 Music support for Google Talk
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
45
c97e3ab9ef11 Music support for Google Talk
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
46 void jabber_google_presence_incoming(JabberStream *js, const char *who, JabberBuddyResource *jbr);
c97e3ab9ef11 Music support for Google Talk
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
47 char *jabber_google_presence_outgoing(PurpleStatus *tune);
c97e3ab9ef11 Music support for Google Talk
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
48
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15522
diff changeset
49 void jabber_google_roster_add_deny(PurpleConnection *gc, const char *who);
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15522
diff changeset
50 void jabber_google_roster_rem_deny(PurpleConnection *gc, const char *who);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51
15522
ccbdf500f13a Google Talk uses structured text formatting where *this* is bold
Sean Egan <seanegan@gmail.com>
parents: 15466
diff changeset
52 char *jabber_google_format_to_html(const char *text);
ccbdf500f13a Google Talk uses structured text formatting where *this* is bold
Sean Egan <seanegan@gmail.com>
parents: 15466
diff changeset
53
26365
34eb898478b4 Don't assume a PurpleMedia instance will be created immediately.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26335
diff changeset
54 gboolean jabber_google_session_initiate(JabberStream *js, const gchar *who, PurpleMediaSessionType type);
26476
cd1f3a1750a1 And google session handling
Paul Aurich <paul@darkrain42.org>
parents: 26471
diff changeset
55 void jabber_google_session_parse(JabberStream *js, const char *from, JabberIqType type, const char *iq, xmlnode *session);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56
26471
91583903b478 Migrate googleinfo:jabber handlers and add some safety checks.
Paul Aurich <paul@darkrain42.org>
parents: 26470
diff changeset
57 void jabber_google_handle_jingle_info(JabberStream *js, const char *from,
91583903b478 Migrate googleinfo:jabber handlers and add some safety checks.
Paul Aurich <paul@darkrain42.org>
parents: 26470
diff changeset
58 JabberIqType type, const char *id,
91583903b478 Migrate googleinfo:jabber handlers and add some safety checks.
Paul Aurich <paul@darkrain42.org>
parents: 26470
diff changeset
59 xmlnode *child);
26080
88f183f7dfc7 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <ml@update.uu.se>
parents: 25005
diff changeset
60 void jabber_google_send_jingle_info(JabberStream *js);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61
26481
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 26480
diff changeset
62 #endif /* PURPLE_JABBER_GOOGLE_H_ */