Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: chrome/browser/chromeos/printing/printer_info.h

Issue 2891643002: Add a method to query IPP printers for attributes. (Closed)
Patch Set: check empty Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/printing/printer_info_cups.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/printing/printer_info.h
diff --git a/chrome/browser/chromeos/printing/printer_info.h b/chrome/browser/chromeos/printing/printer_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..f295ef52b308aa4f1a9f41698bc285ef3930bc70
--- /dev/null
+++ b/chrome/browser/chromeos/printing/printer_info.h
@@ -0,0 +1,32 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_INFO_H_
+#define CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_INFO_H_
+
+#include <string>
+
+#include "base/callback_forward.h"
+
+namespace chromeos {
+
+// Callback for basic printer information. |success| indicates if the request
+// succeeded at all. |make| represents the printer manufacturer. |model| is
+// the printer model. |autoconf| indicates if we think we can compute the
+// printer capabilites without a PPD.
+using PrinterInfoCallback = base::Callback<void(bool success,
+ const std::string& make,
+ const std::string& model,
+ bool autoconf)>;
+
+// Dispatch an IPP request to |host| on |port| for |path| to obtain
+// basic printer information.
+void QueryIppPrinter(const std::string& host,
+ const int port,
+ const std::string& path,
+ const PrinterInfoCallback& callback);
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_INFO_H_
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/printing/printer_info_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698