printing_constants.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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 CHROMEOS_PRINTING_PRINTING_CONSTANTS_H_
  5. #define CHROMEOS_PRINTING_PRINTING_CONSTANTS_H_
  6. #include <stddef.h>
  7. namespace chromeos {
  8. // Maximum size of a PPD file that we will accept, currently 250k. This number
  9. // is relatively
  10. // arbitrary, we just don't want to try to handle ridiculously huge files.
  11. constexpr size_t kMaxPpdSizeBytes = 250 * 1024;
  12. // Printing protocol schemes.
  13. inline constexpr char kIppScheme[] = "ipp";
  14. inline constexpr char kIppsScheme[] = "ipps";
  15. inline constexpr char kUsbScheme[] = "usb";
  16. inline constexpr char kHttpScheme[] = "http";
  17. inline constexpr char kHttpsScheme[] = "https";
  18. inline constexpr char kSocketScheme[] = "socket";
  19. inline constexpr char kLpdScheme[] = "lpd";
  20. constexpr int kIppPort = 631;
  21. // IPPS commonly uses the HTTPS port despite the spec saying it should use the
  22. // IPP port.
  23. constexpr int kIppsPort = 443;
  24. } // namespace chromeos
  25. #endif // CHROMEOS_PRINTING_PRINTING_CONSTANTS_H_