syntax = "proto2";

package RoomCmd;

//option optimize_for = LITE_RUNTIME;

option java_package = "com.miaole.live.protocol.request";
option java_outer_classname = "RoomCmd";

//检查密码
message checkPwd {
  optional string roomId = 1;//房间ID
  optional string password = 2;//密码
}

//检查是否可以进入房间
message checkCanEnter {
  optional string roomId = 1;//房间ID
  optional int32 source = 2;//来源
}

//获得房间的数据 返回:根据房间类型不同返回不同数据
//娱乐房间返回:FunRoomResult.RoomData
message getRoomData {/**NO_AUTH**/
  optional string roomId = 1;//房间ID
}

//获得房间的麦位数据 返回:根据房间类型不同返回不同数据
//直播间 返回:RoomResult.RoomMicData
//娱乐房间返回FunRoomResult.RoomMicData
message getRoomMicData {/**NO_AUTH**/
  optional string roomId = 1;//房间ID
}

//进入房间，返回鉴权字段CommonResult.StringResult
message enter {
  optional string roomId = 1;//房间ID
  optional string password = 2;//密码
  optional int32 source = 3;//来源
  optional string from = 4;//跟随(nickName)
  optional bool knockRoom = 5;//是否是敲门进房
  optional bool isNew = 6;// 是否新包，处理相亲房问题
  optional bool hadLogoUpload = 7; // 开播时是否上传新的图片
  optional int32 pcType = 8;// 0-app开播，1-pc主播端，2-pc主持人端，3-pc用户端（后续扩展）
  optional string sourceParam = 9;//来源参数
  optional int32 intoRoomType = 10;//1：搜索进入，2：邀请码进入，3：点击封面进入房间，4：点击关注进入，5：心动进房
}

//退出房间(要处理离线自动退出以及房主切换)
message leave {
  optional string roomId = 1;//房间ID
}

//切换频道(针对频道有用)
message switchChannel {
  optional string roomId = 1;//房间ID(新进入房间的id)
  optional string password = 2;//密码
}

//房间里操作类型
message action {
  optional string roomId = 1;//房间ID
  optional int32 actType = 2;//操作类型:见ERoomActionType
  optional string targetId = 3;//为空时为全员操作(设密码时把密码放在targetId)
  optional int32 position = 4;//mic的位置(针对上锁,解锁,邀请好友)；actType为25、28，此字段代表pc模式，0代表app，1代表pc
  optional string param = 5;//扩展参数
}

//更换房间背景图
message changeBg {
  optional string roomId = 1;//房间ID
  optional string bgUrl = 2;//背景图
}

//获取房间状态:返回RoomResult.RoomState
message getRoomState {/**NO_AUTH**/
  optional string roomId = 1;//房间ID
}

//获取房间状态:返回RoomResult.RoomName
message getRoomName {
  optional string roomId = 1;//房间ID
}

//获取房间职位(已经没用):返回RoomResult.RoomJobId
message getJobId {
  optional string unionId = 1;
  optional string roomId = 2;
}

//根据房间ID查询房间名:返回RoomResult.RoomBase
message getRoomBase {
  optional string roomId = 1;
}

//获取房间或频道在线人数:返回CommonResult.IntDatas
message getOnlines {
  repeated string roomIds = 1;//房间或频道id
  optional int32 type = 2;//1公会频道,2公会聊天室,3个人房间
}

//获取当前在线的房间ID
message getOnlineRoomId {
}

//获得房间在线成员 返回:RoomResult.RoomOnlineMemberList
message getRoomOnlineMembers {
  repeated string roomIds = 1;//房间或
  optional int32 start = 2;//
  optional int32 end = 3;//
}

//获得房间在线成员 返回:RoomResult.OnlineMemberList
message getOnlineMembers {
  optional string roomId = 1;//房间Id
  optional int32 start = 2;//
  optional int32 end = 3;//
}

// 获取直播间在线的签约主播 返回RoomResult.MemberList
message getOnlineUnionAnchors {
  optional string roomId = 1; // 房间ID
}

//@房间用户
message atRoomUser {
  optional string roomId = 1;//房间ID
  repeated string atTargetIds = 2;//被@的用户ID数组
}

// 举报房间
message reportRoom {
  optional string roomId = 1;//房间ID
  optional int32 reason = 2;//举报理由
}

//搜索房间用户 返回:SearchData.Builder
message searchRoomUser {
  optional string roomId = 1;//房间ID
  optional string keyword = 2;//搜索关键字
  optional int32 start = 3;//开始
  optional int32 rows = 4;//结束
}

//判断是否在麦上
message isInMic {
  optional string roomId = 1;//房间Id
}

// 发送寻友消息
message sendSeekFriendMsg {
  optional string roomId = 1;// 房间Id
  optional string encodeMsg = 2;// 编码后的消息
}

//获得房间按一个顺序顺序的用户列表 : 返回 根据不同房间而定
//个人娱乐房间 返回 FunRoomResult.MemberList
message getSortMembers {
  optional string roomId = 1;//
  optional int32 start = 2;//
  optional int32 end = 3;//
}


//修改房间配置
message modifyRoom {
  optional string roomId = 1;//房间ID
  repeated string keys = 2;//修改的key
  repeated string values = 3;//修改的值
}

//获得房间配置数据 返回 根据房间不同而不同
//娱乐房间:FunRoomResult.RoomConfigData
message getRoomConfigData {/**NO_AUTH**/
  optional string roomId = 1;//房间ID
}

// 获得语音房分成信息列表，返回：FunRoomResult.FunRoomDividedRateInfos
message getFunRoomDividedRateInfos {/**NO_AUTH**/
  optional string roomId = 1;// 语音房id
}

// 根据排行榜类型返回指定房间:返回CommonResult.IntDatas
message getUserContributeByRankType {
  optional string roomId = 1;// 直播房id
  optional int32 rankType = 2;// 排行榜类型
}

// 获取语音房公告:返回CommonResult.StringResult
message getFunRoomNotice {/**NO_AUTH**/
  optional string roomId = 1;// 房间ID
}

// 修改语音房公告
message modifyFunRoomNotice {
  optional string roomId = 1;// 房间ID
  optional string notice = 2;// 公告
}
// 添加心动值有效时间
message addHeartBeatValueTime {
  optional string roomId = 1;// 房间ID
  optional int64 endTime = 2;//结束时间
}
// 查询心动值有效时间 返回：CommonResult.LongResult
message getHeartBeatValueTime {/**NO_AUTH**/
  optional string roomId = 1;// 房间ID
}
// 查询心动值返回：RankResult.HeartBeatValueRankingList
message getUserHeartbeatValue{
  optional string roomId = 1;// 房间ID
}

// 获取心动值排行榜 返回：RankResult.HeartBeatValueRankingList
message getHeartBeatValueRanking {
  optional string roomId = 1;// 房间ID
  optional int32 type = 2;// 类型 52：日榜 53：周榜 54：月榜
  optional int32 start = 3; //获取起始数据
  optional int32 end = 4; //获取结束数据
}

// 获取该房间内的黑名单用户列表，返回RoomResult.kickMemberInfoList
message getKickMemberList {
  optional string roomId = 1; // 房间ID
}

// 获取该房间内的黑名单用户列表，返回RoomResult.kickMemberInfoList
// operationTime 返回上一次返回列表最后数据的operationTime
message listKickMember{
  optional string roomId = 1; // 房间id
  optional int64 operationTime = 2; // 用于分页
}

// 解除黑名单中的人
message removeKickMember {
  optional string roomId = 1; // 房间ID
  optional string userId = 2; // 被封禁的用户id
}

// 更新房间欢迎词
message updateRoomWelcomeWord {
  optional string roomId = 1; // 房间号
  optional string anchorId = 2; // 主播Id
  optional string message = 3; // 欢迎词
}

// 获取房间欢迎词，返回CommonResult.StringResult
message getRoomWelcomeWord {
  optional string roomId = 1;// 房间ID
  optional string anchorId = 2; // 房主Id
}

// 更新个人视频房私聊金额限制
message updateLiveRoomSpeakSpend {
  optional string roomId = 1; // 房间id
  optional int32 chatMinSend = 2; // 私聊低销
}

// PC端获取欢迎语，返回LiveResult.PCRoomWelcomeWordLists
message getPCRoomWeclcomeWord {
  optional string userId = 1; // 用户ID
}

// PC端更新欢迎语
message updatePCRoomWclcomeWord {
  optional string userId = 1; // 用户id
  repeated string words = 2; // 欢迎语列表
}

// 获取当前个人视频房私聊金额，返回CommonResult.IntResult
message getLiveRoomSpeakSpend {
  optional string roomId = 1; // 房间ID
}

// 根据主播ID获取所在房间信息，返回RoomResult.UserRoomInfo
message getRoomInfByUserId {
  optional string anchorId = 1; // 主播ID
  optional int32 roomType = 2; // 房间类型，1-娱乐房，2-个人直播间
}

// 根据不同的APPID获取官方欢迎词
message getAPPAuthorityWord {
  optional int32 roomType = 1; // 房间类型 1为语音房，2为视频房
}

// 获取该用户当天是否进入过该房间，返回CommonResult.BoolResult
message getDailyEnterRoomInfo {
  optional string userId = 1; // 用户Id
  optional string roomId = 2; // 判断的房间号
}

// 获得房间日收入明细，返回 ：LiveResult.LiveEarningData
message getRoomDateSendGiftList {
  optional string roomId = 1;// 房间id
  optional int32 pageSize = 2;// 获得行数（不能超过100）
  optional int32 pageNum = 3;// 页数
  optional int32 orderType = 4;// 排序类型，0-时间倒叙，1-价值倒叙
}

//获取房间中的贵族人员列表 返回NobleResult.NobotList
message getNobleList {
  optional string roomId = 1; //房间ID
  optional int32 index = 2; //分页下标
}

//获得房间机器人信息 返回:RoomResult.OnlineMemberList
message getRobotmembers {
  optional string roomId = 1;//房间Id
  optional int32 start = 2;//
  optional int32 end = 3;//
}

// 设置房间角色，广播通知RoomResult.UpdateJobIdActionBroadcast
message setRoomMember {
  required string roomId = 1;// 房间id
  required string targetId = 2;// 目标用户id
  required int32 jobId = 3;// 设置角色，1000-代表取消房间角色
}

// 获取房间角色列表，返回RoomResult.RoomMembers
message listRoomMember{
  optional string roomId = 1; // 房间id
  optional int32 pageNo = 2; // 页码
  optional int32 pageSize = 3; // 页数量
}

// 获取房间投票配置，返回RoomResult.RoomVoteConfig
message getRoomVoteConfig {
  required string roomId = 1;// 房间id
}

// 发布房间投票
message createVoteSubject {
  required string roomId = 1;// 房间id
  required int32 subjectType = 2;// 主题类型（1：主题投票  2：主播投票，公会房专用）
  optional string title = 3;// 投票标题（主题投票才有需要，subjectType=1）
  repeated string options = 4; // 投票项（主题投票，是输入文案列表；主播投票，是选择的主播列表）
  required int32 votingType = 5;// 投票形式（1：单选，2：多选，3：单一送礼投票，4：多礼物送礼投票，5：钻石投票）
  optional int32 mulipleLimit = 6;// 多选限定次数（多选专用 ，votingType=2）
  optional string giftTickets = 7;// 礼物票数映射（礼物投票专用，votingType=3/4，数据格式为 giftId+":"+票数+";"，主题投票只有一项）
  optional int64 diamondThreshold = 8;// 送礼钻石阈值（钻石投票专用，votingType=5）
  optional int32 freeTicket = 9;// 用户拥有免费票数（主播投票专用，subject=2）
  optional int32 autoOverDuration = 10;// 自动过期时长，单位分
}

// 获取房间投票，返回RoomResult.RoomVoteSubjectInfo
message getRoomVoteSubjectInfo {
  required string roomId = 1;// 房间Id
}

// 获取房间投票历史记录，返回RoomResult.RoomVoteSubjectInfosHistory
message getRoomVoteSubjectInfosHistory {
  required string roomId = 1;// 房间id
  optional string lastId = 2;// 最后一条数据Id
  optional int32 num = 3;// 获取数据条数，默认取5条
  optional bool showHidden = 4;// 展示隐藏
}

// 终结房间投票
message overVoteSubject {
  required string roomId = 1;// 房间id
}

// 主题礼物投票
message subjectGiftVote {
  required string roomId = 1;// 房间id
  required string receiverId = 2;// 接收者
  required string giftId = 3;// 礼物id
  required int32 giftNum = 4;// 礼物数量
  required string optionId = 5;//	投票选项
}

// 主播免费投票
message freeTicketVote {
  required string roomId = 1;// 房间id
  required string optionId = 2;// 主播id
  required int32 ticketNum = 3;// 投票数量
}

// 主题投票（单选/多选）
message subjectVote {
  required string roomId = 1;// 房间id
  required string optionId = 2;// 投票选项
}

// 获取房间当前投票用户参与排行榜，返回RoomResult.RoomVoteJoinRank
message getRoomVoteJoinRank {
  required string roomId = 1;// 房间id
}

// 隐藏/取消展示投票
message hiddenVoteOption {
  required string roomId = 1;// 房间id（校验权限）
  required string voteId = 2;// 投票id
  required bool hidden = 3;// 是否隐藏，true-隐藏，false-取消
}

// 获得房间封禁状态 返回 RoomResult.RoomBanStatusInfo
message getBanStatus {
  required string roomId = 1;// 房间id
}

// 是否超高清开播白名单 返回 CommonResult.BoolResult
message isSuperHighDefinitionWhiteList {

}

// 获取用户最近访问房间数，返回CommonResult.IntResult
message getRecentRoomCount {

}

// 获取用户最近访问房间信息列表，返回RoomResult.RecentRoomInfos
message getRecentRoomInfos {

}

// 删除用户最近访问房间记录
message removeRecentRoom {
  required string roomId = 1;// 房间id
}

// 触发送pk青年模式广播，广播通知ActivityResult.ActivityNotifyBroadcast
message triggerSendPkYoungModeNotify{
  required string roomId = 1;// 房间id
}

// 检查发送兴趣卡图片和游戏昵称
message checkSendPicAndGameName{
  optional int32 type = 1;// 0：兴趣卡图片，1：关键字
  optional string content = 2;// 内容
  optional string roomId = 3;// 房间id
}

// 邀请上麦
message inviteMicUp {
  optional string roomId = 1;// 房间id
  optional string targetId = 2;// 被邀请者
  optional int32 position = 3;// 麦位
}

//剔除RTC在线成员
message kickRtcOnlineMember {
  optional int32 type = 1;// 1:声网
  optional string roomId = 2;// 房间id
  optional string memberId = 3;// 剔除成员ID
}

// 发送切换RTC广播，广播通知RoomResult.ConvertRtcBroadcast
message sendConvertRtcBroadcast {
  required string roomId = 1;// 房间id
  required string rtcType = 2;// Rtc类型
}

// 根据房间类型获取随机语音房id
message getRandomRoomIdByType {
  required int32 type = 1;//房间类型 1.视频房；2.语音房；0.全部
}

//获取房间配置 如Rtc类型等  返回 RoomResult.RoomConfigResult
message getRoomConfig {
  required string roomId = 1;// 房间id
  optional int32 sceneType = 2;//场景类型 0:默认（开播）,1：pk 2:跨房连麦 3:多人跨房连麦
  optional bool openReception = 3;//是否开启接待
  optional bool setRtcData = 4;//获取并设置rtc值
  repeated string rtcUids = 5;//要检测rtc的用户ID pk,跨房连麦等多人场景使用
}

//设置房间配置 如Rtc类型等  
message setRoomConfig {
  required string roomId = 1;// 房间id
  required string rtcType = 2;// 设置成功 返送RTC广播给房间的用户，广播通知RoomResult.ConvertRtcBroadcast
}

// 设置橱窗人气值有效时间  返回：LiveResult.WindowsPopularityTimeInfo
message addWindowsPopularityTime {
  optional string roomId = 1;// 房间ID
  optional int64 timeMs = 2;//时间类型 选择的时间（毫秒）
}

// 查询橱窗人气值有效时间 返回：LiveResult.WindowsPopularityTimeInfo
message getWindowsPopularityTime {/**NO_AUTH**/
  optional string roomId = 1;// 房间ID
}

// 是否开启橱窗人气值  返回：LiveResult.WindowsPopularityTimeInfo
message setWindowsPopularity {
  optional string roomId = 1;// 房间ID
  optional bool open = 2;//是否开启
  optional int64 timeMs = 3;//时间类型 选择的时间（毫秒）
}

// 是否2K 4K开播白名单 返回 CommonResult.BoolResult
message isUltraHighDefinitionWhiteList {

}

// 设置房间地理位置开关展示
message setRoomGeoLocationShow {
  optional string roomId = 1; // 房间ID
  optional int32 type = 2; // 操作类型（1-房间 2-用户）
  optional bool openStatus = 3; // 开关状态（true-开 false-关）
}

//获得功能开关状态 RoomResult.FunctionSwitchResult
message getRoomFunctionSwitch {
  optional string roomId = 1; // 房间ID
  optional int64 type = 2; //获取数据组合 类似getUserOpt的type
}

// 获取pk排位赛标题与内容配置列表 RoomResult.QualifierPkTitleAndContexts
message getQualifierPkTitleAndContexts {
}