.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "SFWBAR-BLUEZ" 1 "" "" .SH NAME sfwbar-bluez \- Sfwbar Bluez module .sp Filename: bluez.so .sp Requires: none .SH SYNOPSIS .sp The bluez module provides an interface to connect and disconnect bluetooth devices via the bluez server. .SH EXPRESSION FUNCTIONS .SS BluezGet(Property) .sp function BluezGet fetches a property for a currently advertized bluez device. The supported properties are: .INDENT 0.0 .TP .B \(dqPath\(dq an object path of the device, this is used as a unique id to provide notifivations of changes or destruction of the device. .TP .B \(dqRemovedPath\(dq an object path of the most recently removed device. This is populated upon emission of the \(dqbluez_removed\(dq trigger. .TP .B \(dqAddress\(dq a bluetooth address of the device .TP .B \(dqName\(dq a name of the device .TP .B \(dqIcon\(dq an icon for the device type .UNINDENT .SS BluezState(Property) .sp function BluezState fetches a boolean state property of the currently advertized bluez device. The supported properties are: .INDENT 0.0 .TP .B \(dqPaired\(dq specifies whether the device is paired to the adapter .TP .B \(dqTrusted\(dq specifies whether the device is trusted by the adapter .TP .B \(dqConnected\(dq specifies whether the device is connected to the adpater .TP .B \(dqRunning\(dq queries the global state of the bluez module. If the module is connected to the server and sees at least one bluetooth adapter, this query will return true. Otherwise it will return false. .UNINDENT .SH ACTIONS .SS BluezScan .sp Initiate scan for the bluetooth devices. The scan will last for the duration specified in milliseconds. .SS BluezAck .sp Notify the module that all information for the currently advertized device has been processed. The module may then emit another bluez_changed event if further device updates are available. .SS BluezAckRemoved .sp Notify the module that all information for the currently advertized device removal has been processed. The module may then emit another bluez_removed event if further device removals are queued. .SS BluezConnect .sp Attempt to connect to the bluetooth device specified by the path. .SS BluezPair .sp Attempt to pair and connect to the bluetooth device specified by the path. .SS BluezDisconnect .sp Attempt to diconnect from the bluetooth device specified by the path. .SS BluezRemove .sp Attempt to remove the bluetooth device specified by the path. .SH TRIGGERS .sp The module defines the following triggers: .INDENT 0.0 .TP .B \(dqbluez_running\(dq this trigger is emitted when connected to the first bluetooth adapter has been made or when connection to the last adapter is lost (i.e. when the value of BluezState(\(dqRunning\(dq) query has changed) .TP .B \(dqbluez_changed\(dq this trigger is emitted when a new bluetooth device is discovered or properties of a device are changed. Once the trigger is emitted, the information for the relevant device will be available via BluezGet and BluezState expression functions. Once the config finished handling the device update, it should call action BluezAck. Upon receipt of this action, the module may emit \(dqbluez_changed\(dq again if further device updates are queued. .TP .B \(dqbluez_removed\(dq this trigger is emitted when a bluetooth device is no longer available and should be removed from the layout. The path of the removed device is available via BluezGet(\(dqRemovedPath\(dq). Once the config finished removing the device, it should call action BluezAckRemoved. Upon receipt of this action, the module may emit another \(dqbluez_removed\(dq trigger if further devices have been removed. .TP .B \(dqbluez_scan\(dq this trigger is emitted when scan for bluetooth devices has been initiated. .TP .B \(dqbluez_scan_complete\(dq this trigger is emitted when scan for bluetooth devices is complete. .UNINDENT .SH COPYRIGHT GPLv3+ .\" Generated by docutils manpage writer. .