Wed, 25 May 2022 23:52:45 -0500
Remove prpl-gtalk from XMPP console
It no longer exists, and complicates the code a bit.
|
40750
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
1 | /* |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
4 | * |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
8 | * |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
13 | * |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
18 | * |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
21 | */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
22 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
23 | #ifndef PURPLE_ZEPHYR_ZEPHYR_ACCOUNT_H |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
24 | #define PURPLE_ZEPHYR_ZEPHYR_ACCOUNT_H |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
25 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
26 | #include <glib.h> |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
27 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
28 | #include <purple.h> |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
29 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
30 | #include "internal.h" |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
31 | |
|
40753
19a07f7215f8
Fix the zephyr build on FreeBSD
Gary Kramlich <grim@reaperworld.com>
parents:
40750
diff
changeset
|
32 | #ifndef HOST_NAME_MAX |
|
19a07f7215f8
Fix the zephyr build on FreeBSD
Gary Kramlich <grim@reaperworld.com>
parents:
40750
diff
changeset
|
33 | # define HOST_NAME_MAX 255 |
|
19a07f7215f8
Fix the zephyr build on FreeBSD
Gary Kramlich <grim@reaperworld.com>
parents:
40750
diff
changeset
|
34 | #endif |
|
19a07f7215f8
Fix the zephyr build on FreeBSD
Gary Kramlich <grim@reaperworld.com>
parents:
40750
diff
changeset
|
35 | |
|
40750
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
36 | typedef struct _zephyr_account zephyr_account; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
37 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
38 | typedef enum { |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
39 | PURPLE_ZEPHYR_NONE, /* Non-kerberized ZEPH0.2 */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
40 | PURPLE_ZEPHYR_KRB4, /* ZEPH0.2 w/ KRB4 support */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
41 | PURPLE_ZEPHYR_TZC, /* tzc executable proxy */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
42 | PURPLE_ZEPHYR_INTERGALACTIC_KRB4 /* Kerberized ZEPH0.3 */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
43 | } zephyr_connection_type; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
44 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
45 | typedef gboolean (*ZephyrSubscribeToFunc)(zephyr_account *zephyr, ZSubscription_t *sub); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
46 | typedef gboolean (*ZephyrRequestLocationsFunc)(zephyr_account *zephyr, gchar *who); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
47 | typedef gboolean (*ZephyrSendMessageFunc)(zephyr_account *zephyr, gchar *zclass, gchar *instance, gchar *recipient, |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
48 | const gchar *html_buf, const gchar *sig, const gchar *opcode); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
49 | typedef void (*ZephyrSetLocationFunc)(zephyr_account *zephyr, char *exposure); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
50 | typedef void (*ZephyrGetSubsFromServerFunc)(zephyr_account *zephyr, PurpleConnection *gc); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
51 | typedef void (*ZephyrCloseFunc)(zephyr_account *zephyr); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
52 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
53 | struct _zephyr_account { |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
54 | PurpleAccount* account; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
55 | char *username; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
56 | char *realm; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
57 | char *encoding; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
58 | char* galaxy; /* not yet useful */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
59 | char* krbtkfile; /* not yet useful */ |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
60 | guint32 nottimer; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
61 | guint32 loctimer; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
62 | GList *pending_zloc_names; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
63 | GSList *subscrips; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
64 | int last_id; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
65 | unsigned short port; |
|
40809
691bd780ab06
Replace gethostname by g_get_host_name
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40778
diff
changeset
|
66 | gchar *ourhost; |
|
691bd780ab06
Replace gethostname by g_get_host_name
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40778
diff
changeset
|
67 | gchar *ourhostcanon; |
|
40750
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
68 | zephyr_connection_type connection_type; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
69 | char *exposure; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
70 | GSubprocess *tzc_proc; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
71 | GOutputStream *tzc_stdin; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
72 | GInputStream *tzc_stdout; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
73 | gchar *away; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
74 | ZephyrSubscribeToFunc subscribe_to; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
75 | ZephyrRequestLocationsFunc request_locations; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
76 | ZephyrSendMessageFunc send_message; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
77 | ZephyrSetLocationFunc set_location; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
78 | ZephyrGetSubsFromServerFunc get_subs_from_server; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
79 | ZephyrCloseFunc close; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
80 | }; |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
81 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
82 | gchar *get_zephyr_realm(PurpleAccount *account, const gchar *local_realm); |
|
40778
507a61f2194a
zephyr: handle_message cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40753
diff
changeset
|
83 | void handle_message(PurpleConnection *gc, ZNotice_t *notice); |
|
507a61f2194a
zephyr: handle_message cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40753
diff
changeset
|
84 | void handle_locations(PurpleConnection *gc, const gchar *user, int nlocs, const ZLocations_t *zloc); |
|
40750
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
85 | char *zephyr_normalize_local_realm(const zephyr_account *zephyr, const char *orig); |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
86 | |
|
e87c321f05fa
Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff
changeset
|
87 | #endif /* PURPLE_ZEPHYR_ZEPHYR_ACCOUNT_H */ |