Mercurial > pidgin.yaz
comparison libpurple/prpl.c @ 26213:ff4212a5268f
propagate from branch 'im.pidgin.pidgin' (head 431618de0f30a6938f7e14d2d61ee5d7738acd59)
to branch 'im.pidgin.pidgin.vv' (head 8df00cb1a28baa69d0a68e0e96af201ec7d87c09)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 02 Mar 2009 18:47:27 +0000 |
parents | 584063555949 d6e23439b77c |
children | e23a74d7c97c |
comparison
equal
deleted
inserted
replaced
25446:52fbda23e398 | 26213:ff4212a5268f |
---|---|
494 purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code) | 494 purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code) |
495 { | 495 { |
496 got_attention(gc, id, who, type_code); | 496 got_attention(gc, id, who, type_code); |
497 } | 497 } |
498 | 498 |
499 PurpleMedia * | |
500 purple_prpl_initiate_media(PurpleAccount *account, | |
501 const char *who, | |
502 PurpleMediaSessionType type) | |
503 { | |
504 #ifdef USE_VV | |
505 PurpleConnection *gc = NULL; | |
506 PurplePlugin *prpl = NULL; | |
507 PurplePluginProtocolInfo *prpl_info = NULL; | |
508 | |
509 if (account) | |
510 gc = purple_account_get_connection(account); | |
511 if (gc) | |
512 prpl = purple_connection_get_prpl(gc); | |
513 if (prpl) | |
514 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); | |
515 | |
516 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, initiate_media)) { | |
517 /* should check that the protocol supports this media type here? */ | |
518 return prpl_info->initiate_media(gc, who, type); | |
519 } else { | |
520 return NULL; | |
521 } | |
522 #else | |
523 return NULL; | |
524 #endif | |
525 } | |
526 | |
527 PurpleMediaCaps | |
528 purple_prpl_get_media_caps(PurpleAccount *account, const char *who) | |
529 { | |
530 #ifdef USE_VV | |
531 PurpleConnection *gc = NULL; | |
532 PurplePlugin *prpl = NULL; | |
533 PurplePluginProtocolInfo *prpl_info = NULL; | |
534 | |
535 if (account) | |
536 gc = purple_account_get_connection(account); | |
537 if (gc) | |
538 prpl = purple_connection_get_prpl(gc); | |
539 if (prpl) | |
540 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); | |
541 | |
542 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, | |
543 get_media_caps)) { | |
544 return prpl_info->get_media_caps(gc, who); | |
545 } | |
546 #endif | |
547 return PURPLE_MEDIA_CAPS_NONE; | |
548 } | |
549 | |
499 /************************************************************************** | 550 /************************************************************************** |
500 * Protocol Plugin Subsystem API | 551 * Protocol Plugin Subsystem API |
501 **************************************************************************/ | 552 **************************************************************************/ |
502 | 553 |
503 PurplePlugin * | 554 PurplePlugin * |
515 return plugin; | 566 return plugin; |
516 } | 567 } |
517 | 568 |
518 return NULL; | 569 return NULL; |
519 } | 570 } |
571 |