libpurple/plugins/perl/common/Connection.xs

Mon, 03 Feb 2014 22:40:31 +0530

author
Ankit Vani <a@nevitus.org>
date
Mon, 03 Feb 2014 22:40:31 +0530
branch
gtkdoc-conversion
changeset 35436
a69d2e5604c5
parent 34985
f7ff90f6c9c6
permissions
-rw-r--r--

Swap @title and @short_description roles

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[] = {
34749
08b47c055830 Made libpurple plugins compile with initial GObject connection API
Ankit Vani <a@nevitus.org>
parents: 32438
diff changeset
11 #define const_iv(name) {#name, (IV)PURPLE_CONNECTION_##name}
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
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
34750
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
29 void
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
30 purple_connection_get_active_chats(gc)
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
31 Purple::Connection gc
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
32 PREINIT:
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
33 GSList *l;
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
34 PPCODE:
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
35 for (l = purple_connection_get_active_chats(gc); l != NULL; l = l->next) {
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
36 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::ChatConversation")));
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
37 }
826c1611ef90 Refactored protocols to use the initial GObject connection API.
Ankit Vani <a@nevitus.org>
parents: 34749
diff changeset
38
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
39 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
40 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
41 Purple::Connection gc
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42
12787
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_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
45 Purple::Connection gc
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
46 const char *text
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47
12787
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_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
50 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
51 Purple::ConnectionState state
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
52
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
53 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
54 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
55 Purple::Connection gc
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
56 const char *name
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
57
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
58 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
59 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
60 Purple::Connection gc
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
61
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
62 MODULE = Purple::Connection PACKAGE = Purple::Connections PREFIX = purple_connections_
12787
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
63 PROTOTYPES: ENABLE
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
64
5a9252acf655 [gaim-migrate @ 15134]
Etan Reisner <deryni@pidgin.im>
parents: 11290
diff changeset
65 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
66 purple_connections_disconnect_all()
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
68 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
69 purple_connections_get_all()
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
70 PREINIT:
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
71 GList *l;
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
72 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
73 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
74 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
75 }
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 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
78 purple_connections_get_connecting()
6584
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 PREINIT:
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 GList *l;
9785a533d08e [gaim-migrate @ 7106]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 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
82 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
83 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
84 }
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents: 6584
diff changeset
85
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
86 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
87 purple_connections_get_handle()

mercurial