annotate plugins/perl/common/Account.xs @ 10437:446f5f28e8d0

[gaim-migrate @ 11694] sf patch #1090744, from Balwinder Singh Dheeman Adds back a thingy to the perl API committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 27 Dec 2004 20:48:41 +0000
parents ce098e226486
children 1a97d5e88d12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #include "module.h"
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 MODULE = Gaim::Account PACKAGE = Gaim::Account PREFIX = gaim_account_
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5
10437
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
6 Gaim::Connection
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
7 gaim_account_connect(account)
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
8 Gaim::Account account
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
9 CODE:
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
10 RETVAL = gaim_account_connect(account,
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
11 gaim_account_get_status(account, "online"));
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
12 OUTPUT:
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
13 RETVAL
446f5f28e8d0 [gaim-migrate @ 11694]
Mark Doliner <mark@kingant.net>
parents: 10404
diff changeset
14
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 gaim_account_disconnect(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 gaim_account_set_username(account, username)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 const char *username
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 gaim_account_set_password(account, password)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 const char *password
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 gaim_account_set_alias(account, alias)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 const char *alias
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 gaim_account_set_user_info(account, user_info)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 const char *user_info
6523
d7e04709be96 [gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
38 CODE:
d7e04709be96 [gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
39 gaim_account_set_user_info(account, user_info);
d7e04709be96 [gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
40 serv_set_info(gaim_account_get_connection(account), user_info);
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 gaim_account_set_buddy_icon(account, buddy_icon)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 const char *buddy_icon
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 gaim_account_set_protocol_id(account, protocol_id)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 const char *protocol_id
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 gaim_account_set_remember_password(account, value)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 gboolean value
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 gaim_account_set_check_mail(account, value)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 gboolean value
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 gboolean
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 gaim_account_is_connected(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 const char *
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 gaim_account_get_username(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 const char *
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 gaim_account_get_password(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 const char *
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 gaim_account_get_alias(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 const char *
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 gaim_account_get_user_info(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 const char *
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 gaim_account_get_buddy_icon(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 const char *
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 gaim_account_get_protocol_id(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 Gaim::Connection
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 gaim_account_get_connection(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94 gboolean
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 gaim_account_get_remember_password(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 gboolean
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 gaim_account_get_check_mail(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 MODULE = Gaim::Account PACKAGE = Gaim::Accounts PREFIX = gaim_accounts_
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 gaim_accounts_add(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 gaim_accounts_remove(account)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 Gaim::Account account
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112
6595
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
113 Gaim::Account
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
114 find(name, protocol_id)
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
115 const char *name
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
116 const char *protocol_id
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
117 CODE:
7176
57478df4faf8 [gaim-migrate @ 7744]
Nathan Walp <nwalp@pidgin.im>
parents: 6595
diff changeset
118 RETVAL = gaim_accounts_find(name, protocol_id);
6595
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
119 OUTPUT:
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
120 RETVAL
782eef79cf3c [gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents: 6551
diff changeset
121
6551
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
122 void *
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
123 handle()
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
124 CODE:
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
125 RETVAL = gaim_accounts_get_handle();
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
126 OUTPUT:
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
127 RETVAL
12343e2aaab1 [gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
128
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 MODULE = Gaim::Account PACKAGE = Gaim
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 void
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 accounts()
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 PREINIT:
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 GList *l;
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 PPCODE:
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 for (l = gaim_accounts_get_all(); l != NULL; l = l->next)
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account")));
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139