Mon, 18 Jul 2005 13:37:38 +0000
[gaim-migrate @ 13174]
Some new xsubs for the perl interpreter and a work around to get it all working again.
| 11118 | 1 | |
| 2 | #include "module.h" | |
| 3 | ||
| 4 | /* TODO | |
| 5 | ||
| 6 | ||
| 7 | void | |
| 8 | gaim_status_type_add_attrs(status_type, id, name, value, gaim_status_type_add_attrs) | |
| 9 | Gaim::StatusType status_type | |
| 10 | const char *id | |
| 11 | const char *name | |
| 12 | Gaim::Value value | |
| 13 | ... | |
| 14 | ||
| 15 | ||
| 16 | Gaim::StatusType | |
| 17 | gaim_status_type_new_with_attrs(primitive, id, name, saveable, user_settable, independent, attr_id, attr_name, attr_value, gaim_status_type_new_with_attrs) | |
| 18 | Gaim::StatusPrimitive primitive | |
| 19 | const char *id | |
| 20 | const char *name | |
| 21 | gboolean saveable | |
| 22 | gboolean user_settable | |
| 23 | gboolean independent | |
| 24 | const char *attr_id | |
| 25 | const char *attr_name | |
| 26 | Gaim::Value attr_value | |
| 27 | ... | |
| 28 | ||
| 29 | void | |
| 30 | gaim_presence_add_list(presence, source_list) | |
| 31 | Gaim::Presence presence | |
| 32 | SV *source_list | |
| 33 | PREINIT: | |
| 34 | GList *t_GL; | |
| 35 | int i, t_len; | |
| 36 | PPCODE: | |
| 37 | t_GL = NULL; | |
| 38 | t_len = av_len((AV *)SvRV(source_list)); | |
| 39 | ||
| 40 | for (i = 0; i < t_len; i++) { | |
| 41 | STRLEN t_sl; | |
| 42 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(source_list), i, 0), t_sl)); | |
| 43 | } | |
| 44 | gaim_presence_add_list(presence, t_GL); | |
| 45 | ||
| 46 | */ | |
| 47 | ||
| 48 | MODULE = Gaim::Status PACKAGE = Gaim::Presence PREFIX = gaim_presence_ | |
| 49 | PROTOTYPES: ENABLE | |
| 50 | ||
| 51 | void | |
| 52 | gaim_presence_add_status(presence, status) | |
| 53 | Gaim::Presence presence | |
| 54 | Gaim::Status status | |
| 55 | ||
| 56 | gint | |
| 57 | gaim_presence_compare(presence1, presence2) | |
| 58 | Gaim::Presence presence1 | |
| 59 | Gaim::Presence presence2 | |
| 60 | ||
| 61 | void | |
| 62 | gaim_presence_destroy(presence) | |
| 63 | Gaim::Presence presence | |
| 64 | ||
| 65 | Gaim::Account | |
| 66 | gaim_presence_get_account(presence) | |
| 67 | Gaim::Presence presence | |
| 68 | ||
| 69 | Gaim::Status | |
| 70 | gaim_presence_get_active_status(presence) | |
| 71 | Gaim::Presence presence | |
| 72 | ||
| 73 | void | |
| 74 | gaim_presence_get_buddies(presence) | |
| 75 | Gaim::Presence presence | |
| 76 | PREINIT: | |
| 77 | GList *l; | |
| 78 | PPCODE: | |
| 79 | for (l = gaim_presence_get_buddies(presence); l != NULL; l = l->next) { | |
| 80 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem"))); | |
| 81 | } | |
| 82 | ||
| 83 | const char * | |
| 84 | gaim_presence_get_chat_user(presence) | |
| 85 | Gaim::Presence presence | |
| 86 | ||
| 87 | Gaim::PresenceContext | |
| 88 | gaim_presence_get_context(presence) | |
| 89 | Gaim::Presence presence | |
| 90 | ||
| 91 | Gaim::Conversation | |
| 92 | gaim_presence_get_conversation(presence) | |
| 93 | Gaim::Presence presence | |
| 94 | ||
| 95 | time_t | |
| 96 | gaim_presence_get_idle_time(presence) | |
| 97 | Gaim::Presence presence | |
| 98 | ||
| 99 | time_t | |
| 100 | gaim_presence_get_login_time(presence) | |
| 101 | Gaim::Presence presence | |
| 102 | ||
| 103 | Gaim::Status | |
| 104 | gaim_presence_get_status(presence, status_id) | |
| 105 | Gaim::Presence presence | |
| 106 | const char *status_id | |
| 107 | ||
| 108 | void | |
| 109 | gaim_presence_get_statuses(presence) | |
| 110 | Gaim::Presence presence | |
| 111 | PREINIT: | |
| 112 | GList *l; | |
| 113 | PPCODE: | |
| 114 | for (l = gaim_presence_get_statuses(presence); l != NULL; l = l->next) { | |
| 115 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem"))); | |
| 116 | } | |
| 117 | ||
| 118 | unsigned int | |
| 119 | gaim_presence_get_warning_level(presence) | |
| 120 | Gaim::Presence presence | |
| 121 | ||
| 122 | gboolean | |
| 123 | gaim_presence_is_available(presence) | |
| 124 | Gaim::Presence presence | |
| 125 | ||
| 126 | gboolean | |
| 127 | gaim_presence_is_idle(presence) | |
| 128 | Gaim::Presence presence | |
| 129 | ||
| 130 | gboolean | |
| 131 | gaim_presence_is_online(presence) | |
| 132 | Gaim::Presence presence | |
| 133 | ||
| 134 | gboolean | |
| 135 | gaim_presence_is_status_active(presence, status_id) | |
| 136 | Gaim::Presence presence | |
| 137 | const char *status_id | |
| 138 | ||
| 139 | gboolean | |
| 140 | gaim_presence_is_status_primitive_active(presence, primitive) | |
| 141 | Gaim::Presence presence | |
| 142 | Gaim::StatusPrimitive primitive | |
| 143 | ||
| 144 | Gaim::Presence | |
| 145 | gaim_presence_new(context) | |
| 146 | Gaim::PresenceContext context | |
| 147 | ||
| 148 | Gaim::Presence | |
| 149 | gaim_presence_new_for_account(account) | |
| 150 | Gaim::Account account | |
| 151 | ||
| 152 | Gaim::Presence | |
| 153 | gaim_presence_new_for_buddy(buddy) | |
| 154 | Gaim::BuddyList::Buddy buddy | |
| 155 | ||
| 156 | Gaim::Presence | |
| 157 | gaim_presence_new_for_conv(conv) | |
| 158 | Gaim::Conversation conv | |
| 159 | ||
| 160 | void | |
| 161 | gaim_presence_remove_buddy(presence, buddy) | |
| 162 | Gaim::Presence presence | |
| 163 | Gaim::BuddyList::Buddy buddy | |
| 164 | ||
| 165 | void | |
| 166 | gaim_presence_set_idle(presence, idle, idle_time) | |
| 167 | Gaim::Presence presence | |
| 168 | gboolean idle | |
| 169 | time_t idle_time | |
| 170 | ||
| 171 | void | |
| 172 | gaim_presence_set_login_time(presence, login_time) | |
| 173 | Gaim::Presence presence | |
| 174 | time_t login_time | |
| 175 | ||
| 176 | void | |
| 177 | gaim_presence_set_status_active(presence, status_id, active) | |
| 178 | Gaim::Presence presence | |
| 179 | const char *status_id | |
| 180 | gboolean active | |
| 181 | ||
| 182 | void | |
| 183 | gaim_presence_set_warning_level(presence, level) | |
| 184 | Gaim::Presence presence | |
| 185 | unsigned int level | |
| 186 | ||
| 187 | void | |
| 188 | gaim_presence_switch_status(presence, status_id) | |
| 189 | Gaim::Presence presence | |
| 190 | const char *status_id | |
| 191 | ||
| 192 | const char * | |
| 193 | gaim_primitive_get_id_from_type(type) | |
| 194 | Gaim::StatusPrimitive type | |
| 195 | ||
| 196 | const char * | |
| 197 | gaim_primitive_get_name_from_type(type) | |
| 198 | Gaim::StatusPrimitive type | |
| 199 | ||
| 200 | Gaim::StatusPrimitive | |
| 201 | gaim_primitive_get_type_from_id(id) | |
| 202 | const char *id | |
| 203 | ||
| 204 | MODULE = Gaim::Status PACKAGE = Gaim::Status PREFIX = gaim_status_ | |
| 205 | PROTOTYPES: ENABLE | |
| 206 | ||
| 207 | void | |
| 208 | gaim_status_attr_destroy(attr) | |
| 209 | Gaim::StatusAttr attr | |
| 210 | ||
| 211 | const char * | |
| 212 | gaim_status_attr_get_id(attr) | |
| 213 | Gaim::StatusAttr attr | |
| 214 | ||
| 215 | const char * | |
| 216 | gaim_status_attr_get_name(attr) | |
| 217 | Gaim::StatusAttr attr | |
| 218 | ||
| 219 | Gaim::Value | |
| 220 | gaim_status_attr_get_value_type(attr) | |
| 221 | Gaim::StatusAttr attr | |
| 222 | ||
| 223 | Gaim::StatusAttr | |
| 224 | gaim_status_attr_new(id, name, value_type) | |
| 225 | const char *id | |
| 226 | const char *name | |
| 227 | Gaim::Value value_type | |
| 228 | ||
| 229 | gint | |
| 230 | gaim_status_compare(status1, status2) | |
| 231 | Gaim::Status status1 | |
| 232 | Gaim::Status status2 | |
| 233 | ||
| 234 | void | |
| 235 | gaim_status_destroy(status) | |
| 236 | Gaim::Status status | |
| 237 | ||
| 238 | gboolean | |
| 239 | gaim_status_get_attr_boolean(status, id) | |
| 240 | Gaim::Status status | |
| 241 | const char *id | |
| 242 | ||
| 243 | int | |
| 244 | gaim_status_get_attr_int(status, id) | |
| 245 | Gaim::Status status | |
| 246 | const char *id | |
| 247 | ||
| 248 | const char * | |
| 249 | gaim_status_get_attr_string(status, id) | |
| 250 | Gaim::Status status | |
| 251 | const char *id | |
| 252 | ||
| 253 | Gaim::Value | |
| 254 | gaim_status_get_attr_value(status, id) | |
| 255 | Gaim::Status status | |
| 256 | const char *id | |
| 257 | ||
| 258 | void * | |
| 259 | gaim_status_get_handle() | |
| 260 | ||
| 261 | ||
| 262 | const char * | |
| 263 | gaim_status_get_id(status) | |
| 264 | Gaim::Status status | |
| 265 | ||
| 266 | const char * | |
| 267 | gaim_status_get_name(status) | |
| 268 | Gaim::Status status | |
| 269 | ||
| 270 | Gaim::Presence | |
| 271 | gaim_status_get_presence(status) | |
| 272 | Gaim::Status status | |
| 273 | ||
| 274 | Gaim::StatusType | |
| 275 | gaim_status_get_type(status) | |
| 276 | Gaim::Status status | |
| 277 | ||
| 278 | void | |
| 279 | gaim_status_init() | |
| 280 | ||
| 281 | ||
| 282 | gboolean | |
| 283 | gaim_status_is_active(status) | |
| 284 | Gaim::Status status | |
| 285 | ||
| 286 | gboolean | |
| 287 | gaim_status_is_available(status) | |
| 288 | Gaim::Status status | |
| 289 | ||
| 290 | gboolean | |
| 291 | gaim_status_is_exclusive(status) | |
| 292 | Gaim::Status status | |
| 293 | ||
| 294 | gboolean | |
| 295 | gaim_status_is_independent(status) | |
| 296 | Gaim::Status status | |
| 297 | ||
| 298 | gboolean | |
| 299 | gaim_status_is_online(status) | |
| 300 | Gaim::Status status | |
| 301 | ||
| 302 | Gaim::Status | |
| 303 | gaim_status_new(status_type, presence) | |
| 304 | Gaim::StatusType status_type | |
| 305 | Gaim::Presence presence | |
| 306 | ||
| 307 | void | |
| 308 | gaim_status_set_active(status, active) | |
| 309 | Gaim::Status status | |
| 310 | gboolean active | |
| 311 | ||
| 312 | void | |
| 313 | gaim_status_set_active_with_attrs(status, active, args) | |
| 314 | Gaim::Status status | |
| 315 | gboolean active | |
| 316 | va_list args | |
| 317 | ||
| 318 | void | |
| 319 | gaim_status_set_attr_boolean(status, id, value) | |
| 320 | Gaim::Status status | |
| 321 | const char *id | |
| 322 | gboolean value | |
| 323 | ||
| 324 | void | |
| 325 | gaim_status_set_attr_string(status, id, value) | |
| 326 | Gaim::Status status | |
| 327 | const char *id | |
| 328 | const char *value | |
| 329 | ||
| 330 | void | |
| 331 | gaim_status_type_add_attr(status_type, id, name, value) | |
| 332 | Gaim::StatusType status_type | |
| 333 | const char *id | |
| 334 | const char *name | |
| 335 | Gaim::Value value | |
| 336 | ||
| 337 | ||
| 338 | void | |
| 339 | gaim_status_type_add_attrs_vargs(status_type, args) | |
| 340 | Gaim::StatusType status_type | |
| 341 | va_list args | |
| 342 | ||
| 343 | void | |
| 344 | gaim_status_type_destroy(status_type) | |
| 345 | Gaim::StatusType status_type | |
| 346 | ||
| 347 | Gaim::StatusType | |
| 348 | gaim_status_type_find_with_id(status_types, id) | |
| 349 | SV *status_types | |
| 350 | const char *id | |
| 351 | PREINIT: | |
| 352 | GList *t_GL; | |
| 353 | int i, t_len; | |
| 354 | PPCODE: | |
| 355 | t_GL = NULL; | |
| 356 | t_len = av_len((AV *)SvRV(status_types)); | |
| 357 | ||
| 358 | for (i = 0; i < t_len; i++) { | |
| 359 | STRLEN t_sl; | |
| 360 | t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(status_types), i, 0), t_sl)); | |
| 361 | } | |
| 362 | gaim_status_type_find_with_id(t_GL, id); | |
| 363 | ||
| 364 | Gaim::StatusAttr | |
| 365 | gaim_status_type_get_attr(status_type, id) | |
| 366 | Gaim::StatusType status_type | |
| 367 | const char *id | |
| 368 | ||
| 369 | void | |
| 370 | gaim_status_type_get_attrs(status_type) | |
| 371 | Gaim::StatusType status_type | |
| 372 | PREINIT: | |
| 373 | GList *l; | |
| 374 | PPCODE: | |
| 375 | for (l = gaim_status_type_get_attrs(status_type); l != NULL; l = l->next) { | |
| 376 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem"))); | |
| 377 | } | |
| 378 | ||
| 379 | const char * | |
| 380 | gaim_status_type_get_id(status_type) | |
| 381 | Gaim::StatusType status_type | |
| 382 | ||
| 383 | const char * | |
| 384 | gaim_status_type_get_name(status_type) | |
| 385 | Gaim::StatusType status_type | |
| 386 | ||
| 387 | const char * | |
| 388 | gaim_status_type_get_primary_attr(type) | |
| 389 | Gaim::StatusType type | |
| 390 | ||
| 391 | Gaim::StatusPrimitive | |
| 392 | gaim_status_type_get_primitive(status_type) | |
| 393 | Gaim::StatusType status_type | |
| 394 | ||
| 395 | gboolean | |
| 396 | gaim_status_type_is_available(status_type) | |
| 397 | Gaim::StatusType status_type | |
| 398 | ||
| 399 | gboolean | |
| 400 | gaim_status_type_is_exclusive(status_type) | |
| 401 | Gaim::StatusType status_type | |
| 402 | ||
| 403 | gboolean | |
| 404 | gaim_status_type_is_independent(status_type) | |
| 405 | Gaim::StatusType status_type | |
| 406 | ||
| 407 | gboolean | |
| 408 | gaim_status_type_is_saveable(status_type) | |
| 409 | Gaim::StatusType status_type | |
| 410 | ||
| 411 | gboolean | |
| 412 | gaim_status_type_is_user_settable(status_type) | |
| 413 | Gaim::StatusType status_type | |
| 414 | ||
| 415 | Gaim::StatusType | |
| 416 | gaim_status_type_new(primitive, id, name, user_settable) | |
| 417 | Gaim::StatusPrimitive primitive | |
| 418 | const char *id | |
| 419 | const char *name | |
| 420 | gboolean user_settable | |
| 421 | ||
| 422 | Gaim::StatusType | |
| 423 | gaim_status_type_new_full(primitive, id, name, saveable, user_settable, independent) | |
| 424 | Gaim::StatusPrimitive primitive | |
| 425 | const char *id | |
| 426 | const char *name | |
| 427 | gboolean saveable | |
| 428 | gboolean user_settable | |
| 429 | gboolean independent | |
| 430 | ||
| 431 | void | |
| 432 | gaim_status_type_set_primary_attr(status_type, attr_id) | |
| 433 | Gaim::StatusType status_type | |
| 434 | const char *attr_id | |
| 435 | ||
| 436 | void | |
| 437 | gaim_status_uninit() | |
| 438 | ||
| 439 |