| 69 * available to read, so the data must be read completely. |
69 * available to read, so the data must be read completely. |
| 70 * The @writable callback will only be called when the writable state of the |
70 * The @writable callback will only be called when the writable state of the |
| 71 * stream changes. The @writable argument defines whether the stream has |
71 * stream changes. The @writable argument defines whether the stream has |
| 72 * become writable or stopped being writable. |
72 * become writable or stopped being writable. |
| 73 * |
73 * |
| 74 * Since: 2.6.0 |
74 * Since: 2.6 |
| 75 */ |
75 */ |
| 76 PURPLE_AVAILABLE_TYPE_IN_2_6 |
76 PURPLE_AVAILABLE_TYPE_IN_2_6 |
| 77 typedef struct { |
77 typedef struct { |
| 78 void (*readable) (PurpleMediaManager *manager, PurpleMedia *media, |
78 void (*readable) (PurpleMediaManager *manager, PurpleMedia *media, |
| 79 const gchar *session_id, const gchar *participant, gpointer user_data); |
79 const gchar *session_id, const gchar *participant, gpointer user_data); |
| 114 * |
114 * |
| 115 * Creates a media session. |
115 * Creates a media session. |
| 116 * |
116 * |
| 117 * Returns: (transfer full): A newly created media session. |
117 * Returns: (transfer full): A newly created media session. |
| 118 * |
118 * |
| 119 * Since: 2.6.0 |
119 * Since: 2.6 |
| 120 */ |
120 */ |
| 121 PURPLE_AVAILABLE_IN_2_6 |
121 PURPLE_AVAILABLE_IN_2_6 |
| 122 PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager, |
122 PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager, |
| 123 PurpleAccount *account, |
123 PurpleAccount *account, |
| 124 const char *conference_type, |
124 const char *conference_type, |
| 145 * |
145 * |
| 146 * Gets all of the media sessions for a given account. |
146 * Gets all of the media sessions for a given account. |
| 147 * |
147 * |
| 148 * Returns: (transfer container) (element-type PurpleMedia): A list of the media sessions on the given account. |
148 * Returns: (transfer container) (element-type PurpleMedia): A list of the media sessions on the given account. |
| 149 * |
149 * |
| 150 * Since: 2.6.0 |
150 * Since: 2.6 |
| 151 */ |
151 */ |
| 152 PURPLE_AVAILABLE_IN_2_6 |
152 PURPLE_AVAILABLE_IN_2_6 |
| 153 GList *purple_media_manager_get_media_by_account( |
153 GList *purple_media_manager_get_media_by_account( |
| 154 PurpleMediaManager *manager, PurpleAccount *account); |
154 PurpleMediaManager *manager, PurpleAccount *account); |
| 155 |
155 |
| 158 * @manager: The media manager to remove the media session from. |
158 * @manager: The media manager to remove the media session from. |
| 159 * @media: The media session to remove. |
159 * @media: The media session to remove. |
| 160 * |
160 * |
| 161 * Removes a media session from the media manager. |
161 * Removes a media session from the media manager. |
| 162 * |
162 * |
| 163 * Since: 2.6.0 |
163 * Since: 2.6 |
| 164 */ |
164 */ |
| 165 PURPLE_AVAILABLE_IN_2_6 |
165 PURPLE_AVAILABLE_IN_2_6 |
| 166 void |
166 void |
| 167 purple_media_manager_remove_media(PurpleMediaManager *manager, |
167 purple_media_manager_remove_media(PurpleMediaManager *manager, |
| 168 PurpleMedia *media); |
168 PurpleMedia *media); |
| 181 * get notified about. It is useful especially for sessions with a type of |
181 * get notified about. It is useful especially for sessions with a type of |
| 182 * PURPLE_MEDIA_APPLICATION which the front-end wouldn't know how to handle. |
182 * PURPLE_MEDIA_APPLICATION which the front-end wouldn't know how to handle. |
| 183 * |
183 * |
| 184 * Returns: (transfer full): A newly created media session. |
184 * Returns: (transfer full): A newly created media session. |
| 185 * |
185 * |
| 186 * Since: 2.6.0 |
186 * Since: 2.6 |
| 187 */ |
187 */ |
| 188 PURPLE_AVAILABLE_IN_2_6 |
188 PURPLE_AVAILABLE_IN_2_6 |
| 189 PurpleMedia *purple_media_manager_create_private_media( |
189 PurpleMedia *purple_media_manager_create_private_media( |
| 190 PurpleMediaManager *manager, |
190 PurpleMediaManager *manager, |
| 191 PurpleAccount *account, |
191 PurpleAccount *account, |
| 213 * |
213 * |
| 214 * Gets all of the private media sessions for a given account. |
214 * Gets all of the private media sessions for a given account. |
| 215 * |
215 * |
| 216 * Returns: (transfer container) (element-type PurpleMedia): A list of the private media sessions on the given account. |
216 * Returns: (transfer container) (element-type PurpleMedia): A list of the private media sessions on the given account. |
| 217 * |
217 * |
| 218 * Since: 2.11.0 |
218 * Since: 2.11 |
| 219 */ |
219 */ |
| 220 PURPLE_AVAILABLE_IN_2_11 |
220 PURPLE_AVAILABLE_IN_2_11 |
| 221 GList *purple_media_manager_get_private_media_by_account( |
221 GList *purple_media_manager_get_private_media_by_account( |
| 222 PurpleMediaManager *manager, PurpleAccount *account); |
222 PurpleMediaManager *manager, PurpleAccount *account); |
| 223 |
223 |
| 232 * |
232 * |
| 233 * This shouldn't be called outside of mediamanager.c and media.c |
233 * This shouldn't be called outside of mediamanager.c and media.c |
| 234 * |
234 * |
| 235 * Returns: TRUE if it succeeded, FALSE if it failed. |
235 * Returns: TRUE if it succeeded, FALSE if it failed. |
| 236 * |
236 * |
| 237 * Since: 2.6.0 |
237 * Since: 2.6 |
| 238 */ |
238 */ |
| 239 PURPLE_AVAILABLE_IN_2_6 |
239 PURPLE_AVAILABLE_IN_2_6 |
| 240 gboolean purple_media_manager_create_output_window( |
240 gboolean purple_media_manager_create_output_window( |
| 241 PurpleMediaManager *manager, PurpleMedia *media, |
241 PurpleMediaManager *manager, PurpleMedia *media, |
| 242 const gchar *session_id, const gchar *participant); |
242 const gchar *session_id, const gchar *participant); |
| 250 * |
250 * |
| 251 * Registers a video output window to be created for a given stream. |
251 * Registers a video output window to be created for a given stream. |
| 252 * |
252 * |
| 253 * Returns: A unique ID to the registered output window, 0 if it failed. |
253 * Returns: A unique ID to the registered output window, 0 if it failed. |
| 254 * |
254 * |
| 255 * Since: 2.6.0 |
255 * Since: 2.6 |
| 256 */ |
256 */ |
| 257 PURPLE_AVAILABLE_IN_2_6 |
257 PURPLE_AVAILABLE_IN_2_6 |
| 258 gulong purple_media_manager_set_output_window(PurpleMediaManager *manager, |
258 gulong purple_media_manager_set_output_window(PurpleMediaManager *manager, |
| 259 PurpleMedia *media, const gchar *session_id, |
259 PurpleMedia *media, const gchar *session_id, |
| 260 const gchar *participant); |
260 const gchar *participant); |
| 266 * |
266 * |
| 267 * Remove a previously registered output window. |
267 * Remove a previously registered output window. |
| 268 * |
268 * |
| 269 * Returns: TRUE if it found the output window and was successful, else FALSE. |
269 * Returns: TRUE if it found the output window and was successful, else FALSE. |
| 270 * |
270 * |
| 271 * Since: 2.6.0 |
271 * Since: 2.6 |
| 272 */ |
272 */ |
| 273 PURPLE_AVAILABLE_IN_2_6 |
273 PURPLE_AVAILABLE_IN_2_6 |
| 274 gboolean purple_media_manager_remove_output_window( |
274 gboolean purple_media_manager_remove_output_window( |
| 275 PurpleMediaManager *manager, gulong output_window_id); |
275 PurpleMediaManager *manager, gulong output_window_id); |
| 276 |
276 |
| 281 * @session_id: The session the output windows were registered for. |
281 * @session_id: The session the output windows were registered for. |
| 282 * @participant: The participant the output windows were registered for. |
282 * @participant: The participant the output windows were registered for. |
| 283 * |
283 * |
| 284 * Remove all output windows for a given conference/session/participant/stream. |
284 * Remove all output windows for a given conference/session/participant/stream. |
| 285 * |
285 * |
| 286 * Since: 2.6.0 |
286 * Since: 2.6 |
| 287 */ |
287 */ |
| 288 PURPLE_AVAILABLE_IN_2_6 |
288 PURPLE_AVAILABLE_IN_2_6 |
| 289 void purple_media_manager_remove_output_windows( |
289 void purple_media_manager_remove_output_windows( |
| 290 PurpleMediaManager *manager, PurpleMedia *media, |
290 PurpleMediaManager *manager, PurpleMedia *media, |
| 291 const gchar *session_id, const gchar *participant); |
291 const gchar *session_id, const gchar *participant); |
| 295 * @manager: The manager to set the caps on. |
295 * @manager: The manager to set the caps on. |
| 296 * @caps: The caps to set. |
296 * @caps: The caps to set. |
| 297 * |
297 * |
| 298 * Sets which media caps the UI supports. |
298 * Sets which media caps the UI supports. |
| 299 * |
299 * |
| 300 * Since: 2.6.0 |
300 * Since: 2.6 |
| 301 */ |
301 */ |
| 302 PURPLE_AVAILABLE_IN_2_6 |
302 PURPLE_AVAILABLE_IN_2_6 |
| 303 void purple_media_manager_set_ui_caps(PurpleMediaManager *manager, |
303 void purple_media_manager_set_ui_caps(PurpleMediaManager *manager, |
| 304 PurpleMediaCaps caps); |
304 PurpleMediaCaps caps); |
| 305 |
305 |
| 321 * @manager: The manager to set the caps on. |
321 * @manager: The manager to set the caps on. |
| 322 * @backend_type: The media backend type to use. |
322 * @backend_type: The media backend type to use. |
| 323 * |
323 * |
| 324 * Sets which media backend type media objects will use. |
324 * Sets which media backend type media objects will use. |
| 325 * |
325 * |
| 326 * Since: 2.7.0 |
326 * Since: 2.7 |
| 327 */ |
327 */ |
| 328 PURPLE_AVAILABLE_IN_2_7 |
328 PURPLE_AVAILABLE_IN_2_7 |
| 329 void purple_media_manager_set_backend_type(PurpleMediaManager *manager, |
329 void purple_media_manager_set_backend_type(PurpleMediaManager *manager, |
| 330 GType backend_type); |
330 GType backend_type); |
| 331 |
331 |
| 353 * @notify: a destroy notify function. |
353 * @notify: a destroy notify function. |
| 354 * |
354 * |
| 355 * Set callbacks on a session to be called when the stream becomes writable |
355 * Set callbacks on a session to be called when the stream becomes writable |
| 356 * or readable for media sessions of type #PURPLE_MEDIA_APPLICATION |
356 * or readable for media sessions of type #PURPLE_MEDIA_APPLICATION |
| 357 * |
357 * |
| 358 * Since: 2.6.0 |
358 * Since: 2.6 |
| 359 */ |
359 */ |
| 360 PURPLE_AVAILABLE_IN_2_6 |
360 PURPLE_AVAILABLE_IN_2_6 |
| 361 void purple_media_manager_set_application_data_callbacks( |
361 void purple_media_manager_set_application_data_callbacks( |
| 362 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, |
362 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, |
| 363 const gchar *participant, PurpleMediaAppDataCallbacks *callbacks, |
363 const gchar *participant, PurpleMediaAppDataCallbacks *callbacks, |
| 382 * sending data after the stream has been configured correctly (encryption |
382 * sending data after the stream has been configured correctly (encryption |
| 383 * parameters for example). |
383 * parameters for example). |
| 384 * |
384 * |
| 385 * Returns: Number of bytes sent or -1 in case of error. |
385 * Returns: Number of bytes sent or -1 in case of error. |
| 386 * |
386 * |
| 387 * Since: 2.6.0 |
387 * Since: 2.6 |
| 388 */ |
388 */ |
| 389 PURPLE_AVAILABLE_IN_2_6 |
389 PURPLE_AVAILABLE_IN_2_6 |
| 390 gint purple_media_manager_send_application_data ( |
390 gint purple_media_manager_send_application_data ( |
| 391 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, |
391 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, |
| 392 const gchar *participant, gpointer buffer, guint size, gboolean blocking); |
392 const gchar *participant, gpointer buffer, guint size, gboolean blocking); |
| 406 * If @blocking is set, unless an error occurred, the function will not return |
406 * If @blocking is set, unless an error occurred, the function will not return |
| 407 * until @max_size bytes are read. |
407 * until @max_size bytes are read. |
| 408 * |
408 * |
| 409 * Returns: Number of bytes received or -1 in case of error. |
409 * Returns: Number of bytes received or -1 in case of error. |
| 410 * |
410 * |
| 411 * Since: 2.6.0 |
411 * Since: 2.6 |
| 412 */ |
412 */ |
| 413 PURPLE_AVAILABLE_IN_2_6 |
413 PURPLE_AVAILABLE_IN_2_6 |
| 414 gint purple_media_manager_receive_application_data ( |
414 gint purple_media_manager_receive_application_data ( |
| 415 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, |
415 PurpleMediaManager *manager, PurpleMedia *media, const gchar *session_id, |
| 416 const gchar *participant, gpointer buffer, guint max_size, |
416 const gchar *participant, gpointer buffer, guint max_size, |