pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

backend-iface.c File Reference
#include "backend-iface.h"
#include "marshallers.h"
Include dependency graph for backend-iface.c:

Go to the source code of this file.

Enumerations

enum  {
  S_ERROR, CANDIDATES_PREPARED, CODECS_CHANGED, NEW_CANDIDATE,
  ACTIVE_CANDIDATE_PAIR, LAST_SIGNAL
}
 

Functions

static void purple_media_backend_base_init (gpointer iface)
 
GType purple_media_backend_get_type (void)
 
gboolean purple_media_backend_add_stream (PurpleMediaBackend *self, const gchar *sess_id, const gchar *who, PurpleMediaSessionType type, gboolean initiator, const gchar *transmitter, guint num_params, GParameter *params)
 
void purple_media_backend_add_remote_candidates (PurpleMediaBackend *self, const gchar *sess_id, const gchar *participant, GList *remote_candidates)
 
gboolean purple_media_backend_codecs_ready (PurpleMediaBackend *self, const gchar *sess_id)
 
GList * purple_media_backend_get_codecs (PurpleMediaBackend *self, const gchar *sess_id)
 
GList * purple_media_backend_get_local_candidates (PurpleMediaBackend *self, const gchar *sess_id, const gchar *participant)
 
gboolean purple_media_backend_set_remote_codecs (PurpleMediaBackend *self, const gchar *sess_id, const gchar *participant, GList *codecs)
 
gboolean purple_media_backend_set_send_codec (PurpleMediaBackend *self, const gchar *sess_id, PurpleMediaCodec *codec)
 
gboolean purple_media_backend_set_encryption_parameters (PurpleMediaBackend *self, const gchar *sess_id, const gchar *cipher, const gchar *auth, const gchar *key, gsize key_len)
 
gboolean purple_media_backend_set_decryption_parameters (PurpleMediaBackend *self, const gchar *sess_id, const gchar *participant, const gchar *cipher, const gchar *auth, const gchar *key, gsize key_len)
 
void purple_media_backend_set_params (PurpleMediaBackend *self, guint num_params, GParameter *params)
 
const gchar ** purple_media_backend_get_available_params (PurpleMediaBackend *self)
 
gboolean purple_media_backend_set_send_rtcp_mux (PurpleMediaBackend *self, const gchar *sess_id, const gchar *participant, gboolean send_rtcp_mux)
 

Variables

static guint purple_media_backend_signals [LAST_SIGNAL] = {0}
 

Detailed Description

Interface for media backend

Definition in file backend-iface.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
S_ERROR 
CANDIDATES_PREPARED 
CODECS_CHANGED 
NEW_CANDIDATE 
ACTIVE_CANDIDATE_PAIR 
LAST_SIGNAL 

Definition at line 31 of file backend-iface.c.

Function Documentation

◆ purple_media_backend_add_remote_candidates()

void purple_media_backend_add_remote_candidates ( PurpleMediaBackend self,
const gchar *  sess_id,
const gchar *  participant,
GList *  remote_candidates 
)

Add remote candidates to a stream.

Parameters
selfThe backend the stream is in.
sess_idThe session id associated with the stream.
participantThe participant associated with the stream.
remote_candidatesThe list of remote candidates to add.
Since
2.7.0

Definition at line 140 of file backend-iface.c.

References PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_add_remote_candidates().

Here is the caller graph for this function:

◆ purple_media_backend_add_stream()

gboolean purple_media_backend_add_stream ( PurpleMediaBackend self,
const gchar *  sess_id,
const gchar *  who,
PurpleMediaSessionType  type,
gboolean  initiator,
const gchar *  transmitter,
guint  num_params,
GParameter *  params 
)

Creates and adds a stream to the media backend.

Parameters
selfThe backend to add the stream to.
sess_idThe session id of the stream to add.
whoThe remote participant of the stream to add.
typeThe media type and direction of the stream to add.
initiatorTrue if the local user initiated the stream.
transmitterThe string id of the tranmsitter to use.
num_paramsThe number of parameters in the param parameter.
paramsThe additional parameters to pass when creating the stream.
Returns
True if the stream was successfully created, othewise False.
Since
2.7.0

Definition at line 127 of file backend-iface.c.

References FALSE, params, PURPLE_IS_MEDIA_BACKEND, PURPLE_MEDIA_BACKEND_GET_INTERFACE, and dbus-analyze-signals::type.

Referenced by purple_media_add_stream().

Here is the caller graph for this function:

◆ purple_media_backend_base_init()

◆ purple_media_backend_codecs_ready()

gboolean purple_media_backend_codecs_ready ( PurpleMediaBackend self,
const gchar *  sess_id 
)

Get whether or not a session's codecs are ready.

A codec is ready if all of the attributes and additional parameters have been collected.

Parameters
selfThe media backend the session is in.
sess_idThe session id of the session to check.
Returns
True if the codecs are ready, otherwise False.
Since
2.7.0

Definition at line 150 of file backend-iface.c.

References FALSE, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_codecs_ready().

Here is the caller graph for this function:

◆ purple_media_backend_get_available_params()

const gchar** purple_media_backend_get_available_params ( PurpleMediaBackend self)

Gets the list of optional parameters supported by the media backend.

The list should NOT be freed.

Parameters
selfThe media backend
Returns
NULL-terminated array of names of supported parameters.
Since
2.8.0

Definition at line 234 of file backend-iface.c.

References NULL, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_get_available_params(), and purple_media_param_is_supported().

Here is the caller graph for this function:

◆ purple_media_backend_get_codecs()

GList* purple_media_backend_get_codecs ( PurpleMediaBackend self,
const gchar *  sess_id 
)

Gets the codec intersection list for a session.

The intersection list consists of all codecs that are compatible between the local and remote software.

Parameters
selfThe media backend the session is in.
sess_idThe session id of the session to use.
Returns
The codec intersection list.
Since
2.7.0

Definition at line 159 of file backend-iface.c.

References NULL, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_get_codecs().

Here is the caller graph for this function:

◆ purple_media_backend_get_local_candidates()

GList* purple_media_backend_get_local_candidates ( PurpleMediaBackend self,
const gchar *  sess_id,
const gchar *  participant 
)

Gets the list of local candidates for a stream.

Parameters
selfThe media backend the stream is in.
sess_idThe session id associated with the stream.
particilantThe participant associated with the stream.
Returns
The list of local candidates.
Since
2.7.0

Definition at line 168 of file backend-iface.c.

References NULL, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_get_local_candidates().

Here is the caller graph for this function:

◆ purple_media_backend_get_type()

GType purple_media_backend_get_type ( void  )

Gets the media backend's GType.

Returns
The media backend's GType.
Since
2.7.0

Definition at line 102 of file backend-iface.c.

References info, NULL, and purple_media_backend_base_init().

◆ purple_media_backend_set_decryption_parameters()

gboolean purple_media_backend_set_decryption_parameters ( PurpleMediaBackend self,
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.

Parameters
selfThe media backend the session is in.
sess_idThe session id of the session to set parameters of.
participantThe participant of the session to set parameters of.
cipherThe cipher to use to decrypt media coming from this session's participant.
authThe algorithm to use for authentication of the media coming from the session's participant.
keyThe decryption key.
key_lenByte length of the decryption key.
Since
2.11.0

Definition at line 211 of file backend-iface.c.

References FALSE, key, PURPLE_IS_MEDIA_BACKEND, PURPLE_MEDIA_BACKEND_GET_INTERFACE, and _PurpleMediaBackendIface::set_decryption_parameters.

Referenced by purple_media_set_decryption_parameters().

Here is the caller graph for this function:

◆ purple_media_backend_set_encryption_parameters()

gboolean purple_media_backend_set_encryption_parameters ( PurpleMediaBackend self,
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.

Parameters
selfThe media backend the session is in.
sess_idThe session id of the session to set parameters of.
cipherThe cipher to use to encrypt our media in the session.
authThe algorithm to use to compute authentication codes for our media frames.
keyThe encryption key.
key_lenByte length of the encryption key.
Since
2.11.0

Definition at line 197 of file backend-iface.c.

References FALSE, key, PURPLE_IS_MEDIA_BACKEND, PURPLE_MEDIA_BACKEND_GET_INTERFACE, and _PurpleMediaBackendIface::set_encryption_parameters.

Referenced by purple_media_set_encryption_parameters().

Here is the caller graph for this function:

◆ purple_media_backend_set_params()

void purple_media_backend_set_params ( PurpleMediaBackend self,
guint  num_params,
GParameter *  params 
)

Sets various optional parameters of the media backend.

Parameters
selfThe media backend to set the parameters on.
num_paramsThe number of parameters to pass to backend
paramsArray of GParameter to pass to backend
Since
2.8.0

Definition at line 226 of file backend-iface.c.

References params, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_set_params().

Here is the caller graph for this function:

◆ purple_media_backend_set_remote_codecs()

gboolean purple_media_backend_set_remote_codecs ( PurpleMediaBackend self,
const gchar *  sess_id,
const gchar *  participant,
GList *  codecs 
)

Sets the remote codecs on a stream.

Parameters
selfThe media backend the stream is in.
sess_idThe session id the stream is associated with.
participantThe participant the stream is associated with.
codecsThe list of remote codecs to set.
Returns
True if the remote codecs were set successfully, otherwise False.
Since
2.7.0

Definition at line 178 of file backend-iface.c.

References FALSE, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_set_remote_codecs().

Here is the caller graph for this function:

◆ purple_media_backend_set_send_codec()

gboolean purple_media_backend_set_send_codec ( PurpleMediaBackend self,
const gchar *  sess_id,
PurpleMediaCodec codec 
)

Sets which codec format to send media content in for a session.

Parameters
selfThe media backend the session is in.
sess_idThe session id of the session to set the codec for.
codecThe codec to set.
Returns
True if set successfully, otherwise False.
Since
2.7.0

Definition at line 188 of file backend-iface.c.

References FALSE, PURPLE_IS_MEDIA_BACKEND, and PURPLE_MEDIA_BACKEND_GET_INTERFACE.

Referenced by purple_media_set_send_codec().

Here is the caller graph for this function:

◆ purple_media_backend_set_send_rtcp_mux()

gboolean purple_media_backend_set_send_rtcp_mux ( PurpleMediaBackend self,
const gchar *  sess_id,
const gchar *  participant,
gboolean  send_rtcp_mux 
)

purple_media_backend_set_send_rtcp_mux: @self: The media backend the session is in. @sess_id: The session id of the session to set the rtcp-mux option to @participant: The participant the stream is associated with. @send_rtcp_mux: Whether or not to enable rtcp-mux

Controls whether or not the RTCP should be muxed with the RTP

Returns: True if set successfully, otherwise False.

Since
2.11.0

Definition at line 243 of file backend-iface.c.

References FALSE, PURPLE_IS_MEDIA_BACKEND, PURPLE_MEDIA_BACKEND_GET_INTERFACE, and _PurpleMediaBackendIface::set_send_rtcp_mux.

Referenced by purple_media_set_send_rtcp_mux().

Here is the caller graph for this function:

Variable Documentation

◆ purple_media_backend_signals

guint purple_media_backend_signals[LAST_SIGNAL] = {0}
static

Definition at line 40 of file backend-iface.c.

Referenced by purple_media_backend_base_init().