modeling

package
v0.0.0-...-2b78991 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2025 License: BSD-2-Clause Imports: 19 Imported by: 0

README

CPython binding

import "github.com/OpenPrinting/go-mfp/modeling"

This package implements scriptable models of printers and scanners

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model defines the whole characteristics of the MFP device being modeled, including the IPP printer attributes, eSCL and WSD scanner capabilities, scripting hooks, used to modify device behavior and the Python interpreter instance, used to execute these hooks.

func NewModel

func NewModel() (*Model, error)

NewModel creates a new Model with empty printer/scanner parameters. Use Model.Close to release resources owned by the Model.

func (*Model) Close

func (model *Model) Close()

Close closes the Model and releases all resources associated with it.

func (*Model) GetESCLScanCaps

func (model *Model) GetESCLScanCaps() *escl.ScannerCapabilities

GetESCLScanCaps returns the escl.ScannerCapabilities.

func (*Model) GetIPPPrinterAttrs

func (model *Model) GetIPPPrinterAttrs() *ipp.PrinterAttributes

GetIPPPrinterAttrs returns the escl.ScannerCapabilities.

func (*Model) Load

func (model *Model) Load(file string) error

Load reads model from the disk file.

func (*Model) NewESCLServer

func (model *Model) NewESCLServer(
	scanner abstract.Scanner) *escl.AbstractServer

NewESCLServer creates a virtual eSCL server on a top of the existent abstract.Scanner implementation.

It will return nil, if model doesn't have the eSCL scanner capabilities.

func (*Model) Read

func (model *Model) Read(filename string, r io.Reader) error

Read reads model from the io.Reader The filename parameter required for the diagnostics messages.

func (*Model) Reset

func (model *Model) Reset() error

Reset resets the Modal into its initial state.

func (*Model) Save

func (model *Model) Save(file string) error

Save writes model into the disk file.

func (*Model) SetESCLScanCaps

func (model *Model) SetESCLScanCaps(caps *escl.ScannerCapabilities)

SetESCLScanCaps sets the escl.ScannerCapabilities.

func (*Model) SetIPPPrinterAttrs

func (model *Model) SetIPPPrinterAttrs(attrs *ipp.PrinterAttributes)

SetIPPPrinterAttrs sets the escl.ScannerCapabilities.

func (*Model) Write

func (model *Model) Write(w io.Writer) error

Write writes model into the io.Writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL