|
1 /* |
|
2 * libgabble_wsd_solution.h - Header |
|
3 * Copyright (C) 2006 Collabora Ltd. |
|
4 * @author Ole Andre Vadla Ravnaas <ole.andre.ravnaas@collabora.co.uk> |
|
5 * |
|
6 * |
|
7 * This library is free software; you can redistribute it and/or |
|
8 * modify it under the terms of the GNU Lesser General Public |
|
9 * License as published by the Free Software Foundation; either |
|
10 * version 2.1 of the License, or (at your option) any later version. |
|
11 * |
|
12 * This library is distributed in the hope that it will be useful, |
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 * Lesser General Public License for more details. |
|
16 * |
|
17 * You should have received a copy of the GNU Lesser General Public |
|
18 * License along with this library; if not, write to the Free Software |
|
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
20 */ |
|
21 |
|
22 #ifndef _LIBGABBLE_WSD_H |
|
23 #define _LIBGABBLE_WSD_H |
|
24 #include "libgabble_wsd_macros.h" |
|
25 //#include "debug.h" |
|
26 #include "telepathy-errors.h" |
|
27 #include "disco.h" |
|
28 #include "gabble_enums.h" |
|
29 #include "ghash.h" |
|
30 #include "gabble-presence.h" |
|
31 #include "gabble-media-session.h" |
|
32 |
|
33 #define MAX_GABBLE_UTILS_GCHAR_ARRAY_LEN 5 |
|
34 |
|
35 |
|
36 #if EMULATOR |
|
37 #ifdef __cplusplus |
|
38 extern "C" |
|
39 { |
|
40 #endif |
|
41 |
|
42 typedef gboolean (*StreamHandlerFunc)(GabbleMediaSession *session, |
|
43 LmMessage *message, |
|
44 LmMessageNode *content_node, |
|
45 const gchar *stream_name, |
|
46 GabbleMediaStream *stream, |
|
47 LmMessageNode *desc_node, |
|
48 LmMessageNode *trans_node, |
|
49 GError **error); |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 typedef struct _Handler Handler; |
|
55 |
|
56 struct _Handler { |
|
57 gchar actions[3][50]; |
|
58 JingleSessionState min_allowed_state; |
|
59 JingleSessionState max_allowed_state; |
|
60 StreamHandlerFunc stream_handlers[4]; |
|
61 JingleSessionState new_state; |
|
62 }; |
|
63 |
|
64 struct libgabble_global_struct |
|
65 { |
|
66 |
|
67 VARIABLE_DECL(flags,s,gabble_debug,GabbleDebugFlags) |
|
68 VARIABLE_DECL(log_handler,s,gabble_debug,guint) |
|
69 VARIABLE_DECL(etype,s,gabble_enum_types,GType) |
|
70 |
|
71 VARIABLE_DECL(etype,s,gabble_media_session_enum_types,GType) |
|
72 VARIABLE_DECL(etype1,s,gabble_media_session_enum_types,GType) |
|
73 VARIABLE_DECL(etype2,s,gabble_media_session_enum_types,GType) |
|
74 |
|
75 VARIABLE_DECL(quark,s,gabble_disco,GQuark) |
|
76 VARIABLE_DECL(quark,s,gabble_error,GQuark) |
|
77 |
|
78 |
|
79 VARIABLE_DECL(ssl,s,gabble_conmgr,gboolean) |
|
80 VARIABLE_DECL(httpport,s,gabble_conmgr,guint) |
|
81 VARIABLE_DECL(httpproxyport,s,gabble_conmgr,guint) |
|
82 VARIABLE_DECL_ARRAY(signals,s,gabble_conmgr,guint,LAST_SIGNAL_CON_MGR) |
|
83 VARIABLE_DECL_ARRAY(signals,s,gabble_con,guint,LAST_SIGNAL_CON) |
|
84 VARIABLE_DECL(arguments,s,gabble_con,GHashTable*) |
|
85 VARIABLE_DECL_ARRAY(signals,s,gabble_im,guint,LAST_SIGNAL_IM) |
|
86 |
|
87 //todo: later ..see what it should be in search |
|
88 VARIABLE_DECL_ARRAY(signals,s,gabble_search,guint,LAST_SIGNAL_SEARCH) |
|
89 |
|
90 VARIABLE_DECL_ARRAY(signals,s,gabble_muc,guint,LAST_SIGNAL_MUC) |
|
91 VARIABLE_DECL_ARRAY(signals,s,gabble_med_chnl,guint,LAST_SIGNAL_MED_CHANNEL) |
|
92 |
|
93 VARIABLE_DECL_ARRAY(signals,s,gabble_med_sess,guint,LAST_SIGNAL_MED_SESSION) |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 VARIABLE_DECL(google_audio_caps,s,gabble_med_sess,GabblePresenceCapabilities) |
|
99 VARIABLE_DECL(jingle_audio_caps,s,gabble_med_sess,GabblePresenceCapabilities) |
|
100 VARIABLE_DECL(jingle_video_caps,s,gabble_med_sess,GabblePresenceCapabilities) |
|
101 |
|
102 VARIABLE_DECL_ARRAY(ret_sess,s,gabble_med_sess,gchar,MAX_STREAM_NAME_LEN) |
|
103 |
|
104 VARIABLE_DECL_ARRAY(signals,s,gabble_med_stream,guint,LAST_SIGNAL_MED_STREAM) |
|
105 |
|
106 VARIABLE_DECL_ARRAY(signals,s,gabble_pre_cache,guint,LAST_SIGNAL_PRE_CACHE) |
|
107 |
|
108 VARIABLE_DECL_ARRAY(signals,s,gabble_register,guint,LAST_SIGNAL_REGISTER) |
|
109 |
|
110 VARIABLE_DECL_ARRAY(signals,s,gabble_ros_chnl,guint,LAST_SIGNAL_ROS_CHNL) |
|
111 |
|
112 VARIABLE_DECL_ARRAY(signals,s,gabble_room_chnl,guint,LAST_SIGNAL_ROOM_CHNL) |
|
113 |
|
114 VARIABLE_DECL(offset_quark1,s,gabble_mixin,GQuark) |
|
115 VARIABLE_DECL(offset_quark,s,gabble_mixin,GQuark) |
|
116 |
|
117 VARIABLE_DECL_ARRAY(signals,s,gabble_roster,guint,LAST_SIGNAL_ROSTER) |
|
118 |
|
119 VARIABLE_DECL(quark,s,gabble_errors,GQuark) |
|
120 |
|
121 VARIABLE_DECL(busCon,s,gabble_helpers,DBusGConnection*) |
|
122 VARIABLE_DECL(bus_proxy,s,gabble_helpers,DBusGProxy*) |
|
123 |
|
124 VARIABLE_DECL(offset_quark1,s,gabble_txt_mixin,GQuark) |
|
125 VARIABLE_DECL(offset_quark,s,gabble_txt_mixin,GQuark) |
|
126 VARIABLE_DECL(alloc1,s,gabble_txt_mixin,GabbleAllocator) |
|
127 |
|
128 VARIABLE_DECL(offset_quark1,s,gabble_search_mixin,GQuark) |
|
129 VARIABLE_DECL(offset_quark,s,gabble_search_mixin,GQuark) |
|
130 //todo: check if this required for search |
|
131 VARIABLE_DECL(alloc1,s,gabble_search_mixin,GabbleAllocator) |
|
132 |
|
133 VARIABLE_DECL(type,s,gabble_chnl_iface,GType) |
|
134 VARIABLE_DECL(initialized,s,gabble_chnl_iface,gboolean) |
|
135 |
|
136 VARIABLE_DECL(type,s,gabble_fac_iface,GType) |
|
137 VARIABLE_DECL(initialized,s,gabble_fac_iface,gboolean) |
|
138 |
|
139 VARIABLE_DECL_ARRAY(signals,s,gabble_vcard_mgr,guint,LAST_SIGNAL_VCARD_MGR) |
|
140 VARIABLE_DECL(quark1,s,gabble_vcard_mgr,GQuark) |
|
141 VARIABLE_DECL(quark2,s,gabble_vcard_mgr,GQuark) |
|
142 |
|
143 |
|
144 VARIABLE_DECL(offset_quark1,s,gabble_grp_mixin,GQuark) |
|
145 VARIABLE_DECL(offset_quark,s,gabble_grp_mixin,GQuark) |
|
146 |
|
147 |
|
148 VARIABLE_DECL(gabble_disco_parent_class,s,gabble_disco,gpointer) |
|
149 VARIABLE_DECL(g_define_type_id,s,gabble_disco,GType) |
|
150 |
|
151 VARIABLE_DECL(gabble_connection_manager_parent_class,s,gabble_conmgr,gpointer) |
|
152 VARIABLE_DECL(g_define_type_id,s,gabble_conmgr,GType) |
|
153 |
|
154 VARIABLE_DECL(gabble_connection_parent_class,s,gabble_con,gpointer) |
|
155 VARIABLE_DECL(g_define_type_id,s,gabble_con,GType) |
|
156 |
|
157 VARIABLE_DECL(gabble_im_channel_parent_class,s,gabble_im,gpointer) |
|
158 VARIABLE_DECL(g_define_type_id,s,gabble_im,GType) |
|
159 |
|
160 VARIABLE_DECL(gabble_search_channel_parent_class,s,gabble_search,gpointer) |
|
161 VARIABLE_DECL(g_define_type_id,s,gabble_search,GType) |
|
162 |
|
163 VARIABLE_DECL(gabble_muc_channel_parent_class,s,gabble_muc,gpointer) |
|
164 VARIABLE_DECL(g_define_type_id,s,gabble_muc,GType) |
|
165 |
|
166 VARIABLE_DECL(gabble_media_channel_parent_class,s,gabble_med_chnl,gpointer) |
|
167 VARIABLE_DECL(g_define_type_id,s,gabble_med_chnl,GType) |
|
168 |
|
169 VARIABLE_DECL(gabble_media_stream_parent_class,s,gabble_med_stream,gpointer) |
|
170 VARIABLE_DECL(g_define_type_id,s,gabble_med_stream,GType) |
|
171 |
|
172 VARIABLE_DECL(gabble_presence_parent_class,s,gabble_presence,gpointer) |
|
173 VARIABLE_DECL(g_define_type_id,s,gabble_presence,GType) |
|
174 |
|
175 VARIABLE_DECL(gabble_presence_cache_parent_class,s,gabble_pre_cache,gpointer) |
|
176 VARIABLE_DECL(g_define_type_id,s,gabble_pre_cache,GType) |
|
177 |
|
178 VARIABLE_DECL(gabble_register_parent_class,s,gabble_register,gpointer) |
|
179 VARIABLE_DECL(g_define_type_id,s,gabble_register,GType) |
|
180 |
|
181 VARIABLE_DECL(gabble_roster_channel_parent_class,s,gabble_ros_chnl,gpointer) |
|
182 VARIABLE_DECL(g_define_type_id,s,gabble_ros_chnl,GType) |
|
183 |
|
184 VARIABLE_DECL(gabble_roomlist_channel_parent_class,s,gabble_room_chnl,gpointer) |
|
185 VARIABLE_DECL(g_define_type_id,s,gabble_room_chnl,GType) |
|
186 |
|
187 VARIABLE_DECL(gabble_im_factory_parent_class ,s,im_factory,gpointer) |
|
188 VARIABLE_DECL(g_define_type_id,s,im_factory,GType) |
|
189 |
|
190 VARIABLE_DECL(gabble_search_factory_parent_class ,s,search_factory,gpointer) |
|
191 VARIABLE_DECL(g_define_type_id,s,search_factory,GType) |
|
192 |
|
193 VARIABLE_DECL(gabble_media_factory_parent_class ,s,media_factory,gpointer) |
|
194 VARIABLE_DECL(g_define_type_id,s,media_factory,GType) |
|
195 |
|
196 VARIABLE_DECL(gabble_muc_factory_parent_class ,s,muc_factory,gpointer) |
|
197 VARIABLE_DECL(g_define_type_id,s,muc_factory,GType) |
|
198 |
|
199 VARIABLE_DECL(gabble_vcard_manager_parent_class ,s,gabble_vcard_mgr,gpointer) |
|
200 VARIABLE_DECL(g_define_type_id,s,gabble_vcard_mgr,GType) |
|
201 |
|
202 VARIABLE_DECL_ARRAY(keys,s,gabble_debug,GDebugKey,12) |
|
203 |
|
204 VARIABLE_DECL_ARRAY(NO_ALIAS,s,gabble_vcard_mgr,gchar,MAX_GABBLE_UTILS_GCHAR_ARRAY_LEN) |
|
205 |
|
206 |
|
207 VARIABLE_DECL_2DARRAY(assumed_caps,s,gabble_con,gchar,3,150) |
|
208 |
|
209 VARIABLE_DECL_2DARRAY(muc_roles,s,gabble_muc,gchar,4,20) |
|
210 VARIABLE_DECL_2DARRAY(muc_affiliations,s,gabble_muc,gchar,4,20) |
|
211 |
|
212 VARIABLE_DECL_2DARRAY(video_codec_params,s,gabble_med_stream,gchar,6,20) |
|
213 |
|
214 VARIABLE_DECL_2DARRAY(list_handle_strings,s,handles,char,4,20) |
|
215 |
|
216 VARIABLE_DECL_ARRAY(handlers,s,gabble_med_sess,Handler,10) |
|
217 |
|
218 VARIABLE_DECL(gabble_media_session_parent_class ,s,gabble_med_sess,gpointer) |
|
219 VARIABLE_DECL(g_define_type_id,s,gabble_med_sess,GType) |
|
220 |
|
221 VARIABLE_DECL(gabble_roster_parent_class ,s,gabble_roster,gpointer) |
|
222 VARIABLE_DECL(g_define_type_id,s,gabble_roster,GType) |
|
223 |
|
224 |
|
225 /*END-global vars*/ |
|
226 |
|
227 }; |
|
228 |
|
229 struct libgabble_global_struct * libgabble_ImpurePtr(); |
|
230 int libgabble_Init(struct libgabble_global_struct *); |
|
231 #ifdef __cplusplus |
|
232 } |
|
233 #endif |
|
234 #endif //EMULATOR |
|
235 #endif //header guard ifdef _LIBGABBLE_WSD_H |
|
236 |