211 lines
3.4 KiB
Protocol Buffer
211 lines
3.4 KiB
Protocol Buffer
package cs;
|
|
|
|
//常量
|
|
enum Constant_e
|
|
{
|
|
ProtoVersion = 2019071501; //系统版本
|
|
}
|
|
|
|
//心跳
|
|
message CMPing
|
|
{
|
|
}
|
|
message SMPing
|
|
{
|
|
optional int32 param1 = 1;
|
|
}
|
|
|
|
message MFUserInfo
|
|
{
|
|
optional string account_id = 1;
|
|
optional string nickname = 2;
|
|
optional string avatar_url = 3;
|
|
optional int32 sex = 4;
|
|
optional int32 online = 5;
|
|
}
|
|
|
|
message MFGroupMemberDB
|
|
{
|
|
optional string account_id = 1;
|
|
optional string nickname = 2;
|
|
optional string avatar_url = 3;
|
|
optional int32 sex = 4;
|
|
optional int64 group_id = 5;
|
|
optional int32 data_version1 = 6;
|
|
}
|
|
|
|
message MFGroupDB
|
|
{
|
|
repeated MFGroupMemberDB members = 1;
|
|
}
|
|
|
|
message MFFriendDB
|
|
{
|
|
|
|
}
|
|
|
|
//
|
|
message CMLogin
|
|
{
|
|
optional string account_id = 3;
|
|
optional string session_id = 20;
|
|
optional string nickname = 4;
|
|
optional string avatar_url = 5;
|
|
optional int32 sex = 6;
|
|
}
|
|
message SMLogin
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMFriendList
|
|
{
|
|
}
|
|
message SMFriendList
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
repeated MFUserInfo friend_list = 3;
|
|
}
|
|
|
|
message CMFriendInvite
|
|
{
|
|
optional string friend_id = 1;
|
|
optional string invite_msg = 2;
|
|
}
|
|
message SMFriendInvite
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMFriendAgree
|
|
{
|
|
optional string friend_id = 1;
|
|
}
|
|
message SMFriendAgree
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMFriendIgnore
|
|
{
|
|
optional string friend_id = 1;
|
|
}
|
|
message SMFriendIgnore
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMFriendDelete
|
|
{
|
|
optional string friend_id = 1;
|
|
}
|
|
message SMFriendDelete
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
//建群
|
|
message CMGroupCreate
|
|
{
|
|
optional string group_name = 1; //群名称
|
|
}
|
|
//建群返回
|
|
message SMGroupCreate
|
|
{
|
|
optional int32 error_code = 1; //1:群已存在 2: 你已经有群
|
|
optional string error_msg = 2; //错误消息
|
|
}
|
|
|
|
//加群
|
|
message CMGroupJoin
|
|
{
|
|
optional int64 group_id = 1; //群id
|
|
}
|
|
//加群返回
|
|
message SMGroupJoin
|
|
{
|
|
optional int32 error_code = 1; //1:群id不存在 2:群已满
|
|
optional string error_msg = 2; //错误消息
|
|
}
|
|
|
|
message CMGroupAgree
|
|
{
|
|
}
|
|
message SMGroupAgree
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
//踢人
|
|
message CMGroupKick
|
|
{
|
|
optional string account_id = 1;
|
|
}
|
|
|
|
//踢人回复
|
|
message SMGroupKick
|
|
{
|
|
optional int32 error_code = 1; //1:群id错误
|
|
optional string error_msg = 2; //错误消息
|
|
}
|
|
|
|
message CMGroupQuit
|
|
{
|
|
}
|
|
message SMGroupQuit
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMGroupDismiss
|
|
{
|
|
}
|
|
message SMGroupDismiss
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMGroupRename
|
|
{
|
|
optional string new_group_name = 1;
|
|
}
|
|
message SMGroupRename
|
|
{
|
|
optional int32 error_code = 1;
|
|
optional string error_msg = 2;
|
|
}
|
|
|
|
message CMSendChatMsg
|
|
{
|
|
optional int32 chat_channel = 1;
|
|
optional string target = 2;
|
|
optional string msg = 3;
|
|
}
|
|
|
|
message SMUserStatusNotify
|
|
{
|
|
repeated string online_users = 1;
|
|
repeated string offline_users = 2;
|
|
}
|
|
|
|
message SMChatMsgNotify
|
|
{
|
|
optional string sender = 1;
|
|
optional int32 chat_channel = 2;
|
|
optional string msg = 3;
|
|
}
|
|
|
|
message SMUserInfoUpdate
|
|
{
|
|
repeated MFUserInfo user_infos = 1;
|
|
}
|