package com.epson.iprint.shared;

import android.os.Bundle;

import java.io.Serializable;
import java.util.ArrayList;

public class SharedParamScan extends SharedParam implements Serializable {
    private static final long serialVersionUID = 1810612490181007537L;
    private ArrayList<String> arrayOutFilePath = null;
    private String file_name = null;
    private String folder_name = null;
    private int pixel_main = 0;
    private int pixel_sub = 0;
    private int res_main = 0;
    private int res_sub = 0;
    private int scan_mode = 0;
    private int scan_type = 0;

    public /* bridge */ /* synthetic */ String getPackage_name() {
        return super.getPackage_name();
    }

    public /* bridge */ /* synthetic */ boolean isAvailable() {
        return super.isAvailable();
    }

    protected void setParam(Bundle bundle) throws SharedDataException {
        scan_type = bundle.getInt("SCAN_TYPE");
        int i = scan_type;
        if (i < 1 || i > 3) {
            throw new ParametersErrorException("SCAN_TYPE errorr");
        }
        pixel_main = bundle.getInt("PIXEL_MAIN");
        if (pixel_main >= 0) {
            pixel_sub = bundle.getInt("PIXEL_SUB");
            res_main = bundle.getInt("RES_MAIN");
            res_sub = bundle.getInt("RES_SUB");
            folder_name = bundle.getString("FOLDER_NAME");
            file_name = bundle.getString("FILE_NAME");
            scan_mode = bundle.getInt("SCAN_MODE");
            package_name = bundle.getString(EpsoniPrintSharedActivity.PARAM_KEY_CALLER_PACKAGE_NAME);
            arrayOutFilePath = new ArrayList<>();
            isValid = true;
            return;
        }
        throw new ParametersErrorException("PIXEL_MAIN errorr");
    }

    public int getScan_type() {
        return scan_type;
    }

    public int getPixel_main() {
        return pixel_main;
    }

    public int getPixel_sub() {
        return pixel_sub;
    }

    public int getRes_main() {
        return res_main;
    }

    public int getRes_sub() {
        return res_sub;
    }

    public String getFolder_name() {
        return folder_name;
    }

    public String getFile_name() {
        return file_name;
    }

    public int getScan_mode() {
        return scan_mode;
    }

    public ArrayList<String> getArrayOutFilePath() {
        return arrayOutFilePath;
    }

    public void setArrayOutFilePath(String str) {
        arrayOutFilePath.add(str);
    }

    public void clearArrayOutFilePath() {
        arrayOutFilePath.clear();
    }
}
