IPrintSpooler.aidl revision 269403b032f965ff3847eb982c2f697229dc5a92
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.content.ComponentName;
20import android.os.ParcelFileDescriptor;
21import android.print.PrinterId;
22import android.print.IPrintDocumentAdapter;
23import android.print.IPrintClient;
24import android.print.IPrintSpoolerClient;
25import android.print.IPrintSpoolerCallbacks;
26import android.print.PrinterInfo;
27import android.print.PrintAttributes;
28
29/**
30 * Interface for communication with the print spooler service.
31 *
32 * @see android.print.IPrintSpoolerCallbacks
33 *
34 * @hide
35 */
36oneway interface IPrintSpooler {
37    void getPrintJobInfos(IPrintSpoolerCallbacks callback, in ComponentName componentName,
38            int state, int appId, int sequence);
39    void getPrintJobInfo(int printJobId, IPrintSpoolerCallbacks callback,
40            int appId, int sequence);
41    void createPrintJob(String printJobName, in IPrintClient client,
42            in IPrintDocumentAdapter printAdapter, in PrintAttributes attributes,
43            IPrintSpoolerCallbacks callback, int appId, int sequence);
44    void setPrintJobState(int printJobId, int status, String error,
45            IPrintSpoolerCallbacks callback, int sequence);
46    void setPrintJobTag(int printJobId, String tag, IPrintSpoolerCallbacks callback,
47            int sequence);
48    void writePrintJobData(in ParcelFileDescriptor fd, int printJobId);
49    void setClient(IPrintSpoolerClient client);
50
51    // Printer discovery APIs
52    void onPrintersAdded(in List<PrinterInfo> printers);
53    void onPrintersRemoved(in List<PrinterId> printerIds);
54    void onPrintersUpdated(in List<PrinterInfo> printerIds);
55}
56