To remove all emulators in current modem
---
 test/destroy-emulator |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100755 test/destroy-emulator

diff --git a/test/destroy-emulator b/test/destroy-emulator
new file mode 100755
index 0000000..3b8ecfb
--- /dev/null
+++ b/test/destroy-emulator
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 2:
+       path = sys.argv[1]
+else:
+       manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+                       'org.ofono.Manager')
+       properties = manager.GetProperties()
+       path = properties["Modems"][0]
+
+emulator = dbus.Interface(bus.get_object('org.ofono', path),
+                                               'org.ofono.EmulatorManager')
+
+emulator.DestroyAll()
-- 
1.6.3.3

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to