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

Unified Diff: chromeos/dbus/debug_daemon_client.h

Issue 2618683003: Update debugd client. (Closed)
Patch Set: Change result code from bool to int32 at skaus request Created 3 years, 11 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 | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.h
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index 2a7a3185919dd2073d07e481b22b258379f76b30..4d8541aedf5041491cf97c9bd0ac91ab2c7780d8 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -210,7 +210,12 @@ class CHROMEOS_EXPORT DebugDaemonClient
const SetOomScoreAdjCallback& callback) = 0;
// A callback to handle the result of CupsAddPrinter.
- using CupsAddPrinterCallback = base::Callback<void(bool success)>;
+ using LegacyCupsAddPrinterCallback = base::Callback<void(bool status)>;
+
+ // A callback to handle the result of CupsAdd[Auto|Manually]ConfiguredPrinter.
+ // A zero status means success, non-zero statuses are used to convey different
+ // errors.
+ using CupsAddPrinterCallback = base::Callback<void(int32_t status)>;
skau 2017/01/25 00:16:40 Are you going to use u or i in the dbus specificat
Carlson 2017/01/25 00:32:35 Was planning to use int32_t; is there a reason you
// Calls CupsAddPrinter. |name| is the printer name. |uri| is the device
// uri. |ppd_path| is the absolute path to the PPD file. |ipp_everywhere|
@@ -218,13 +223,40 @@ class CHROMEOS_EXPORT DebugDaemonClient
// true if adding the printer to CUPS was successful and false if there was an
// error. |error_callback| will be called if there was an error in
// communicating with debugd.
+ //
+ // Obsoleted by CupsAddAutoConfiguredPrinter and
+ // CupsAddManuallyConfiguredPrinter.
virtual void CupsAddPrinter(const std::string& name,
const std::string& uri,
const std::string& ppd_path,
bool ipp_everywhere,
- const CupsAddPrinterCallback& callback,
+ const LegacyCupsAddPrinterCallback& callback,
const base::Closure& error_callback) = 0;
+ // Calls CupsAddManuallyConfiguredPrinter. |name| is the printer
+ // name. |uri| is the device. |ppd_contents| is the contents of the
+ // PPD file used to drive the device. |callback| is called with
+ // true if adding the printer to CUPS was successful and false if
+ // there was an error. |error_callback| will be called if there was
+ // an error in communicating with debugd.
+ virtual void CupsAddManuallyConfiguredPrinter(
+ const std::string& name,
+ const std::string& uri,
+ const std::string& ppd_contents,
+ const CupsAddPrinterCallback& callback,
+ const base::Closure& error_callback) = 0;
+
+ // Calls CupsAddAutoConfiguredPrinter. |name| is the printer
+ // name. |uri| is the device. |callback| is called with true if
+ // adding the printer to CUPS was successful and false if there was
+ // an error. |error_callback| will be called if there was an error
+ // in communicating with debugd.
+ virtual void CupsAddAutoConfiguredPrinter(
+ const std::string& name,
+ const std::string& uri,
+ const CupsAddPrinterCallback& callback,
+ const base::Closure& error_callback) = 0;
+
// A callback to handle the result of CupsRemovePrinter.
using CupsRemovePrinterCallback = base::Callback<void(bool success)>;
« no previous file with comments | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698