blob: 9b15c9d796200c8d31d2888829e367340edb3fa0 [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 VM_TOOLS_GARCON_SERVICE_IMPL_H_
#define VM_TOOLS_GARCON_SERVICE_IMPL_H_
#include <memory>
#include <base/macros.h>
#include <grpc++/grpc++.h>
#include "container_guest.grpc.pb.h" // NOLINT(build/include)
namespace vm_tools {
namespace garcon {
class PackageKitProxy;
// Actually implements the garcon service.
class ServiceImpl final : public vm_tools::container::Garcon::Service {
public:
explicit ServiceImpl(PackageKitProxy* package_kit_proxy);
~ServiceImpl() override = default;
// Garcon::Service overrides.
grpc::Status LaunchApplication(
grpc::ServerContext* ctx,
const vm_tools::container::LaunchApplicationRequest* request,
vm_tools::container::LaunchApplicationResponse* response) override;
grpc::Status GetIcon(grpc::ServerContext* ctx,
const vm_tools::container::IconRequest* request,
vm_tools::container::IconResponse* response) override;
grpc::Status LaunchVshd(
grpc::ServerContext* ctx,
const vm_tools::container::LaunchVshdRequest* request,
vm_tools::container::LaunchVshdResponse* response) override;
grpc::Status GetLinuxPackageInfo(
grpc::ServerContext* ctx,
const vm_tools::container::LinuxPackageInfoRequest* request,
vm_tools::container::LinuxPackageInfoResponse* response) override;
grpc::Status InstallLinuxPackage(
grpc::ServerContext* ctx,
const vm_tools::container::InstallLinuxPackageRequest* request,
vm_tools::container::InstallLinuxPackageResponse* response) override;
grpc::Status GetDebugInformation(
grpc::ServerContext* ctx,
const vm_tools::container::GetDebugInformationRequest* request,
vm_tools::container::GetDebugInformationResponse* response) override;
private:
PackageKitProxy* package_kit_proxy_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(ServiceImpl);
};
} // namespace garcon
} // namespace vm_tools
#endif // VM_TOOLS_GARCON_SERVICE_IMPL_H_