Svetoslav Ganov | 4b9a4d1 | 2013-06-11 15:20:06 -0700 | [diff] [blame] | 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 | |
Svetoslav | 7bfbbcb | 2013-10-10 13:36:23 -0700 | [diff] [blame] | 19 | import android.os.Bundle; |
Svetoslav Ganov | 44720af | 2013-08-20 16:32:53 -0700 | [diff] [blame] | 20 | import android.print.IPrinterDiscoveryObserver; |
Svetoslav Ganov | a002715 | 2013-06-25 14:59:53 -0700 | [diff] [blame] | 21 | import android.print.IPrintDocumentAdapter; |
Svetoslav | 2fbd2a7 | 2013-09-16 17:53:51 -0700 | [diff] [blame] | 22 | import android.print.PrintJobId; |
Svetoslav Ganov | 704697b | 2013-09-21 20:30:24 -0700 | [diff] [blame] | 23 | import android.print.IPrintJobStateChangeListener; |
Svetoslav Ganov | 44720af | 2013-08-20 16:32:53 -0700 | [diff] [blame] | 24 | import android.print.PrinterId; |
Svetoslav Ganov | 4b9a4d1 | 2013-06-11 15:20:06 -0700 | [diff] [blame] | 25 | import android.print.PrintJobInfo; |
| 26 | import android.print.PrintAttributes; |
Svetoslav Ganov | 860f8a6 | 2013-09-14 00:59:03 -0700 | [diff] [blame] | 27 | import android.printservice.PrintServiceInfo; |
Svetoslav Ganov | 4b9a4d1 | 2013-06-11 15:20:06 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Interface for communication with the core print manager service. |
| 31 | * |
| 32 | * @hide |
| 33 | */ |
| 34 | interface IPrintManager { |
Svetoslav Ganov | a002715 | 2013-06-25 14:59:53 -0700 | [diff] [blame] | 35 | List<PrintJobInfo> getPrintJobInfos(int appId, int userId); |
Svetoslav | 2fbd2a7 | 2013-09-16 17:53:51 -0700 | [diff] [blame] | 36 | PrintJobInfo getPrintJobInfo(in PrintJobId printJobId, int appId, int userId); |
Svetoslav | 7bfbbcb | 2013-10-10 13:36:23 -0700 | [diff] [blame] | 37 | Bundle print(String printJobName, in IPrintDocumentAdapter printAdapter, |
| 38 | in PrintAttributes attributes, String packageName, int appId, int userId); |
Svetoslav | 2fbd2a7 | 2013-09-16 17:53:51 -0700 | [diff] [blame] | 39 | void cancelPrintJob(in PrintJobId printJobId, int appId, int userId); |
| 40 | void restartPrintJob(in PrintJobId printJobId, int appId, int userId); |
Svetoslav Ganov | 44720af | 2013-08-20 16:32:53 -0700 | [diff] [blame] | 41 | |
Svetoslav Ganov | 704697b | 2013-09-21 20:30:24 -0700 | [diff] [blame] | 42 | void addPrintJobStateChangeListener(in IPrintJobStateChangeListener listener, |
| 43 | int appId, int userId); |
| 44 | void removePrintJobStateChangeListener(in IPrintJobStateChangeListener listener, |
| 45 | int userId); |
| 46 | |
Svetoslav | d8dbc13 | 2013-09-27 18:29:53 -0700 | [diff] [blame] | 47 | List<PrintServiceInfo> getInstalledPrintServices(int userId); |
Svetoslav Ganov | 860f8a6 | 2013-09-14 00:59:03 -0700 | [diff] [blame] | 48 | List<PrintServiceInfo> getEnabledPrintServices(int userId); |
| 49 | |
Svetoslav Ganov | 44720af | 2013-08-20 16:32:53 -0700 | [diff] [blame] | 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); |
Svetoslav Ganov | d26d489 | 2013-08-28 14:37:54 -0700 | [diff] [blame] | 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); |
Svetoslav Ganov | 44720af | 2013-08-20 16:32:53 -0700 | [diff] [blame] | 57 | void destroyPrinterDiscoverySession(in IPrinterDiscoveryObserver observer, |
| 58 | int userId); |
Svetoslav Ganov | 4b9a4d1 | 2013-06-11 15:20:06 -0700 | [diff] [blame] | 59 | } |