Mercurial > pidgin.yaz
comparison src/prpl.c @ 10006:9baedaca25c7
[gaim-migrate @ 10923]
This is a patch from Dave West. He says it makes people show up as
online/offline for him. It crashes for me.
I've changed some things from his patch, so I'm gonna commit it
and let people work from there. I feel it's a step in the right
direction.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 10 Sep 2004 04:09:36 +0000 |
parents | ced29c7b396c |
children | 267a2b69e36e |
comparison
equal
deleted
inserted
replaced
10005:c892b6dbc341 | 10006:9baedaca25c7 |
---|---|
254 if (login_time == 0) | 254 if (login_time == 0) |
255 login_time = time(NULL); | 255 login_time = time(NULL); |
256 | 256 |
257 presence = gaim_buddy_get_presence(buddy); | 257 presence = gaim_buddy_get_presence(buddy); |
258 | 258 |
259 /* | 259 gaim_presence_set_login_time(presence, login_time); |
260 * TODO: Set a presence's sign-on time. We don't support this yet. | |
261 */ | |
262 gaim_debug_warning("prpl", | |
263 "Attempting to set a user's sign-on time, but we " | |
264 "don't support this yet! FIX IT!\n"); | |
265 } | 260 } |
266 | 261 |
267 void | 262 void |
268 gaim_prpl_got_user_status(GaimAccount *account, const char *name, | 263 gaim_prpl_got_user_status(GaimAccount *account, const char *name, |
269 const char *status_id, const char *attr_id, ...) | 264 const char *status_id, const char *attr_id, ...) |
337 | 332 |
338 if (prpl_info->set_status != NULL) | 333 if (prpl_info->set_status != NULL) |
339 prpl_info->set_status(account, status); | 334 prpl_info->set_status(account, status); |
340 } | 335 } |
341 | 336 |
337 GList * | |
338 gaim_prpl_get_statuses(GaimAccount *account, GaimPresence *presence) | |
339 { | |
340 GaimPlugin *prpl; | |
341 GaimPluginProtocolInfo *prpl_info; | |
342 GList *statuses = NULL; | |
343 GList *l; | |
344 GaimStatus *status; | |
345 | |
346 g_return_val_if_fail(account != NULL, NULL); | |
347 g_return_val_if_fail(presence != NULL, NULL); | |
348 | |
349 prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); | |
350 | |
351 if (prpl == NULL) | |
352 return NULL; | |
353 | |
354 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); | |
355 if (prpl_info == NULL || prpl_info->status_types == NULL) | |
356 return NULL; | |
357 | |
358 for (l = prpl_info->status_types(account); l != NULL; l = l->next) | |
359 { | |
360 status = gaim_status_new((GaimStatusType *)l->data, presence); | |
361 statuses = g_list_append(statuses, status); | |
362 } | |
363 | |
364 return statuses; | |
365 } | |
366 | |
342 | 367 |
343 /************************************************************************** | 368 /************************************************************************** |
344 * Protocol Plugin Subsystem API | 369 * Protocol Plugin Subsystem API |
345 **************************************************************************/ | 370 **************************************************************************/ |
346 | 371 |