All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Patch Description
@ 2010-09-30 17:52 Yang Gu
  2010-09-30 17:52 ` [PATCH v2 1/3] Move def of class ControlWidget to header file Yang Gu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Yang Gu @ 2010-09-30 17:52 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]

This series of patches fix the compilation problem, as well as some memory leak. But the main focus is to enable Qt script so that phonesim GUI can be controlled using JavaScript. In the meantime, D-Bus support is added for the sake of test automation.

Here are several examples:
1. call.js (stands for incoming call and copy it to /tmp/call/)
tabRegistration.gbIncomingCall.leCaller.text = "12345";
tabRegistration.gbIncomingCall.pbIncomingCall.click();

Then we set the path of script and run the script with its name
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.SetPath string:/tmp/call
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run string:call.js

Now we have simulated an incoming call.

2. sms.js (stands for incoming sms and copy it to /tmp/sms/)
tabSMS.gbMessage1.leMessageSender.text = "Yang";
tabSMS.gbMessage1.leSMSClass.text = "1";
tabSMS.gbMessage1.teSMSText.setPlainText("This message is sent automatically from phonesim");
tabSMS.gbMessage1.pbSendSMSMessage.click();

Then we do the similar things as first example:
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.SetPath string:/tmp/sms
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run string:sms.js

Now we have simulated an incoming sms.

3. Get the current path for script
dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.GetPath

4. Make script return some string
The string can be any string, number, bool, date, etc in JavaScript, but it couldn't be a object because of some side effect. Refer "QScriptValue Class Reference" for details.
For example, if you want to know the current incoming number, you may write a script as below:
// number.js
tabRegistration.gbIncomingCall.leCaller.text

After running the script the similar way as above, you may get the number. 

By the way, you may need below file (/etc/dbus-1/system.d/phonesim.conf) so that phonesim can register its service in system bus:
<!-- This configuration file specifies the required security policies
     for oFono core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.phonesim"/>
    <allow send_destination="org.phonesim"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.phonesim"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.phonesim"/>
  </policy>

</busconfig>



Comments are welcome!

------------
Yang Gu (3):
  Move def of class ControlWidget to header file
  Some instances in ControlWidget need to be deleted
  Enable Qt Script

 Makefile.am     |    5 +-
 configure.ac    |    2 +-
 src/control.cpp |  165 ++++++++++++++++++++++++++++++++-----------------------
 src/control.h   |  106 +++++++++++++++++++++++++++++++++++-
 4 files changed, 203 insertions(+), 75 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/3] Move def of class ControlWidget to header file
  2010-09-30 17:52 [PATCH v2 0/3] Patch Description Yang Gu
@ 2010-09-30 17:52 ` Yang Gu
  2010-09-30 17:52 ` [PATCH v2 2/3] Some instances in ControlWidget need to be deleted Yang Gu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Yang Gu @ 2010-09-30 17:52 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 5381 bytes --]

Currently any modification on control.cpp will result in some unrelated
obj to be regenerated, because the definition of class ControlWidget is
in this .cpp file. This patch wants to fix this problem.
---
 Makefile.am     |    5 +---
 src/control.cpp |   69 ------------------------------------------------------
 src/control.h   |   70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 70 insertions(+), 74 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 34198a5..f124b08 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,15 +53,12 @@ MAINTAINERCLEANFILES = Makefile.in \
 	aclocal.m4 configure depcomp missing install-sh
 
 
-$(src_phonesim_OBJECTS): src/control.moc src/ui_controlbase.h
+$(src_phonesim_OBJECTS): src/ui_controlbase.h
 
 QT_V_MOC   = $(QT_V_MOC_$(V))
 QT_V_MOC_  = $(QT_V_MOC_$(AM_DEFAULT_VERBOSITY))
 QT_V_MOC_0 = @echo "  MOC   " $@;
 
-src/control.moc: src/control.cpp
-	$(QT_V_MOC)$(MOC) $(QT_CFLAGS) $(INCLUDES) $< -o $@
-
 src/moc_%.cpp: src/%.h
 	$(QT_V_MOC)$(MOC) $< -o $@
 
diff --git a/src/control.cpp b/src/control.cpp
index 34a228f..458ee43 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -18,7 +18,6 @@
 ****************************************************************************/
 
 #include "control.h"
-#include "ui_controlbase.h"
 #include <qpushbutton.h>
 #include <qslider.h>
 #include <qcheckbox.h>
@@ -33,7 +32,6 @@
 #include <QFile>
 #include <QDir>
 #include <QtGui/QHeaderView>
-#include "attranslator.h"
 
 #define TWO_BYTE_MAX 65535
 #define FOUR_CHAR 4
@@ -41,73 +39,6 @@
 #define EIGHT_CHAR 8
 #define HEX_BASE 16
 
-class ControlWidget : public QWidget
-{
-Q_OBJECT
-public:
-    ControlWidget( const QString&, Control*);
-
-    void handleFromData( const QString& );
-    void handleToData( const QString& );
-    void handleNewApp();
-
-private slots:
-    void sendSQ();
-    void sendBC();
-    void chargingChanged(int state);
-    void sendOPS();
-    void sendREG();
-    void sendCBM();
-    void sendSMSMessage();
-    void sendMGD();
-    void selectFile();
-    void sendSMSDatagram();
-    void sendCall();
-    void atChanged();
-    void resetTranslator();
-    void addVoicemail();
-    void delVoicemail();
-    void sendVMNotify( int type = 0 );
-    void sendEVMNotify();
-    void sendUSSD();
-    void cancelUSSD();
-    void simInsertRemove();
-    void simAppStart();
-    void simAppAbort();
-
-signals:
-    void unsolicitedCommand(const QString &);
-    void command(const QString &);
-    void variableChanged(const QString &, const QString &);
-    void switchTo(const QString &);
-    void startIncomingCall(const QString &);
-
-protected:
-    void closeEvent(QCloseEvent *event);
-
-private:
-    Ui_ControlBase *ui;
-    Control *p;
-    AtTranslator *translator;
-
-    class VoicemailItem {
-    public:
-        VoicemailItem( const QString &sender, bool urgent );
-
-        QTableWidgetItem sender;
-        QTableWidgetItem priority;
-        QTableWidgetItem pending;
-
-        bool notifyReceived;
-        bool notifyDeleted;
-        int id;
-
-        static int nextId;
-    };
-    QList<VoicemailItem> mailbox;
-};
-#include "control.moc"
-
 ControlWidget::ControlWidget(const QString &ruleFile, Control *parent)
     : QWidget(), p(parent)
 {
diff --git a/src/control.h b/src/control.h
index 32db57e..3577e8d 100644
--- a/src/control.h
+++ b/src/control.h
@@ -21,8 +21,76 @@
 #define CONTROL_H
 
 #include <hardwaremanipulator.h>
+#include "ui_controlbase.h"
+#include "attranslator.h"
 
-class ControlWidget;
+class Control;
+
+class ControlWidget : public QWidget
+{
+Q_OBJECT
+public:
+    ControlWidget( const QString&, Control*);
+
+    void handleFromData( const QString& );
+    void handleToData( const QString& );
+    void handleNewApp();
+
+private slots:
+    void sendSQ();
+    void sendBC();
+    void chargingChanged(int state);
+    void sendOPS();
+    void sendREG();
+    void sendCBM();
+    void sendSMSMessage();
+    void sendMGD();
+    void selectFile();
+    void sendSMSDatagram();
+    void sendCall();
+    void atChanged();
+    void resetTranslator();
+    void addVoicemail();
+    void delVoicemail();
+    void sendVMNotify( int type = 0 );
+    void sendEVMNotify();
+    void sendUSSD();
+    void cancelUSSD();
+    void simInsertRemove();
+    void simAppStart();
+    void simAppAbort();
+
+signals:
+    void unsolicitedCommand(const QString &);
+    void command(const QString &);
+    void variableChanged(const QString &, const QString &);
+    void switchTo(const QString &);
+    void startIncomingCall(const QString &);
+
+protected:
+    void closeEvent(QCloseEvent *event);
+
+private:
+    Ui_ControlBase *ui;
+    Control *p;
+    AtTranslator *translator;
+
+    class VoicemailItem {
+    public:
+        VoicemailItem( const QString &sender, bool urgent );
+
+        QTableWidgetItem sender;
+        QTableWidgetItem priority;
+        QTableWidgetItem pending;
+
+        bool notifyReceived;
+        bool notifyDeleted;
+        int id;
+
+        static int nextId;
+    };
+    QList<VoicemailItem> mailbox;
+};
 
 class Control: public HardwareManipulator
 {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/3] Some instances in ControlWidget need to be deleted
  2010-09-30 17:52 [PATCH v2 0/3] Patch Description Yang Gu
  2010-09-30 17:52 ` [PATCH v2 1/3] Move def of class ControlWidget to header file Yang Gu
@ 2010-09-30 17:52 ` Yang Gu
  2010-09-30 17:52 ` [PATCH v2 3/3] Enable Qt Script Yang Gu
  2010-10-13 20:19 ` [PATCH v2 0/3] Patch Description Denis Kenzior
  3 siblings, 0 replies; 7+ messages in thread
From: Yang Gu @ 2010-09-30 17:52 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

---
 src/control.cpp |    6 ++++++
 src/control.h   |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/control.cpp b/src/control.cpp
index 458ee43..9e2c1f0 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -89,6 +89,12 @@ void ControlWidget::closeEvent(QCloseEvent *event)
     hide();
 }
 
+ControlWidget::~ControlWidget()
+{
+    delete ui;
+    delete translator;
+}
+
 Control::Control(const QString& ruleFile, SimRules *sr, QObject *parent)
         : HardwareManipulator(sr, parent),
         widget(new ControlWidget(ruleFile, this))
diff --git a/src/control.h b/src/control.h
index 3577e8d..95536dc 100644
--- a/src/control.h
+++ b/src/control.h
@@ -31,6 +31,7 @@ class ControlWidget : public QWidget
 Q_OBJECT
 public:
     ControlWidget( const QString&, Control*);
+    ~ControlWidget();
 
     void handleFromData( const QString& );
     void handleToData( const QString& );
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/3] Enable Qt Script
  2010-09-30 17:52 [PATCH v2 0/3] Patch Description Yang Gu
  2010-09-30 17:52 ` [PATCH v2 1/3] Move def of class ControlWidget to header file Yang Gu
  2010-09-30 17:52 ` [PATCH v2 2/3] Some instances in ControlWidget need to be deleted Yang Gu
@ 2010-09-30 17:52 ` Yang Gu
  2010-10-13 20:19 ` [PATCH v2 0/3] Patch Description Denis Kenzior
  3 siblings, 0 replies; 7+ messages in thread
From: Yang Gu @ 2010-09-30 17:52 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 6253 bytes --]

This patch is to enable Qt script so that GUI can be controlled using
JavaScript. In the meantime, D-Bus support is added for the sake of test
automation.
---
 configure.ac    |    2 +-
 src/control.cpp |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/control.h   |   35 +++++++++++++++++++++
 3 files changed, 126 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4d10494..d5d674e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
 	fi
 ])
 
-PKG_CHECK_MODULES(QT, QtCore QtGui QtXml QtNetwork, dummy=yes,
+PKG_CHECK_MODULES(QT, QtCore QtGui QtXml QtNetwork  QtScript, dummy=yes,
 						AC_MSG_ERROR(Qt is required))
 AC_SUBST(QT_CFLAGS)
 AC_SUBST(QT_LIBS)
diff --git a/src/control.cpp b/src/control.cpp
index 9e2c1f0..c01705b 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -51,6 +51,15 @@ ControlWidget::ControlWidget(const QString &ruleFile, Control *parent)
     ui = new Ui_ControlBase;
     ui->setupUi(this);
 
+    script = new Script(this, ui);
+
+    if (!QDBusConnection::systemBus().registerService("org.phonesim")) {
+        qWarning() << QDBusConnection::systemBus().lastError().message();
+        exit(-1);
+    }
+
+    QDBusConnection::systemBus().registerObject("/", script, QDBusConnection::ExportAllSlots);
+
     connect(ui->hsSignalQuality, SIGNAL(valueChanged(int)), this, SLOT(sendSQ()));
     connect(ui->hsBatteryCharge, SIGNAL(valueChanged(int)), this, SLOT(sendBC()));
     connect(ui->hsBatteryCharging, SIGNAL(stateChanged(int)), this, SLOT(chargingChanged(int)));
@@ -91,6 +100,7 @@ void ControlWidget::closeEvent(QCloseEvent *event)
 
 ControlWidget::~ControlWidget()
 {
+    delete script;
     delete ui;
     delete translator;
 }
@@ -445,3 +455,83 @@ void ControlWidget::simAppAbort()
 {
     p->simAppAbort();
 }
+
+Script::Script(QObject *obj, Ui_ControlBase *ui) : QDBusAbstractAdaptor(obj)
+{
+    /* Export tabs to be accessed by script */
+    QScriptValue qsTab = engine.newQObject(ui->tab);
+    engine.globalObject().setProperty("tabRegistration", qsTab);
+
+    QScriptValue qsTab2 = engine.newQObject(ui->tab_2);
+    engine.globalObject().setProperty("tabCBM", qsTab2);
+
+    QScriptValue qsTab3 = engine.newQObject(ui->tab_3);
+    engine.globalObject().setProperty("tabSMS", qsTab3);
+
+    QScriptValue qsTab4 = engine.newQObject(ui->tab_4);
+    engine.globalObject().setProperty("tabVoiceMail", qsTab4);
+
+    QScriptValue qsTab5 = engine.newQObject(ui->tab_5);
+    engine.globalObject().setProperty("tabUSSD", qsTab5);
+
+    QScriptValue qsTab6 = engine.newQObject(ui->tab_6);
+    engine.globalObject().setProperty("tabSIM", qsTab6);
+}
+
+void Script::SetPath(const QString &path, const QDBusMessage &msg)
+{
+    QDir dir(path);
+    if (!dir.exists()) {
+        QDBusMessage reply = msg.createErrorReply("org.phonesim.Error.PathNotFound", "Path doesn't exist");
+        QDBusConnection::systemBus().send(reply);
+        return;
+    }
+
+    dirPath = path;
+}
+
+QString Script::GetPath()
+{
+    return dirPath;
+}
+
+QString Script::Run(const QString &name, const QDBusMessage &msg)
+{
+    QString fileName;
+
+    if (dirPath.endsWith('/'))
+        fileName = dirPath + name;
+    else
+        fileName = dirPath + "/" + name;
+
+    QFile scriptFile(fileName);
+
+    if (!scriptFile.open(QIODevice::ReadOnly)) {
+        QDBusMessage reply = msg.createErrorReply("org.phonesim.Error.FileNotFound", "Script file doesn't exist");
+        QDBusConnection::systemBus().send(reply);
+        return QString();
+    }
+
+    QTextStream stream(&scriptFile);
+    stream.setCodec("UTF-8");
+    QString contents = stream.readAll();
+    scriptFile.close();
+
+    QScriptValue qsScript = engine.evaluate(contents);
+    if (qsScript.isError()) {
+        QString info = fileName + ", line " + qsScript.property("lineNumber").toString() + ", " + qsScript.toString();
+        QDBusMessage reply = msg.createErrorReply("org.phonesim.Error.ScriptExecError", info);
+        QDBusConnection::systemBus().send(reply);
+        return QString();
+    }
+
+    /*
+     * If this QScriptValue is an object, calling this function has side effects on the script engine,
+     * since the engine will call the object's toString() function (and possibly valueOf()) in an attempt
+     * to convert the object to a primitive value (possibly resulting in an uncaught script exception).
+     */
+    if (qsScript.isObject() || qsScript.isUndefined())
+        return QString();
+
+    return qsScript.toString();
+}
diff --git a/src/control.h b/src/control.h
index 95536dc..e455437 100644
--- a/src/control.h
+++ b/src/control.h
@@ -21,11 +21,45 @@
 #define CONTROL_H
 
 #include <hardwaremanipulator.h>
+#include <QtDBus/QtDBus>
+#include <QtScript>
 #include "ui_controlbase.h"
 #include "attranslator.h"
 
 class Control;
 
+class Script: public QDBusAbstractAdaptor
+{
+Q_OBJECT
+    Q_CLASSINFO("D-Bus Interface", "org.phonesim.Script")
+    Q_CLASSINFO("D-Bus Introspection", ""
+"  <interface name=\"org.phonesim.Script\">\n"
+"    <method name=\"SetPath\">\n"
+"      <arg direction=\"in\" type=\"s\" name=\"path\"/>\n"
+"    </method>\n"
+"    <method name=\"GetPath\">\n"
+"      <arg direction=\"out\" type=\"s\" name=\"path\"/>\n"
+"    </method>\n"
+"    <method name=\"Run\">\n"
+"      <arg direction=\"in\" type=\"s\" name=\"name\"/>\n"
+"      <arg direction=\"out\" type=\"s\" name=\"result\"/>\n"
+"    </method>\n"
+"  </interface>\n"
+        "")
+
+public:
+    Script(QObject *obj, Ui_ControlBase *ui);
+
+public slots:
+    void SetPath(const QString &path, const QDBusMessage &msg);
+    QString GetPath();
+    QString Run(const QString &name, const QDBusMessage &msg);
+
+private:
+    QString dirPath;
+    QScriptEngine engine;
+};
+
 class ControlWidget : public QWidget
 {
 Q_OBJECT
@@ -73,6 +107,7 @@ protected:
 
 private:
     Ui_ControlBase *ui;
+    Script *script;
     Control *p;
     AtTranslator *translator;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/3] Patch Description
  2010-09-30 17:52 [PATCH v2 0/3] Patch Description Yang Gu
                   ` (2 preceding siblings ...)
  2010-09-30 17:52 ` [PATCH v2 3/3] Enable Qt Script Yang Gu
@ 2010-10-13 20:19 ` Denis Kenzior
  2010-10-14 11:17   ` Gu, Yang
  3 siblings, 1 reply; 7+ messages in thread
From: Denis Kenzior @ 2010-10-13 20:19 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3510 bytes --]

Hi Yang,

On 09/30/2010 12:52 PM, Yang Gu wrote:
> This series of patches fix the compilation problem, as well as some memory leak. But the main focus is to enable Qt script so that phonesim GUI can be controlled using JavaScript. In the meantime, D-Bus support is added for the sake of test automation.
> 
> Here are several examples:
> 1. call.js (stands for incoming call and copy it to /tmp/call/)
> tabRegistration.gbIncomingCall.leCaller.text = "12345";
> tabRegistration.gbIncomingCall.pbIncomingCall.click();

So this is a great idea and all the patches have been pushed.  I've done
a couple of quick modifications afterward.  More info below.

> 
> Then we set the path of script and run the script with its name
> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.SetPath string:/tmp/call
> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run string:call.js
> 
> Now we have simulated an incoming call.
> 
> 2. sms.js (stands for incoming sms and copy it to /tmp/sms/)
> tabSMS.gbMessage1.leMessageSender.text = "Yang";
> tabSMS.gbMessage1.leSMSClass.text = "1";
> tabSMS.gbMessage1.teSMSText.setPlainText("This message is sent automatically from phonesim");
> tabSMS.gbMessage1.pbSendSMSMessage.click();
> 
> Then we do the similar things as first example:
> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.SetPath string:/tmp/sms
> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run string:sms.js
> 
> Now we have simulated an incoming sms.
> 
> 3. Get the current path for script
> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.GetPath
> 
> 4. Make script return some string
> The string can be any string, number, bool, date, etc in JavaScript, but it couldn't be a object because of some side effect. Refer "QScriptValue Class Reference" for details.
> For example, if you want to know the current incoming number, you may write a script as below:
> // number.js
> tabRegistration.gbIncomingCall.leCaller.text
> 
> After running the script the similar way as above, you may get the number. 

This is really valuable information.  Can you submit a patch that adds a
quick document describing this functionality? Alternatively, adding a
new section to the HACKING file might be an option as well.

> 
> By the way, you may need below file (/etc/dbus-1/system.d/phonesim.conf) so that phonesim can register its service in system bus:
> <!-- This configuration file specifies the required security policies
>      for oFono core daemon to work. -->
> 
> <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
>  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
> <busconfig>
> 
>   <!-- ../system.conf have denied everything, so we just punch some holes -->
> 
>   <policy user="root">
>     <allow own="org.phonesim"/>
>     <allow send_destination="org.phonesim"/>
>   </policy>
> 
>   <policy at_console="true">
>     <allow send_destination="org.phonesim"/>
>   </policy>
> 
>   <policy context="default">
>     <deny send_destination="org.phonesim"/>
>   </policy>
> 
> </busconfig>
> 
> 

One of the changes I made was to have phonesim register to the system
bus.  This makes the above DBus configuration file unnecessary.  Running
phonesim on the system bus was too much of a security risk, and wasn't
really needed.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v2 0/3] Patch Description
  2010-10-13 20:19 ` [PATCH v2 0/3] Patch Description Denis Kenzior
@ 2010-10-14 11:17   ` Gu, Yang
  2010-10-14 11:23     ` Denis Kenzior
  0 siblings, 1 reply; 7+ messages in thread
From: Gu, Yang @ 2010-10-14 11:17 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

Hi Denis,


>> Then we set the path of script and run the script with its name
>> dbus-send --system --print-reply --dest=org.phonesim /
>org.phonesim.Script.SetPath string:/tmp/call
>> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run
>string:call.js
>>
>
>One of the changes I made was to have phonesim register to the system
>bus.  This makes the above DBus configuration file unnecessary.  Running
>phonesim on the system bus was too much of a security risk, and wasn't
>really needed.
>

Thanks for the modifications afterward, and I'm fine with most of them. One question is why you renamed the service name to "org.ofono.phonesim". I wonder why the phonesim should have relationship with ofono?


Regards,
-Yang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/3] Patch Description
  2010-10-14 11:17   ` Gu, Yang
@ 2010-10-14 11:23     ` Denis Kenzior
  0 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2010-10-14 11:23 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

Hi Yang,

On 10/14/2010 06:17 AM, Gu, Yang wrote:
> Hi Denis,
> 
> 
>>> Then we set the path of script and run the script with its name
>>> dbus-send --system --print-reply --dest=org.phonesim /
>> org.phonesim.Script.SetPath string:/tmp/call
>>> dbus-send --system --print-reply --dest=org.phonesim / org.phonesim.Script.Run
>> string:call.js
>>>
>>
>> One of the changes I made was to have phonesim register to the system
>> bus.  This makes the above DBus configuration file unnecessary.  Running
>> phonesim on the system bus was too much of a security risk, and wasn't
>> really needed.
>>
> 
> Thanks for the modifications afterward, and I'm fine with most of them. One question is why you renamed the service name to "org.ofono.phonesim". I wonder why the phonesim should have relationship with ofono?

In theory the service name should be related to the project website /
domain name.  Since we do not own org.phonesim, we put it on the
org.ofono prefix.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-14 11:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30 17:52 [PATCH v2 0/3] Patch Description Yang Gu
2010-09-30 17:52 ` [PATCH v2 1/3] Move def of class ControlWidget to header file Yang Gu
2010-09-30 17:52 ` [PATCH v2 2/3] Some instances in ControlWidget need to be deleted Yang Gu
2010-09-30 17:52 ` [PATCH v2 3/3] Enable Qt Script Yang Gu
2010-10-13 20:19 ` [PATCH v2 0/3] Patch Description Denis Kenzior
2010-10-14 11:17   ` Gu, Yang
2010-10-14 11:23     ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.