Use org.example instead of com.trolltech for the D-Bus examples
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 20 Apr 2012 12:31:12 +0000 (14:31 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sun, 22 Apr 2012 19:32:33 +0000 (21:32 +0200)
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>
18 files changed:
examples/dbus/complexpingpong/complexping.cpp
examples/dbus/complexpingpong/complexpong.h
examples/dbus/complexpingpong/ping-common.h
examples/dbus/dbus-chat/chat.cpp
examples/dbus/dbus-chat/chat_adaptor.cpp
examples/dbus/dbus-chat/chat_adaptor.h
examples/dbus/dbus-chat/chat_interface.cpp
examples/dbus/dbus-chat/chat_interface.h
examples/dbus/dbus-chat/com.trolltech.chat.xml
examples/dbus/dbus-chat/dbus-chat.pro
examples/dbus/pingpong/ping-common.h
examples/dbus/remotecontrolledcar/car/car.xml
examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
examples/dbus/remotecontrolledcar/car/car_adaptor.h
examples/dbus/remotecontrolledcar/car/main.cpp
examples/dbus/remotecontrolledcar/controller/car.xml
examples/dbus/remotecontrolledcar/controller/car_interface.h
examples/dbus/remotecontrolledcar/controller/controller.cpp

index aa39290..97bc5e6 100644 (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",
index e458f9e..94a3083 100644 (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;
index 987c8b6..0cde673 100644 (file)
@@ -38,4 +38,4 @@
 **
 ****************************************************************************/
 
-#define SERVICE_NAME            "com.trolltech.QtDBus.PingExample"
+#define SERVICE_NAME            "org.example.QtDBus.PingExample"
index f5d834f..beeccb0 100644 (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());
index e088dff..c3a5600 100644 (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).
 **
index e682665..2cb5767 100644 (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"
index 8c35e53..eb2258d 100644 (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).
 **
index 3ef00df..ee01a79 100644 (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).
 **
 #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);
index 618c8c4..acb6dc1 100644 (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"/>
index 29b1f56..2dc17fe 100644 (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
index 987c8b6..0cde673 100644 (file)
@@ -38,4 +38,4 @@
 **
 ****************************************************************************/
 
-#define SERVICE_NAME            "com.trolltech.QtDBus.PingExample"
+#define SERVICE_NAME            "org.example.QtDBus.PingExample"
index 641c698..6d8c9d1 100644 (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"/>
index c7e6282..e70b5bc 100644 (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");
 }
 
index 3c2c1dd..c7542ae 100644 (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"
index 99dccba..7bb4aa1 100644 (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();
 }
index 641c698..6d8c9d1 100644 (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"/>
index fadd127..8d624b3 100644 (file)
 #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);
index 77a6883..fb829da 100644 (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);
 }