Skip to content

Commit cc2a908

Browse files
committed
The SDK can now build
1 parent 3e39c0b commit cc2a908

30 files changed

+286
-7640
lines changed

MatrixSDK.xcodeproj/project.pbxproj

Lines changed: 36 additions & 48 deletions
Large diffs are not rendered by default.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Copyright 2019 The Matrix.org Foundation C.I.C
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
#import "MXCrossSigning.h"
18+
19+
#pragma mark - Constants
20+
21+
NSString *const MXCrossSigningMyUserDidSignInOnNewDeviceNotification = @"MXCrossSigningMyUserDidSignInOnNewDeviceNotification";
22+
NSString *const MXCrossSigningDidChangeCrossSigningKeysNotification = @"MXCrossSigningDidChangeCrossSigningKeydNotification";
23+
NSString *const MXCrossSigningNotificationDeviceIdsKey = @"deviceIds";
24+
25+
NSString *const MXCrossSigningErrorDomain = @"org.matrix.sdk.crosssigning";
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//
2+
// Copyright 2020 The Matrix.org Foundation C.I.C
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
#import <Foundation/Foundation.h>
18+
19+
@class MXLegacyCrypto;
20+
21+
NS_ASSUME_NONNULL_BEGIN
22+
23+
24+
FOUNDATION_EXPORT NSString *const MXCryptoMigrationErrorDomain;
25+
typedef NS_ENUM(NSInteger, MXCryptoMigrationErrorCode)
26+
{
27+
MXCryptoMigrationCannotPurgeAllOneTimeKeysErrorCode,
28+
};
29+
30+
31+
/**
32+
The `MXCryptoMigration` class handles the migration logic between breaking changes in the implementation
33+
of the MXCrypto module.
34+
It helps to update data between version (MXCryptoVersion) changes.
35+
*/
36+
@interface MXCryptoMigration : NSObject
37+
38+
- (instancetype)initWithCrypto:(MXLegacyCrypto *)crypto;
39+
40+
/**
41+
Indicate if the data must be updated.
42+
43+
@return YES if a migration should be done.
44+
*/
45+
- (BOOL)shouldMigrate;
46+
47+
/**
48+
Migrate the data to the latest version of the implementation (MXCryptoVersionLast).
49+
50+
@param success A block object called when the operation succeeds.
51+
@param failure A block object called when the operation fails.
52+
*/
53+
- (void)migrateWithSuccess:(void (^)(void))success
54+
failure:(void (^)(NSError *error))failure;
55+
56+
57+
@end
58+
59+
NS_ASSUME_NONNULL_END
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
Copyright 2019 New Vector Ltd
3+
Copyright 2019 The Matrix.org Foundation C.I.C
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
18+
#import "MXKeyVerificationManager.h"
19+
20+
#import "MXSession.h"
21+
#import "MXTools.h"
22+
23+
#import "MXTransactionCancelCode.h"
24+
25+
26+
#import "MXKeyVerificationRequestByToDeviceJSONModel.h"
27+
#import "MXKeyVerificationRequestByDMJSONModel.h"
28+
29+
#import "MXQRCodeDataBuilder.h"
30+
31+
#import "MatrixSDKSwiftHeader.h"
32+
33+
#pragma mark - Constants
34+
35+
NSString *const MXKeyVerificationErrorDomain = @"org.matrix.sdk.verification";
36+
NSString *const MXKeyVerificationManagerNewRequestNotification = @"MXKeyVerificationManagerNewRequestNotification";
37+
NSString *const MXKeyVerificationManagerNotificationRequestKey = @"MXKeyVerificationManagerNotificationRequestKey";
38+
NSString *const MXKeyVerificationManagerNewTransactionNotification = @"MXKeyVerificationManagerNewTransactionNotification";
39+
NSString *const MXKeyVerificationManagerNotificationTransactionKey = @"MXKeyVerificationManagerNotificationTransactionKey";
40+
41+
// Transaction timeout in seconds
42+
NSTimeInterval const MXTransactionTimeout = 10 * 60.0;
43+
44+
// Request timeout in seconds
45+
NSTimeInterval const MXRequestDefaultTimeout = 5 * 60.0;
46+
47+
static NSArray<MXEventTypeString> *kMXKeyVerificationManagerVerificationEventTypes;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright 2019 The Matrix.org Foundation C.I.C
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
18+
#import "MXKeyVerificationRequest.h"
19+
20+
21+
#warning File has not been annotated with nullability, see MX_ASSUME_MISSING_NULLABILITY_BEGIN
22+
23+
#pragma mark - Constants
24+
NSString * const MXKeyVerificationRequestDidChangeNotification = @"MXKeyVerificationRequestDidChangeNotification";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
Copyright 2019 New Vector Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
#import "MXKeyVerificationTransaction.h"
18+
19+
#pragma mark - Constants
20+
NSString * const MXKeyVerificationTransactionDidChangeNotification = @"MXKeyVerificationTransactionDidChangeNotification";
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Copyright 2020 The Matrix.org Foundation C.I.C
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
#import "MXQRCodeTransaction.h"
18+
19+
20+
#import "MXCryptoTools.h"
21+
#import "NSArray+MatrixSDK.h"
22+
23+
#import "MXQRCodeDataCoder.h"
24+
#import "MXBase64Tools.h"
25+
26+
#import "MXVerifyingAnotherUserQRCodeData.h"
27+
#import "MXSelfVerifyingMasterKeyTrustedQRCodeData.h"
28+
#import "MXSelfVerifyingMasterKeyNotTrustedQRCodeData.h"
29+
30+
NSString * const MXKeyVerificationMethodQRCodeShow = @"m.qr_code.show.v1";
31+
NSString * const MXKeyVerificationMethodQRCodeScan = @"m.qr_code.scan.v1";
32+
33+
NSString * const MXKeyVerificationMethodReciprocate = @"m.reciprocate.v1";

0 commit comments

Comments
 (0)