diff options
-rw-r--r-- | agents/hostmanageragent.cc (renamed from hostmanageragent.cc) | 0 | ||||
-rw-r--r-- | agents/hostmanageragent.h (renamed from hostmanageragent.h) | 0 | ||||
-rw-r--r-- | agents/hostmanagerconn.cc (renamed from hostmanagerconn.cc) | 0 | ||||
-rw-r--r-- | agents/hostmanagerconn.h (renamed from hostmanagerconn.h) | 0 | ||||
-rw-r--r-- | agents/musicagent.cc (renamed from musicagent.cc) | 0 | ||||
-rw-r--r-- | agents/musicagent.h (renamed from musicagent.h) | 0 | ||||
-rw-r--r-- | agents/musicconn.cc (renamed from musicconn.cc) | 0 | ||||
-rw-r--r-- | agents/musicconn.h (renamed from musicconn.h) | 0 | ||||
-rw-r--r-- | agents/notificationagent.cc (renamed from notificationagent.cc) | 0 | ||||
-rw-r--r-- | agents/notificationagent.h (renamed from notificationagent.h) | 0 | ||||
-rw-r--r-- | agents/notificationconn.cc (renamed from notificationconn.cc) | 0 | ||||
-rw-r--r-- | agents/notificationconn.h (renamed from notificationconn.h) | 0 | ||||
-rw-r--r-- | agents/webproxyagent.cc (renamed from webproxyagent.cc) | 0 | ||||
-rw-r--r-- | agents/webproxyagent.h (renamed from webproxyagent.h) | 0 | ||||
-rw-r--r-- | agents/webproxyconn.cc (renamed from webproxyconn.cc) | 0 | ||||
-rw-r--r-- | agents/webproxyconn.h (renamed from webproxyconn.h) | 0 | ||||
-rw-r--r-- | agents/webproxytrans.cc (renamed from webproxytrans.cc) | 0 | ||||
-rw-r--r-- | agents/webproxytrans.h (renamed from webproxytrans.h) | 0 | ||||
-rw-r--r-- | sap/capabilityagent.cc (renamed from capabilityagent.cc) | 0 | ||||
-rw-r--r-- | sap/capabilityagent.h (renamed from capabilityagent.h) | 0 | ||||
-rw-r--r-- | sap/capabilitypeer.cc (renamed from capabilitypeer.cc) | 0 | ||||
-rw-r--r-- | sap/capabilitypeer.h (renamed from capabilitypeer.h) | 0 | ||||
-rw-r--r-- | sap/crc16.cc (renamed from crc16.cc) | 0 | ||||
-rw-r--r-- | sap/crc16.h (renamed from crc16.h) | 0 | ||||
-rw-r--r-- | sap/endianhelpers.h (renamed from endianhelpers.h) | 0 | ||||
-rw-r--r-- | sap/sapagent.h (renamed from sapagent.h) | 0 | ||||
-rw-r--r-- | sap/sapbtlistener.cc (renamed from sapbtlistener.cc) | 0 | ||||
-rw-r--r-- | sap/sapbtlistener.h (renamed from sapbtlistener.h) | 0 | ||||
-rw-r--r-- | sap/sapbtpeer.cc (renamed from sapbtpeer.cc) | 0 | ||||
-rw-r--r-- | sap/sapbtpeer.h (renamed from sapbtpeer.h) | 0 | ||||
-rw-r--r-- | sap/sapchannelinfo.cc (renamed from sapchannelinfo.cc) | 0 | ||||
-rw-r--r-- | sap/sapchannelinfo.h (renamed from sapchannelinfo.h) | 0 | ||||
-rw-r--r-- | sap/sapconnection.cc (renamed from sapconnection.cc) | 0 | ||||
-rw-r--r-- | sap/sapconnection.h (renamed from sapconnection.h) | 0 | ||||
-rw-r--r-- | sap/sapconnectionrequest.cc (renamed from sapconnectionrequest.cc) | 0 | ||||
-rw-r--r-- | sap/sapconnectionrequest.h (renamed from sapconnectionrequest.h) | 0 | ||||
-rw-r--r-- | sap/sapmanager.cc (renamed from sapmanager.cc) | 0 | ||||
-rw-r--r-- | sap/sapmanager.h (renamed from sapmanager.h) | 0 | ||||
-rw-r--r-- | sap/sappeer.cc (renamed from sappeer.cc) | 0 | ||||
-rw-r--r-- | sap/sappeer.h (renamed from sappeer.h) | 0 | ||||
-rw-r--r-- | sap/saprotocol.cc (renamed from saprotocol.cc) | 0 | ||||
-rw-r--r-- | sap/saprotocol.h (renamed from saprotocol.h) | 0 | ||||
-rw-r--r-- | sap/sapserviceinfo.cc (renamed from sapserviceinfo.cc) | 0 | ||||
-rw-r--r-- | sap/sapserviceinfo.h (renamed from sapserviceinfo.h) | 0 | ||||
-rw-r--r-- | sap/sapsocket.cc (renamed from sapsocket.cc) | 0 | ||||
-rw-r--r-- | sap/sapsocket.h (renamed from sapsocket.h) | 0 | ||||
-rw-r--r-- | sap/wmscrypt.h (renamed from wmscrypt.h) | 0 | ||||
-rw-r--r-- | sap/wmskeys.h (renamed from wmskeys.h) | 0 | ||||
-rw-r--r-- | sap/wmspeer.h (renamed from wmspeer.h) | 0 | ||||
-rwxr-xr-x | scripts/test-hfp-ag | 210 |
50 files changed, 0 insertions, 210 deletions
diff --git a/hostmanageragent.cc b/agents/hostmanageragent.cc index 3cc67c2..3cc67c2 100644 --- a/hostmanageragent.cc +++ b/agents/hostmanageragent.cc diff --git a/hostmanageragent.h b/agents/hostmanageragent.h index aa9e148..aa9e148 100644 --- a/hostmanageragent.h +++ b/agents/hostmanageragent.h diff --git a/hostmanagerconn.cc b/agents/hostmanagerconn.cc index 0e1f7bb..0e1f7bb 100644 --- a/hostmanagerconn.cc +++ b/agents/hostmanagerconn.cc diff --git a/hostmanagerconn.h b/agents/hostmanagerconn.h index 3543a6c..3543a6c 100644 --- a/hostmanagerconn.h +++ b/agents/hostmanagerconn.h diff --git a/musicagent.cc b/agents/musicagent.cc index f67cc1d..f67cc1d 100644 --- a/musicagent.cc +++ b/agents/musicagent.cc diff --git a/musicagent.h b/agents/musicagent.h index 32121d4..32121d4 100644 --- a/musicagent.h +++ b/agents/musicagent.h diff --git a/musicconn.cc b/agents/musicconn.cc index cfc375d..cfc375d 100644 --- a/musicconn.cc +++ b/agents/musicconn.cc diff --git a/musicconn.h b/agents/musicconn.h index 3cee914..3cee914 100644 --- a/musicconn.h +++ b/agents/musicconn.h diff --git a/notificationagent.cc b/agents/notificationagent.cc index 58d27d4..58d27d4 100644 --- a/notificationagent.cc +++ b/agents/notificationagent.cc diff --git a/notificationagent.h b/agents/notificationagent.h index 1b9c9cb..1b9c9cb 100644 --- a/notificationagent.h +++ b/agents/notificationagent.h diff --git a/notificationconn.cc b/agents/notificationconn.cc index bfe719b..bfe719b 100644 --- a/notificationconn.cc +++ b/agents/notificationconn.cc diff --git a/notificationconn.h b/agents/notificationconn.h index 092804a..092804a 100644 --- a/notificationconn.h +++ b/agents/notificationconn.h diff --git a/webproxyagent.cc b/agents/webproxyagent.cc index c9d5580..c9d5580 100644 --- a/webproxyagent.cc +++ b/agents/webproxyagent.cc diff --git a/webproxyagent.h b/agents/webproxyagent.h index e3e7329..e3e7329 100644 --- a/webproxyagent.h +++ b/agents/webproxyagent.h diff --git a/webproxyconn.cc b/agents/webproxyconn.cc index 91a9510..91a9510 100644 --- a/webproxyconn.cc +++ b/agents/webproxyconn.cc diff --git a/webproxyconn.h b/agents/webproxyconn.h index c183462..c183462 100644 --- a/webproxyconn.h +++ b/agents/webproxyconn.h diff --git a/webproxytrans.cc b/agents/webproxytrans.cc index 23b41b7..23b41b7 100644 --- a/webproxytrans.cc +++ b/agents/webproxytrans.cc diff --git a/webproxytrans.h b/agents/webproxytrans.h index 950c7b9..950c7b9 100644 --- a/webproxytrans.h +++ b/agents/webproxytrans.h diff --git a/capabilityagent.cc b/sap/capabilityagent.cc index cdc80b6..cdc80b6 100644 --- a/capabilityagent.cc +++ b/sap/capabilityagent.cc diff --git a/capabilityagent.h b/sap/capabilityagent.h index 52692e5..52692e5 100644 --- a/capabilityagent.h +++ b/sap/capabilityagent.h diff --git a/capabilitypeer.cc b/sap/capabilitypeer.cc index 8dfe603..8dfe603 100644 --- a/capabilitypeer.cc +++ b/sap/capabilitypeer.cc diff --git a/capabilitypeer.h b/sap/capabilitypeer.h index 0ad6fc6..0ad6fc6 100644 --- a/capabilitypeer.h +++ b/sap/capabilitypeer.h diff --git a/endianhelpers.h b/sap/endianhelpers.h index 3060382..3060382 100644 --- a/endianhelpers.h +++ b/sap/endianhelpers.h diff --git a/sapagent.h b/sap/sapagent.h index 321075c..321075c 100644 --- a/sapagent.h +++ b/sap/sapagent.h diff --git a/sapbtlistener.cc b/sap/sapbtlistener.cc index 9776b59..9776b59 100644 --- a/sapbtlistener.cc +++ b/sap/sapbtlistener.cc diff --git a/sapbtlistener.h b/sap/sapbtlistener.h index 398eb1a..398eb1a 100644 --- a/sapbtlistener.h +++ b/sap/sapbtlistener.h diff --git a/sapbtpeer.cc b/sap/sapbtpeer.cc index 188c37b..188c37b 100644 --- a/sapbtpeer.cc +++ b/sap/sapbtpeer.cc diff --git a/sapbtpeer.h b/sap/sapbtpeer.h index 75af77f..75af77f 100644 --- a/sapbtpeer.h +++ b/sap/sapbtpeer.h diff --git a/sapchannelinfo.cc b/sap/sapchannelinfo.cc index 530341a..530341a 100644 --- a/sapchannelinfo.cc +++ b/sap/sapchannelinfo.cc diff --git a/sapchannelinfo.h b/sap/sapchannelinfo.h index 922136e..922136e 100644 --- a/sapchannelinfo.h +++ b/sap/sapchannelinfo.h diff --git a/sapconnection.cc b/sap/sapconnection.cc index 9a624b6..9a624b6 100644 --- a/sapconnection.cc +++ b/sap/sapconnection.cc diff --git a/sapconnection.h b/sap/sapconnection.h index 0fdd025..0fdd025 100644 --- a/sapconnection.h +++ b/sap/sapconnection.h diff --git a/sapconnectionrequest.cc b/sap/sapconnectionrequest.cc index 4842ff6..4842ff6 100644 --- a/sapconnectionrequest.cc +++ b/sap/sapconnectionrequest.cc diff --git a/sapconnectionrequest.h b/sap/sapconnectionrequest.h index bbb4a0e..bbb4a0e 100644 --- a/sapconnectionrequest.h +++ b/sap/sapconnectionrequest.h diff --git a/sapmanager.cc b/sap/sapmanager.cc index 9d72433..9d72433 100644 --- a/sapmanager.cc +++ b/sap/sapmanager.cc diff --git a/sapmanager.h b/sap/sapmanager.h index 5619e54..5619e54 100644 --- a/sapmanager.h +++ b/sap/sapmanager.h diff --git a/sappeer.cc b/sap/sappeer.cc index 85a5899..85a5899 100644 --- a/sappeer.cc +++ b/sap/sappeer.cc diff --git a/sappeer.h b/sap/sappeer.h index 1c477c4..1c477c4 100644 --- a/sappeer.h +++ b/sap/sappeer.h diff --git a/saprotocol.cc b/sap/saprotocol.cc index b27c01e..b27c01e 100644 --- a/saprotocol.cc +++ b/sap/saprotocol.cc diff --git a/saprotocol.h b/sap/saprotocol.h index 68434c1..68434c1 100644 --- a/saprotocol.h +++ b/sap/saprotocol.h diff --git a/sapserviceinfo.cc b/sap/sapserviceinfo.cc index a77d2f0..a77d2f0 100644 --- a/sapserviceinfo.cc +++ b/sap/sapserviceinfo.cc diff --git a/sapserviceinfo.h b/sap/sapserviceinfo.h index 91756b7..91756b7 100644 --- a/sapserviceinfo.h +++ b/sap/sapserviceinfo.h diff --git a/sapsocket.cc b/sap/sapsocket.cc index 390aef0..390aef0 100644 --- a/sapsocket.cc +++ b/sap/sapsocket.cc diff --git a/sapsocket.h b/sap/sapsocket.h index 59fcb3c..59fcb3c 100644 --- a/sapsocket.h +++ b/sap/sapsocket.h diff --git a/wmscrypt.h b/sap/wmscrypt.h index c7271cb..c7271cb 100644 --- a/wmscrypt.h +++ b/sap/wmscrypt.h diff --git a/wmskeys.h b/sap/wmskeys.h index 5170ee8..5170ee8 100644 --- a/wmskeys.h +++ b/sap/wmskeys.h diff --git a/wmspeer.h b/sap/wmspeer.h index 446e747..446e747 100644 --- a/wmspeer.h +++ b/sap/wmspeer.h diff --git a/scripts/test-hfp-ag b/scripts/test-hfp-ag deleted file mode 100755 index 3152339..0000000 --- a/scripts/test-hfp-ag +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/bin/python - -from __future__ import absolute_import, print_function, unicode_literals - -from optparse import OptionParser, make_option -import os -from socket import SOCK_SEQPACKET, socket -import sys -import dbus -import dbus.service -import dbus.mainloop.glib -import glib -try: - from gi.repository import GObject -except ImportError: - import gobject as GObject - -mainloop = None -audio_supported = True - -try: - from socket import AF_BLUETOOTH, BTPROTO_SCO -except: - print("WARNING: python compiled without Bluetooth support" - " - audio will not be available") - audio_supported = False - -BUF_SIZE = 1024 - -BDADDR_ANY = '00:00:00:00:00:00' - -HF_NREC = 0x0001 -HF_3WAY = 0x0002 -HF_CLI = 0x0004 -HF_VOICE_RECOGNITION = 0x0008 -HF_REMOTE_VOL = 0x0010 -HF_ENHANCED_STATUS = 0x0020 -HF_ENHANCED_CONTROL = 0x0040 -HF_CODEC_NEGOTIATION = 0x0080 - -AG_3WAY = 0x0001 -AG_NREC = 0x0002 -AG_VOICE_RECOGNITION = 0x0004 -AG_INBAND_RING = 0x0008 -AG_VOICE_TAG = 0x0010 -AG_REJECT_CALL = 0x0020 -AG_ENHANCED_STATUS = 0x0040 -AG_ENHANCED_CONTROL = 0x0080 -AG_EXTENDED_RESULT = 0x0100 -AG_CODEC_NEGOTIATION = 0x0200 - -HF_FEATURES = (HF_3WAY | HF_CLI | HF_VOICE_RECOGNITION | - HF_REMOTE_VOL | HF_ENHANCED_STATUS | - HF_ENHANCED_CONTROL | HF_CODEC_NEGOTIATION) - -AVAIL_CODECS = "1,2" - -class HfpConnection: - slc_complete = False - fd = None - io_id = 0 - version = 0 - features = 0 - pending = None - - def disconnect(self): - if (self.fd >= 0): - os.close(self.fd) - self.fd = -1 - glib.source_remove(self.io_id) - self.io_id = 0 - - def slc_completed(self): - print("SLC establisment complete") - self.slc_complete = True - - def slc_next_cmd(self, cmd): - print("Unknown SLC command completed: %s" % (cmd)) - - def io_cb(self, fd, cond): - buf = os.read(fd, BUF_SIZE) - buf = buf.strip() - - print("Received: %s" % (buf)) - - return True - - def send_cmd(self, cmd): - if (self.pending): - print("ERROR: Another command is pending") - return - - print("Sending: %s" % (cmd)) - - os.write(self.fd, cmd + "\r\n") - self.pending = cmd - - def __init__(self, fd, version, features): - self.fd = fd - self.version = version - self.features = features - - print("Version 0x%04x Features 0x%04x" % (version, features)) - - self.io_id = glib.io_add_watch(fd, glib.IO_IN, self.io_cb) - -class HfpProfile(dbus.service.Object): - sco_socket = None - io_id = 0 - conns = {} - - def sco_cb(self, sock, cond): - (sco, peer) = sock.accept() - print("New SCO connection from %s" % (peer)) - - def init_sco(self, sock): - self.sco_socket = sock - self.io_id = glib.io_add_watch(sock, glib.IO_IN, self.sco_cb) - - def __init__(self, bus, path, sco): - dbus.service.Object.__init__(self, bus, path) - - if sco: - self.init_sco(sco) - - @dbus.service.method("org.bluez.Profile1", - in_signature="", out_signature="") - def Release(self): - print("Release") - mainloop.quit() - - @dbus.service.method("org.bluez.Profile1", - in_signature="", out_signature="") - def Cancel(self): - print("Cancel") - - @dbus.service.method("org.bluez.Profile1", - in_signature="o", out_signature="") - def RequestDisconnection(self, path): - conn = self.conns.pop(path) - conn.disconnect() - - @dbus.service.method("org.bluez.Profile1", - in_signature="oha{sv}", out_signature="") - def NewConnection(self, path, fd, properties): - fd = fd.take() - version = 0x0105 - features = 0 - print("NewConnection(%s, %d)" % (path, fd)) - for key in properties.keys(): - if key == "Version": - version = properties[key] - elif key == "Features": - features = properties[key] - - #conn = HfpConnection(fd, version, features) - - #self.conns[path] = conn - -if __name__ == '__main__': - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - - bus = dbus.SystemBus() - - manager = dbus.Interface(bus.get_object("org.bluez", - "/org/bluez"), "org.bluez.ProfileManager1") - - option_list = [ - make_option("-p", "--path", action="store", - type="string", dest="path", - default="/bluez/test/hfp"), - make_option("-n", "--name", action="store", - type="string", dest="name", - default=None), - make_option("-C", "--channel", action="store", - type="int", dest="channel", - default=None), - ] - - parser = OptionParser(option_list=option_list) - - (options, args) = parser.parse_args() - - mainloop = GObject.MainLoop() - - opts = { - "Version" : dbus.UInt16(0x0106), - "Features" : dbus.UInt16(HF_FEATURES), - } - - if (options.name): - opts["Name"] = options.name - - if (options.channel is not None): - opts["Channel"] = dbus.UInt16(options.channel) - - if audio_supported: - sco = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO) - sco.bind(BDADDR_ANY) - sco.listen(1) - else: - sco = None - - profile = HfpProfile(bus, options.path, sco) - - manager.RegisterProfile(options.path, "hfp-ag", opts) - - print("Profile registered - waiting for connections") - - mainloop.run() |