~aleteoryx/sexchat

ref: 7bcf0afcdb0263caa2fc6588284bb8dbfb198373 sexchat/src/common/batch.h -rw-r--r-- 1.5 KiB
7bcf0afcAleteoryx basic batch support 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* sexchat
 * Copyright (C) 2025 Aleteoryx.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#include "hexchat.h"

#ifndef HEXCHAT_BATCH_H
#define HEXCHAT_BATCH_H

enum {
	BATCH_SOJUIM_BOUNCER_NETWORKS, // soju.im/bouncer-networks
	BATCH_REPLAY, // fallback, no special handling other than being deferred till batch end
};

struct batch {
	int type;
	char *reftag;
};

struct batch_sojuim_bouncer_networks {
	int type; // BATCH_SOJUIM_BOUNCER_NETWORKS
	char *reftag;
	GSList *networks;
};

struct batch_replay {
	int type; // BATCH_REPLAY
	char *reftag;
	GSList *messages;
};


void batch_new (ircconn *serv, char *reftag, char *type, char **args);
gboolean batch_event (ircconn *serv, char *reftag, char *raw, char **word, char **word_eol);
void batch_finalize (ircconn *serv, char *reftag);
struct batch *batch_lookup (ircconn *serv, char *reftag);

#endif