libpurple/media/backend-iface.c

Thu, 21 Mar 2024 22:18:04 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 21 Mar 2024 22:18:04 -0500
changeset 42650
4577958c4c6a
parent 42594
eddde70cedd8
permissions
-rw-r--r--

Add missing documentation for all of the media API

I had to guess on some of this, and I even noted it sometimes, but this makes
the doc check happy for now until we come back around and refactor this API.

Testing Done:
Ran the unit tests with the doc check. That's not include in this as this is already a lot of changes.

Reviewed at https://reviews.imfreedom.org/r/3044/

42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
1 /*
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
2 * Purple - Internet Messaging Library
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
4 *
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
7 * source distribution.
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
12 * any later version.
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
17 * more details.
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
18 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42584
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
21 */
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
22
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
23 #include "backend-iface.h"
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
24
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
25 enum {
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
26 SIG_ERROR,
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
27 SIG_CANDIDATES_PREPARED,
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
28 SIG_CODECS_CHANGED,
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
29 SIG_NEW_CANDIDATE,
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
30 SIG_ACTIVE_CANDIDATE_PAIR,
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
31 N_SIGNALS,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
32 };
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
33
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
34 static guint signals[N_SIGNALS] = {0, };
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
35
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
36 static void
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
37 purple_media_backend_base_init(gpointer iface)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
38 {
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
39 static gboolean is_initialized = FALSE;
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
40
41489
8026339f5ace Modernize some media files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41146
diff changeset
41 if (is_initialized) {
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
42 return;
41489
8026339f5ace Modernize some media files
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41146
diff changeset
43 }
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
44
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
45 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
46 * PurpleMediaBackend:conference-type:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
47 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
48 * The type of the conference.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
49 */
29562
7f2e253c266e This is an interface and not a class.
Michael Ruprecht <maiku@pidgin.im>
parents: 29560
diff changeset
50 g_object_interface_install_property(iface,
41490
2b1695327414 Make VV libraries required
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41489
diff changeset
51 g_param_spec_string("conference-type",
29558
a151d2be726c Add the conference-type property to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29555
diff changeset
52 "Conference Type",
a151d2be726c Add the conference-type property to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29555
diff changeset
53 "The type of conference that this backend "
a151d2be726c Add the conference-type property to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29555
diff changeset
54 "has been created to provide.",
29560
0af31a3eb297 Fix parameter to actually be a string instead of an object.
Michael Ruprecht <maiku@pidgin.im>
parents: 29558
diff changeset
55 NULL,
35063
8ac1510a27ae media: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 31687
diff changeset
56 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
8ac1510a27ae media: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 31687
diff changeset
57 G_PARAM_STATIC_STRINGS));
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
58
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
59 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
60 * PurpleMediaBackend:media:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
61 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
62 * The media object that this back end is bound to.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
63 */
29562
7f2e253c266e This is an interface and not a class.
Michael Ruprecht <maiku@pidgin.im>
parents: 29560
diff changeset
64 g_object_interface_install_property(iface,
41490
2b1695327414 Make VV libraries required
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41489
diff changeset
65 g_param_spec_object(
36841
53531102aa3a g-ir-scanner gives a critical warning for PurpleMedia not being a GObject with USE_VV not defined
Ankit Vani <a@nevitus.org>
parents: 31687
diff changeset
66 "media", "Purple Media",
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
67 "The media object that this backend is bound to.",
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
68 PURPLE_TYPE_MEDIA,
35063
8ac1510a27ae media: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 31687
diff changeset
69 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
8ac1510a27ae media: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 31687
diff changeset
70 G_PARAM_STATIC_STRINGS));
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
71
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
72 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
73 * PurpleMediaBackend::error:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
74 * @backend: The backend instance.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
75 * @message: The error message.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
76 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
77 * Emitted when the backend has encountered an error.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
78 */
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
79 signals[SIG_ERROR] = g_signal_new("error",
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
80 G_TYPE_FROM_CLASS(iface),
38365
2ee19fb5fb0d libpurple: Use default marshaller for GObject signals
Mike Ruprecht <cmaiku@gmail.com>
parents: 37191
diff changeset
81 G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
82 G_TYPE_NONE, 1, G_TYPE_STRING);
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
83
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
84 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
85 * PurpleMediaBackend::candidates-prepared:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
86 * @backend: The backend instance.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
87 * @session_id: The session id.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
88 * @name: The name.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
89 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
90 * Emitted when the candidates have been prepared.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
91 */
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
92 signals[SIG_CANDIDATES_PREPARED] = g_signal_new("candidates-prepared",
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
93 G_TYPE_FROM_CLASS(iface),
38365
2ee19fb5fb0d libpurple: Use default marshaller for GObject signals
Mike Ruprecht <cmaiku@gmail.com>
parents: 37191
diff changeset
94 G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
95 G_TYPE_NONE, 2, G_TYPE_STRING,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
96 G_TYPE_STRING);
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
97
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
98 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
99 * PurpleMediaBackend::codecs-changed:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
100 * @backend: The backend instance.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
101 * @session_id: The session id.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
102 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
103 * Emitted when the codecs have changed.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
104 */
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
105 signals[SIG_CODECS_CHANGED] = g_signal_new("codecs-changed",
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
106 G_TYPE_FROM_CLASS(iface),
38365
2ee19fb5fb0d libpurple: Use default marshaller for GObject signals
Mike Ruprecht <cmaiku@gmail.com>
parents: 37191
diff changeset
107 G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
108 G_TYPE_NONE, 1, G_TYPE_STRING);
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
109
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
110 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
111 * PurpleMediaBackend::new-candidate:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
112 * @backend: The backend instance.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
113 * @session_id: The session id.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
114 * @participant: The participant.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
115 * @candidate: The new candidate.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
116 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
117 * Emitted when a new media candidate is available.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
118 */
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
119 signals[SIG_NEW_CANDIDATE] = g_signal_new("new-candidate",
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
120 G_TYPE_FROM_CLASS(iface),
38365
2ee19fb5fb0d libpurple: Use default marshaller for GObject signals
Mike Ruprecht <cmaiku@gmail.com>
parents: 37191
diff changeset
121 G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
122 G_TYPE_NONE, 3, G_TYPE_POINTER,
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
123 G_TYPE_POINTER, PURPLE_MEDIA_TYPE_CANDIDATE);
42650
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
124
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
125 /**
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
126 * PurpleMediaBackend::active-candidate-pair:
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
127 * @backend: The backend instance.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
128 * @session_id: The session id.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
129 * @participant: The participant.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
130 * @candidate1: The first candidate.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
131 * @candidate2: The second candidate.
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
132 *
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
133 * This is currently not emitted any, so I'd be guessing...
4577958c4c6a Add missing documentation for all of the media API
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
134 */
42584
687260353985 Make signal and property enums and initializers consistent
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41685
diff changeset
135 signals[SIG_ACTIVE_CANDIDATE_PAIR] = g_signal_new("active-candidate-pair",
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
136 G_TYPE_FROM_CLASS(iface),
38365
2ee19fb5fb0d libpurple: Use default marshaller for GObject signals
Mike Ruprecht <cmaiku@gmail.com>
parents: 37191
diff changeset
137 G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
138 G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING,
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
139 PURPLE_MEDIA_TYPE_CANDIDATE,
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
140 PURPLE_MEDIA_TYPE_CANDIDATE);
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
141
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
142 is_initialized = TRUE;
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
143 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
144
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
145 GType
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
146 purple_media_backend_get_type(void)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
147 {
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
148 static GType iface_type = 0;
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
149 if (iface_type == 0) {
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
150 static const GTypeInfo info = {
39757
4a5ba806d8c9 Rename *Iface to more standard names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38365
diff changeset
151 sizeof(PurpleMediaBackendInterface),
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
152 purple_media_backend_base_init,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
153 NULL,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
154 NULL,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
155 NULL,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
156 NULL,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
157 0,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
158 0,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
159 NULL,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
160 NULL
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
161 };
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
162
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
163 iface_type = g_type_register_static (G_TYPE_INTERFACE,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
164 "PurpleMediaBackend", &info, 0);
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
165 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
166
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
167 return iface_type;
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
168 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
169
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
170 gboolean
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
171 purple_media_backend_add_stream(PurpleMediaBackend *self,
41146
d1a4975ae036 Use fs_stream_set_transmitter_ht
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40890
diff changeset
172 const gchar *sess_id, const gchar *who, PurpleMediaSessionType type,
d1a4975ae036 Use fs_stream_set_transmitter_ht
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40890
diff changeset
173 gboolean initiator, const gchar *transmitter, GHashTable *params)
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
174 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
175 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
176 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->add_stream(self,
41146
d1a4975ae036 Use fs_stream_set_transmitter_ht
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40890
diff changeset
177 sess_id, who, type, initiator, transmitter, params);
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
178 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
179
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
180 void
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
181 purple_media_backend_add_remote_candidates(PurpleMediaBackend *self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
182 const gchar *sess_id, const gchar *participant,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
183 GList *remote_candidates)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
184 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
185 g_return_if_fail(PURPLE_MEDIA_IS_BACKEND(self));
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
186 PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->add_remote_candidates(self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
187 sess_id, participant, remote_candidates);
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
188 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
189
29597
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
190 gboolean
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
191 purple_media_backend_codecs_ready(PurpleMediaBackend *self,
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
192 const gchar *sess_id)
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
193 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
194 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
29597
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
195 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->codecs_ready(self,
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
196 sess_id);
22843326ee22 Add codecs_ready to the media backend interface.
Michael Ruprecht <maiku@pidgin.im>
parents: 29590
diff changeset
197 }
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
198
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
199 GList *
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
200 purple_media_backend_get_codecs(PurpleMediaBackend *self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
201 const gchar *sess_id)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
202 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
203 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), NULL);
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
204 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->get_codecs(self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
205 sess_id);
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
206 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
207
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
208 GList *
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
209 purple_media_backend_get_local_candidates(PurpleMediaBackend *self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
210 const gchar *sess_id, const gchar *participant)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
211 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
212 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), NULL);
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
213 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
214 get_local_candidates(self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
215 sess_id, participant);
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
216 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
217
29588
a3fef46ce04a Make the backend interface's set_remote_codecs function return gboolean.
Michael Ruprecht <maiku@pidgin.im>
parents: 29562
diff changeset
218 gboolean
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
219 purple_media_backend_set_remote_codecs(PurpleMediaBackend *self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
220 const gchar *sess_id, const gchar *participant,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
221 GList *codecs)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
222 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
223 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
29588
a3fef46ce04a Make the backend interface's set_remote_codecs function return gboolean.
Michael Ruprecht <maiku@pidgin.im>
parents: 29562
diff changeset
224 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_remote_codecs(
a3fef46ce04a Make the backend interface's set_remote_codecs function return gboolean.
Michael Ruprecht <maiku@pidgin.im>
parents: 29562
diff changeset
225 self, sess_id, participant, codecs);
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
226 }
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
227
29590
bec92b90acc9 Change the media backend interface's set_send_codec to return gboolean to
Michael Ruprecht <maiku@pidgin.im>
parents: 29588
diff changeset
228 gboolean
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
229 purple_media_backend_set_send_codec(PurpleMediaBackend *self,
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
230 const gchar *sess_id, PurpleMediaCodec *codec)
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
231 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
232 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
29590
bec92b90acc9 Change the media backend interface's set_send_codec to return gboolean to
Michael Ruprecht <maiku@pidgin.im>
parents: 29588
diff changeset
233 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_send_codec(self,
29555
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
234 sess_id, codec);
15bb28ca4cf6 Add a media backend interface to handle different backends in addition to
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
235 }
31687
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
236
36318
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
237 gboolean
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
238 purple_media_backend_set_encryption_parameters(PurpleMediaBackend *self,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
239 const gchar *sess_id, const gchar *cipher,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
240 const gchar *auth, const gchar *key, gsize key_len)
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
241 {
39757
4a5ba806d8c9 Rename *Iface to more standard names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38365
diff changeset
242 PurpleMediaBackendInterface *backend_iface;
36318
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
243
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
244 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
36318
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
245 backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
246 g_return_val_if_fail(backend_iface->set_encryption_parameters, FALSE);
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
247 return backend_iface->set_encryption_parameters(self,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
248 sess_id, cipher, auth, key, key_len);
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
249 }
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
250
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
251 gboolean
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
252 purple_media_backend_set_decryption_parameters(PurpleMediaBackend *self,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
253 const gchar *sess_id, const gchar *participant,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
254 const gchar *cipher, const gchar *auth,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
255 const gchar *key, gsize key_len)
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
256 {
39757
4a5ba806d8c9 Rename *Iface to more standard names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38365
diff changeset
257 PurpleMediaBackendInterface *backend_iface;
36318
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
258
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
259 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
36318
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
260 backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
261 g_return_val_if_fail(backend_iface->set_decryption_parameters, FALSE);
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
262 return backend_iface->set_decryption_parameters(self,
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
263 sess_id, participant, cipher, auth, key, key_len);
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
264 }
a0906e7a6bae Implement media encryption
Jakub Adam <jakub.adam@ktknet.cz>
parents: 31687
diff changeset
265
40268
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
266 gboolean
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
267 purple_media_backend_set_require_encryption(PurpleMediaBackend *self,
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
268 const gchar *sess_id, const gchar *participant,
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
269 gboolean require_encryption)
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
270 {
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
271 PurpleMediaBackendInterface *backend_iface;
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
272
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
273 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
40268
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
274 backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
275
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
276 if (!backend_iface->set_require_encryption) {
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
277 return FALSE;
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
278 }
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
279
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
280 return backend_iface->set_require_encryption(self,
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
281 sess_id, participant, require_encryption);
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
282 }
a7be471404ba Port purple_media_set_require_encryption api
Fabrice Bellet <fabrice@bellet.info>
parents: 39757
diff changeset
283
31687
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
284 void
41146
d1a4975ae036 Use fs_stream_set_transmitter_ht
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40890
diff changeset
285 purple_media_backend_set_params(PurpleMediaBackend *self, GHashTable *params)
31687
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
286 {
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
287 g_return_if_fail(PURPLE_MEDIA_IS_BACKEND(self));
41146
d1a4975ae036 Use fs_stream_set_transmitter_ht
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40890
diff changeset
288 PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_params(self, params);
31687
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
289 }
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
290
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
291 const gchar **
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
292 purple_media_backend_get_available_params(PurpleMediaBackend *self)
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
293 {
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
294 static const gchar *NULL_ARRAY[] = { NULL };
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
295
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
296 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), NULL_ARRAY);
31687
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
297 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->get_available_params();
4877d06f3234 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
Jakub Adam <jakub.adam@ktknet.cz>
parents: 29597
diff changeset
298 }
36321
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
299
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
300 gboolean
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
301 purple_media_backend_set_send_rtcp_mux(PurpleMediaBackend *self,
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
302 const gchar *sess_id, const gchar *participant, gboolean send_rtcp_mux)
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
303 {
39757
4a5ba806d8c9 Rename *Iface to more standard names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38365
diff changeset
304 PurpleMediaBackendInterface *backend_iface;
36321
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
305
40890
631788774f96 Use PurpleMedia/PURPLE_MEDIA prefix for everything in libpurple/media.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40268
diff changeset
306 g_return_val_if_fail(PURPLE_MEDIA_IS_BACKEND(self), FALSE);
36321
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
307 backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(self);
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
308 g_return_val_if_fail(backend_iface->set_send_rtcp_mux, FALSE);
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
309 return backend_iface->set_send_rtcp_mux(self,
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
310 sess_id, participant, send_rtcp_mux);
5f5abd63c305 media: Add a send-rtcp-mux API to allow muxing of RTP and RTCP
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents: 36318
diff changeset
311 }

mercurial