1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.print;
18
19import android.os.Bundle;
20import android.print.IPrinterDiscoveryObserver;
21import android.print.IPrintDocumentAdapter;
22import android.print.PrintJobId;
23import android.print.IPrintJobStateChangeListener;
24import android.print.PrinterId;
25import android.print.PrintJobInfo;
26import android.print.PrintAttributes;
27import android.printservice.PrintServiceInfo;
28
29/**
30 * Interface for communication with the core print manager service.
31 *
32 * @hide
33 */
34interface IPrintManager {
35    List<PrintJobInfo> getPrintJobInfos(int appId, int userId);
36    PrintJobInfo getPrintJobInfo(in PrintJobId printJobId, int appId, int userId);
37    Bundle print(String printJobName, in IPrintDocumentAdapter printAdapter,
38            in PrintAttributes attributes, String packageName, int appId, int userId);
39    void cancelPrintJob(in PrintJobId printJobId, int appId, int userId);
40    void restartPrintJob(in PrintJobId printJobId, int appId, int userId);
41
42    void addPrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
43            int appId, int userId);
44    void removePrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
45            int userId);
46
47    List<PrintServiceInfo> getInstalledPrintServices(int userId);
48    List<PrintServiceInfo> getEnabledPrintServices(int userId);
49
50    void createPrinterDiscoverySession(in IPrinterDiscoveryObserver observer, int userId);
51    void startPrinterDiscovery(in IPrinterDiscoveryObserver observer,
52            in List<PrinterId> priorityList, int userId);
53    void stopPrinterDiscovery(in IPrinterDiscoveryObserver observer, int userId);
54    void validatePrinters(in List<PrinterId> printerIds, int userId);
55    void startPrinterStateTracking(in PrinterId printerId, int userId);
56    void stopPrinterStateTracking(in PrinterId printerId, int userId);
57    void destroyPrinterDiscoverySession(in IPrinterDiscoveryObserver observer,
58            int userId);
59}
60