| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.test.workscheduler; |
| |
| using fuchsia.sys2; |
| |
| /// A protocol used in testing by a component instance to report that work has been dispatched. |
| /// |
| /// For example: |
| /// |
| /// - `integration-test` hosts `work-scheduler`, starts `client`. |
| /// - `client --- WorkScheduler.ScheduleWork(work_id, ...) --> work-scheduler` |
| /// - `client <-- Worker.DoWork(work_id) --------------------> work-scheduler` |
| /// - `client --- WorkSchedulerDispatchReporter(work_id) ------> integration-test` |
| /// |
| /// This protocol enables `integration-test` to confirm that the `DoWork` invocation reached |
| /// `client`. |
| [Discoverable] |
| protocol WorkSchedulerDispatchReporter { |
| /// Report that `WorkScheduler.DoWork(work_id)` was successfully invoked on a component. |
| OnDoWorkCalled(string:fuchsia.sys2.MAX_WORK_ID_LENGTH work_id) -> (); |
| }; |