Mon, 28 Sep 2009 22:11:54 +0000
jabber: Don't crash when disconnecting if there's been no response from the server.
PurpleBOSHConnection.sid is only set after we've received a resposne from
the server, so if we try to send a 'terminate' before we have a response,
it will crash on Win32 (NULL printf), plus it's wrong anyway.
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
1 | /* |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
2 | * purple - Jabber Protocol Plugin |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
3 | * |
|
28322
ac8fec1d2234
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents:
28321
diff
changeset
|
4 | * Purple is the legal property of its developers, whose names are too numerous |
|
ac8fec1d2234
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents:
28321
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
ac8fec1d2234
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents:
28321
diff
changeset
|
6 | * source distribution. |
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
7 | * |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
11 | * (at your option) any later version. |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
12 | * |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
16 | * GNU General Public License for more details. |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
17 | * |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
28321
c8d617c408ab
Update various header copyrights thanks to licensecheck.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
21 | * |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
22 | */ |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
23 | |
|
26703
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
17800
diff
changeset
|
24 | #ifndef PURPLE_JABBER_USERTUNE_H_ |
|
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
17800
diff
changeset
|
25 | #define PURPLE_JABBER_USERTUNE_H_ |
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
26 | |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
27 | #include "jabber.h" |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
28 | |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
29 | /* Implementation of XEP-0118 */ |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
30 | |
|
17800
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
31 | typedef struct _PurpleJabberTuneInfo PurpleJabberTuneInfo; |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
32 | struct _PurpleJabberTuneInfo { |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
33 | char *artist; |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
34 | char *title; |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
35 | char *album; |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
36 | char *track; /* either the index of the track in the album or the URL for a stream */ |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
37 | int time; /* in seconds, -1 for unknown */ |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
38 | char *url; |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
39 | }; |
|
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
40 | |
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
41 | void jabber_tune_init(void); |
|
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
42 | |
|
17800
39a0f9ed0e26
Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents:
17791
diff
changeset
|
43 | void jabber_tune_set(PurpleConnection *gc, const PurpleJabberTuneInfo *tuneinfo); |
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
diff
changeset
|
44 | |
|
26703
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
17800
diff
changeset
|
45 | #endif /* PURPLE_JABBER_USERTUNE_H_ */ |