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

Unified Diff: chromeos/dbus/debug_daemon_client.h

Issue 2232203003: Implement a dbus client for CupsTool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish addressing comments Created 4 years, 3 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 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();
« 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