All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test: add disable-call-forwarding
@ 2011-01-10 12:06 Jarko Poutiainen
  2011-01-11 15:08 ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: Jarko Poutiainen @ 2011-01-10 12:06 UTC (permalink / raw)
  To: ofono

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

---
 Makefile.am                  |    3 +-
 test/disable-call-forwarding |   55 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletions(-)
 create mode 100755 test/disable-call-forwarding

diff --git a/Makefile.am b/Makefile.am
index 8ad01cd..7908467 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -440,7 +440,8 @@ test_scripts = test/backtrace \
 		test/set-tty \
 		test/set-gsm-band \
 		test/set-umts-band \
-		test/lockdown-modem
+		test/lockdown-modem \
+		test/disable-call-forwarding
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
new file mode 100755
index 0000000..3c51d06
--- /dev/null
+++ b/test/disable-call-forwarding
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+import sys
+import gobject
+
+import dbus
+import dbus.mainloop.glib
+
+def property_changed(property, value):
+
+	if len(value.__str__()) > 0:
+		print "CallForwarding property %s changed to %s" % (property, value)
+	else:
+		print "CallForwarding property %s changed to disabled" % (property)
+
+	if canexit:
+		mainloop.quit();
+
+if __name__ == "__main__":
+
+	if len(sys.argv) < 2:
+		print "Usage: %s <type>" % (sys.argv[0])
+		print "Type can be: all, conditional"
+		sys.exit(1)
+
+	canexit = False
+
+	type = sys.argv[1]
+
+	dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+	bus = dbus.SystemBus()
+
+	manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+							'org.ofono.Manager')
+
+	modems = manager.GetModems()
+
+	cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
+				'org.ofono.CallForwarding')
+
+	cf.connect_to_signal("PropertyChanged", property_changed)
+
+	try:
+		cf.DisableAll(type, timeout = 100)
+	except dbus.DBusException, e:
+		print "Unable to DisableAll", e
+		sys.exit(1);
+
+	print "DisableAll successful"
+
+	canexit = True
+
+	mainloop = gobject.MainLoop()
+	mainloop.run()
-- 
1.7.0.4


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

* Re: [PATCH] test: add disable-call-forwarding
  2011-01-10 12:06 [PATCH] test: add disable-call-forwarding Jarko Poutiainen
@ 2011-01-11 15:08 ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2011-01-11 15:08 UTC (permalink / raw)
  To: ofono

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

Hi Jarko,

On 01/10/2011 06:06 AM, Jarko Poutiainen wrote:
> ---
>  Makefile.am                  |    3 +-
>  test/disable-call-forwarding |   55 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 57 insertions(+), 1 deletions(-)
>  create mode 100755 test/disable-call-forwarding
> 
> diff --git a/Makefile.am b/Makefile.am
> index 8ad01cd..7908467 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -440,7 +440,8 @@ test_scripts = test/backtrace \
>  		test/set-tty \
>  		test/set-gsm-band \
>  		test/set-umts-band \
> -		test/lockdown-modem
> +		test/lockdown-modem \
> +		test/disable-call-forwarding
>  
>  if TEST
>  testdir = $(pkglibdir)/test
> diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
> new file mode 100755
> index 0000000..3c51d06
> --- /dev/null
> +++ b/test/disable-call-forwarding
> @@ -0,0 +1,55 @@
> +#!/usr/bin/python
> +
> +import sys
> +import gobject
> +
> +import dbus
> +import dbus.mainloop.glib
> +
> +def property_changed(property, value):
> +

Please remove this empty line.

> +	if len(value.__str__()) > 0:
> +		print "CallForwarding property %s changed to %s" % (property, value)
> +	else:
> +		print "CallForwarding property %s changed to disabled" % (property)
> +

Please don't go over 80 characters / line here

> +	if canexit:
> +		mainloop.quit();
> +
> +if __name__ == "__main__":
> +

Please remove this empty line.

> +	if len(sys.argv) < 2:
> +		print "Usage: %s <type>" % (sys.argv[0])
> +		print "Type can be: all, conditional"
> +		sys.exit(1)
> +
> +	canexit = False
> +
> +	type = sys.argv[1]
> +
> +	dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
> +
> +	bus = dbus.SystemBus()
> +
> +	manager = dbus.Interface(bus.get_object('org.ofono', '/'),
> +							'org.ofono.Manager')
> +
> +	modems = manager.GetModems()
> +
> +	cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
> +				'org.ofono.CallForwarding')
> +
> +	cf.connect_to_signal("PropertyChanged", property_changed)
> +
> +	try:
> +		cf.DisableAll(type, timeout = 100)
> +	except dbus.DBusException, e:
> +		print "Unable to DisableAll", e
> +		sys.exit(1);
> +
> +	print "DisableAll successful"
> +
> +	canexit = True
> +
> +	mainloop = gobject.MainLoop()
> +	mainloop.run()

Regards,
-Denis

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

* [PATCH] test: add disable-call-forwarding
@ 2011-01-12  9:42 Jarko Poutiainen
  2011-01-12 16:18 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Jarko Poutiainen @ 2011-01-12  9:42 UTC (permalink / raw)
  To: ofono

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

---
 Makefile.am                  |    3 +-
 test/disable-call-forwarding |   53 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)
 create mode 100755 test/disable-call-forwarding

diff --git a/Makefile.am b/Makefile.am
index 4dec90a..2df0fbd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -449,7 +449,8 @@ test_scripts = test/backtrace \
 		test/set-tty \
 		test/set-gsm-band \
 		test/set-umts-band \
-		test/lockdown-modem
+		test/lockdown-modem \
+		test/disable-call-forwarding
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
new file mode 100755
index 0000000..ca0ba90
--- /dev/null
+++ b/test/disable-call-forwarding
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+import sys
+import gobject
+
+import dbus
+import dbus.mainloop.glib
+
+def property_changed(property, value):
+	if len(value.__str__()) > 0:
+		print "CF property %s changed to %s" % (property, value)
+	else:
+		print "CF property %s changed to disabled" % (property)
+
+	if canexit:
+		mainloop.quit();
+
+if __name__ == "__main__":
+	if len(sys.argv) < 2:
+		print "Usage: %s <type>" % (sys.argv[0])
+		print "Type can be: all, conditional"
+		sys.exit(1)
+
+	canexit = False
+
+	type = sys.argv[1]
+
+	dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+	bus = dbus.SystemBus()
+
+	manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+							'org.ofono.Manager')
+
+	modems = manager.GetModems()
+
+	cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
+				'org.ofono.CallForwarding')
+
+	cf.connect_to_signal("PropertyChanged", property_changed)
+
+	try:
+		cf.DisableAll(type, timeout = 100)
+	except dbus.DBusException, e:
+		print "Unable to DisableAll", e
+		sys.exit(1);
+
+	print "DisableAll successful"
+
+	canexit = True
+
+	mainloop = gobject.MainLoop()
+	mainloop.run()
-- 
1.7.0.4


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

* Re: [PATCH] test: add disable-call-forwarding
  2011-01-12  9:42 Jarko Poutiainen
@ 2011-01-12 16:18 ` Marcel Holtmann
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2011-01-12 16:18 UTC (permalink / raw)
  To: ofono

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

Hi Jarko,

>  Makefile.am                  |    3 +-
>  test/disable-call-forwarding |   53 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 55 insertions(+), 1 deletions(-)
>  create mode 100755 test/disable-call-forwarding

Applying: test: add disable-call-forwarding
error: patch failed: Makefile.am:449
error: Makefile.am: patch does not apply
Patch failed at 0001 test: add disable-call-forwarding

> diff --git a/Makefile.am b/Makefile.am
> index 4dec90a..2df0fbd 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -449,7 +449,8 @@ test_scripts = test/backtrace \
>  		test/set-tty \
>  		test/set-gsm-band \
>  		test/set-umts-band \
> -		test/lockdown-modem
> +		test/lockdown-modem \
> +		test/disable-call-forwarding

The error message is not surprising actually. You need to send patches
that depend on each other to applied one before the other one as
sequence of patches. This one is conflicting with your previous one ;)

Regards

Marcel



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

* [PATCH] test: add disable-call-forwarding
@ 2011-01-14  8:24 Jarko Poutiainen
  2011-01-14 10:31 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Jarko Poutiainen @ 2011-01-14  8:24 UTC (permalink / raw)
  To: ofono

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

---
 Makefile.am                  |    3 +-
 test/disable-call-forwarding |   53 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)
 create mode 100755 test/disable-call-forwarding

diff --git a/Makefile.am b/Makefile.am
index 7dcf7a9..ce4799e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -464,7 +464,8 @@ test_scripts = test/backtrace \
 		test/set-call-forwarding \
 		test/cdma-list-call \
 		test/cdma-dial-number \
-		test/cdma-hangup
+		test/cdma-hangup \
+		test/disable-call-forwarding
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
new file mode 100755
index 0000000..ca0ba90
--- /dev/null
+++ b/test/disable-call-forwarding
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+import sys
+import gobject
+
+import dbus
+import dbus.mainloop.glib
+
+def property_changed(property, value):
+	if len(value.__str__()) > 0:
+		print "CF property %s changed to %s" % (property, value)
+	else:
+		print "CF property %s changed to disabled" % (property)
+
+	if canexit:
+		mainloop.quit();
+
+if __name__ == "__main__":
+	if len(sys.argv) < 2:
+		print "Usage: %s <type>" % (sys.argv[0])
+		print "Type can be: all, conditional"
+		sys.exit(1)
+
+	canexit = False
+
+	type = sys.argv[1]
+
+	dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+	bus = dbus.SystemBus()
+
+	manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+							'org.ofono.Manager')
+
+	modems = manager.GetModems()
+
+	cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
+				'org.ofono.CallForwarding')
+
+	cf.connect_to_signal("PropertyChanged", property_changed)
+
+	try:
+		cf.DisableAll(type, timeout = 100)
+	except dbus.DBusException, e:
+		print "Unable to DisableAll", e
+		sys.exit(1);
+
+	print "DisableAll successful"
+
+	canexit = True
+
+	mainloop = gobject.MainLoop()
+	mainloop.run()
-- 
1.7.0.4


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

* Re: [PATCH] test: add disable-call-forwarding
  2011-01-14  8:24 Jarko Poutiainen
@ 2011-01-14 10:31 ` Marcel Holtmann
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2011-01-14 10:31 UTC (permalink / raw)
  To: ofono

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

Hi Jarko,

>  Makefile.am                  |    3 +-
>  test/disable-call-forwarding |   53 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 55 insertions(+), 1 deletions(-)
>  create mode 100755 test/disable-call-forwarding

patch has been applied. Thanks.

Regards

Marcel



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

end of thread, other threads:[~2011-01-14 10:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 12:06 [PATCH] test: add disable-call-forwarding Jarko Poutiainen
2011-01-11 15:08 ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2011-01-12  9:42 Jarko Poutiainen
2011-01-12 16:18 ` Marcel Holtmann
2011-01-14  8:24 Jarko Poutiainen
2011-01-14 10:31 ` Marcel Holtmann

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.