--- a/libpurple/media.h Wed Apr 23 07:31:30 2014 +0200 +++ b/libpurple/media.h Thu Mar 12 01:05:29 2015 +0000 @@ -360,6 +360,41 @@ gboolean purple_media_set_send_codec(PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec); /** + * purple_media_set_encryption_parameters: + * @media: The media object to find the session in. + * @sess_id: The session id of the session to set parameters of. + * @cipher: The cipher to use to encrypt our media in the session. + * @auth: The algorithm to use to compute authentication codes for our media + * frames. + * @key: The encryption key. + * @key_len: Byte length of the encryption key. + * + * Sets the encryption parameters of our media in the session. + */ +gboolean purple_media_set_encryption_parameters(PurpleMedia *media, + const gchar *sess_id, const gchar *cipher, + const gchar *auth, const gchar *key, gsize key_len); + +/** + * purple_media_set_decryption_parameters: + * @media: The media object to find the session in. + * @sess_id: The session id of the session to set parameters of. + * @participant: The participant of the session to set parameters of. + * @cipher: The cipher to use to decrypt media coming from this session's + * participant. + * @auth: The algorithm to use for authentication of the media coming from + * the session's participant. + * @key: The decryption key. + * @key_len: Byte length of the decryption key. + * + * Sets the decryption parameters for a session participant's media. + */ +gboolean purple_media_set_decryption_parameters(PurpleMedia *media, + const gchar *sess_id, const gchar *participant, + const gchar *cipher, const gchar *auth, + const gchar *key, gsize key_len); + +/** * purple_media_codecs_ready: * @media: The media object to find the session in. * @sess_id: The session id of the session to check.