123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- //
- // YOUPAIBBUCIMP2PSessionVC.h
- // VQU
- //
- // Created by Elaine on 2021/10/26.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "ZCBaseVC.h"
- #import "NIMSessionConfig.h"//.h
- #import "NIMMessageCellProtocol.h"//.h
- #import "NIMSessionConfigurateProtocol.h"//.h
- #import "YOUPAIBBNIMInputView.h"
- #import "YOUPAIUCBaseTouchTableView.h"
- #import "YOUPAILCGiftAttachment.h"
- #import "YOUPAILCOneImageAttachment.h"
- #import "YOUPAILCMultiImageAttachment.h"
- #import "YOUPAILCMessageTxtAttachment.h"
- #import "YOUPAILPFollowAttachment.h"
- @class YOUPAIBBNIMSessionConfigurator;
- @interface YOUPAIBBUCIMP2PSessionVC : UIViewController<NIMSessionInteractorDelegate,NIMInputActionDelegate,NIMMessageCellDelegate,NIMChatManagerDelegate,NIMConversationManagerDelegate,BBNIMInputDelegate,UCBaseTouchTableViewDelegate>
- @property (nonatomic, strong) YOUPAIUCBaseTouchTableView *youpaiptableView;
- @property (nonatomic,strong) YOUPAIBBNIMInputView *youpaipsessionInputView;
- @property (nonatomic, strong) NIMSession *session;
- @property (nonatomic,weak) id<NIMSessionInteractor> youpaipinteractor;
- @property (nonatomic,assign) BOOL youpaipdisableCommandTyping;
- @property (nonatomic,strong) YOUPAIBBNIMSessionConfigurator *youpaipconfigurator;
- //@property (nonatomic,strong) NSMutableArray<NIMMessage *> *imagesArray; //图片数组
- //子类实现右上角头像点击的方法
- - (void)youpaifprofileClick;
- /**
- * 当前当初的菜单所关联的消息
- *
- * @discussion 在菜单点击方法中,想获取所点的消息,可以调用此接口
- */
- @property (nonatomic,readonly) NIMMessage *messageForMenu;
- /**
- * 初始化方法
- *
- * @param session 所属会话
- *
- * @return 会话页实例
- */
- - (instancetype)initWithSession:(NIMSession *)session;
- #pragma mark - 界面
- /**
- * 会话页导航栏标题-这里指对方的名称
- */
- - (NSString *)youpaifsessionTitle;
- /**
- * 刷新导航栏标题-这里指对方的名称
- */
- - (void)youpaifrefreshNavTitle:(NSString *)title;
- - (void)youpaifrefreshNavSubTitle:(NSString *)title;
- //刷新导航栏显示的在线状态
- - (void)youpaifrefreshNavOnline:(BOOL)online;
- /**
- * 会话页长按消息可以弹出的菜单
- *
- * @param message 长按的消息
- *
- * @return 菜单,为UIMenuItem的数组
- */
- - (NSArray *)menusItems:(NIMMessage *)message;
- /**
- * 会话页详细配置
- */
- - (id<NIMSessionConfig>)sessionConfig;
- #pragma mark - 消息接口
- /**
- * 发送消息
- *
- * @param message 消息
- */
- - (void)sendMessage:(NIMMessage *)message;
- #pragma mark - 录音接口
- /**
- * 录音失败回调
- *
- * @param error 失败原因
- */
- - (void)onRecordFailed:(NSError *)error;
- /**
- * 录音内容是否可以被发送
- *
- * @param filepath 录音路径
- *
- * @return 是否允许发送
- *
- * @discussion 在此回调里检查录音时长是否满足要求发送的录音时长
- */
- - (BOOL)recordFileCanBeSend:(NSString *)filepath;
- /**
- * 语音不能发送的原因
- *
- * @discussion 可以显示录音时间不满足要求之类的文案
- */
- - (void)showRecordFileNotSendReason;
- #pragma mark - 操作接口
- /**
- * 追加一条消息
- *
- * @param messages 消息
- *
- * @discussion 不会比较时间戳,直接加在消息列表末尾。不会触发 DB 操作,,请手动调用 SDK 里 saveMessage:forSession:completion: 接口。
- */
- - (void)uiAddMessages:(NSArray *)messages;
- /**
- * 插入多条消息
- *
- * @param messages 消息
- *
- * @discussion 会比较时间戳,加在合适的地方,不推荐聊天室这种大消息量场景使用。不会触发 DB 操作,,请手动调用 SDK 里 saveMessage:forSession:completion: 接口。
- */
- - (void)uiInsertMessages:(NSArray *)messages;
- /**
- * 删除一条消息
- *
- * @param message 消息
- *
- * @return 被删除的 MessageModel
- *
- * @discussion 不会触发 DB 操作,请手动调用 SDK 里 deleteMessage: 接口
- */
- - (NIMMessageModel *)uiDeleteMessage:(NIMMessage *)message;
- /**
- * 更新一条消息
- *
- * @param message 消息
- *
- * @discussion 不会触发 DB 操作,请手动调用 SDK 里 updateMessage:forSession:completion: 接口
- */
- - (void)uiUpdateMessage:(NIMMessage *)message;
- //子类需要调用
- - (void)sendMessageReceipt:(NSArray *)messages;
- - (id<NIMConversationManager>)conversationManager;
- @end
|