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 
17 package android.print;
18 
19 import android.os.Bundle;
20 import android.print.IPrinterDiscoveryObserver;
21 import android.print.IPrintDocumentAdapter;
22 import android.print.PrintJobId;
23 import android.print.IPrintJobStateChangeListener;
24 import android.print.PrinterId;
25 import android.print.PrintJobInfo;
26 import android.print.PrintAttributes;
27 import android.printservice.PrintServiceInfo;
28 
29 /**
30  * Interface for communication with the core print manager service.
31  *
32  * @hide
33  */
34 interface IPrintManager {
getPrintJobInfos(int appId, int userId)35     List<PrintJobInfo> getPrintJobInfos(int appId, int userId);
getPrintJobInfo(in PrintJobId printJobId, int appId, int userId)36     PrintJobInfo getPrintJobInfo(in PrintJobId printJobId, int appId, int userId);
print(String printJobName, in IPrintDocumentAdapter printAdapter, in PrintAttributes attributes, String packageName, int appId, int userId)37     Bundle print(String printJobName, in IPrintDocumentAdapter printAdapter,
38             in PrintAttributes attributes, String packageName, int appId, int userId);
cancelPrintJob(in PrintJobId printJobId, int appId, int userId)39     void cancelPrintJob(in PrintJobId printJobId, int appId, int userId);
restartPrintJob(in PrintJobId printJobId, int appId, int userId)40     void restartPrintJob(in PrintJobId printJobId, int appId, int userId);
41 
addPrintJobStateChangeListener(in IPrintJobStateChangeListener listener, int appId, int userId)42     void addPrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
43             int appId, int userId);
removePrintJobStateChangeListener(in IPrintJobStateChangeListener listener, int userId)44     void removePrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
45             int userId);
46 
getInstalledPrintServices(int userId)47     List<PrintServiceInfo> getInstalledPrintServices(int userId);
getEnabledPrintServices(int userId)48     List<PrintServiceInfo> getEnabledPrintServices(int userId);
49 
createPrinterDiscoverySession(in IPrinterDiscoveryObserver observer, int userId)50     void createPrinterDiscoverySession(in IPrinterDiscoveryObserver observer, int userId);
startPrinterDiscovery(in IPrinterDiscoveryObserver observer, in List<PrinterId> priorityList, int userId)51     void startPrinterDiscovery(in IPrinterDiscoveryObserver observer,
52             in List<PrinterId> priorityList, int userId);
stopPrinterDiscovery(in IPrinterDiscoveryObserver observer, int userId)53     void stopPrinterDiscovery(in IPrinterDiscoveryObserver observer, int userId);
validatePrinters(in List<PrinterId> printerIds, int userId)54     void validatePrinters(in List<PrinterId> printerIds, int userId);
startPrinterStateTracking(in PrinterId printerId, int userId)55     void startPrinterStateTracking(in PrinterId printerId, int userId);
stopPrinterStateTracking(in PrinterId printerId, int userId)56     void stopPrinterStateTracking(in PrinterId printerId, int userId);
destroyPrinterDiscoverySession(in IPrinterDiscoveryObserver observer, int userId)57     void destroyPrinterDiscoverySession(in IPrinterDiscoveryObserver observer,
58             int userId);
59 }
60