Mon, 19 Mar 2007 19:06:57 +0000
merge of e171f61e7083d597d600624755c8543cac7012c1
and 90dc3adee5d20876eb1622470eb5c19406b6f0f1
| 11118 | 1 | #include "module.h" |
| 12882 | 2 | #include "../perl-handlers.h" |
| 11118 | 3 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
4 | MODULE = Purple::Cmd PACKAGE = Purple::Cmd PREFIX = purple_cmd_ |
| 11118 | 5 | PROTOTYPES: ENABLE |
| 6 | ||
| 7 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
8 | purple_cmd_help(conv, command) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
9 | Purple::Conversation conv |
| 12882 | 10 | const gchar *command |
| 11118 | 11 | PREINIT: |
| 12882 | 12 | GList *l; |
| 11118 | 13 | PPCODE: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
14 | for (l = purple_cmd_help(conv, command); l != NULL; l = l->next) { |
| 12892 | 15 | XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
| 12882 | 16 | } |
| 11118 | 17 | |
| 18 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
19 | purple_cmd_list(conv) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
20 | Purple::Conversation conv |
| 11118 | 21 | PREINIT: |
| 12882 | 22 | GList *l; |
| 11118 | 23 | PPCODE: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
24 | for (l = purple_cmd_list(conv); l != NULL; l = l->next) { |
| 12892 | 25 | XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
| 12882 | 26 | } |
| 11118 | 27 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
28 | Purple::Cmd::Id |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
29 | purple_cmd_register(plugin, command, args, priority, flag, prpl_id, func, helpstr, data = 0) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
30 | Purple::Plugin plugin |
| 12882 | 31 | const gchar *command |
| 32 | const gchar *args | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
33 | Purple::Cmd::Priority priority |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
34 | Purple::Cmd::Flag flag |
| 12882 | 35 | const gchar *prpl_id |
| 36 | SV *func | |
| 37 | const gchar *helpstr | |
| 38 | SV *data | |
| 39 | CODE: | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
40 | RETVAL = purple_perl_cmd_register(plugin, command, args, priority, flag, |
| 12882 | 41 | prpl_id, func, helpstr, data); |
| 42 | OUTPUT: | |
| 43 | RETVAL | |
| 44 | ||
| 45 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
46 | purple_cmd_unregister(id) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
47 | Purple::Cmd::Id id |
| 12882 | 48 | CODE: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
49 | purple_perl_cmd_unregister(id); |