SharedParamScan.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package com.epson.iprint.shared;
  2. import android.os.Bundle;
  3. import java.io.Serializable;
  4. import java.util.ArrayList;
  5. public class SharedParamScan extends SharedParam implements Serializable {
  6. private static final long serialVersionUID = 1810612490181007537L;
  7. private ArrayList<String> arrayOutFilePath = null;
  8. private String file_name = null;
  9. private String folder_name = null;
  10. private int pixel_main = 0;
  11. private int pixel_sub = 0;
  12. private int res_main = 0;
  13. private int res_sub = 0;
  14. private int scan_mode = 0;
  15. private int scan_type = 0;
  16. public /* bridge */ /* synthetic */ String getPackage_name() {
  17. return super.getPackage_name();
  18. }
  19. public /* bridge */ /* synthetic */ boolean isAvailable() {
  20. return super.isAvailable();
  21. }
  22. protected void setParam(Bundle bundle) throws SharedDataException {
  23. this.scan_type = bundle.getInt("SCAN_TYPE");
  24. int i = this.scan_type;
  25. if (i < 1 || i > 3) {
  26. throw new ParametersErrorException("SCAN_TYPE errorr");
  27. }
  28. this.pixel_main = bundle.getInt("PIXEL_MAIN");
  29. if (this.pixel_main >= 0) {
  30. this.pixel_sub = bundle.getInt("PIXEL_SUB");
  31. this.res_main = bundle.getInt("RES_MAIN");
  32. this.res_sub = bundle.getInt("RES_SUB");
  33. this.folder_name = bundle.getString("FOLDER_NAME");
  34. this.file_name = bundle.getString("FILE_NAME");
  35. this.scan_mode = bundle.getInt("SCAN_MODE");
  36. this.package_name = bundle.getString(EpsoniPrintSharedActivity.PARAM_KEY_CALLER_PACKAGE_NAME);
  37. this.arrayOutFilePath = new ArrayList<>();
  38. this.isValid = true;
  39. return;
  40. }
  41. throw new ParametersErrorException("PIXEL_MAIN errorr");
  42. }
  43. public int getScan_type() {
  44. return this.scan_type;
  45. }
  46. public int getPixel_main() {
  47. return this.pixel_main;
  48. }
  49. public int getPixel_sub() {
  50. return this.pixel_sub;
  51. }
  52. public int getRes_main() {
  53. return this.res_main;
  54. }
  55. public int getRes_sub() {
  56. return this.res_sub;
  57. }
  58. public String getFolder_name() {
  59. return this.folder_name;
  60. }
  61. public String getFile_name() {
  62. return this.file_name;
  63. }
  64. public int getScan_mode() {
  65. return this.scan_mode;
  66. }
  67. public ArrayList<String> getArrayOutFilePath() {
  68. return this.arrayOutFilePath;
  69. }
  70. public void setArrayOutFilePath(String str) {
  71. this.arrayOutFilePath.add(str);
  72. }
  73. public void clearArrayOutFilePath() {
  74. this.arrayOutFilePath.clear();
  75. }
  76. }