Andrew Moylan | ff6be51 | 2018-07-03 11:05:01 +1000 | [diff] [blame] | 1 | // Copyright 2018 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef ML_MACHINE_LEARNING_SERVICE_IMPL_H_ |
| 6 | #define ML_MACHINE_LEARNING_SERVICE_IMPL_H_ |
| 7 | |
| 8 | #include <base/callback_forward.h> |
| 9 | #include <base/macros.h> |
| 10 | #include <mojo/public/cpp/bindings/binding.h> |
| 11 | |
| 12 | #include "mojom/machine_learning_service.mojom.h" |
| 13 | |
| 14 | namespace ml { |
| 15 | |
| 16 | class MachineLearningServiceImpl |
| 17 | : public chromeos::machine_learning::mojom::MachineLearningService { |
| 18 | public: |
| 19 | // Creates an instance bound to |pipe|. The specified |
| 20 | // |connection_error_handler| will be invoked if the binding encounters a |
| 21 | // connection error. |
| 22 | MachineLearningServiceImpl(mojo::ScopedMessagePipeHandle pipe, |
| 23 | base::Closure connection_error_handler); |
| 24 | |
| 25 | private: |
| 26 | // chromeos::machine_learning::mojom::MachineLearningService: |
Andrew Moylan | e465a59 | 2018-08-01 16:13:50 +1000 | [diff] [blame] | 27 | void LoadModel( |
| 28 | chromeos::machine_learning::mojom::ModelSpecPtr spec, |
| 29 | chromeos::machine_learning::mojom::ModelRequest request) override; |
Andrew Moylan | ff6be51 | 2018-07-03 11:05:01 +1000 | [diff] [blame] | 30 | |
| 31 | mojo::Binding<chromeos::machine_learning::mojom::MachineLearningService> |
| 32 | binding_; |
| 33 | |
| 34 | DISALLOW_COPY_AND_ASSIGN(MachineLearningServiceImpl); |
| 35 | }; |
| 36 | |
| 37 | } // namespace ml |
| 38 | |
| 39 | #endif // ML_MACHINE_LEARNING_SERVICE_IMPL_H_ |