1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! Bluetooth Device Proxy
//!
//! This module provides D-Bus proxy interfaces for interacting with Bluetooth
//! devices through NetworkManager and BlueZ.
use Result;
use proxy;
/// Proxy for Bluetooth devices
///
/// Provides access to Bluetooth-specific properties and methods through
/// NetworkManager's D-Bus interface.
///
/// # Example
///
/// ```ignore
/// use nmrs::dbus::NMBluetoothProxy;
/// use zbus::Connection;
///
/// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
/// let conn = Connection::system().await?;
/// let proxy = NMBluetoothProxy::builder(&conn)
/// .path("/org/freedesktop/NetworkManager/Devices/1")?
/// .build()
/// .await?;
///
/// let bdaddr = proxy.bd_address().await?;
/// println!("Bluetooth address: {}", bdaddr);
/// # Ok(())
/// # }
/// ```
/// Extension trait for Bluetooth device information via BlueZ.
///
/// Provides convenient methods to access Bluetooth-specific properties
/// that are otherwise not exposed by NetworkManager. This interfaces directly
/// with BlueZ, the Linux Bluetooth stack.
///
/// # Example
///
/// ```ignore
/// use nmrs::dbus::BluezDeviceExtProxy;
/// use zbus::Connection;
///
/// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
/// let conn = Connection::system().await?;
/// let proxy = BluezDeviceExtProxy::builder(&conn)
/// .path("/org/bluez/hci0/dev_00_1A_7D_DA_71_13")?
/// .build()
/// .await?;
///
/// let name = proxy.name().await?;
/// let alias = proxy.alias().await?;
/// println!("Device: {} ({})", alias, name);
/// # Ok(())
/// # }
/// ```