blob: 94fdf0a02da8c4bb624713d62e99adb9bec2dd11 [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ML_MACHINE_LEARNING_SERVICE_IMPL_H_
#define ML_MACHINE_LEARNING_SERVICE_IMPL_H_
#include <base/callback_forward.h>
#include <base/macros.h>
#include <mojo/public/cpp/bindings/binding.h>
#include "mojom/machine_learning_service.mojom.h"
namespace ml {
class MachineLearningServiceImpl
: public chromeos::machine_learning::mojom::MachineLearningService {
public:
// Creates an instance bound to |pipe|. The specified
// |connection_error_handler| will be invoked if the binding encounters a
// connection error.
MachineLearningServiceImpl(mojo::ScopedMessagePipeHandle pipe,
base::Closure connection_error_handler);
private:
// chromeos::machine_learning::mojom::MachineLearningService:
void GetModelProvider(
chromeos::machine_learning::mojom::ModelProviderRequest request) override;
mojo::Binding<chromeos::machine_learning::mojom::MachineLearningService>
binding_;
DISALLOW_COPY_AND_ASSIGN(MachineLearningServiceImpl);
};
} // namespace ml
#endif // ML_MACHINE_LEARNING_SERVICE_IMPL_H_