diff plugins/perl/common/Gaim.xs @ 6520:2e2593d95121

[gaim-migrate @ 7037] Added timeout handler support to perl. It may not work. Probably should, but who knows. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 20 Aug 2003 10:25:58 +0000
parents cbd24b37350d
children 390807f638b1
line wrap: on
line diff
--- a/plugins/perl/common/Gaim.xs	Wed Aug 20 09:33:56 2003 +0000
+++ b/plugins/perl/common/Gaim.xs	Wed Aug 20 10:25:58 2003 +0000
@@ -1,13 +1,33 @@
 #include "module.h"
+#include "../perl-handlers.h"
 
 MODULE = Gaim  PACKAGE = Gaim
 PROTOTYPES: ENABLE
 
 void
-debug(string)
+timeout_add(plugin, seconds, func, arg)
+	Gaim::Plugin plugin
+	int seconds
+	const char *func
+	void *arg
+CODE:
+	gaim_perl_timeout_add(plugin, 1000 * seconds, func, arg);
+
+void
+debug(category, string)
+	const char *category
 	const char *string
 CODE:
-	gaim_debug(GAIM_DEBUG_INFO, "perl script", string);
+	gaim_debug(GAIM_DEBUG_INFO, category, string);
+
+void
+deinit()
+PREINIT:
+	GList *l;
+CODE:
+	gaim_perl_timeout_clear();
+
 
 BOOT:
 	GAIM_PERL_BOOT(Account);
+