package com.epson.iprint.shared;

import android.content.Intent;
import android.os.Bundle;

public class ExtSharedParam {
    private String file_name = null;
    private String folder_name = null;
    private boolean isValid = false;
    private String package_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 void setParam(Bundle bundle) {
        this.scan_type = bundle.getInt("SCAN_TYPE");
        this.pixel_main = bundle.getInt("PIXEL_MAIN");
        this.pixel_sub = bundle.getInt("PIXEL_SUB");
        this.res_main = bundle.getInt("RES_MAIN");
        this.res_sub = bundle.getInt("RES_SUB");
        this.folder_name = bundle.getString("FOLDER_NAME");
        this.file_name = bundle.getString("FILE_NAME");
        this.scan_mode = bundle.getInt("SCAN_MODE");
        this.package_name = bundle.getString(EpsoniPrintSharedActivity.PARAM_KEY_CALLER_PACKAGE_NAME);
        this.isValid = true;
    }

    public void setParam(Intent intent) {
        Bundle extras = intent.getExtras();
        this.scan_type = extras.getInt("SCAN_TYPE");
        this.pixel_main = extras.getInt("PIXEL_MAIN");
        this.pixel_sub = extras.getInt("PIXEL_SUB");
        this.res_main = extras.getInt("RES_MAIN");
        this.res_sub = extras.getInt("RES_SUB");
        this.folder_name = extras.getString("FOLDER_NAME");
        this.file_name = extras.getString("FILE_NAME");
        this.scan_mode = extras.getInt("SCAN_MODE");
        this.package_name = extras.getString(EpsoniPrintSharedActivity.PARAM_KEY_CALLER_PACKAGE_NAME);
        this.isValid = true;
    }

    public boolean isAvailable() {
        return this.isValid;
    }

    public int getScan_type() {
        return this.scan_type;
    }

    public int getPixel_main() {
        return this.pixel_main;
    }

    public int getPixel_sub() {
        return this.pixel_sub;
    }

    public int getRes_main() {
        return this.res_main;
    }

    public int getRes_sub() {
        return this.res_sub;
    }

    public String getFolder_name() {
        return this.folder_name;
    }

    public String getFile_name() {
        return this.file_name;
    }

    public int getScan_mode() {
        return this.scan_mode;
    }

    public String getPackage_name() {
        return this.package_name;
    }
}
