// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module ash.trash_service.mojom;
import "sandbox/policy/mojom/sandbox.mojom";
import "mojo/public/mojom/base/file_error.mojom";
import "mojo/public/mojom/base/file_path.mojom";
import "mojo/public/mojom/base/read_only_file.mojom";
import "mojo/public/mojom/base/time.mojom";
// Interface to the out-of-process Trash service. The service parses the
// .trashinfo files and returns a path to restore the files to as well as the
// deleted date.
[ServiceSandbox=sandbox.mojom.Sandbox.kUtility]
interface TrashService {
// Attempts to parse the .trashinfo file at `trash_info_file`.
ParseTrashInfoFile(mojo_base.mojom.ReadOnlyFile trash_info_file) => (
mojo_base.mojom.FileError error,
mojo_base.mojom.FilePath restore_path,
mojo_base.mojom.Time deletion_date);
};