import dbus.mainloop.glib
from optparse import OptionParser, make_option
-hfp_record = """
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<record>
- <attribute id="0x0001">
- <sequence>
- <uuid value="0x111e" />
- <uuid value="0x1203" />
- </sequence>
- </attribute>
- <attribute id="0x0004">
- <sequence>
- <sequence>
- <uuid value="0x0100" />
- </sequence>
- <sequence>
- <uuid value="0x0003" />
- <uint8 value="0x07" />
- </sequence>
- </sequence>
- </attribute>
- <attribute id="0x0005">
- <sequence>
- <uuid value="0x1002" />
- </sequence>
- </attribute>
- <attribute id="0x0009">
- <sequence>
- <sequence>
- <uuid value="0x111e" />
- <uint16 value="0x0105" />
- </sequence>
- </sequence>
- </attribute>
- <attribute id="0x0100">
- <text value="Handsfree" />
- </attribute>
- <attribute id="0x0311">
- <uint16 value="0x0031" />
- </attribute>
-</record>
-"""
-
class Profile(dbus.service.Object):
@dbus.service.method("org.bluez.Profile1",
in_signature="", out_signature="")
mainloop = GObject.MainLoop()
if options.uuid == "hfp":
- options.channel = 7
- options.record = hfp_record
options.name = "HFP HandsFree"
opts = {