Sat, 22 Jun 2013 15:58:44 +0530
Added ciphers and hashes _new functions to .xs files
| 11118 | 1 | #include "module.h" |
| 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::Serv PACKAGE = Purple::Serv PREFIX = serv_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
| 6 | ||
| 7 | void | |
| 8 | serv_add_deny(con, a) | |
|
15894
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::Connection con |
| 11118 | 10 | const char * a |
| 11 | ||
| 12 | void | |
| 13 | serv_add_permit(a, b) | |
|
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 | Purple::Connection a |
| 11118 | 15 | const char * b |
| 16 | ||
| 17 | void | |
| 18 | serv_alias_buddy(buddy) | |
|
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::BuddyList::Buddy buddy |
| 11118 | 20 | |
| 21 | void | |
| 22 | serv_chat_invite(con, a, b, c) | |
|
15894
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 con |
| 11118 | 24 | int a |
| 25 | const char * b | |
| 26 | const char * c | |
| 27 | ||
| 28 | void | |
| 29 | serv_chat_leave(a, b) | |
|
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 a |
| 11118 | 31 | int b |
| 32 | ||
| 33 | int | |
|
12216
d80739091a63
[gaim-migrate @ 14518]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11975
diff
changeset
|
34 | serv_chat_send(con, a, b, flags) |
|
15894
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 con |
| 11118 | 36 | int a |
| 37 | const char * b | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
38 | Purple::MessageFlags flags |
| 11118 | 39 | |
| 40 | void | |
| 41 | serv_chat_whisper(con, a, b, c) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
42 | Purple::Connection con |
| 11118 | 43 | int a |
| 44 | const char * b | |
| 45 | const char * c | |
| 46 | ||
| 47 | void | |
| 48 | serv_get_info(con, a) | |
|
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 con |
| 11118 | 50 | const char * a |
| 51 | ||
| 52 | void | |
| 53 | serv_got_alias(gc, who, alias) | |
|
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 gc |
| 11118 | 55 | const char *who |
| 56 | const char *alias | |
| 57 | ||
| 58 | void | |
| 59 | serv_got_chat_in(g, id, who, chatflags, message, mtime) | |
|
15894
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 g |
| 11118 | 61 | int id |
| 62 | const char *who | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
63 | Purple::MessageFlags chatflags |
| 11118 | 64 | const char *message |
| 65 | time_t mtime | |
| 66 | ||
| 67 | void | |
| 68 | serv_got_chat_invite(gc, name, who, message, components) | |
|
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::Connection gc |
| 11118 | 70 | const char *name |
| 71 | const char *who | |
| 72 | const char *message | |
| 73 | SV * components | |
| 74 | INIT: | |
| 75 | HV * t_HV; | |
| 76 | HE * t_HE; | |
| 77 | SV * t_SV; | |
| 78 | GHashTable * t_GHash; | |
| 79 | I32 len; | |
| 80 | char *t_key, *t_value; | |
| 81 | CODE: | |
| 82 | t_HV = (HV *)SvRV(components); | |
|
15203
1a092806f344
[gaim-migrate @ 17927]
Mark Doliner <markdoliner@pidgin.im>
parents:
15043
diff
changeset
|
83 | t_GHash = g_hash_table_new(g_str_hash, g_str_equal); |
| 11118 | 84 | |
| 85 | for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { | |
| 86 | t_key = hv_iterkey(t_HE, &len); | |
| 87 | t_SV = *hv_fetch(t_HV, t_key, len, 0); | |
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
15894
diff
changeset
|
88 | t_value = SvPVutf8_nolen(t_SV); |
| 11118 | 89 | |
| 90 | g_hash_table_insert(t_GHash, t_key, t_value); | |
| 91 | } | |
| 92 | serv_got_chat_invite(gc, name, who, message, t_GHash); | |
| 93 | ||
| 94 | void | |
| 95 | serv_got_chat_left(g, id) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
96 | Purple::Connection g |
| 11118 | 97 | int id |
| 98 | ||
| 99 | void | |
| 100 | serv_got_im(gc, who, msg, imflags, mtime) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
101 | Purple::Connection gc |
| 11118 | 102 | const char *who |
| 103 | const char *msg | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
104 | Purple::MessageFlags imflags |
| 11118 | 105 | time_t mtime |
| 106 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
107 | Purple::Conversation |
| 11118 | 108 | serv_got_joined_chat(gc, id, name) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
109 | Purple::Connection gc |
| 11118 | 110 | int id |
| 111 | const char *name | |
| 112 | ||
| 113 | void | |
| 114 | serv_got_typing(gc, name, timeout, state) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
115 | Purple::Connection gc |
| 11118 | 116 | const char *name |
| 117 | int timeout | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
118 | Purple::TypingState state |
| 11118 | 119 | |
| 120 | void | |
| 121 | serv_got_typing_stopped(gc, name) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
122 | Purple::Connection gc |
| 11118 | 123 | const char *name |
| 124 | ||
|
25590
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
125 | void |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
126 | serv_join_chat(conn, components) |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
127 | Purple::Connection conn |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
128 | HV * components |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
129 | PREINIT: |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
130 | HE *t_HE; |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
131 | SV *t_SV; |
| 11118 | 132 | I32 len; |
|
25590
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
133 | GHashTable *t_GHash; |
| 11118 | 134 | char *t_key, *t_value; |
| 135 | CODE: | |
|
15203
1a092806f344
[gaim-migrate @ 17927]
Mark Doliner <markdoliner@pidgin.im>
parents:
15043
diff
changeset
|
136 | t_GHash = g_hash_table_new(g_str_hash, g_str_equal); |
| 11118 | 137 | |
|
25590
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
138 | for (t_HE = hv_iternext(components); t_HE != NULL; |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
139 | t_HE = hv_iternext(components)) { |
| 11118 | 140 | t_key = hv_iterkey(t_HE, &len); |
|
25590
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
141 | t_SV = *hv_fetch(components, t_key, len, 0); |
|
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
142 | t_value = SvPVutf8_nolen(t_SV); |
| 11118 | 143 | |
| 144 | g_hash_table_insert(t_GHash, t_key, t_value); | |
| 145 | } | |
|
25590
5f663e07dfb7
Let XS do the argument checking/erroring for us for the components argument to
Etan Reisner <deryni@pidgin.im>
parents:
23980
diff
changeset
|
146 | serv_join_chat(conn, t_GHash); |
|
30758
5a5136914b3b
perl: Fix chat-related functions.
Paul Aurich <darkrain42@pidgin.im>
parents:
25590
diff
changeset
|
147 | g_hash_table_destroy(t_GHash); |
| 11118 | 148 | |
| 149 | void | |
| 150 | serv_move_buddy(buddy, group1, group2) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
151 | Purple::BuddyList::Buddy buddy |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
152 | Purple::BuddyList::Group group1 |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
153 | Purple::BuddyList::Group group2 |
| 11118 | 154 | |
| 155 | void | |
| 156 | serv_reject_chat(con, components) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
157 | Purple::Connection con |
| 11118 | 158 | SV * components |
| 159 | INIT: | |
| 160 | HV * t_HV; | |
| 161 | HE * t_HE; | |
| 162 | SV * t_SV; | |
| 163 | GHashTable * t_GHash; | |
| 164 | I32 len; | |
| 165 | char *t_key, *t_value; | |
| 166 | CODE: | |
| 167 | t_HV = (HV *)SvRV(components); | |
|
15203
1a092806f344
[gaim-migrate @ 17927]
Mark Doliner <markdoliner@pidgin.im>
parents:
15043
diff
changeset
|
168 | t_GHash = g_hash_table_new(g_str_hash, g_str_equal); |
| 11118 | 169 | |
| 170 | for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { | |
| 171 | t_key = hv_iterkey(t_HE, &len); | |
| 172 | t_SV = *hv_fetch(t_HV, t_key, len, 0); | |
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
15894
diff
changeset
|
173 | t_value = SvPVutf8_nolen(t_SV); |
| 11118 | 174 | |
| 175 | g_hash_table_insert(t_GHash, t_key, t_value); | |
| 176 | } | |
| 177 | serv_reject_chat(con, t_GHash); | |
| 178 | ||
| 179 | void | |
| 180 | serv_rem_deny(con, a) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
181 | Purple::Connection con |
| 11118 | 182 | const char * a |
| 183 | ||
| 184 | void | |
| 185 | serv_rem_permit(con, a) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
186 | Purple::Connection con |
|
11643
f04408721780
[gaim-migrate @ 13920]
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
11290
diff
changeset
|
187 | const char * a |
| 11118 | 188 | |
| 189 | void | |
| 190 | serv_send_file(gc, who, file) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
191 | Purple::Connection gc |
| 11118 | 192 | const char *who |
| 193 | const char *file | |
| 194 | ||
| 195 | int | |
| 196 | serv_send_im(con, a, b, flags ) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
197 | Purple::Connection con |
| 11118 | 198 | const char * a |
| 199 | const char * b | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
200 | Purple::MessageFlags flags |
| 11118 | 201 | |
| 202 | int | |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
12216
diff
changeset
|
203 | serv_send_typing(con, a, state) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
204 | Purple::Connection con |
| 11118 | 205 | const char * a |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
206 | Purple::TypingState state |
| 11118 | 207 | |
| 208 | void | |
| 209 | serv_set_info(con, a) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
210 | Purple::Connection con |
| 11118 | 211 | const char * a |
| 212 | ||
| 213 | void | |
| 214 | serv_set_permit_deny(con) | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
215 | Purple::Connection con |
| 11118 | 216 |