FreeRDP
Loading...
Searching...
No Matches
com.freerdp.freerdpcore.presentation.PrintJobMonitor Class Reference
Inheritance diagram for com.freerdp.freerdpcore.presentation.PrintJobMonitor:
Collaboration diagram for com.freerdp.freerdpcore.presentation.PrintJobMonitor:

Data Structures

interface  Listener
 

Public Member Functions

 PrintJobMonitor (Listener listener)
 
void onEvent (int event, @Nullable String path)
 

Detailed Description

Watches /sdcard/Download for new rdp_print_*.pdf files written by the printer backend. Fires onPrintJobComplete when the file is fully written (CLOSE_WRITE event).

Definition at line 23 of file PrintJobMonitor.java.

Constructor & Destructor Documentation

◆ PrintJobMonitor()

com.freerdp.freerdpcore.presentation.PrintJobMonitor.PrintJobMonitor ( Listener  listener)
inline

Definition at line 36 of file PrintJobMonitor.java.

37 {
38 super(new File(WATCH_DIR), CLOSE_WRITE);
39 this.listener = listener;
40 }

Member Function Documentation

◆ onEvent()

void com.freerdp.freerdpcore.presentation.PrintJobMonitor.onEvent ( int  event,
@Nullable String  path 
)
inline

Definition at line 42 of file PrintJobMonitor.java.

43 {
44 if (path == null)
45 return;
46 if (!path.startsWith(PREFIX) || !path.endsWith(SUFFIX))
47 return;
48 listener.onPrintJobComplete(new File(WATCH_DIR, path));
49 }

The documentation for this class was generated from the following file: