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