From 88f597d3298a5f1933f117b2b0f73ebb649148a7 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 14 Nov 2012 14:52:25 +0200 Subject: [PATCH] test: Remove test-telephony This API is now gone so there is no reason to keep this around --- Makefile.tools | 12 ++-- test/test-telephony | 166 -------------------------------------------- 2 files changed, 6 insertions(+), 172 deletions(-) delete mode 100755 test/test-telephony diff --git a/Makefile.tools b/Makefile.tools index 856df770f..717d2ad2e 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -200,12 +200,12 @@ endif EXTRA_DIST += test/sap_client.py test/hsplay test/hsmicro \ test/dbusdef.py test/monitor-bluetooth test/list-devices \ test/test-discovery test/test-manager test/test-adapter \ - test/test-device test/test-service test/test-telephony \ - test/test-network test/simple-agent test/simple-service \ - test/simple-endpoint test/test-audio test/test-input \ - test/test-sap-server test/test-oob test/test-attrib \ - test/test-proximity test/test-thermometer test/test-profile \ - test/test-health test/test-health-sink test/service-record.dtd \ + test/test-device test/test-service test/test-network \ + test/simple-agent test/simple-service test/simple-endpoint \ + test/test-audio test/test-input test/test-sap-server \ + test/test-oob test/test-attrib test/test-proximity \ + test/test-thermometer test/test-profile test/test-health \ + test/test-health-sink test/service-record.dtd \ test/service-did.xml test/service-spp.xml test/service-opp.xml \ test/service-ftp.xml test/simple-player test/test-nap \ test/test-heartrate test/test-alert diff --git a/test/test-telephony b/test/test-telephony deleted file mode 100755 index 57ac7f0d2..000000000 --- a/test/test-telephony +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/bin/python - -from __future__ import absolute_import, print_function, unicode_literals - -import sys -import dbus -from optparse import OptionParser, make_option - -bus = dbus.SystemBus() - -manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager") - -option_list = [ - make_option("-i", "--device", action="store", - type="string", dest="dev_id"), - ] -parser = OptionParser(option_list=option_list) - -(options, args) = parser.parse_args() - -if options.dev_id: - adapter_path = manager.FindAdapter(options.dev_id) -else: - adapter_path = manager.DefaultAdapter() - -adapter = dbus.Interface(bus.get_object("org.bluez", adapter_path), - "org.bluez.Adapter") - -test = dbus.Interface(bus.get_object("org.bluez", "/org/bluez/test"), - "org.bluez.TelephonyTest") - -if len(args) < 1: - print("""Usage: %s - - connect - disconnect - outgoing - incoming - cancel - signal - battery - roaming - registration - subscriber - speakergain [level] - microphonegain [level] - stop - """ % sys.argv[0]) - sys.exit(1) - -if args[0] == "connect": - if len(args) < 2: - print("Need device address parameter") - sys.exit(1) - device = adapter.FindDevice(args[1]) - headset = dbus.Interface(bus.get_object("org.bluez", device), - "org.bluez.Headset") - headset.Connect() - sys.exit(0) - -if args[0] == "disconnect": - if len(args) < 2: - print("Need device address parameter") - sys.exit(1) - device = adapter.FindDevice(args[1]) - headset = dbus.Interface(bus.get_object("org.bluez", device), - "org.bluez.Headset") - headset.Disconnect() - sys.exit(0) - -if args[0] == "speakergain": - if len(args) < 2: - print("Need device address parameter") - sys.exit(1) - device = adapter.FindDevice(args[1]) - headset = dbus.Interface(bus.get_object("org.bluez", device), - "org.bluez.Headset") - if len(args) > 2: - headset.SetProperty('SpeakerGain', dbus.UInt16(args[2])) - else: - props = headset.GetProperties() - print(props['SpeakerGain']) - - sys.exit(0) - -if args[0] == "microphonegain": - if len(args) < 2: - print("Need device address parameter") - sys.exit(1) - device = adapter.FindDevice(args[1]) - headset = dbus.Interface(bus.get_object("org.bluez", device), - "org.bluez.Headset") - if len(args) > 2: - headset.SetProperty('MicrophoneGain', dbus.UInt16(args[2])) - else: - props = headset.GetProperties() - print(props['MicrophoneGain']) - - sys.exit(0) - -if args[0] == "stop": - if len(args) < 2: - print("Need device address parameter") - sys.exit(1) - device = adapter.FindDevice(args[1]) - headset = dbus.Interface(bus.get_object("org.bluez", device), - "org.bluez.Headset") - headset.Stop() - - sys.exit(0) - -if args[0] == "outgoing": - if len(args) > 1: - test.OutgoingCall(args[1]) - else: - print("Need number parameter") - sys.exit(0) - -if args[0] == "incoming": - if len(args) > 1: - test.IncomingCall(args[1]) - else: - print("Need number parameter") - sys.exit(0) - -if args[0] == "cancel": - test.CancelCall() - sys.exit(0) - -if args[0] == "signal": - if len(args) > 1: - test.SignalStrength(args[1]) - else: - print("Need signal strength parameter") - sys.exit(0) - -if args[0] == "battery": - if len(args) > 1: - test.BatteryLevel(args[1]) - else: - print("Need battery level parameter") - sys.exit(0) - -if args[0] == "roaming": - if len(args) > 1: - test.RoamingStatus(args[1] == "yes" or False) - else: - print("Need yes/no parameter") - sys.exit(0) - -if args[0] == "registration": - if len(args) > 1: - test.RegistrationStatus(args[1] == "yes" or False) - else: - print("Need yes/no parameter") - sys.exit(0) - -if args[0] == "subscriber": - if len(args) > 1: - test.SetSubscriberNumber(args[1]) - else: - print("Need number parameter") - sys.exit(0) - -print("Unknown command") -sys.exit(1) -- 2.47.3