UserSettings.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // _____ _
  2. // |_ _| |_ _ _ ___ ___ _ __ __ _
  3. // | | | ' \| '_/ -_) -_) ' \/ _` |_
  4. // |_| |_||_|_| \___\___|_|_|_\__,_(_)
  5. //
  6. // Threema iOS Client
  7. // Copyright (c) 2012-2020 Threema GmbH
  8. //
  9. // This program is free software: you can redistribute it and/or modify
  10. // it under the terms of the GNU Affero General Public License, version 3,
  11. // as published by the Free Software Foundation.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU Affero General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Affero General Public License
  19. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. #import <Foundation/Foundation.h>
  21. @interface UserSettings : NSObject
  22. enum SendProfilePicture {
  23. SendProfilePictureNone = 0,
  24. SendProfilePictureAll,
  25. SendProfilePictureContacts
  26. };
  27. enum AcceptPrivacyPolicyVariant {
  28. AcceptPrivacyPolicyVariantExplicitly = 0,
  29. AcceptPrivacyPolicyVariantImplicitly,
  30. AcceptPrivacyPolicyVariantUpdate
  31. };
  32. enum ThreemaVideoCallQualitySetting {
  33. ThreemaVideoCallQualitySettingAuto = 0,
  34. ThreemaVideoCallQualitySettingLowDataConsumption,
  35. ThreemaVideoCallQualitySettingMaximumQuality
  36. };
  37. @property (nonatomic, readwrite) BOOL sendReadReceipts;
  38. @property (nonatomic, readwrite) BOOL syncContacts;
  39. @property (nonatomic, strong) NSArray *syncExclusionList;
  40. @property (nonatomic, strong) NSOrderedSet *blacklist;
  41. @property (nonatomic, strong) NSOrderedSet *workIdentities;
  42. @property (nonatomic, strong) NSOrderedSet *pushSettingsList;
  43. @property (nonatomic, readwrite) BOOL sendTypingIndicator;
  44. @property (nonatomic, readwrite) BOOL blockUnknown;
  45. @property (nonatomic, readwrite) BOOL enablePoi;
  46. @property (nonatomic, readwrite) BOOL hideStaleContacts;
  47. @property (nonatomic, readwrite) BOOL inAppSounds;
  48. @property (nonatomic, readwrite) BOOL inAppVibrate;
  49. @property (nonatomic, readwrite) BOOL inAppPreview;
  50. @property (nonatomic, strong) NSString *pushSound;
  51. @property (nonatomic, strong) NSString *pushGroupSound;
  52. @property (nonatomic, readwrite) BOOL pushDecrypt;
  53. @property (nonatomic, readwrite) BOOL pushShowNickname;
  54. @property (nonatomic, strong) NSString *imageSize;
  55. @property (nonatomic, strong) NSString *videoQuality;
  56. @property (nonatomic, readwrite) BOOL autoSaveMedia;
  57. @property (nonatomic, readwrite) float chatFontSize;
  58. @property (nonatomic, readwrite) BOOL useDynamicFontSize;
  59. @property (nonatomic, readwrite) BOOL disableBigEmojis;
  60. @property (nonatomic, readwrite) BOOL showReceivedTimestamps;
  61. @property (nonatomic, readwrite) BOOL returnToSend;
  62. @property (nonatomic, readwrite) BOOL darkTheme;
  63. @property (nonatomic, readwrite) BOOL useSystemTheme;
  64. @property (nonatomic, readwrite) BOOL showProfilePictures;
  65. @property (nonatomic, strong) UIImage *wallpaper;
  66. @property (nonatomic, readwrite) BOOL sortOrderFirstName;
  67. @property (nonatomic, readwrite) BOOL displayOrderFirstName;
  68. @property (nonatomic, readwrite) BOOL validationLogging;
  69. @property (nonatomic, readwrite) BOOL enableIPv6;
  70. @property (nonatomic, readwrite) BOOL companyDirectory;
  71. @property (nonatomic, readwrite) BOOL askedForPushDecryption;
  72. @property (nonatomic, readwrite) enum SendProfilePicture sendProfilePicture;
  73. @property (nonatomic, strong) NSArray *profilePictureContactList;
  74. @property (nonatomic, strong) NSArray *profilePictureRequestList;
  75. @property (nonatomic, readwrite) BOOL showGalleryPreview;
  76. @property (nonatomic, readwrite) BOOL disableProximityMonitoring;
  77. @property (nonatomic, readwrite) BOOL enableThreemaCall;
  78. @property (nonatomic, readwrite) BOOL alwaysRelayCalls;
  79. @property (nonatomic, readwrite) BOOL enableCallKit;
  80. @property (nonatomic, readwrite) float previewLimit;
  81. @property (nonatomic, strong) NSDate *acceptedPrivacyPolicyDate;
  82. @property (nonatomic, readwrite) enum AcceptPrivacyPolicyVariant acceptedPrivacyPolicyVariant;
  83. @property (nonatomic, strong) NSString *voIPSound;
  84. @property (nonatomic, readonly) NSInteger largeTitleDisplayMode;
  85. @property (nonatomic, readwrite) BOOL pushGroupGenerated;
  86. @property (nonatomic, readwrite) BOOL threemaWeb;
  87. @property (nonatomic, readwrite) BOOL openPlusIconInChat;
  88. @property (nonatomic, strong) NSData *safeConfig;
  89. @property (nonatomic, readwrite) BOOL safeIntroShown;
  90. @property (nonatomic, readwrite) BOOL workInfoShown;
  91. @property (nonatomic, readwrite) BOOL videoCallInChatInfoShown;
  92. @property (nonatomic, readwrite) BOOL videoCallInfoShown;
  93. @property (nonatomic, readwrite) BOOL videoCallSpeakerInfoShown;
  94. @property (nonatomic, strong) NSString *sentryAppDevice;
  95. @property (nonatomic, readwrite) BOOL enableMasterDnd;
  96. @property (nonatomic, strong) NSOrderedSet *masterDndWorkingDays;
  97. @property (nonatomic, strong) NSString *masterDndStartTime;
  98. @property (nonatomic, strong) NSString *masterDndEndTime;
  99. @property (nonatomic, readwrite) BOOL enableVideoCall;
  100. @property (nonatomic, readwrite) enum ThreemaVideoCallQualitySetting threemaVideoCallQualitySetting;
  101. @property (nonatomic, readwrite) BOOL quoteV2Active;
  102. + (UserSettings*)sharedUserSettings;
  103. + (void)resetSharedInstance;
  104. - (void)setSortOrderFirstName:(BOOL)sortOrderFirstName displayOrderFirstName:(BOOL)displayOrderFirstName;
  105. - (void)checkWallpaper;
  106. @end