Frameworks/libpurple.framework/Versions/0.6.0/Headers/media.h
changeset 2592 e8d15275025e
parent 2591 f66a716bfc79
child 2593 b4bd28402abc
     1.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/media.h	Fri Aug 21 13:24:36 2009 -0700
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,690 +0,0 @@
     1.4 -/**
     1.5 - * @file media.h Media API
     1.6 - * @ingroup core
     1.7 - */
     1.8 -
     1.9 -/* purple
    1.10 - *
    1.11 - * Purple is the legal property of its developers, whose names are too numerous
    1.12 - * to list here.  Please refer to the COPYRIGHT file distributed with this
    1.13 - * source distribution.
    1.14 - *
    1.15 - * This program is free software; you can redistribute it and/or modify
    1.16 - * it under the terms of the GNU General Public License as published by
    1.17 - * the Free Software Foundation; either version 2 of the License, or
    1.18 - * (at your option) any later version.
    1.19 - *
    1.20 - * This program is distributed in the hope that it will be useful,
    1.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.23 - * GNU General Public License for more details.
    1.24 - *
    1.25 - * You should have received a copy of the GNU General Public License
    1.26 - * along with this program; if not, write to the Free Software
    1.27 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.28 - */
    1.29 -
    1.30 -#ifndef _PURPLE_MEDIA_H_
    1.31 -#define _PURPLE_MEDIA_H_
    1.32 -
    1.33 -#include <glib.h>
    1.34 -#include <glib-object.h>
    1.35 -
    1.36 -G_BEGIN_DECLS
    1.37 -
    1.38 -#define PURPLE_TYPE_MEDIA_CANDIDATE           (purple_media_candidate_get_type())
    1.39 -#define PURPLE_MEDIA_CANDIDATE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
    1.40 -#define PURPLE_MEDIA_CANDIDATE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
    1.41 -#define PURPLE_IS_MEDIA_CANDIDATE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CANDIDATE))
    1.42 -#define PURPLE_IS_MEDIA_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CANDIDATE))
    1.43 -#define PURPLE_MEDIA_CANDIDATE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
    1.44 -
    1.45 -#define PURPLE_TYPE_MEDIA_CODEC           (purple_media_codec_get_type())
    1.46 -#define PURPLE_MEDIA_CODEC(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
    1.47 -#define PURPLE_MEDIA_CODEC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
    1.48 -#define PURPLE_IS_MEDIA_CODEC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CODEC))
    1.49 -#define PURPLE_IS_MEDIA_CODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CODEC))
    1.50 -#define PURPLE_MEDIA_CODEC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
    1.51 -
    1.52 -#define PURPLE_TYPE_MEDIA_SESSION_TYPE (purple_media_session_type_get_type())
    1.53 -#define PURPLE_TYPE_MEDIA            (purple_media_get_type())
    1.54 -#define PURPLE_MEDIA(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA, PurpleMedia))
    1.55 -#define PURPLE_MEDIA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA, PurpleMediaClass))
    1.56 -#define PURPLE_IS_MEDIA(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA))
    1.57 -#define PURPLE_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA))
    1.58 -#define PURPLE_MEDIA_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA, PurpleMediaClass))
    1.59 -
    1.60 -#define PURPLE_TYPE_MEDIA_CANDIDATE_TYPE (purple_media_candidate_type_get_type())
    1.61 -#define PURPLE_TYPE_MEDIA_NETWORK_PROTOCOL (purple_media_network_protocol_get_type())
    1.62 -#define PURPLE_MEDIA_TYPE_STATE      (purple_media_state_changed_get_type())
    1.63 -#define PURPLE_MEDIA_TYPE_INFO_TYPE	(purple_media_info_type_get_type())
    1.64 -
    1.65 -/** @copydoc _PurpleMedia */
    1.66 -typedef struct _PurpleMedia PurpleMedia;
    1.67 -/** @copydoc _PurpleMediaCandidate */
    1.68 -typedef struct _PurpleMediaCandidate PurpleMediaCandidate;
    1.69 -/** @copydoc _PurpleMediaCodec */
    1.70 -typedef struct _PurpleMediaCodec PurpleMediaCodec;
    1.71 -
    1.72 -/** Media caps */
    1.73 -typedef enum {
    1.74 -	PURPLE_MEDIA_CAPS_NONE = 0,
    1.75 -	PURPLE_MEDIA_CAPS_AUDIO = 1,
    1.76 -	PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION = 1 << 1,
    1.77 -	PURPLE_MEDIA_CAPS_VIDEO = 1 << 2,
    1.78 -	PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION = 1 << 3,
    1.79 -	PURPLE_MEDIA_CAPS_AUDIO_VIDEO = 1 << 4,
    1.80 -	PURPLE_MEDIA_CAPS_MODIFY_SESSION = 1 << 5,
    1.81 -	PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6,
    1.82 -} PurpleMediaCaps;
    1.83 -
    1.84 -/** Media session types */
    1.85 -typedef enum {
    1.86 -	PURPLE_MEDIA_NONE	= 0,
    1.87 -	PURPLE_MEDIA_RECV_AUDIO = 1 << 0,
    1.88 -	PURPLE_MEDIA_SEND_AUDIO = 1 << 1,
    1.89 -	PURPLE_MEDIA_RECV_VIDEO = 1 << 2,
    1.90 -	PURPLE_MEDIA_SEND_VIDEO = 1 << 3,
    1.91 -	PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO,
    1.92 -	PURPLE_MEDIA_VIDEO = PURPLE_MEDIA_RECV_VIDEO | PURPLE_MEDIA_SEND_VIDEO
    1.93 -} PurpleMediaSessionType;
    1.94 -
    1.95 -/** Media state-changed types */
    1.96 -typedef enum {
    1.97 -	PURPLE_MEDIA_STATE_NEW = 0,
    1.98 -	PURPLE_MEDIA_STATE_CONNECTED,
    1.99 -	PURPLE_MEDIA_STATE_END,
   1.100 -} PurpleMediaState;
   1.101 -
   1.102 -/** Media info types */
   1.103 -typedef enum {
   1.104 -	PURPLE_MEDIA_INFO_HANGUP = 0,
   1.105 -	PURPLE_MEDIA_INFO_ACCEPT,
   1.106 -	PURPLE_MEDIA_INFO_REJECT,
   1.107 -	PURPLE_MEDIA_INFO_MUTE,
   1.108 -	PURPLE_MEDIA_INFO_UNMUTE,
   1.109 -	PURPLE_MEDIA_INFO_HOLD,
   1.110 -	PURPLE_MEDIA_INFO_UNHOLD,
   1.111 -} PurpleMediaInfoType;
   1.112 -
   1.113 -typedef enum {
   1.114 -	PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
   1.115 -	PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
   1.116 -	PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,
   1.117 -	PURPLE_MEDIA_CANDIDATE_TYPE_RELAY,
   1.118 -	PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST,
   1.119 -} PurpleMediaCandidateType;
   1.120 -
   1.121 -typedef enum {
   1.122 -	PURPLE_MEDIA_COMPONENT_NONE = 0,
   1.123 -	PURPLE_MEDIA_COMPONENT_RTP = 1,
   1.124 -	PURPLE_MEDIA_COMPONENT_RTCP = 2,
   1.125 -} PurpleMediaComponentType;
   1.126 -
   1.127 -typedef enum {
   1.128 -	PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
   1.129 -	PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
   1.130 -} PurpleMediaNetworkProtocol;
   1.131 -
   1.132 -#include "signals.h"
   1.133 -#include "util.h"
   1.134 -
   1.135 -#ifdef __cplusplus
   1.136 -extern "C" {
   1.137 -#endif
   1.138 -
   1.139 -/**
   1.140 - * Gets the media session type's GType
   1.141 - *
   1.142 - * @return The media session type's GType.
   1.143 - *
   1.144 - * @since 2.6.0
   1.145 - */
   1.146 -GType purple_media_session_type_get_type(void);
   1.147 -
   1.148 -/**
   1.149 - * Gets the media candidate type's GType
   1.150 - *
   1.151 - * @return The media candidate type's GType.
   1.152 - *
   1.153 - * @since 2.6.0
   1.154 - */
   1.155 -GType purple_media_candidate_type_get_type(void);
   1.156 -
   1.157 -/**
   1.158 - * Gets the media network protocol's GType
   1.159 - *
   1.160 - * @return The media network protocol's GType.
   1.161 - *
   1.162 - * @since 2.6.0
   1.163 - */
   1.164 -GType purple_media_network_protocol_get_type(void);
   1.165 -
   1.166 -/**
   1.167 - * Gets the media class's GType
   1.168 - *
   1.169 - * @return The media class's GType.
   1.170 - *
   1.171 - * @since 2.6.0
   1.172 - */
   1.173 -GType purple_media_get_type(void);
   1.174 -
   1.175 -/**
   1.176 - * Gets the type of the state-changed enum
   1.177 - *
   1.178 - * @return The state-changed enum's GType
   1.179 - *
   1.180 - * @since 2.6.0
   1.181 - */
   1.182 -GType purple_media_state_changed_get_type(void);
   1.183 -
   1.184 -/**
   1.185 - * Gets the type of the info type enum
   1.186 - *
   1.187 - * @return The info type enum's GType
   1.188 - *
   1.189 - * @since 2.6.0
   1.190 - */
   1.191 -GType purple_media_info_type_get_type(void);
   1.192 -
   1.193 -/**
   1.194 - * Gets the type of the media candidate structure.
   1.195 - *
   1.196 - * @return The media canditate's GType
   1.197 - *
   1.198 - * @since 2.6.0
   1.199 - */
   1.200 -GType purple_media_candidate_get_type(void);
   1.201 -
   1.202 -/**
   1.203 - * Creates a PurpleMediaCandidate instance.
   1.204 - *
   1.205 - * @param foundation The foundation of the candidate.
   1.206 - * @param component_id The component this candidate is for.
   1.207 - * @param type The type of candidate.
   1.208 - * @param proto The protocol this component is for.
   1.209 - * @param ip The IP address of this component.
   1.210 - * @param port The network port.
   1.211 - *
   1.212 - * @return The newly created PurpleMediaCandidate instance.
   1.213 - *
   1.214 - * @since 2.6.0
   1.215 - */
   1.216 -PurpleMediaCandidate *purple_media_candidate_new(
   1.217 -		const gchar *foundation, guint component_id,
   1.218 -		PurpleMediaCandidateType type,
   1.219 -		PurpleMediaNetworkProtocol proto,
   1.220 -		const gchar *ip, guint port);
   1.221 -
   1.222 -/**
   1.223 - * Copies a GList of PurpleMediaCandidate and its contents.
   1.224 - *
   1.225 - * @param candidates The list of candidates to be copied.
   1.226 - *
   1.227 - * @return The copy of the GList.
   1.228 - *
   1.229 - * @since 2.6.0
   1.230 - */
   1.231 -GList *purple_media_candidate_list_copy(GList *candidates);
   1.232 -
   1.233 -/**
   1.234 - * Frees a GList of PurpleMediaCandidate and its contents.
   1.235 - *
   1.236 - * @param candidates The list of candidates to be freed.
   1.237 - *
   1.238 - * @since 2.6.0
   1.239 - */
   1.240 -void purple_media_candidate_list_free(GList *candidates);
   1.241 -
   1.242 -gchar *purple_media_candidate_get_foundation(PurpleMediaCandidate *candidate);
   1.243 -guint purple_media_candidate_get_component_id(PurpleMediaCandidate *candidate);
   1.244 -gchar *purple_media_candidate_get_ip(PurpleMediaCandidate *candidate);
   1.245 -guint16 purple_media_candidate_get_port(PurpleMediaCandidate *candidate);
   1.246 -gchar *purple_media_candidate_get_base_ip(PurpleMediaCandidate *candidate);
   1.247 -guint16 purple_media_candidate_get_base_port(PurpleMediaCandidate *candidate);
   1.248 -PurpleMediaNetworkProtocol purple_media_candidate_get_protocol(
   1.249 -		PurpleMediaCandidate *candidate);
   1.250 -guint32 purple_media_candidate_get_priority(PurpleMediaCandidate *candidate);
   1.251 -PurpleMediaCandidateType purple_media_candidate_get_candidate_type(
   1.252 -		PurpleMediaCandidate *candidate);
   1.253 -gchar *purple_media_candidate_get_username(PurpleMediaCandidate *candidate);
   1.254 -gchar *purple_media_candidate_get_password(PurpleMediaCandidate *candidate);
   1.255 -guint purple_media_candidate_get_ttl(PurpleMediaCandidate *candidate);
   1.256 -
   1.257 -/**
   1.258 - * Gets the type of the media codec structure.
   1.259 - *
   1.260 - * @return The media codec's GType
   1.261 - *
   1.262 - * @since 2.6.0
   1.263 - */
   1.264 -GType purple_media_codec_get_type(void);
   1.265 -
   1.266 -/**
   1.267 - * Creates a new PurpleMediaCodec instance.
   1.268 - *
   1.269 - * @param id Codec identifier.
   1.270 - * @param encoding_name Name of the media type this encodes.
   1.271 - * @param media_type PurpleMediaSessionType of this codec.
   1.272 - * @param clock_rate The clock rate this codec encodes at, if applicable.
   1.273 - *
   1.274 - * @return The newly created PurpleMediaCodec.
   1.275 - *
   1.276 - * @since 2.6.0
   1.277 - */
   1.278 -PurpleMediaCodec *purple_media_codec_new(int id, const char *encoding_name,
   1.279 -		PurpleMediaSessionType media_type, guint clock_rate);
   1.280 -
   1.281 -guint purple_media_codec_get_id(PurpleMediaCodec *codec);
   1.282 -gchar *purple_media_codec_get_encoding_name(PurpleMediaCodec *codec);
   1.283 -guint purple_media_codec_get_clock_rate(PurpleMediaCodec *codec);
   1.284 -guint purple_media_codec_get_channels(PurpleMediaCodec *codec);
   1.285 -GList *purple_media_codec_get_optional_parameters(PurpleMediaCodec *codec);
   1.286 -
   1.287 -/**
   1.288 - * Creates a string representation of the codec.
   1.289 - *
   1.290 - * @param codec The codec to create the string of.
   1.291 - *
   1.292 - * @return The new string representation.
   1.293 - *
   1.294 - * @since 2.6.0
   1.295 - */
   1.296 -gchar *purple_media_codec_to_string(const PurpleMediaCodec *codec);
   1.297 -
   1.298 -/**
   1.299 - * Adds an optional parameter to the codec.
   1.300 - *
   1.301 - * @param codec The codec to add the parameter to.
   1.302 - * @param name The name of the parameter to add.
   1.303 - * @param value The value of the parameter to add.
   1.304 - *
   1.305 - * @since 2.6.0
   1.306 - */
   1.307 -void purple_media_codec_add_optional_parameter(PurpleMediaCodec *codec,
   1.308 -		const gchar *name, const gchar *value);
   1.309 -
   1.310 -/**
   1.311 - * Removes an optional parameter from the codec.
   1.312 - *
   1.313 - * @param codec The codec to remove the parameter from.
   1.314 - * @param param A pointer to the parameter to remove.
   1.315 - *
   1.316 - * @since 2.6.0
   1.317 - */
   1.318 -void purple_media_codec_remove_optional_parameter(PurpleMediaCodec *codec,
   1.319 -		PurpleKeyValuePair *param);
   1.320 -
   1.321 -/**
   1.322 - * Gets an optional parameter based on the values given.
   1.323 - *
   1.324 - * @param codec The codec to find the parameter in.
   1.325 - * @param name The name of the parameter to search for.
   1.326 - * @param value The value to search for or NULL.
   1.327 - *
   1.328 - * @return The value found or NULL.
   1.329 - *
   1.330 - * @since 2.6.0
   1.331 - */
   1.332 -PurpleKeyValuePair *purple_media_codec_get_optional_parameter(
   1.333 -		PurpleMediaCodec *codec, const gchar *name,
   1.334 -		const gchar *value);
   1.335 -
   1.336 -/**
   1.337 - * Copies a GList of PurpleMediaCodec and its contents.
   1.338 - *
   1.339 - * @param codecs The list of codecs to be copied.
   1.340 - *
   1.341 - * @return The copy of the GList.
   1.342 - *
   1.343 - * @since 2.6.0
   1.344 - */
   1.345 -GList *purple_media_codec_list_copy(GList *codecs);
   1.346 -
   1.347 -/**
   1.348 - * Frees a GList of PurpleMediaCodec and its contents.
   1.349 - *
   1.350 - * @param codecs The list of codecs to be freed.
   1.351 - *
   1.352 - * @since 2.6.0
   1.353 - */
   1.354 -void purple_media_codec_list_free(GList *codecs);
   1.355 -
   1.356 -/**
   1.357 - * Gets a list of session IDs.
   1.358 - *
   1.359 - * @param media The media session from which to retrieve session IDs.
   1.360 - *
   1.361 - * @return GList of session IDs. The caller must free the list.
   1.362 - *
   1.363 - * @since 2.6.0
   1.364 - */
   1.365 -GList *purple_media_get_session_ids(PurpleMedia *media);
   1.366 -
   1.367 -/**
   1.368 - * Gets the PurpleAccount this media session is on.
   1.369 - *
   1.370 - * @param media The media session to retrieve the account from.
   1.371 - *
   1.372 - * @return The account retrieved.
   1.373 - *
   1.374 - * @since 2.6.0
   1.375 - */
   1.376 -PurpleAccount *purple_media_get_account(PurpleMedia *media);
   1.377 -
   1.378 -/**
   1.379 - * Gets the prpl data from the media session.
   1.380 - *
   1.381 - * @param media The media session to retrieve the prpl data from.
   1.382 - *
   1.383 - * @return The prpl data retrieved.
   1.384 - *
   1.385 - * @since 2.6.0
   1.386 - */
   1.387 -gpointer purple_media_get_prpl_data(PurpleMedia *media);
   1.388 -
   1.389 -/**
   1.390 - * Sets the prpl data on the media session.
   1.391 - *
   1.392 - * @param media The media session to set the prpl data on.
   1.393 - * @param prpl_data The data to set on the media session.
   1.394 - *
   1.395 - * @since 2.6.0
   1.396 - */
   1.397 -void purple_media_set_prpl_data(PurpleMedia *media, gpointer prpl_data);
   1.398 -
   1.399 -/**
   1.400 - * Signals an error in the media session.
   1.401 - *
   1.402 - * @param media The media object to set the state on.
   1.403 - * @param error The format of the error message to send in the signal.
   1.404 - * @param ... The arguments to plug into the format.
   1.405 - *
   1.406 - * @since 2.6.0
   1.407 - */
   1.408 -void purple_media_error(PurpleMedia *media, const gchar *error, ...);
   1.409 -
   1.410 -/**
   1.411 - * Ends all streams that match the given parameters
   1.412 - *
   1.413 - * @param media The media object with which to end streams.
   1.414 - * @param session_id The session to end streams on.
   1.415 - * @param participant The participant to end streams with.
   1.416 - *
   1.417 - * @since 2.6.0
   1.418 - */
   1.419 -void purple_media_end(PurpleMedia *media, const gchar *session_id,
   1.420 -		const gchar *participant);
   1.421 -
   1.422 -/**
   1.423 - * Signals different information about the given stream.
   1.424 - *
   1.425 - * @param media The media instance to containing the stream to signal.
   1.426 - * @param type The type of info being signaled.
   1.427 - * @param session_id The id of the session of the stream being signaled.
   1.428 - * @param participant The participant of the stream being signaled.
   1.429 - * @param local TRUE if the info originated locally, FALSE if on the remote end.
   1.430 - *
   1.431 - * @since 2.6.0
   1.432 - */
   1.433 -void purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type,
   1.434 -		const gchar *session_id, const gchar *participant,
   1.435 -		gboolean local);
   1.436 -
   1.437 -/**
   1.438 - * Adds a stream to a session.
   1.439 - *
   1.440 - * It only adds a stream to one audio session or video session as
   1.441 - * the @c sess_id must be unique between sessions.
   1.442 - *
   1.443 - * @param media The media object to find the session in.
   1.444 - * @param sess_id The session id of the session to add the stream to.
   1.445 - * @param who The name of the remote user to add the stream for.
   1.446 - * @param type The type of stream to create.
   1.447 - * @param initiator Whether or not the local user initiated the stream.
   1.448 - * @param transmitter The transmitter to use for the stream.
   1.449 - * @param num_params The number of parameters to pass to Farsight.
   1.450 - * @param params The parameters to pass to Farsight.
   1.451 - *
   1.452 - * @return @c TRUE The stream was added successfully, @c FALSE otherwise.
   1.453 - *
   1.454 - * @since 2.6.0
   1.455 - */
   1.456 -gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id,
   1.457 -		const gchar *who, PurpleMediaSessionType type,
   1.458 -		gboolean initiator, const gchar *transmitter,
   1.459 -		guint num_params, GParameter *params);
   1.460 -
   1.461 -/**
   1.462 - * Gets the session type from a session
   1.463 - *
   1.464 - * @param media The media object to find the session in.
   1.465 - * @param sess_id The session id of the session to get the type from.
   1.466 - *
   1.467 - * @return The retreived session type.
   1.468 - *
   1.469 - * @since 2.6.0
   1.470 - */
   1.471 -PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id);
   1.472 -
   1.473 -/**
   1.474 - * Gets the PurpleMediaManager this media session is a part of.
   1.475 - *
   1.476 - * @param media The media object to get the manager instance from.
   1.477 - *
   1.478 - * @return The PurpleMediaManager instance retrieved.
   1.479 - *
   1.480 - * @since 2.6.0
   1.481 - */
   1.482 -struct _PurpleMediaManager *purple_media_get_manager(PurpleMedia *media);
   1.483 -
   1.484 -/**
   1.485 - * Gets the codecs from a session.
   1.486 - *
   1.487 - * @param media The media object to find the session in.
   1.488 - * @param sess_id The session id of the session to get the codecs from.
   1.489 - *
   1.490 - * @return The retreieved codecs.
   1.491 - *
   1.492 - * @since 2.6.0
   1.493 - */
   1.494 -GList *purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id);
   1.495 -
   1.496 -/**
   1.497 - * Adds remote candidates to the stream.
   1.498 - *
   1.499 - * @param media The media object to find the session in.
   1.500 - * @param sess_id The session id of the session find the stream in.
   1.501 - * @param participant The name of the remote user to add the candidates for.
   1.502 - * @param remote_candidates The remote candidates to add.
   1.503 - *
   1.504 - * @since 2.6.0
   1.505 - */
   1.506 -void purple_media_add_remote_candidates(PurpleMedia *media,
   1.507 -					const gchar *sess_id,
   1.508 -					const gchar *participant,
   1.509 -					GList *remote_candidates);
   1.510 -
   1.511 -/**
   1.512 - * Gets the local candidates from a stream.
   1.513 - *
   1.514 - * @param media The media object to find the session in.
   1.515 - * @param sess_id The session id of the session to find the stream in.
   1.516 - * @param participant The name of the remote user to get the candidates from.
   1.517 - *
   1.518 - * @since 2.6.0
   1.519 - */
   1.520 -GList *purple_media_get_local_candidates(PurpleMedia *media,
   1.521 -					 const gchar *sess_id,
   1.522 -					 const gchar *participant);
   1.523 -
   1.524 -#if 0
   1.525 -/*
   1.526 - * These two functions aren't being used and I'd rather not lock in the API
   1.527 - * until they are needed. If they ever are.
   1.528 - */
   1.529 -
   1.530 -/**
   1.531 - * Gets the active local candidates for the stream.
   1.532 - *
   1.533 - * @param media The media object to find the session in.
   1.534 - * @param sess_id The session id of the session to find the stream in.
   1.535 - * @param participant The name of the remote user to get the active candidate
   1.536 - *                    from.
   1.537 - *
   1.538 - * @return The active candidates retrieved.
   1.539 - */
   1.540 -GList *purple_media_get_active_local_candidates(PurpleMedia *media,
   1.541 -		const gchar *sess_id, const gchar *participant);
   1.542 -
   1.543 -/**
   1.544 - * Gets the active remote candidates for the stream.
   1.545 - *
   1.546 - * @param media The media object to find the session in.
   1.547 - * @param sess_id The session id of the session to find the stream in.
   1.548 - * @param participant The name of the remote user to get the remote candidate
   1.549 - *                    from.
   1.550 - *
   1.551 - * @return The remote candidates retrieved.
   1.552 - */
   1.553 -GList *purple_media_get_active_remote_candidates(PurpleMedia *media,
   1.554 -		const gchar *sess_id, const gchar *participant);
   1.555 -#endif
   1.556 -
   1.557 -/**
   1.558 - * Sets remote candidates from the stream.
   1.559 - *
   1.560 - * @param media The media object to find the session in.
   1.561 - * @param sess_id The session id of the session find the stream in.
   1.562 - * @param participant The name of the remote user to set the candidates from.
   1.563 - *
   1.564 - * @return @c TRUE The codecs were set successfully, or @c FALSE otherwise.
   1.565 - *
   1.566 - * @since 2.6.0
   1.567 - */
   1.568 -gboolean purple_media_set_remote_codecs(PurpleMedia *media, const gchar *sess_id,
   1.569 -					const gchar *participant, GList *codecs);
   1.570 -
   1.571 -/**
   1.572 - * Returns whether or not the candidates for set of streams are prepared
   1.573 - *
   1.574 - * @param media The media object to find the remote user in.
   1.575 - * @param session_id The session id of the session to check.
   1.576 - * @param participant The remote user to check for.
   1.577 - *
   1.578 - * @return @c TRUE All streams for the given session_id/participant combination have candidates prepared, @c FALSE otherwise.
   1.579 - *
   1.580 - * @since 2.6.0
   1.581 - */
   1.582 -gboolean purple_media_candidates_prepared(PurpleMedia *media,
   1.583 -		const gchar *session_id, const gchar *participant);
   1.584 -
   1.585 -/**
   1.586 - * Sets the send codec for the a session.
   1.587 - *
   1.588 - * @param media The media object to find the session in.
   1.589 - * @param sess_id The session id of the session to set the codec for.
   1.590 - * @param codec The codec to set the session to stream.
   1.591 - *
   1.592 - * @return @c TRUE The codec was successfully changed, or @c FALSE otherwise.
   1.593 - *
   1.594 - * @since 2.6.0
   1.595 - */
   1.596 -gboolean purple_media_set_send_codec(PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec);
   1.597 -
   1.598 -/**
   1.599 - * Gets whether a session's codecs are ready to be used.
   1.600 - *
   1.601 - * @param media The media object to find the session in.
   1.602 - * @param sess_id The session id of the session to check.
   1.603 - *
   1.604 - * @return @c TRUE The codecs are ready, or @c FALSE otherwise.
   1.605 - *
   1.606 - * @since 2.6.0
   1.607 - */
   1.608 -gboolean purple_media_codecs_ready(PurpleMedia *media, const gchar *sess_id);
   1.609 -
   1.610 -/**
   1.611 - * Gets whether the local user is the conference/session/stream's initiator.
   1.612 - *
   1.613 - * @param media The media instance to find the session in.
   1.614 - * @param sess_id The session id of the session to check.
   1.615 - * @param participant The participant of the stream to check.
   1.616 - *
   1.617 - * @return TRUE if the local user is the stream's initator, else FALSE.
   1.618 - *
   1.619 - * @since 2.6.0
   1.620 - */
   1.621 -gboolean purple_media_is_initiator(PurpleMedia *media,
   1.622 -		const gchar *sess_id, const gchar *participant);
   1.623 -
   1.624 -/**
   1.625 - * Gets whether a streams selected have been accepted.
   1.626 - *
   1.627 - * @param media The media object to find the session in.
   1.628 - * @param sess_id The session id of the session to check.
   1.629 - * @param participant The participant to check.
   1.630 - *
   1.631 - * @return @c TRUE The selected streams have been accepted, or @c FALSE otherwise.
   1.632 - *
   1.633 - * @since 2.6.0
   1.634 - */
   1.635 -gboolean purple_media_accepted(PurpleMedia *media, const gchar *sess_id,
   1.636 -		const gchar *participant);
   1.637 -
   1.638 -/**
   1.639 - * Sets the input volume of all the selected sessions.
   1.640 - *
   1.641 - * @param media The media object the sessions are in.
   1.642 - * @param session_id The session to select (if any).
   1.643 - * @param level The level to set the volume to.
   1.644 - *
   1.645 - * @since 2.6.0
   1.646 - */
   1.647 -void purple_media_set_input_volume(PurpleMedia *media, const gchar *session_id, double level);
   1.648 -
   1.649 -/**
   1.650 - * Sets the output volume of all the selected streams.
   1.651 - *
   1.652 - * @param media The media object the streams are in.
   1.653 - * @param session_id The session to limit the streams to (if any).
   1.654 - * @param participant The participant to limit the streams to (if any).
   1.655 - * @param level The level to set the volume to.
   1.656 - *
   1.657 - * @since 2.6.0
   1.658 - */
   1.659 -void purple_media_set_output_volume(PurpleMedia *media, const gchar *session_id,
   1.660 -		const gchar *participant, double level);
   1.661 -
   1.662 -/**
   1.663 - * Sets a video output window for the given session/stream.
   1.664 - *
   1.665 - * @param media The media instance to set the output window on.
   1.666 - * @param session_id The session to set the output window on.
   1.667 - * @param participant Optionally, the participant to set the output window on.
   1.668 - * @param window_id The window id use for embedding the video in.
   1.669 - *
   1.670 - * @return An id to reference the output window.
   1.671 - *
   1.672 - * @since 2.6.0
   1.673 - */
   1.674 -gulong purple_media_set_output_window(PurpleMedia *media,
   1.675 -		const gchar *session_id, const gchar *participant,
   1.676 -		gulong window_id);
   1.677 -
   1.678 -/**
   1.679 - * Removes all output windows from a given media session.
   1.680 - *
   1.681 - * @param media The instance to remove all output windows from.
   1.682 - *
   1.683 - * @since 2.6.0
   1.684 - */
   1.685 -void purple_media_remove_output_windows(PurpleMedia *media);
   1.686 -
   1.687 -#ifdef __cplusplus
   1.688 -}
   1.689 -#endif
   1.690 -
   1.691 -G_END_DECLS
   1.692 -
   1.693 -#endif  /* _PURPLE_MEDIA_H_ */