diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 792ce82f..5db6cff9 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -151,6 +151,13 @@ E874B88427215B0E003954B9 /* XPIMRoomMicQueueDelegate.h in Sources */ = {isa = PBXBuildFile; fileRef = E874B8822721590D003954B9 /* XPIMRoomMicQueueDelegate.h */; }; E874B88827215D39003954B9 /* MicroModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88727215D39003954B9 /* MicroModel.m */; }; E874B88B27215EAF003954B9 /* MicroQueueItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88A27215EAF003954B9 /* MicroQueueItemModel.m */; }; + E874B88F27216FFE003954B9 /* XPIMChatRoomMemberImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88E27216FFE003954B9 /* XPIMChatRoomMemberImpl.m */; }; + E874B8912721712B003954B9 /* XPIMChatRoomMemberInterface.h in Sources */ = {isa = PBXBuildFile; fileRef = E874B890272170A6003954B9 /* XPIMChatRoomMemberInterface.h */; }; + E874B89527217DA6003954B9 /* XPIMChatRoomMessageImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B89427217DA6003954B9 /* XPIMChatRoomMessageImpl.m */; }; + E874B89727218349003954B9 /* ZegoAudioRoom.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 184862CA27213FC7005FC5DC /* ZegoAudioRoom.framework */; }; + E874B89827218349003954B9 /* ZegoAudioRoom.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 184862CA27213FC7005FC5DC /* ZegoAudioRoom.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + E874B89A27218AAF003954B9 /* XPIMChatRoomMessageDelegate.h in Sources */ = {isa = PBXBuildFile; fileRef = E874B89927218A9A003954B9 /* XPIMChatRoomMessageDelegate.h */; }; + E874B89B27218ABC003954B9 /* XPIMChatRoomMessageInterface.h in Sources */ = {isa = PBXBuildFile; fileRef = E874B89627217DC3003954B9 /* XPIMChatRoomMessageInterface.h */; }; E88B5CA526FB088600DA9178 /* XPMineTeenagerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E88B5CA426FB088600DA9178 /* XPMineTeenagerViewController.m */; }; E88B5CA826FB089C00DA9178 /* XPMineTeenagePwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E88B5CA726FB089C00DA9178 /* XPMineTeenagePwdViewController.m */; }; E88B5CAD26FB16A800DA9178 /* XPMineTeenagerDesView.m in Sources */ = {isa = PBXBuildFile; fileRef = E88B5CAC26FB16A800DA9178 /* XPMineTeenagerDesView.m */; }; @@ -518,6 +525,13 @@ E874B88727215D39003954B9 /* MicroModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroModel.m; sourceTree = ""; }; E874B88927215EAF003954B9 /* MicroQueueItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroQueueItemModel.h; sourceTree = ""; }; E874B88A27215EAF003954B9 /* MicroQueueItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroQueueItemModel.m; sourceTree = ""; }; + E874B88D27216FFE003954B9 /* XPIMChatRoomMemberImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIMChatRoomMemberImpl.h; sourceTree = ""; }; + E874B88E27216FFE003954B9 /* XPIMChatRoomMemberImpl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIMChatRoomMemberImpl.m; sourceTree = ""; }; + E874B890272170A6003954B9 /* XPIMChatRoomMemberInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIMChatRoomMemberInterface.h; sourceTree = ""; }; + E874B89327217DA6003954B9 /* XPIMChatRoomMessageImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIMChatRoomMessageImpl.h; sourceTree = ""; }; + E874B89427217DA6003954B9 /* XPIMChatRoomMessageImpl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIMChatRoomMessageImpl.m; sourceTree = ""; }; + E874B89627217DC3003954B9 /* XPIMChatRoomMessageInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIMChatRoomMessageInterface.h; sourceTree = ""; }; + E874B89927218A9A003954B9 /* XPIMChatRoomMessageDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIMChatRoomMessageDelegate.h; sourceTree = ""; }; E88B5CA326FB088600DA9178 /* XPMineTeenagerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineTeenagerViewController.h; sourceTree = ""; }; E88B5CA426FB088600DA9178 /* XPMineTeenagerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineTeenagerViewController.m; sourceTree = ""; }; E88B5CA626FB089C00DA9178 /* XPMineTeenagePwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineTeenagePwdViewController.h; sourceTree = ""; }; @@ -1439,6 +1453,8 @@ E874B869272105C0003954B9 /* IM */ = { isa = PBXGroup; children = ( + E874B89227217D64003954B9 /* RoomMessage */, + E874B88C27216FB6003954B9 /* ChatRoomMember */, E874B87D272158B9003954B9 /* MicroQueue */, E874B8752721436F003954B9 /* Room */, E874B86A272105DD003954B9 /* XPIMManager.h */, @@ -1481,6 +1497,27 @@ path = Model; sourceTree = ""; }; + E874B88C27216FB6003954B9 /* ChatRoomMember */ = { + isa = PBXGroup; + children = ( + E874B88D27216FFE003954B9 /* XPIMChatRoomMemberImpl.h */, + E874B88E27216FFE003954B9 /* XPIMChatRoomMemberImpl.m */, + E874B890272170A6003954B9 /* XPIMChatRoomMemberInterface.h */, + ); + path = ChatRoomMember; + sourceTree = ""; + }; + E874B89227217D64003954B9 /* RoomMessage */ = { + isa = PBXGroup; + children = ( + E874B89327217DA6003954B9 /* XPIMChatRoomMessageImpl.h */, + E874B89427217DA6003954B9 /* XPIMChatRoomMessageImpl.m */, + E874B89627217DC3003954B9 /* XPIMChatRoomMessageInterface.h */, + E874B89927218A9A003954B9 /* XPIMChatRoomMessageDelegate.h */, + ); + path = RoomMessage; + sourceTree = ""; + }; E88B5CA926FB15B900DA9178 /* Teenager */ = { isa = PBXGroup; children = ( @@ -2052,6 +2089,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E874B89B27218ABC003954B9 /* XPIMChatRoomMessageInterface.h in Sources */, + E874B89A27218AAF003954B9 /* XPIMChatRoomMessageDelegate.h in Sources */, + E874B8912721712B003954B9 /* XPIMChatRoomMemberInterface.h in Sources */, E874B88427215B0E003954B9 /* XPIMRoomMicQueueDelegate.h in Sources */, E874B88327215B06003954B9 /* XPIMRoomMicQueueInterface.h in Sources */, E874B87C27214888003954B9 /* XPIMRoomDelegate.h in Sources */, @@ -2108,6 +2148,7 @@ E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */, E8EEB8F226FC2050007C6EBA /* SDPhotoBrowser.m in Sources */, E89DA67827009F16008483C1 /* NSObject+JSONString.m in Sources */, + E874B89527217DA6003954B9 /* XPIMChatRoomMessageImpl.m in Sources */, E81C27AB26EF2D920031E639 /* ThirdUserInfo.m in Sources */, E874B86C272105DD003954B9 /* XPIMManager.m in Sources */, E81C279D26EEEC620031E639 /* XPConstant.m in Sources */, @@ -2184,6 +2225,7 @@ E88F5EB0271ECEF000FF9B33 /* XPRoomViewController+RoomInfoContainerView.m in Sources */, E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */, E8E70D8C26F2F5A500F03460 /* XPMineMatchCollectionViewCell.m in Sources */, + E874B88F27216FFE003954B9 /* XPIMChatRoomMemberImpl.m in Sources */, 186A534A26FC6ED900D67B2C /* TTActionSheetConfig.m in Sources */, E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */, E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */, diff --git a/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberImpl.h b/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberImpl.h new file mode 100644 index 00000000..3d911071 --- /dev/null +++ b/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberImpl.h @@ -0,0 +1,16 @@ +// +// XPIMChatRoomMemberImpl.h +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// 房间成员变化的类 在线列表 拉黑/移除成员 查询成员 设置/取消管理 踢出成员 + +#import +#import "XPIMChatRoomMemberInterface.h" +NS_ASSUME_NONNULL_BEGIN + +@interface XPIMChatRoomMemberImpl : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberImpl.m b/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberImpl.m new file mode 100644 index 00000000..05e7d157 --- /dev/null +++ b/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberImpl.m @@ -0,0 +1,40 @@ +// +// XPIMChatRoomMemberImpl.m +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// + +#import "XPIMChatRoomMemberImpl.h" +///Third +#import +#import +///Tool +#import "XPIMManager.h" +///Model +#import "RoomInfoModel.h" + +@implementation XPIMChatRoomMemberImpl + +#pragma mark - XPIMChatRoomMemberInterface +///通过Uid获取 成员 +- (RACSignal *)rac_queryChatRoomMember:(NSString *)uid { + return [RACSignal createSignal:^RACDisposable * _Nullable(id _Nonnull subscriber) { + RoomInfoModel * roomInfo =[XPIMManager shareManager].chatRoomManager.getCurrentRoomInfo; + NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; + request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId]; + request.userIds = @[uid]; + [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { + if (error == nil) { + [subscriber sendNext:members.firstObject]; + [subscriber sendCompleted]; + }else { + [subscriber sendNext:nil]; + } + }]; + + return nil; + }]; +} + +@end diff --git a/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberInterface.h b/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberInterface.h new file mode 100644 index 00000000..e261ac22 --- /dev/null +++ b/xplan-ios/Main/IM/ChatRoomMember/XPIMChatRoomMemberInterface.h @@ -0,0 +1,19 @@ +// +// XPIMChatRoomMemberInterface.h +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@protocol XPIMChatRoomMemberInterface + +///通过Uid获取 成员 +- (RACSignal *)rac_queryChatRoomMember:(NSString *)uid; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/IM/MicroQueue/XPIMRoomMicQueueImpl.m b/xplan-ios/Main/IM/MicroQueue/XPIMRoomMicQueueImpl.m index a8315fad..368f7ec6 100644 --- a/xplan-ios/Main/IM/MicroQueue/XPIMRoomMicQueueImpl.m +++ b/xplan-ios/Main/IM/MicroQueue/XPIMRoomMicQueueImpl.m @@ -10,6 +10,7 @@ #import ///Tool #import "XPIMManager.h" +#import "AccountInfoStorage.h" ///Model #import "MicroModel.h" #import "MicroQueueItemModel.h" @@ -21,10 +22,12 @@ #define MIC_COUNT(Type) [self roomTypecpORnormal:Type] @interface XPIMRoomMicQueueImpl () -///代理 -@property (nonatomic,strong) id delegate; ///麦序的状态 <麦序 麦序上的内容> @property (nonatomic,strong) NSMutableDictionary *micQueue; +///正在上麦或者下麦 +@property (nonatomic,assign) BOOL isLoadingMic; +///代理数组 +@property (nonatomic,strong) NSMutableArray *delegateArray; @end @implementation XPIMRoomMicQueueImpl @@ -38,6 +41,7 @@ } } +///提前绑定一下麦序 - (void)configDefaultMicQueue { RoomInfoModel * roomfInfo = [XPIMManager shareManager].chatRoomManager.getCurrentRoomInfo; for (int i = 0 ; i < MIC_COUNT(roomfInfo.type); i++) { @@ -51,6 +55,8 @@ } } + + #pragma mark - XPIMRoomMicQueueInterface ///进入房间成功之后根据扩展字段整理麦序 - (void)enterRoomRepairMicQueue:(NSDictionary *)micDictionary { @@ -72,8 +78,11 @@ MicroQueueItemModel *sequence = [self.micQueue objectForKey:position]; sequence.userInfo = userInfo; } - if ([self.delegate respondsToSelector:@selector(onGetRoomMicroQueueSuccess:)]) { - [self.delegate onGetRoomMicroQueueSuccess:self.micQueue]; + + for (id delegate in self.delegateArray) { + if ([delegate respondsToSelector:@selector(onGetRoomMicroQueueSuccess:)]) { + [delegate onGetRoomMicroQueueSuccess:self.micQueue]; + } } } else { NSLog(@"获取队列失败"); @@ -86,7 +95,27 @@ } - (void)upMic:(NSString *)position { + if (self.isLoadingMic) { +#warning to do - 展示正在上麦toast + } + self.isLoadingMic = YES; + ///这个坑位 有没有人 + UserInfoModel *userInfo = [[self.micQueue objectForKey:position] userInfo]; + if (userInfo) { +#warning to do - 展示用户卡片 + } else { + NSString * uid = [[AccountInfoStorage instance] getUid]; + [[[XPIMManager shareManager].chatRoomMemberManager rac_queryChatRoomMember:uid] subscribeNext:^(id _Nullable x) { + NIMChatroomMember * member = x; + if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMTeamMemberTypeManager) { + + } else { + + } + }]; + + } } - (void)downMic:(NSString *)position { @@ -95,11 +124,16 @@ ///添加代理 - (void)addDelegate:(id)delegate { - self.delegate = delegate; + if (delegate) { + [self.delegateArray addObject:delegate]; + } } ///移除代理 - (void)removeDelegate:(id)delegate { - self.delegate = nil; + if (delegate && [self.delegateArray containsObject:delegate]) { + [self.delegateArray removeObject:delegate]; + delegate = nil; + } } #pragma mark - Getters And Setters @@ -109,5 +143,11 @@ } return _micQueue; } +- (NSMutableArray *)delegateArray { + if (!_delegateArray) { + _delegateArray = [NSMutableArray array]; + } + return _delegateArray; +} @end diff --git a/xplan-ios/Main/IM/Room/XPImRoomImpl.m b/xplan-ios/Main/IM/Room/XPImRoomImpl.m index e13f3afd..68d48fda 100644 --- a/xplan-ios/Main/IM/Room/XPImRoomImpl.m +++ b/xplan-ios/Main/IM/Room/XPImRoomImpl.m @@ -18,11 +18,10 @@ @interface XPImRoomImpl () -/// -@property (nonatomic,strong) id delegate; - ///房间信息 @property (nonatomic,strong) RoomInfoModel *roomInfo; +///代理数组 +@property (nonatomic,strong) NSMutableArray *delegateArray; @end @@ -65,13 +64,25 @@ } - (void)addDelegate:(id)delegate { - self.delegate = delegate; + if (delegate) { + [self.delegateArray addObject:delegate]; + } } - (void)removeDelegate:(id)delegate { - self.delegate = nil; + if (delegate && [self.delegateArray containsObject:delegate]) { + [self.delegateArray removeObject:delegate]; + delegate = nil; + } +} + +#pragma mark - Getters And Setters +- (NSMutableArray *)delegateArray { + if (!_delegateArray) { + _delegateArray = [NSMutableArray array]; + } + return _delegateArray; } - @end diff --git a/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageDelegate.h b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageDelegate.h new file mode 100644 index 00000000..ab58d1e4 --- /dev/null +++ b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageDelegate.h @@ -0,0 +1,21 @@ +// +// XPIMChatRoomMessageDelegate.h +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class NIMMessage; +@protocol XPIMChatRoomMessageDelegate + +///收到房间信息更细的消息 +- (void)onReceiveRoomInfoUpdate:(NIMMessage *)message; +///收到队列消息变更的通知 +- (void)onReceiveMicroQueueUpdate:(NIMMessage *)message; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageImpl.h b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageImpl.h new file mode 100644 index 00000000..5b84c4c0 --- /dev/null +++ b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageImpl.h @@ -0,0 +1,16 @@ +// +// XPIMChatRoomMessageImpl.h +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// 处理房间消息 收到房间消息的各种处理 + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPIMChatRoomMessageImpl : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageImpl.m b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageImpl.m new file mode 100644 index 00000000..d8cc5155 --- /dev/null +++ b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageImpl.m @@ -0,0 +1,115 @@ +// +// XPIMChatRoomMessageImpl.m +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// + +#import "XPIMChatRoomMessageImpl.h" +///Third +#import +///Tool +#import "XPIMManager.h" +///Model +#import "RoomInfoModel.h" +///P +#import "XPIMChatRoomMessageDelegate.h" + +@interface XPIMChatRoomMessageImpl () +///代理数组 +@property (nonatomic,strong) NSMutableArray *delegateArray; +@end + +@implementation XPIMChatRoomMessageImpl + +- (instancetype)init { + self = [super init]; + if (self) { + [[NIMSDK sharedSDK].chatManager addDelegate:self]; + } + return self; +} + +- (void)dealloc { + [[NIMSDK sharedSDK].chatManager removeDelegate:self]; +} + +#pragma mark - Private Method +- (void)onReceiveMessageNotification:(NIMMessage *)message { + NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject; + NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content; + switch (content.eventType) { + case NIMChatroomEventTypeEnter: + ///进房房间 目前不做 + break; + case NIMChatroomEventTypeExit: + { + /// 退出房间可能需要及时刷新在线人数 + } + break; + case NIMChatroomEventTypeAddBlack: + { + ///用户被拉黑 需要更新在线人数以及 更新队列 + } + break; + case NIMChatroomEventTypeRemoveBlack: + { + ///移除黑名单 + } + break; + case NIMChatroomEventTypeMemberUpdateInfo://修改自己ext字段 + + break; + case NIMChatroomEventTypeRemoveManager: +#warning to do 移除管理员 + break; + case NIMChatroomEventTypeAddManager: +#warning to do 添加管理员 + break; + case NIMChatroomEventTypeKicked:///用户被踢出房间 + + break; + case NIMChatroomEventTypeInfoUpdated://麦序状态,房间信息,房间背景 + + break; + case NIMChatroomEventTypeQueueChange://队列上下麦 + { + + } + + break; + default: + break; + } +} + +#pragma mark - NIMChatManagerDelegate +/// 收到消息回调 +- (void)onRecvMessages:(NSArray *)messages { + for (NIMMessage * message in messages) { + ///房间内的消息 + if (message.session.sessionType == NIMSessionTypeChatroom && [message.session.sessionId isEqualToString:[NSString stringWithFormat:@"%ld", [XPIMManager shareManager].chatRoomManager.getCurrentRoomInfo.roomId]]) { + if (message.messageType == NIMMessageTypeText || message.messageType == NIMMessageTypeTip) { +#warning to do 加入到公屏 + } else if (message.messageType == NIMMessageTypeNotification) { + NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject; + + }else if (message.messageType == NIMMessageTypeCustom) {// 如果是自定义消息 +#warning to do 处理自定义消息 + + } + } else { + + } + } +} + +#pragma mark - Getters And Setters +- (NSMutableArray *)delegateArray { + if (!_delegateArray) { + _delegateArray = [NSMutableArray array]; + } + return _delegateArray; +} + +@end diff --git a/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageInterface.h b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageInterface.h new file mode 100644 index 00000000..6ac82c54 --- /dev/null +++ b/xplan-ios/Main/IM/RoomMessage/XPIMChatRoomMessageInterface.h @@ -0,0 +1,16 @@ +// +// XPIMChatRoomMessageInterface.h +// xplan-ios +// +// Created by 冯硕 on 2021/10/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPIMChatRoomMessageInterface + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/IM/XPIMManager.h b/xplan-ios/Main/IM/XPIMManager.h index ff51b52d..9896bfee 100644 --- a/xplan-ios/Main/IM/XPIMManager.h +++ b/xplan-ios/Main/IM/XPIMManager.h @@ -8,6 +8,7 @@ #import #import "XPIMRoomInterface.h" #import "XPIMRoomMicQueueInterface.h" +#import "XPIMChatRoomMemberInterface.h" NS_ASSUME_NONNULL_BEGIN @interface XPIMManager : NSObject @@ -16,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,strong, readonly) id chatRoomManager; ///麦序的管理类 @property (nonatomic,strong, readonly) id microQueueManager; +///房间成员管理类 +@property (nonatomic,strong, readonly) id chatRoomMemberManager; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/IM/XPIMManager.m b/xplan-ios/Main/IM/XPIMManager.m index 14925a73..6042ea16 100644 --- a/xplan-ios/Main/IM/XPIMManager.m +++ b/xplan-ios/Main/IM/XPIMManager.m @@ -8,11 +8,14 @@ #import "XPIMManager.h" #import "XPImRoomImpl.h" #import "XPIMRoomMicQueueImpl.h" +#import "XPIMChatRoomMemberImpl.h" @interface XPIMManager () ///聊天室的管理类 @property (nonatomic,strong) id chatRoomManager; ///麦序的管理类 @property (nonatomic,strong) id microQueueManager; +///房间成员管理类 +@property (nonatomic,strong) id chatRoomMemberManager; @end @implementation XPIMManager @@ -41,4 +44,11 @@ return _microQueueManager; } +- (id)chatRoomMemberManager { + if (!_chatRoomMemberManager) { + _chatRoomMemberManager = [[XPIMChatRoomMemberImpl alloc] init]; + } + return _chatRoomMemberManager; +} + @end