chore: scaffold tvctl foundation
Set up the Rust crate, baseline module layout, and project docs so the repository matches the design bundle and builds cleanly as a starting point.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
use crate::adapters::AppInfo;
|
||||
|
||||
/// A platform-level cache of app metadata discovered from live devices.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct AppCache {
|
||||
/// The normalized platform identifier for the cache file.
|
||||
pub platform: String,
|
||||
/// The apps currently known for that platform.
|
||||
pub apps: Vec<AppInfo>,
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
/// Background discovery orchestration for supported TV platforms.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct DiscoveryService;
|
||||
@@ -0,0 +1,8 @@
|
||||
pub mod cache;
|
||||
pub mod discovery;
|
||||
pub mod registry;
|
||||
pub mod state;
|
||||
|
||||
/// The long-lived tvctld process.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Daemon;
|
||||
@@ -0,0 +1,8 @@
|
||||
use crate::adapters::Device;
|
||||
|
||||
/// The persisted collection of known devices.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct DeviceRegistry {
|
||||
/// All devices currently remembered by the daemon.
|
||||
pub devices: Vec<Device>,
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::adapters::DeviceState;
|
||||
|
||||
/// An in-memory cache of the last observed state for each device.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct StateCache {
|
||||
/// State entries keyed by device UUID.
|
||||
pub entries: HashMap<Uuid, DeviceState>,
|
||||
}
|
||||
Reference in New Issue
Block a user