brlapi 0.4.1

Safe Rust bindings for the BrlAPI library
// SPDX-License-Identifier: LGPL-2.1

//! Debug Preferences Example
//!
//! This simple example demonstrates the debug_preferences() method for
//! troubleshooting BrlAPI parameter access and understanding what
//! BRLTTY preferences are actually configured.

use brlapi::Connection;

fn main() -> Result<(), brlapi::BrlApiError> {
    println!("BrlAPI Debug Preferences Utility");
    println!("================================");
    println!();

    // Open connection to BRLTTY
    let connection = Connection::open()?;
    println!("Connected to BRLTTY daemon");

    // Get display information
    let display = brlapi::Display::from_connection(&connection)?;
    println!("Display: {}", display);
    println!();

    // Show all debug information
    connection.debug_preferences();

    println!();
    println!("This utility helps troubleshoot:");
    println!("- Whether BrlAPI parameter reading is working");
    println!("- What contraction table preferences are configured");
    println!("- Whether literary braille mode is enabled");
    println!("- Current client priority settings");
    println!("- How user_contraction_table() behaves on this system");

    Ok(())
}