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
//! WiFi connection detection module for LPU WiFi Manager
//!
//! This module handles:
//! - Cross-platform WiFi connection detection
//! - Linux detection using nmcli
//! - Windows detection using netsh
use Command;
/// Checks if the system is currently connected to LPU WiFi
///
/// # Returns
/// `true` if connected to an SSID starting with "LPU", `false` otherwise
///
/// # Platform Support
/// - Linux: Uses nmcli to check connection status
/// - Windows: Uses netsh to check connection status
///
/// # Examples
/// ```no_run
/// if llogin::wifi::check_lpu_wifi() {
/// println!("Connected to LPU WiFi");
/// } else {
/// println!("Not connected to LPU WiFi");
/// }
/// ```
/// Checks LPU WiFi connection on Linux systems using nmcli
///
/// # Implementation Details
/// - Uses nmcli command line tool
/// - Checks for active WiFi connections
/// - Looks for SSID starting with "LPU"
///
/// # Returns
/// `true` if connected to LPU WiFi, `false` if not connected or on error
/// Checks LPU WiFi connection on Windows systems using netsh
///
/// # Implementation Details
/// - Uses Windows netsh command
/// - Checks wireless interface state
/// - Looks for SSID containing "LPU"
///
/// # Returns
/// `true` if connected to LPU WiFi, `false` if not connected or on error