// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #import #import "OCTToxConstants.h" #import "OCTManagerConstants.h" NS_ASSUME_NONNULL_BEGIN @class OCTManagerConfiguration; @protocol OCTSubmanagerBootstrap; @protocol OCTSubmanagerCalls; @protocol OCTSubmanagerChats; @protocol OCTSubmanagerFiles; @protocol OCTSubmanagerFriends; @protocol OCTSubmanagerObjects; @protocol OCTSubmanagerUser; @protocol OCTManager /** * Submanager responsible for connecting to other nodes. */ @property (strong, nonatomic, readonly) id bootstrap; /** * Submanager with all video/calling methods. */ @property (strong, nonatomic, readonly) id calls; /** * Submanager with all chats methods. */ @property (strong, nonatomic, readonly) id chats; /** * Submanager with all files methods. */ @property (strong, nonatomic, readonly) id files; /** * Submanager with all friends methods. */ @property (strong, nonatomic, readonly) id friends; /** * Submanager with all objects methods. */ @property (strong, nonatomic, readonly) id objects; /** * Submanager with all user methods. */ @property (strong, nonatomic, readonly) id user; /** * Configuration used by OCTManager. * * @return Copy of configuration used by manager. */ - (OCTManagerConfiguration *)configuration; /** * Copies tox save file to temporary directory and return path to it. * * @param error NSFileManager error in case if file cannot be copied. * * @return Temporary path of current tox save file. */ - (nullable NSString *)exportToxSaveFileAndReturnError:(NSError *__nullable *__nullable)error; /** * Set password to encrypt tox save file and database. * * @param newPassword New password used to encrypt tox save file and database. * @param oldPassword Old password. * * @return YES on success, NO on failure (if old password doesn't match). */ - (BOOL)changeEncryptPassword:(nonnull NSString *)newPassword oldPassword:(nonnull NSString *)oldPassword; /** * Checks if manager is encrypted with given password. * * @param password Password to verify. * * @return YES if manager is encrypted with given password, NO otherwise. */ - (BOOL)isManagerEncryptedWithPassword:(nonnull NSString *)password; @end NS_ASSUME_NONNULL_END