Use org.example instead of com.trolltech for the D-Bus examples

We could use org.qtproject, but since this is an example anyway, and
since example.org and example.com are reserved to IANA by RFC 2606
anyway, let's use that.

Task-number: QTBUG-23274
Change-Id: Icdb1ac0390f88b72fa21b02ab362f1a98f26266c
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
This commit is contained in:
Thiago Macieira 2012-04-20 14:31:12 +02:00 committed by Qt by Nokia
parent c4a457f8e4
commit 5f22899a17
18 changed files with 31 additions and 31 deletions

View File

@ -60,7 +60,7 @@ void Ping::start(const QString &name, const QString &oldValue, const QString &ne
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",

View File

@ -48,7 +48,7 @@
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;

View File

@ -38,4 +38,4 @@
**
****************************************************************************/
#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
#define SERVICE_NAME "org.example.QtDBus.PingExample"

View File

@ -65,7 +65,7 @@ ChatMainWindow::ChatMainWindow()
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;
@ -115,7 +115,7 @@ void ChatMainWindow::textChangedSlot(const QString &newText)
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());

View File

@ -38,7 +38,7 @@
**
**
** 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).
**

View File

@ -38,7 +38,7 @@
**
**
** 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).
**
@ -64,14 +64,14 @@ class QVariant;
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"

View File

@ -38,7 +38,7 @@
**
**
** 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).
**

View File

@ -38,7 +38,7 @@
**
**
** 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).
**
@ -60,14 +60,14 @@
#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);

View File

@ -1,7 +1,7 @@
<!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"/>

View File

@ -5,8 +5,8 @@ HEADERS += chat.h chat_adaptor.h chat_interface.h
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

View File

@ -38,4 +38,4 @@
**
****************************************************************************/
#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
#define SERVICE_NAME "org.example.QtDBus.PingExample"

View File

@ -1,7 +1,7 @@
<!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"/>

View File

@ -74,25 +74,25 @@ CarInterfaceAdaptor::~CarInterfaceAdaptor()
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");
}

View File

@ -64,14 +64,14 @@ class QVariant;
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"

View File

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
new CarInterfaceAdaptor(car);
QDBusConnection connection = QDBusConnection::sessionBus();
connection.registerObject("/Car", car);
connection.registerService("com.trolltech.CarExample");
connection.registerService("org.example.CarExample");
return app.exec();
}

View File

@ -1,7 +1,7 @@
<!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"/>

View File

@ -60,14 +60,14 @@
#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);

View File

@ -47,7 +47,7 @@ Controller::Controller(QWidget *parent)
: 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);
}