blob: 8bdff8aafe56aeae333b778fecfe56214e9da495 [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 DLCSERVICE_UTILS_H_
#define DLCSERVICE_UTILS_H_
#include <string>
#include <base/files/file_path.h>
#include <libimageloader/manifest.h>
namespace dlcservice {
namespace utils {
// Returns the path to a DLC module.
base::FilePath GetDlcModulePath(const base::FilePath& dlc_module_root_path,
const std::string& dlc_module_id);
// Returns the path to a DLC module image.
base::FilePath GetDlcModuleImagePath(const base::FilePath& dlc_module_root_path,
const std::string& dlc_module_id,
int current_slot);
bool GetDlcManifest(const base::FilePath& dlc_manifest_path,
const std::string& dlc_module_id,
imageloader::Manifest* manifest_out);
// Returns the directory inside a DLC module which is mounted at
// |dlc_mount_point|.
base::FilePath GetDlcRootInModulePath(const base::FilePath& dlc_mount_point);
} // namespace utils
} // namespace dlcservice
#endif // DLCSERVICE_UTILS_H_