libpurple/mediamanager.h

branch
soc.2013.gobjectification.plugins
changeset 37023
d9bcdc9a91e6
parent 37017
8e2b68c79fa1
child 37034
9d6765962b22
equal deleted inserted replaced
37022:d891503c8aa6 37023:d9bcdc9a91e6
76 /*@{*/ 76 /*@{*/
77 77
78 /** 78 /**
79 * Gets the media manager's GType. 79 * Gets the media manager's GType.
80 * 80 *
81 * Returns: The media manager's GType. 81 * @return The media manager's GType.
82 */ 82 */
83 GType purple_media_manager_get_type(void); 83 GType purple_media_manager_get_type(void);
84 84
85 /** 85 /**
86 * Gets the "global" media manager object. It's created if it doesn't already exist. 86 * Gets the "global" media manager object. It's created if it doesn't already exist.
87 * 87 *
88 * Returns: The "global" instance of the media manager object. 88 * @return The "global" instance of the media manager object.
89 */ 89 */
90 PurpleMediaManager *purple_media_manager_get(void); 90 PurpleMediaManager *purple_media_manager_get(void);
91 91
92 /** 92 /**
93 * Creates a media session. 93 * Creates a media session.
94 * 94 *
95 * @manager: The media manager to create the session under. 95 * @param manager The media manager to create the session under.
96 * @account: The account to create the session on. 96 * @param account The account to create the session on.
97 * @conference_type: The conference type to feed into Farsight2. 97 * @param conference_type The conference type to feed into Farsight2.
98 * @remote_user: The remote user to initiate the session with. 98 * @param remote_user The remote user to initiate the session with.
99 * @initiator: TRUE if the local user is the initiator of this media call, FALSE otherwise. 99 * @param initiator TRUE if the local user is the initiator of this media call, FALSE otherwise.
100 * 100 *
101 * Returns: A newly created media session. 101 * @return A newly created media session.
102 */ 102 */
103 PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager, 103 PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager,
104 PurpleAccount *account, 104 PurpleAccount *account,
105 const char *conference_type, 105 const char *conference_type,
106 const char *remote_user, 106 const char *remote_user,
107 gboolean initiator); 107 gboolean initiator);
108 108
109 /** 109 /**
110 * Gets all of the media sessions. 110 * Gets all of the media sessions.
111 * 111 *
112 * @manager: The media manager to get all of the sessions from. 112 * @param manager The media manager to get all of the sessions from.
113 * 113 *
114 * Returns: A list of all the media sessions. 114 * @return A list of all the media sessions.
115 */ 115 */
116 GList *purple_media_manager_get_media(PurpleMediaManager *manager); 116 GList *purple_media_manager_get_media(PurpleMediaManager *manager);
117 117
118 /** 118 /**
119 * Gets all of the media sessions for a given account. 119 * Gets all of the media sessions for a given account.
120 * 120 *
121 * @manager: The media manager to get the sessions from. 121 * @param manager The media manager to get the sessions from.
122 * @account: The account the sessions are on. 122 * @param account The account the sessions are on.
123 * 123 *
124 * Returns: A list of the media sessions on the given account. 124 * @return A list of the media sessions on the given account.
125 */ 125 */
126 GList *purple_media_manager_get_media_by_account( 126 GList *purple_media_manager_get_media_by_account(
127 PurpleMediaManager *manager, PurpleAccount *account); 127 PurpleMediaManager *manager, PurpleAccount *account);
128 128
129 /** 129 /**
130 * Removes a media session from the media manager. 130 * Removes a media session from the media manager.
131 * 131 *
132 * @manager: The media manager to remove the media session from. 132 * @param manager The media manager to remove the media session from.
133 * @media: The media session to remove. 133 * @param media The media session to remove.
134 */ 134 */
135 void 135 void
136 purple_media_manager_remove_media(PurpleMediaManager *manager, 136 purple_media_manager_remove_media(PurpleMediaManager *manager,
137 PurpleMedia *media); 137 PurpleMedia *media);
138 138
139 /** 139 /**
140 * Signals that output windows should be created for the chosen stream. 140 * Signals that output windows should be created for the chosen stream.
141 * 141 *
142 * This shouldn't be called outside of mediamanager.c and media.c 142 * This shouldn't be called outside of mediamanager.c and media.c
143 * 143 *
144 * @manager: Manager the output windows are registered with. 144 * @param manager Manager the output windows are registered with.
145 * @media: Media session the output windows are registered for. 145 * @param media Media session the output windows are registered for.
146 * @session_id: The session the output windows are registered with. 146 * @param session_id The session the output windows are registered with.
147 * @participant: The participant the output windows are registered with. 147 * @param participant The participant the output windows are registered with.
148 * 148 *
149 * Returns: TRUE if it succeeded, FALSE if it failed. 149 * @return TRUE if it succeeded, FALSE if it failed.
150 */ 150 */
151 gboolean purple_media_manager_create_output_window( 151 gboolean purple_media_manager_create_output_window(
152 PurpleMediaManager *manager, PurpleMedia *media, 152 PurpleMediaManager *manager, PurpleMedia *media,
153 const gchar *session_id, const gchar *participant); 153 const gchar *session_id, const gchar *participant);
154 154
155 /** 155 /**
156 * Registers a video output window to be created for a given stream. 156 * Registers a video output window to be created for a given stream.
157 * 157 *
158 * @manager: The manager to register the output window with. 158 * @param manager The manager to register the output window with.
159 * @media: The media instance to find the stream in. 159 * @param media The media instance to find the stream in.
160 * @session_id: The session the stream is associated with. 160 * @param session_id The session the stream is associated with.
161 * @participant: The participant the stream is associated with. 161 * @param participant The participant the stream is associated with.
162 * @window_id: The window ID to embed the video in. 162 * @param window_id The window ID to embed the video in.
163 * 163 *
164 * Returns: A unique ID to the registered output window, 0 if it failed. 164 * @return A unique ID to the registered output window, 0 if it failed.
165 */ 165 */
166 gulong purple_media_manager_set_output_window(PurpleMediaManager *manager, 166 gulong purple_media_manager_set_output_window(PurpleMediaManager *manager,
167 PurpleMedia *media, const gchar *session_id, 167 PurpleMedia *media, const gchar *session_id,
168 const gchar *participant, gulong window_id); 168 const gchar *participant, gulong window_id);
169 169
170 /** 170 /**
171 * Remove a previously registerd output window. 171 * Remove a previously registerd output window.
172 * 172 *
173 * @manager: The manager the output window was registered with. 173 * @param manager The manager the output window was registered with.
174 * @output_window_id: The ID of the output window. 174 * @param output_window_id The ID of the output window.
175 * 175 *
176 * Returns: TRUE if it found the output window and was successful, else FALSE. 176 * @return TRUE if it found the output window and was successful, else FALSE.
177 */ 177 */
178 gboolean purple_media_manager_remove_output_window( 178 gboolean purple_media_manager_remove_output_window(
179 PurpleMediaManager *manager, gulong output_window_id); 179 PurpleMediaManager *manager, gulong output_window_id);
180 180
181 /** 181 /**
182 * Remove all output windows for a given conference/session/participant/stream. 182 * Remove all output windows for a given conference/session/participant/stream.
183 * 183 *
184 * @manager: The manager the output windows were registered with. 184 * @param manager The manager the output windows were registered with.
185 * @media: The media instance the output windows were registered for. 185 * @param media The media instance the output windows were registered for.
186 * @session_id: The session the output windows were registered for. 186 * @param session_id The session the output windows were registered for.
187 * @participant: The participant the output windows were registered for. 187 * @param participant The participant the output windows were registered for.
188 */ 188 */
189 void purple_media_manager_remove_output_windows( 189 void purple_media_manager_remove_output_windows(
190 PurpleMediaManager *manager, PurpleMedia *media, 190 PurpleMediaManager *manager, PurpleMedia *media,
191 const gchar *session_id, const gchar *participant); 191 const gchar *session_id, const gchar *participant);
192 192
193 /** 193 /**
194 * Sets which media caps the UI supports. 194 * Sets which media caps the UI supports.
195 * 195 *
196 * @manager: The manager to set the caps on. 196 * @param manager The manager to set the caps on.
197 * @caps: The caps to set. 197 * @param caps The caps to set.
198 */ 198 */
199 void purple_media_manager_set_ui_caps(PurpleMediaManager *manager, 199 void purple_media_manager_set_ui_caps(PurpleMediaManager *manager,
200 PurpleMediaCaps caps); 200 PurpleMediaCaps caps);
201 201
202 /** 202 /**
203 * Gets which media caps the UI supports. 203 * Gets which media caps the UI supports.
204 * 204 *
205 * @manager: The manager to get caps from. 205 * @param manager The manager to get caps from.
206 * 206 *
207 * Returns: caps The caps retrieved. 207 * @return caps The caps retrieved.
208 */ 208 */
209 PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager); 209 PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager);
210 210
211 /** 211 /**
212 * Sets which media backend type media objects will use. 212 * Sets which media backend type media objects will use.
213 * 213 *
214 * @manager: The manager to set the caps on. 214 * @param manager The manager to set the caps on.
215 * @backend_type: The media backend type to use. 215 * @param backend_type The media backend type to use.
216 */ 216 */
217 void purple_media_manager_set_backend_type(PurpleMediaManager *manager, 217 void purple_media_manager_set_backend_type(PurpleMediaManager *manager,
218 GType backend_type); 218 GType backend_type);
219 219
220 /** 220 /**
221 * Gets which media backend type media objects will use. 221 * Gets which media backend type media objects will use.
222 * 222 *
223 * @manager: The manager to get the media backend type from. 223 * @param manager The manager to get the media backend type from.
224 * 224 *
225 * Returns: The type of media backend type media objects will use. 225 * @return The type of media backend type media objects will use.
226 */ 226 */
227 GType purple_media_manager_get_backend_type(PurpleMediaManager *manager); 227 GType purple_media_manager_get_backend_type(PurpleMediaManager *manager);
228 228
229 /*}@*/ 229 /*}@*/
230 230

mercurial