qstdin.open(stdin, QIODevice::ReadOnly);
// find our remote
- iface = new QDBusInterface(SERVICE_NAME, "/", "com.trolltech.QtDBus.ComplexPong.Pong",
+ iface = new QDBusInterface(SERVICE_NAME, "/", "org.example.QtDBus.ComplexPong.Pong",
QDBusConnection::sessionBus(), this);
if (!iface->isValid()) {
fprintf(stderr, "%s\n",
class Pong: public QDBusAbstractAdaptor
{
Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.ComplexPong.Pong")
+ Q_CLASSINFO("D-Bus Interface", "org.example.QtDBus.ComplexPong.Pong")
Q_PROPERTY(QString value READ value WRITE setValue)
public:
QString m_value;
**
****************************************************************************/
-#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
+#define SERVICE_NAME "org.example.QtDBus.PingExample"
com::trolltech::chat *iface;
iface = new com::trolltech::chat(QString(), QString(), QDBusConnection::sessionBus(), this);
//connect(iface, SIGNAL(message(QString,QString)), this, SLOT(messageSlot(QString,QString)));
- QDBusConnection::sessionBus().connect(QString(), QString(), "com.trolltech.chat", "message", this, SLOT(messageSlot(QString,QString)));
+ QDBusConnection::sessionBus().connect(QString(), QString(), "org.example.chat", "message", this, SLOT(messageSlot(QString,QString)));
connect(iface, SIGNAL(action(QString,QString)), this, SLOT(actionSlot(QString,QString)));
NicknameDialog dialog;
void ChatMainWindow::sendClickedSlot()
{
//emit message(m_nickname, messageLineEdit->text());
- QDBusMessage msg = QDBusMessage::createSignal("/", "com.trolltech.chat", "message");
+ QDBusMessage msg = QDBusMessage::createSignal("/", "org.example.chat", "message");
msg << m_nickname << messageLineEdit->text();
QDBusConnection::sessionBus().send(msg);
messageLineEdit->setText(QString());
**
**
** This file was generated by qdbusxml2cpp version 0.7
-** Command line was: qdbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
+** Command line was: qdbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp org.example.chat.xml
**
** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
**
**
** This file was generated by qdbusxml2cpp version 0.7
-** Command line was: qdbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
+** Command line was: qdbusxml2cpp -a chat_adaptor.h: org.example.chat.xml
**
** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
QT_END_NAMESPACE
/*
- * Adaptor class for interface com.trolltech.chat
+ * Adaptor class for interface org.example.chat
*/
class ChatAdaptor: public QDBusAbstractAdaptor
{
Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.chat")
+ Q_CLASSINFO("D-Bus Interface", "org.example.chat")
Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"com.trolltech.chat\">\n"
+" <interface name=\"org.example.chat\">\n"
" <signal name=\"message\">\n"
" <arg direction=\"out\" type=\"s\" name=\"nickname\"/>\n"
" <arg direction=\"out\" type=\"s\" name=\"text\"/>\n"
**
**
** This file was generated by qdbusxml2cpp version 0.7
-** Command line was: qdbusxml2cpp -i chat_interface.h -p :chat_interface.cpp com.trolltech.chat.xml
+** Command line was: qdbusxml2cpp -i chat_interface.h -p :chat_interface.cpp org.example.chat.xml
**
** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
**
**
** This file was generated by qdbusxml2cpp version 0.7
-** Command line was: qdbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
+** Command line was: qdbusxml2cpp -p chat_interface.h: org.example.chat.xml
**
** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
#include <QtDBus/QtDBus>
/*
- * Proxy class for interface com.trolltech.chat
+ * Proxy class for interface org.example.chat
*/
class ComTrolltechChatInterface: public QDBusAbstractInterface
{
Q_OBJECT
public:
static inline const char *staticInterfaceName()
- { return "com.trolltech.chat"; }
+ { return "org.example.chat"; }
public:
ComTrolltechChatInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
- <interface name="com.trolltech.chat">
+ <interface name="org.example.chat">
<signal name="message">
<arg name="nickname" type="s" direction="out"/>
<arg name="text" type="s" direction="out"/>
SOURCES += chat.cpp chat_adaptor.cpp chat_interface.cpp
FORMS += chatmainwindow.ui chatsetnickname.ui
-#DBUS_ADAPTORS += com.trolltech.chat.xml
-#DBUS_INTERFACES += com.trolltech.chat.xml
+#DBUS_ADAPTORS += org.example.chat.xml
+#DBUS_INTERFACES += org.example.chat.xml
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/chat
**
****************************************************************************/
-#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
+#define SERVICE_NAME "org.example.QtDBus.PingExample"
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/com/trollech/examples/car">
- <interface name="com.trolltech.Examples.CarInterface">
+ <interface name="org.example.Examples.CarInterface">
<method name="accelerate"/>
<method name="decelerate"/>
<method name="turnLeft"/>
void CarInterfaceAdaptor::accelerate()
{
- // handle method call com.trolltech.Examples.CarInterface.accelerate
+ // handle method call org.example.Examples.CarInterface.accelerate
QMetaObject::invokeMethod(parent(), "accelerate");
}
void CarInterfaceAdaptor::decelerate()
{
- // handle method call com.trolltech.Examples.CarInterface.decelerate
+ // handle method call org.example.Examples.CarInterface.decelerate
QMetaObject::invokeMethod(parent(), "decelerate");
}
void CarInterfaceAdaptor::turnLeft()
{
- // handle method call com.trolltech.Examples.CarInterface.turnLeft
+ // handle method call org.example.Examples.CarInterface.turnLeft
QMetaObject::invokeMethod(parent(), "turnLeft");
}
void CarInterfaceAdaptor::turnRight()
{
- // handle method call com.trolltech.Examples.CarInterface.turnRight
+ // handle method call org.example.Examples.CarInterface.turnRight
QMetaObject::invokeMethod(parent(), "turnRight");
}
QT_END_NAMESPACE
/*
- * Adaptor class for interface com.trolltech.Examples.CarInterface
+ * Adaptor class for interface org.example.Examples.CarInterface
*/
class CarInterfaceAdaptor: public QDBusAbstractAdaptor
{
Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface")
+ Q_CLASSINFO("D-Bus Interface", "org.example.Examples.CarInterface")
Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"com.trolltech.Examples.CarInterface\">\n"
+" <interface name=\"org.example.Examples.CarInterface\">\n"
" <method name=\"accelerate\"/>\n"
" <method name=\"decelerate\"/>\n"
" <method name=\"turnLeft\"/>\n"
new CarInterfaceAdaptor(car);
QDBusConnection connection = QDBusConnection::sessionBus();
connection.registerObject("/Car", car);
- connection.registerService("com.trolltech.CarExample");
+ connection.registerService("org.example.CarExample");
return app.exec();
}
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/com/trollech/examples/car">
- <interface name="com.trolltech.Examples.CarInterface">
+ <interface name="org.example.Examples.CarInterface">
<method name="accelerate"/>
<method name="decelerate"/>
<method name="turnLeft"/>
#include <QtDBus/QtDBus>
/*
- * Proxy class for interface com.trolltech.Examples.CarInterface
+ * Proxy class for interface org.example.Examples.CarInterface
*/
class ComTrolltechExamplesCarInterfaceInterface: public QDBusAbstractInterface
{
Q_OBJECT
public:
static inline const char *staticInterfaceName()
- { return "com.trolltech.Examples.CarInterface"; }
+ { return "org.example.Examples.CarInterface"; }
public:
ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
: QWidget(parent)
{
ui.setupUi(this);
- car = new com::trolltech::Examples::CarInterface("com.trolltech.CarExample", "/Car",
+ car = new com::trolltech::Examples::CarInterface("org.example.CarExample", "/Car",
QDBusConnection::sessionBus(), this);
startTimer(1000);
}