Fri, 08 Aug 2025 09:46:55 +0800
Initial Commit
| 0 | 1 | /* |
| 2 | * Purple Satori Plugin - Satori Protocol Plugin for Purple3 | |
| 3 | * Copyright (C) 2025 Gong Zhile | |
| 4 | * | |
| 5 | * This library is free software; you can redistribute it and/or | |
| 6 | * modify it under the terms of the GNU Lesser General Public | |
| 7 | * License as published by the Free Software Foundation; either | |
| 8 | * version 2 of the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This library is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. | |
| 17 | */ | |
| 18 | ||
| 19 | #ifndef PURPLE_SATORI_CONNECTION_H | |
| 20 | #define PURPLE_SATORI_CONNECTION_H | |
| 21 | ||
| 22 | #include <glib.h> | |
| 23 | #include <purple.h> | |
| 24 | #include <libsoup/soup.h> | |
| 25 | ||
| 26 | G_BEGIN_DECLS | |
| 27 | ||
| 28 | #define PURPLE_SATORI_HOST "192.168.1.154:5600" | |
| 29 | #define PURPLE_SATORI_WSURL "ws://" PURPLE_SATORI_HOST "/v1/events" | |
| 30 | ||
| 31 | #define PURPLE_SATORI_PLATFORM "QQ" | |
| 32 | #define PURPLE_SATORI_USER_ID "3751531667" | |
| 33 | ||
| 34 | #define PURPLE_SATORI_TYPE_CONNECTION (purple_satori_connection_get_type()) | |
| 35 | G_DECLARE_FINAL_TYPE(PurpleSatoriConnection, purple_satori_connection, PURPLE_SATORI, | |
| 36 | CONNECTION, PurpleConnection) | |
| 37 | ||
| 38 | G_GNUC_INTERNAL void purple_satori_connection_register(GPluginNativePlugin *plugin); | |
| 39 | ||
| 40 | void | |
| 41 | purple_satori_connection_send_and_read_async(PurpleSatoriConnection *con, | |
| 42 | SoupMessage *msg, | |
| 43 | int io_priority, | |
| 44 | GCancellable *cancellable, | |
| 45 | GAsyncReadyCallback callback, | |
| 46 | gpointer user_data); | |
| 47 | ||
| 48 | G_END_DECLS | |
| 49 | ||
| 50 | #endif /* PURPLE_SATORI_CONNECTION_H */ |