2017-07-04 20:15:28 +03:00
|
|
|
//
|
|
|
|
// NCSettingsController.h
|
|
|
|
// VideoCalls
|
|
|
|
//
|
|
|
|
// Created by Ivan Sein on 26.06.17.
|
|
|
|
// Copyright © 2017 struktur AG. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2018-03-15 17:39:37 +03:00
|
|
|
#import "ARDSettingsModel.h"
|
2017-07-04 20:15:28 +03:00
|
|
|
#import "UICKeyChainStore.h"
|
|
|
|
|
|
|
|
|
|
|
|
extern NSString * const kNCServerKey;
|
|
|
|
extern NSString * const kNCUserKey;
|
2018-02-06 19:53:50 +03:00
|
|
|
extern NSString * const kNCUserIdKey;
|
2017-09-27 15:07:58 +03:00
|
|
|
extern NSString * const kNCUserDisplayNameKey;
|
2017-07-04 20:15:28 +03:00
|
|
|
extern NSString * const kNCTokenKey;
|
2017-11-07 18:59:19 +03:00
|
|
|
extern NSString * const kNCPushTokenKey;
|
2017-11-13 16:26:07 +03:00
|
|
|
extern NSString * const kNCPushServer;
|
2017-11-10 18:57:10 +03:00
|
|
|
extern NSString * const kNCPNPublicKey;
|
|
|
|
extern NSString * const kNCPNPrivateKey;
|
2017-11-13 16:26:07 +03:00
|
|
|
extern NSString * const kNCDeviceIdentifier;
|
|
|
|
extern NSString * const kNCDeviceSignature;
|
|
|
|
extern NSString * const kNCUserPublicKey;
|
2017-07-04 20:15:28 +03:00
|
|
|
|
2018-02-06 19:53:50 +03:00
|
|
|
typedef void (^UpdatedProfileCompletionBlock)(NSError *error);
|
2018-02-26 16:55:38 +03:00
|
|
|
typedef void (^GetCapabilitiesCompletionBlock)(NSError *error);
|
2018-02-06 19:53:50 +03:00
|
|
|
|
2018-02-26 17:16:42 +03:00
|
|
|
extern NSString * const NCServerCapabilitiesReceivedNotification;
|
|
|
|
|
2017-07-04 20:15:28 +03:00
|
|
|
|
|
|
|
@interface NCSettingsController : NSObject
|
|
|
|
|
|
|
|
@property (nonatomic, copy) NSString *ncServer;
|
|
|
|
@property (nonatomic, copy) NSString *ncUser;
|
2018-02-06 19:53:50 +03:00
|
|
|
@property (nonatomic, copy) NSString *ncUserId;
|
2017-09-27 15:07:58 +03:00
|
|
|
@property (nonatomic, copy) NSString *ncUserDisplayName;
|
2017-07-04 20:15:28 +03:00
|
|
|
@property (nonatomic, copy) NSString *ncToken;
|
2017-11-07 18:59:19 +03:00
|
|
|
@property (nonatomic, copy) NSString *ncPushToken;
|
2017-11-10 18:57:10 +03:00
|
|
|
@property (nonatomic, copy) NSData *ncPNPublicKey;
|
|
|
|
@property (nonatomic, copy) NSData *ncPNPrivateKey;
|
2017-11-13 16:26:07 +03:00
|
|
|
@property (nonatomic, copy) NSString *ncDeviceIdentifier;
|
|
|
|
@property (nonatomic, copy) NSString *ncDeviceSignature;
|
|
|
|
@property (nonatomic, copy) NSString *ncUserPublicKey;
|
2018-02-26 16:55:38 +03:00
|
|
|
@property (nonatomic, copy) NSDictionary *ncTalkCapabilities;
|
2018-03-15 17:39:37 +03:00
|
|
|
@property (nonatomic, copy) ARDSettingsModel *videoSettingsModel;
|
2017-07-04 20:15:28 +03:00
|
|
|
|
|
|
|
+ (instancetype)sharedInstance;
|
2017-11-13 16:26:07 +03:00
|
|
|
- (void)cleanUserAndServerStoredValues;
|
|
|
|
- (BOOL)generatePushNotificationsKeyPair;
|
|
|
|
- (NSString *)pushTokenSHA512;
|
2017-11-20 19:24:26 +03:00
|
|
|
- (NSString *)decryptPushNotification:(NSString *)message withDevicePrivateKey:(NSData *)privateKey;
|
2018-02-06 19:53:50 +03:00
|
|
|
- (void)getUserProfileWithCompletionBlock:(UpdatedProfileCompletionBlock)block;
|
2018-02-26 16:55:38 +03:00
|
|
|
- (void)getCapabilitiesWithCompletionBlock:(GetCapabilitiesCompletionBlock)block;
|
2017-07-04 20:15:28 +03:00
|
|
|
|
|
|
|
@end
|