summaryrefslogtreecommitdiff
path: root/src/perl/common/Query.xs
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-10-03 19:10:24 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-10-03 19:10:24 +0000
commit391a419a1fce87ea4fef199390e23cbf0dbee589 (patch)
tree4c5d7bfd3c10e3616bba6fba7b2d0d8e62bb8412 /src/perl/common/Query.xs
parent6fc2a3412178385f241efa4c16d7e8b10d392042 (diff)
downloadirssi-391a419a1fce87ea4fef199390e23cbf0dbee589.zip
s/core/common/ - because make clean tried to delete it :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@715 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/common/Query.xs')
-rw-r--r--src/perl/common/Query.xs65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/perl/common/Query.xs b/src/perl/common/Query.xs
new file mode 100644
index 00000000..78004e06
--- /dev/null
+++ b/src/perl/common/Query.xs
@@ -0,0 +1,65 @@
+MODULE = Irssi PACKAGE = Irssi
+
+void
+queries()
+PREINIT:
+ GSList *tmp;
+PPCODE:
+ for (tmp = queries; tmp != NULL; tmp = tmp->next) {
+ QUERY_REC *rec = tmp->data;
+
+ XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
+ irssi_get_stash(rec))));
+ }
+
+#*******************************
+MODULE = Irssi 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(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
+ irssi_get_stash(rec))));
+ }
+
+Irssi::Query
+query_create(chat_type, server, nick, automatic)
+ int chat_type
+ Irssi::Server server
+ char *nick
+ int automatic
+
+Irssi::Query
+query_find(server, nick)
+ Irssi::Server server
+ char *nick
+
+#*******************************
+MODULE = Irssi PACKAGE = Irssi::Query PREFIX = query_
+#*******************************
+
+void
+values(query)
+ Irssi::Query query
+PREINIT:
+ HV *hv;
+PPCODE:
+ hv = newHV();
+ perl_query_fill_hash(hv, query);
+ XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
+
+void
+query_destroy(query)
+ Irssi::Query query
+
+void
+query_change_server(query, server)
+ Irssi::Query query
+ Irssi::Server server