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
|
explicit |
- Parameters
-
ip IP address to be binded to the App
Member Function Documentation
| 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
| 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)
| 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
| 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
| 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
| 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
| 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
| 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
| void asyncGetPrinters | ( | dpyPrinter::print_list_handler | handler | ) |
- Parameters
-
handler Handler to be called when a response comes from the service
| 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
| 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
| 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
| 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
| 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
| 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)
| bool isAlive | ( | ) |
- Returns
- Boolean indicating if Printer is alive
| 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
| 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
| void printerEvent_S | ( | dpyPrinter::printer_event_handler_function | handler | ) |
- Parameters
-
handler Handler to be called when a new event comes from the service
| 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
| 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
| 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
