Mercurial > pidgin.yaz
annotate libpurple/protocols/jabber/useravatar.h @ 25817:9195955395b6
Only (re)publish XMPP avatars at login if the server's avatar differs
As part of this, no longer rely on the vcard for determining a need to
publish the XEP-0084 avatar; explicitly fetch and compare it.
Closes #7734.
References #7732. That patch needs updating to apply on top of this.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 21 Jan 2009 20:16:22 +0000 |
parents | 5dd25c58b65e |
children | ba8f51cb3691 |
rev | line source |
---|---|
25815
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
1 /* |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
2 * purple - Jabber Protocol Plugin |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
3 * |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
4 * Purple is the legal property of its developers, whose names are too numerous |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
6 * source distribution. |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
7 * |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
11 * (at your option) any later version. |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
12 * |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
17 * |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
21 * |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
22 */ |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
23 |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
24 #ifndef _PURPLE_JABBER_USERAVATAR_H_ |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
25 #define _PURPLE_JABBER_USERAVATAR_H_ |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
26 |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
27 #include "jabber.h" |
25817
9195955395b6
Only (re)publish XMPP avatars at login if the server's avatar differs
Paul Aurich <paul@darkrain42.org>
parents:
25815
diff
changeset
|
28 #include "imgstore.h" |
25815
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
29 |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
30 /* Implementation of XEP-0084 */ |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
31 |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
32 void jabber_avatar_init(void); |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
33 void jabber_avatar_set(JabberStream *js, PurpleStoredImage *img); |
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
34 |
25817
9195955395b6
Only (re)publish XMPP avatars at login if the server's avatar differs
Paul Aurich <paul@darkrain42.org>
parents:
25815
diff
changeset
|
35 void jabber_avatar_fetch_mine(JabberStream *js); |
9195955395b6
Only (re)publish XMPP avatars at login if the server's avatar differs
Paul Aurich <paul@darkrain42.org>
parents:
25815
diff
changeset
|
36 |
25815
5dd25c58b65e
Migrate the XMPP User Avatar (XEP-0084) code to its own file
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
37 #endif /* _PURPLE_JABBER_USERAVATAR_H_ */ |