print_backend_cups_ipp.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef PRINTING_BACKEND_PRINT_BACKEND_CUPS_IPP_H_
  5. #define PRINTING_BACKEND_PRINT_BACKEND_CUPS_IPP_H_
  6. #include <memory>
  7. #include <string>
  8. #include "printing/backend/cups_connection.h"
  9. #include "printing/backend/print_backend.h"
  10. #include "printing/mojom/print.mojom.h"
  11. namespace printing {
  12. class PrintBackendCupsIpp : public PrintBackend {
  13. public:
  14. explicit PrintBackendCupsIpp(std::unique_ptr<CupsConnection> connection);
  15. private:
  16. ~PrintBackendCupsIpp() override;
  17. // PrintBackend implementation.
  18. mojom::ResultCode EnumeratePrinters(PrinterList& printer_list) override;
  19. mojom::ResultCode GetDefaultPrinterName(
  20. std::string& default_printer) override;
  21. mojom::ResultCode GetPrinterBasicInfo(
  22. const std::string& printer_name,
  23. PrinterBasicInfo* printer_info) override;
  24. mojom::ResultCode GetPrinterCapsAndDefaults(
  25. const std::string& printer_name,
  26. PrinterCapsAndDefaults* printer_info) override;
  27. mojom::ResultCode GetPrinterSemanticCapsAndDefaults(
  28. const std::string& printer_name,
  29. PrinterSemanticCapsAndDefaults* printer_info) override;
  30. std::string GetPrinterDriverInfo(const std::string& printer_name) override;
  31. bool IsValidPrinter(const std::string& printer_name) override;
  32. std::unique_ptr<CupsConnection> cups_connection_;
  33. };
  34. } // namespace printing
  35. #endif // PRINTING_BACKEND_PRINT_BACKEND_CUPS_IPP_H_