libpurple/protocols/zephyr/zephyr_zeph02.h

Wed, 03 Feb 2021 18:27:42 -0600

author
Arkadiy Illarionov <qarkai@gmail.com>
date
Wed, 03 Feb 2021 18:27:42 -0600
changeset 40750
e87c321f05fa
permissions
-rw-r--r--

Move tzc and zeph02 to own modules and some cleanup

* Add `send_message`, `set_location`, `get_subs_from_server`, `close` to `zephyr_account`
* Remove now unused `use_tzc` and `use_zeph02`
* Format message inside `zephyr_write_message`
* Rename some functions
* Reduce scope for some variables
* Remove unused `ZEPHYR_FD_*` macros

Testing Done:
Compile.

Reviewed at https://reviews.imfreedom.org/r/471/

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_ZEPH02_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_ZEPH02_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 "zephyr_account.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 gboolean zeph02_login(zephyr_account *zephyr);
e87c321f05fa Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff changeset
29 gint zeph02_check_notify(gpointer data);
e87c321f05fa Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff changeset
30 gboolean zeph02_subscribe_to(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
31 gboolean zeph02_request_locations(zephyr_account *zephyr, gchar *who);
e87c321f05fa Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff changeset
32 gboolean zeph02_send_message(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
33 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
34 void zeph02_set_location(zephyr_account *zephyr, char *exposure);
e87c321f05fa Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff changeset
35 void zeph02_get_subs_from_server(zephyr_account *zephyr, PurpleConnection *gc);
e87c321f05fa Move tzc and zeph02 to own modules and some cleanup
Arkadiy Illarionov <qarkai@gmail.com>
parents:
diff changeset
36 void zeph02_close(zephyr_account *zephyr);
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 #endif /* PURPLE_ZEPHYR_ZEPHYR_ZEPH02_H */

mercurial