libpurple/purpleprotocolmedia.h

Fri, 02 Jul 2021 04:32:18 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 02 Jul 2021 04:32:18 -0500
changeset 40977
dd0f04c5d212
parent 40584
6f198a69ac48
child 41024
a2ad2d034162
permissions
-rw-r--r--

Cleanup RoomList UI ops

* Mark unused parameters, and remove unnecessary widgets passed to callbacks.
* Remove unused `purple_roomlist_[gs]et_protocol_data`.
* Remove unused list of `PurpleRoomList`s.
* Inline `update_roomlist` using GObject macros.
* Remove use of `PurpleRoomListUiOps->destroy`.
This can be achieved through object destruction notifiers.
I'm not sure how the room list would ever get destroyed in Finch though, as the
widget seems to hold a ref to it, which is cleared when the list is destroyed.
But the list can't be destroyed until said ref is dropped.
* Replace `PurpleRoomlistUiOps->in_progress` with notify signals.

Testing Done:
Compile only. Might have done some tests, but I wrote this a while back and don't remember.

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

40525
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
2 * Purple - Internet Messaging Library
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
40525
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40539
2941deda6d8d Use an https link to gnu.org in the license file headers
Gary Kramlich <grim@reaperworld.com>
parents: 40525
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
40525
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_PROTOCOL_MEDIA_H
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_PROTOCOL_MEDIA_H
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 /**
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 * SECTION:purpleprotocolmedia
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 * @section_id: libpurple-purpleprotocolmedia
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * @short_description: Protocol Media Interface
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * @title: ProtocolMedia Interface
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
35 *
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
36 * #PurpleProtocolMedia describes the multimedia api that is available for
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
37 * protocols.
40525
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #include <glib.h>
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 #include <glib-object.h>
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 #include <libpurple/account.h>
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 #include <libpurple/media.h>
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 #define PURPLE_TYPE_PROTOCOL_MEDIA (purple_protocol_media_get_type())
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 G_DECLARE_INTERFACE(PurpleProtocolMedia, purple_protocol_media, PURPLE,
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 PROTOCOL_MEDIA, GObject)
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 G_BEGIN_DECLS
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 /**
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 * PURPLE_TYPE_PROTOCOL_MEDIA:
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * The standard _get_type method for #PurpleProtocolMedia.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * Since: 3.0.0
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 /**
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * PurpleProtocolMediaInterface:
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * @initiate_session: Initiate a media session with the given contact.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * <sbr/>@account: The account to initiate the media session
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 * on.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 * <sbr/>@who: The remote user to initiate the session with.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * <sbr/>@type: The type of media session to initiate.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 * <sbr/>Returns: %TRUE if the call succeeded else %FALSE.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * (Doesn't imply the media session or stream
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 * will be successfully created)
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 * @get_caps: Checks to see if the given contact supports the given type of
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * media session.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * <sbr/>@account: The account the contact is on.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * <sbr/>@who: The remote user to check for media capability with.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * <sbr/>Returns: The media caps the contact supports.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * @send_dtmf: Sends DTMF codes out-of-band in a protocol-specific way if the
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * protocol supports it, or failing that in-band if the media backend
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * can do so. See purple_media_send_dtmf().
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 * The protocol media interface.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * This interface provides callbacks for media sessions on the protocol.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 struct _PurpleProtocolMediaInterface {
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 /*< private >*/
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 GTypeInterface parent;
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 /*< public >*/
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 gboolean (*initiate_session)(PurpleProtocolMedia *media, PurpleAccount *account, const gchar *who, PurpleMediaSessionType type);
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 PurpleMediaCaps (*get_caps)(PurpleProtocolMedia *media, PurpleAccount *account, const gchar *who);
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 gboolean (*send_dtmf)(PurpleProtocolMedia *protocol_media, PurpleMedia *media, gchar dtmf, guint8 volume, guint8 duration);
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 /*< private >*/
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 gpointer reserved[4];
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 };
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 /**
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 * purple_protocol_media_initiate_session:
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 * @media: The #PurpleProtocolMedia instance.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 * @account: The #PurpleAccount instance.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 * @who: The user to initiate a media session with.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 * @type: The type of media session to create.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 * Initiates a media connection of @type to @who.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 * Returns: %TRUE if successful, %FALSE otherwise.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 * Since: 3.0.0
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 gboolean purple_protocol_media_initiate_session(PurpleProtocolMedia *media, PurpleAccount *account, const gchar *who, PurpleMediaSessionType type);
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 /**
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 * purple_protocol_media_get_caps:
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 * @media: The #PurpleProtocolMedia instance.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 * @account: The #PurpleAccount instance.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 * @who: The user to get the media capabilites for.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 * Gets the #PurpleMediaCaps for @who which determine what types of media are
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 * available.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 * Returns: the media capabilities of @who.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 * Since: 3.0.0
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 PurpleMediaCaps purple_protocol_media_get_caps(PurpleProtocolMedia *media, PurpleAccount *account, const gchar *who);
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 /**
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * purple_protocol_media_send_dtmf:
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 * @protocol_media: The #PurpleProtocolMedia instance.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * @media: The #PurpleMedia instance.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 * @dtmf: A DTMF to send.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 * @volume: The volume to send @dtmf at.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 * @duration: The duration to send @dtmf (in ms?)
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 * Sends a DTMF (dual-tone multi-frequency) signal via the established @media
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 * for the given @duration at the given @volume.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 * It is up to the specific implementation if DTMF is send in or out of band.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 * Returns: %TRUE if successful, %FALSE otherwise.
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 * Since: 3.0.0
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 */
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 gboolean purple_protocol_media_send_dtmf(PurpleProtocolMedia *protocol_media, PurpleMedia *media, gchar dtmf, guint8 volume, guint8 duration);
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 G_END_DECLS
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 #endif /* PURPLE_PROTOCOL_MEDIA_H */

mercurial