PrinterManager Class Reference
Allows to interact with Printer Service.
#include <printerApi.h>
Public Member Functions | |
| PrinterManager (std::string ip="127.0.0.1") | |
| Constructor of the class. More... | |
| ~PrinterManager () | |
| Destructor of the class. | |
| bool | isAlive () |
| Method to check if Printer Service is alive. More... | |
| void | monitorServiceAvailability_S (dpyPrinter::service_availability_handler handler) |
| void | monitorServiceAvailability_U () |
| void | asyncGetPrinters (dpyPrinter::print_list_handler handler) |
| Method which requests available printers. More... | |
| void | asyncGetPrinterInfo (dpyPrinter::printer_info_handler handler, const std::string &printerid) |
| Gets printer info. More... | |
| void | asyncPrintImage (dpyPrinter::print_image_handler handler, const std::string &printerid, std::string image_path, std::list< PrintConfig > configs) |
| Method which requests to print an image with a given configuration. If sucessful, this will add a job to the job list. More... | |
| void | asyncPrintHtml (dpyPrinter::print_html_handler handler, const std::string &printerid, std::string html_path, std::list< PrintConfig > configs) |
| Method which requests to print from a html with a given configuration. If sucessful, this will add a job to the job list. More... | |
| void | asyncGetJobInfo (dpyPrinter::job_info_handler handler, int jobid) |
| Gets job information. More... | |
| void | asyncGetAllJobInfo (dpyPrinter::all_job_info_handler handler, const std::string &printerid) |
| Gets every job information. More... | |
| void | asyncDeleteJob (dpyPrinter::result_handler_function handler, int jobid) |
| Deletes a job from the list. More... | |
| void | asyncForcePrinterUpgrade (dpyPrinter::result_handler_function handler, const std::string &printerid) |
| Forces upgrade of printer firmware. More... | |
| void | asyncSetDefaultConfiguration (dpyPrinter::result_handler_function handler, const std::string &printerid, PrintConfig printConfig) |
| Modifies a printer config. More... | |
| void | asyncGetDefaultConfiguration (dpyPrinter::printerconfig_handler_function handler, const std::string &printerid) |
| Gets printer config. More... | |
| void | asyncPrintTestTicket (dpyPrinter::result_handler_function handler, const std::string &printerid) |
| Prints a test ticket. More... | |
| void | asyncStoreNVImage (dpyPrinter::result_handler_function handler, const std::string &printerid, const std::string &image_path, int slotid) |
| Stores image in non-volatile memory. More... | |
| void | asyncDeleteNVImage (dpyPrinter::result_handler_function handler, const std::string &printerid, int slotid) |
| Deletes image stored in non-volatile memory. More... | |
| void | asyncGetNVImageList (dpyPrinter::printerimagelist_handler_function handler, const std::string &printerid) |
| Gets list of images stored in non-volatile memory. More... | |
| void | asyncPrintNVImage (dpyPrinter::print_image_handler handler, const std::string &printerid, int slotid, std::list< PrintConfig > configs) |
| Prints the image stored in the non-volatile memory area of the printer. More... | |
| void | printerListEvent_S (dpyPrinter::printer_list_event_handler_function handler) |
| Subscribes to printer list events. More... | |
| void | printerJobStatusEvent_S (dpyPrinter::job_status_event_handler_function handler) |
| Subscribes to job status events. More... | |
| void | printerEvent_S (dpyPrinter::printer_event_handler_function handler) |
| Subscribes to printer events. More... | |
| void | printerStatusEvent_S (dpyPrinter::printer_status_event_handler_function handler) |
| Subscribes to printer status events. More... | |
| void | paperLevelEvent_S (dpyPrinter::paper_level_event_handler_function handler) |
| Subscribes to paper events. More... | |
| void | NVImageListEvent_S (dpyPrinter::printer_imagelist_event_handler_function handler) |
| Subscribes to non-volatile memory images list events. More... | |
Constructor & Destructor Documentation
◆ PrinterManager()
|
explicit |
- Parameters
-
ip IP address to be binded to the App
Member Function Documentation
◆ asyncDeleteJob()
| void asyncDeleteJob | ( | dpyPrinter::result_handler_function | handler, |
| int | jobid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service jobid job id
◆ asyncDeleteNVImage()
| void asyncDeleteNVImage | ( | dpyPrinter::result_handler_function | handler, |
| const std::string & | printerid, | ||
| int | slotid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id slotid Slot id where the image is stored (0 to 3)
◆ asyncForcePrinterUpgrade()
| void asyncForcePrinterUpgrade | ( | dpyPrinter::result_handler_function | handler, |
| const std::string & | printerid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id
◆ asyncGetAllJobInfo()
| void asyncGetAllJobInfo | ( | dpyPrinter::all_job_info_handler | handler, |
| const std::string & | printerid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id
◆ asyncGetDefaultConfiguration()
| void asyncGetDefaultConfiguration | ( | dpyPrinter::printerconfig_handler_function | handler, |
| const std::string & | printerid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id
◆ asyncGetJobInfo()
| void asyncGetJobInfo | ( | dpyPrinter::job_info_handler | handler, |
| int | jobid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service jobid job id
◆ asyncGetNVImageList()
| void asyncGetNVImageList | ( | dpyPrinter::printerimagelist_handler_function | handler, |
| const std::string & | printerid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id
◆ asyncGetPrinterInfo()
| void asyncGetPrinterInfo | ( | dpyPrinter::printer_info_handler | handler, |
| const std::string & | printerid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id
◆ asyncGetPrinters()
| void asyncGetPrinters | ( | dpyPrinter::print_list_handler | handler | ) |
- Parameters
-
handler Handler to be called when a response comes from the service
◆ asyncPrintHtml()
| void asyncPrintHtml | ( | dpyPrinter::print_html_handler | handler, |
| const std::string & | printerid, | ||
| std::string | html_path, | ||
| std::list< PrintConfig > | configs | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id html_path Path and Name to the html to be printed configs list of configs for this specific job
◆ asyncPrintImage()
| void asyncPrintImage | ( | dpyPrinter::print_image_handler | handler, |
| const std::string & | printerid, | ||
| std::string | image_path, | ||
| std::list< PrintConfig > | configs | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id image_path Path and Name to the image to be printed configs list of configs for this specific job
◆ asyncPrintNVImage()
| void asyncPrintNVImage | ( | dpyPrinter::print_image_handler | handler, |
| const std::string & | printerid, | ||
| int | slotid, | ||
| std::list< PrintConfig > | configs | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id slotid Slot id where the image is stored (0 to 3) configs list of configs for this specific job
◆ asyncPrintTestTicket()
| void asyncPrintTestTicket | ( | dpyPrinter::result_handler_function | handler, |
| const std::string & | printerid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id
◆ asyncSetDefaultConfiguration()
| void asyncSetDefaultConfiguration | ( | dpyPrinter::result_handler_function | handler, |
| const std::string & | printerid, | ||
| PrintConfig | printConfig | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id printConfig config to modify
◆ asyncStoreNVImage()
| void asyncStoreNVImage | ( | dpyPrinter::result_handler_function | handler, |
| const std::string & | printerid, | ||
| const std::string & | image_path, | ||
| int | slotid | ||
| ) |
- Parameters
-
handler Handler to be called when a response comes from the service printerid printer id image_path Path and name of the image to be saved slotid Slot id where the image will be stored (0 to 3)
◆ isAlive()
| bool isAlive | ( | ) |
- Returns
- Boolean indicating if Printer is alive
◆ NVImageListEvent_S()
| void NVImageListEvent_S | ( | dpyPrinter::printer_imagelist_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new NV memory images list event comes from the service
◆ paperLevelEvent_S()
| void paperLevelEvent_S | ( | dpyPrinter::paper_level_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new paper level event comes from the service
◆ printerEvent_S()
| void printerEvent_S | ( | dpyPrinter::printer_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new event comes from the service
◆ printerJobStatusEvent_S()
| void printerJobStatusEvent_S | ( | dpyPrinter::job_status_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new job status event comes from the service
◆ printerListEvent_S()
| void printerListEvent_S | ( | dpyPrinter::printer_list_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new printer list event comes from the service
◆ printerStatusEvent_S()
| void printerStatusEvent_S | ( | dpyPrinter::printer_status_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new printer status event comes from the service