blob: 8fa7ab90ebad5485b1261282f8fe5e93940d9b8a [file] [log] [blame]
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -07001/*
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
Svetoslav7bfbbcb2013-10-10 13:36:23 -070019import android.os.Bundle;
Svetoslav Ganov44720af2013-08-20 16:32:53 -070020import android.print.IPrinterDiscoveryObserver;
Svetoslav Ganova0027152013-06-25 14:59:53 -070021import android.print.IPrintDocumentAdapter;
Svetoslav2fbd2a72013-09-16 17:53:51 -070022import android.print.PrintJobId;
Svetoslav Ganov704697b2013-09-21 20:30:24 -070023import android.print.IPrintJobStateChangeListener;
Svetoslav Ganov44720af2013-08-20 16:32:53 -070024import android.print.PrinterId;
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -070025import android.print.PrintJobInfo;
26import android.print.PrintAttributes;
Svetoslav Ganov860f8a62013-09-14 00:59:03 -070027import android.printservice.PrintServiceInfo;
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -070028
29/**
30 * Interface for communication with the core print manager service.
31 *
32 * @hide
33 */
34interface IPrintManager {
Svetoslav Ganova0027152013-06-25 14:59:53 -070035 List<PrintJobInfo> getPrintJobInfos(int appId, int userId);
Svetoslav2fbd2a72013-09-16 17:53:51 -070036 PrintJobInfo getPrintJobInfo(in PrintJobId printJobId, int appId, int userId);
Svetoslav7bfbbcb2013-10-10 13:36:23 -070037 Bundle print(String printJobName, in IPrintDocumentAdapter printAdapter,
38 in PrintAttributes attributes, String packageName, int appId, int userId);
Svetoslav2fbd2a72013-09-16 17:53:51 -070039 void cancelPrintJob(in PrintJobId printJobId, int appId, int userId);
40 void restartPrintJob(in PrintJobId printJobId, int appId, int userId);
Svetoslav Ganov44720af2013-08-20 16:32:53 -070041
Svetoslav Ganov704697b2013-09-21 20:30:24 -070042 void addPrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
43 int appId, int userId);
44 void removePrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
45 int userId);
46
Svetoslavd8dbc132013-09-27 18:29:53 -070047 List<PrintServiceInfo> getInstalledPrintServices(int userId);
Svetoslav Ganov860f8a62013-09-14 00:59:03 -070048 List<PrintServiceInfo> getEnabledPrintServices(int userId);
49
Svetoslav Ganov44720af2013-08-20 16:32:53 -070050 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 Ganovd26d4892013-08-28 14:37:54 -070054 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 Ganov44720af2013-08-20 16:32:53 -070057 void destroyPrinterDiscoverySession(in IPrinterDiscoveryObserver observer,
58 int userId);
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -070059}