pidgin 2.14.14dev
Loading...
Searching...
No Matches
mediamanager.h
Go to the documentation of this file.
1
6/* purple
7 *
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26
27#ifndef _PURPLE_MEDIA_MANAGER_H_
28#define _PURPLE_MEDIA_MANAGER_H_
29
30#include <glib.h>
31#include <glib-object.h>
32
34typedef struct _PurpleMediaManager PurpleMediaManager;
36typedef struct _PurpleMediaManagerClass PurpleMediaManagerClass;
37
38#include "account.h"
39#include "media.h"
40
57typedef struct {
58 void (*readable) (PurpleMediaManager *manager, PurpleMedia *media,
59 const gchar *session_id, const gchar *participant, gpointer user_data);
60 void (*writable) (PurpleMediaManager *manager, PurpleMedia *media,
61 const gchar *session_id, const gchar *participant, gboolean writable,
62 gpointer user_data);
64
65G_BEGIN_DECLS
66
67#define PURPLE_TYPE_MEDIA_MANAGER (purple_media_manager_get_type())
68#define PURPLE_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManager))
69#define PURPLE_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
70#define PURPLE_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_MANAGER))
71#define PURPLE_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_MANAGER))
72#define PURPLE_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
73
74#ifdef __cplusplus
75extern "C" {
76#endif
77
78/**************************************************************************/
80/**************************************************************************/
91
100
115 PurpleAccount *account,
116 const char *conference_type,
117 const char *remote_user,
118 gboolean initiator);
119
130
142 PurpleMediaManager *manager, PurpleAccount *account);
143
152void
154 PurpleMedia *media);
155
176 PurpleMediaManager *manager,
177 PurpleAccount *account,
178 const char *conference_type,
179 const char *remote_user,
180 gboolean initiator);
181
192
204 PurpleMediaManager *manager, PurpleAccount *account);
205
221 PurpleMediaManager *manager, PurpleMedia *media,
222 const gchar *session_id, const gchar *participant);
223
238 PurpleMedia *media, const gchar *session_id,
239 const gchar *participant, gulong window_id);
240
252 PurpleMediaManager *manager, gulong output_window_id);
253
265 PurpleMediaManager *manager, PurpleMedia *media,
266 const gchar *session_id, const gchar *participant);
267
277 PurpleMediaCaps caps);
278
289
299 GType backend_type);
300
311
326 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id,
327 const gchar *participant, PurpleMediaAppDataCallbacks *callbacks,
328 gpointer user_data, GDestroyNotify notify);
329
352 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id,
353 const gchar *participant, gpointer buffer, guint size, gboolean blocking);
354
373 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id,
374 const gchar *participant, gpointer buffer, guint max_size,
375 gboolean blocking);
376
377/*}@*/
378
379#ifdef __cplusplus
380}
381#endif
382
383G_END_DECLS
384
385#endif /* _PURPLE_MEDIA_MANAGER_H_ */
Account API.
Media API.
struct _PurpleMedia PurpleMedia
An opaque structure representing a media call.
Definition media.h:48
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.
GList * purple_media_manager_get_private_media(PurpleMediaManager *manager)
Gets all of the private media sessions.
GList * purple_media_manager_get_media(PurpleMediaManager *manager)
Gets all of the media sessions.
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.
GType purple_media_manager_get_type(void)
Gets the media manager's GType.
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.
struct _PurpleMediaManagerClass PurpleMediaManagerClass
The GObject class structure of the PurpleMediaManager object.
void purple_media_manager_set_backend_type(PurpleMediaManager *manager, GType backend_type)
Sets which media backend type media objects will use.
GList * purple_media_manager_get_private_media_by_account(PurpleMediaManager *manager, PurpleAccount *account)
Gets all of the private media sessions for a given account.
PurpleMediaManager * purple_media_manager_get(void)
Gets the "global" media manager object.
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.
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 ...
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.
PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager)
Gets which media caps the UI supports.
GList * purple_media_manager_get_media_by_account(PurpleMediaManager *manager, PurpleAccount *account)
Gets all of the media sessions for a given account.
gboolean purple_media_manager_remove_output_window(PurpleMediaManager *manager, gulong output_window_id)
Remove a previously registerd output window.
PurpleMedia * purple_media_manager_create_media(PurpleMediaManager *manager, PurpleAccount *account, const char *conference_type, const char *remote_user, gboolean initiator)
Creates a media session.
GType purple_media_manager_get_backend_type(PurpleMediaManager *manager)
Gets which media backend type media objects will use.
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.
struct _PurpleMediaManager PurpleMediaManager
An opaque structure representing a group of (usually all) media calls.
void purple_media_manager_remove_media(PurpleMediaManager *manager, PurpleMedia *media)
Removes a media session from the media manager.
void purple_media_manager_set_ui_caps(PurpleMediaManager *manager, PurpleMediaCaps caps)
Sets which media caps the UI supports.
PurpleMediaAppDataCallbacks: @readable: Called when the stream has received data and is readable.
Structure representing an account.
Definition account.h:170