You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/proto/rtc/rtc.proto

279 lines
5.9 KiB

syntax = "proto3";
option go_package = "OpenIM/pkg/proto/rtc;rtc";
package proto;
message CommonResp{
int32 errCode = 1;
string errMsg = 2;
}
message MsgData {
string sendID = 1;
string recvID = 2;
string groupID = 3;
string clientMsgID = 4;
string serverMsgID = 5;
int32 senderPlatformID = 6;
string senderNickname = 7;
string senderFaceURL = 8;
int32 sessionType = 9;
int32 msgFrom = 10;
int32 contentType = 11;
bytes content = 12;
uint32 seq = 14;
int64 sendTime = 15;
int64 createTime = 16;
int32 status = 17;
map<string, bool> options = 18;
OfflinePushInfo offlinePushInfo = 19;
}
message GroupInfo{
string groupID = 1;
string groupName = 2;
string notification = 3;
string introduction = 4;
string faceURL = 5;
string ownerUserID = 6;
uint32 createTime = 7;
uint32 memberCount = 8;
string ex = 9;
int32 status = 10;
string creatorUserID = 11;
int32 groupType = 12;
}
message GroupMemberFullInfo {
string groupID = 1 ;
string userID = 2 ;
int32 roleLevel = 3;
int32 joinTime = 4;
string nickname = 5;
string faceURL = 6;
int32 appMangerLevel = 7; //if >0
int32 joinSource = 8;
string operatorUserID = 9;
string ex = 10;
}
message ParticipantMetaData{
GroupInfo groupInfo = 1;
GroupMemberFullInfo groupMemberInfo = 2;
PublicUserInfo userInfo = 3;
}
message PublicUserInfo{
string userID = 1;
string nickname = 2;
string faceURL = 3;
int32 gender = 4;
string ex = 5;
}
message GetJoinTokenReq{
string room = 1;
string identity = 2;
ParticipantMetaData metaData = 3;
string operationID = 4;
}
message GetJoinTokenResp{
CommonResp CommonResp = 1;
string jwt = 2;
string liveURL = 3;
}
message OfflinePushInfo{
string title = 1;
string desc = 2;
string ex = 3;
string iOSPushSound = 4;
bool iOSBadgeCount = 5;
}
message SignalReq {
oneof payload {
SignalInviteReq invite = 1;
SignalInviteInGroupReq inviteInGroup= 2;
SignalCancelReq cancel = 3;
SignalAcceptReq accept = 4;
SignalHungUpReq hungUp = 5;
SignalRejectReq reject = 6;
SignalGetRoomByGroupIDReq getRoomByGroupID = 7;
SignalOnRoomParticipantConnectedReq onRoomParticipantConnectedReq = 8;
SignalOnRoomParticipantDisconnectedReq onRoomParticipantDisconnectedReq = 9;
SignalGetTokenByRoomIDReq getTokenByRoomID = 10;
}
}
message SignalResp {
oneof payload {
SignalInviteReply invite = 1;
SignalInviteInGroupReply inviteInGroup= 2;
SignalCancelReply cancel = 3;
SignalAcceptReply accept = 4;
SignalHungUpReply hungUp = 5;
SignalRejectReply reject = 6;
SignalGetRoomByGroupIDReply getRoomByGroupID = 7;
SignalGetTokenByRoomIDReply getTokenByRoomID = 8;
}
}
message InvitationInfo {
string inviterUserID = 1;
repeated string inviteeUserIDList = 2;
string customData = 3;
string groupID = 4;
string roomID = 5;
int32 timeout = 6;
string mediaType = 7;
int32 platformID = 8;
int32 sessionType = 9;
int32 initiateTime = 10;
repeated string busyLineUserIDList = 11;
}
message SignalInviteReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
}
message SignalInviteReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
repeated string busyLineUserIDList = 4;
}
message SignalInviteInGroupReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
}
message SignalInviteInGroupReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
repeated string busyLineUserIDList = 4;
}
message SignalCancelReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
}
message SignalCancelReply {
}
message SignalAcceptReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
int32 opUserPlatformID = 5;
}
message SignalAcceptReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
}
message SignalHungUpReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
}
message SignalHungUpReply {
}
message SignalRejectReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
int32 opUserPlatformID = 5;
}
message SignalRejectReply {
}
message SignalGetRoomByGroupIDReq {
string opUserID = 1;
string groupID = 2;
ParticipantMetaData participant = 3;
}
message SignalGetRoomByGroupIDReply {
InvitationInfo invitation = 1;
repeated ParticipantMetaData participant = 2;
string roomID = 3;
}
message SignalOnRoomParticipantConnectedReq {
InvitationInfo invitation = 1;
repeated ParticipantMetaData participant = 2;
string groupID = 3;
}
message SignalOnRoomParticipantDisconnectedReq {
InvitationInfo invitation = 1;
repeated ParticipantMetaData participant = 2;
string groupID = 3;
}
message SignalGetTokenByRoomIDReq {
string roomID = 1;
string opUserID = 2;
ParticipantMetaData participant = 3;
string operationID = 4;
}
message SignalGetTokenByRoomIDReply {
string token = 1;
string liveURL = 2;
}
message SignalMessageAssembleReq {
SignalReq signalReq = 1;
string operationID = 2;
}
message SignalMessageAssembleResp {
CommonResp commonResp = 1;
bool isPass = 2;
SignalResp signalResp = 3;
MsgData msgData = 4;
}
message SignalGetRoomsReq {
string operationID = 1;
string roomID = 2;
}
message SignalGetRoomsResp {
CommonResp commonResp = 1;
repeated SignalGetRoomByGroupIDReply roomList = 2;
}
service RtcService {
rpc SignalMessageAssemble(SignalMessageAssembleReq) returns(SignalMessageAssembleResp);
rpc SignalGetRooms(SignalGetRoomsReq) returns(SignalGetRoomsResp);
}