# HG changeset patch # User maiku@pidgin.im # Date 1257193221 0 # Node ID 7c87e62790a656fb7f2a6afd22c6777bf9a238a4 # Parent 85a7a93cd19aaa599cab4dc1e1948d378523c49a Add a read only property to PurpleMedia to retrieve the MediaBackend object. diff -r 85a7a93cd19a -r 7c87e62790a6 libpurple/media/media.c --- a/libpurple/media/media.c Thu Oct 29 23:56:50 2009 +0000 +++ b/libpurple/media/media.c Mon Nov 02 20:20:21 2009 +0000 @@ -149,6 +149,7 @@ enum { PROP_0, PROP_MANAGER, + PROP_BACKEND, PROP_ACCOUNT, PROP_CONFERENCE_TYPE, PROP_INITIATOR, @@ -203,6 +204,17 @@ PURPLE_TYPE_MEDIA_MANAGER, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); + /* + * This one should be PURPLE_TYPE_MEDIA_BACKEND, but it doesn't + * like interfaces because they "aren't GObjects" + */ + g_object_class_install_property(gobject_class, PROP_BACKEND, + g_param_spec_object("backend", + "Purple Media Backend", + "The backend object this media object uses.", + G_TYPE_OBJECT, + G_PARAM_READABLE)); + g_object_class_install_property(gobject_class, PROP_ACCOUNT, g_param_spec_pointer("account", "PurpleAccount", @@ -423,6 +435,9 @@ case PROP_MANAGER: g_value_set_object(value, media->priv->manager); break; + case PROP_BACKEND: + g_value_set_object(value, media->priv->backend); + break; case PROP_ACCOUNT: g_value_set_pointer(value, media->priv->account); break;