annotate libpurple/media/enum-types.c @ 32768:50cd80d3554e

Add a purple_connection_update_last_received() function to update the PurpleConnection->last_received value.
author andrew.victor@mxit.com
date Tue, 18 Oct 2011 20:25:41 +0000
parents ab1e29779722
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29535
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
1 /**
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
2 * @file enum-types.c Enum types for Media API
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
3 * @ingroup core
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
4 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
5
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
6 /* purple
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
7 *
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
10 * source distribution.
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
11 *
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
15 * (at your option) any later version.
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
16 *
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
20 * GNU General Public License for more details.
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
21 *
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
25 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
26
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
27 #include "enum-types.h"
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
28
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
29 /*
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
30 * PurpleMediaCandidateType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
31 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
32
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
33 GType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
34 purple_media_candidate_type_get_type()
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
35 {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
36 static GType type = 0;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
37 if (type == 0) {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
38 static const GEnumValue values[] = {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
39 { PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
40 "PURPLE_MEDIA_CANDIDATE_TYPE_HOST",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
41 "host" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
42 { PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
43 "PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
44 "srflx" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
45 { PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
46 "PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
47 "prflx" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
48 { PURPLE_MEDIA_CANDIDATE_TYPE_RELAY,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
49 "PURPLE_MEDIA_CANDIDATE_TYPE_RELAY",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
50 "relay" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
51 { PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
52 "PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
53 "multicast" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
54 { 0, NULL, NULL }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
55 };
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
56 type = g_enum_register_static("PurpleMediaCandidateType",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
57 values);
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
58 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
59 return type;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
60 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
61
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
62 /*
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
63 * PurpleMediaCaps
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
64 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
65
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
66 GType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
67 purple_media_caps_get_type()
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
68 {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
69 static GType type = 0;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
70 if (type == 0) {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
71 static const GEnumValue values[] = {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
72 { PURPLE_MEDIA_CAPS_NONE,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
73 "PURPLE_MEDIA_CAPS_NONE", "none" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
74 { PURPLE_MEDIA_CAPS_AUDIO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
75 "PURPLE_MEDIA_CAPS_AUDIO", "audio" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
76 { PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
77 "PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
78 "audio-single-direction" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
79 { PURPLE_MEDIA_CAPS_VIDEO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
80 "PURPLE_MEDIA_CAPS_VIDEO", "video" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
81 { PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
82 "PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
83 "video-single-direction" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
84 { PURPLE_MEDIA_CAPS_AUDIO_VIDEO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
85 "PURPLE_MEDIA_CAPS_AUDIO_VIDEO",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
86 "audio-video" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
87 { PURPLE_MEDIA_CAPS_MODIFY_SESSION,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
88 "PURPLE_MEDIA_CAPS_MODIFY_SESSION",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
89 "modify-session" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
90 { PURPLE_MEDIA_CAPS_CHANGE_DIRECTION,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
91 "PURPLE_MEDIA_CAPS_CHANGE_DIRECTION",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
92 "change-direction" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
93 { 0, NULL, NULL }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
94 };
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
95 type = g_enum_register_static("PurpleMediaCaps", values);
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
96 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
97 return type;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
98 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
99
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
100 /*
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
101 * PurpleMediaInfoType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
102 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
103
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
104 GType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
105 purple_media_info_type_get_type()
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
106 {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
107 static GType type = 0;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
108 if (type == 0) {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
109 static const GEnumValue values[] = {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
110 { PURPLE_MEDIA_INFO_HANGUP,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
111 "PURPLE_MEDIA_INFO_HANGUP", "hangup" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
112 { PURPLE_MEDIA_INFO_ACCEPT,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
113 "PURPLE_MEDIA_INFO_ACCEPT", "accept" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
114 { PURPLE_MEDIA_INFO_REJECT,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
115 "PURPLE_MEDIA_INFO_REJECT", "reject" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
116 { PURPLE_MEDIA_INFO_MUTE,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
117 "PURPLE_MEDIA_INFO_MUTE", "mute" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
118 { PURPLE_MEDIA_INFO_UNMUTE,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
119 "PURPLE_MEDIA_INFO_UNMUTE", "unmute" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
120 { PURPLE_MEDIA_INFO_PAUSE,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
121 "PURPLE_MEDIA_INFO_PAUSE", "pause" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
122 { PURPLE_MEDIA_INFO_UNPAUSE,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
123 "PURPLE_MEDIA_INFO_UNPAUSE", "unpause" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
124 { PURPLE_MEDIA_INFO_HOLD,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
125 "PURPLE_MEDIA_INFO_HOLD", "hold" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
126 { PURPLE_MEDIA_INFO_UNHOLD,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
127 "PURPLE_MEDIA_INFO_HOLD", "unhold" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
128 { 0, NULL, NULL }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
129 };
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
130 type = g_enum_register_static("PurpleMediaInfoType", values);
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
131 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
132 return type;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
133 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
134
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
135 /*
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
136 * PurpleMediaNetworkProtocol
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
137 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
138
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
139 GType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
140 purple_media_network_protocol_get_type()
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
141 {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
142 static GType type = 0;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
143 if (type == 0) {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
144 static const GEnumValue values[] = {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
145 { PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
146 "PURPLE_MEDIA_NETWORK_PROTOCOL_UDP",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
147 "udp" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
148 { PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
149 "PURPLE_MEDIA_NETWORK_PROTOCOL_TCP",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
150 "tcp" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
151 { 0, NULL, NULL }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
152 };
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
153 type = g_enum_register_static("PurpleMediaNetworkProtocol",
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
154 values);
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
155 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
156 return type;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
157 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
158
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
159 /*
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
160 * PurpleMediaSessionType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
161 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
162
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
163 GType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
164 purple_media_session_type_get_type()
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
165 {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
166 static GType type = 0;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
167 if (type == 0) {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
168 static const GFlagsValue values[] = {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
169 { PURPLE_MEDIA_NONE,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
170 "PURPLE_MEDIA_NONE", "none" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
171 { PURPLE_MEDIA_RECV_AUDIO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
172 "PURPLE_MEDIA_RECV_AUDIO", "recv-audio" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
173 { PURPLE_MEDIA_SEND_AUDIO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
174 "PURPLE_MEDIA_SEND_AUDIO", "send-audio" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
175 { PURPLE_MEDIA_RECV_VIDEO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
176 "PURPLE_MEDIA_RECV_VIDEO", "recv-video" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
177 { PURPLE_MEDIA_SEND_VIDEO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
178 "PURPLE_MEDIA_SEND_VIDEO", "send-audio" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
179 { PURPLE_MEDIA_AUDIO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
180 "PURPLE_MEDIA_AUDIO", "audio" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
181 { PURPLE_MEDIA_VIDEO,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
182 "PURPLE_MEDIA_VIDEO", "video" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
183 { 0, NULL, NULL }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
184 };
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
185 type = g_flags_register_static(
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
186 "PurpleMediaSessionType", values);
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
187 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
188 return type;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
189 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
190
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
191 /*
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
192 * PurpleMediaState
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
193 */
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
194
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
195 GType
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
196 purple_media_state_changed_get_type()
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
197 {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
198 static GType type = 0;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
199 if (type == 0) {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
200 static const GEnumValue values[] = {
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
201 { PURPLE_MEDIA_STATE_NEW,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
202 "PURPLE_MEDIA_STATE_NEW", "new" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
203 { PURPLE_MEDIA_STATE_CONNECTED,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
204 "PURPLE_MEDIA_STATE_CONNECTED", "connected" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
205 { PURPLE_MEDIA_STATE_END,
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
206 "PURPLE_MEDIA_STATE_END", "end" },
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
207 { 0, NULL, NULL }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
208 };
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
209 type = g_enum_register_static("PurpleMediaState", values);
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
210 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
211 return type;
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
212 }
ab1e29779722 Split the media API's enum types out into its own file.
maiku@pidgin.im
parents:
diff changeset
213