summaryrefslogtreecommitdiff
path: root/qt/qdbusinterface_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt/qdbusinterface_p.h')
-rw-r--r--qt/qdbusinterface_p.h41
1 files changed, 17 insertions, 24 deletions
diff --git a/qt/qdbusinterface_p.h b/qt/qdbusinterface_p.h
index 04aa243..70b732c 100644
--- a/qt/qdbusinterface_p.h
+++ b/qt/qdbusinterface_p.h
@@ -1,6 +1,5 @@
/*
*
- * Copyright (C) 2006 Thiago José Macieira <thiago@kde.org>
* Copyright (C) 2006 Trolltech AS. All rights reserved.
* Author: Thiago Macieira <thiago.macieira@trolltech.com>
*
@@ -37,36 +36,30 @@
#ifndef QDBUSINTERFACEPRIVATE_H
#define QDBUSINTERFACEPRIVATE_H
-#include "qdbusobject.h"
+#include "qdbusabstractinterface_p.h"
+#include "qdbusmetaobject_p.h"
#include "qdbusinterface.h"
-#include "qdbusconnection.h"
-#include "qdbuserror.h"
-#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
-
-class QDBusInterfacePrivate
+class QDBusInterfacePrivate: public QDBusAbstractInterfacePrivate
{
public:
- QAtomic ref;
- QDBusConnection conn;
- QString service;
- QString path;
- QDBusError lastError;
-
- //QConstSharedDataPointer<QDBusIntrospection::Interface> data;
- const QDBusIntrospection::Interface* data;
-
- inline QDBusInterfacePrivate(const QDBusConnection &other) : conn(other), data(emptyData())
- { }
+ Q_DECLARE_PUBLIC(QDBusInterface)
- inline bool needsIntrospection() const
- { return data && data->introspection.isNull(); }
+ QDBusMetaObject *metaObject;
- inline void introspect()
- { if (needsIntrospection()) conn.findObject(service, path).introspect(); }
+ inline QDBusInterfacePrivate(const QDBusConnection &con, QDBusConnectionPrivate *conp,
+ const QString &serv, const QString &p, const QString &iface,
+ QDBusMetaObject *mo = 0)
+ : QDBusAbstractInterfacePrivate(con, conp, serv, p, iface), metaObject(mo)
+ {
+ }
+ ~QDBusInterfacePrivate()
+ {
+ if (!metaObject->cached)
+ delete metaObject;
+ }
- static const QDBusIntrospection::Interface *emptyData();
+ int metacall(QMetaObject::Call c, int id, void **argv);
};
-
#endif