Options
All
  • Public
  • Public/Protected
  • All
Menu

It handles WebSocket communication with the JSPrintManager Client App.

Hierarchy

  • JSPrintManager

Index

Constructors

constructor

Properties

Static WS

WS: NDWS

Static _ses_cert

_ses_cert: string = ""

Static auto_reconnect

auto_reconnect: boolean = false

If the websocket have closed, then retry to reconnect automatically

Static onStatusChanged

onStatusChanged: () => void = ...

Occurs when the WebSocket connection status changes.

Type declaration

    • (): void
    • Occurs when the WebSocket connection status changes.

      Returns void

Accessors

Static license_url

  • get license_url(): string
  • set license_url(value: string): void
  • Gets or sets the URL to request the license info from.

    Returns string

  • Gets or sets the URL to request the license info from.

    Parameters

    • value: string

    Returns void

Static session_certificate

  • get session_certificate(): string
  • Returns string

Static websocket_status

  • Gets the status of the WebSocket connection.

    Returns WSStatus

Methods

Static getPrinters

  • getPrinters(): Promise<unknown>
  • Gets the list of installed printers in the client system.

    Returns Promise<unknown>

Static getPrintersInfo

  • getPrintersInfo(detail_level?: PrintersInfoLevel, printer_name?: string): Promise<unknown>
  • Gets detailed info of each installed printer in the client system.

    Parameters

    Returns Promise<unknown>

Static getScanners

  • getScanners(): Promise<any>
  • Returns the list of scanner devices available in the client system.

    Returns Promise<any>

Static getSerialPorts

  • getSerialPorts(): Promise<any>
  • Returns the list of Serial ports available in the client system.

    Returns Promise<any>

Static getSessionCertificate

  • getSessionCertificate(): Promise<unknown>
  • Gets an unique certificate / public-key to use for encryption scenarios. The returned JSON object is {"certificate":"CERT_PEM_FORMAT", "public_key":"PUB_KEY_PEM_FORMAT"}

    Returns Promise<unknown>

Static getSystemFonts

  • getSystemFonts(): Promise<any>
  • Returns the list of fonts name available in the client system.

    Returns Promise<any>

Static onPrinterCreated

  • onPrinterCreated(callback: any, error: any, detail_level?: PrintersInfoLevel): string
  • Occurs when a new printer is created in the client system.

    Parameters

    • callback: any

      The callback function

    • error: any

      The error function

    • detail_level: PrintersInfoLevel = ...

      The printers info details level

    Returns string

Static onPrinterDeleted

  • onPrinterDeleted(callback: any, error: any, detail_level?: PrintersInfoLevel): string
  • Occurs when any printer is deleted from the client system.

    Parameters

    • callback: any

      The callback function

    • error: any

      The error function

    • detail_level: PrintersInfoLevel = ...

      The printers info details level

    Returns string

Static onPrinterUpdated

  • onPrinterUpdated(callback: any, error: any, detail_level?: PrintersInfoLevel): string
  • Occurs when any printer is updated in the client system.

    Parameters

    • callback: any

      The callback function

    • error: any

      The error function

    • detail_level: PrintersInfoLevel = ...

      The printers info details level

    Returns string

Static showAbout

  • showAbout(): Promise<any>
  • Displays the About dialog of the JSPrintManager Client App.

    Returns Promise<any>

Static start

  • start(secure?: boolean, host?: string, port?: number): Promise<void>
  • Starts a WebSocket communication with the JSPrintManager Client App.

    Parameters

    • secure: boolean = true

      True to use WebSocket Secure (wss://); otherwise false.

    • host: string = 'localhost'
    • port: number = 24443

      The local network port number.

    Returns Promise<void>

Static stop

  • stop(): void
  • Closes the WebSocket connection.

    Returns void

Static unsubscribePrinterEvent

  • unsubscribePrinterEvent(id: any): Promise<unknown>
  • Unsubscribes a given event ID

    Parameters

    • id: any

      The event ID

    Returns Promise<unknown>

Static updateClient

  • updateClient(): Promise<any>
  • Performs the update process of the JSPrintManager Client App.

    Returns Promise<any>