blob: 00273934dd9d1a0b9080ea7e54e34118655194b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module unzip.mojom;
import "components/services/filesystem/public/mojom/directory.mojom";
import "mojo/public/mojom/base/file_path.mojom";
import "mojo/public/mojom/base/read_only_file.mojom";
import "sandbox/policy/mojom/sandbox.mojom";
interface UnzipFilter {
[Sync]
ShouldUnzipFile(mojo_base.mojom.FilePath path) => (bool result);
};
// Interface to the out-of-process unzipper. The unzipper unzips a ZIP
// archive, often for the purpose of unpacking software updates.
[ServiceSandbox=sandbox.mojom.Sandbox.kUtility]
interface Unzipper {
// Unzip |zip_file| into |output_dir|.
// Returns true on success, false otherwise.
Unzip(mojo_base.mojom.ReadOnlyFile zip_file,
pending_remote<filesystem.mojom.Directory> output_dir)
=> (bool result);
// Same as |unzip| but only includes the files for which |filter| returns
// true. Note that this incurs one IPC for each file of the archive.
UnzipWithFilter(
mojo_base.mojom.ReadOnlyFile zip_file,
pending_remote<filesystem.mojom.Directory> output_dir,
pending_remote<UnzipFilter> filter) => (bool result);
};
|