summaryrefslogtreecommitdiff
path: root/src/perl/common/Query.xs
blob: 54a0582c8eb35c0e6264bcddb68853f5d0a36c84 (plain)
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
53
54
55
56
57
#include "module.h"

MODULE = Irssi::Query  PACKAGE = Irssi
PROTOTYPES: ENABLE

void
queries()
PREINIT:
	GSList *tmp;
PPCODE:
	for (tmp = queries; tmp != NULL; tmp = tmp->next) {
		QUERY_REC *rec = tmp->data;

		XPUSHs(sv_2mortal(iobject_bless(rec)));
	}

Irssi::Query
query_find(nick)
	char *nick
CODE:
	RETVAL = query_find(NULL, nick);
OUTPUT:
	RETVAL

#*******************************
MODULE = Irssi::Query  PACKAGE = Irssi::Server
#*******************************

void
queries(server)
	Irssi::Server server
PREINIT:
	GSList *tmp;
PPCODE:
	for (tmp = server->queries; tmp != NULL; tmp = tmp->next) {
		QUERY_REC *rec = tmp->data;

		XPUSHs(sv_2mortal(iobject_bless(rec)));
	}

Irssi::Query
query_find(server, nick)
	Irssi::Server server
	char *nick

#*******************************
MODULE = Irssi::Query  PACKAGE = Irssi::Query  PREFIX = query_
#*******************************

void
query_destroy(query)
	Irssi::Query query

void
query_change_server(query, server)
	Irssi::Query query
	Irssi::Server server