1fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov/* 2fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * Copyright (C) 2014 The Android Open Source Project 3fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * 4fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * Licensed under the Apache License, Version 2.0 (the "License"); 5fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * you may not use this file except in compliance with the License. 6fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * You may obtain a copy of the License at 7fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * 8fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * http://www.apache.org/licenses/LICENSE-2.0 9fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * 10fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * Unless required by applicable law or agreed to in writing, software 11fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * distributed under the License is distributed on an "AS IS" BASIS, 12fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * See the License for the specific language governing permissions and 14fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * limitations under the License. 15fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov */ 16fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov 17fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganovpackage com.android.printspooler.model; 18fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov 19fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov/** 20fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * Callbacks interface for opening a file. 21fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov */ 22fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganovpublic interface OpenDocumentCallback { 23fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov public static final int ERROR_MALFORMED_PDF_FILE = -1; 24fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov public static final int ERROR_SECURE_PDF_FILE = -2; 25fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov 26fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov /** 27fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * Called after the file is opened. 28fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov */ 29fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov public void onSuccess(); 30fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov 31fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov /** 32fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * Called after opening the file failed. 33fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * 34fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov * @param error The error. 35fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov */ 36fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov public void onFailure(int error); 37fce84f035c35606c5707e735f503f7bdcfd5b2a1Svet Ganov} 38