#product-os #print #server #ipp #version #protocols #operating

product-os-print-server

Product OS : Print Server provides a full working IPP Print Server operating on version 1.1 of the IPP Protocol

1 unstable release

0.0.1 Nov 15, 2023

#16 in #ipp

AGPL-3.0-only

120KB
2K SLoC

Product OS : Print Server

Product OS : Print Server provides a full working IPP Print Server operating on version 1.1 of the IPP Protocol.

What is Product OS?

Product OS is a collection of packages that provide different tools and features that can work together to build products more easily for the Rust ecosystem.

Installation

Use the Rust crate package manager cargo to install Product OS : Print Server.

cargo add product-os-print-server

or add Product OS : Print Server to your cargo.toml [packages] section.

product-os-print-server = { version = "0.0.1", features = [], default-features = true, optional = false }

Features

Product OS Print Server supports a number of features leveraging existing Rust libraries to help connect APIs together using only configuration:

  • Establish an IPP or IPPS print server
  • Support auto discovery using Bonjour (Zeroconf)
  • Support basic printing operations including print, cancel and inquiry
  • Provides the helper trait for handling processing of print jobs - allows for custom behaviour for processing print request content

To make the most of Print Server, you should use the Product OS : Server crate.

// Feature samples TODO

Usage

use std::str::FromStr;
use std::sync::Arc;
use parking_lot::Mutex;


pub fn main() {
    let config = product_os_configuration::Configuration::from_file("./config.json");
    let mut server = product_os_server::ProductOSServer::new_with_config_sync(config.clone());

    let printer = Arc::new(Mutex::new(product_os_print_server::ProductOSIPPServer::new(String::from("test-ipp-printer-jd"), String::from("ipp://127.0.0.1:8443/"), 8443, false, Arc::new(print_processor::PrintProcessor::new()))));
    server.add_feature_service_mut_sync(printer.clone(), None);

    match server.start_sync() {
        Err(e) => println!("Error occurred: {}", e),
        Ok(r) => println!("Server Started: {:?}", r)
    };
}

Contributing

Contributions are not currently available but will be available on a public repository soon.

License

GNU AGPLv3

Dependencies

~17–26MB
~715K SLoC