summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/activate-context9
-rwxr-xr-xtest/cancel-ussd5
-rwxr-xr-xtest/create-context9
-rwxr-xr-xtest/create-multiparty4
-rwxr-xr-xtest/deactivate-context9
-rwxr-xr-xtest/dial-number4
-rwxr-xr-xtest/disable-modem4
-rwxr-xr-xtest/enable-cbs4
-rwxr-xr-xtest/enable-modem4
-rwxr-xr-xtest/enter-pin8
-rwxr-xr-xtest/get-operators6
-rwxr-xr-xtest/get-tech-preference4
-rwxr-xr-xtest/hangup-all5
-rwxr-xr-xtest/initiate-ussd4
-rwxr-xr-xtest/list-calls9
-rwxr-xr-xtest/list-contexts9
-rwxr-xr-xtest/list-modems11
-rwxr-xr-xtest/list-operators9
-rwxr-xr-xtest/lock-pin8
-rwxr-xr-xtest/monitor-ofono14
-rwxr-xr-xtest/offline-modem4
-rwxr-xr-xtest/online-modem4
-rwxr-xr-xtest/private-chat5
-rwxr-xr-xtest/process-context-settings9
-rwxr-xr-xtest/remove-contexts9
-rwxr-xr-xtest/scan-for-operators6
-rwxr-xr-xtest/send-sms5
-rwxr-xr-xtest/set-cbs-topics8
-rwxr-xr-xtest/set-mic-volume5
-rwxr-xr-xtest/set-speaker-volume5
-rwxr-xr-xtest/set-tech-preference8
-rwxr-xr-xtest/set-use-sms-reports8
-rwxr-xr-xtest/test-advice-of-charge4
-rwxr-xr-xtest/test-call-barring4
-rwxr-xr-xtest/test-call-forwarding7
-rwxr-xr-xtest/test-call-settings4
-rwxr-xr-xtest/test-manager28
-rwxr-xr-xtest/test-modem6
-rwxr-xr-xtest/test-network-registration4
-rwxr-xr-xtest/test-phonebook8
-rwxr-xr-xtest/test-ss-control-cb7
-rwxr-xr-xtest/test-ss-control-cf9
-rwxr-xr-xtest/test-ss-control-cs7
-rwxr-xr-xtest/test-stk-menu9
-rwxr-xr-xtest/test-ussd8
-rwxr-xr-xtest/test-voicecall5
-rwxr-xr-xtest/unlock-pin8
47 files changed, 121 insertions, 212 deletions
diff --git a/test/activate-context b/test/activate-context
index 743ba1fd..0b19b8cb 100755
--- a/test/activate-context
+++ b/test/activate-context
@@ -8,14 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
diff --git a/test/cancel-ussd b/test/cancel-ussd
index 65b0f556..73796228 100755
--- a/test/cancel-ussd
+++ b/test/cancel-ussd
@@ -8,8 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-path = properties["Modems"][0]
+modems = manager.GetModems()
+
+path, properties = modems[0]
ussd = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.SupplementaryServices')
diff --git a/test/create-context b/test/create-context
index 20f2be59..6777ba79 100755
--- a/test/create-context
+++ b/test/create-context
@@ -8,14 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
diff --git a/test/create-multiparty b/test/create-multiparty
index 3332ae8c..79e98a67 100755
--- a/test/create-multiparty
+++ b/test/create-multiparty
@@ -8,9 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
+modems = manager.GetModems()
-path = properties["Modems"][0]
+path, properties = modems[0]
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
diff --git a/test/deactivate-context b/test/deactivate-context
index 7d00761e..04d4bc81 100755
--- a/test/deactivate-context
+++ b/test/deactivate-context
@@ -8,14 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
diff --git a/test/dial-number b/test/dial-number
index 9d74c42e..d66a878f 100755
--- a/test/dial-number
+++ b/test/dial-number
@@ -8,9 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
+modems = manager.GetModems()
-path = properties["Modems"][0]
+path, properties = modems[0]
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
diff --git a/test/disable-modem b/test/disable-modem
index a1611ec9..45ac2a98 100755
--- a/test/disable-modem
+++ b/test/disable-modem
@@ -10,8 +10,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
print "Disconnecting modem %s..." % path
modem = dbus.Interface(bus.get_object('org.ofono', path),
diff --git a/test/enable-cbs b/test/enable-cbs
index 67356a90..9b5b57b1 100755
--- a/test/enable-cbs
+++ b/test/enable-cbs
@@ -10,8 +10,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
print "Enabling cell broadcast on modem %s..." % path
cbs = dbus.Interface(bus.get_object('org.ofono', path),
diff --git a/test/enable-modem b/test/enable-modem
index 02dc1501..44ce64a5 100755
--- a/test/enable-modem
+++ b/test/enable-modem
@@ -10,8 +10,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
print "Connecting modem %s..." % path
modem = dbus.Interface(bus.get_object('org.ofono', path),
diff --git a/test/enter-pin b/test/enter-pin
index 792b6b28..0bfe1120 100755
--- a/test/enter-pin
+++ b/test/enter-pin
@@ -11,9 +11,9 @@ if len(sys.argv) == 4:
pin = sys.argv[3]
elif len(sys.argv) == 3:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
pin_type = sys.argv[1]
pin = sys.argv[2]
else:
@@ -21,6 +21,6 @@ else:
print "Enter Pin for modem %s..." % path
simmanager = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.SimManager')
+ 'org.ofono.SimManager')
simmanager.EnterPin(pin_type, pin)
diff --git a/test/get-operators b/test/get-operators
index 2351db05..f5bac126 100755
--- a/test/get-operators
+++ b/test/get-operators
@@ -10,8 +10,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
netreg = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.NetworkRegistration')
@@ -32,6 +32,6 @@ for entry in operators:
else:
val = str(properties[key])
print " %s = %s" % (key, val)
-
+
print
diff --git a/test/get-tech-preference b/test/get-tech-preference
index d60ddedc..fc655362 100755
--- a/test/get-tech-preference
+++ b/test/get-tech-preference
@@ -9,8 +9,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
radiosettings = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.RadioSettings')
diff --git a/test/hangup-all b/test/hangup-all
index d75a29c6..a8b9db53 100755
--- a/test/hangup-all
+++ b/test/hangup-all
@@ -8,9 +8,8 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-path = properties["Modems"][0]
+modems = manager.GetModems()
+path = modems[0][0]
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
diff --git a/test/initiate-ussd b/test/initiate-ussd
index 198b4277..b6a2d867 100755
--- a/test/initiate-ussd
+++ b/test/initiate-ussd
@@ -12,8 +12,8 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-path = properties["Modems"][0]
+modems = manager.GetModems()
+path = modems[0][0]
ussd = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.SupplementaryServices')
diff --git a/test/list-calls b/test/list-calls
index c6ece9b8..53124dc1 100755
--- a/test/list-calls
+++ b/test/list-calls
@@ -7,14 +7,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
print "[ %s ]" % (path)
if "org.ofono.VoiceCallManager" not in properties["Interfaces"]:
diff --git a/test/list-contexts b/test/list-contexts
index 66a76c5c..68dae6a7 100755
--- a/test/list-contexts
+++ b/test/list-contexts
@@ -7,14 +7,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
print "[ %s ]" % (path)
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
diff --git a/test/list-modems b/test/list-modems
index e1029542..557efd52 100755
--- a/test/list-modems
+++ b/test/list-modems
@@ -7,14 +7,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
print "[ %s ]" % (path)
for key in properties.keys():
@@ -64,5 +59,5 @@ for path in properties["Modems"]:
else:
val = str(properties[key])
print " %s = %s" % (key, val)
-
+
print
diff --git a/test/list-operators b/test/list-operators
index c29ab028..be00c5ba 100755
--- a/test/list-operators
+++ b/test/list-operators
@@ -8,14 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
print "[ %s ]" % (path)
if "org.ofono.NetworkRegistration" not in properties["Interfaces"]:
diff --git a/test/lock-pin b/test/lock-pin
index a0b6e30c..60c3afb1 100755
--- a/test/lock-pin
+++ b/test/lock-pin
@@ -11,9 +11,9 @@ if len(sys.argv) == 4:
pin = sys.argv[3]
elif len(sys.argv) == 3:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
pin_type = sys.argv[1]
pin = sys.argv[2]
else:
@@ -23,5 +23,5 @@ else:
print "Lock %s %s for modem %s..." % (pin_type, pin, path)
simmanager = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.SimManager')
+ 'org.ofono.SimManager')
simmanager.LockPin(pin_type, pin)
diff --git a/test/monitor-ofono b/test/monitor-ofono
index 6e63bc21..e4375b89 100755
--- a/test/monitor-ofono
+++ b/test/monitor-ofono
@@ -94,6 +94,20 @@ if __name__ == '__main__':
bus.add_signal_receiver(added,
bus_name="org.ofono",
+ signal_name = "ModemAdded",
+ member_keyword="member",
+ path_keyword="path",
+ interface_keyword="interface")
+
+ bus.add_signal_receiver(removed,
+ bus_name="org.ofono",
+ signal_name = "ModemRemoved",
+ member_keyword="member",
+ path_keyword="path",
+ interface_keyword="interface")
+
+ bus.add_signal_receiver(added,
+ bus_name="org.ofono",
signal_name = "ContextAdded",
member_keyword="member",
path_keyword="path",
diff --git a/test/offline-modem b/test/offline-modem
index 16325ad2..793e9d47 100755
--- a/test/offline-modem
+++ b/test/offline-modem
@@ -9,8 +9,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
print "Setting modem %s offline..." % path
modem = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.Modem')
diff --git a/test/online-modem b/test/online-modem
index db0b9f59..f37b046f 100755
--- a/test/online-modem
+++ b/test/online-modem
@@ -9,8 +9,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
print "Setting modem %s online..." % path
modem = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.Modem')
diff --git a/test/private-chat b/test/private-chat
index 56d75ab6..4938a255 100755
--- a/test/private-chat
+++ b/test/private-chat
@@ -8,9 +8,8 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-path = properties["Modems"][0]
+modems = manager.GetModems()
+path = modems[0][0]
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
diff --git a/test/process-context-settings b/test/process-context-settings
index 67e679e7..b77d95db 100755
--- a/test/process-context-settings
+++ b/test/process-context-settings
@@ -8,14 +8,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
diff --git a/test/remove-contexts b/test/remove-contexts
index 53999136..a600d0bf 100755
--- a/test/remove-contexts
+++ b/test/remove-contexts
@@ -7,14 +7,9 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+modems = manager.GetModems()
+for path, properties in modems:
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
diff --git a/test/scan-for-operators b/test/scan-for-operators
index 3206f8f0..285f1111 100755
--- a/test/scan-for-operators
+++ b/test/scan-for-operators
@@ -10,8 +10,8 @@ if len(sys.argv) == 2:
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ modems = manager.GetModems()
+ path = modems[0][0]
print "Propose scanning for modem %s..." % path
netreg = dbus.Interface(bus.get_object('org.ofono', path),
@@ -33,6 +33,6 @@ for entry in operators:
else:
val = str(properties[key])
print " %s = %s" % (key, val)
-
+
print
diff --git a/test/send-sms b/test/send-sms
index 229f35f7..2d68a329 100755
--- a/test/send-sms
+++ b/test/send-sms
@@ -8,9 +8,8 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-path = properties["Modems"][0]
+modems = manager.GetModems()
+path = modems[0][0]
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.MessageManager')
diff --git a/test/set-cbs-topics b/test/set-cbs-topics
index ff56e75d..fbf7aa42 100755
--- a/test/set-cbs-topics
+++ b/test/set-cbs-topics
@@ -10,15 +10,15 @@ if len(sys.argv) == 3:
topics = sys.argv[2]
elif len(sys.argv) == 2:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
topics = sys.argv[1]
else:
print "%s [PATH] topics" % (sys.argv[0])
print "Setting cell broadcast topics for modem %s..." % path
cbs = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.CellBroadcast')
+ 'org.ofono.CellBroadcast')
cbs.SetProperty("Topics", topics);
diff --git a/test/set-mic-volume b/test/set-mic-volume
index 16922093..e0bff494 100755
--- a/test/set-mic-volume
+++ b/test/set-mic-volume
@@ -8,9 +8,8 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-path = properties["Modems"][0]
+modems = manager.GetModems()
+path = modems[0][0]
cv = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.CallVolume')
diff --git a/test/set-speaker-volume b/test/set-speaker-volume
index 38571f27..7962f39c 100755
--- a/test/set-speaker-volume
+++ b/test/set-speaker-volume
@@ -8,9 +8,8 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-properties = manager.GetProperties()
-
-path = properties["Modems"][0]
+modems = manager.GetModems()
+path = modems[0][0]
cv = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.CallVolume')
diff --git a/test/set-tech-preference b/test/set-tech-preference
index 9f702d52..cc735ce5 100755
--- a/test/set-tech-preference
+++ b/test/set-tech-preference
@@ -10,15 +10,15 @@ if len(sys.argv) == 3:
tech = sys.argv[2]
elif len(sys.argv) == 2:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
tech = sys.argv[1]
else:
print "%s [PATH] technology" % (sys.argv[0])
print "Setting technology preference for modem %s..." % path
radiosettings = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.RadioSettings')
+ 'org.ofono.RadioSettings')
radiosettings.SetProperty("TechnologyPreference", tech);
diff --git a/test/set-use-sms-reports b/test/set-use-sms-reports
index 14b337de..a9e02d72 100755
--- a/test/set-use-sms-reports
+++ b/test/set-use-sms-reports
@@ -10,9 +10,9 @@ if len(sys.argv) == 3:
enabled = sys.argv[2]
elif len(sys.argv) == 2:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ 'org.ofono.Manager')
+ modems = manager.getmodems()
+ path = modems[0][0]
enabled = sys.argv[1]
else:
print "%s [PATH] topics" % (sys.argv[0])
@@ -20,6 +20,6 @@ else:
print "Setting delivery report use for modem %s..." % path
sms = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.MessageManager')
+ 'org.ofono.MessageManager')
sms.SetProperty("UseDeliveryReports", dbus.Boolean(enabled));
diff --git a/test/test-advice-of-charge b/test/test-advice-of-charge
index 390c8613..d71b7c65 100755
--- a/test/test-advice-of-charge
+++ b/test/test-advice-of-charge
@@ -41,9 +41,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- modems = manager.GetProperties()['Modems']
+ modems = manager.GetModems()
- cm = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cm = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallMeter')
cm.connect_to_signal("PropertyChanged", cm_property_changed)
diff --git a/test/test-call-barring b/test/test-call-barring
index d32da7f9..5385a102 100755
--- a/test/test-call-barring
+++ b/test/test-call-barring
@@ -38,9 +38,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- modems = manager.GetProperties()['Modems']
+ modems = manager.GetModems()
- cb = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cb = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallBarring')
cb.connect_to_signal("PropertyChanged", property_changed)
diff --git a/test/test-call-forwarding b/test/test-call-forwarding
index f4f30a28..85aca230 100755
--- a/test/test-call-forwarding
+++ b/test/test-call-forwarding
@@ -25,12 +25,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- try:
- modems = manager.GetProperties()['Modems']
- except dbus.DBusException, e:
- print "Unable to get the modem list %s" % e
+ modems = manager.GetModems()
- cf = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallForwarding')
cf.connect_to_signal("PropertyChanged", property_changed)
diff --git a/test/test-call-settings b/test/test-call-settings
index 8e5d3d5c..60fe3bae 100755
--- a/test/test-call-settings
+++ b/test/test-call-settings
@@ -30,9 +30,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- modems = manager.GetProperties()['Modems']
+ modems = manager.GetModems()
- cs = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cs = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallSettings')
cs.connect_to_signal("PropertyChanged", property_changed)
diff --git a/test/test-manager b/test/test-manager
deleted file mode 100755
index fb5b91b5..00000000
--- a/test/test-manager
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-import gobject
-
-import dbus
-import dbus.mainloop.glib
-
-def property_changed(property, value):
- print "Manager property %s changed to %s" % (name, value)
-
-if __name__ == "__main__":
- dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-
- bus = dbus.SystemBus()
-
- manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
-
- manager.connect_to_signal("PropertyChanged", property_changed)
-
- try:
- properties = manager.GetProperties()
- print properties['Modems']
- except dbus.DBusException, e:
- print "Unable to call GetProperties %s" % e
-
- mainloop = gobject.MainLoop()
- mainloop.run()
diff --git a/test/test-modem b/test/test-modem
index df69eb1d..5859ae31 100755
--- a/test/test-modem
+++ b/test/test-modem
@@ -16,10 +16,8 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- modems = manager.GetProperties()['Modems']
- print modems
-
- modem = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ modems = manager.GetModems()
+ modem = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.Modem')
modem.connect_to_signal("PropertyChanged", property_changed)
diff --git a/test/test-network-registration b/test/test-network-registration
index 57cc6d6a..a8bd1412 100755
--- a/test/test-network-registration
+++ b/test/test-network-registration
@@ -31,9 +31,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- modems = manager.GetProperties()['Modems']
+ modems = manager.GetModems()
- netreg = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ netreg = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.NetworkRegistration')
netreg.connect_to_signal("PropertyChanged", network_property_changed)
diff --git a/test/test-phonebook b/test/test-phonebook
index 8db25c15..183394c8 100755
--- a/test/test-phonebook
+++ b/test/test-phonebook
@@ -8,12 +8,8 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- try:
- modems = manager.GetProperties()['Modems']
- except dbus.DBusException, e:
- print "Unable to get the Modems property %s" % e
-
- phonebook = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ modems = manager.GetModems()
+ phonebook = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.Phonebook')
print phonebook.Import(timeout=100)
diff --git a/test/test-ss-control-cb b/test/test-ss-control-cb
index 7b5bc2f0..f855635f 100755
--- a/test/test-ss-control-cb
+++ b/test/test-ss-control-cb
@@ -22,12 +22,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- try:
- modems = manager.GetProperties()['Modems']
- except dbus.DBusException, e:
- print "Unable to get the Modems property %s" % e
+ modems = manager.GetModems()
- cb = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cb = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallBarring')
cb.connect_to_signal("PropertyChanged", property_changed)
diff --git a/test/test-ss-control-cf b/test/test-ss-control-cf
index 72db659b..6391bddd 100755
--- a/test/test-ss-control-cf
+++ b/test/test-ss-control-cf
@@ -27,17 +27,14 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- try:
- modems = manager.GetProperties()['Modems']
- except dbus.DBusException, e:
- print "Unable to get the Modems property %s" % e
+ modems = manager.GetModems()
- cf = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallForwarding')
cf.connect_to_signal("PropertyChanged", property_changed)
- ss = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ ss = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.SupplementaryServices')
# Clear everything
diff --git a/test/test-ss-control-cs b/test/test-ss-control-cs
index c5f45dea..bf597897 100755
--- a/test/test-ss-control-cs
+++ b/test/test-ss-control-cs
@@ -22,12 +22,9 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- try:
- modems = manager.GetProperties()['Modems']
- except dbus.DBusException, e:
- print "Unable to get the Modems property %s" % e
+ modems = manager.GetModems()
- cs = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ cs = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.CallSettings')
cs.connect_to_signal("PropertyChanged", property_changed)
diff --git a/test/test-stk-menu b/test/test-stk-menu
index 74d762d1..916a527a 100755
--- a/test/test-stk-menu
+++ b/test/test-stk-menu
@@ -145,14 +145,9 @@ if __name__ == '__main__':
manager = dbus.Interface(bus.get_object("org.ofono", "/"),
"org.ofono.Manager")
- properties = manager.GetProperties()
-
- for path in properties["Modems"]:
- modem = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.Modem')
-
- properties = modem.GetProperties()
+ modems = manager.GetModems()
+ for path, properties in modems:
if "org.ofono.SimToolkit" not in properties["Interfaces"]:
continue
diff --git a/test/test-ussd b/test/test-ussd
index 3b553d05..6e24de8e 100755
--- a/test/test-ussd
+++ b/test/test-ussd
@@ -30,12 +30,8 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- try:
- modems = manager.GetProperties()['Modems']
- except dbus.DBusException, e:
- print "Unable to get the Modems property %s" % e
-
- ss = dbus.Interface(bus.get_object('org.ofono', modems[0]),
+ modems = manager.GetModems()
+ ss = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
'org.ofono.SupplementaryServices')
props = ss.GetProperties()
diff --git a/test/test-voicecall b/test/test-voicecall
index 2e3ed9ef..3b0d4321 100755
--- a/test/test-voicecall
+++ b/test/test-voicecall
@@ -54,9 +54,8 @@ if __name__ == "__main__":
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
- modems = manager.GetProperties()['Modems']
- modem = modems[0]
- print modems
+ modems = manager.GetModems()
+ modem = modems[0][0]
if (len(sys.argv) == 3):
modem = sys.argv[1]
diff --git a/test/unlock-pin b/test/unlock-pin
index 4a05cd4e..d77841a2 100755
--- a/test/unlock-pin
+++ b/test/unlock-pin
@@ -11,9 +11,9 @@ if len(sys.argv) == 4:
pin = sys.argv[3]
elif len(sys.argv) == 3:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
- 'org.ofono.Manager')
- properties = manager.GetProperties()
- path = properties["Modems"][0]
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
pin_type = sys.argv[1]
pin = sys.argv[2]
else:
@@ -23,5 +23,5 @@ else:
print "Unlock %s %s for modem %s..." % (pin_type, pin, path)
simmanager = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.SimManager')
+ 'org.ofono.SimManager')
simmanager.UnlockPin(pin_type, pin)