Mercurial > pidgin.yaz
annotate libpurple/plugins/perl/common/Prpl.xs @ 21969:27d665278485
merge of '7e8103bd3c5298a43a4e18bb59037980f5c213c9'
and 'dc6923294f5f33ff7a52a998e1b9e9ad47be0211'
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Wed, 02 Jan 2008 06:42:29 +0000 |
parents | ced3eaff3465 |
children | 1e5b69e67677 |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 #include "module.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
3 MODULE = Purple::Prpl PACKAGE = Purple::Find PREFIX = purple_find_ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 PROTOTYPES: ENABLE |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
6 Purple::Plugin |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
7 purple_find_prpl(id) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 const char *id |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
10 MODULE = Purple::Prpl PACKAGE = Purple::Prpl PREFIX = purple_prpl_ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 PROTOTYPES: ENABLE |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 void |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
14 purple_prpl_change_account_status(account, old_status, new_status) |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
15 Purple::Account account |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
16 Purple::Status old_status |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
17 Purple::Status new_status |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 void |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
20 purple_prpl_get_statuses(account, presence) |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
21 Purple::Account account |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
22 Purple::Presence presence |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 PREINIT: |
21776
4b33d4185342
A couple more similar leak fixes though some of these still leak if the
Etan Reisner <pidgin@unreliablesource.net>
parents:
15834
diff
changeset
|
24 GList *l, *ll; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 PPCODE: |
21776
4b33d4185342
A couple more similar leak fixes though some of these still leak if the
Etan Reisner <pidgin@unreliablesource.net>
parents:
15834
diff
changeset
|
26 ll = purple_prpl_get_statuses(account,presence); |
4b33d4185342
A couple more similar leak fixes though some of these still leak if the
Etan Reisner <pidgin@unreliablesource.net>
parents:
15834
diff
changeset
|
27 for (l = ll; l != NULL; l = l->next) { |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
28 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Status"))); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 } |
21776
4b33d4185342
A couple more similar leak fixes though some of these still leak if the
Etan Reisner <pidgin@unreliablesource.net>
parents:
15834
diff
changeset
|
30 /* We can free the list here but the script needs to free the |
4b33d4185342
A couple more similar leak fixes though some of these still leak if the
Etan Reisner <pidgin@unreliablesource.net>
parents:
15834
diff
changeset
|
31 * Purple::Status 'objects' itself. */ |
4b33d4185342
A couple more similar leak fixes though some of these still leak if the
Etan Reisner <pidgin@unreliablesource.net>
parents:
15834
diff
changeset
|
32 g_list_free(ll); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 void |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
35 purple_prpl_got_account_idle(account, idle, idle_time) |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
36 Purple::Account account |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 gboolean idle |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 time_t idle_time |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 void |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
41 purple_prpl_got_account_login_time(account, login_time) |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
42 Purple::Account account |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 time_t login_time |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 void |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
46 purple_prpl_got_user_idle(account, name, idle, idle_time) |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
47 Purple::Account account |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 const char *name |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 gboolean idle |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 time_t idle_time |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 void |
15834
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
53 purple_prpl_got_user_login_time(account, name, login_time) |
2f8274ce570a
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15374
diff
changeset
|
54 Purple::Account account |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 const char *name |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 time_t login_time |
21844
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
57 |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
58 int |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
59 purple_prpl_send_raw(gc, str) |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
60 Purple::Connection gc |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
61 const char *str |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
62 PREINIT: |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
63 PurplePluginProtocolInfo *prpl_info; |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
64 CODE: |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
65 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
66 if (prpl_info && prpl_info->send_raw != NULL) { |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
67 RETVAL = prpl_info->send_raw(gc, str, strlen(str)); |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
68 } else { |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
69 RETVAL = 0; |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
70 } |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
71 OUTPUT: |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
72 RETVAL |
ced3eaff3465
Add send_raw to Perl bindings. Patch from martijn. Fixes #3505
Sean Egan <seanegan@gmail.com>
parents:
21776
diff
changeset
|
73 |