-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: preparations for universal backup/restore - WPB-14616 (#2523)
Co-authored-by: François Benaiteau <[email protected]> Co-authored-by: KaterinaWire <[email protected]> Co-authored-by: Christoph Aldrian <[email protected]> Co-authored-by: Christoph Aldrian <[email protected]> Co-authored-by: Jullian Mercier <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: François Benaiteau <[email protected]>
- Loading branch information
1 parent
be487a5
commit fbef37e
Showing
208 changed files
with
4,073 additions
and
1,601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
WireDomain/Sources/WireDomain/UseCases/Protocols/CreateLegacyBackupError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2025 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
public enum CreateLegacyBackupError: Error { | ||
case noActiveAccountForExport | ||
case compressionError | ||
/// Failed to create `InputStream` or `OutputStream` from `URL`. | ||
case failedToCreateStreamsForEncryption | ||
} |
33 changes: 33 additions & 0 deletions
33
WireDomain/Sources/WireDomain/UseCases/Protocols/ImportBackupError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2025 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
public enum ImportBackupError: Error, Equatable, CaseIterable { | ||
case noActiveAccountForImport | ||
/// The backup file is encrypted and a password is needed for decryption. | ||
case passwordRequired | ||
/// E.g. if the file to import was created with a different (incompatible) version of the app. | ||
case incompatibleFileFormat | ||
case invalidAccountID | ||
case compressionError | ||
case invalidFileExtension | ||
case keyCreationFailed | ||
case decryptionError | ||
case faildToBackUpUserClient | ||
/// Failed to create `InputStream` or `OutputStream` from `URL`. | ||
case failedToCreateStreamForDecryption | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
WireDomain/Sources/WireDomainSupport/Sourcery/generated/AutoMockable.generated.swift
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
WireUI/Sources/WireDesign/Buttons/UIButton.Configuration+ButtonStyles.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2025 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
import UIKit | ||
import WireFoundation | ||
|
||
public extension UIButton.Configuration { | ||
|
||
static var primary: Self { | ||
|
||
var configuration = shared | ||
configuration.baseBackgroundColor = ColorTheme.Buttons.Primary.enabled | ||
return configuration | ||
|
||
} | ||
|
||
private static var shared: Self { | ||
|
||
var configuration = UIButton.Configuration.filled() | ||
configuration.buttonSize = .large | ||
configuration.titleTextAttributesTransformer = .init { attributeContainer in | ||
var attributeContainer = attributeContainer | ||
attributeContainer.font = .preferredFont(forTextStyle: .headline) | ||
return attributeContainer | ||
} | ||
return configuration | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Every input/output paths in the rest of the config will then be expressed relative to these. | ||
|
||
input_dir: ./ | ||
output_dir: ${GENERATED}/ | ||
|
||
# Generate constants for your localized strings. | ||
|
||
strings: | ||
inputs: | ||
- Resources/en.lproj/Accessibility.strings | ||
- Resources/en.lproj/Localizable.strings | ||
filter: | ||
outputs: | ||
- templateName: structured-swift5 | ||
output: Strings+Generated.swift |
Oops, something went wrong.