Mercurial > pidgin.yaz
annotate libpurple/protocols/jabber/google/jingleinfo.c @ 30906:34f586bffe4e
Added new files in sub directory google
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Thu, 25 Mar 2010 20:18:54 +0000 |
parents | |
children | 2e26b90a28dd |
rev | line source |
---|---|
30906
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
1 /** |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
2 * Purple is the legal property of its developers, whose names are too numerous |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
3 * to list here. Please refer to the COPYRIGHT file distributed with this |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
4 * source distribution. |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
5 * |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
6 * This program is free software; you can redistribute it and/or modify |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
8 * the Free Software Foundation; either version 2 of the License, or |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
9 * (at your option) any later version. |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
10 * |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
14 * GNU General Public License for more details. |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
15 * |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
17 * along with this program; if not, write to the Free Software |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
19 */ |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
20 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
21 #include "internal.h" |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
22 #include "debug.h" |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
23 #include "jingleinfo.h" |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
24 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
25 static void |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
26 jabber_google_stun_lookup_cb(GSList *hosts, gpointer data, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
27 const char *error_message) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
28 { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
29 JabberStream *js = (JabberStream *) data; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
30 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
31 if (error_message) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
32 purple_debug_error("jabber", "Google STUN lookup failed: %s\n", |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
33 error_message); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
34 g_slist_free(hosts); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
35 js->stun_query = NULL; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
36 return; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
37 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
38 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
39 if (hosts && g_slist_next(hosts)) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
40 struct sockaddr *addr = g_slist_next(hosts)->data; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
41 char dst[INET6_ADDRSTRLEN]; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
42 int port; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
43 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
44 if (addr->sa_family == AF_INET6) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
45 inet_ntop(addr->sa_family, &((struct sockaddr_in6 *) addr)->sin6_addr, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
46 dst, sizeof(dst)); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
47 port = ntohs(((struct sockaddr_in6 *) addr)->sin6_port); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
48 } else { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
49 inet_ntop(addr->sa_family, &((struct sockaddr_in *) addr)->sin_addr, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
50 dst, sizeof(dst)); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
51 port = ntohs(((struct sockaddr_in *) addr)->sin_port); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
52 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
53 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
54 if (js->stun_ip) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
55 g_free(js->stun_ip); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
56 js->stun_ip = g_strdup(dst); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
57 js->stun_port = port; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
58 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
59 purple_debug_info("jabber", "set Google STUN IP/port address: " |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
60 "%s:%d\n", dst, port); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
61 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
62 /* unmark ongoing query */ |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
63 js->stun_query = NULL; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
64 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
65 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
66 while (hosts != NULL) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
67 hosts = g_slist_delete_link(hosts, hosts); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
68 /* Free the address */ |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
69 g_free(hosts->data); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
70 hosts = g_slist_delete_link(hosts, hosts); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
71 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
72 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
73 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
74 static void |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
75 jabber_google_jingle_info_common(JabberStream *js, const char *from, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
76 JabberIqType type, xmlnode *query) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
77 { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
78 const xmlnode *stun = xmlnode_get_child(query, "stun"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
79 gchar *my_bare_jid; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
80 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
81 /* |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
82 * Make sure that random people aren't sending us STUN servers. Per |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
83 * http://code.google.com/apis/talk/jep_extensions/jingleinfo.html, these |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
84 * stanzas are stamped from our bare JID. |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
85 */ |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
86 if (from) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
87 my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
88 if (!purple_strequal(from, my_bare_jid)) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
89 purple_debug_warning("jabber", "got google:jingleinfo with invalid from (%s)\n", |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
90 from); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
91 g_free(my_bare_jid); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
92 return; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
93 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
94 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
95 g_free(my_bare_jid); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
96 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
97 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
98 if (type == JABBER_IQ_ERROR || type == JABBER_IQ_GET) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
99 return; |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
100 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
101 purple_debug_info("jabber", "got google:jingleinfo\n"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
102 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
103 if (stun) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
104 xmlnode *server = xmlnode_get_child(stun, "server"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
105 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
106 if (server) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
107 const gchar *host = xmlnode_get_attrib(server, "host"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
108 const gchar *udp = xmlnode_get_attrib(server, "udp"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
109 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
110 if (host && udp) { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
111 int port = atoi(udp); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
112 /* if there, would already be an ongoing query, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
113 cancel it */ |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
114 if (js->stun_query) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
115 purple_dnsquery_destroy(js->stun_query); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
116 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
117 js->stun_query = purple_dnsquery_a(host, port, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
118 jabber_google_stun_lookup_cb, js); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
119 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
120 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
121 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
122 /* should perhaps handle relays later on, or maybe wait until |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
123 Google supports a common standard... */ |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
124 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
125 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
126 static void |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
127 jabber_google_jingle_info_cb(JabberStream *js, const char *from, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
128 JabberIqType type, const char *id, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
129 xmlnode *packet, gpointer data) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
130 { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
131 xmlnode *query = xmlnode_get_child_with_namespace(packet, "query", |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
132 NS_GOOGLE_JINGLE_INFO); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
133 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
134 if (query) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
135 jabber_google_jingle_info_common(js, from, type, query); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
136 else |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
137 purple_debug_warning("jabber", "Got invalid google:jingleinfo\n"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
138 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
139 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
140 void |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
141 jabber_google_handle_jingle_info(JabberStream *js, const char *from, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
142 JabberIqType type, const char *id, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
143 xmlnode *child) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
144 { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
145 jabber_google_jingle_info_common(js, from, type, child); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
146 } |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
147 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
148 void |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
149 jabber_google_send_jingle_info(JabberStream *js) |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
150 { |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
151 JabberIq *jingle_info = |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
152 jabber_iq_new_query(js, JABBER_IQ_GET, NS_GOOGLE_JINGLE_INFO); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
153 |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
154 jabber_iq_set_callback(jingle_info, jabber_google_jingle_info_cb, |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
155 NULL); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
156 purple_debug_info("jabber", "sending google:jingleinfo query\n"); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
157 jabber_iq_send(jingle_info); |
34f586bffe4e
Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff
changeset
|
158 } |