Loading...
Searching...
No Matches
mediamanager.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_MANAGER_H_
#define _PURPLE_MEDIA_MANAGER_H_
#include <glib.h>
#include <glib-object.h>
typedef struct _PurpleMediaManager PurpleMediaManager;
typedef struct _PurpleMediaManagerClass PurpleMediaManagerClass;
#include "account.h"
#include "media.h"
typedef struct {
void (*readable) (PurpleMediaManager *manager, PurpleMedia *media,
const gchar *session_id, const gchar *participant, gpointer user_data);
void (*writable) (PurpleMediaManager *manager, PurpleMedia *media,
const gchar *session_id, const gchar *participant, gboolean writable,
gpointer user_data);
} PurpleMediaAppDataCallbacks;
G_BEGIN_DECLS
#define PURPLE_TYPE_MEDIA_MANAGER (purple_media_manager_get_type())
#define PURPLE_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManager))
#define PURPLE_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
#define PURPLE_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_MANAGER))
#define PURPLE_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_MANAGER))
#define PURPLE_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************/
/**************************************************************************/
GType purple_media_manager_get_type(void);
PurpleMediaManager *purple_media_manager_get(void);
PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager,
PurpleAccount *account,
const char *conference_type,
const char *remote_user,
gboolean initiator);
GList *purple_media_manager_get_media(PurpleMediaManager *manager);
GList *purple_media_manager_get_media_by_account(
PurpleMediaManager *manager, PurpleAccount *account);
void
purple_media_manager_remove_media(PurpleMediaManager *manager,
PurpleMedia *media);
PurpleMedia *purple_media_manager_create_private_media(
PurpleMediaManager *manager,
PurpleAccount *account,
const char *conference_type,
const char *remote_user,
gboolean initiator);
GList *purple_media_manager_get_private_media(PurpleMediaManager *manager);
GList *purple_media_manager_get_private_media_by_account(
PurpleMediaManager *manager, PurpleAccount *account);
gboolean purple_media_manager_create_output_window(
PurpleMediaManager *manager, PurpleMedia *media,
const gchar *session_id, const gchar *participant);
gulong purple_media_manager_set_output_window(PurpleMediaManager *manager,
PurpleMedia *media, const gchar *session_id,
const gchar *participant, gulong window_id);
gboolean purple_media_manager_remove_output_window(
PurpleMediaManager *manager, gulong output_window_id);
void purple_media_manager_remove_output_windows(
PurpleMediaManager *manager, PurpleMedia *media,
const gchar *session_id, const gchar *participant);
void purple_media_manager_set_ui_caps(PurpleMediaManager *manager,
PurpleMediaCaps caps);
PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager);
void purple_media_manager_set_backend_type(PurpleMediaManager *manager,
GType backend_type);
GType purple_media_manager_get_backend_type(PurpleMediaManager *manager);
void purple_media_manager_set_application_data_callbacks(
PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id,
const gchar *participant, PurpleMediaAppDataCallbacks *callbacks,
gpointer user_data, GDestroyNotify notify);
gint purple_media_manager_send_application_data (
PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id,
const gchar *participant, gpointer buffer, guint size, gboolean blocking);
gint purple_media_manager_receive_application_data (
PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id,
const gchar *participant, gpointer buffer, guint max_size,
gboolean blocking);
/*}@*/
#ifdef __cplusplus
}
#endif
G_END_DECLS
#endif /* _PURPLE_MEDIA_MANAGER_H_ */
account.h
Account API.
media.h
Media API.
PurpleMedia
struct _PurpleMedia PurpleMedia
An opaque structure representing a media call.
Definition media.h:48
purple_media_manager_send_application_data
gint purple_media_manager_send_application_data(PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, const gchar *participant, gpointer buffer, guint size, gboolean blocking)
purple_media_manager_send_application_data: @manager: The manager to send data with.
purple_media_manager_get_private_media
GList * purple_media_manager_get_private_media(PurpleMediaManager *manager)
Gets all of the private media sessions.
purple_media_manager_get_media
GList * purple_media_manager_get_media(PurpleMediaManager *manager)
Gets all of the media sessions.
purple_media_manager_set_output_window
gulong purple_media_manager_set_output_window(PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, const gchar *participant, gulong window_id)
Registers a video output window to be created for a given stream.
purple_media_manager_get_type
GType purple_media_manager_get_type(void)
Gets the media manager's GType.
purple_media_manager_remove_output_windows
void purple_media_manager_remove_output_windows(PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, const gchar *participant)
Remove all output windows for a given conference/session/participant/stream.
PurpleMediaManagerClass
struct _PurpleMediaManagerClass PurpleMediaManagerClass
The GObject class structure of the PurpleMediaManager object.
Definition mediamanager.h:36
purple_media_manager_set_backend_type
void purple_media_manager_set_backend_type(PurpleMediaManager *manager, GType backend_type)
Sets which media backend type media objects will use.
purple_media_manager_get_private_media_by_account
GList * purple_media_manager_get_private_media_by_account(PurpleMediaManager *manager, PurpleAccount *account)
Gets all of the private media sessions for a given account.
purple_media_manager_get
PurpleMediaManager * purple_media_manager_get(void)
Gets the "global" media manager object.
purple_media_manager_receive_application_data
gint purple_media_manager_receive_application_data(PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, const gchar *participant, gpointer buffer, guint max_size, gboolean blocking)
purple_media_manager_receive_application_data: @manager: The manager to receive data with.
purple_media_manager_set_application_data_callbacks
void purple_media_manager_set_application_data_callbacks(PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, const gchar *participant, PurpleMediaAppDataCallbacks *callbacks, gpointer user_data, GDestroyNotify notify)
purple_media_manager_set_application_data_callbacks: @manager: The manager to register the callbacks ...
purple_media_manager_create_output_window
gboolean purple_media_manager_create_output_window(PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, const gchar *participant)
Signals that output windows should be created for the chosen stream.
purple_media_manager_get_ui_caps
PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager)
Gets which media caps the UI supports.
purple_media_manager_get_media_by_account
GList * purple_media_manager_get_media_by_account(PurpleMediaManager *manager, PurpleAccount *account)
Gets all of the media sessions for a given account.
purple_media_manager_remove_output_window
gboolean purple_media_manager_remove_output_window(PurpleMediaManager *manager, gulong output_window_id)
Remove a previously registerd output window.
purple_media_manager_create_media
PurpleMedia * purple_media_manager_create_media(PurpleMediaManager *manager, PurpleAccount *account, const char *conference_type, const char *remote_user, gboolean initiator)
Creates a media session.
purple_media_manager_get_backend_type
GType purple_media_manager_get_backend_type(PurpleMediaManager *manager)
Gets which media backend type media objects will use.
purple_media_manager_create_private_media
PurpleMedia * purple_media_manager_create_private_media(PurpleMediaManager *manager, PurpleAccount *account, const char *conference_type, const char *remote_user, gboolean initiator)
Creates a private media session.
PurpleMediaManager
struct _PurpleMediaManager PurpleMediaManager
An opaque structure representing a group of (usually all) media calls.
Definition mediamanager.h:34
purple_media_manager_remove_media
void purple_media_manager_remove_media(PurpleMediaManager *manager, PurpleMedia *media)
Removes a media session from the media manager.
purple_media_manager_set_ui_caps
void purple_media_manager_set_ui_caps(PurpleMediaManager *manager, PurpleMediaCaps caps)
Sets which media caps the UI supports.
PurpleMediaAppDataCallbacks
PurpleMediaAppDataCallbacks: @readable: Called when the stream has received data and is readable.
Definition mediamanager.h:57
_PurpleAccount
Structure representing an account.
Definition account.h:170