Mercurial > pidgin
comparison libpurple/media/media.c @ 29141:ab1e29779722
Split the media API's enum types out into its own file.
author | maiku@pidgin.im |
---|---|
date | Wed, 21 Oct 2009 20:58:32 +0000 |
parents | fb2c0674e828 |
children | f585e10f156b |
comparison
equal
deleted
inserted
replaced
29140:fb2c0674e828 | 29141:ab1e29779722 |
---|---|
178 PROP_PRPL_DATA, | 178 PROP_PRPL_DATA, |
179 }; | 179 }; |
180 #endif | 180 #endif |
181 | 181 |
182 | 182 |
183 /* | |
184 * PurpleMediaElementType | |
185 */ | |
186 | |
187 GType | |
188 purple_media_session_type_get_type() | |
189 { | |
190 static GType type = 0; | |
191 if (type == 0) { | |
192 static const GFlagsValue values[] = { | |
193 { PURPLE_MEDIA_NONE, | |
194 "PURPLE_MEDIA_NONE", "none" }, | |
195 { PURPLE_MEDIA_RECV_AUDIO, | |
196 "PURPLE_MEDIA_RECV_AUDIO", "recv-audio" }, | |
197 { PURPLE_MEDIA_SEND_AUDIO, | |
198 "PURPLE_MEDIA_SEND_AUDIO", "send-audio" }, | |
199 { PURPLE_MEDIA_RECV_VIDEO, | |
200 "PURPLE_MEDIA_RECV_VIDEO", "recv-video" }, | |
201 { PURPLE_MEDIA_SEND_VIDEO, | |
202 "PURPLE_MEDIA_SEND_VIDEO", "send-audio" }, | |
203 { PURPLE_MEDIA_AUDIO, | |
204 "PURPLE_MEDIA_AUDIO", "audio" }, | |
205 { PURPLE_MEDIA_VIDEO, | |
206 "PURPLE_MEDIA_VIDEO", "video" }, | |
207 { 0, NULL, NULL } | |
208 }; | |
209 type = g_flags_register_static( | |
210 "PurpleMediaSessionType", values); | |
211 } | |
212 return type; | |
213 } | |
214 | |
215 GType | 183 GType |
216 purple_media_get_type() | 184 purple_media_get_type() |
217 { | 185 { |
218 #ifdef USE_VV | 186 #ifdef USE_VV |
219 static GType type = 0; | 187 static GType type = 0; |
235 } | 203 } |
236 return type; | 204 return type; |
237 #else | 205 #else |
238 return G_TYPE_NONE; | 206 return G_TYPE_NONE; |
239 #endif | 207 #endif |
240 } | |
241 | |
242 GType | |
243 purple_media_state_changed_get_type() | |
244 { | |
245 static GType type = 0; | |
246 if (type == 0) { | |
247 static const GEnumValue values[] = { | |
248 { PURPLE_MEDIA_STATE_NEW, | |
249 "PURPLE_MEDIA_STATE_NEW", "new" }, | |
250 { PURPLE_MEDIA_STATE_CONNECTED, | |
251 "PURPLE_MEDIA_STATE_CONNECTED", "connected" }, | |
252 { PURPLE_MEDIA_STATE_END, | |
253 "PURPLE_MEDIA_STATE_END", "end" }, | |
254 { 0, NULL, NULL } | |
255 }; | |
256 type = g_enum_register_static("PurpleMediaState", values); | |
257 } | |
258 return type; | |
259 } | |
260 | |
261 GType | |
262 purple_media_info_type_get_type() | |
263 { | |
264 static GType type = 0; | |
265 if (type == 0) { | |
266 static const GEnumValue values[] = { | |
267 { PURPLE_MEDIA_INFO_HANGUP, | |
268 "PURPLE_MEDIA_INFO_HANGUP", "hangup" }, | |
269 { PURPLE_MEDIA_INFO_ACCEPT, | |
270 "PURPLE_MEDIA_INFO_ACCEPT", "accept" }, | |
271 { PURPLE_MEDIA_INFO_REJECT, | |
272 "PURPLE_MEDIA_INFO_REJECT", "reject" }, | |
273 { PURPLE_MEDIA_INFO_MUTE, | |
274 "PURPLE_MEDIA_INFO_MUTE", "mute" }, | |
275 { PURPLE_MEDIA_INFO_UNMUTE, | |
276 "PURPLE_MEDIA_INFO_UNMUTE", "unmute" }, | |
277 { PURPLE_MEDIA_INFO_PAUSE, | |
278 "PURPLE_MEDIA_INFO_PAUSE", "pause" }, | |
279 { PURPLE_MEDIA_INFO_UNPAUSE, | |
280 "PURPLE_MEDIA_INFO_UNPAUSE", "unpause" }, | |
281 { PURPLE_MEDIA_INFO_HOLD, | |
282 "PURPLE_MEDIA_INFO_HOLD", "hold" }, | |
283 { PURPLE_MEDIA_INFO_UNHOLD, | |
284 "PURPLE_MEDIA_INFO_HOLD", "unhold" }, | |
285 { 0, NULL, NULL } | |
286 }; | |
287 type = g_enum_register_static("PurpleMediaInfoType", values); | |
288 } | |
289 return type; | |
290 } | |
291 | |
292 GType | |
293 purple_media_caps_get_type() | |
294 { | |
295 static GType type = 0; | |
296 if (type == 0) { | |
297 static const GEnumValue values[] = { | |
298 { PURPLE_MEDIA_CAPS_NONE, | |
299 "PURPLE_MEDIA_CAPS_NONE", "none" }, | |
300 { PURPLE_MEDIA_CAPS_AUDIO, | |
301 "PURPLE_MEDIA_CAPS_AUDIO", "audio" }, | |
302 { PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION, | |
303 "PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION", | |
304 "audio-single-direction" }, | |
305 { PURPLE_MEDIA_CAPS_VIDEO, | |
306 "PURPLE_MEDIA_CAPS_VIDEO", "video" }, | |
307 { PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION, | |
308 "PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION", | |
309 "video-single-direction" }, | |
310 { PURPLE_MEDIA_CAPS_AUDIO_VIDEO, | |
311 "PURPLE_MEDIA_CAPS_AUDIO_VIDEO", | |
312 "audio-video" }, | |
313 { PURPLE_MEDIA_CAPS_MODIFY_SESSION, | |
314 "PURPLE_MEDIA_CAPS_MODIFY_SESSION", | |
315 "modify-session" }, | |
316 { PURPLE_MEDIA_CAPS_CHANGE_DIRECTION, | |
317 "PURPLE_MEDIA_CAPS_CHANGE_DIRECTION", | |
318 "change-direction" }, | |
319 { 0, NULL, NULL } | |
320 }; | |
321 type = g_enum_register_static("PurpleMediaCaps", values); | |
322 } | |
323 return type; | |
324 } | 208 } |
325 | 209 |
326 #ifdef USE_VV | 210 #ifdef USE_VV |
327 static void | 211 static void |
328 purple_media_class_init (PurpleMediaClass *klass) | 212 purple_media_class_init (PurpleMediaClass *klass) |
626 break; | 510 break; |
627 } | 511 } |
628 | 512 |
629 } | 513 } |
630 #endif | 514 #endif |
631 | |
632 /* | |
633 * PurpleMediaCandidateType | |
634 */ | |
635 | |
636 GType | |
637 purple_media_candidate_type_get_type() | |
638 { | |
639 static GType type = 0; | |
640 if (type == 0) { | |
641 static const GEnumValue values[] = { | |
642 { PURPLE_MEDIA_CANDIDATE_TYPE_HOST, | |
643 "PURPLE_MEDIA_CANDIDATE_TYPE_HOST", | |
644 "host" }, | |
645 { PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX, | |
646 "PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX", | |
647 "srflx" }, | |
648 { PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX, | |
649 "PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX", | |
650 "prflx" }, | |
651 { PURPLE_MEDIA_CANDIDATE_TYPE_RELAY, | |
652 "PPURPLE_MEDIA_CANDIDATE_TYPE_RELAY", | |
653 "relay" }, | |
654 { PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST, | |
655 "PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST", | |
656 "multicast" }, | |
657 { 0, NULL, NULL } | |
658 }; | |
659 type = g_enum_register_static("PurpleMediaCandidateType", | |
660 values); | |
661 } | |
662 return type; | |
663 } | |
664 | |
665 /* | |
666 * PurpleMediaNetworkProtocol | |
667 */ | |
668 | |
669 GType | |
670 purple_media_network_protocol_get_type() | |
671 { | |
672 static GType type = 0; | |
673 if (type == 0) { | |
674 static const GEnumValue values[] = { | |
675 { PURPLE_MEDIA_NETWORK_PROTOCOL_UDP, | |
676 "PURPLE_MEDIA_NETWORK_PROTOCOL_UDP", | |
677 "udp" }, | |
678 { PURPLE_MEDIA_NETWORK_PROTOCOL_TCP, | |
679 "PURPLE_MEDIA_NETWORK_PROTOCOL_TCP", | |
680 "tcp" }, | |
681 { 0, NULL, NULL } | |
682 }; | |
683 type = g_enum_register_static("PurpleMediaNetworkProtocol", | |
684 values); | |
685 } | |
686 return type; | |
687 } | |
688 | 515 |
689 /* | 516 /* |
690 * PurpleMediaCandidate | 517 * PurpleMediaCandidate |
691 */ | 518 */ |
692 | 519 |