mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 05:12:17 +00:00
Compare commits
10 Commits
1.1.0
...
02f83a3c48
Author | SHA1 | Date | |
---|---|---|---|
02f83a3c48 | |||
4016c05882 | |||
59d762eecf | |||
e891bc8512 | |||
494c70f2f8 | |||
7baf459b2a | |||
36a09ca088 | |||
926c4659f6 | |||
cb7c68f36c | |||
72af39208c |
Submodule kritor/kritor updated: c49df3074c...27669a8f57
@ -1,7 +1,9 @@
|
||||
package com.tencent.qphone.base.util;
|
||||
|
||||
public abstract class CodecWarpper {
|
||||
public abstract void onResponse(int i2, Object obj, int i3);
|
||||
// public abstract void onResponse(int i2, Object obj, int i3);
|
||||
|
||||
public abstract void onInvalidData(int i2, int i3, String str);
|
||||
|
||||
public abstract void onResponse(int i2, Object obj, int i3, byte[] bArr);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.tencent.qqnt.aio.api;
|
||||
|
||||
import com.tencent.mobileqq.qroute.QRouteApi;
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact;
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
import com.tencent.qqnt.kernel.nativeinterface.IOperateCallback;
|
||||
|
||||
public interface IAIOFileTransfer extends QRouteApi {
|
||||
|
@ -0,0 +1,4 @@
|
||||
package com.tencent.qqnt.kernel.api.impl;
|
||||
|
||||
public class GroupService {
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GroupMemberCommonListResult {
|
||||
public long groupCode;
|
||||
public int identifyFlag;
|
||||
public long startUin;
|
||||
public ArrayList<MemberCommonInfo> memberList = new ArrayList<>();
|
||||
public String strErrorInfo = "";
|
||||
|
||||
public long getGroupCode() {
|
||||
return this.groupCode;
|
||||
}
|
||||
|
||||
public int getIdentifyFlag() {
|
||||
return this.identifyFlag;
|
||||
}
|
||||
|
||||
public ArrayList<MemberCommonInfo> getMemberList() {
|
||||
return this.memberList;
|
||||
}
|
||||
|
||||
public long getStartUin() {
|
||||
return this.startUin;
|
||||
}
|
||||
|
||||
public String getStrErrorInfo() {
|
||||
return this.strErrorInfo;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "GroupMemberCommonListResult{groupCode=" + this.groupCode + ",startUin=" + this.startUin + ",identifyFlag=" + this.identifyFlag + ",memberList=" + this.memberList + ",strErrorInfo=" + this.strErrorInfo + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GroupMemberCommonReq {
|
||||
public long groupCode;
|
||||
public int sourceType;
|
||||
public String startUin = "";
|
||||
public String identifyFlag = "";
|
||||
public ArrayList<Long> uinList = new ArrayList<>();
|
||||
public MemberCommonInfoFilter memberCommonFilter = new MemberCommonInfoFilter();
|
||||
public String memberNum = "";
|
||||
public String filterMethod = "";
|
||||
public String onlineFlag = "";
|
||||
public String realSpecialTitleFlag = "";
|
||||
|
||||
public String getFilterMethod() {
|
||||
return this.filterMethod;
|
||||
}
|
||||
|
||||
public long getGroupCode() {
|
||||
return this.groupCode;
|
||||
}
|
||||
|
||||
public String getIdentifyFlag() {
|
||||
return this.identifyFlag;
|
||||
}
|
||||
|
||||
public MemberCommonInfoFilter getMemberCommonFilter() {
|
||||
return this.memberCommonFilter;
|
||||
}
|
||||
|
||||
public String getMemberNum() {
|
||||
return this.memberNum;
|
||||
}
|
||||
|
||||
public String getOnlineFlag() {
|
||||
return this.onlineFlag;
|
||||
}
|
||||
|
||||
public String getRealSpecialTitleFlag() {
|
||||
return this.realSpecialTitleFlag;
|
||||
}
|
||||
|
||||
public int getSourceType() {
|
||||
return this.sourceType;
|
||||
}
|
||||
|
||||
public String getStartUin() {
|
||||
return this.startUin;
|
||||
}
|
||||
|
||||
public ArrayList<Long> getUinList() {
|
||||
return this.uinList;
|
||||
}
|
||||
|
||||
public void setFilterMethod(String str) {
|
||||
this.filterMethod = str;
|
||||
}
|
||||
|
||||
public void setGroupCode(long j2) {
|
||||
this.groupCode = j2;
|
||||
}
|
||||
|
||||
public void setIdentifyFlag(String str) {
|
||||
this.identifyFlag = str;
|
||||
}
|
||||
|
||||
public void setMemberCommonFilter(MemberCommonInfoFilter memberCommonInfoFilter) {
|
||||
this.memberCommonFilter = memberCommonInfoFilter;
|
||||
}
|
||||
|
||||
public void setMemberNum(String str) {
|
||||
this.memberNum = str;
|
||||
}
|
||||
|
||||
public void setOnlineFlag(String str) {
|
||||
this.onlineFlag = str;
|
||||
}
|
||||
|
||||
public void setRealSpecialTitleFlag(String str) {
|
||||
this.realSpecialTitleFlag = str;
|
||||
}
|
||||
|
||||
public void setSourceType(int i2) {
|
||||
this.sourceType = i2;
|
||||
}
|
||||
|
||||
public void setStartUin(String str) {
|
||||
this.startUin = str;
|
||||
}
|
||||
|
||||
public void setUinList(ArrayList<Long> arrayList) {
|
||||
this.uinList = arrayList;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "GroupMemberCommonReq{groupCode=" + this.groupCode + ",startUin=" + this.startUin + ",identifyFlag=" + this.identifyFlag + ",uinList=" + this.uinList + ",memberCommonFilter=" + this.memberCommonFilter + ",memberNum=" + this.memberNum + ",filterMethod=" + this.filterMethod + ",onlineFlag=" + this.onlineFlag + ",realSpecialTitleFlag=" + this.realSpecialTitleFlag + ",sourceType=" + this.sourceType + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GroupMemberExtListResult {
|
||||
public long dataTime;
|
||||
public long endUin;
|
||||
public long groupCode;
|
||||
public int levelNameSeq;
|
||||
public int memberInfoSeq;
|
||||
public int sysShowFlag;
|
||||
public int timeToUpdate;
|
||||
public int userShowFlag;
|
||||
public int userShowFlagNew;
|
||||
public ArrayList<MemberExtInfo> memberLevelInfo = new ArrayList<>();
|
||||
public ArrayList<MemberLevelName> msgLevelName = new ArrayList<>();
|
||||
public String strOwnerName = "";
|
||||
public String strAdminName = "";
|
||||
public ArrayList<MemberLevelName> msgLevelNameNew = new ArrayList<>();
|
||||
|
||||
public long getDataTime() {
|
||||
return this.dataTime;
|
||||
}
|
||||
|
||||
public long getEndUin() {
|
||||
return this.endUin;
|
||||
}
|
||||
|
||||
public long getGroupCode() {
|
||||
return this.groupCode;
|
||||
}
|
||||
|
||||
public int getLevelNameSeq() {
|
||||
return this.levelNameSeq;
|
||||
}
|
||||
|
||||
public int getMemberInfoSeq() {
|
||||
return this.memberInfoSeq;
|
||||
}
|
||||
|
||||
public ArrayList<MemberExtInfo> getMemberLevelInfo() {
|
||||
return this.memberLevelInfo;
|
||||
}
|
||||
|
||||
public ArrayList<MemberLevelName> getMsgLevelName() {
|
||||
return this.msgLevelName;
|
||||
}
|
||||
|
||||
public ArrayList<MemberLevelName> getMsgLevelNameNew() {
|
||||
return this.msgLevelNameNew;
|
||||
}
|
||||
|
||||
public String getStrAdminName() {
|
||||
return this.strAdminName;
|
||||
}
|
||||
|
||||
public String getStrOwnerName() {
|
||||
return this.strOwnerName;
|
||||
}
|
||||
|
||||
public int getSysShowFlag() {
|
||||
return this.sysShowFlag;
|
||||
}
|
||||
|
||||
public int getTimeToUpdate() {
|
||||
return this.timeToUpdate;
|
||||
}
|
||||
|
||||
public int getUserShowFlag() {
|
||||
return this.userShowFlag;
|
||||
}
|
||||
|
||||
public int getUserShowFlagNew() {
|
||||
return this.userShowFlagNew;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "GroupMemberExtListResult{groupCode=" + this.groupCode + ",memberLevelInfo=" + this.memberLevelInfo + ",msgLevelName=" + this.msgLevelName + ",endUin=" + this.endUin + ",dataTime=" + this.dataTime + ",userShowFlag=" + this.userShowFlag + ",sysShowFlag=" + this.sysShowFlag + ",timeToUpdate=" + this.timeToUpdate + ",strOwnerName=" + this.strOwnerName + ",strAdminName=" + this.strAdminName + ",levelNameSeq=" + this.levelNameSeq + ",userShowFlagNew=" + this.userShowFlagNew + ",msgLevelNameNew=" + this.msgLevelNameNew + ",memberInfoSeq=" + this.memberInfoSeq + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GroupMemberExtReq {
|
||||
public long groupCode;
|
||||
public int sourceType;
|
||||
public String beginUin = "";
|
||||
public String dataTime = "";
|
||||
public ArrayList<Long> uinList = new ArrayList<>();
|
||||
public MemberExtInfoFilter memberExtFilter = new MemberExtInfoFilter();
|
||||
public String seq = "";
|
||||
public String uinNum = "";
|
||||
public String groupType = "";
|
||||
public String richCardNameVer = "";
|
||||
|
||||
public String getBeginUin() {
|
||||
return this.beginUin;
|
||||
}
|
||||
|
||||
public String getDataTime() {
|
||||
return this.dataTime;
|
||||
}
|
||||
|
||||
public long getGroupCode() {
|
||||
return this.groupCode;
|
||||
}
|
||||
|
||||
public String getGroupType() {
|
||||
return this.groupType;
|
||||
}
|
||||
|
||||
public MemberExtInfoFilter getMemberExtFilter() {
|
||||
return this.memberExtFilter;
|
||||
}
|
||||
|
||||
public String getRichCardNameVer() {
|
||||
return this.richCardNameVer;
|
||||
}
|
||||
|
||||
public String getSeq() {
|
||||
return this.seq;
|
||||
}
|
||||
|
||||
public int getSourceType() {
|
||||
return this.sourceType;
|
||||
}
|
||||
|
||||
public ArrayList<Long> getUinList() {
|
||||
return this.uinList;
|
||||
}
|
||||
|
||||
public String getUinNum() {
|
||||
return this.uinNum;
|
||||
}
|
||||
|
||||
public void setBeginUin(String str) {
|
||||
this.beginUin = str;
|
||||
}
|
||||
|
||||
public void setDataTime(String str) {
|
||||
this.dataTime = str;
|
||||
}
|
||||
|
||||
public void setGroupCode(long j2) {
|
||||
this.groupCode = j2;
|
||||
}
|
||||
|
||||
public void setGroupType(String str) {
|
||||
this.groupType = str;
|
||||
}
|
||||
|
||||
public void setMemberExtFilter(MemberExtInfoFilter memberExtInfoFilter) {
|
||||
this.memberExtFilter = memberExtInfoFilter;
|
||||
}
|
||||
|
||||
public void setRichCardNameVer(String str) {
|
||||
this.richCardNameVer = str;
|
||||
}
|
||||
|
||||
public void setSeq(String str) {
|
||||
this.seq = str;
|
||||
}
|
||||
|
||||
public void setSourceType(int i2) {
|
||||
this.sourceType = i2;
|
||||
}
|
||||
|
||||
public void setUinList(ArrayList<Long> arrayList) {
|
||||
this.uinList = arrayList;
|
||||
}
|
||||
|
||||
public void setUinNum(String str) {
|
||||
this.uinNum = str;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "GroupMemberExtReq{groupCode=" + this.groupCode + ",beginUin=" + this.beginUin + ",dataTime=" + this.dataTime + ",uinList=" + this.uinList + ",memberExtFilter=" + this.memberExtFilter + ",seq=" + this.seq + ",uinNum=" + this.uinNum + ",groupType=" + this.groupType + ",richCardNameVer=" + this.richCardNameVer + ",sourceType=" + this.sourceType + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class GroupMemberListResult {
|
||||
public boolean finish;
|
||||
public boolean hasRobot;
|
||||
public ArrayList<GroupMemberInfoListId> ids = new ArrayList<>();
|
||||
public HashMap<String, MemberInfo> infos = new HashMap<>();
|
||||
|
||||
public boolean getFinish() {
|
||||
return this.finish;
|
||||
}
|
||||
|
||||
public boolean getHasRobot() {
|
||||
return this.hasRobot;
|
||||
}
|
||||
|
||||
public ArrayList<GroupMemberInfoListId> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public HashMap<String, MemberInfo> getInfos() {
|
||||
return this.infos;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "GroupMemberListResult{ids=" + this.ids + ",infos=" + this.infos + ",finish=" + this.finish + ",hasRobot=" + this.hasRobot + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public interface IGroupMemberCommonCallback {
|
||||
void onResult(int i2, String str, GroupMemberCommonListResult groupMemberCommonListResult);
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public interface IGroupMemberExtCallback {
|
||||
void onResult(int i2, String str, GroupMemberExtListResult groupMemberExtListResult);
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public interface IGroupMemberListCallback {
|
||||
void onResult(int result, String str, GroupMemberListResult groupMemberListResult);
|
||||
|
||||
}
|
@ -1,7 +1,25 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public interface IKernelGroupService {
|
||||
void getTransferableMemberInfo(long uin, IGetTransferableMemberCallback cb);
|
||||
|
||||
long addKernelGroupListener(IKernelGroupListener ln);
|
||||
|
||||
void getAllMemberList(long groupCode, boolean refresh, IGroupMemberListCallback iGroupMemberListCallback);
|
||||
|
||||
void getMemberCommonInfo(GroupMemberCommonReq groupMemberCommonReq, IGroupMemberCommonCallback iGroupMemberCommonCallback);
|
||||
|
||||
void getMemberExtInfo(GroupMemberExtReq groupMemberExtReq, IGroupMemberExtCallback iGroupMemberExtCallback);
|
||||
|
||||
void getMemberInfo(long j2, ArrayList<String> arrayList, boolean z, IOperateCallback iOperateCallback);
|
||||
|
||||
void getMemberInfoForMqq(long groupCode, ArrayList<String> uids, boolean z, IGroupMemberListCallback iGroupMemberListCallback);
|
||||
|
||||
void getNextMemberList(String sceneId, GroupMemberInfoListId groupMemberInfoListId, int i2, IGroupMemberListCallback iGroupMemberListCallback);
|
||||
|
||||
void getPrevMemberList(String sceneId, GroupMemberInfoListId groupMemberInfoListId, int i2, IGroupMemberListCallback iGroupMemberListCallback);
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -116,7 +118,7 @@ public interface IKernelMsgListener {
|
||||
|
||||
void onSendMsgError(long j2, Contact contact, int i2, String str);
|
||||
|
||||
void onSysMsgNotification(int i2, long j2, long j3, ArrayList<Byte> arrayList);
|
||||
void onSysMsgNotification(int i2, long j2, long j3, boolean z, ArrayList<Byte> arrayList);
|
||||
|
||||
void onTempChatInfoUpdate(TempChatInfo tempChatInfo);
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public interface IKernelRichMediaService {
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public class MemberCommonInfo {
|
||||
public long memberUin;
|
||||
public int privilege;
|
||||
public int shutUpTime;
|
||||
public int uinFlag;
|
||||
public int uinFlagExt;
|
||||
public int uinMobileFlag;
|
||||
|
||||
public long getMemberUin() {
|
||||
return this.memberUin;
|
||||
}
|
||||
|
||||
public int getPrivilege() {
|
||||
return this.privilege;
|
||||
}
|
||||
|
||||
public int getShutUpTime() {
|
||||
return this.shutUpTime;
|
||||
}
|
||||
|
||||
public int getUinFlag() {
|
||||
return this.uinFlag;
|
||||
}
|
||||
|
||||
public int getUinFlagExt() {
|
||||
return this.uinFlagExt;
|
||||
}
|
||||
|
||||
public int getUinMobileFlag() {
|
||||
return this.uinMobileFlag;
|
||||
}
|
||||
|
||||
public void setMemberUin(long j2) {
|
||||
this.memberUin = j2;
|
||||
}
|
||||
|
||||
public void setPrivilege(int i2) {
|
||||
this.privilege = i2;
|
||||
}
|
||||
|
||||
public void setShutUpTime(int i2) {
|
||||
this.shutUpTime = i2;
|
||||
}
|
||||
|
||||
public void setUinFlag(int i2) {
|
||||
this.uinFlag = i2;
|
||||
}
|
||||
|
||||
public void setUinFlagExt(int i2) {
|
||||
this.uinFlagExt = i2;
|
||||
}
|
||||
|
||||
public void setUinMobileFlag(int i2) {
|
||||
this.uinMobileFlag = i2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberCommonInfo{memberUin=" + this.memberUin + ",uinFlag=" + this.uinFlag + ",uinFlagExt=" + this.uinFlagExt + ",uinMobileFlag=" + this.uinMobileFlag + ",shutUpTime=" + this.shutUpTime + ",privilege=" + this.privilege + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public class MemberCommonInfoFilter {
|
||||
public int memberUin;
|
||||
public int privilege;
|
||||
public int shutUpTime;
|
||||
public int uinFlag;
|
||||
public int uinFlagExt;
|
||||
public int uinMobileFlag;
|
||||
|
||||
public int getMemberUin() {
|
||||
return this.memberUin;
|
||||
}
|
||||
|
||||
public int getPrivilege() {
|
||||
return this.privilege;
|
||||
}
|
||||
|
||||
public int getShutUpTime() {
|
||||
return this.shutUpTime;
|
||||
}
|
||||
|
||||
public int getUinFlag() {
|
||||
return this.uinFlag;
|
||||
}
|
||||
|
||||
public int getUinFlagExt() {
|
||||
return this.uinFlagExt;
|
||||
}
|
||||
|
||||
public int getUinMobileFlag() {
|
||||
return this.uinMobileFlag;
|
||||
}
|
||||
|
||||
public void setMemberUin(int i2) {
|
||||
this.memberUin = i2;
|
||||
}
|
||||
|
||||
public void setPrivilege(int i2) {
|
||||
this.privilege = i2;
|
||||
}
|
||||
|
||||
public void setShutUpTime(int i2) {
|
||||
this.shutUpTime = i2;
|
||||
}
|
||||
|
||||
public void setUinFlag(int i2) {
|
||||
this.uinFlag = i2;
|
||||
}
|
||||
|
||||
public void setUinFlagExt(int i2) {
|
||||
this.uinFlagExt = i2;
|
||||
}
|
||||
|
||||
public void setUinMobileFlag(int i2) {
|
||||
this.uinMobileFlag = i2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberCommonInfoFilter{memberUin=" + this.memberUin + ",uinFlag=" + this.uinFlag + ",uinFlagExt=" + this.uinFlagExt + ",uinMobileFlag=" + this.uinMobileFlag + ",shutUpTime=" + this.shutUpTime + ",privilege=" + this.privilege + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MemberExtInfo {
|
||||
public int activeDay;
|
||||
public int cmdUinFlagExt3Grocery;
|
||||
public int level;
|
||||
public int point;
|
||||
public long specialTitleExpireTime;
|
||||
public long uin;
|
||||
public String strName = "";
|
||||
public String nickName = "";
|
||||
public String specialTitle = "";
|
||||
public byte[] msgNeedField = new byte[0];
|
||||
public ArrayList<MemberIcon> memberIconList = new ArrayList<>();
|
||||
|
||||
public int getActiveDay() {
|
||||
return this.activeDay;
|
||||
}
|
||||
|
||||
public int getCmdUinFlagExt3Grocery() {
|
||||
return this.cmdUinFlagExt3Grocery;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return this.level;
|
||||
}
|
||||
|
||||
public ArrayList<MemberIcon> getMemberIconList() {
|
||||
return this.memberIconList;
|
||||
}
|
||||
|
||||
public byte[] getMsgNeedField() {
|
||||
return this.msgNeedField;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return this.nickName;
|
||||
}
|
||||
|
||||
public int getPoint() {
|
||||
return this.point;
|
||||
}
|
||||
|
||||
public String getSpecialTitle() {
|
||||
return this.specialTitle;
|
||||
}
|
||||
|
||||
public long getSpecialTitleExpireTime() {
|
||||
return this.specialTitleExpireTime;
|
||||
}
|
||||
|
||||
public String getStrName() {
|
||||
return this.strName;
|
||||
}
|
||||
|
||||
public long getUin() {
|
||||
return this.uin;
|
||||
}
|
||||
|
||||
public void setActiveDay(int i2) {
|
||||
this.activeDay = i2;
|
||||
}
|
||||
|
||||
public void setCmdUinFlagExt3Grocery(int i2) {
|
||||
this.cmdUinFlagExt3Grocery = i2;
|
||||
}
|
||||
|
||||
public void setLevel(int i2) {
|
||||
this.level = i2;
|
||||
}
|
||||
|
||||
public void setMemberIconList(ArrayList<MemberIcon> arrayList) {
|
||||
this.memberIconList = arrayList;
|
||||
}
|
||||
|
||||
public void setMsgNeedField(byte[] bArr) {
|
||||
this.msgNeedField = bArr;
|
||||
}
|
||||
|
||||
public void setNickName(String str) {
|
||||
this.nickName = str;
|
||||
}
|
||||
|
||||
public void setPoint(int i2) {
|
||||
this.point = i2;
|
||||
}
|
||||
|
||||
public void setSpecialTitle(String str) {
|
||||
this.specialTitle = str;
|
||||
}
|
||||
|
||||
public void setSpecialTitleExpireTime(long j2) {
|
||||
this.specialTitleExpireTime = j2;
|
||||
}
|
||||
|
||||
public void setStrName(String str) {
|
||||
this.strName = str;
|
||||
}
|
||||
|
||||
public void setUin(long j2) {
|
||||
this.uin = j2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberExtInfo{uin=" + this.uin + ",point=" + this.point + ",activeDay=" + this.activeDay + ",level=" + this.level + ",strName=" + this.strName + ",nickName=" + this.nickName + ",specialTitle=" + this.specialTitle + ",specialTitleExpireTime=" + this.specialTitleExpireTime + ",msgNeedField=" + this.msgNeedField + ",cmdUinFlagExt3Grocery=" + this.cmdUinFlagExt3Grocery + ",memberIconList=" + this.memberIconList + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public class MemberExtInfoFilter {
|
||||
public int cmdUinFlagExt3Grocery;
|
||||
public int dataTime;
|
||||
public int levelName;
|
||||
public int levelNameNew;
|
||||
public int memberIcon;
|
||||
public int memberInfoSeq;
|
||||
public int memberLevelInfoActiveDay;
|
||||
public int memberLevelInfoLevel;
|
||||
public int memberLevelInfoName;
|
||||
public int memberLevelInfoPoint;
|
||||
public int memberLevelInfoUin;
|
||||
public int msgNeedField;
|
||||
public int nickName;
|
||||
public int specialTitle;
|
||||
public int sysShowFlag;
|
||||
public int timeToUpdate;
|
||||
public int userShowFlag;
|
||||
public int userShowFlagNew;
|
||||
|
||||
public int getCmdUinFlagExt3Grocery() {
|
||||
return this.cmdUinFlagExt3Grocery;
|
||||
}
|
||||
|
||||
public int getDataTime() {
|
||||
return this.dataTime;
|
||||
}
|
||||
|
||||
public int getLevelName() {
|
||||
return this.levelName;
|
||||
}
|
||||
|
||||
public int getLevelNameNew() {
|
||||
return this.levelNameNew;
|
||||
}
|
||||
|
||||
public int getMemberIcon() {
|
||||
return this.memberIcon;
|
||||
}
|
||||
|
||||
public int getMemberInfoSeq() {
|
||||
return this.memberInfoSeq;
|
||||
}
|
||||
|
||||
public int getMemberLevelInfoActiveDay() {
|
||||
return this.memberLevelInfoActiveDay;
|
||||
}
|
||||
|
||||
public int getMemberLevelInfoLevel() {
|
||||
return this.memberLevelInfoLevel;
|
||||
}
|
||||
|
||||
public int getMemberLevelInfoName() {
|
||||
return this.memberLevelInfoName;
|
||||
}
|
||||
|
||||
public int getMemberLevelInfoPoint() {
|
||||
return this.memberLevelInfoPoint;
|
||||
}
|
||||
|
||||
public int getMemberLevelInfoUin() {
|
||||
return this.memberLevelInfoUin;
|
||||
}
|
||||
|
||||
public int getMsgNeedField() {
|
||||
return this.msgNeedField;
|
||||
}
|
||||
|
||||
public int getNickName() {
|
||||
return this.nickName;
|
||||
}
|
||||
|
||||
public int getSpecialTitle() {
|
||||
return this.specialTitle;
|
||||
}
|
||||
|
||||
public int getSysShowFlag() {
|
||||
return this.sysShowFlag;
|
||||
}
|
||||
|
||||
public int getTimeToUpdate() {
|
||||
return this.timeToUpdate;
|
||||
}
|
||||
|
||||
public int getUserShowFlag() {
|
||||
return this.userShowFlag;
|
||||
}
|
||||
|
||||
public int getUserShowFlagNew() {
|
||||
return this.userShowFlagNew;
|
||||
}
|
||||
|
||||
public void setCmdUinFlagExt3Grocery(int i2) {
|
||||
this.cmdUinFlagExt3Grocery = i2;
|
||||
}
|
||||
|
||||
public void setDataTime(int i2) {
|
||||
this.dataTime = i2;
|
||||
}
|
||||
|
||||
public void setLevelName(int i2) {
|
||||
this.levelName = i2;
|
||||
}
|
||||
|
||||
public void setLevelNameNew(int i2) {
|
||||
this.levelNameNew = i2;
|
||||
}
|
||||
|
||||
public void setMemberIcon(int i2) {
|
||||
this.memberIcon = i2;
|
||||
}
|
||||
|
||||
public void setMemberInfoSeq(int i2) {
|
||||
this.memberInfoSeq = i2;
|
||||
}
|
||||
|
||||
public void setMemberLevelInfoActiveDay(int i2) {
|
||||
this.memberLevelInfoActiveDay = i2;
|
||||
}
|
||||
|
||||
public void setMemberLevelInfoLevel(int i2) {
|
||||
this.memberLevelInfoLevel = i2;
|
||||
}
|
||||
|
||||
public void setMemberLevelInfoName(int i2) {
|
||||
this.memberLevelInfoName = i2;
|
||||
}
|
||||
|
||||
public void setMemberLevelInfoPoint(int i2) {
|
||||
this.memberLevelInfoPoint = i2;
|
||||
}
|
||||
|
||||
public void setMemberLevelInfoUin(int i2) {
|
||||
this.memberLevelInfoUin = i2;
|
||||
}
|
||||
|
||||
public void setMsgNeedField(int i2) {
|
||||
this.msgNeedField = i2;
|
||||
}
|
||||
|
||||
public void setNickName(int i2) {
|
||||
this.nickName = i2;
|
||||
}
|
||||
|
||||
public void setSpecialTitle(int i2) {
|
||||
this.specialTitle = i2;
|
||||
}
|
||||
|
||||
public void setSysShowFlag(int i2) {
|
||||
this.sysShowFlag = i2;
|
||||
}
|
||||
|
||||
public void setTimeToUpdate(int i2) {
|
||||
this.timeToUpdate = i2;
|
||||
}
|
||||
|
||||
public void setUserShowFlag(int i2) {
|
||||
this.userShowFlag = i2;
|
||||
}
|
||||
|
||||
public void setUserShowFlagNew(int i2) {
|
||||
this.userShowFlagNew = i2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberExtInfoFilter{memberLevelInfoUin=" + this.memberLevelInfoUin + ",memberLevelInfoPoint=" + this.memberLevelInfoPoint + ",memberLevelInfoActiveDay=" + this.memberLevelInfoActiveDay + ",memberLevelInfoLevel=" + this.memberLevelInfoLevel + ",memberLevelInfoName=" + this.memberLevelInfoName + ",levelName=" + this.levelName + ",dataTime=" + this.dataTime + ",userShowFlag=" + this.userShowFlag + ",sysShowFlag=" + this.sysShowFlag + ",timeToUpdate=" + this.timeToUpdate + ",nickName=" + this.nickName + ",specialTitle=" + this.specialTitle + ",levelNameNew=" + this.levelNameNew + ",userShowFlagNew=" + this.userShowFlagNew + ",msgNeedField=" + this.msgNeedField + ",cmdUinFlagExt3Grocery=" + this.cmdUinFlagExt3Grocery + ",memberIcon=" + this.memberIcon + ",memberInfoSeq=" + this.memberInfoSeq + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public class MemberIcon {
|
||||
public int bizId;
|
||||
public byte[] exInfo = new byte[0];
|
||||
public long expireTime;
|
||||
public int resId;
|
||||
|
||||
public int getBizId() {
|
||||
return this.bizId;
|
||||
}
|
||||
|
||||
public byte[] getExInfo() {
|
||||
return this.exInfo;
|
||||
}
|
||||
|
||||
public long getExpireTime() {
|
||||
return this.expireTime;
|
||||
}
|
||||
|
||||
public int getResId() {
|
||||
return this.resId;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberIcon{resId=" + this.resId + ",expireTime=" + this.expireTime + ",bizId=" + this.bizId + ",exInfo=" + this.exInfo + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -1,51 +1,146 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public final class MemberInfo implements IKernelModel {
|
||||
String avatarPath;
|
||||
String cardName;
|
||||
int cardType;
|
||||
boolean isDelete;
|
||||
boolean isSpecialConcerned;
|
||||
String nick;
|
||||
String qid;
|
||||
String remark;
|
||||
MemberRole role;
|
||||
long serialVersionUID;
|
||||
int shutUpTime;
|
||||
String uid;
|
||||
long uin;
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole;
|
||||
|
||||
public MemberInfo() {
|
||||
this.serialVersionUID = 1L;
|
||||
this.uid = "";
|
||||
this.qid = "";
|
||||
this.nick = "";
|
||||
this.remark = "";
|
||||
this.cardName = "";
|
||||
this.role = MemberRole.values()[0];
|
||||
this.avatarPath = "";
|
||||
public final class MemberInfo implements IKernelModel {
|
||||
public int bigClubFlag;
|
||||
public int bigClubLevel;
|
||||
public int cardNameId;
|
||||
public int cardType;
|
||||
public int creditLevel;
|
||||
public int globalGroupLevel;
|
||||
public int globalGroupPoint;
|
||||
public boolean isDelete;
|
||||
public boolean isRobot;
|
||||
public boolean isSpecialConcerned;
|
||||
public boolean isSpecialShielded;
|
||||
public int joinTime;
|
||||
public int lastSpeakTime;
|
||||
public int memberFlag;
|
||||
public int memberFlagExt;
|
||||
public int memberFlagExt2;
|
||||
public int memberLevel;
|
||||
public int memberMobileFlag;
|
||||
public int memberTitleId;
|
||||
public int mssVipType;
|
||||
public int richFlag;
|
||||
public int shutUpTime;
|
||||
public long specialTitleExpireTime;
|
||||
public long uin;
|
||||
public int userShowFlag;
|
||||
public int userShowFlagNew;
|
||||
long serialVersionUID = 1;
|
||||
public String uid = "";
|
||||
public String qid = "";
|
||||
public String nick = "";
|
||||
public String remark = "";
|
||||
public String cardName = "";
|
||||
public MemberRole role = MemberRole.values()[0];
|
||||
public String avatarPath = "";
|
||||
public byte[] groupHonor = new byte[0];
|
||||
public String memberSpecialTitle = "";
|
||||
public String autoRemark = "";
|
||||
|
||||
public String getAutoRemark() {
|
||||
return this.autoRemark;
|
||||
}
|
||||
|
||||
public String getAvatarPath() {
|
||||
return this.avatarPath;
|
||||
}
|
||||
|
||||
public int getBigClubFlag() {
|
||||
return this.bigClubFlag;
|
||||
}
|
||||
|
||||
public int getBigClubLevel() {
|
||||
return this.bigClubLevel;
|
||||
}
|
||||
|
||||
public String getCardName() {
|
||||
return this.cardName;
|
||||
}
|
||||
|
||||
public int getCardNameId() {
|
||||
return this.cardNameId;
|
||||
}
|
||||
|
||||
public int getCardType() {
|
||||
return this.cardType;
|
||||
}
|
||||
|
||||
public int getCreditLevel() {
|
||||
return this.creditLevel;
|
||||
}
|
||||
|
||||
public int getGlobalGroupLevel() {
|
||||
return this.globalGroupLevel;
|
||||
}
|
||||
|
||||
public int getGlobalGroupPoint() {
|
||||
return this.globalGroupPoint;
|
||||
}
|
||||
|
||||
public byte[] getGroupHonor() {
|
||||
return this.groupHonor;
|
||||
}
|
||||
|
||||
public boolean getIsDelete() {
|
||||
return this.isDelete;
|
||||
}
|
||||
|
||||
public boolean getIsRobot() {
|
||||
return this.isRobot;
|
||||
}
|
||||
|
||||
public boolean getIsSpecialConcerned() {
|
||||
return this.isSpecialConcerned;
|
||||
}
|
||||
|
||||
public boolean getIsSpecialShielded() {
|
||||
return this.isSpecialShielded;
|
||||
}
|
||||
|
||||
public int getJoinTime() {
|
||||
return this.joinTime;
|
||||
}
|
||||
|
||||
public int getLastSpeakTime() {
|
||||
return this.lastSpeakTime;
|
||||
}
|
||||
|
||||
public int getMemberFlag() {
|
||||
return this.memberFlag;
|
||||
}
|
||||
|
||||
public int getMemberFlagExt() {
|
||||
return this.memberFlagExt;
|
||||
}
|
||||
|
||||
public int getMemberFlagExt2() {
|
||||
return this.memberFlagExt2;
|
||||
}
|
||||
|
||||
public int getMemberLevel() {
|
||||
return this.memberLevel;
|
||||
}
|
||||
|
||||
public int getMemberMobileFlag() {
|
||||
return this.memberMobileFlag;
|
||||
}
|
||||
|
||||
public String getMemberSpecialTitle() {
|
||||
return this.memberSpecialTitle;
|
||||
}
|
||||
|
||||
public int getMemberTitleId() {
|
||||
return this.memberTitleId;
|
||||
}
|
||||
|
||||
public int getMssVipType() {
|
||||
return this.mssVipType;
|
||||
}
|
||||
|
||||
public String getNick() {
|
||||
return this.nick;
|
||||
}
|
||||
@ -58,6 +153,10 @@ public final class MemberInfo implements IKernelModel {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public int getRichFlag() {
|
||||
return this.richFlag;
|
||||
}
|
||||
|
||||
public MemberRole getRole() {
|
||||
return this.role;
|
||||
}
|
||||
@ -66,6 +165,10 @@ public final class MemberInfo implements IKernelModel {
|
||||
return this.shutUpTime;
|
||||
}
|
||||
|
||||
public long getSpecialTitleExpireTime() {
|
||||
return this.specialTitleExpireTime;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return this.uid;
|
||||
}
|
||||
@ -74,26 +177,114 @@ public final class MemberInfo implements IKernelModel {
|
||||
return this.uin;
|
||||
}
|
||||
|
||||
public int getUserShowFlag() {
|
||||
return this.userShowFlag;
|
||||
}
|
||||
|
||||
public int getUserShowFlagNew() {
|
||||
return this.userShowFlagNew;
|
||||
}
|
||||
|
||||
public void setAutoRemark(String str) {
|
||||
this.autoRemark = str;
|
||||
}
|
||||
|
||||
public void setAvatarPath(String str) {
|
||||
this.avatarPath = str;
|
||||
}
|
||||
|
||||
public void setBigClubFlag(int i2) {
|
||||
this.bigClubFlag = i2;
|
||||
}
|
||||
|
||||
public void setBigClubLevel(int i2) {
|
||||
this.bigClubLevel = i2;
|
||||
}
|
||||
|
||||
public void setCardName(String str) {
|
||||
this.cardName = str;
|
||||
}
|
||||
|
||||
public void setCardNameId(int i2) {
|
||||
this.cardNameId = i2;
|
||||
}
|
||||
|
||||
public void setCardType(int i2) {
|
||||
this.cardType = i2;
|
||||
}
|
||||
|
||||
public void setCreditLevel(int i2) {
|
||||
this.creditLevel = i2;
|
||||
}
|
||||
|
||||
public void setGlobalGroupLevel(int i2) {
|
||||
this.globalGroupLevel = i2;
|
||||
}
|
||||
|
||||
public void setGlobalGroupPoint(int i2) {
|
||||
this.globalGroupPoint = i2;
|
||||
}
|
||||
|
||||
public void setGroupHonor(byte[] bArr) {
|
||||
this.groupHonor = bArr;
|
||||
}
|
||||
|
||||
public void setIsDelete(boolean z) {
|
||||
this.isDelete = z;
|
||||
}
|
||||
|
||||
public void setIsRobot(boolean z) {
|
||||
this.isRobot = z;
|
||||
}
|
||||
|
||||
public void setIsSpecialConcerned(boolean z) {
|
||||
this.isSpecialConcerned = z;
|
||||
}
|
||||
|
||||
public void setIsSpecialShielded(boolean z) {
|
||||
this.isSpecialShielded = z;
|
||||
}
|
||||
|
||||
public void setJoinTime(int i2) {
|
||||
this.joinTime = i2;
|
||||
}
|
||||
|
||||
public void setLastSpeakTime(int i2) {
|
||||
this.lastSpeakTime = i2;
|
||||
}
|
||||
|
||||
public void setMemberFlag(int i2) {
|
||||
this.memberFlag = i2;
|
||||
}
|
||||
|
||||
public void setMemberFlagExt(int i2) {
|
||||
this.memberFlagExt = i2;
|
||||
}
|
||||
|
||||
public void setMemberFlagExt2(int i2) {
|
||||
this.memberFlagExt2 = i2;
|
||||
}
|
||||
|
||||
public void setMemberLevel(int i2) {
|
||||
this.memberLevel = i2;
|
||||
}
|
||||
|
||||
public void setMemberMobileFlag(int i2) {
|
||||
this.memberMobileFlag = i2;
|
||||
}
|
||||
|
||||
public void setMemberSpecialTitle(String str) {
|
||||
this.memberSpecialTitle = str;
|
||||
}
|
||||
|
||||
public void setMemberTitleId(int i2) {
|
||||
this.memberTitleId = i2;
|
||||
}
|
||||
|
||||
public void setMssVipType(int i2) {
|
||||
this.mssVipType = i2;
|
||||
}
|
||||
|
||||
public void setNick(String str) {
|
||||
this.nick = str;
|
||||
}
|
||||
@ -106,6 +297,10 @@ public final class MemberInfo implements IKernelModel {
|
||||
this.remark = str;
|
||||
}
|
||||
|
||||
public void setRichFlag(int i2) {
|
||||
this.richFlag = i2;
|
||||
}
|
||||
|
||||
public void setRole(MemberRole memberRole) {
|
||||
this.role = memberRole;
|
||||
}
|
||||
@ -114,6 +309,10 @@ public final class MemberInfo implements IKernelModel {
|
||||
this.shutUpTime = i2;
|
||||
}
|
||||
|
||||
public void setSpecialTitleExpireTime(long j2) {
|
||||
this.specialTitleExpireTime = j2;
|
||||
}
|
||||
|
||||
public void setUid(String str) {
|
||||
this.uid = str;
|
||||
}
|
||||
@ -122,30 +321,16 @@ public final class MemberInfo implements IKernelModel {
|
||||
this.uin = j2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberInfo{uid=" + this.uid + ",qid=" + this.qid + ",uin=" + this.uin + ",nick=" + this.nick + ",remark=" + this.remark + ",cardType=" + this.cardType + ",cardName=" + this.cardName + ",role=" + this.role + ",avatarPath=" + this.avatarPath + ",shutUpTime=" + this.shutUpTime + ",isDelete=" + this.isDelete + ",isSpecialConcerned=" + this.isSpecialConcerned + ",}";
|
||||
public void setUserShowFlag(int i2) {
|
||||
this.userShowFlag = i2;
|
||||
}
|
||||
|
||||
public MemberInfo(String str, String str2, long j2, String str3, String str4, int i2, String str5, MemberRole memberRole, String str6, int i3, boolean z, boolean z2) {
|
||||
this.serialVersionUID = 1L;
|
||||
this.uid = "";
|
||||
this.qid = "";
|
||||
this.nick = "";
|
||||
this.remark = "";
|
||||
this.cardName = "";
|
||||
this.role = MemberRole.values()[0];
|
||||
this.avatarPath = "";
|
||||
this.uid = str;
|
||||
this.qid = str2;
|
||||
this.uin = j2;
|
||||
this.nick = str3;
|
||||
this.remark = str4;
|
||||
this.cardType = i2;
|
||||
this.cardName = str5;
|
||||
this.role = memberRole;
|
||||
this.avatarPath = str6;
|
||||
this.shutUpTime = i3;
|
||||
this.isDelete = z;
|
||||
this.isSpecialConcerned = z2;
|
||||
public void setUserShowFlagNew(int i2) {
|
||||
this.userShowFlagNew = i2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberInfo{uid=" + this.uid + ",qid=" + this.qid + ",uin=" + this.uin + ",nick=" + this.nick + ",remark=" + this.remark + ",cardType=" + this.cardType + ",cardName=" + this.cardName + ",role=" + this.role + ",avatarPath=" + this.avatarPath + ",shutUpTime=" + this.shutUpTime + ",isDelete=" + this.isDelete + ",isSpecialConcerned=" + this.isSpecialConcerned + ",isRobot=" + this.isRobot + ",groupHonor=" + this.groupHonor + ",memberLevel=" + this.memberLevel + ",globalGroupLevel=" + this.globalGroupLevel + ",globalGroupPoint=" + this.globalGroupPoint + ",memberTitleId=" + this.memberTitleId + ",memberSpecialTitle=" + this.memberSpecialTitle + ",specialTitleExpireTime=" + this.specialTitleExpireTime + ",userShowFlag=" + this.userShowFlag + ",userShowFlagNew=" + this.userShowFlagNew + ",richFlag=" + this.richFlag + ",mssVipType=" + this.mssVipType + ",bigClubLevel=" + this.bigClubLevel + ",bigClubFlag=" + this.bigClubFlag + ",autoRemark=" + this.autoRemark + ",creditLevel=" + this.creditLevel + ",joinTime=" + this.joinTime + ",lastSpeakTime=" + this.lastSpeakTime + ",memberFlag=" + this.memberFlag + ",memberFlagExt=" + this.memberFlagExt + ",memberMobileFlag=" + this.memberMobileFlag + ",memberFlagExt2=" + this.memberFlagExt2 + ",isSpecialShielded=" + this.isSpecialShielded + ",cardNameId=" + this.cardNameId + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
public class MemberLevelName {
|
||||
public int level;
|
||||
public String strName = "";
|
||||
|
||||
public int getLevel() {
|
||||
return this.level;
|
||||
}
|
||||
|
||||
public String getStrName() {
|
||||
return this.strName;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MemberLevelName{level=" + this.level + ",strName=" + this.strName + ",}";
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
|
||||
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
public final class UnreadCntInfo {
|
||||
UnreadCnt allUnreadCnt;
|
||||
|
@ -1,4 +1,6 @@
|
||||
package com.tencent.qqnt.kernel.nativeinterface;
|
||||
package com.tencent.qqnt.kernelpublic.nativeinterface;
|
||||
|
||||
import com.tencent.qqnt.kernel.nativeinterface.IKernelModel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.tencent.qqnt.kernelpublic.nativeinterface;
|
||||
|
||||
public enum MemberRole {
|
||||
UNSPECIFIED,
|
||||
STRANGER,
|
||||
MEMBER,
|
||||
ADMIN,
|
||||
OWNER
|
||||
}
|
@ -2,6 +2,7 @@ package com.tencent.qqnt.msg.api;
|
||||
|
||||
import com.tencent.mobileqq.qroute.QRouteApi;
|
||||
import com.tencent.qqnt.kernel.nativeinterface.*;
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@ -9,7 +10,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import kotlin.Pair;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
public interface IMsgService extends QRouteApi {
|
||||
|
@ -2,8 +2,15 @@
|
||||
package kritor.client
|
||||
|
||||
import com.google.protobuf.ByteString
|
||||
import io.grpc.CallOptions
|
||||
import io.grpc.Channel
|
||||
import io.grpc.ClientCall
|
||||
import io.grpc.ClientInterceptor
|
||||
import io.grpc.ForwardingClientCall
|
||||
import io.grpc.Metadata
|
||||
import io.grpc.ManagedChannel
|
||||
import io.grpc.ManagedChannelBuilder
|
||||
import io.grpc.MethodDescriptor
|
||||
import io.kritor.common.Request
|
||||
import io.kritor.common.Response
|
||||
import io.kritor.event.EventServiceGrpcKt
|
||||
@ -23,6 +30,8 @@ import kritor.handlers.handleGrpc
|
||||
import moe.fuqiuluo.shamrock.helper.Level
|
||||
import moe.fuqiuluo.shamrock.helper.LogCenter
|
||||
import moe.fuqiuluo.shamrock.internals.GlobalEventTransmitter
|
||||
import moe.fuqiuluo.shamrock.tools.ShamrockVersion
|
||||
import qq.service.ticket.TicketHelper
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
internal class KritorClient(
|
||||
@ -39,11 +48,26 @@ internal class KritorClient(
|
||||
if (::channel.isInitialized && isActive()){
|
||||
channel.shutdown()
|
||||
}
|
||||
val interceptor = object : ClientInterceptor {
|
||||
override fun <ReqT, RespT> interceptCall(method: MethodDescriptor<ReqT, RespT>, callOptions: CallOptions, next: Channel): ClientCall<ReqT, RespT> {
|
||||
return object : ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>(next.newCall(method, callOptions)) {
|
||||
override fun start(responseListener: Listener<RespT>, headers: Metadata) {
|
||||
headers.merge(Metadata().apply {
|
||||
put(Metadata.Key.of("kritor-self-uin", Metadata.ASCII_STRING_MARSHALLER), TicketHelper.getUin())
|
||||
put(Metadata.Key.of("kritor-self-uid", Metadata.ASCII_STRING_MARSHALLER), TicketHelper.getUid())
|
||||
put(Metadata.Key.of("kritor-self-version", Metadata.ASCII_STRING_MARSHALLER), "OpenShamrock-$ShamrockVersion")
|
||||
})
|
||||
super.start(responseListener, headers)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
channel = ManagedChannelBuilder
|
||||
.forAddress(host, port)
|
||||
.usePlaintext()
|
||||
.enableRetry() // 允许尝试
|
||||
.executor(Dispatchers.IO.asExecutor()) // 使用协程的调度器
|
||||
.intercept(interceptor)
|
||||
.build()
|
||||
}.onFailure {
|
||||
LogCenter.log("KritorClient start failed: ${it.stackTraceToString()}", Level.ERROR)
|
||||
|
@ -2,7 +2,12 @@
|
||||
package kritor.server
|
||||
|
||||
import io.grpc.Grpc
|
||||
import io.grpc.Metadata
|
||||
import io.grpc.InsecureServerCredentials
|
||||
import io.grpc.ServerCall
|
||||
import io.grpc.ServerCallHandler
|
||||
import io.grpc.ServerInterceptor
|
||||
import io.grpc.ForwardingServerCall.SimpleForwardingServerCall;
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
@ -10,14 +15,35 @@ import kotlinx.coroutines.asExecutor
|
||||
import kritor.auth.AuthInterceptor
|
||||
import kritor.service.*
|
||||
import moe.fuqiuluo.shamrock.helper.LogCenter
|
||||
import moe.fuqiuluo.shamrock.tools.ShamrockVersion
|
||||
import qq.service.ticket.TicketHelper
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class KritorServer(
|
||||
private val port: Int
|
||||
): CoroutineScope {
|
||||
|
||||
private val serverInterceptor = object : ServerInterceptor {
|
||||
override fun <ReqT, RespT> interceptCall(
|
||||
call: ServerCall<ReqT, RespT>, headers: Metadata, next: ServerCallHandler<ReqT, RespT>
|
||||
): ServerCall.Listener<ReqT> {
|
||||
return next.startCall(object : SimpleForwardingServerCall<ReqT, RespT>(call) {
|
||||
override fun sendHeaders(headers: Metadata?) {
|
||||
headers?.apply {
|
||||
put(Metadata.Key.of("kritor-self-uin", Metadata.ASCII_STRING_MARSHALLER), TicketHelper.getUin())
|
||||
put(Metadata.Key.of("kritor-self-uid", Metadata.ASCII_STRING_MARSHALLER), TicketHelper.getUid())
|
||||
put(Metadata.Key.of("kritor-self-version", Metadata.ASCII_STRING_MARSHALLER), "OpenShamrock-$ShamrockVersion")
|
||||
}
|
||||
super.sendHeaders(headers)
|
||||
}
|
||||
}, headers)
|
||||
}
|
||||
}
|
||||
|
||||
private val server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create())
|
||||
.executor(Dispatchers.IO.asExecutor())
|
||||
.intercept(AuthInterceptor)
|
||||
.intercept(serverInterceptor)
|
||||
.addService(AuthenticationService)
|
||||
.addService(CoreService)
|
||||
.addService(FriendService)
|
||||
|
@ -2,12 +2,37 @@ package kritor.service
|
||||
|
||||
import com.google.protobuf.ByteString
|
||||
import io.kritor.developer.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import moe.fuqiuluo.shamrock.utils.FileUtils
|
||||
import moe.fuqiuluo.shamrock.utils.MMKVFetcher
|
||||
import moe.fuqiuluo.shamrock.utils.PlatformUtils
|
||||
import qq.service.QQInterfaces
|
||||
import java.io.File
|
||||
|
||||
internal object DeveloperService: DeveloperServiceGrpcKt.DeveloperServiceCoroutineImplBase() {
|
||||
@Grpc("DeveloperService", "Shell")
|
||||
override suspend fun shell(request: ShellRequest): ShellResponse {
|
||||
if (request.commandList.isEmpty()) return ShellResponse.newBuilder().setIsSuccess(false).build()
|
||||
val runtime = Runtime.getRuntime()
|
||||
val result = withTimeoutOrNull(5000L) {
|
||||
withContext(Dispatchers.IO) {
|
||||
runtime.exec(request.commandList.toTypedArray(), null, File(request.directory)).apply { waitFor() }
|
||||
}
|
||||
}
|
||||
return ShellResponse.newBuilder().apply {
|
||||
if (result == null) {
|
||||
isSuccess = false
|
||||
} else {
|
||||
isSuccess = true
|
||||
result.inputStream.use {
|
||||
data = it.readBytes().toString(Charsets.UTF_8)
|
||||
}
|
||||
}
|
||||
}.build()
|
||||
}
|
||||
|
||||
@Grpc("DeveloperService", "ClearCache")
|
||||
override suspend fun clearCache(request: ClearCacheRequest): ClearCacheResponse {
|
||||
FileUtils.clearCache()
|
||||
|
@ -225,8 +225,8 @@ internal object FriendService : FriendServiceGrpcKt.FriendServiceCoroutineImplBa
|
||||
}
|
||||
|
||||
@Grpc("FriendService", "GetUidByUin")
|
||||
override suspend fun getUidByUin(request: GetUidRequest): GetUidResponse {
|
||||
return GetUidResponse.newBuilder().apply {
|
||||
override suspend fun getUidByUin(request: GetUidByUinRequest): GetUidByUinResponse {
|
||||
return GetUidByUinResponse.newBuilder().apply {
|
||||
request.targetUinsList.forEach {
|
||||
putUidMap(it, ContactHelper.getUidByUinAsync(it))
|
||||
}
|
||||
|
@ -3,10 +3,12 @@ package kritor.service
|
||||
import io.grpc.Status
|
||||
import io.grpc.StatusRuntimeException
|
||||
import io.kritor.group.*
|
||||
import moe.fuqiuluo.shamrock.helper.LogCenter
|
||||
import moe.fuqiuluo.shamrock.helper.TroopHonorHelper.decodeHonor
|
||||
import moe.fuqiuluo.shamrock.tools.ifNullOrEmpty
|
||||
import qq.service.contact.ContactHelper
|
||||
import qq.service.group.GroupHelper
|
||||
import tencent.im.troop.honor.troop_honor
|
||||
|
||||
internal object GroupService : GroupServiceGrpcKt.GroupServiceCoroutineImplBase() {
|
||||
@Grpc("GroupService", "BanMember")
|
||||
@ -213,9 +215,10 @@ internal object GroupService : GroupServiceGrpcKt.GroupServiceCoroutineImplBase(
|
||||
return GetGroupListResponse.newBuilder().apply {
|
||||
groupList.forEach { groupInfo ->
|
||||
this.addGroupsInfo(GroupInfo.newBuilder().apply {
|
||||
groupId = groupInfo.troopcode.toLong()
|
||||
groupId = groupInfo.troopcode.ifNullOrEmpty { groupInfo.uin }.ifNullOrEmpty { groupInfo.troopuin }?.toLong() ?: 0
|
||||
groupName = groupInfo.troopname.ifNullOrEmpty { groupInfo.troopRemark }
|
||||
.ifNullOrEmpty { groupInfo.newTroopName } ?: ""
|
||||
.ifNullOrEmpty { groupInfo.newTroopName }
|
||||
?: ""
|
||||
groupRemark = groupInfo.troopRemark ?: ""
|
||||
owner = groupInfo.troopowneruin?.toLong() ?: 0
|
||||
addAllAdmins(GroupHelper.getAdminList(groupId))
|
||||
@ -277,7 +280,7 @@ internal object GroupService : GroupServiceGrpcKt.GroupServiceCoroutineImplBase(
|
||||
@Grpc("GroupService", "GetGroupMemberList")
|
||||
override suspend fun getGroupMemberList(request: GetGroupMemberListRequest): GetGroupMemberListResponse {
|
||||
val memberList = GroupHelper.getGroupMemberList(
|
||||
request.groupId.toString(),
|
||||
request.groupId,
|
||||
if (request.hasRefresh()) request.refresh else false
|
||||
).onFailure {
|
||||
throw StatusRuntimeException(
|
||||
@ -285,30 +288,28 @@ internal object GroupService : GroupServiceGrpcKt.GroupServiceCoroutineImplBase(
|
||||
)
|
||||
}.getOrThrow()
|
||||
return GetGroupMemberListResponse.newBuilder().apply {
|
||||
memberList.forEach { memberInfo ->
|
||||
memberList.values.forEach { memberInfo ->
|
||||
this.addGroupMembersInfo(GroupMemberInfo.newBuilder().apply {
|
||||
uid = ContactHelper.getUidByUinAsync(memberInfo.memberuin?.toLong() ?: 0)
|
||||
uin = memberInfo.memberuin?.toLong() ?: 0
|
||||
nick = memberInfo.troopnick
|
||||
.ifNullOrEmpty { memberInfo.hwName }
|
||||
.ifNullOrEmpty { memberInfo.troopColorNick }
|
||||
.ifNullOrEmpty { memberInfo.friendnick } ?: ""
|
||||
age = memberInfo.age.toInt()
|
||||
uniqueTitle = memberInfo.mUniqueTitle ?: ""
|
||||
uniqueTitleExpireTime = memberInfo.mUniqueTitleExpire
|
||||
card = memberInfo.troopnick.ifNullOrEmpty { memberInfo.friendnick } ?: ""
|
||||
joinTime = memberInfo.join_time
|
||||
lastActiveTime = memberInfo.last_active_time
|
||||
level = memberInfo.level
|
||||
shutUpTimestamp = memberInfo.gagTimeStamp
|
||||
uid = memberInfo.uid
|
||||
uin = memberInfo.uin
|
||||
nick = memberInfo.nick ?: ""
|
||||
age = 0
|
||||
uniqueTitle = memberInfo.memberSpecialTitle ?: ""
|
||||
uniqueTitleExpireTime = memberInfo.specialTitleExpireTime.toInt()
|
||||
card = memberInfo.cardName.ifNullOrEmpty { memberInfo.nick } ?: ""
|
||||
joinTime = memberInfo.joinTime.toLong()
|
||||
lastActiveTime = memberInfo.lastSpeakTime.toLong()
|
||||
level = memberInfo.memberLevel
|
||||
shutUpTimestamp = memberInfo.shutUpTime.toLong()
|
||||
|
||||
distance = memberInfo.distance
|
||||
addAllHonors((memberInfo.honorList ?: "")
|
||||
.split("|")
|
||||
.filter { it.isNotBlank() }
|
||||
.map { it.toInt() })
|
||||
distance = 0
|
||||
addAllHonors(memberInfo.groupHonor.let { bytes ->
|
||||
val honor = troop_honor.GroupUserCardHonor()
|
||||
honor.mergeFrom(bytes)
|
||||
honor.id.get()
|
||||
})
|
||||
unfriendly = false
|
||||
cardChangeable = GroupHelper.isAdmin(request.groupId.toString())
|
||||
cardChangeable = memberInfo.role == com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.ADMIN
|
||||
})
|
||||
}
|
||||
}.build()
|
||||
@ -369,24 +370,25 @@ internal object GroupService : GroupServiceGrpcKt.GroupServiceCoroutineImplBase(
|
||||
@Grpc("GroupService", "GetGroupHonor")
|
||||
override suspend fun getGroupHonor(request: GetGroupHonorRequest): GetGroupHonorResponse {
|
||||
return GetGroupHonorResponse.newBuilder().apply {
|
||||
GroupHelper.getGroupMemberList(request.groupId.toString(), true).onFailure {
|
||||
GroupHelper.getGroupMemberList(request.groupId, true).onFailure {
|
||||
throw StatusRuntimeException(
|
||||
Status.INTERNAL.withDescription("unable to get group member list").withCause(it)
|
||||
)
|
||||
}.onSuccess { memberList ->
|
||||
memberList.forEach { member ->
|
||||
(member.honorList ?: "").split("|")
|
||||
.filter { it.isNotBlank() }
|
||||
.map { it.toInt() }.forEach {
|
||||
val honor = decodeHonor(member.memberuin.toLong(), it, member.mHonorRichFlag)
|
||||
memberList.values.forEach { member ->
|
||||
member.groupHonor.let { bytes ->
|
||||
val honor = troop_honor.GroupUserCardHonor()
|
||||
honor.mergeFrom(bytes)
|
||||
honor.id.get()
|
||||
}.forEach {
|
||||
val honor = decodeHonor(member.uin, it, 0)
|
||||
if (honor != null) {
|
||||
addGroupHonorsInfo(GroupHonorInfo.newBuilder().apply {
|
||||
uid = ContactHelper.getUidByUinAsync(member.memberuin.toLong())
|
||||
uin = member.memberuin.toLong()
|
||||
nick = member.troopnick
|
||||
.ifNullOrEmpty { member.hwName }
|
||||
.ifNullOrEmpty { member.troopColorNick }
|
||||
.ifNullOrEmpty { member.friendnick } ?: ""
|
||||
uid = member.uid
|
||||
uin = member.uin
|
||||
nick = member.nick.ifEmpty {
|
||||
member.cardName
|
||||
} ?: ""
|
||||
honorName = honor.honorName
|
||||
avatar = honor.honorIconUrl
|
||||
id = honor.honorId
|
||||
|
@ -1,7 +1,7 @@
|
||||
package kritor.service
|
||||
|
||||
import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
|
||||
import com.tencent.qqnt.msg.api.IMsgService
|
||||
@ -103,7 +103,12 @@ internal object MessageService : MessageServiceGrpcKt.MessageServiceCoroutineImp
|
||||
Scene.STRANGER -> MsgConstant.KCHATTYPETEMPC2CFROMUNKNOWN
|
||||
Scene.UNRECOGNIZED -> throw StatusRuntimeException(Status.INVALID_ARGUMENT.withDescription("Unrecognized scene"))
|
||||
}
|
||||
service.clearMsgRecords(Contact(chatType, contact.peer, contact.subPeer), null)
|
||||
service.clearMsgRecords(
|
||||
Contact(
|
||||
chatType,
|
||||
contact.peer,
|
||||
contact.subPeer
|
||||
), null)
|
||||
return SetMessageReadResponse.newBuilder().build()
|
||||
}
|
||||
|
||||
@ -330,7 +335,7 @@ internal object MessageService : MessageServiceGrpcKt.MessageServiceCoroutineImp
|
||||
this.uid = detail.sender.uid
|
||||
}.build()
|
||||
detail.message?.elements?.toKritorResponseMessages(
|
||||
com.tencent.qqnt.kernel.nativeinterface.Contact(
|
||||
Contact(
|
||||
detail.msgType,
|
||||
detail.peerId.toString(),
|
||||
null
|
||||
@ -463,7 +468,7 @@ internal object MessageService : MessageServiceGrpcKt.MessageServiceCoroutineImp
|
||||
request.contact.longPeer(),
|
||||
msg.msgSeq.toULong(),
|
||||
request.faceId.toString(),
|
||||
request.isComment
|
||||
request.isSet
|
||||
)
|
||||
return ReactMessageWithEmojiResponse.newBuilder().build()
|
||||
}
|
||||
|
@ -23,4 +23,11 @@ internal object QsignService: QsignServiceGrpcKt.QsignServiceCoroutineImplBase()
|
||||
this.result = ByteString.copyFrom(Dandelion.getInstance().fly(request.data, request.salt.toByteArray()))
|
||||
}.build()
|
||||
}
|
||||
|
||||
@Grpc("QsignService", "GetCmdWhitelist")
|
||||
override suspend fun getCmdWhitelist(request: GetCmdWhitelistRequest): GetCmdWhitelistResponse {
|
||||
return GetCmdWhitelistResponse.newBuilder().apply {
|
||||
addAllCommands(FEKit.getInstance().cmdWhiteList)
|
||||
}.build()
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
|
||||
import io.kritor.event.*
|
||||
import io.kritor.common.PushMessageBody
|
||||
import io.kritor.common.Contact
|
||||
import io.kritor.common.Scene
|
||||
import io.kritor.common.Sender
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
@ -14,6 +15,7 @@ import kotlinx.coroutines.flow.FlowCollector
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import qq.service.QQInterfaces
|
||||
import qq.service.contact.ContactHelper
|
||||
import qq.service.msg.toKritorEventMessages
|
||||
|
||||
internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
@ -24,12 +26,12 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
MutableSharedFlow<NoticeEvent>()
|
||||
}
|
||||
private val requestEventFlow by lazy {
|
||||
MutableSharedFlow<RequestsEvent>()
|
||||
MutableSharedFlow<RequestEvent>()
|
||||
}
|
||||
|
||||
private suspend fun pushNotice(noticeEvent: NoticeEvent) = noticeEventFlow.emit(noticeEvent)
|
||||
|
||||
private suspend fun pushRequest(requestEvent: RequestsEvent) = requestEventFlow.emit(requestEvent)
|
||||
private suspend fun pushRequest(requestEvent: RequestEvent) = requestEventFlow.emit(requestEvent)
|
||||
|
||||
private suspend fun transMessageEvent(record: MsgRecord, message: PushMessageBody) =
|
||||
MessageEventFlow.emit(record to message)
|
||||
@ -44,7 +46,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.messageId = record.msgId.toString()
|
||||
this.messageSeq = record.msgSeq
|
||||
this.contact = Contact.newBuilder().apply {
|
||||
this.scene = scene
|
||||
this.scene = Scene.GROUP
|
||||
this.peer = record.peerUin.toString()
|
||||
this.subPeer = record.peerUid
|
||||
}.build()
|
||||
@ -67,8 +69,8 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.messageId = record.msgId.toString()
|
||||
this.messageSeq = record.msgSeq
|
||||
this.contact = Contact.newBuilder().apply {
|
||||
this.scene = scene
|
||||
this.peer = record.senderUin.toString()
|
||||
this.scene = Scene.FRIEND
|
||||
this.peer = record.senderUid
|
||||
this.subPeer = record.senderUid
|
||||
}.build()
|
||||
this.sender = Sender.newBuilder().apply {
|
||||
@ -92,8 +94,8 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.messageId = record.msgId.toString()
|
||||
this.messageSeq = record.msgSeq
|
||||
this.contact = Contact.newBuilder().apply {
|
||||
this.scene = scene
|
||||
this.peer = record.senderUin.toString()
|
||||
this.scene = if (groupCode > 0) Scene.STRANGER_FROM_GROUP else Scene.STRANGER
|
||||
this.peer = record.senderUid
|
||||
this.subPeer = groupCode.toString()
|
||||
}.build()
|
||||
this.sender = Sender.newBuilder().apply {
|
||||
@ -115,7 +117,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.messageId = record.msgId.toString()
|
||||
this.messageSeq = record.msgSeq
|
||||
this.contact = Contact.newBuilder().apply {
|
||||
this.scene = scene
|
||||
this.scene = Scene.GUILD
|
||||
this.peer = record.guildId ?: ""
|
||||
this.subPeer = record.channelId ?: ""
|
||||
}.build()
|
||||
@ -139,7 +141,8 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
*/
|
||||
suspend fun transPrivateFileEvent(
|
||||
msgTime: Long,
|
||||
userId: Long,
|
||||
senderUid: String,
|
||||
senderUin: Long,
|
||||
fileId: String,
|
||||
fileSubId: String,
|
||||
fileName: String,
|
||||
@ -148,12 +151,13 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
url: String
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.FRIEND_FILE_COME
|
||||
this.type = NoticeEvent.NoticeType.PRIVATE_FILE_UPLOADED
|
||||
this.time = msgTime.toInt()
|
||||
this.friendFileUploaded = FriendFileUploadedNotice.newBuilder().apply {
|
||||
this.privateFileUploaded = PrivateFileUploadedNotice.newBuilder().apply {
|
||||
this.fileId = fileId
|
||||
this.fileName = fileName
|
||||
this.operatorUin = userId
|
||||
this.operatorUid = senderUid
|
||||
this.operatorUin = senderUin
|
||||
this.fileSize = fileSize
|
||||
this.expireTime = expireTime.toInt()
|
||||
this.fileSubId = fileSubId
|
||||
@ -168,7 +172,8 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
*/
|
||||
suspend fun transGroupFileEvent(
|
||||
msgTime: Long,
|
||||
userId: Long,
|
||||
senderUid: String,
|
||||
senderUin: Long,
|
||||
groupId: Long,
|
||||
uuid: String,
|
||||
fileName: String,
|
||||
@ -177,16 +182,17 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
url: String
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.GROUP_FILE_COME
|
||||
this.type = NoticeEvent.NoticeType.GROUP_FILE_UPLOADED
|
||||
this.time = msgTime.toInt()
|
||||
this.groupFileUploaded = GroupFileUploadedNotice.newBuilder().apply {
|
||||
this.groupId = groupId
|
||||
this.operatorUin = userId
|
||||
this.operatorUid = senderUid
|
||||
this.operatorUin = senderUin
|
||||
this.fileId = uuid
|
||||
this.fileName = fileName
|
||||
this.fileSize = fileSize
|
||||
this.biz = bizId
|
||||
this.url = url
|
||||
this.busId = bizId
|
||||
this.fileUrl = url
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
@ -200,19 +206,19 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
suspend fun transGroupSign(
|
||||
time: Long,
|
||||
target: Long,
|
||||
action: String?,
|
||||
rankImg: String?,
|
||||
action: String,
|
||||
rankImg: String,
|
||||
groupCode: Long
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.GROUP_SIGN
|
||||
this.type = NoticeEvent.NoticeType.GROUP_SIGN_IN
|
||||
this.time = time.toInt()
|
||||
this.groupSignIn = GroupSignInNotice.newBuilder().apply {
|
||||
this.groupId = groupCode
|
||||
this.targetUid = ContactHelper.getUidByUinAsync(target)
|
||||
this.targetUin = target
|
||||
this.action = action ?: ""
|
||||
this.suffix = ""
|
||||
this.rankImage = rankImg ?: ""
|
||||
this.action = action
|
||||
this.rankImage = rankImg
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
@ -222,9 +228,9 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
time: Long,
|
||||
operator: Long,
|
||||
target: Long,
|
||||
action: String?,
|
||||
suffix: String?,
|
||||
actionImg: String?,
|
||||
action: String,
|
||||
suffix: String,
|
||||
actionImg: String,
|
||||
groupCode: Long
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
@ -232,11 +238,13 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.time = time.toInt()
|
||||
this.groupPoke = GroupPokeNotice.newBuilder().apply {
|
||||
this.groupId = groupCode
|
||||
this.action = action ?: ""
|
||||
this.action = action
|
||||
this.targetUid = ContactHelper.getUidByUinAsync(target)
|
||||
this.targetUin = target
|
||||
this.operatorUid = ContactHelper.getUidByUinAsync(operator)
|
||||
this.operatorUin = operator
|
||||
this.suffix = suffix ?: ""
|
||||
this.actionImage = actionImg ?: ""
|
||||
this.suffix = suffix
|
||||
this.actionImage = actionImg
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
@ -276,7 +284,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
type: GroupMemberDecreasedNotice.GroupMemberDecreasedType
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.GROUP_MEMBER_INCREASE
|
||||
this.type = NoticeEvent.NoticeType.GROUP_MEMBER_DECREASE
|
||||
this.time = time.toInt()
|
||||
this.groupMemberDecrease = GroupMemberDecreasedNotice.newBuilder().apply {
|
||||
this.groupId = groupCode
|
||||
@ -300,7 +308,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.GROUP_ADMIN_CHANGED
|
||||
this.time = msgTime.toInt()
|
||||
this.groupAdminChange = GroupAdminChangedNotice.newBuilder().apply {
|
||||
this.groupAdminChanged = GroupAdminChangedNotice.newBuilder().apply {
|
||||
this.groupId = groupCode
|
||||
this.targetUid = targetUid
|
||||
this.targetUin = target
|
||||
@ -312,8 +320,9 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
|
||||
suspend fun transGroupWholeBan(
|
||||
msgTime: Long,
|
||||
operator: Long,
|
||||
groupCode: Long,
|
||||
operatorUid: String,
|
||||
operator: Long,
|
||||
isOpen: Boolean
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
@ -322,6 +331,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.groupWholeBan = GroupWholeBanNotice.newBuilder().apply {
|
||||
this.groupId = groupCode
|
||||
this.isBan = isOpen
|
||||
this.operatorUid = operatorUid
|
||||
this.operatorUin = operator
|
||||
}.build()
|
||||
}.build())
|
||||
@ -338,7 +348,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
duration: Int
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.GROUP_MEMBER_BANNED
|
||||
this.type = NoticeEvent.NoticeType.GROUP_MEMBER_BAN
|
||||
this.time = msgTime.toInt()
|
||||
this.groupMemberBan = GroupMemberBanNotice.newBuilder().apply {
|
||||
this.groupId = groupCode
|
||||
@ -400,7 +410,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
|
||||
suspend fun transTitleChange(
|
||||
time: Long,
|
||||
targetId: Long,
|
||||
targetUin: Long,
|
||||
title: String,
|
||||
groupId: Long
|
||||
): Boolean {
|
||||
@ -409,7 +419,8 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.time = time.toInt()
|
||||
this.groupMemberUniqueTitleChanged = GroupUniqueTitleChangedNotice.newBuilder().apply {
|
||||
this.groupId = groupId
|
||||
this.target = targetId
|
||||
this.targetUid = ContactHelper.getUidByUinAsync(targetUin)
|
||||
this.targetUin = targetUin
|
||||
this.title = title
|
||||
}.build()
|
||||
}.build())
|
||||
@ -430,9 +441,11 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
this.groupEssenceChanged = GroupEssenceMessageNotice.newBuilder().apply {
|
||||
this.groupId = groupId
|
||||
this.messageId = msgId.toString()
|
||||
this.targetUid = ContactHelper.getUidByUinAsync(targetUin)
|
||||
this.targetUin = senderUin
|
||||
this.operatorUid = ContactHelper.getUidByUinAsync(operatorUin)
|
||||
this.operatorUin = operatorUin
|
||||
this.subType = subType.toInt()
|
||||
this.isSet = subType.toInt() == 1
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
@ -446,16 +459,16 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
suspend fun transPrivatePoke(
|
||||
msgTime: Long,
|
||||
operator: Long,
|
||||
target: Long,
|
||||
action: String?,
|
||||
suffix: String?,
|
||||
actionImg: String?
|
||||
): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.FRIEND_POKE
|
||||
this.type = NoticeEvent.NoticeType.PRIVATE_POKE
|
||||
this.time = msgTime.toInt()
|
||||
this.friendPoke = FriendPokeNotice.newBuilder().apply {
|
||||
this.privatePoke = PrivatePokeNotice.newBuilder().apply {
|
||||
this.action = action ?: ""
|
||||
this.operatorUid = ContactHelper.getUidByUinAsync(operator)
|
||||
this.operatorUin = operator
|
||||
this.suffix = suffix ?: ""
|
||||
this.actionImage = actionImg ?: ""
|
||||
@ -466,9 +479,9 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
|
||||
suspend fun transPrivateRecall(time: Long, operator: Long, msgId: Long, tipText: String): Boolean {
|
||||
pushNotice(NoticeEvent.newBuilder().apply {
|
||||
this.type = NoticeEvent.NoticeType.FRIEND_RECALL
|
||||
this.type = NoticeEvent.NoticeType.PRIVATE_RECALL
|
||||
this.time = time.toInt()
|
||||
this.friendRecall = FriendRecallNotice.newBuilder().apply {
|
||||
this.privateRecall = PrivateRecallNotice.newBuilder().apply {
|
||||
this.operatorUin = operator
|
||||
this.messageId = msgId.toString()
|
||||
this.tipText = tipText
|
||||
@ -483,14 +496,15 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
* 请求 通知器
|
||||
*/
|
||||
object RequestTransmitter {
|
||||
suspend fun transFriendApp(time: Long, operator: Long, tipText: String, flag: String): Boolean {
|
||||
pushRequest(RequestsEvent.newBuilder().apply {
|
||||
this.type = RequestsEvent.RequestType.FRIEND_APPLY
|
||||
suspend fun transFriendApp(time: Long, applierUid: String, operator: Long, tipText: String, flag: String): Boolean {
|
||||
pushRequest(RequestEvent.newBuilder().apply {
|
||||
this.type = RequestEvent.RequestType.FRIEND_APPLY
|
||||
this.time = time.toInt()
|
||||
this.requestId = flag
|
||||
this.friendApply = FriendApplyRequest.newBuilder().apply {
|
||||
this.applierUid = applierUid
|
||||
this.applierUin = operator
|
||||
this.message = tipText
|
||||
this.flag = flag
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
@ -504,15 +518,35 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
groupCode: Long,
|
||||
flag: String
|
||||
): Boolean {
|
||||
pushRequest(RequestsEvent.newBuilder().apply {
|
||||
this.type = RequestsEvent.RequestType.GROUP_APPLY
|
||||
pushRequest(RequestEvent.newBuilder().apply {
|
||||
this.type = RequestEvent.RequestType.GROUP_APPLY
|
||||
this.time = time.toInt()
|
||||
this.requestId = flag
|
||||
this.groupApply = GroupApplyRequest.newBuilder().apply {
|
||||
this.applierUid = applierUid
|
||||
this.applierUin = applierUin
|
||||
this.groupId = groupCode
|
||||
this.reason = reason
|
||||
this.flag = flag
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
}
|
||||
|
||||
suspend fun transGroupInvite(
|
||||
time: Long,
|
||||
inviterUid: String,
|
||||
inviterUin: Long,
|
||||
groupCode: Long,
|
||||
flag: String
|
||||
): Boolean {
|
||||
pushRequest(RequestEvent.newBuilder().apply {
|
||||
this.type = RequestEvent.RequestType.GROUP_APPLY
|
||||
this.time = time.toInt()
|
||||
this.requestId = flag
|
||||
this.invitedGroup = InvitedJoinGroupRequest.newBuilder().apply {
|
||||
this.inviterUid = inviterUid
|
||||
this.inviterUin = inviterUin
|
||||
this.groupId = groupCode
|
||||
}.build()
|
||||
}.build())
|
||||
return true
|
||||
@ -535,7 +569,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
|
||||
}
|
||||
}
|
||||
|
||||
suspend inline fun onRequestEvent(collector: FlowCollector<RequestsEvent>) {
|
||||
suspend inline fun onRequestEvent(collector: FlowCollector<RequestEvent>) {
|
||||
requestEventFlow.collect {
|
||||
GlobalScope.launch {
|
||||
collector.emit(it)
|
||||
|
@ -5,7 +5,7 @@ import androidx.exifinterface.media.ExifInterface
|
||||
import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.qqnt.aio.adapter.api.IAIOPttApi
|
||||
import com.tencent.qqnt.kernel.nativeinterface.CommonFileInfo
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.FileTransNotifyInfo
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgElement
|
||||
@ -20,9 +20,11 @@ import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import moe.fuqiuluo.shamrock.config.ResourceGroup
|
||||
import moe.fuqiuluo.shamrock.config.ShamrockConfig
|
||||
import moe.fuqiuluo.shamrock.helper.LogCenter
|
||||
import moe.fuqiuluo.shamrock.tools.hex2ByteArray
|
||||
import moe.fuqiuluo.shamrock.tools.ifNullOrEmpty
|
||||
import moe.fuqiuluo.shamrock.tools.slice
|
||||
import moe.fuqiuluo.shamrock.tools.toHexString
|
||||
import moe.fuqiuluo.shamrock.utils.AudioUtils
|
||||
import moe.fuqiuluo.shamrock.utils.FileUtils
|
||||
import moe.fuqiuluo.shamrock.utils.MediaType
|
||||
@ -353,7 +355,7 @@ internal object NtV2RichMediaSvc: QQInterfaces() {
|
||||
if (fromServiceMsg == null || fromServiceMsg.wupBuffer == null) {
|
||||
return Result.failure(Exception("unable to get multimedia pic info: ${fromServiceMsg?.wupBuffer}"))
|
||||
}
|
||||
fromServiceMsg.wupBuffer.slice(4).decodeProtobuf<TrpcOidb>().buffer.decodeProtobuf<NtV2RichMediaRsp>().download?.rkeyParam?.let {
|
||||
fromServiceMsg.wupBuffer.decodeProtobuf<TrpcOidb>().buffer.decodeProtobuf<NtV2RichMediaRsp>().download?.rkeyParam?.let {
|
||||
return Result.success(it)
|
||||
}
|
||||
}.onFailure {
|
||||
@ -446,7 +448,7 @@ internal object NtV2RichMediaSvc: QQInterfaces() {
|
||||
if (fromServiceMsg == null || fromServiceMsg.wupBuffer == null) {
|
||||
return Result.failure(Exception("unable to request upload nt pic"))
|
||||
}
|
||||
val rspBuffer = fromServiceMsg.wupBuffer.slice(4).decodeProtobuf<TrpcOidb>().buffer
|
||||
val rspBuffer = fromServiceMsg.wupBuffer.decodeProtobuf<TrpcOidb>().buffer
|
||||
val rsp = rspBuffer.decodeProtobuf<NtV2RichMediaRsp>()
|
||||
if (rsp.upload == null) {
|
||||
return Result.failure(Exception("unable to request upload nt pic: ${rsp.head}"))
|
||||
|
@ -1,6 +1,6 @@
|
||||
package qq.service.contact
|
||||
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import io.kritor.common.Scene
|
||||
|
||||
|
@ -117,7 +117,7 @@ internal object GroupFileHelper: QQInterfaces() {
|
||||
this.fileSize = fileInfo.uint64_file_size.get()
|
||||
this.busId = fileInfo.uint32_bus_id.get()
|
||||
this.uploadTime = fileInfo.uint32_upload_time.get()
|
||||
this.deadTime = fileInfo.uint32_dead_time.get()
|
||||
this.expireTime = fileInfo.uint32_dead_time.get()
|
||||
this.modifyTime = fileInfo.uint32_modify_time.get()
|
||||
this.downloadTimes = fileInfo.uint32_download_times.get()
|
||||
this.uploader = fileInfo.uint64_uploader_uin.get()
|
||||
|
@ -398,22 +398,46 @@ internal object GroupHelper: QQInterfaces() {
|
||||
sendOidb("OidbSvc.0x89a_0", 2202, 0, reqBody.toByteArray())
|
||||
}
|
||||
|
||||
suspend fun getGroupMemberList(groupId: String, refresh: Boolean): Result<List<TroopMemberInfo>> {
|
||||
val service = app.getRuntimeService(ITroopMemberInfoService::class.java, "all")
|
||||
var memberList = service.getAllTroopMembers(groupId)
|
||||
if (refresh || memberList == null) {
|
||||
memberList = requestTroopMemberInfo(service, groupId).onFailure {
|
||||
return Result.failure(Exception("获取群成员列表失败"))
|
||||
}.getOrThrow()
|
||||
suspend fun getGroupMemberList(groupId: Long, refresh: Boolean): Result<HashMap<String, MemberInfo>> {
|
||||
val kernelService = NTServiceFetcher.kernelService
|
||||
val sessionService = kernelService.wrapperSession
|
||||
val service = sessionService.groupService
|
||||
val uids = suspendCancellableCoroutine { continuation ->
|
||||
service.getAllMemberList(groupId, refresh) { _, _, groupMemberListResult ->
|
||||
continuation.resume(groupMemberListResult?.ids?.map {
|
||||
it.uid
|
||||
})
|
||||
}
|
||||
}
|
||||
val memberMap = suspendCancellableCoroutine { continuation ->
|
||||
service.getMemberInfoForMqq(groupId, ArrayList(uids ?: emptyList()), refresh) { _, _, groupMemberListResult ->
|
||||
continuation.resume(groupMemberListResult.infos)
|
||||
}
|
||||
}
|
||||
// val extInfo = suspendCancellableCoroutine { continuation ->
|
||||
// service.getMemberExtInfo(GroupMemberExtReq().apply {
|
||||
// this.groupCode = groupId
|
||||
// this.beginUin = 0.toString()
|
||||
// this.groupType = ""
|
||||
// this.memberExtFilter = MemberExtInfoFilter().apply {
|
||||
// this.memberLevelInfoName = 1
|
||||
// this.memberLevelInfoUin = 1
|
||||
// this.nickName = 1
|
||||
// this.specialTitle = 1
|
||||
// this.memberLevelInfoActiveDay = 1
|
||||
// }
|
||||
// this.richCardNameVer = "1"
|
||||
// this.sourceType = 1
|
||||
// this.uinList = ArrayList(memberMap.values.toList().map {
|
||||
// it.uin
|
||||
// })
|
||||
// }) { _, _, groupMemberExtListResult ->
|
||||
// continuation.resume(groupMemberExtListResult)
|
||||
// }
|
||||
// }
|
||||
|
||||
getGroupInfo(groupId, true).onSuccess {
|
||||
if(it.wMemberNum > memberList.size) {
|
||||
return getGroupMemberList(groupId, true)
|
||||
}
|
||||
}
|
||||
return Result.success(memberMap)
|
||||
|
||||
return Result.success(memberList)
|
||||
}
|
||||
|
||||
suspend fun getProhibitedMemberList(groupId: Long): Result<List<ProhibitedMemberInfo>> {
|
||||
|
@ -97,7 +97,6 @@ object AioListener : SimpleKernelMsgListener() {
|
||||
}
|
||||
|
||||
private suspend fun onC2CFileMsg(record: MsgRecord) {
|
||||
val userId = record.senderUin
|
||||
val fileMsg = record.elements.firstOrNull {
|
||||
it.elementType == MsgConstant.KELEMTYPEFILE
|
||||
}?.fileElement ?: kotlin.run {
|
||||
@ -113,7 +112,7 @@ object AioListener : SimpleKernelMsgListener() {
|
||||
val url = RichProtoSvc.getC2CFileDownUrl(fileId, fileSubId)
|
||||
|
||||
if (!GlobalEventTransmitter.FileNoticeTransmitter
|
||||
.transPrivateFileEvent(record.msgTime, userId, fileId, fileSubId, fileName, fileSize, expireTime, url)
|
||||
.transPrivateFileEvent(record.msgTime, record.senderUid, record.senderUin, fileId, fileSubId, fileName, fileSize, expireTime, url)
|
||||
) {
|
||||
LogCenter.log("私聊文件消息推送失败 -> FileNoticeTransmitter", Level.WARN)
|
||||
}
|
||||
@ -121,7 +120,6 @@ object AioListener : SimpleKernelMsgListener() {
|
||||
|
||||
private suspend fun onGroupFileMsg(record: MsgRecord) {
|
||||
val groupId = record.peerUin
|
||||
val userId = record.senderUin
|
||||
val fileMsg = record.elements.firstOrNull {
|
||||
it.elementType == MsgConstant.KELEMTYPEFILE
|
||||
}?.fileElement ?: kotlin.run {
|
||||
@ -137,7 +135,7 @@ object AioListener : SimpleKernelMsgListener() {
|
||||
val url = RichProtoSvc.getGroupFileDownUrl(record.peerUin, uuid, bizId)
|
||||
|
||||
if (!GlobalEventTransmitter.FileNoticeTransmitter
|
||||
.transGroupFileEvent(record.msgTime, userId, groupId, uuid, fileName, fileSize, bizId, url)
|
||||
.transGroupFileEvent(record.msgTime, record.senderUid, record.senderUin, groupId, uuid, fileName, fileSize, bizId, url)
|
||||
) {
|
||||
LogCenter.log("群聊文件消息推送失败 -> FileNoticeTransmitter", Level.WARN)
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ internal object PrimitiveListener {
|
||||
LogCenter.log("私聊戳一戳: $operation $action $target $suffix")
|
||||
|
||||
if (!GlobalEventTransmitter.PrivateNoticeTransmitter
|
||||
.transPrivatePoke(msgTime, operation.toLong(), target.toLong(), action, suffix, actionImg)
|
||||
.transPrivatePoke(msgTime, operation.toLong(), action, suffix, actionImg)
|
||||
) {
|
||||
LogCenter.log("私聊戳一戳推送失败!", Level.WARN)
|
||||
}
|
||||
@ -161,7 +161,7 @@ internal object PrimitiveListener {
|
||||
}
|
||||
LogCenter.log("来自$applier 的好友申请:$msg ($source)")
|
||||
if (!GlobalEventTransmitter.RequestTransmitter
|
||||
.transFriendApp(msgTime, applier, msg, flag)
|
||||
.transFriendApp(msgTime, applierUid, applier, msg, flag)
|
||||
) {
|
||||
LogCenter.log("好友申请推送失败!", Level.WARN)
|
||||
}
|
||||
@ -218,6 +218,8 @@ internal object PrimitiveListener {
|
||||
val groupId = event.groupCode.toLong()
|
||||
val detail = event.uniqueTitleChangeDetail!!.first()
|
||||
|
||||
// todo 贴表情也走的 732 16 这里
|
||||
|
||||
//detail = if (detail[5] is ProtoList) {
|
||||
// (detail[5] as ProtoList).value[0]
|
||||
//} else {
|
||||
@ -320,8 +322,8 @@ internal object PrimitiveListener {
|
||||
it.key to it.value
|
||||
}
|
||||
|
||||
val target = params["uin_str2"] ?: params["mqq_uin"] ?: return
|
||||
val operation = params["uin_str1"] ?: return
|
||||
val target = params["uin_str2"] ?: params["mqq_uin"] ?: ""
|
||||
val operator = params["uin_str1"] ?: ""
|
||||
val suffix = params["suffix_str"] ?: ""
|
||||
val actionImg = params["action_img_url"] ?: ""
|
||||
val action = params["alt_str1"]
|
||||
@ -332,9 +334,9 @@ internal object PrimitiveListener {
|
||||
|
||||
when (detail.type) {
|
||||
1061u -> {
|
||||
LogCenter.log("群戳一戳($groupId): $operation $action $target $suffix")
|
||||
LogCenter.log("群戳一戳($groupId): $operator $action $target $suffix")
|
||||
if (!GlobalEventTransmitter.GroupNoticeTransmitter
|
||||
.transGroupPoke(time, operation.toLong(), target.toLong(), action, suffix, actionImg, groupId)
|
||||
.transGroupPoke(time, operator.toLong(), target.toLong(), action, suffix, actionImg, groupId)
|
||||
) {
|
||||
LogCenter.log("群戳一戳推送失败!", Level.WARN)
|
||||
}
|
||||
@ -396,7 +398,7 @@ internal object PrimitiveListener {
|
||||
val targetUid = event.memberUid
|
||||
val type = event.type
|
||||
|
||||
GroupHelper.getGroupMemberList(groupCode.toString(), true).onFailure {
|
||||
GroupHelper.getGroupMemberList(groupCode, true).onFailure {
|
||||
LogCenter.log("新成员加入刷新群成员列表失败: $groupCode", Level.WARN)
|
||||
}.onSuccess {
|
||||
LogCenter.log("新成员加入刷新群成员列表成功,群成员数量: ${it.size}", Level.INFO)
|
||||
@ -433,7 +435,7 @@ internal object PrimitiveListener {
|
||||
val type = event.type
|
||||
val operatorUid = event.operatorUid
|
||||
|
||||
GroupHelper.getGroupMemberList(groupCode.toString(), true).onFailure {
|
||||
GroupHelper.getGroupMemberList(groupCode, true).onFailure {
|
||||
LogCenter.log("新成员加入刷新群成员列表失败: $groupCode", Level.WARN)
|
||||
}.onSuccess {
|
||||
LogCenter.log("新成员加入刷新群成员列表成功,群成员数量: ${it.size}", Level.INFO)
|
||||
@ -506,7 +508,7 @@ internal object PrimitiveListener {
|
||||
if (wholeBan) {
|
||||
LogCenter.log("群全员禁言($groupCode): $operator -> ${if (rawDuration != 0) "开启" else "关闭"}")
|
||||
if (!GlobalEventTransmitter.GroupNoticeTransmitter
|
||||
.transGroupWholeBan(msgTime, groupCode, operator, rawDuration != 0)
|
||||
.transGroupWholeBan(msgTime, groupCode, operatorUid, operator, rawDuration != 0)
|
||||
) {
|
||||
LogCenter.log("群禁言推送失败!", Level.WARN)
|
||||
}
|
||||
@ -657,7 +659,7 @@ internal object PrimitiveListener {
|
||||
"$time;$groupCode;$uin"
|
||||
}
|
||||
if (!GlobalEventTransmitter.RequestTransmitter
|
||||
.transGroupApply(time, invitor, invitorUid, "", groupCode, flag)
|
||||
.transGroupInvite(time, invitorUid, invitor, groupCode, flag)
|
||||
) {
|
||||
LogCenter.log("邀请入群推送失败!", Level.WARN)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package qq.service.kernel
|
||||
|
||||
import com.tencent.qqnt.kernel.nativeinterface.BroadcastHelperTransNotifyInfo
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.ContactMsgBoxInfo
|
||||
import com.tencent.qqnt.kernel.nativeinterface.CustomWithdrawConfig
|
||||
import com.tencent.qqnt.kernel.nativeinterface.DevInfo
|
||||
@ -278,7 +278,13 @@ abstract class SimpleKernelMsgListener: IKernelMsgListener {
|
||||
|
||||
}
|
||||
|
||||
override fun onSysMsgNotification(i2: Int, j2: Long, j3: Long, arrayList: ArrayList<Byte>?) {
|
||||
override fun onSysMsgNotification(
|
||||
i2: Int,
|
||||
j2: Long,
|
||||
j3: Long,
|
||||
z: Boolean,
|
||||
arrayList: ArrayList<Byte>?
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package qq.service.lightapp
|
||||
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import qq.service.QQInterfaces
|
||||
import qq.service.contact.longPeer
|
||||
|
@ -2,7 +2,7 @@ package qq.service.lightapp
|
||||
|
||||
import com.tencent.biz.map.trpcprotocol.LbsSendInfo
|
||||
import com.tencent.proto.lbsshare.LBSShare
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import moe.fuqiuluo.shamrock.helper.IllegalParamsException
|
||||
import moe.fuqiuluo.shamrock.tools.slice
|
||||
|
@ -1,6 +1,6 @@
|
||||
package qq.service.lightapp
|
||||
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import io.ktor.client.request.get
|
||||
import io.ktor.client.statement.bodyAsText
|
||||
import kotlinx.serialization.json.Json
|
||||
|
@ -1,15 +1,12 @@
|
||||
package qq.service.msg
|
||||
|
||||
import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
|
||||
import com.tencent.qqnt.msg.api.IMsgService
|
||||
import io.grpc.Status
|
||||
import io.grpc.StatusRuntimeException
|
||||
import io.kritor.common.ForwardElement
|
||||
import io.kritor.common.ForwardMessageBody
|
||||
import io.kritor.common.Scene
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import moe.fuqiuluo.shamrock.helper.Level
|
||||
@ -21,7 +18,6 @@ import protobuf.auto.toByteArray
|
||||
import protobuf.message.*
|
||||
import protobuf.message.longmsg.*
|
||||
import qq.service.QQInterfaces
|
||||
import qq.service.contact.ContactHelper
|
||||
import qq.service.msg.MessageHelper.getMultiMsg
|
||||
import qq.service.ticket.TicketHelper
|
||||
import java.util.*
|
||||
|
@ -3,7 +3,7 @@ package qq.service.msg
|
||||
import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.mobileqq.troop.api.ITroopMemberNameService
|
||||
import com.tencent.qqnt.kernel.api.IKernelService
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgElement
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
|
||||
|
@ -401,10 +401,10 @@ private object MsgConvertor {
|
||||
suspend fun convertInlineKeyboard(record: MsgRecord, element: MsgElement): Result<Element> {
|
||||
val inlineKeyboard = element.inlineKeyboardElement
|
||||
val elem = Element.newBuilder()
|
||||
elem.type = ElementType.BUTTON
|
||||
elem.setButton(ButtonElement.newBuilder().apply {
|
||||
elem.type = ElementType.KEYBOARD
|
||||
elem.setKeyboard(KeyboardElement.newBuilder().apply {
|
||||
inlineKeyboard.rows.forEach { row ->
|
||||
this.addRows(ButtonRow.newBuilder().apply {
|
||||
this.addRows(KeyboardRow.newBuilder().apply {
|
||||
row.buttons.forEach buttonsLoop@{ button ->
|
||||
if (button == null) return@buttonsLoop
|
||||
this.addButtons(Button.newBuilder().apply {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package qq.service.msg
|
||||
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import io.kritor.common.*
|
||||
import io.kritor.common.Element.ElementType
|
||||
@ -227,9 +227,9 @@ suspend fun List<Elem>.toKritorResponseMessages(contact: Contact): ArrayList<Ele
|
||||
46 -> {
|
||||
val buttonExtra = commonElem.elem!!.decodeProtobuf<ButtonExtra>()
|
||||
kritorMessages.add(
|
||||
Element.newBuilder().setButton(ButtonElement.newBuilder().apply {
|
||||
Element.newBuilder().setKeyboard(KeyboardElement.newBuilder().apply {
|
||||
this.addAllRows(buttonExtra.field1!!.rows!!.map { row ->
|
||||
ButtonRow.newBuilder().apply {
|
||||
KeyboardRow.newBuilder().apply {
|
||||
this.addAllButtons(row.buttons!!.map { button ->
|
||||
Button.newBuilder().apply {
|
||||
this.id = button.id
|
||||
|
@ -8,7 +8,7 @@ import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.qphone.base.remote.ToServiceMsg
|
||||
import com.tencent.qqnt.aio.adapter.api.IAIOPttApi
|
||||
import com.tencent.qqnt.kernel.nativeinterface.*
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.FaceElement
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MarkdownElement
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MarketFaceElement
|
||||
@ -97,7 +97,7 @@ object NtMsgConvertor {
|
||||
ElementType.JSON to ::jsonConvertor,
|
||||
ElementType.FORWARD to ::forwardConvertor,
|
||||
ElementType.MARKDOWN to ::markdownConvertor,
|
||||
ElementType.BUTTON to ::buttonConvertor,
|
||||
ElementType.KEYBOARD to ::buttonConvertor,
|
||||
)
|
||||
|
||||
suspend fun convertToNtMsgs(contact: Contact, msgId: Long, msgs: Messages): ArrayList<MsgElement> {
|
||||
@ -663,14 +663,14 @@ object NtMsgConvertor {
|
||||
}
|
||||
}
|
||||
|
||||
MusicPlatform.NetEase -> {
|
||||
MusicPlatform.NETEASE -> {
|
||||
val id = sourceMusic.music.id
|
||||
if (!MusicHelper.tryShare163MusicById(contact, msgId, id)) {
|
||||
LogCenter.log("无法发送网易云音乐分享", Level.ERROR)
|
||||
}
|
||||
}
|
||||
|
||||
MusicPlatform.Custom -> {
|
||||
MusicPlatform.CUSTOM -> {
|
||||
val data = sourceMusic.music.custom
|
||||
ArkMsgHelper.tryShareMusic(
|
||||
contact,
|
||||
@ -848,7 +848,7 @@ object NtMsgConvertor {
|
||||
elem.elementType = MsgConstant.KELEMTYPEINLINEKEYBOARD
|
||||
val rows = arrayListOf<InlineKeyboardRow>()
|
||||
|
||||
val keyboard = sourceButton.button
|
||||
val keyboard = sourceButton.keyboard
|
||||
keyboard.rowsList.forEach { row ->
|
||||
val buttons = arrayListOf<InlineKeyboardButton>()
|
||||
row.buttonsList.forEach { button ->
|
||||
|
@ -1,7 +1,7 @@
|
||||
package qq.service.msg
|
||||
|
||||
import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgElement
|
||||
import com.tencent.qqnt.msg.api.IMsgService
|
||||
@ -366,9 +366,9 @@ private object ReqMsgConvertor {
|
||||
suspend fun convertInlineKeyboard(contact: Contact, element: MsgElement): Result<Element> {
|
||||
val inlineKeyboard = element.inlineKeyboardElement
|
||||
val elem = Element.newBuilder()
|
||||
elem.setButton(ButtonElement.newBuilder().apply {
|
||||
elem.setKeyboard(KeyboardElement.newBuilder().apply {
|
||||
this.addAllRows(inlineKeyboard.rows.map { row ->
|
||||
ButtonRow.newBuilder().apply {
|
||||
KeyboardRow.newBuilder().apply {
|
||||
this.addAllButtons(row.buttons.map { button ->
|
||||
Button.newBuilder().apply {
|
||||
this.id = button.id
|
||||
|
@ -1,10 +1,9 @@
|
||||
package qq.service.msg
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.util.Base64
|
||||
import androidx.exifinterface.media.ExifInterface
|
||||
import com.tencent.mobileqq.qroute.QRoute
|
||||
import com.tencent.qqnt.kernel.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
|
||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import com.tencent.qqnt.msg.api.IMsgService
|
||||
import io.kritor.common.Element
|
||||
@ -511,13 +510,13 @@ suspend fun List<Element>.toRichText(contact: Contact): Result<Pair<String, Rich
|
||||
elems.add(elem)
|
||||
summary.append("[Markdown消息]")
|
||||
}
|
||||
Element.ElementType.BUTTON -> {
|
||||
Element.ElementType.KEYBOARD -> {
|
||||
val elem = Elem(
|
||||
commonElem = CommonElem(
|
||||
serviceType = 46,
|
||||
elem = ButtonExtra(
|
||||
field1 = Object1(
|
||||
rows = it.button.rowsList.map { row ->
|
||||
rows = it.keyboard.rowsList.map { row ->
|
||||
Row(buttons = row.buttonsList.map { button ->
|
||||
val renderData = button.renderData
|
||||
val action = button.action
|
||||
@ -544,7 +543,7 @@ suspend fun List<Element>.toRichText(contact: Contact): Result<Pair<String, Rich
|
||||
)
|
||||
})
|
||||
},
|
||||
appid = it.button.botAppid.toULong()
|
||||
appid = it.keyboard.botAppid.toULong()
|
||||
)
|
||||
).toByteArray(),
|
||||
businessType = 1
|
||||
|
Reference in New Issue
Block a user