//! Proximity transports — NFC, QR, BLE.
//!
//! v0.1 ships a placeholder that returns
//! `IddropError::Transport("not implemented")` so the public API surface
//! exists for the iddrop CLI to wire against, but real NFC/QR support
//! lands in v0.2+ when we couple to the Android KIT app's trust-kernel.

use super::Transport;
use crate::errors::{IddropError, Result};

/// Placeholder NFC transport. Real implementation lands in v0.2+
/// behind the `proximity` Cargo feature, coupling to the KIT app's
/// trust-kernel native bridge.
pub struct NfcStub;

impl Transport for NfcStub {
    fn name(&self) -> &'static str {
        "nfc"
    }
    fn send(&self, _peer: &str, _bytes: &[u8]) -> Result<()> {
        Err(IddropError::Transport(
            "NFC transport not implemented in v0.1 — pair with KIT app trust-kernel in v0.2+"
                .to_string(),
        ))
    }
    fn recv(&self, _peer: &str) -> Result<Option<Vec<u8>>> {
        Err(IddropError::Transport(
            "NFC transport not implemented in v0.1".to_string(),
        ))
    }
}

/// Placeholder QR transport.
pub struct QrStub;

impl Transport for QrStub {
    fn name(&self) -> &'static str {
        "qr"
    }
    fn send(&self, _peer: &str, _bytes: &[u8]) -> Result<()> {
        Err(IddropError::Transport(
            "QR transport not implemented in v0.1".to_string(),
        ))
    }
    fn recv(&self, _peer: &str) -> Result<Option<Vec<u8>>> {
        Err(IddropError::Transport(
            "QR transport not implemented in v0.1".to_string(),
        ))
    }
}
