D-Bus  1.12.16
dbus-connection-internal.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-connection-internal.h DBusConnection internal interfaces
3  *
4  * Copyright (C) 2002 Red Hat Inc.
5  *
6  * Licensed under the Academic Free License version 2.1
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 #ifndef DBUS_CONNECTION_INTERNAL_H
24 #define DBUS_CONNECTION_INTERNAL_H
25 
26 #include <dbus/dbus-internals.h>
27 #include <dbus/dbus-connection.h>
28 #include <dbus/dbus-message.h>
29 #include <dbus/dbus-transport.h>
30 #include <dbus/dbus-resources.h>
31 #include <dbus/dbus-list.h>
32 #include <dbus/dbus-timeout.h>
33 #include <dbus/dbus-dataslot.h>
34 
36 
37 typedef enum
38 {
39  DBUS_ITERATION_DO_WRITING = 1 << 0,
40  DBUS_ITERATION_DO_READING = 1 << 1,
41  DBUS_ITERATION_BLOCK = 1 << 2
42 } DBusIterationFlags;
43 
45 #define _DBUS_DEFAULT_TIMEOUT_VALUE (25 * 1000)
46 
47 typedef void (* DBusPendingFdsChangeFunction) (void *data);
48 
49 DBUS_PRIVATE_EXPORT
50 void _dbus_connection_lock (DBusConnection *connection);
51 DBUS_PRIVATE_EXPORT
52 void _dbus_connection_unlock (DBusConnection *connection);
53 DBUS_PRIVATE_EXPORT
55 DBUS_PRIVATE_EXPORT
58  DBusList *link);
62  DBusMessage *message);
64  DBusWatch *watch);
66  DBusWatch *watch);
68  DBusWatch *watch,
69  dbus_bool_t enabled);
71  unsigned int condition,
72  void *data);
74  DBusTimeout *timeout);
76  DBusTimeout *timeout);
78  DBusTimeout *timeout,
79  dbus_bool_t enabled);
82  DBusPendingCall *pending,
83  unsigned int flags,
84  int timeout_milliseconds);
87 
88 DBusPendingCall* _dbus_pending_call_new (DBusConnection *connection,
89  int timeout_milliseconds,
90  DBusTimeoutHandler timeout_handler);
91 void _dbus_pending_call_notify (DBusPendingCall *pending);
93  DBusPendingCall *pending);
95 void _dbus_pending_call_complete_and_unlock (DBusPendingCall *pending,
96  DBusMessage *message);
98  DBusMessage *message,
99  dbus_uint32_t *client_serial);
100 
102  DBusList *link);
103 DBUS_PRIVATE_EXPORT
104 void _dbus_connection_test_get_locks (DBusConnection *conn,
105  DBusMutex **mutex_loc,
106  DBusMutex **dispatch_mutex_loc,
107  DBusMutex **io_path_mutex_loc,
108  DBusCondVar **dispatch_cond_loc,
109  DBusCondVar **io_path_cond_loc);
110 DBUS_PRIVATE_EXPORT
112 DBUS_PRIVATE_EXPORT
114  DBusPendingFdsChangeFunction callback,
115  void *data);
116 
117 DBUS_PRIVATE_EXPORT
118 dbus_bool_t _dbus_connection_get_linux_security_label (DBusConnection *connection,
119  char **label_p);
120 
121 /* if DBUS_ENABLE_STATS */
122 DBUS_PRIVATE_EXPORT
123 void _dbus_connection_get_stats (DBusConnection *connection,
124  dbus_uint32_t *in_messages,
125  dbus_uint32_t *in_bytes,
126  dbus_uint32_t *in_fds,
127  dbus_uint32_t *in_peak_bytes,
128  dbus_uint32_t *in_peak_fds,
129  dbus_uint32_t *out_messages,
130  dbus_uint32_t *out_bytes,
131  dbus_uint32_t *out_fds,
132  dbus_uint32_t *out_peak_bytes,
133  dbus_uint32_t *out_peak_fds);
134 
135 
136 /* if DBUS_ENABLE_EMBEDDED_TESTS */
137 const char* _dbus_connection_get_address (DBusConnection *connection);
138 
139 /* This _dbus_bus_* stuff doesn't really belong here, but dbus-bus-internal.h seems
140  * silly for one function
141  */
148 
153 
154 #endif /* DBUS_CONNECTION_INTERNAL_H */