diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:18:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:18:39 +0000 |
commit | fff5217f02d91268ce90c8c05665602c059faaef (patch) | |
tree | 2ba24d32dc96eafe7ed0a85269548e76796d849d /src/perl/common/Query.xs | |
parent | Initial commit. (diff) | |
download | irssi-fff5217f02d91268ce90c8c05665602c059faaef.tar.xz irssi-fff5217f02d91268ce90c8c05665602c059faaef.zip |
Adding upstream version 1.4.5.upstream/1.4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/perl/common/Query.xs')
-rw-r--r-- | src/perl/common/Query.xs | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/perl/common/Query.xs b/src/perl/common/Query.xs new file mode 100644 index 0000000..9d8cd52 --- /dev/null +++ b/src/perl/common/Query.xs @@ -0,0 +1,58 @@ +#define PERL_NO_GET_CONTEXT +#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 |