File: list-allowed-access-points

package info (click to toggle)
ofono 2.18-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,064 kB
  • sloc: ansic: 224,979; sh: 5,012; python: 4,040; makefile: 956
file content (25 lines) | stat: -rwxr-xr-x 563 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/python3

import dbus

bus = dbus.SystemBus()

manager = dbus.Interface(bus.get_object('org.ofono', '/'),
						'org.ofono.Manager')

modems = manager.GetModems()

for path, properties in modems:
	if "org.ofono.AllowedAccessPoints" not in properties["Interfaces"]:
		continue

	allowedAccessPoints = dbus.Interface(bus.get_object('org.ofono',
					path), 'org.ofono.AllowedAccessPoints')

	apns = allowedAccessPoints.GetAllowedAccessPoints()

	print("Allowed Access Points for [ %s ]" % (path))
	for apn in apns:
		print("    [ %s]" % (apn))

print("")