annotate libpurple/media/backend-iface.h @ 29574:90c48f1e479a

Change the media backend interface's set_send_codec to return gboolean to be consistent with the PurpleMedia API.
author maiku@pidgin.im
date Mon, 26 Oct 2009 23:17:38 +0000
parents a7cad99144f0
children f351e87b7af0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29539
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
1 /**
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
2 * @file backend-iface.h Interface for media backends
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
3 * @ingroup core
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
4 */
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
5
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
6 /* purple
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
7 *
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
10 * source distribution.
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
11 *
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
15 * (at your option) any later version.
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
16 *
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
20 * GNU General Public License for more details.
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
21 *
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
25 */
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
26
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
27 #ifndef _MEDIA_BACKEND_IFACE_H_
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
28 #define _MEDIA_BACKEND_IFACE_H_
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
29
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
30 #include "codec.h"
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
31 #include "enum-types.h"
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
32
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
33 #include <glib-object.h>
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
34
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
35 G_BEGIN_DECLS
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
36
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
37 #define PURPLE_TYPE_MEDIA_BACKEND (purple_media_backend_get_type())
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
38 #define PURPLE_IS_MEDIA_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_BACKEND))
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
39 #define PURPLE_MEDIA_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_BACKEND, PurpleMediaBackend))
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
40 #define PURPLE_MEDIA_BACKEND_GET_INTERFACE(inst)(G_TYPE_INSTANCE_GET_INTERFACE((inst), PURPLE_TYPE_MEDIA_BACKEND, PurpleMediaBackendIface))
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
41
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
42 typedef struct _PurpleMediaBackend PurpleMediaBackend;
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
43 typedef struct _PurpleMediaBackendIface PurpleMediaBackendIface;
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
44
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
45 struct _PurpleMediaBackendIface
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
46 {
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
47 GTypeInterface parent_iface;
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
48
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
49 gboolean (*add_stream) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
50 const gchar *sess_id, const gchar *who,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
51 PurpleMediaSessionType type, gboolean initiator,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
52 const gchar *transmitter,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
53 guint num_params, GParameter *params);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
54 void (*add_remote_candidates) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
55 const gchar *sess_id, const gchar *participant,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
56 GList *remote_candidates);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
57 GList *(*get_codecs) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
58 const gchar *sess_id);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
59 GList *(*get_local_candidates) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
60 const gchar *sess_id, const gchar *participant);
29572
a7cad99144f0 Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents: 29541
diff changeset
61 gboolean (*set_remote_codecs) (PurpleMediaBackend *self,
29539
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
62 const gchar *sess_id, const gchar *participant,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
63 GList *codecs);
29574
90c48f1e479a Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents: 29572
diff changeset
64 gboolean (*set_send_codec) (PurpleMediaBackend *self,
29539
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
65 const gchar *sess_id, PurpleMediaCodec *codec);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
66 };
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
67
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
68 GType purple_media_backend_get_type(void);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
69
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
70 gboolean purple_media_backend_add_stream(PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
71 const gchar *sess_id, const gchar *who,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
72 PurpleMediaSessionType type, gboolean initiator,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
73 const gchar *transmitter,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
74 guint num_params, GParameter *params);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
75 void purple_media_backend_add_remote_candidates(PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
76 const gchar *sess_id, const gchar *participant,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
77 GList *remote_candidates);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
78 GList *purple_media_backend_get_codecs(PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
79 const gchar *sess_id);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
80 GList *purple_media_backend_get_local_candidates(PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
81 const gchar *sess_id, const gchar *participant);
29572
a7cad99144f0 Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents: 29541
diff changeset
82 gboolean purple_media_backend_set_remote_codecs(PurpleMediaBackend *self,
29539
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
83 const gchar *sess_id, const gchar *participant,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
84 GList *codecs);
29574
90c48f1e479a Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents: 29572
diff changeset
85 gboolean purple_media_backend_set_send_codec(PurpleMediaBackend *self,
29539
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
86 const gchar *sess_id, PurpleMediaCodec *codec);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
87
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
88 G_END_DECLS
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
89
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
90 #endif /* _MEDIA_BACKEND_IFACE_H_ */