Loading...
Searching...
No Matches
media.h
Go to the documentation of this file.
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_MEDIA_H_
#define _PURPLE_MEDIA_H_
#include "media/candidate.h"
#include "media/codec.h"
#include "media/enum-types.h"
#include "glibcompat.h"
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
#define PURPLE_TYPE_MEDIA (purple_media_get_type())
#define PURPLE_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA, PurpleMedia))
#define PURPLE_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA, PurpleMediaClass))
#define PURPLE_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA))
#define PURPLE_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA))
#define PURPLE_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA, PurpleMediaClass))
typedef struct _PurpleMedia PurpleMedia;
#include "signals.h"
#include "util.h"
#ifdef __cplusplus
extern "C" {
#endif
GType purple_media_get_type(void);
GList *purple_media_get_session_ids(PurpleMedia *media);
PurpleAccount *purple_media_get_account(PurpleMedia *media);
gpointer purple_media_get_prpl_data(PurpleMedia *media);
void purple_media_set_prpl_data(PurpleMedia *media, gpointer prpl_data);
void purple_media_error(PurpleMedia *media, const gchar *error, ...);
void purple_media_end(PurpleMedia *media, const gchar *session_id,
const gchar *participant);
void purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type,
const gchar *session_id, const gchar *participant,
gboolean local);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void purple_media_set_params(PurpleMedia *media,
guint num_params, GParameter *params);
G_GNUC_END_IGNORE_DEPRECATIONS
const gchar **purple_media_get_available_params(PurpleMedia *media);
gboolean purple_media_param_is_supported(PurpleMedia *media, const gchar *param);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id,
const gchar *who, PurpleMediaSessionType type,
gboolean initiator, const gchar *transmitter,
guint num_params, GParameter *params);
G_GNUC_END_IGNORE_DEPRECATIONS
PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id);
struct _PurpleMediaManager *purple_media_get_manager(PurpleMedia *media);
GList *purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id);
void purple_media_add_remote_candidates(PurpleMedia *media,
const gchar *sess_id,
const gchar *participant,
GList *remote_candidates);
GList *purple_media_get_local_candidates(PurpleMedia *media,
const gchar *sess_id,
const gchar *participant);
GList *purple_media_get_active_local_candidates(PurpleMedia *media,
const gchar *sess_id, const gchar *participant);
GList *purple_media_get_active_remote_candidates(PurpleMedia *media,
const gchar *sess_id, const gchar *participant);
gboolean purple_media_set_remote_codecs(PurpleMedia *media, const gchar *sess_id,
const gchar *participant, GList *codecs);
gboolean purple_media_candidates_prepared(PurpleMedia *media,
const gchar *session_id, const gchar *participant);
gboolean purple_media_set_send_codec(PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec);
gboolean purple_media_set_encryption_parameters(PurpleMedia *media,
const gchar *sess_id, const gchar *cipher,
const gchar *auth, const gchar *key, gsize key_len);
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);
gboolean purple_media_set_require_encryption(PurpleMedia *media,
const gchar *sess_id, const gchar *participant,
gboolean require_encryption);
gboolean purple_media_codecs_ready(PurpleMedia *media, const gchar *sess_id);
gboolean purple_media_set_send_rtcp_mux(PurpleMedia *media,
const gchar *sess_id, const gchar *participant, gboolean send_rtcp_mux);
gboolean purple_media_is_initiator(PurpleMedia *media,
const gchar *sess_id, const gchar *participant);
gboolean purple_media_accepted(PurpleMedia *media, const gchar *sess_id,
const gchar *participant);
void purple_media_set_input_volume(PurpleMedia *media, const gchar *session_id, double level);
void purple_media_set_output_volume(PurpleMedia *media, const gchar *session_id,
const gchar *participant, double level);
gulong purple_media_set_output_window(PurpleMedia *media,
const gchar *session_id, const gchar *participant,
gulong window_id);
void purple_media_remove_output_windows(PurpleMedia *media);
gboolean purple_media_send_dtmf(PurpleMedia *media, const gchar *session_id,
gchar dtmf, guint8 volume, guint16 duration);
#ifdef __cplusplus
}
#endif
G_END_DECLS
#endif /* _PURPLE_MEDIA_H_ */
glibcompat.h
Compatibility for many glib versions.
purple_media_set_remote_codecs
gboolean purple_media_set_remote_codecs(PurpleMedia *media, const gchar *sess_id, const gchar *participant, GList *codecs)
Sets remote candidates from the stream.
purple_media_stream_info
void purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type, const gchar *session_id, const gchar *participant, gboolean local)
Signals different information about the given stream.
purple_media_end
void purple_media_end(PurpleMedia *media, const gchar *session_id, const gchar *participant)
Ends all streams that match the given parameters.
purple_media_set_encryption_parameters
gboolean purple_media_set_encryption_parameters(PurpleMedia *media, const gchar *sess_id, const gchar *cipher, const gchar *auth, const gchar *key, gsize key_len)
Sets the encryption parameters of our media in the session.
purple_media_set_params
G_GNUC_BEGIN_IGNORE_DEPRECATIONS void purple_media_set_params(PurpleMedia *media, guint num_params, GParameter *params)
Sets various optional parameters of the media call.
purple_media_get_manager
struct _PurpleMediaManager * purple_media_get_manager(PurpleMedia *media)
Gets the PurpleMediaManager this media session is a part of.
purple_media_get_session_type
G_GNUC_END_IGNORE_DEPRECATIONS PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id)
Gets the session type from a session.
purple_media_get_account
PurpleAccount * purple_media_get_account(PurpleMedia *media)
Gets the PurpleAccount this media session is on.
purple_media_candidates_prepared
gboolean purple_media_candidates_prepared(PurpleMedia *media, const gchar *session_id, const gchar *participant)
Returns whether or not the candidates for set of streams are prepared.
purple_media_get_active_local_candidates
GList * purple_media_get_active_local_candidates(PurpleMedia *media, const gchar *sess_id, const gchar *participant)
Gets the active local candidates for the stream.
purple_media_set_require_encryption
gboolean purple_media_set_require_encryption(PurpleMedia *media, const gchar *sess_id, const gchar *participant, gboolean require_encryption)
Sets whether a session participant's media requires encryption.
purple_media_add_stream
G_GNUC_BEGIN_IGNORE_DEPRECATIONS gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id, const gchar *who, PurpleMediaSessionType type, gboolean initiator, const gchar *transmitter, guint num_params, GParameter *params)
Adds a stream to a session.
purple_media_codecs_ready
gboolean purple_media_codecs_ready(PurpleMedia *media, const gchar *sess_id)
Gets whether a session's codecs are ready to be used.
purple_media_remove_output_windows
void purple_media_remove_output_windows(PurpleMedia *media)
Removes all output windows from a given media session.
purple_media_set_send_codec
gboolean purple_media_set_send_codec(PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec)
Sets the send codec for the a session.
purple_media_send_dtmf
gboolean purple_media_send_dtmf(PurpleMedia *media, const gchar *session_id, gchar dtmf, guint8 volume, guint16 duration)
Sends a DTMF signal out-of-band.
purple_media_set_output_volume
void purple_media_set_output_volume(PurpleMedia *media, const gchar *session_id, const gchar *participant, double level)
Sets the output volume of all the selected streams.
purple_media_set_send_rtcp_mux
gboolean purple_media_set_send_rtcp_mux(PurpleMedia *media, const gchar *sess_id, const gchar *participant, gboolean send_rtcp_mux)
Sets the rtcp-mux option for the stream.
purple_media_get_codecs
GList * purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id)
Gets the codecs from a session.
purple_media_get_available_params
G_GNUC_END_IGNORE_DEPRECATIONS const gchar ** purple_media_get_available_params(PurpleMedia *media)
Gets the list of optional parameters supported by the media backend.
purple_media_get_active_remote_candidates
GList * purple_media_get_active_remote_candidates(PurpleMedia *media, const gchar *sess_id, const gchar *participant)
Gets the active remote candidates for the stream.
purple_media_set_input_volume
void purple_media_set_input_volume(PurpleMedia *media, const gchar *session_id, double level)
Sets the input volume of all the selected sessions.
purple_media_get_type
GType purple_media_get_type(void)
Gets the media class's GType.
purple_media_error
void purple_media_error(PurpleMedia *media, const gchar *error,...)
Signals an error in the media session.
purple_media_get_local_candidates
GList * purple_media_get_local_candidates(PurpleMedia *media, const gchar *sess_id, const gchar *participant)
Gets the local candidates from a stream.
purple_media_accepted
gboolean purple_media_accepted(PurpleMedia *media, const gchar *sess_id, const gchar *participant)
Gets whether a streams selected have been accepted.
purple_media_add_remote_candidates
void purple_media_add_remote_candidates(PurpleMedia *media, const gchar *sess_id, const gchar *participant, GList *remote_candidates)
Adds remote candidates to the stream.
purple_media_get_session_ids
GList * purple_media_get_session_ids(PurpleMedia *media)
Gets a list of session IDs.
purple_media_set_prpl_data
void purple_media_set_prpl_data(PurpleMedia *media, gpointer prpl_data)
Sets the prpl data on the media session.
purple_media_set_output_window
gulong purple_media_set_output_window(PurpleMedia *media, const gchar *session_id, const gchar *participant, gulong window_id)
Sets a video output window for the given session/stream.
purple_media_param_is_supported
gboolean purple_media_param_is_supported(PurpleMedia *media, const gchar *param)
Checks if given optional parameter is supported by the media backend.
purple_media_set_decryption_parameters
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)
Sets the decryption parameters for a session participant's media.
PurpleMedia
struct _PurpleMedia PurpleMedia
An opaque structure representing a media call.
Definition media.h:48
purple_media_get_prpl_data
gpointer purple_media_get_prpl_data(PurpleMedia *media)
Gets the prpl data from the media session.
purple_media_is_initiator
gboolean purple_media_is_initiator(PurpleMedia *media, const gchar *sess_id, const gchar *participant)
Gets whether the local user is the conference/session/stream's initiator.
signals.h
Signal API.
_PurpleAccount
Structure representing an account.
Definition account.h:170
util.h
Utility Functions.