hfp-api

Embed Size (px)

DESCRIPTION

h ryryr ry

Citation preview

Gateway hierarchy========================Service org.bluezInterface org.bluez.HandsfreeGatewayObject path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XXThis interface is available for remote devices which can function in the AudioGateway role of the HFP profiles. It is intended to be used with externaltelephony stacks / handlers of the HFP protocol.Methods void Connect()Connect to the AG service on the remote device.void Disconnect()Disconnect from the AG service on the remote devicedict GetProperties()Returns all properties for the interface. See theproperties section for available properties.void RegisterAgent(object path)The object path defines the path the of the agentthat will be called when a new Handsfree connectionis established.If an application disconnects from the bus all of itsregistered agents will be removed.void UnregisterAgent(object path)This unregisters the agent that has been previouslyregistered. The object path parameter must match thesame value that has been used on registration.Possible Errors: org.bluez.Error.Failed org.bluez.Error.InvalidArgumentsSignals PropertyChanged(string name, variant value)This signal indicates a changed value of the givenproperty.Properties string State [readonly]Indicates the state of the connection. Possiblevalues are:"disconnected""connecting""connected""playing"HandsfreeAgent hierarchy===============Service unique nameInterface org.bluez.HandsfreeAgentObject path freely definableMethods void NewConnection(filedescriptor fd, uint16 version)This method gets called whenever a new handsfreeconnection has been established. The objectpathcontains the object path of the remote device. Thismethod assumes that DBus daemon with file descriptorpassing capability is being used.The agent should only return successfully once theestablishment of the service level connection (SLC)has been completed. In the case of Handsfree thismeans that BRSF exchange has been performed andnecessary initialization has been done.Possible Errors: org.bluez.Error.InvalidArguments org.bluez.Error.Failedvoid Release()This method gets called whenever the service daemonunregisters the agent or whenever the Adapter wherethe HandsfreeAgent registers itself is removed.