syntax = "proto2";

package OneToOneCallCmd;

option java_package = "com.miaole.live.protocol.request";
option java_outer_classname = "OneToOneCallCmd";

// 发起1v1通话，返回 OneToOneCallResult.OneToOneCallInfo
message startOneToOneCall {
  optional string calleeId = 1; // 被叫用户ID
  optional string callType = 2; // 通话类型：VOICE=语音，VIDEO=视讯
  optional bool flashChat = 3; // 是否是闪聊随机
  optional int32 sourceType = 4; // 发起来源：1-聊天界面，其他值或未传表示其它入口
}

// 接听1v1通话，返回 OneToOneCallResult.OneToOneCallInfo
message acceptOneToOneCall {
  optional string callId = 1; // 通话ID
}

// 拒绝1v1通话，返回 OneToOneCallResult.OneToOneCallInfo
message rejectOneToOneCall {
  optional string callId = 1; // 通话ID
}

// 取消1v1通话，返回 OneToOneCallResult.OneToOneCallInfo
message cancelOneToOneCall {
  optional string callId = 1; // 通话ID
}

// 挂断1v1通话，返回 OneToOneCallResult.OneToOneCallInfo
message hangupOneToOneCall {
  optional string callId = 1; // 通话ID
}

// 1v1通话心跳，返回 OneToOneCallResult.OneToOneCallInfo
message heartbeatOneToOneCall {
  optional string callId = 1; // 通话ID
}

// 查询1v1通话状态，返回 OneToOneCallResult.OneToOneCallInfo
message getOneToOneCallStatus {
  optional string callId = 1; // 通话ID；不传时查询当前用户进行中的通话
}

// 查询1v1通话计费展示信息，返回 OneToOneCallResult.OneToOneCallBillingInfo
message getOneToOneCallBillingInfo {
  optional string targetUserId = 1; // 目标用户ID
}

// 发送1v1通话内文字消息，服务端审核后通过Protobuf广播，不经过IM。
message sendOneToOneCallChat {
  optional string callId = 1; // 当前通话ID
  optional string content = 2; // 待审核的文字内容
}
