libpurple/plugins/perl/common/Connection.xs

Sat, 22 Jun 2013 15:58:44 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 22 Jun 2013 15:58:44 +0530
branch
soc.2013.gobjectification
changeset 34606
bca53cda8ed5
parent 32438
dc8991868906
child 34749
08b47c055830
permissions
-rw-r--r--

Added ciphers and hashes _new functions to .xs files

6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #include "module.h"
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
3 MODULE = Purple::Connection PACKAGE = Purple::Connection PREFIX = purple_connection_
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
4 PROTOTYPES: ENABLE
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5
16773
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
6 BOOT:
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
7 {
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
8 HV *stash = gv_stashpv("Purple::Connection::State", 1);
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
9
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
10 static const constiv *civ, const_iv[] = {
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
11 #define const_iv(name) {#name, (IV)PURPLE_##name}
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
12 const_iv(DISCONNECTED),
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
13 const_iv(CONNECTED),
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
14 const_iv(CONNECTING),
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
15 };
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
16
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
17 for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; )
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
18 newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv));
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
19 }
e1171eb45f07 Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents: 15894
diff changeset
20
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
21 Purple::Account
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
22 purple_connection_get_account(gc)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
23 Purple::Connection gc
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 const char *
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
26 purple_connection_get_password(gc)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
27 Purple::Connection gc
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
28
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
29 const char *
15894
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_connection_get_display_name(gc)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
31 Purple::Connection gc
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
33 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
34 purple_connection_notice(gc, text)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
35 Purple::Connection gc
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
36 const char *text
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
38 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
39 purple_connection_set_state(gc, state)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
40 Purple::Connection gc
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
41 Purple::ConnectionState state
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
42
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
43 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
44 purple_connection_set_account(gc, account)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
45 Purple::Connection gc
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::Account account
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
47
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
48 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
49 purple_connection_set_display_name(gc, name)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
50 Purple::Connection gc
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
51 const char *name
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
52
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
53 Purple::ConnectionState
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
54 purple_connection_get_state(gc)
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
55 Purple::Connection gc
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
56
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
57 MODULE = Purple::Connection PACKAGE = Purple::Connections PREFIX = purple_connections_
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
58 PROTOTYPES: ENABLE
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
59
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
60 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
61 purple_connections_disconnect_all()
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
63 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
64 purple_connections_get_all()
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
65 PREINIT:
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
66 GList *l;
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
67 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
68 for (l = purple_connections_get_all(); l != NULL; l = l->next) {
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
69 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Connection")));
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
70 }
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 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
73 purple_connections_get_connecting()
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 PREINIT:
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 GList *l;
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 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
77 for (l = purple_connections_get_connecting(); l != NULL; l = l->next) {
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
78 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Connection")));
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
79 }
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
80
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
81 Purple::Handle
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
82 purple_connections_get_handle()

mercurial