Files
yinmeng-ios-store/yinmeng-ios/DingDangApp/BsaseClass/Utiles/GCDMuticastDelegate/AppMessageManager.h
2023-12-14 16:53:50 -08:00

140 lines
5.3 KiB
Objective-C
Executable File

//
// YBVideoMessageManager.h
// Youbei
//
// Created by PangChong on 2019/12/4.
// Copyright © 2019 PangChong. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GCDMulticastDelegate.h"
#import "RoomInfoModel.h"
#import "RoomUserInfoModel.h"
@class VideoModel;
NS_ASSUME_NONNULL_BEGIN
@protocol AppMessageManagerDelegate <NSObject>
@optional;
/*使用
发送:
[[AppMessageManager shareManager].delegate sendPushMessage:userInfo];
接收:
在需要接收的vc添加
<AppMessageManagerDelegate>
[[AppMessageManager shareManager].delegate addDelegate:self delegateQueue:dispatch_get_main_queue()];
然后实现需要监听的代理 比如:
- (void)sendPushMessage:(NSDictionary *)messageInfo{
}
*/
- (void)sendPushMessage:(NSDictionary *)messageInfo;
///关闭房间
- (void)sendRoomIsOpenMessage:(NSDictionary *)dic;
///刷新用户信息 刷新列表
- (void)sendRoomReloadUserMessage:(id)data;
///房间刷新麦位 清空麦序消息
- (void)sendRoomReloadMicroList:(id)data;
///更新麦位数量
- (void)reloadMiceoListCount:(NSInteger)count;
///更新钻石数量
- (void)sendUpDataMyDiamond:(NSString *)diamond;
///发送背包礼物回调礼物数据更新
- (void)sendUpDataGiftsData:(NSArray *)giftArray;
///发送清空背包消息
- (void)sendCleanMyPackage:(BOOL)isClean;
///发送房间信息更新
- (void)sendReloadRoomInfo:(RoomModel*)roomModel;
///添加动画
- (void)sendAddSvga:(NSDictionary *)dataDic;
///添加进入房间动画动画
- (void)sendInRoomAddSvga:(NSDictionary *)dataDic;
///播放动画
- (void)sendPlaySvga:(NSDictionary *)dataDic;
///播放动画
- (void)sendPlayInRoomSvga:(NSDictionary *)dataDic;
///开启关闭幸运礼物
- (void)sendRoomOpenLuckGift:(BOOL)isOpen;
///发送爵位升级
- (void)sendNobilityLevelUp:(NSDictionary*)dataDic;
/// /**type 1被踢出房间 */
/**type2被拉黑 */
/**type 3被封禁*/
/**type 4房间被封禁*/
- (void)makeGoOutRoom:(NSDictionary*)dataDic type:(NSInteger)type;
#pragma mark --房间消息
#pragma mark --接收
///房间消息响应接收
- (void)receiveRoomMsgWithResponseDict:(NSDictionary*)dataDic;
@end
@interface AppMessageManager : NSObject
@property (nonatomic,strong) NSString *roomID;
+ (AppMessageManager *)shareManager;
@property (nonatomic,strong) GCDMulticastDelegate<AppMessageManagerDelegate> *delegate;
#pragma mark --房间消息
#pragma mark --发送
///发送进入房间消息
- (void)sendJoinRoomMessage:(NSString *)roomID passWord:(NSString *)password follow_user_id:(NSString *)follorUserID;
///发送上麦消息
- (void)sendUpSelectMicroMessage:(NSString *)roomID microID:(NSString *)microID;
///发送下麦消息
- (void)sendDownMicroMessage:(NSString *)roomID;
///发送抱上麦消息
- (void)sendHugUpMicroMessage:(NSString *)roomID microID:(NSString *)microID userID:(NSString *)userID;
///发送抱下麦消息
- (void)sendHugDownMicroMessage:(NSString *)roomID microID:(NSString *)microID userID:(NSString *)userID;
///发送开启自由麦
- (void)sendOpenFreeMicroMessage:(NSString *)roomID;
///发送关闭自由麦
- (void)sendCloseFreeMicroMessage:(NSString *)roomID;
///清空麦序
- (void)sendCleanMicroMessage:(NSString *)roomID;
///锁麦
- (void)sendLockMicroMessage:(NSString *)roomID microID:(NSString *)microID;
///解除锁麦
- (void)sendUnLockMicroMessage:(NSString *)roomID microID:(NSString *)microID;
///发送礼物
- (void)sendGiftMessage:(NSString *)roomID giftNum:(NSInteger)giftNum giftID:(NSString *)giftID userIDS:(NSArray*)userIDs type:(NSInteger)type;
///设置管理
- (void)sendSetRoomManagerMessage:(NSString *)roomID userID:(NSString *)userID roomAuth:(NSString *)roomAuth;
///离开房间
- (void)sendLeaveRoomMessage;
///关闭房间
- (void)sendCloseRoomMessage:(NSString *)roomID;
///发送公屏文字消息
- (void)sendPublicTextMessage:(NSString *)roomID text:(NSString *)text userInfo:(RoomUserInfoModel*)userInfo messageType:(NSInteger)messageType;
///发送公屏表情消息
- (void)sendPublicEmojiMessage:(NSString *)roomID userInfo:(RoomUserInfoModel*)userInfo cid:(NSString *)cid eid:(NSString *)eid;
///取消排麦
- (void)sendCancleMicroClibMessage:(NSString *)roomID;
///提出房间
- (void)sendKickOutRoomMessage:(NSString *)roomID userID:(NSString *)userID;
///禁言
- (void)sendNoWordMessage:(NSString *)roomID userID:(NSString *)userID ttl:(NSString *)ttl banType:(NSString *)banType;
///禁麦
- (void)sendNoMicroMessage:(NSString *)roomID userID:(NSString *)userID ttl:(NSString *)ttl banType:(NSString *)banType micID:(NSString *)micID;
///开关公屏
- (void)sendIsOpenPublicScreenMessage:(NSString *)roomID isOpen:(NSInteger )isOpen;
///清空麦位值
- (void)sendCleanMicroCharmMessge:(NSString *)roomID userids:(NSArray *)userids;
///拉黑用户
- (void)sendAddUserToBlickListMessage:(NSString *)roomID userID:(NSString *)userID desc:(NSString *)desc time:(NSString *)time;
///警告用户
- (void)sendWarningMessage:(NSString *)roomID userID:(NSString *)userID desc:(NSString *)desc;
///全麦礼物
- (void)sendAllMicroGiftMessage:(NSString *)roomID giftID:(NSString *)giftID userids:(NSArray *)userids;
///背包礼物
- (void)sendAllGiftMessage:(NSString *)roomID userID:(NSString *)userID;
///清除单个用户魅力值
- (void)sendCleanSelectUserCharmMessage:(NSString *)roomID userID:(NSString *)userID toUserID:(NSString *)touserID;
@end
NS_ASSUME_NONNULL_END