Sun, 11 Sep 2016 11:25:03 -0500
gg: Port to Gio
This patch ports the Gadu-Gadu protocol plugin to use Gio internally.
Unfortunately libgg deals a lot with raw socket style API, which
isn't ideal. This patch therefore uses the pollable interface.
It would be nice to use the native asynchronous Gio API, but
I'm not certain that's possible without modifying libgg itself.
Perhaps someone more familiar with the protocol plugin would be
able to improve this.
|
33348
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
1 | /* purple |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
2 | * |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
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:
33335
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:
33335
diff
changeset
|
5 | * source distribution. |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
6 | * |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
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:
33335
diff
changeset
|
8 | * by Tomek Wasilczyk (http://www.wasilczyk.pl). |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
9 | * |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
10 | * Previously implemented by: |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
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:
33335
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:
33335
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:
33335
diff
changeset
|
14 | * |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
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:
33335
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:
33335
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:
33335
diff
changeset
|
18 | * (at your option) any later version. |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
19 | * |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
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:
33335
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:
33335
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:
33335
diff
changeset
|
23 | * GNU General Public License for more details. |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
24 | * |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
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:
33335
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:
33335
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:
33335
diff
changeset
|
28 | */ |
|
2394cd23ce8f
Gadu-Gadu: add GSoC copyright note
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33335
diff
changeset
|
29 | |
|
33335
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
30 | #ifndef _GGP_MULTILOGON_H |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
31 | #define _GGP_MULTILOGON_H |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
32 | |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
33 | #include <internal.h> |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
34 | #include <libgadu.h> |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
35 | |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
36 | typedef struct _ggp_multilogon_session_data ggp_multilogon_session_data; |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
37 | |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
38 | void ggp_multilogon_setup(PurpleConnection *gc); |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
39 | void ggp_multilogon_cleanup(PurpleConnection *gc); |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
40 | |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
41 | void ggp_multilogon_info(PurpleConnection *gc, |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
42 | struct gg_event_multilogon_info *msg); |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
43 | |
|
35144
3590ceb242b5
Gadu-Gadu: multilogon / other sessions dialog implementation. Refs #14366
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34356
diff
changeset
|
44 | void ggp_multilogon_dialog(PurpleConnection *gc); |
|
33335
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
45 | |
|
a6356adbe365
Gadu-Gadu: initial multilogon support (2)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
46 | #endif /* _GGP_MULTILOGON_H */ |