init: ShowenV2 项目骨架 — 数字生命窗口平台

- core/ 跨平台内核骨架 (Plugin trait, Message, ServiceManager, Config)
- plugins/ 空桩 (video, http, ble, screen, wifi)
- PROGRESS.md 进度跟踪, TEAM.md 团队档案
- cargo check 零 warning 通过

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
showen
2026-03-12 05:03:58 +08:00
commit 23f4d46287
21 changed files with 2223 additions and 0 deletions

39
src/plugins/wifi/mod.rs Normal file
View File

@@ -0,0 +1,39 @@
//! WifiPlugin — WiFi 管理
//!
//! 通过 nmcli 实现 WiFi 扫描、连接、AP 热点。
use crate::core::message::Message;
use crate::core::plugin::{Plugin, PluginContext, PluginInfo, Platform};
use anyhow::Result;
pub struct WifiPlugin {
ctx: Option<PluginContext>,
}
impl WifiPlugin {
pub fn new() -> Self {
Self { ctx: None }
}
}
impl Plugin for WifiPlugin {
fn id(&self) -> &'static str { "wifi" }
fn info(&self) -> PluginInfo {
PluginInfo {
name: "WiFi Manager",
version: "0.2.0",
description: "WiFi 管理 (nmcli)",
platform: Platform::Linux,
}
}
fn init(&mut self, ctx: PluginContext) -> Result<()> {
self.ctx = Some(ctx);
Ok(())
}
fn start(&mut self) -> Result<()> { Ok(()) }
fn handle_message(&mut self, _msg: Message) -> Result<()> { Ok(()) }
fn stop(&mut self) -> Result<()> { Ok(()) }
}