AppPreferences.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Nextcloud Android client application
  3. *
  4. * @author Chris Narkiewicz
  5. * Copyright (C) 2019 Chris Narkiewicz, EZ Aquarii
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. */
  20. package com.nextcloud.client.preferences;
  21. public interface AppPreferences {
  22. boolean instantPictureUploadEnabled();
  23. boolean instantVideoUploadEnabled();
  24. /**
  25. * Gets the selected file extension position the user selected to do the
  26. * last upload of a url file shared from other app.
  27. *
  28. * @return selectedPos the selected file extension position.
  29. */
  30. int getUploadUrlFileExtensionUrlSelectedPos();
  31. /**
  32. * Saves the selected file extension position the user selected to do the
  33. * last upload of a url file shared from other app.
  34. *
  35. * @param selectedPos the selected file extension position.
  36. */
  37. void setUploadUrlFileExtensionUrlSelectedPos(int selectedPos);
  38. /**
  39. * Gets the selected map file extension position the user selected to
  40. * do the last upload of a url file shared from other app.
  41. *
  42. * @return selectedPos the selected file extension position.
  43. */
  44. int getUploadMapFileExtensionUrlSelectedPos();
  45. /**
  46. * Saves the selected map file extension position the user selected to
  47. * do the last upload of a url file shared from other app.
  48. *
  49. * @param selectedPos the selected file extension position.
  50. */
  51. void setUploadMapFileExtensionUrlSelectedPos(int selectedPos);
  52. /**
  53. * Gets the last local path where the user selected to do an upload from.
  54. *
  55. * @return path Absolute path to a folder, as previously stored by
  56. * {@link #setUploadFromLocalLastPath(String)}, or empty String if never saved before.
  57. */
  58. String getUploadFromLocalLastPath();
  59. /**
  60. * Saves the path where the user selected to do the last local upload of a file from.
  61. *
  62. * @param path Absolute path to a folder.
  63. */
  64. void setUploadFromLocalLastPath(String path);
  65. /**
  66. * Gets the path where the user selected to do the last upload of a file shared from other app.
  67. *
  68. * @return path Absolute path to a folder, as previously stored by {@link #setLastUploadPath(String)},
  69. * or empty String if never saved before.
  70. */
  71. String getLastUploadPath();
  72. /**
  73. * Saves the path where the user selected to do the last upload of a file shared from other app.
  74. *
  75. * @param path Absolute path to a folder.
  76. */
  77. void setLastUploadPath(String path);
  78. boolean isShowDetailedTimestampEnabled();
  79. void setShowDetailedTimestampEnabled(boolean showDetailedTimestamp);
  80. boolean isShowMediaScanNotifications();
  81. void setShowMediaScanNotifications(boolean showMediaScanNotification);
  82. /**
  83. * Gets the uploader behavior which the user has set last.
  84. *
  85. * @return uploader behavior the uploader behavior
  86. */
  87. int getUploaderBehaviour();
  88. /**
  89. * Saves the uploader behavior which the user has set last.
  90. *
  91. * @param uploaderBehaviour the uploader behavior
  92. */
  93. void setUploaderBehaviour(int uploaderBehaviour);
  94. float getGridColumns();
  95. void setGridColumns(float gridColumns);
  96. long getLockTimestamp();
  97. void setLockTimestamp(long timestamp);
  98. void removeLegacyPreferences();
  99. }