| // Copyright 2023 The ChromiumOS Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // API exposed by printscanmgr's root-level executor. The only client is the |
| // sandboxed printscanmgr daemon when it needs to perform a high-privilege |
| // operation. |
| |
| module printscanmgr.mojom; |
| |
| // Enumeration of the upstart jobs that the executor can control. |
| enum UpstartJob { |
| kCupsd = 0, |
| kLorgnette = 1, |
| }; |
| |
| interface Executor { |
| // Requests that the init daemon stop `job`. If `success` is false, then |
| // `errorMsg` contains details about the failure. |
| [Sync] |
| StopUpstartJob(UpstartJob job) => (bool success, string errorMsg); |
| // Requests that the init daemon restart `job`. If `success` is false, then |
| // `errorMsg` contains details about the failure. |
| [Sync] |
| RestartUpstartJob(UpstartJob job) => (bool success, string errorMsg); |
| }; |