2015-01-20 12:33:01 +00:00
|
|
|
/*
|
|
|
|
Copyright 2014 OpenMarket Ltd
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <AddressBook/AddressBook.h>
|
|
|
|
|
2015-01-20 15:29:42 +00:00
|
|
|
// warn when a contact has a new matrix identifier
|
|
|
|
// the contactID is provided in parameter
|
|
|
|
extern NSString *const kConsoleContactMatrixIdentifierUpdateNotification;
|
|
|
|
|
2015-01-20 12:33:01 +00:00
|
|
|
@interface ConsoleContact : NSObject
|
|
|
|
|
2015-01-20 15:29:42 +00:00
|
|
|
// unique identifier
|
|
|
|
@property (nonatomic, copy, readwrite) NSString * contactID;
|
2015-01-20 12:33:01 +00:00
|
|
|
// display name
|
|
|
|
@property (nonatomic, copy, readwrite) NSString *displayName;
|
2015-01-20 15:29:42 +00:00
|
|
|
// contact thumbnail
|
2015-01-20 12:33:01 +00:00
|
|
|
@property (nonatomic, copy, readwrite) UIImage *thumbnail;
|
|
|
|
// array of ConsolePhoneNumber
|
|
|
|
@property (nonatomic, readwrite) NSArray *phoneNumbers;
|
|
|
|
// array of ConsoleEmail
|
|
|
|
@property (nonatomic, readwrite) NSArray *emailAddresses;
|
2015-01-20 15:29:42 +00:00
|
|
|
// array of ConsoleContact / ConsoleEmail with contains a matrix identifer
|
2015-01-20 12:33:01 +00:00
|
|
|
@property (nonatomic, readonly) NSArray* matrixIdentifiers;
|
|
|
|
|
2015-01-20 15:29:42 +00:00
|
|
|
- (id)initWithABRecord:(ABRecordRef)record;
|
|
|
|
|
|
|
|
// check if there is any matrix identifier updates
|
|
|
|
- (void)checkMatrixIdentifiers;
|
2015-01-20 12:33:01 +00:00
|
|
|
|
|
|
|
@end
|