comparison libpurple/media/enum-types.h @ 29742:422889fb57e0

propagate from branch 'im.pidgin.pidgin' (head 9028ac0daaa1f7e565726fa39aca22ce7d3ecc49) to branch 'im.pidgin.pidgin.next.minor' (head debffa49382d07f0934a2b22a035940cb8f7892f)
author Paul Aurich <paul@darkrain42.org>
date Thu, 04 Feb 2010 05:30:35 +0000
parents ab1e29779722
children 02a2e8183b1d
comparison
equal deleted inserted replaced
29354:86ee7772936f 29742:422889fb57e0
1 /**
2 * @file enum-types.h Enum types for Media API
3 * @ingroup core
4 */
5
6 /* purple
7 *
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26
27 #ifndef _PURPLE_MEDIA_ENUM_TYPES_H_
28 #define _PURPLE_MEDIA_ENUM_TYPES_H_
29
30 #include <glib-object.h>
31
32 G_BEGIN_DECLS
33
34 #define PURPLE_TYPE_MEDIA_CANDIDATE_TYPE (purple_media_candidate_type_get_type())
35 #define PURPLE_MEDIA_TYPE_CAPS (purple_media_caps_get_type())
36 #define PURPLE_MEDIA_TYPE_INFO_TYPE (purple_media_info_type_get_type())
37 #define PURPLE_TYPE_MEDIA_NETWORK_PROTOCOL (purple_media_network_protocol_get_type())
38 #define PURPLE_TYPE_MEDIA_SESSION_TYPE (purple_media_session_type_get_type())
39 #define PURPLE_MEDIA_TYPE_STATE (purple_media_state_changed_get_type())
40
41 /** Media candidate types */
42 typedef enum {
43 PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
44 PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
45 PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,
46 PURPLE_MEDIA_CANDIDATE_TYPE_RELAY,
47 PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST,
48 } PurpleMediaCandidateType;
49
50 /** Media caps */
51 typedef enum {
52 PURPLE_MEDIA_CAPS_NONE = 0,
53 PURPLE_MEDIA_CAPS_AUDIO = 1,
54 PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION = 1 << 1,
55 PURPLE_MEDIA_CAPS_VIDEO = 1 << 2,
56 PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION = 1 << 3,
57 PURPLE_MEDIA_CAPS_AUDIO_VIDEO = 1 << 4,
58 PURPLE_MEDIA_CAPS_MODIFY_SESSION = 1 << 5,
59 PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6,
60 } PurpleMediaCaps;
61
62 /** Media component types */
63 typedef enum {
64 PURPLE_MEDIA_COMPONENT_NONE = 0,
65 PURPLE_MEDIA_COMPONENT_RTP = 1,
66 PURPLE_MEDIA_COMPONENT_RTCP = 2,
67 } PurpleMediaComponentType;
68
69 /** Media info types */
70 typedef enum {
71 PURPLE_MEDIA_INFO_HANGUP = 0,
72 PURPLE_MEDIA_INFO_ACCEPT,
73 PURPLE_MEDIA_INFO_REJECT,
74 PURPLE_MEDIA_INFO_MUTE,
75 PURPLE_MEDIA_INFO_UNMUTE,
76 PURPLE_MEDIA_INFO_PAUSE,
77 PURPLE_MEDIA_INFO_UNPAUSE,
78 PURPLE_MEDIA_INFO_HOLD,
79 PURPLE_MEDIA_INFO_UNHOLD,
80 } PurpleMediaInfoType;
81
82 /** Media network protocols */
83 typedef enum {
84 PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
85 PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
86 } PurpleMediaNetworkProtocol;
87
88 /** Media session types */
89 typedef enum {
90 PURPLE_MEDIA_NONE = 0,
91 PURPLE_MEDIA_RECV_AUDIO = 1 << 0,
92 PURPLE_MEDIA_SEND_AUDIO = 1 << 1,
93 PURPLE_MEDIA_RECV_VIDEO = 1 << 2,
94 PURPLE_MEDIA_SEND_VIDEO = 1 << 3,
95 PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO,
96 PURPLE_MEDIA_VIDEO = PURPLE_MEDIA_RECV_VIDEO | PURPLE_MEDIA_SEND_VIDEO
97 } PurpleMediaSessionType;
98
99 /** Media state-changed types */
100 typedef enum {
101 PURPLE_MEDIA_STATE_NEW = 0,
102 PURPLE_MEDIA_STATE_CONNECTED,
103 PURPLE_MEDIA_STATE_END,
104 } PurpleMediaState;
105
106 /**
107 * Gets the media candidate type's GType
108 *
109 * @return The media candidate type's GType.
110 *
111 * @since 2.6.0
112 */
113 GType purple_media_candidate_type_get_type(void);
114
115 /**
116 * Gets the type of the media caps flags
117 *
118 * @return The media caps flags' GType
119 *
120 * @since 2.7.0
121 */
122 GType purple_media_caps_get_type(void);
123
124 /**
125 * Gets the type of the info type enum
126 *
127 * @return The info type enum's GType
128 *
129 * @since 2.6.0
130 */
131 GType purple_media_info_type_get_type(void);
132
133 /**
134 * Gets the media network protocol's GType
135 *
136 * @return The media network protocol's GType.
137 *
138 * @since 2.6.0
139 */
140 GType purple_media_network_protocol_get_type(void);
141
142 /**
143 * Gets the media session type's GType
144 *
145 * @return The media session type's GType.
146 *
147 * @since 2.6.0
148 */
149 GType purple_media_session_type_get_type(void);
150
151 /**
152 * Gets the type of the state-changed enum
153 *
154 * @return The state-changed enum's GType
155 *
156 * @since 2.6.0
157 */
158 GType purple_media_state_changed_get_type(void);
159
160 G_END_DECLS
161
162 #endif /* _PURPLE_MEDIA_ENUM_TYPES_ */