purplesatoriconnection.h

Fri, 08 Aug 2025 09:46:55 +0800

author
William Goodspeed <goodspeed@mailo.cat>
date
Fri, 08 Aug 2025 09:46:55 +0800
changeset 0
cc7c1f9d20f7
child 3
33a7b189a2c6
permissions
-rw-r--r--

Initial Commit

/*
 * Purple Satori Plugin - Satori Protocol Plugin for Purple3
 * Copyright (C) 2025 Gong Zhile
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
 */

#ifndef PURPLE_SATORI_CONNECTION_H
#define PURPLE_SATORI_CONNECTION_H

#include <glib.h>
#include <purple.h>
#include <libsoup/soup.h>

G_BEGIN_DECLS

#define PURPLE_SATORI_HOST	"192.168.1.154:5600"
#define PURPLE_SATORI_WSURL	"ws://" PURPLE_SATORI_HOST "/v1/events"

#define PURPLE_SATORI_PLATFORM	"QQ"
#define PURPLE_SATORI_USER_ID	"3751531667"

#define PURPLE_SATORI_TYPE_CONNECTION (purple_satori_connection_get_type())
G_DECLARE_FINAL_TYPE(PurpleSatoriConnection, purple_satori_connection, PURPLE_SATORI,
                     CONNECTION, PurpleConnection)

G_GNUC_INTERNAL void purple_satori_connection_register(GPluginNativePlugin *plugin);

void
purple_satori_connection_send_and_read_async(PurpleSatoriConnection	*con,
					     SoupMessage		*msg,
					     int			 io_priority,
					     GCancellable		*cancellable,
					     GAsyncReadyCallback	 callback,
					     gpointer			 user_data);

G_END_DECLS

#endif /* PURPLE_SATORI_CONNECTION_H */

mercurial