libpurple/protocols/gg/roster.h

Wed, 18 Jun 2014 11:40:53 +0200

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Wed, 18 Jun 2014 11:40:53 +0200
changeset 36124
3dcb9b9b7c11
parent 35358
7beae478c905
child 39819
3554dac2991b
permissions
-rw-r--r--

Drop libgadu legacy API compatibility code

33348
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
1 /* purple
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
2 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
5 * source distribution.
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
6 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
7 * Rewritten from scratch during Google Summer of Code 2012
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
8 * by Tomek Wasilczyk (http://www.wasilczyk.pl).
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
9 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
10 * Previously implemented by:
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
11 * - Arkadiusz Miskiewicz <misiek@pld.org.pl> - first implementation (2001);
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
12 * - Bartosz Oler <bartosz@bzimage.us> - reimplemented during GSoC 2005;
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
13 * - Krzysztof Klinikowski <grommasher@gmail.com> - some parts (2009-2011).
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
14 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
15 * This program is free software; you can redistribute it and/or modify
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
16 * it under the terms of the GNU General Public License as published by
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
17 * the Free Software Foundation; either version 2 of the License, or
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
18 * (at your option) any later version.
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
19 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
20 * This program is distributed in the hope that it will be useful,
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
23 * GNU General Public License for more details.
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
24 *
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
25 * You should have received a copy of the GNU General Public License
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
26 * along with this program; if not, write to the Free Software
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
28 */
2394cd23ce8f Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33326
diff changeset
29
33314
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
30 #ifndef _GGP_ROSTER_H
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
31 #define _GGP_ROSTER_H
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
32
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
33 #include <internal.h>
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
34 #include <libgadu.h>
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
35
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
36 typedef struct
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
37 {
33315
42bbe5b85df8 Gadu-Gadu: roster - uploading/synchronization - part1
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33314
diff changeset
38 gpointer content;
33325
63bf52ec9e1e Gadu-Gadu: roster - tidying. Fixes #9463
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33320
diff changeset
39 gboolean is_updating;
35358
7beae478c905 Style: fix gg (partially)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35356
diff changeset
40
33315
42bbe5b85df8 Gadu-Gadu: roster - uploading/synchronization - part1
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33314
diff changeset
41 GList *sent_updates;
42bbe5b85df8 Gadu-Gadu: roster - uploading/synchronization - part1
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33314
diff changeset
42 GList *pending_updates;
35358
7beae478c905 Style: fix gg (partially)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35356
diff changeset
43
33325
63bf52ec9e1e Gadu-Gadu: roster - tidying. Fixes #9463
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33320
diff changeset
44 guint timer;
33314
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
45 } ggp_roster_session_data;
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
46
35356
3a71df246d07 Style: fix gg (partially)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33348
diff changeset
47 /* setup */
33319
8321461fa2be Gadu-Gadu: roster - disable, when not supported
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33318
diff changeset
48 gboolean ggp_roster_enabled(void);
33314
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
49 void ggp_roster_setup(PurpleConnection *gc);
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
50 void ggp_roster_cleanup(PurpleConnection *gc);
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
51
35356
3a71df246d07 Style: fix gg (partially)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33348
diff changeset
52 /* synchronization control */
33318
636bfc28f2cf Gadu-Gadu: roster - finally working
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33315
diff changeset
53 void ggp_roster_request_update(PurpleConnection *gc);
636bfc28f2cf Gadu-Gadu: roster - finally working
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33315
diff changeset
54
35356
3a71df246d07 Style: fix gg (partially)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33348
diff changeset
55 /* libgadu callbacks */
33326
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
56 void ggp_roster_reply(PurpleConnection *gc,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
57 struct gg_event_userlist100_reply *reply);
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
58 void ggp_roster_version(PurpleConnection *gc,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
59 struct gg_event_userlist100_version *version);
33315
42bbe5b85df8 Gadu-Gadu: roster - uploading/synchronization - part1
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33314
diff changeset
60
35356
3a71df246d07 Style: fix gg (partially)
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33348
diff changeset
61 /* libpurple callbacks */
33326
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
62 void ggp_roster_alias_buddy(PurpleConnection *gc, const char *who,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
63 const char *alias);
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
64 void ggp_roster_group_buddy(PurpleConnection *gc, const char *who,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
65 const char *old_group, const char *new_group);
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
66 void ggp_roster_rename_group(PurpleConnection *, const char *old_name,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
67 PurpleGroup *group, GList *moved_buddies);
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
68 void ggp_roster_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
69 PurpleGroup *group, const char *message);
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
70 void ggp_roster_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy,
dbcdbdf2f02b Gadu-Gadu: roster - tidying
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33325
diff changeset
71 PurpleGroup *group);
33314
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
72
57013b9e1a8e Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
73 #endif /* _GGP_ROSTER_H */

mercurial