--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satoritypes.h Fri Aug 08 09:46:55 2025 +0800 @@ -0,0 +1,41 @@ +/* + * 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 SATORI_TYPES_H +#define SATORI_TYPES_H + +#include <glib.h> + +typedef enum { + SATORI_WEBSOCKET_OP_EVENT = 0, + SATORI_WEBSOCKET_OP_PING, + SATORI_WEBSOCKET_OP_PONG, + SATORI_WEBSOCKET_OP_IDENTIFY, + SATORI_WEBSOCKET_OP_READY, + SATORI_WEBSOCKET_OP_META, +} SatoriWebsocketOpcode; + +typedef struct { + const gchar *id; + const gchar *name; + const gchar *nick; + const gchar *avatar; + gboolean is_bot; +} SatoriUser; + +#endif /* SATORI_TYPES_H */