source: trunk/src/dbus/qdbus_symbols_p.h@ 754

Last change on this file since 754 was 651, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.2 sources.

File size: 21.7 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtDBus module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42//
43// W A R N I N G
44// -------------
45//
46// This file is not part of the public API. This header file may
47// change from version to version without notice, or even be
48// removed.
49//
50// We mean it.
51//
52//
53
54#ifndef QDBUS_SYMBOLS_P_H
55#define QDBUS_SYMBOLS_P_H
56
57#include <QtCore/qglobal.h>
58#include <dbus/dbus.h>
59
60QT_BEGIN_NAMESPACE
61
62#if !defined QT_LINKED_LIBDBUS
63
64void *qdbus_resolve_conditionally(const char *name); // doesn't print a warning
65void *qdbus_resolve_me(const char *name); // prints a warning
66bool qdbus_loadLibDBus();
67
68# define DEFINEFUNC(ret, func, args, argcall, funcret) \
69 typedef ret (* _q_PTR_##func) args; \
70 static inline ret q_##func args \
71 { \
72 static _q_PTR_##func ptr; \
73 if (!ptr) \
74 ptr = (_q_PTR_##func) qdbus_resolve_me(#func); \
75 funcret ptr argcall; \
76 }
77
78#else // defined QT_LINKED_LIBDBUS
79
80inline bool qdbus_loadLibDBus() { return true; }
81
82# define DEFINEFUNC(ret, func, args, argcall, funcret) \
83 static inline ret q_##func args { funcret func argcall; }
84
85#endif // defined QT_LINKED_LIBDBUS
86
87/* dbus-bus.h */
88DEFINEFUNC(void, dbus_bus_add_match, (DBusConnection *connection,
89 const char *rule,
90 DBusError *error),
91 (connection, rule, error), )
92DEFINEFUNC(void, dbus_bus_remove_match, (DBusConnection *connection,
93 const char *rule,
94 DBusError *error),
95 (connection, rule, error), )
96DEFINEFUNC(dbus_bool_t, dbus_bus_register,(DBusConnection *connection,
97 DBusError *error),
98 (connection, error), return)
99DEFINEFUNC(DBusConnection *, dbus_bus_get_private, (DBusBusType type,
100 DBusError *error),
101 (type, error), return)
102DEFINEFUNC(const char*, dbus_bus_get_unique_name, (DBusConnection *connection),
103 (connection), return)
104
105/* dbus-connection.h */
106DEFINEFUNC(dbus_bool_t , dbus_connection_add_filter, (DBusConnection *connection,
107 DBusHandleMessageFunction function,
108 void *user_data,
109 DBusFreeFunction free_data_function),
110 (connection, function, user_data, free_data_function), return)
111DEFINEFUNC(void , dbus_connection_close, (DBusConnection *connection),
112 (connection), return)
113DEFINEFUNC(DBusDispatchStatus , dbus_connection_dispatch, (DBusConnection *connection),
114 (connection), return)
115DEFINEFUNC(DBusDispatchStatus , dbus_connection_get_dispatch_status, (DBusConnection *connection),
116 (connection), return)
117DEFINEFUNC(dbus_bool_t , dbus_connection_get_is_connected, (DBusConnection *connection),
118 (connection), return)
119DEFINEFUNC(DBusConnection* , dbus_connection_open_private, (const char *address,
120 DBusError *error),
121 (address, error), return)
122DEFINEFUNC(DBusConnection* , dbus_connection_ref, (DBusConnection *connection),
123 (connection), return)
124DEFINEFUNC(dbus_bool_t , dbus_connection_send, (DBusConnection *connection,
125 DBusMessage *message,
126 dbus_uint32_t *client_serial),
127 (connection, message, client_serial), return)
128DEFINEFUNC(dbus_bool_t , dbus_connection_send_with_reply, (DBusConnection *connection,
129 DBusMessage *message,
130 DBusPendingCall **pending_return,
131 int timeout_milliseconds),
132 (connection, message, pending_return, timeout_milliseconds), return)
133DEFINEFUNC(DBusMessage * , dbus_connection_send_with_reply_and_block, (DBusConnection *connection,
134 DBusMessage *message,
135 int timeout_milliseconds,
136 DBusError *error),
137 (connection, message, timeout_milliseconds, error), return)
138DEFINEFUNC(void , dbus_connection_set_exit_on_disconnect, (DBusConnection *connection,
139 dbus_bool_t exit_on_disconnect),
140 (connection, exit_on_disconnect), )
141DEFINEFUNC(dbus_bool_t , dbus_connection_set_timeout_functions, (DBusConnection *connection,
142 DBusAddTimeoutFunction add_function,
143 DBusRemoveTimeoutFunction remove_function,
144 DBusTimeoutToggledFunction toggled_function,
145 void *data,
146 DBusFreeFunction free_data_function),
147 (connection, add_function, remove_function, toggled_function, data, free_data_function), return)
148DEFINEFUNC(dbus_bool_t , dbus_connection_set_watch_functions, (DBusConnection *connection,
149 DBusAddWatchFunction add_function,
150 DBusRemoveWatchFunction remove_function,
151 DBusWatchToggledFunction toggled_function,
152 void *data,
153 DBusFreeFunction free_data_function),
154 (connection, add_function, remove_function, toggled_function, data, free_data_function), return)
155DEFINEFUNC(void , dbus_connection_set_wakeup_main_function, (DBusConnection *connection,
156 DBusWakeupMainFunction wakeup_main_function,
157 void *data,
158 DBusFreeFunction free_data_function),
159 (connection, wakeup_main_function, data, free_data_function), )
160DEFINEFUNC(void , dbus_connection_set_dispatch_status_function, (DBusConnection *connection,
161 DBusDispatchStatusFunction function,
162 void *data,
163 DBusFreeFunction free_data_function),
164 (connection, function, data, free_data_function), )
165
166DEFINEFUNC(void , dbus_connection_unref, (DBusConnection *connection),
167 (connection), )
168DEFINEFUNC(dbus_bool_t , dbus_timeout_get_enabled, (DBusTimeout *timeout),
169 (timeout), return)
170DEFINEFUNC(int , dbus_timeout_get_interval, (DBusTimeout *timeout),
171 (timeout), return)
172DEFINEFUNC(dbus_bool_t , dbus_timeout_handle, (DBusTimeout *timeout),
173 (timeout), return)
174
175DEFINEFUNC(dbus_bool_t , dbus_watch_get_enabled, (DBusWatch *watch),
176 (watch), return)
177DEFINEFUNC(int , dbus_watch_get_fd, (DBusWatch *watch),
178 (watch), return)
179DEFINEFUNC(unsigned int , dbus_watch_get_flags, (DBusWatch *watch),
180 (watch), return)
181DEFINEFUNC(dbus_bool_t , dbus_watch_handle, (DBusWatch *watch,
182 unsigned int flags),
183 (watch, flags), return)
184
185/* dbus-errors.h */
186DEFINEFUNC(void , dbus_error_free, (DBusError *error),
187 (error), )
188DEFINEFUNC(void , dbus_error_init, (DBusError *error),
189 (error), )
190DEFINEFUNC(dbus_bool_t , dbus_error_is_set, (const DBusError *error),
191 (error), return)
192
193/* dbus-memory.h */
194DEFINEFUNC(void , dbus_free, (void *memory), (memory), )
195
196/* dbus-message.h */
197DEFINEFUNC(DBusMessage* , dbus_message_copy, (const DBusMessage *message),
198 (message), return)
199DEFINEFUNC(const char* , dbus_message_get_error_name, (DBusMessage *message),
200 (message), return)
201DEFINEFUNC(const char* , dbus_message_get_interface, (DBusMessage *message),
202 (message), return)
203DEFINEFUNC(const char* , dbus_message_get_member, (DBusMessage *message),
204 (message), return)
205DEFINEFUNC(dbus_bool_t , dbus_message_get_no_reply, (DBusMessage *message),
206 (message), return)
207DEFINEFUNC(const char* , dbus_message_get_path, (DBusMessage *message),
208 (message), return)
209DEFINEFUNC(const char* , dbus_message_get_sender, (DBusMessage *message),
210 (message), return)
211DEFINEFUNC(dbus_uint32_t , dbus_message_get_serial, (DBusMessage *message),
212 (message), return)
213DEFINEFUNC(const char* , dbus_message_get_signature, (DBusMessage *message),
214 (message), return)
215DEFINEFUNC(int , dbus_message_get_type, (DBusMessage *message),
216 (message), return)
217DEFINEFUNC(dbus_bool_t , dbus_message_iter_append_basic, (DBusMessageIter *iter,
218 int type,
219 const void *value),
220 (iter, type, value), return)
221DEFINEFUNC(dbus_bool_t , dbus_message_iter_append_fixed_array, (DBusMessageIter *iter,
222 int element_type,
223 const void *value,
224 int n_elements),
225 (iter, element_type, value, n_elements), return)
226DEFINEFUNC(dbus_bool_t , dbus_message_iter_close_container, (DBusMessageIter *iter,
227 DBusMessageIter *sub),
228 (iter, sub), return)
229DEFINEFUNC(int , dbus_message_iter_get_arg_type, (DBusMessageIter *iter),
230 (iter), return)
231DEFINEFUNC(void , dbus_message_iter_get_basic, (DBusMessageIter *iter,
232 void *value),
233 (iter, value), )
234DEFINEFUNC(int , dbus_message_iter_get_element_type, (DBusMessageIter *iter),
235 (iter), return)
236DEFINEFUNC(void , dbus_message_iter_get_fixed_array, (DBusMessageIter *iter,
237 void *value,
238 int *n_elements),
239 (iter, value, n_elements), return)
240DEFINEFUNC(char* , dbus_message_iter_get_signature, (DBusMessageIter *iter),
241 (iter), return)
242DEFINEFUNC(dbus_bool_t , dbus_message_iter_init, (DBusMessage *message,
243 DBusMessageIter *iter),
244 (message, iter), return)
245DEFINEFUNC(void , dbus_message_iter_init_append, (DBusMessage *message,
246 DBusMessageIter *iter),
247 (message, iter), return)
248DEFINEFUNC(dbus_bool_t , dbus_message_iter_next, (DBusMessageIter *iter),
249 (iter), return)
250DEFINEFUNC(dbus_bool_t , dbus_message_iter_open_container, (DBusMessageIter *iter,
251 int type,
252 const char *contained_signature,
253 DBusMessageIter *sub),
254 (iter, type, contained_signature, sub), return)
255DEFINEFUNC(void , dbus_message_iter_recurse, (DBusMessageIter *iter,
256 DBusMessageIter *sub),
257 (iter, sub), )
258DEFINEFUNC(DBusMessage* , dbus_message_new, (int message_type),
259 (message_type), return)
260DEFINEFUNC(DBusMessage* , dbus_message_new_method_call, (const char *bus_name,
261 const char *path,
262 const char *interface,
263 const char *method),
264 (bus_name, path, interface, method), return)
265DEFINEFUNC(DBusMessage* , dbus_message_new_signal, (const char *path,
266 const char *interface,
267 const char *name),
268 (path, interface, name), return)
269DEFINEFUNC(DBusMessage* , dbus_message_ref, (DBusMessage *message),
270 (message), return)
271DEFINEFUNC(dbus_bool_t , dbus_message_set_destination, (DBusMessage *message,
272 const char *destination),
273 (message, destination), return)
274DEFINEFUNC(dbus_bool_t , dbus_message_set_error_name, (DBusMessage *message,
275 const char *name),
276 (message, name), return)
277DEFINEFUNC(void , dbus_message_set_no_reply, (DBusMessage *message,
278 dbus_bool_t no_reply),
279 (message, no_reply), return)
280DEFINEFUNC(dbus_bool_t , dbus_message_set_path, (DBusMessage *message,
281 const char *object_path),
282 (message, object_path), return)
283DEFINEFUNC(dbus_bool_t , dbus_message_set_reply_serial, (DBusMessage *message,
284 dbus_uint32_t reply_serial),
285 (message, reply_serial), return)
286DEFINEFUNC(dbus_bool_t , dbus_message_set_sender, (DBusMessage *message,
287 const char *sender),
288 (message, sender), return)
289DEFINEFUNC(void , dbus_message_unref, (DBusMessage *message),
290 (message), )
291
292/* dbus-pending-call.h */
293DEFINEFUNC(dbus_bool_t , dbus_pending_call_set_notify, (DBusPendingCall *pending,
294 DBusPendingCallNotifyFunction function,
295 void *user_data,
296 DBusFreeFunction free_user_data),
297 (pending, function, user_data, free_user_data), return)
298DEFINEFUNC(void , dbus_pending_call_block, (DBusPendingCall *pending),
299 (pending), )
300DEFINEFUNC(void , dbus_pending_call_cancel, (DBusPendingCall *pending),
301 (pending), )
302DEFINEFUNC(dbus_bool_t , dbus_pending_call_get_completed, (DBusPendingCall *pending),
303 (pending), return)
304DEFINEFUNC(DBusMessage* , dbus_pending_call_steal_reply, (DBusPendingCall *pending),
305 (pending), return)
306DEFINEFUNC(void , dbus_pending_call_unref, (DBusPendingCall *pending),
307 (pending), return)
308
309/* dbus-server.h */
310DEFINEFUNC(dbus_bool_t , dbus_server_allocate_data_slot, (dbus_int32_t *slot_p),
311 (slot_p), return)
312DEFINEFUNC(void , dbus_server_disconnect, (DBusServer *server),
313 (server), )
314DEFINEFUNC(char* , dbus_server_get_address, (DBusServer *server),
315 (server), return)
316DEFINEFUNC(dbus_bool_t , dbus_server_get_is_connected, (DBusServer *server),
317 (server), return)
318DEFINEFUNC(DBusServer* , dbus_server_listen, (const char *address,
319 DBusError *error),
320 (address, error), return)
321DEFINEFUNC(dbus_bool_t , dbus_server_set_data, (DBusServer *server,
322 int slot,
323 void *data,
324 DBusFreeFunction free_data_func),
325 (server, slot, data, free_data_func), return)
326DEFINEFUNC(void , dbus_server_set_new_connection_function, (DBusServer *server,
327 DBusNewConnectionFunction function,
328 void *data,
329 DBusFreeFunction free_data_function),
330 (server, function, data, free_data_function), )
331DEFINEFUNC(dbus_bool_t , dbus_server_set_timeout_functions, (DBusServer *server,
332 DBusAddTimeoutFunction add_function,
333 DBusRemoveTimeoutFunction remove_function,
334 DBusTimeoutToggledFunction toggled_function,
335 void *data,
336 DBusFreeFunction free_data_function),
337 (server, add_function, remove_function, toggled_function, data, free_data_function), return)
338DEFINEFUNC(dbus_bool_t , dbus_server_set_watch_functions, (DBusServer *server,
339 DBusAddWatchFunction add_function,
340 DBusRemoveWatchFunction remove_function,
341 DBusWatchToggledFunction toggled_function,
342 void *data,
343 DBusFreeFunction free_data_function),
344 (server, add_function, remove_function, toggled_function, data, free_data_function), return)
345DEFINEFUNC(void , dbus_server_unref, (DBusServer *server),
346 (server), )
347
348/* dbus-signature.h */
349DEFINEFUNC(dbus_bool_t , dbus_signature_validate, (const char *signature,
350 DBusError *error),
351 (signature, error), return)
352DEFINEFUNC(dbus_bool_t , dbus_signature_validate_single, (const char *signature,
353 DBusError *error),
354 (signature, error), return)
355DEFINEFUNC(dbus_bool_t , dbus_type_is_basic, (int typecode),
356 (typecode), return)
357DEFINEFUNC(dbus_bool_t , dbus_type_is_fixed, (int typecode),
358 (typecode), return)
359
360/* dbus-thread.h */
361DEFINEFUNC(dbus_bool_t , dbus_threads_init_default, (), (), return)
362
363QT_END_NAMESPACE
364
365#endif
Note: See TracBrowser for help on using the repository browser.