blob: 94fdf0a02da8c4bb624713d62e99adb9bec2dd11 [file] [log] [blame]
Andrew Moylanff6be512018-07-03 11:05:01 +10001// 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
14namespace ml {
15
16class 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:
27 void GetModelProvider(
28 chromeos::machine_learning::mojom::ModelProviderRequest request) override;
29
30 mojo::Binding<chromeos::machine_learning::mojom::MachineLearningService>
31 binding_;
32
33 DISALLOW_COPY_AND_ASSIGN(MachineLearningServiceImpl);
34};
35
36} // namespace ml
37
38#endif // ML_MACHINE_LEARNING_SERVICE_IMPL_H_