mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 20:48:02 +02:00
* qt/: Update to Subversion r548032.
This includes a big reorganisation of the files inside the subdir. We really need a version control system that supports moving of files. I'm not bothering with history anyways anymore, since the bindings will be moved out to git. The history should be restored from Subversion when that happens.
This commit is contained in:
parent
435c7af9b6
commit
edbf2bfc10
54 changed files with 66943 additions and 122 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
2006-06-04 Thiago Macieira <thiago.macieira@trolltech.com>
|
||||||
|
|
||||||
|
* qt/: Update to Subversion r548032.
|
||||||
|
This includes a big reorganisation of the files inside the
|
||||||
|
subdir.
|
||||||
|
|
||||||
2006-05-30 Sjoerd Simons <sjoerd@luon.net>
|
2006-05-30 Sjoerd Simons <sjoerd@luon.net>
|
||||||
|
|
||||||
* dbus/dbus-sysdeps.c: Make tcp socket connection error somewhat more
|
* dbus/dbus-sysdeps.c: Make tcp socket connection error somewhat more
|
||||||
|
|
|
||||||
18
qt/Doxyfile
18
qt/Doxyfile
|
|
@ -23,14 +23,14 @@ PROJECT_NAME = QtDBus
|
||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 0.60
|
PROJECT_NUMBER = 0.62
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
# If a relative path is entered, it will be relative to the location
|
# If a relative path is entered, it will be relative to the location
|
||||||
# where doxygen was started. If left blank the current directory will be used.
|
# where doxygen was started. If left blank the current directory will be used.
|
||||||
|
|
||||||
OUTPUT_DIRECTORY = ../doc/api
|
OUTPUT_DIRECTORY = doc/api
|
||||||
|
|
||||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||||
|
|
@ -287,7 +287,7 @@ HIDE_IN_BODY_DOCS = NO
|
||||||
# to NO (the default) then the documentation will be excluded.
|
# to NO (the default) then the documentation will be excluded.
|
||||||
# Set it to YES to include the internal documentation.
|
# Set it to YES to include the internal documentation.
|
||||||
|
|
||||||
INTERNAL_DOCS = NO
|
INTERNAL_DOCS = YES
|
||||||
|
|
||||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||||
# file names in lower-case letters. If set to YES upper-case letters are also
|
# file names in lower-case letters. If set to YES upper-case letters are also
|
||||||
|
|
@ -459,7 +459,7 @@ WARN_LOGFILE =
|
||||||
# directories like "/usr/src/myproject". Separate the files or directories
|
# directories like "/usr/src/myproject". Separate the files or directories
|
||||||
# with spaces.
|
# with spaces.
|
||||||
|
|
||||||
INPUT = .
|
INPUT = src
|
||||||
|
|
||||||
# If the value of the INPUT tag contains directories, you can use the
|
# If the value of the INPUT tag contains directories, you can use the
|
||||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||||
|
|
@ -512,14 +512,13 @@ EXCLUDE_PATTERNS = Makefile.* \
|
||||||
magic \
|
magic \
|
||||||
NOTES \
|
NOTES \
|
||||||
TODO \
|
TODO \
|
||||||
THANKS \
|
THANKS
|
||||||
*_p.h
|
|
||||||
|
|
||||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||||
# directories that contain example code fragments that are included (see
|
# directories that contain example code fragments that are included (see
|
||||||
# the \include command).
|
# the \include command).
|
||||||
|
|
||||||
EXAMPLE_PATH =
|
EXAMPLE_PATH = examples
|
||||||
|
|
||||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||||
|
|
@ -1029,7 +1028,8 @@ PREDEFINED = DBUS_BEGIN_DECLS= \
|
||||||
DOXYGEN_SHOULD_SKIP_THIS \
|
DOXYGEN_SHOULD_SKIP_THIS \
|
||||||
_DBUS_DEFINE_GLOBAL_LOCK(name)= \
|
_DBUS_DEFINE_GLOBAL_LOCK(name)= \
|
||||||
_DBUS_GNUC_PRINTF(from,to)= \
|
_DBUS_GNUC_PRINTF(from,to)= \
|
||||||
Q_DECLARE_FLAGS(flags,theenum)=
|
Q_DECLARE_FLAGS(flags,theenum)= \
|
||||||
|
Q_QDOC
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||||
# this tag can be used to specify a list of macro names that should be expanded.
|
# this tag can be used to specify a list of macro names that should be expanded.
|
||||||
|
|
@ -1065,7 +1065,7 @@ SKIP_FUNCTION_MACROS = YES
|
||||||
# If a tag file is not located in the directory in which doxygen
|
# If a tag file is not located in the directory in which doxygen
|
||||||
# is run, you must also specify the path to the tagfile here.
|
# is run, you must also specify the path to the tagfile here.
|
||||||
|
|
||||||
TAGFILES = /home/tjmaciei/troll/qt-4.1/doc/qt.tag=http://doc.trolltech.com/4.1
|
TAGFILES = ./qt.tag=http://doc.trolltech.com/4.1
|
||||||
|
|
||||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||||
# a tag file that is based on the input files it reads.
|
# a tag file that is based on the input files it reads.
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,7 @@
|
||||||
SUBDIRS = . examples
|
DIST_SUBDIRS = src tools examples
|
||||||
|
|
||||||
if HAVE_QT
|
if HAVE_QT
|
||||||
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
|
QT_SUBDIRS = src tools examples
|
||||||
|
|
||||||
lib_LTLIBRARIES=libdbus-qt4-1.la
|
|
||||||
|
|
||||||
dbusincludedir=$(includedir)/dbus-1.0/dbus
|
|
||||||
dbusinclude_HEADERS= \
|
|
||||||
qdbusbus.h \
|
|
||||||
qdbusmacros.h \
|
|
||||||
qdbuserror.h \
|
|
||||||
qdbusmessage.h \
|
|
||||||
qdbusserver.h \
|
|
||||||
qdbusconnection.h \
|
|
||||||
qdbusabstractinterface.h \
|
|
||||||
qdbusinterface.h \
|
|
||||||
qdbusutil.h \
|
|
||||||
qdbusabstractadaptor.h \
|
|
||||||
qdbusreply.h \
|
|
||||||
qdbustypehelper_p.h
|
|
||||||
|
|
||||||
noinst_HEADERS= \
|
|
||||||
qdbusabstractadaptor_p.h \
|
|
||||||
qdbusabstractinterface_p.h \
|
|
||||||
qdbusconnection_p.h \
|
|
||||||
qdbusinterface_p.h \
|
|
||||||
qdbusintrospection_p.h \
|
|
||||||
qdbusmarshall_p.h \
|
|
||||||
qdbusmessage_p.h \
|
|
||||||
qdbusmetaobject_p.h \
|
|
||||||
qdbustype_p.h \
|
|
||||||
qdbusxmlparser_p.h
|
|
||||||
|
|
||||||
libdbus_qt4_1_la_SOURCES = \
|
|
||||||
qdbusbus.cpp \
|
|
||||||
qdbusconnection.cpp \
|
|
||||||
qdbuserror.cpp \
|
|
||||||
qdbusintegrator.cpp \
|
|
||||||
qdbusmarshall.cpp \
|
|
||||||
qdbusmessage.cpp \
|
|
||||||
qdbusserver.cpp \
|
|
||||||
qdbustype.cpp \
|
|
||||||
qdbusabstractinterface.cpp \
|
|
||||||
qdbusinterface.cpp \
|
|
||||||
qdbusxmlparser.cpp \
|
|
||||||
qdbusutil.cpp \
|
|
||||||
qdbusintrospection.cpp \
|
|
||||||
qdbusabstractadaptor.cpp \
|
|
||||||
qdbusthread.cpp \
|
|
||||||
qdbusinternalfilters.cpp \
|
|
||||||
qdbusmetaobject.cpp \
|
|
||||||
qdbusmisc.cpp \
|
|
||||||
qdbusxmlgenerator.cpp
|
|
||||||
|
|
||||||
bin_PROGRAMS = dbusidl2cpp dbuscpp2xml
|
|
||||||
dbusidl2cpp_SOURCES = dbusidl2cpp.cpp
|
|
||||||
dbusidl2cpp_LDFLAGS = -no-undefined
|
|
||||||
dbusidl2cpp_LDADD = $(DBUS_QT_LIBS) libdbus-qt4-1.la
|
|
||||||
dbuscpp2xml_SOURCES = dbuscpp2xml.cpp
|
|
||||||
dbuscpp2xml_LDFLAGS = -no-undefined
|
|
||||||
dbuscpp2xml_LDADD = $(DBUS_QT_LIBS) libdbus-qt4-1.la
|
|
||||||
|
|
||||||
qdbusabstractadaptor.lo: qdbusabstractadaptor.moc qdbusabstractadaptor_p.moc
|
|
||||||
qdbusabstractinterface.lo: qdbusabstractinterface.moc
|
|
||||||
qdbusbus.lo: qdbusbus.moc
|
|
||||||
qdbusserver.lo: qdbusserver.moc
|
|
||||||
qdbusintegrator.lo: qdbusconnection_p.moc
|
|
||||||
|
|
||||||
CLEANFILES=qdbusabstractadaptor.moc qdbusserver.moc qdbusconnection_p.moc qdbusconnection_p.moc qdbusabstractadaptor_p.moc qdbusbus.moc qdbusabstractinterface.moc
|
|
||||||
|
|
||||||
libdbus_qt4_1_la_LIBADD= $(DBUS_QT_LIBS) $(top_builddir)/dbus/libdbus-1.la
|
|
||||||
libdbus_qt4_1_la_LDFLAGS= -version-info 1:0 -no-undefined
|
|
||||||
libdbus_qt4_1_la_CPPFLAGS= -DQDBUS_MAKEDLL
|
|
||||||
|
|
||||||
EXTRA_DIST = qt-dbus.qdocconf
|
|
||||||
|
|
||||||
%.moc: %.h
|
|
||||||
$(QT_MOC) $< > $@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
SUBDIRS = $(QT_SUBDIRS)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
if HAVE_QT
|
INCLUDES=-I$(top_srcdir)/qt $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
|
||||||
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
|
LDADD = ../src/libdbus-qt4-1.la
|
||||||
LDADD = ../libdbus-qt4-1.la
|
|
||||||
|
|
||||||
if HAVE_QT_GUI
|
if HAVE_QT_GUI
|
||||||
chat_LDADD = $(LDADD) $(DBUS_QT_GUI_LIBS)
|
chat_LDADD = $(LDADD) $(DBUS_QT_GUI_LIBS)
|
||||||
|
|
@ -10,7 +9,7 @@ chat.o: chatmainwindow.h chatsetnickname.h chatinterface.h chatadaptor.h chat.mo
|
||||||
chatmainwindow.h: chatmainwindow.ui
|
chatmainwindow.h: chatmainwindow.ui
|
||||||
chatsetnickname.h: chatsetnickname.ui
|
chatsetnickname.h: chatsetnickname.ui
|
||||||
chatinterface.cpp chatinterface.h: com.trolltech.ChatInterface.xml
|
chatinterface.cpp chatinterface.h: com.trolltech.ChatInterface.xml
|
||||||
../dbusidl2cpp -m -p chatinterface $?
|
../tools/dbusidl2cpp -m -p chatinterface $?
|
||||||
$(QT_MOC) -o chatinterface.moc chatinterface.h
|
$(QT_MOC) -o chatinterface.moc chatinterface.h
|
||||||
|
|
||||||
CHAT=chat
|
CHAT=chat
|
||||||
|
|
@ -41,5 +40,4 @@ CLEANFILES = chat.moc chatadaptor.moc complexping.moc complexpong.moc pong.moc \
|
||||||
$(QT_MOC) $< > $@
|
$(QT_MOC) $< > $@
|
||||||
%.h: %.ui
|
%.h: %.ui
|
||||||
$(QT_UIC) -o $@ $?
|
$(QT_UIC) -o $@ $?
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class Pong: public QDBusAbstractAdaptor
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.ComplexPong.Pong")
|
Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.ComplexPong.Pong")
|
||||||
Q_PROPERTY(QString value READ value WRITE setValue);
|
Q_PROPERTY(QString value READ value WRITE setValue)
|
||||||
public:
|
public:
|
||||||
QString m_value;
|
QString m_value;
|
||||||
QString value() const;
|
QString value() const;
|
||||||
|
|
|
||||||
11
qt/src/.cvsignore
Normal file
11
qt/src/.cvsignore
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
.deps
|
||||||
|
.libs
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
*.lo
|
||||||
|
*.la
|
||||||
|
*.bb
|
||||||
|
*.bbg
|
||||||
|
*.da
|
||||||
|
*.gcov
|
||||||
|
*.moc
|
||||||
70
qt/src/Makefile.am
Normal file
70
qt/src/Makefile.am
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
|
||||||
|
|
||||||
|
lib_LTLIBRARIES=libdbus-qt4-1.la
|
||||||
|
|
||||||
|
dbusincludedir=$(includedir)/dbus-1.0/dbus
|
||||||
|
dbusinclude_HEADERS= \
|
||||||
|
qdbusbus.h \
|
||||||
|
qdbusmacros.h \
|
||||||
|
qdbuserror.h \
|
||||||
|
qdbusmessage.h \
|
||||||
|
qdbusserver.h \
|
||||||
|
qdbusconnection.h \
|
||||||
|
qdbusabstractinterface.h \
|
||||||
|
qdbusinterface.h \
|
||||||
|
qdbusutil.h \
|
||||||
|
qdbusabstractadaptor.h \
|
||||||
|
qdbusreply.h \
|
||||||
|
qdbustypehelper_p.h
|
||||||
|
|
||||||
|
noinst_HEADERS= \
|
||||||
|
qdbusabstractadaptor_p.h \
|
||||||
|
qdbusabstractinterface_p.h \
|
||||||
|
qdbusconnection_p.h \
|
||||||
|
qdbusinterface_p.h \
|
||||||
|
qdbusintrospection_p.h \
|
||||||
|
qdbusmarshall_p.h \
|
||||||
|
qdbusmessage_p.h \
|
||||||
|
qdbusmetaobject_p.h \
|
||||||
|
qdbustype_p.h \
|
||||||
|
qdbusxmlparser_p.h
|
||||||
|
|
||||||
|
MOCS = qdbusabstractadaptor.moc qdbusserver.moc qdbusconnection_p.moc qdbusconnection_p.moc qdbusabstractadaptor_p.moc qdbusbus.moc qdbusabstractinterface.moc
|
||||||
|
CLEANFILES = $(MOCS)
|
||||||
|
BUILT_SOURCES = $(MOCS)
|
||||||
|
|
||||||
|
libdbus_qt4_1_la_SOURCES = \
|
||||||
|
qdbusbus.cpp \
|
||||||
|
qdbusconnection.cpp \
|
||||||
|
qdbuserror.cpp \
|
||||||
|
qdbusintegrator.cpp \
|
||||||
|
qdbusmarshall.cpp \
|
||||||
|
qdbusmessage.cpp \
|
||||||
|
qdbusserver.cpp \
|
||||||
|
qdbustype.cpp \
|
||||||
|
qdbusabstractinterface.cpp \
|
||||||
|
qdbusinterface.cpp \
|
||||||
|
qdbusxmlparser.cpp \
|
||||||
|
qdbusutil.cpp \
|
||||||
|
qdbusintrospection.cpp \
|
||||||
|
qdbusabstractadaptor.cpp \
|
||||||
|
qdbusthread.cpp \
|
||||||
|
qdbusinternalfilters.cpp \
|
||||||
|
qdbusmetaobject.cpp \
|
||||||
|
qdbusmisc.cpp \
|
||||||
|
qdbusxmlgenerator.cpp
|
||||||
|
|
||||||
|
qdbusabstractadaptor.lo: qdbusabstractadaptor.moc qdbusabstractadaptor_p.moc
|
||||||
|
qdbusabstractinterface.lo: qdbusabstractinterface.moc
|
||||||
|
qdbusbus.lo: qdbusbus.moc
|
||||||
|
qdbusserver.lo: qdbusserver.moc
|
||||||
|
qdbusintegrator.lo: qdbusconnection_p.moc
|
||||||
|
|
||||||
|
libdbus_qt4_1_la_LIBADD= $(DBUS_QT_LIBS) $(top_builddir)/dbus/libdbus-1.la
|
||||||
|
libdbus_qt4_1_la_LDFLAGS= -version-info 1:0 -no-undefined
|
||||||
|
libdbus_qt4_1_la_CPPFLAGS= -DQDBUS_MAKEDLL
|
||||||
|
|
||||||
|
EXTRA_DIST = qt-dbus.qdocconf
|
||||||
|
|
||||||
|
%.moc: %.h
|
||||||
|
$(QT_MOC) $< > $@
|
||||||
52
qt/src/qdbus.h
Normal file
52
qt/src/qdbus.h
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/* qdbus.h precompiled header
|
||||||
|
*
|
||||||
|
* Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org>
|
||||||
|
*
|
||||||
|
* Licensed under the Academic Free License version 2.1
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef QDBUS_H
|
||||||
|
#define QDBUS_H
|
||||||
|
|
||||||
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
|
#if !defined(DBUS_COMPILATION)
|
||||||
|
# include <dbus/qdbusabstractadaptor.h>
|
||||||
|
# include <dbus/qdbusabstractinterface.h>
|
||||||
|
# include <dbus/qdbusbus.h>
|
||||||
|
# include <dbus/qdbusconnection.h>
|
||||||
|
# include <dbus/qdbuserror.h>
|
||||||
|
# include <dbus/qdbusinterface.h>
|
||||||
|
# include <dbus/qdbusmessage.h>
|
||||||
|
# include <dbus/qdbusreply.h>
|
||||||
|
# include <dbus/qdbusserver.h>
|
||||||
|
# include <dbus/qdbusutil.h>
|
||||||
|
#else
|
||||||
|
# include "qdbusabstractadaptor.h"
|
||||||
|
# include "qdbusabstractinterface.h"
|
||||||
|
# include "qdbusbus.h"
|
||||||
|
# include "qdbusconnection.h"
|
||||||
|
# include "qdbuserror.h"
|
||||||
|
# include "qdbusinterface.h"
|
||||||
|
# include "qdbusmessage.h"
|
||||||
|
# include "qdbusreply.h"
|
||||||
|
# include "qdbusserver.h"
|
||||||
|
# include "qdbusutil.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -153,6 +153,6 @@ signals:
|
||||||
void nameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
|
void nameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusBusService::RequestNameOptions);
|
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusBusService::RequestNameOptions)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -49,7 +49,7 @@ private:
|
||||||
QHash<QString, QDBusConnectionPrivate *> connectionHash;
|
QHash<QString, QDBusConnectionPrivate *> connectionHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(QDBusConnectionManager, manager);
|
Q_GLOBAL_STATIC(QDBusConnectionManager, manager)
|
||||||
|
|
||||||
QDBusConnectionPrivate *QDBusConnectionManager::connection(const QString &name) const
|
QDBusConnectionPrivate *QDBusConnectionManager::connection(const QString &name) const
|
||||||
{
|
{
|
||||||
|
|
@ -275,13 +275,13 @@ QDBusConnection QDBusConnection::addConnection(BusType type, const QString &name
|
||||||
DBusConnection *c = 0;
|
DBusConnection *c = 0;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SystemBus:
|
case SystemBus:
|
||||||
c = dbus_bus_get(DBUS_BUS_SYSTEM, &d->error);
|
c = dbus_bus_get_private(DBUS_BUS_SYSTEM, &d->error);
|
||||||
break;
|
break;
|
||||||
case SessionBus:
|
case SessionBus:
|
||||||
c = dbus_bus_get(DBUS_BUS_SESSION, &d->error);
|
c = dbus_bus_get_private(DBUS_BUS_SESSION, &d->error);
|
||||||
break;
|
break;
|
||||||
case ActivationBus:
|
case ActivationBus:
|
||||||
c = dbus_bus_get(DBUS_BUS_STARTER, &d->error);
|
c = dbus_bus_get_private(DBUS_BUS_STARTER, &d->error);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
d->setConnection(c); //setConnection does the error handling for us
|
d->setConnection(c); //setConnection does the error handling for us
|
||||||
|
|
@ -632,7 +632,7 @@ QDBusBusService *QDBusConnection::busService() const
|
||||||
if (!d)
|
if (!d)
|
||||||
return 0;
|
return 0;
|
||||||
return d->busService;
|
return d->busService;
|
||||||
};
|
}
|
||||||
|
|
||||||
QDBusAbstractInterfacePrivate *
|
QDBusAbstractInterfacePrivate *
|
||||||
QDBusConnection::findInterface_helper(const QString &service, const QString &path,
|
QDBusConnection::findInterface_helper(const QString &service, const QString &path,
|
||||||
|
|
@ -699,7 +699,7 @@ QString QDBusConnection::baseService() const
|
||||||
: QString();
|
: QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(QMutex, defaultBussesMutex);
|
Q_GLOBAL_STATIC(QMutex, defaultBussesMutex)
|
||||||
static const char sessionBusName[] = "qt_default_session_bus";
|
static const char sessionBusName[] = "qt_default_session_bus";
|
||||||
static const char systemBusName[] = "qt_default_system_bus";
|
static const char systemBusName[] = "qt_default_system_bus";
|
||||||
static QDBusConnection *sessionBus = 0;
|
static QDBusConnection *sessionBus = 0;
|
||||||
|
|
@ -61,7 +61,7 @@ public:
|
||||||
UnregisterTree
|
UnregisterTree
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_FLAGS(RegisterOptions, RegisterOption);
|
Q_DECLARE_FLAGS(RegisterOptions, RegisterOption)
|
||||||
|
|
||||||
QDBusConnection(const QString &name);
|
QDBusConnection(const QString &name);
|
||||||
QDBusConnection(const QDBusConnection &other);
|
QDBusConnection(const QDBusConnection &other);
|
||||||
|
|
@ -60,13 +60,10 @@ class QDBusObjectPrivate;
|
||||||
class CallDeliveryEvent;
|
class CallDeliveryEvent;
|
||||||
class QMetaMethod;
|
class QMetaMethod;
|
||||||
class QDBusInterfacePrivate;
|
class QDBusInterfacePrivate;
|
||||||
class QDBusMetaObject;
|
struct QDBusMetaObject;
|
||||||
class QDBusAbstractInterface;
|
class QDBusAbstractInterface;
|
||||||
class QDBusBusService;
|
class QDBusBusService;
|
||||||
|
|
||||||
typedef struct DBusConnection;
|
|
||||||
typedef struct DBusServer;
|
|
||||||
|
|
||||||
class QDBusConnectionPrivate: public QObject
|
class QDBusConnectionPrivate: public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
@ -46,8 +46,9 @@
|
||||||
|
|
||||||
int QDBusConnectionPrivate::messageMetaType = 0;
|
int QDBusConnectionPrivate::messageMetaType = 0;
|
||||||
|
|
||||||
typedef void (*qDBusSpyHook)(const QDBusMessage&);
|
typedef void (*QDBusSpyHook)(const QDBusMessage&);
|
||||||
static qDBusSpyHook messageSpyHook;
|
typedef QVarLengthArray<QDBusSpyHook, 4> QDBusSpyHookList;
|
||||||
|
Q_GLOBAL_STATIC(QDBusSpyHookList, qDBusSpyHookList)
|
||||||
|
|
||||||
struct QDBusPendingCall
|
struct QDBusPendingCall
|
||||||
{
|
{
|
||||||
|
|
@ -220,10 +221,10 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *c, void *data
|
||||||
qDebug("SERVER: GOT A NEW CONNECTION"); // TODO
|
qDebug("SERVER: GOT A NEW CONNECTION"); // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
extern QDBUS_EXPORT void qDBusSetSpyHook(qDBusSpyHook);
|
extern QDBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
|
||||||
void qDBusSetSpyHook(qDBusSpyHook hook)
|
void qDBusAddSpyHook(QDBusSpyHook hook)
|
||||||
{
|
{
|
||||||
messageSpyHook = hook;
|
qDBusSpyHookList()->append(hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_OUTSIDE_DISPATCH
|
#if USE_OUTSIDE_DISPATCH
|
||||||
|
|
@ -271,9 +272,10 @@ DBusHandlerResult QDBusConnectionPrivate::messageFilter(DBusConnection *connecti
|
||||||
QDBusMessage amsg = QDBusMessage::fromDBusMessage(message, QDBusConnection(d->name));
|
QDBusMessage amsg = QDBusMessage::fromDBusMessage(message, QDBusConnection(d->name));
|
||||||
qDebug() << "got message:" << amsg;
|
qDebug() << "got message:" << amsg;
|
||||||
|
|
||||||
if (messageSpyHook) {
|
const QDBusSpyHookList *list = qDBusSpyHookList();
|
||||||
|
for (int i = 0; i < list->size(); ++i) {
|
||||||
qDebug() << "calling the message spy hook";
|
qDebug() << "calling the message spy hook";
|
||||||
(*messageSpyHook)(amsg);
|
(*(*list)[i])(amsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
@ -41,7 +41,7 @@ public:
|
||||||
virtual int qt_metacall(QMetaObject::Call, int, void **);
|
virtual int qt_metacall(QMetaObject::Call, int, void **);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DECLARE_PRIVATE(QDBusInterface);
|
Q_DECLARE_PRIVATE(QDBusInterface)
|
||||||
Q_DISABLE_COPY(QDBusInterface)
|
Q_DISABLE_COPY(QDBusInterface)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -47,4 +47,14 @@
|
||||||
# define Q_ASYNC
|
# define Q_ASYNC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_CC_MSVC
|
||||||
|
#include <QtCore/qlist.h>
|
||||||
|
#include <QtCore/qset.h>
|
||||||
|
#include <QtCore/qhash.h>
|
||||||
|
#include <QtCore/qvector.h>
|
||||||
|
class QDBusType;
|
||||||
|
inline uint qHash(const QVariant&) { Q_ASSERT(0); return 0; }
|
||||||
|
inline uint qHash(const QDBusType&) { Q_ASSERT(0); return 0; }
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -331,7 +331,7 @@ static void qVariantToIteratorInternal(DBusMessageIter *it, const QVariant &var,
|
||||||
const QDBusType &type);
|
const QDBusType &type);
|
||||||
|
|
||||||
static void qListToIterator(DBusMessageIter *it, const QList<QVariant> &list,
|
static void qListToIterator(DBusMessageIter *it, const QList<QVariant> &list,
|
||||||
const QDBusTypeList &list);
|
const QDBusTypeList &typelist);
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static void qIterAppend(DBusMessageIter *it, const QDBusType &type, T arg)
|
static void qIterAppend(DBusMessageIter *it, const QDBusType &type, T arg)
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
class QDBusError;
|
class QDBusError;
|
||||||
|
|
||||||
class QDBusMetaObjectPrivate;
|
struct QDBusMetaObjectPrivate;
|
||||||
struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
|
struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
|
||||||
{
|
{
|
||||||
bool cached;
|
bool cached;
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
#include "qdbustypehelper_p.h"
|
#include "qdbustypehelper_p.h"
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class QDBUS_EXPORT QDBusReply
|
class QDBusReply
|
||||||
{
|
{
|
||||||
typedef T Type;
|
typedef T Type;
|
||||||
public:
|
public:
|
||||||
|
|
@ -187,6 +187,8 @@ QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, con
|
||||||
else
|
else
|
||||||
xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());
|
xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());
|
||||||
|
|
||||||
|
if (xml.isEmpty())
|
||||||
|
return QString(); // don't add an empty interface
|
||||||
return QString(QLatin1String(" <interface name=\"%1\">\n%2 </interface>\n"))
|
return QString(QLatin1String(" <interface name=\"%1\">\n%2 </interface>\n"))
|
||||||
.arg(interface, xml);
|
.arg(interface, xml);
|
||||||
}
|
}
|
||||||
11
qt/tools/.cvsignore
Normal file
11
qt/tools/.cvsignore
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
.deps
|
||||||
|
.libs
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
*.lo
|
||||||
|
*.la
|
||||||
|
*.bb
|
||||||
|
*.bbg
|
||||||
|
*.da
|
||||||
|
*.gcov
|
||||||
|
*.moc
|
||||||
10
qt/tools/Makefile.am
Normal file
10
qt/tools/Makefile.am
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
INCLUDES=-I$(top_srcdir)/qt $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
|
||||||
|
bin_PROGRAMS = dbusidl2cpp dbuscpp2xml
|
||||||
|
|
||||||
|
dbusidl2cpp_SOURCES = dbusidl2cpp.cpp
|
||||||
|
dbusidl2cpp_LDFLAGS = -no-undefined
|
||||||
|
dbusidl2cpp_LDADD = $(DBUS_QT_LIBS) ../src/libdbus-qt4-1.la
|
||||||
|
|
||||||
|
dbuscpp2xml_SOURCES = dbuscpp2xml.cpp
|
||||||
|
dbuscpp2xml_LDFLAGS = -no-undefined
|
||||||
|
dbuscpp2xml_LDADD = $(DBUS_QT_LIBS) ../src/libdbus-qt4-1.la
|
||||||
|
|
@ -31,9 +31,14 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "qdbusconnection.h" // for the Export* flags
|
#include "../src/qdbusconnection.h" // for the Export* flags
|
||||||
#include <dbus/dbus.h> // for the XML DOCTYPE declaration
|
|
||||||
|
// copied from dbus-protocol.h:
|
||||||
|
static const char docTypeHeader[] =
|
||||||
|
"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" "
|
||||||
|
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n";
|
||||||
|
|
||||||
// in qdbusxmlgenerator.cpp
|
// in qdbusxmlgenerator.cpp
|
||||||
extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
|
extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
|
||||||
|
|
@ -43,7 +48,7 @@ extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const
|
||||||
#define PROGRAMVERSION "0.1"
|
#define PROGRAMVERSION "0.1"
|
||||||
#define PROGRAMCOPYRIGHT "Copyright (C) 2006 Trolltech AS. All rights reserved."
|
#define PROGRAMCOPYRIGHT "Copyright (C) 2006 Trolltech AS. All rights reserved."
|
||||||
|
|
||||||
static const char cmdlineOptions[] = "psmaPSMAo:";
|
static const char cmdlineOptions[] = "psmaPSMAo:hV";
|
||||||
static const char *outputFile;
|
static const char *outputFile;
|
||||||
static int flags;
|
static int flags;
|
||||||
|
|
||||||
|
|
@ -336,7 +341,7 @@ int main(int argc, char **argv)
|
||||||
MocParser parser;
|
MocParser parser;
|
||||||
parseCmdLine(argc, argv);
|
parseCmdLine(argc, argv);
|
||||||
|
|
||||||
for (int i = 1; i < argc; ++i) {
|
for (int i = optind; i < argc; ++i) {
|
||||||
FILE *in = fopen(argv[i], "r");
|
FILE *in = fopen(argv[i], "r");
|
||||||
if (in == 0) {
|
if (in == 0) {
|
||||||
fprintf(stderr, PROGRAMNAME ": could not open '%s': %s\n",
|
fprintf(stderr, PROGRAMNAME ": could not open '%s': %s\n",
|
||||||
|
|
@ -390,7 +395,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(output, "%s<node>\n", DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE);
|
fprintf(output, "%s<node>\n", docTypeHeader);
|
||||||
foreach (QMetaObject mo, parser.objects) {
|
foreach (QMetaObject mo, parser.objects) {
|
||||||
QString xml = qDBusGenerateMetaObjectXml(QString(), &mo, &QObject::staticMetaObject,
|
QString xml = qDBusGenerateMetaObjectXml(QString(), &mo, &QObject::staticMetaObject,
|
||||||
flags);
|
flags);
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
#include <QtCore/qset.h>
|
#include <QtCore/qset.h>
|
||||||
|
|
||||||
#include <dbus/qdbus.h>
|
#include <dbus/qdbus.h>
|
||||||
#include "qdbusmetaobject_p.h"
|
#include "../src/qdbusmetaobject_p.h"
|
||||||
#include "qdbusintrospection_p.h"
|
#include "../src/qdbusintrospection_p.h"
|
||||||
|
|
||||||
#define PROGRAMNAME "dbusidl2cpp"
|
#define PROGRAMNAME "dbusidl2cpp"
|
||||||
#define PROGRAMVERSION "0.4"
|
#define PROGRAMVERSION "0.4"
|
||||||
Loading…
Add table
Reference in a new issue