comparison plugins/perl/common/Gaim.xs @ 6539:1690791f0c70

[gaim-migrate @ 7057] Improved the debug commands for perl scripts. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 21 Aug 2003 01:50:02 +0000
parents 390807f638b1
children fe0294504602
comparison
equal deleted inserted replaced
6538:4bc050b1af34 6539:1690791f0c70
12 void *arg 12 void *arg
13 CODE: 13 CODE:
14 gaim_perl_timeout_add(plugin, seconds, func, arg); 14 gaim_perl_timeout_add(plugin, seconds, func, arg);
15 15
16 void 16 void
17 debug(category, string) 17 debug(level, category, string)
18 const char *level
19 const char *category
20 const char *string
21 CODE:
22 if (!strcmp(level, "misc"))
23 gaim_debug(GAIM_DEBUG_MISC, category, string);
24 else if (!strcmp(level, "info"))
25 gaim_debug(GAIM_DEBUG_INFO, category, string);
26 else if (!strcmp(level, "warning"))
27 gaim_debug(GAIM_DEBUG_WARNING, category, string);
28 else if (!strcmp(level, "error"))
29 gaim_debug(GAIM_DEBUG_ERROR, category, string);
30 else if (!strcmp(level, "fatal"))
31 gaim_debug(GAIM_DEBUG_FATAL, category, string);
32 else
33 croak("Unknown debug level type '%s'", level);
34
35 void
36 debug_misc(category, string)
37 const char *category
38 const char *string
39 CODE:
40 gaim_debug(GAIM_DEBUG_MISC, category, string);
41
42 void
43 debug_info(category, string)
18 const char *category 44 const char *category
19 const char *string 45 const char *string
20 CODE: 46 CODE:
21 gaim_debug(GAIM_DEBUG_INFO, category, string); 47 gaim_debug(GAIM_DEBUG_INFO, category, string);
48
49 void
50 debug_warning(category, string)
51 const char *category
52 const char *string
53 CODE:
54 gaim_debug(GAIM_DEBUG_WARNING, category, string);
55
56 void
57 debug_error(category, string)
58 const char *category
59 const char *string
60 CODE:
61 gaim_debug(GAIM_DEBUG_ERROR, category, string);
62
63 void
64 debug_fatal(category, string)
65 const char *category
66 const char *string
67 CODE:
68 gaim_debug(GAIM_DEBUG_FATAL, category, string);
22 69
23 void 70 void
24 deinit() 71 deinit()
25 PREINIT: 72 PREINIT:
26 GList *l; 73 GList *l;