#include <tqapplication.h>
#include <tqevent.h>
#include <tqmetaobject.h>
#include <tqsocketnotifier.h>
#include <tqtimer.h>
#include "tqdbusconnection_p.h"
#include "tqdbusmessage.h"
#include "tqdbusconnection_p.moc"
Go to the source code of this file.
|
static dbus_bool_t | qDBusAddTimeout (DBusTimeout *timeout, void *data) |
|
static void | qDBusRemoveTimeout (DBusTimeout *timeout, void *data) |
|
static void | qDBusToggleTimeout (DBusTimeout *timeout, void *data) |
|
static dbus_bool_t | qDBusAddWatch (DBusWatch *watch, void *data) |
|
static void | qDBusRemoveWatch (DBusWatch *watch, void *data) |
|
static void | qDBusToggleWatch (DBusWatch *watch, void *data) |
|
static void | qDBusNewConnection (DBusServer *server, DBusConnection *c, void *data) |
|
static DBusHandlerResult | qDBusSignalFilter (DBusConnection *connection, DBusMessage *message, void *data) |
|
static void | qDBusResultReceived (DBusPendingCall *pending, void *user_data) |
|
◆ qDBusAddTimeout()
static dbus_bool_t qDBusAddTimeout |
( |
DBusTimeout * |
timeout, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ qDBusAddWatch()
static dbus_bool_t qDBusAddWatch |
( |
DBusWatch * |
watch, |
|
|
void * |
data |
|
) |
| |
|
static |
Definition at line 116 of file tqdbusintegrator.cpp.
123 int flags = dbus_watch_get_flags(watch);
124 int fd = dbus_watch_get_unix_fd(watch);
127 if (flags & DBUS_WATCH_READABLE) {
128 bool enabled = dbus_watch_get_enabled(watch);
130 watcher.
watch = watch;
132 watcher.
read =
new TQSocketNotifier(fd, TQSocketNotifier::Read, d);
133 if (!enabled) watcher.
read->setEnabled(
false);
134 d->connect(watcher.
read, TQ_SIGNAL(activated(
int)), TQ_SLOT(socketRead(
int)));
137 if (flags & DBUS_WATCH_WRITABLE) {
138 bool enabled = dbus_watch_get_enabled(watch);
140 watcher.
watch = watch;
142 watcher.
write =
new TQSocketNotifier(fd, TQSocketNotifier::Write, d);
143 if (!enabled) watcher.
write->setEnabled(
false);
144 d->connect(watcher.
write, TQ_SIGNAL(activated(
int)), TQ_SLOT(socketWrite(
int)));
148 TQT_DBusConnectionPrivate::WatcherHash::iterator it = d->
watchers.find(fd);
153 it.data().append(watcher);
References TQT_DBusConnectionPrivate::Watcher::read, TQT_DBusConnectionPrivate::Watcher::watch, TQT_DBusConnectionPrivate::watchers, and TQT_DBusConnectionPrivate::Watcher::write.
◆ qDBusNewConnection()
static void qDBusNewConnection |
( |
DBusServer * |
server, |
|
|
DBusConnection * |
c, |
|
|
void * |
data |
|
) |
| |
|
static |
Definition at line 234 of file tqdbusintegrator.cpp.
236 Q_ASSERT(data); Q_ASSERT(server); Q_ASSERT(c);
238 tqDebug(
"SERVER: GOT A NEW CONNECTION");
◆ qDBusRemoveTimeout()
static void qDBusRemoveTimeout |
( |
DBusTimeout * |
timeout, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ qDBusRemoveWatch()
static void qDBusRemoveWatch |
( |
DBusWatch * |
watch, |
|
|
void * |
data |
|
) |
| |
|
static |
Definition at line 158 of file tqdbusintegrator.cpp.
166 int fd = dbus_watch_get_unix_fd(watch);
168 TQT_DBusConnectionPrivate::WatcherHash::iterator it = d->
watchers.find(fd);
172 for (TQT_DBusConnectionPrivate::WatcherList::iterator wit = list.begin();
173 wit != list.end(); ++wit)
175 if ((*wit).watch == watch)
183 (*wit).read->disconnect(d);
188 (*wit).write->disconnect(d);
197 TQTimer::singleShot(0, d, TQ_SLOT(purgeRemovedWatches()));
References TQT_DBusConnectionPrivate::removedWatches, and TQT_DBusConnectionPrivate::watchers.
◆ qDBusResultReceived()
static void qDBusResultReceived |
( |
DBusPendingCall * |
pending, |
|
|
void * |
user_data |
|
) |
| |
|
static |
◆ qDBusSignalFilter()
static DBusHandlerResult qDBusSignalFilter |
( |
DBusConnection * |
connection, |
|
|
DBusMessage * |
message, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ qDBusToggleTimeout()
static void qDBusToggleTimeout |
( |
DBusTimeout * |
timeout, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ qDBusToggleWatch()
static void qDBusToggleWatch |
( |
DBusWatch * |
watch, |
|
|
void * |
data |
|
) |
| |
|
static |
Definition at line 200 of file tqdbusintegrator.cpp.
208 int fd = dbus_watch_get_unix_fd(watch);
210 TQT_DBusConnectionPrivate::WatcherHash::iterator it = d->
watchers.find(fd);
213 for (TQT_DBusConnectionPrivate::WatcherList::iterator wit = list.begin(); wit != list.end();
216 if ((*wit).watch == watch) {
217 bool enabled = dbus_watch_get_enabled(watch);
218 int flags = dbus_watch_get_flags(watch);
224 if (flags & DBUS_WATCH_READABLE && (*wit).read)
225 (*wit).read->setEnabled(enabled);
226 if (flags & DBUS_WATCH_WRITABLE && (*wit).write)
227 (*wit).write->setEnabled(enabled);
References TQT_DBusConnectionPrivate::watchers.
◆ server_slot
dbus_int32_t server_slot = -1 |
|
static |