Index: chromeos/dbus/debug_daemon_client.h |
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h |
index af32bdc4ce0617594d7178bdda8a9aef2e42a70e..2a7a3185919dd2073d07e481b22b258379f76b30 100644 |
--- a/chromeos/dbus/debug_daemon_client.h |
+++ b/chromeos/dbus/debug_daemon_client.h |
@@ -209,6 +209,33 @@ class CHROMEOS_EXPORT DebugDaemonClient |
const std::map<pid_t, int32_t>& pid_to_oom_score_adj, |
const SetOomScoreAdjCallback& callback) = 0; |
+ // A callback to handle the result of CupsAddPrinter. |
+ using CupsAddPrinterCallback = base::Callback<void(bool success)>; |
+ |
+ // Calls CupsAddPrinter. |name| is the printer name. |uri| is the device |
+ // uri. |ppd_path| is the absolute path to the PPD file. |ipp_everywhere| |
+ // is true for autoconf of IPP Everywhere printers. |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 CupsAddPrinter(const std::string& name, |
+ const std::string& uri, |
+ const std::string& ppd_path, |
+ bool ipp_everywhere, |
+ const CupsAddPrinterCallback& callback, |
+ const base::Closure& error_callback) = 0; |
+ |
+ // A callback to handle the result of CupsRemovePrinter. |
+ using CupsRemovePrinterCallback = base::Callback<void(bool success)>; |
+ |
+ // Calls CupsRemovePrinter. |name| is the printer name as registered in |
+ // CUPS. |callback| is called with true if removing the printer from 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 CupsRemovePrinter(const std::string& name, |
+ const CupsRemovePrinterCallback& callback, |
+ const base::Closure& error_callback) = 0; |
+ |
// Factory function, creates a new instance and returns ownership. |
// For normal usage, access the singleton via DBusThreadManager::Get(). |
static DebugDaemonClient* Create(); |