blob: b9c7640feabb6f02d23c12d07cf0081ec46e2875 [file] [log] [blame]
// Copyright 2020 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 chromeos.printing.printing_manager.mojom;
import "mojo/public/mojom/base/string16.mojom";
import "mojo/public/mojom/base/time.mojom";
import "url/mojom/url.mojom";
// Enumeration of print job status.
enum PrintJobCompletionStatus {
kFailed,
kCanceled,
kPrinted
};
// Contains all the information in regards to a print job. Information is
// provided by the printer. Printer details, i.e. name and uri, can be edited
// via print settings.
struct PrintJobInfo {
// Unique identifier for a particular print job.
string id;
// Title of the print job. Usually the name of the printed file.
mojo_base.mojom.String16 title;
// Corresponds to the status of the print job after it the print job has
// finished.
PrintJobCompletionStatus completion_status;
// Time of when the print job was requested.
mojo_base.mojom.Time creation_time;
// Number of pages requested to print.
uint32 number_of_pages;
// The printer destination the print job was sent to.
mojo_base.mojom.String16 printer_name;
// The URI of the printer the print job was requested to.
url.mojom.Url printer_uri;
};
// Provides APIs to retrieve print metadata information. This API is exposed
// only to the Print Management App (chrome://print-management). Interfaces are
// implemented by a browser service. Interacts with PrintHistory API to retrieve
// print job metadatas.
interface PrintingMetadataProvider {
// Returns an array of PrintJobInfo. This is the main function to retrieve
// the print history of a device.
GetPrintJobs() => (array<PrintJobInfo> print_jobs);
};