session-ios/SignalServiceKit/src/Profiles/OWSProfilesManager.h

31 lines
872 B
C
Raw Normal View History

2017-07-31 20:48:43 +02:00
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
extern NSString *const kNSNotificationName_LocalProfileDidChange;
2017-07-31 20:48:43 +02:00
// This class can be safely accessed and used from any thread.
@interface OWSProfilesManager : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)sharedManager;
- (nullable NSString *)localProfileName;
- (nullable UIImage *)localProfileAvatarImage;
2017-08-01 16:51:01 +02:00
// This method is used to update the "local profile" state on the client
// and the service. Client state is only updated if service state is
// successfully updated.
- (void)setLocalProfileName:(nullable NSString *)localProfileName
localProfileAvatarImage:(nullable UIImage *)localProfileAvatarImage
success:(void (^)())successBlock
failure:(void (^)())failureBlock;
2017-07-31 20:48:43 +02:00
@end
NS_ASSUME_NONNULL_END