Rollback: Removed MXContactManager component from the SDK.

Fixed Console code that started to use it.
This commit is contained in:
manuroe 2015-02-03 15:10:32 +01:00
parent 68b8985d4e
commit 12b76867f2
2 changed files with 39 additions and 2 deletions

View file

@ -15,7 +15,8 @@
*/
#import <Foundation/Foundation.h>
#import "MX3PID.h"
#import "MXRestClient.h"
typedef enum : NSUInteger {
MXC3PIDAuthStateUnknown,
@ -26,10 +27,35 @@ typedef enum : NSUInteger {
} MXC3PIDAuthState;
@interface MXC3PID : MX3PID
@interface MXC3PID : NSObject
/**
The 3rd party system where the user is defined.
*/
@property (nonatomic, readonly) MX3PIDMedium medium;
/**
The id of the user in the 3rd party system.
*/
@property (nonatomic, readonly) NSString *address;
/**
The id of the user on Matrix.
nil if unknown or not yet resolved.
*/
@property (nonatomic) NSString *userId;
@property (nonatomic, readonly) MXC3PIDAuthState validationState;
/**
Initialise the instance with a 3PID.
@param medium the medium.
@param address the id of the contact on this medium.
@return the new instance.
*/
- (instancetype)initWithMedium:(NSString*)medium andAddress:(NSString*)address;
/**
Start the validation process
The identity server will send a validation token to the user's address.

View file

@ -26,6 +26,17 @@
@implementation MXC3PID
- (instancetype)initWithMedium:(NSString *)medium andAddress:(NSString *)address
{
self = [super init];
if (self)
{
_medium = [medium copy];
_address = [address copy];
}
return self;
}
- (void)resetValidationParameters {
_validationState = MXC3PIDAuthStateUnknown;
self.clientSecret = nil;