Files
IM-server-new/common/src/main/java/cn/wildfirechat/proto/ProtoConstants.java
T

264 lines
8.6 KiB
Java
Raw Normal View History

2019-03-16 17:04:23 +08:00
package cn.wildfirechat.proto;
public class ProtoConstants {
//message Conversation -> type
public interface ConversationType {
int ConversationType_Private = 0;
int ConversationType_Group = 1;
int ConversationType_ChatRoom = 2;
int ConversationType_Channel = 3;
2020-04-30 20:49:48 +08:00
int ConversationType_Things = 4;
2019-03-16 17:04:23 +08:00
}
//message GroupInfo -> type
public interface GroupType {
//member can add quit change group name and portrait, owner can do all the operations
int GroupType_Normal = 0;
//every member can add quit change group name and portrait, no one can kickoff others
int GroupType_Free = 1;
//member can only quit, owner can do all the operations
int GroupType_Restricted = 2;
}
//message GroupMember -> type
public interface GroupMemberType {
int GroupMemberType_Normal = 0;
int GroupMemberType_Manager = 1;
int GroupMemberType_Owner = 2;
int GroupMemberType_Silent = 3;
int GroupMemberType_Removed = 4;
int GroupMemberType_Allowed = 5;
2019-03-16 17:04:23 +08:00
}
//message FriendRequest -> status
public interface FriendRequestStatus {
int RequestStatus_Sent = 0;
int RequestStatus_Accepted = 1;
int RequestStatus_Rejected = 2;
}
//message UploadDeviceTokenRequest -> platform
public interface Platform {
int Platform_UNSET = 0;
int Platform_iOS = 1;
int Platform_Android = 2;
int Platform_Windows = 3;
int Platform_OSX = 4;
int Platform_WEB = 5;
2020-03-26 17:58:17 +08:00
int Platform_WX = 6;
2020-04-24 12:10:09 +08:00
int Platform_LINUX = 7;
2021-12-26 13:47:01 +08:00
int Platform_iPad = 8;
int Platform_APad = 9;
2019-03-16 17:04:23 +08:00
}
//message NotifyMessage & PullMessageRequest -> type
public interface PullType {
int Pull_Normal = 0;
int Pull_ChatRoom = 1;
int Pull_Group = 2;
}
//message UserResult -> code
public interface UserResultCode {
int Success = 0;
int NotFound = 1;
int NotModified = 2;
}
//message ChatroomInfo -> state
public interface ChatroomState {
int Chatroom_State_Normal = 0;
int Chatroom_State_NotStart = 1;
int Chatroom_State_End = 2;
}
//message MessageContent -> contentType
public interface ContentType {
int Unknown = 0;
int Text = 1;
2019-05-25 07:55:58 +08:00
int Voice = 2;
int Image = 3;
2019-03-16 17:04:23 +08:00
int Location = 4;
2019-05-25 07:55:58 +08:00
int File = 5;
int Video = 6;
int Sticker = 7;
int RichMedia = 8;
2019-03-16 17:04:23 +08:00
}
//ModifyGroupInfoRequest -> type
public interface ModifyGroupInfoType {
int Modify_Group_Name = 0;
int Modify_Group_Portrait = 1;
int Modify_Group_Extra = 2;
2019-06-27 17:53:35 +08:00
int Modify_Group_Mute = 3;
int Modify_Group_JoinType = 4;
int Modify_Group_PrivateChat = 5;
int Modify_Group_Searchable = 6;
//仅专业版支持
int Modify_Group_History_Message = 7;
//仅专业版的server api支持
int Modify_Group_Max_Member_Count = 8;
2019-03-16 17:04:23 +08:00
}
//ModifyGroupInfoRequest -> type
public interface PersistFlag {
int Not_Persist = 0;
int Persist = 1;
int Persist_And_Count = 3;
int Transparent = 4;
}
//ModifyChannelInfoRequest -> type
public interface ModifyChannelInfoType {
int Modify_Channel_Name = 0;
int Modify_Channel_Portrait = 1;
int Modify_Channel_Desc = 2;
int Modify_Channel_Extra = 3;
int Modify_Channel_Secret = 4;
int Modify_Channel_Callback = 5;
int Modify_Channel_OnlyCallback = 6;
}
//Channel -> status
2020-02-28 19:03:50 +08:00
//第0位表示是否允许查看用户所有信息,还是只允许看用户id,用户名称,用户昵称和用户头像
//第1位表示是否允许查看非订阅用户信息
//第2位表示是否允许主动添加用户订阅关系
//第3位表示是否允许给非订阅用户发送消息
//第4位表示是否私有,不可以被用户搜索和主动订阅
2020-02-28 19:03:50 +08:00
//第6位表示是否删除
2022-01-29 11:43:44 +08:00
//第8位表示是否是全局频道,全局频道没有订阅关系,会发送给系统内所有成员。可以给非订阅用户单独发消息。
2020-02-28 19:03:50 +08:00
public interface ChannelState {
int Channel_State_Mask_FullInfo = 0x01;
int Channel_State_Mask_Unsubscribed_User_Access = 0x02;
int Channel_State_Mask_Active_Subscribe = 0x04;
int Channel_State_Mask_Message_Unsubscribed = 0x08;
int Channel_State_Mask_Private = 0x10;
int Channel_State_Mask_Deleted = 0x40;
int Channel_State_Mask_Global = 0x80;
2019-03-16 17:04:23 +08:00
}
public interface UserType {
int UserType_Normal = 0;
int UserType_Robot = 1;
int UserType_Device = 2;
int UserType_Admin = 3;
int UserType_Super_Admin = 100;
2019-03-16 17:04:23 +08:00
}
2019-05-22 07:23:09 +08:00
2019-07-30 07:54:49 +08:00
public interface SystemSettingType {
int Group_Max_Member_Count = 1;
}
2019-05-22 07:23:09 +08:00
2019-12-06 08:49:30 +08:00
public interface SearchUserType {
int SearchUserType_General = 0;
int SearchUserType_Name_Mobile = 1;
int SearchUserType_Name = 2;
int SearchUserType_Mobile = 3;
}
2019-05-22 07:23:09 +08:00
2019-12-26 21:18:34 +08:00
public interface UserStatus {
int Normal = 0;
int Muted = 1;
int Forbidden = 2;
}
2019-12-30 08:47:35 +08:00
public interface BlacklistStrategy {
int Message_Reject = 0;
int Message_Ignore = 1;
}
2020-10-19 09:09:53 +08:00
public interface GroupUpdateEventType {
int Group_Event_Create = 0;
int Group_Event_Update = 1;
int Group_Event_Transfer = 2;
int Group_Event_Mute = 3;
int Group_Event_Unmute = 4;
int Group_Event_Destroy = 5;
}
2019-05-22 07:23:09 +08:00
2020-10-19 09:09:53 +08:00
public interface GroupMemberUpdateEventType {
int Group_Member_Event_Join = 0;
int Group_Member_Event_Leave = 1;
int Group_Member_Event_Kickoff = 2;
int Group_Member_Event_Type_Update = 3;
int Group_Member_Event_Alias = 4;
int Group_Member_Event_Extra = 5;
2020-10-19 09:09:53 +08:00
}
public interface ChannelUpdateEventType {
int Channel_Event_Create = 0;
int Channel_Event_Update = 1;
int Channel_Event_Transfer = 2;
int Channel_Event_Destroy = 3;
}
public interface ChatroomUpdateEventType {
int Chatroom_Event_Create = 0;
int Chatroom_Event_Destroy = 1;
}
public interface ChatroomMemberUpdateEventType {
int Chatroom_Member_Event_Join = 0;
int Chatroom_Member_Event_Leave = 1;
int Chatroom_Member_Event_Kickoff = 2;
int Chatroom_Member_Event_Mute = 3;
int Chatroom_Member_Event_Unmute = 4;
}
2019-05-22 07:23:09 +08:00
2021-02-24 15:46:38 +08:00
public interface UpdateUserInfoMask {
int Update_User_DisplayName = 0x01;
int Update_User_Portrait = 0x02;
int Update_User_Gender = 0x04;
int Update_User_Mobile = 0x08;
int Update_User_Email = 0x10;
int Update_User_Address = 0x20;
int Update_User_Company = 0x40;
int Update_User_Social = 0x80;
int Update_User_Extra = 0x100;
2021-04-03 14:29:24 +08:00
int Update_User_Name = 0x200;
2021-02-24 15:46:38 +08:00
}
public enum RequestSourceType {
Request_From_User,
Request_From_Admin,
Request_From_Robot,
Request_From_Channel;
}
public interface ApplicationType {
int ApplicationType_Robot = 0;
int ApplicationType_Channel = 1;
int ApplicationType_Admin = 2;
}
2019-05-22 07:23:09 +08:00
public static final int MESSAGE_CONTENT_TYPE_CREATE_GROUP = 104;
public static final int MESSAGE_CONTENT_TYPE_ADD_GROUP_MEMBER = 105;
public static final int MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER = 106;
public static final int MESSAGE_CONTENT_TYPE_QUIT_GROUP = 107;
public static final int MESSAGE_CONTENT_TYPE_DISMISS_GROUP = 108;
public static final int MESSAGE_CONTENT_TYPE_TRANSFER_GROUP_OWNER = 109;
public static final int MESSAGE_CONTENT_TYPE_CHANGE_GROUP_NAME = 110;
public static final int MESSAGE_CONTENT_TYPE_MODIFY_GROUP_ALIAS = 111;
public static final int MESSAGE_CONTENT_TYPE_CHANGE_GROUP_PORTRAIT = 112;
2019-06-29 08:27:04 +08:00
public static final int MESSAGE_CONTENT_TYPE_CHANGE_MUTE = 113;
public static final int MESSAGE_CONTENT_TYPE_CHANGE_JOINTYPE = 114;
public static final int MESSAGE_CONTENT_TYPE_CHANGE_PRIVATECHAT = 115;
public static final int MESSAGE_CONTENT_TYPE_CHANGE_SEARCHABLE = 116;
2019-06-29 11:26:33 +08:00
public static final int MESSAGE_CONTENT_TYPE_SET_MANAGER = 117;
2020-05-24 19:00:45 +08:00
public static final int MESSAGE_CONTENT_TYPE_MUTE_MEMBER = 118;
public static final int MESSAGE_CONTENT_TYPE_ALLOW_MEMBER = 119;
2020-12-10 18:03:41 +08:00
public static final int MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER_VISIBLE = 120;
public static final int MESSAGE_CONTENT_TYPE_QUIT_GROUP_VISIBLE = 121;
public static final int MESSAGE_CONTENT_TYPE_MODIFY_GROUP_EXTRA = 122;
public static final int MESSAGE_CONTENT_TYPE_MODIFY_GROUP_MEMBER_EXTRA = 123;
2019-03-16 17:04:23 +08:00
}