Skip to content

Commit

Permalink
Merge branch 'iOS/CHT-828-Add-nullability-bindings-check' into 'develop'
Browse files Browse the repository at this point in the history
CHT-828 Set delegates properties as non null by default, and mark as nullable when needed

Closes CHT-828

See merge request megachat/MEGAchat!1529
  • Loading branch information
jgandres committed Mar 3, 2023
2 parents 7cf3419 + a8c4c3d commit 6f8ad72
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bindings/Objective-C/MEGAChatCallDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#import "MEGAChatCall.h"
#import "MEGAChatError.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGAChatSdk;

@protocol MEGAChatCallDelegate <NSObject>
Expand All @@ -14,3 +16,5 @@
- (void)onChatSessionUpdate:(MEGAChatSdk *)api chatId:(uint64_t)chatId callId:(uint64_t)callId session:(MEGAChatSession *)session;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions bindings/Objective-C/MEGAChatDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#import "MEGAChatPresenceConfig.h"
#import "MEGAChatDBError.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGAChatSdk;

typedef NS_ENUM (NSInteger, MEGAChatInit);
Expand All @@ -21,3 +23,5 @@ typedef NS_ENUM (NSInteger, MEGAChatInit);
- (void)onDbError:(MEGAChatSdk *)api error:(MEGAChatDBError)error message:(NSString *)message;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions bindings/Objective-C/MEGAChatLoggerDelegate.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#import <Foundation/Foundation.h>
#import "MEGAChatLogLevel.h"

NS_ASSUME_NONNULL_BEGIN

@protocol MEGAChatLoggerDelegate <NSObject>

@optional

- (void)logWithLevel:(MEGAChatLogLevel)logLevel message:(NSString *)message;

@end

NS_ASSUME_NONNULL_END
3 changes: 3 additions & 0 deletions bindings/Objective-C/MEGAChatRequestDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#import "MEGAChatRequest.h"
#import "MEGAChatError.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGAChatSdk;

@protocol MEGAChatRequestDelegate <NSObject>
Expand All @@ -15,3 +17,4 @@

@end

NS_ASSUME_NONNULL_END
6 changes: 5 additions & 1 deletion bindings/Objective-C/MEGAChatRoomDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
#import "MEGAChatRoom.h"
#import "MEGAChatMessage.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGAChatSdk;

@protocol MEGAChatRoomDelegate <NSObject>

@optional

- (void)onChatRoomUpdate:(MEGAChatSdk *)api chat:(MEGAChatRoom *)chat;
- (void)onMessageLoaded:(MEGAChatSdk *)api message:(MEGAChatMessage *)message;
- (void)onMessageLoaded:(MEGAChatSdk *)api message:(nullable MEGAChatMessage *)message;
- (void)onMessageReceived:(MEGAChatSdk *)api message:(MEGAChatMessage *)message;
- (void)onMessageUpdate:(MEGAChatSdk *)api message:(MEGAChatMessage *)message;
- (void)onHistoryReloaded:(MEGAChatSdk *)api chat:(MEGAChatRoom *)chat;
- (void)onReactionUpdate:(MEGAChatSdk *)api messageId:(uint64_t)messageId reaction:(NSString *)reaction count:(NSInteger)count;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions bindings/Objective-C/MEGAChatVideoDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#import <Foundation/Foundation.h>
#import "MEGAChatCall.h"

NS_ASSUME_NONNULL_BEGIN

@class MEGAChatSdk;

@protocol MEGAChatVideoDelegate <NSObject>
Expand All @@ -11,3 +13,5 @@
- (void)onChatVideoData:(MEGAChatSdk *)api chatId:(uint64_t)chatId width:(NSInteger)width height:(NSInteger)height buffer:(NSData *)buffer;

@end

NS_ASSUME_NONNULL_END

0 comments on commit 6f8ad72

Please sign in to comment.