annotate libpurple/protocols/jabber/usertune.h @ 27039:9a79f8a99259

Set charset=utf-8 when cyrus sasl doesn't include it. Both deryni and my reading of the digest md5 cyrus plugin is that the response will never actually include the charset (digestmd5.c:make_client_response, look for IsUTF8). I future-proofed this code by checking for it anyway. To be polite for older servers, we might want to only send this if the server sent charset=utf-8 in the challenge (and encode everything to ISO-8859-1). However, the RFC doesn't say always sending it is wrong (and that's what the in-tree implementation does).
author Paul Aurich <paul@darkrain42.org>
date Fri, 05 Jun 2009 07:02:16 +0000
parents 5767b7698c73
children 8c991e09efcb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17857
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
1 /*
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
2 * purple - Jabber Protocol Plugin
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
3 *
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
4 * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com>
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
5 *
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
9 * (at your option) any later version.
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
10 *
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
14 * GNU General Public License for more details.
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
15 *
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
19 *
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
20 */
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
21
26481
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 17866
diff changeset
22 #ifndef PURPLE_JABBER_USERTUNE_H_
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 17866
diff changeset
23 #define PURPLE_JABBER_USERTUNE_H_
17857
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
24
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
25 #include "jabber.h"
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
26
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
27 /* Implementation of XEP-0118 */
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
28
17866
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
29 typedef struct _PurpleJabberTuneInfo PurpleJabberTuneInfo;
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
30 struct _PurpleJabberTuneInfo {
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
31 char *artist;
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
32 char *title;
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
33 char *album;
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
34 char *track; /* either the index of the track in the album or the URL for a stream */
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
35 int time; /* in seconds, -1 for unknown */
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
36 char *url;
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
37 };
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
38
17857
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
39 void jabber_tune_init(void);
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
40
17866
759cd72bd2ff 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 <pidgin@monitzer.com>
parents: 17857
diff changeset
41 void jabber_tune_set(PurpleConnection *gc, const PurpleJabberTuneInfo *tuneinfo);
17857
3e437e86bd6e Implemented user tune, currently untested.
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
42
26481
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 17866
diff changeset
43 #endif /* PURPLE_JABBER_USERTUNE_H_ */