Fri, 01 May 2020 04:42:52 -0500
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
| 11414 | 1 | /** |
| 2 | * @file gg.h | |
| 3 | * | |
| 15884 | 4 | * purple |
| 11414 | 5 | * |
| 6 | * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us> | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18273
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 11414 | 21 | */ |
| 22 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
23 | #ifndef PURPLE_GG_GG_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
24 | #define PURPLE_GG_GG_H |
| 11414 | 25 | |
|
34437
ca6d1b4d24b5
Gadu-Gadu: add an option to disable new libgadu API
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34433
diff
changeset
|
26 | #define GGP_UIN_LEN_MAX 10 |
|
35139
c30787ce6256
Use external libgadu for win32 build and update some dependencies. Refs #343
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34437
diff
changeset
|
27 | |
|
37418
28302ab00d1a
Include gmodule.h in each protocol's eponymous header because they all
Michael McConville <mmcco@mykolab.com>
parents:
37155
diff
changeset
|
28 | #include <gmodule.h> |
| 13318 | 29 | #include <libgadu.h> |
|
40019
5bf1b06ebd65
Convert GG avatar fetching to libsoup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
30 | #include <libsoup/soup.h> |
|
35139
c30787ce6256
Use external libgadu for win32 build and update some dependencies. Refs #343
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34437
diff
changeset
|
31 | |
|
18273
e61c53184c52
#include reorganizations to allow compiling with glib < 2.8 using the
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15884
diff
changeset
|
32 | #include "internal.h" |
| 11414 | 33 | #include "search.h" |
|
40358
e6fe6fc1f516
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents:
40024
diff
changeset
|
34 | |
|
e6fe6fc1f516
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents:
40024
diff
changeset
|
35 | #include <purple.h> |
| 11414 | 36 | |
|
35819
cc375b914104
imgstore: remove refs from gg prpl
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35305
diff
changeset
|
37 | #include "image-prpl.h" |
|
33313
5a0c6582d5b1
Gadu-Gadu: refactoring of buddy avatars handling. Fixes #13739, #14305
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33310
diff
changeset
|
38 | #include "avatar.h" |
|
33314
57013b9e1a8e
Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33313
diff
changeset
|
39 | #include "roster.h" |
|
33334
734fc6da6179
Gadu-Gadu: initial multilogon support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33314
diff
changeset
|
40 | #include "multilogon.h" |
|
33336
7c97b5dd3bf4
Gadu-Gadu: status refactoring - own status
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33334
diff
changeset
|
41 | #include "status.h" |
|
34350
89441dbabc83
Gadu-Gadu: initial GG11 conferences support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33346
diff
changeset
|
42 | #include "chat.h" |
|
34361
ddcc82637afa
Gadu-Gadu: incoming images works again
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34356
diff
changeset
|
43 | #include "message-prpl.h" |
|
34380
2179667660bc
Edisc authentication, file transfer implementation started
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34373
diff
changeset
|
44 | #include "edisc.h" |
| 13641 | 45 | |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
46 | #define GGP_TYPE_PROTOCOL (ggp_protocol_get_type()) |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
47 | #define GGP_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GGP_TYPE_PROTOCOL, GGPProtocol)) |
|
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
48 | #define GGP_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GGP_TYPE_PROTOCOL, GGPProtocolClass)) |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
49 | #define GGP_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GGP_TYPE_PROTOCOL)) |
|
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
50 | #define GGP_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GGP_TYPE_PROTOCOL)) |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
51 | #define GGP_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GGP_TYPE_PROTOCOL, GGPProtocolClass)) |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
52 | |
|
39556
622bf98df0ac
Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37418
diff
changeset
|
53 | typedef struct |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
54 | { |
|
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
55 | PurpleProtocol parent; |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
56 | } GGPProtocol; |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
57 | |
|
39556
622bf98df0ac
Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37418
diff
changeset
|
58 | typedef struct |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
59 | { |
|
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
60 | PurpleProtocolClass parent_class; |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
61 | } GGPProtocolClass; |
| 13643 | 62 | |
| 11414 | 63 | typedef struct { |
| 64 | struct gg_session *session; | |
|
40019
5bf1b06ebd65
Convert GG avatar fetching to libsoup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
65 | SoupSession *http; |
|
32685
140518f18665
GG: Move the "inpa" input watcher into protocol_data.
Andrew Victor <andrew.victor@mxit.com>
parents:
32675
diff
changeset
|
66 | guint inpa; |
| 13643 | 67 | |
|
34373
169db6aa5e08
Gadu-Gadu: very initial GGDrive authentication support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34362
diff
changeset
|
68 | gchar *imtoken; |
|
169db6aa5e08
Gadu-Gadu: very initial GGDrive authentication support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34362
diff
changeset
|
69 | gboolean imtoken_warned; |
| 11414 | 70 | |
|
34362
758e72362ca4
Gadu-Gadu: code polishing
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34361
diff
changeset
|
71 | ggp_image_session_data *image_data; |
|
40024
dad0e4c75135
Remove extra indirection with ggp_avatar_session_data.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40019
diff
changeset
|
72 | ggp_avatar_session_data *avatar_data; |
|
33314
57013b9e1a8e
Gadu-Gadu: roster - downloading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33313
diff
changeset
|
73 | ggp_roster_session_data roster_data; |
|
33334
734fc6da6179
Gadu-Gadu: initial multilogon support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33314
diff
changeset
|
74 | ggp_multilogon_session_data *multilogon_data; |
|
33336
7c97b5dd3bf4
Gadu-Gadu: status refactoring - own status
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33334
diff
changeset
|
75 | ggp_status_session_data *status_data; |
|
34350
89441dbabc83
Gadu-Gadu: initial GG11 conferences support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33346
diff
changeset
|
76 | ggp_chat_session_data *chat_data; |
|
34361
ddcc82637afa
Gadu-Gadu: incoming images works again
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34356
diff
changeset
|
77 | ggp_message_session_data *message_data; |
|
34380
2179667660bc
Edisc authentication, file transfer implementation started
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34373
diff
changeset
|
78 | ggp_edisc_session_data *edisc_data; |
| 11414 | 79 | } GGPInfo; |
| 12007 | 80 | |
| 11414 | 81 | typedef struct |
| 82 | { | |
|
33340
5f00ed891179
Gadu-Gadu: status refactoring - done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33336
diff
changeset
|
83 | gboolean blocked; |
|
34409
198c6f5c19ca
Gadu-Gadu: Add support for GG_STATUS_UNKNOWN status
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34380
diff
changeset
|
84 | gboolean not_a_friend; |
|
33340
5f00ed891179
Gadu-Gadu: status refactoring - done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33336
diff
changeset
|
85 | } ggp_buddy_data; |
| 12007 | 86 | |
|
36775
5e59f252d777
Added G_MODULE_EXPORT declaration to protocol get_type() functions
Ankit Vani <a@nevitus.org>
parents:
36744
diff
changeset
|
87 | G_MODULE_EXPORT GType ggp_protocol_get_type(void); |
|
36578
219de60342be
Refactored gg to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
33346
diff
changeset
|
88 | |
|
33340
5f00ed891179
Gadu-Gadu: status refactoring - done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33336
diff
changeset
|
89 | ggp_buddy_data * ggp_buddy_get_data(PurpleBuddy *buddy); |
| 11414 | 90 | |
|
34373
169db6aa5e08
Gadu-Gadu: very initial GGDrive authentication support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34362
diff
changeset
|
91 | const gchar * ggp_get_imtoken(PurpleConnection *gc); |
| 11414 | 92 | |
|
34373
169db6aa5e08
Gadu-Gadu: very initial GGDrive authentication support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34362
diff
changeset
|
93 | uin_t ggp_own_uin(PurpleConnection *gc); |
|
169db6aa5e08
Gadu-Gadu: very initial GGDrive authentication support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34362
diff
changeset
|
94 | |
|
34433
fa2313e5f320
Gadu-Gadu: use our own proxy/tls connecting code instead of libgadu's
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34409
diff
changeset
|
95 | void ggp_async_login_handler(gpointer _gc, gint fd, PurpleInputCondition cond); |
| 11414 | 96 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
97 | #endif /* PURPLE_GG_GG_H */ |