19 Commits

Author SHA1 Message Date
976526ab79 fix: #350 2024-08-04 13:37:11 +08:00
cdc9ca1a72 fix: #351 2024-08-04 13:25:27 +08:00
609e87d0ec fix: move gpro api #346 2024-07-25 01:11:13 +08:00
cf01a25ea6 fix: #346 2024-07-25 00:35:56 +08:00
f090ef1937 fix rkey type 2024-07-22 07:54:29 +08:00
1cc033498c Version Restriction Notice 2024-07-19 03:35:21 +08:00
7eaa470dd2 fix #334 2024-07-17 17:27:16 +08:00
c49861d982 fix #340 2024-07-17 17:25:16 +08:00
36ed55d220 fix #337 2024-07-16 21:05:39 +08:00
e2f27cb36a fix #339 2024-07-16 20:56:09 +08:00
65ddca2ea4 fix: optimize import 2024-07-07 18:03:19 +08:00
a6f570e4f0 fix: remove debug 2024-07-07 18:02:41 +08:00
29dfc1590b feat: ocr 2024-07-07 17:51:51 +08:00
ffeda0a472 fix: msf core 2024-07-06 22:36:45 +08:00
0e5add2146 fix: some compatibility issues on 9.0.70+
It is not recommended to use this build for lower versions
2024-07-06 22:29:10 +08:00
be9ff46134 Merge pull request #325 from StarryKira/v1.0.9
fix get_image
2024-06-06 12:44:10 +08:00
1d6ac3e022 fix get_image 2024-06-06 12:32:59 +08:00
2db187e3d5 (#319) 2024-04-11 12:41:23 +08:00
18ec586b12 试着修复group_increase事件在大群中依然可能出现target_id=0的故障 (#318) 2024-04-11 01:04:52 +08:00
160 changed files with 3622 additions and 1834 deletions

View File

@ -3,7 +3,7 @@ name: Build Shamrock APK
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: [ master ] branches: [ v1.0.9 ]
paths-ignore: paths-ignore:
- '**.md' - '**.md'
- '**.txt' - '**.txt'
@ -97,4 +97,4 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "${{ env.SHAMROCK_VERSION_x86_64 }}" name: "${{ env.SHAMROCK_VERSION_x86_64 }}"
path: "${{ env.APK_FILE_X86_64 }}" path: "${{ env.APK_FILE_X86_64 }}"

View File

@ -16,7 +16,7 @@
## 简介 ## 简介
☘ 基于 Lsposed(**Non**-Riru) 实现 OneBot 标准的 QQ 机器人框架,原作者[**fuqiuluo**](https://github.com/fuqiuluo)已脱离开发接下来由白池接手哦本项目为OpenShamrock不会有任何收费行为欢迎大家的加入 ☘ 基于 Lsposed(**Non**-Riru) 实现 OneBot 标准的 QQ 机器人框架!
> 本项目仅提供学习与交流用途请在24小时内删除。 > 本项目仅提供学习与交流用途请在24小时内删除。
> 本项目目的是研究 Xposed 和 LSPosed 框架的使用。 Epic 框架开发相关知识。 > 本项目目的是研究 Xposed 和 LSPosed 框架的使用。 Epic 框架开发相关知识。
@ -27,6 +27,8 @@
## 兼容|迁移|替代 说明 ## 兼容|迁移|替代 说明
仅支持QQ9.0.70以上的版本,低版本问题将不再修复与处理。
- 一键移植:本项目基于 go-cqhttp 的文档进行开发实现。 - 一键移植:本项目基于 go-cqhttp 的文档进行开发实现。
- 平行部署:可多平台部署,未来将会支持 Docker 部署的教程。 - 平行部署:可多平台部署,未来将会支持 Docker 部署的教程。

View File

@ -17,7 +17,7 @@ android {
minSdk = 27 minSdk = 27
targetSdk = 34 targetSdk = 34
versionCode = getVersionCode() versionCode = getVersionCode()
versionName = "1.0.9" + ".r${getGitCommitCount()}." + getVersionName() versionName = "1.1.1.onebot" + ".r${getGitCommitCount()}." + getVersionName()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {

View File

@ -12,7 +12,8 @@
extern "C" extern "C"
JNIEXPORT jstring JNICALL JNIEXPORT jstring JNICALL
Java_moe_fuqiuluo_shamrock_xposed_hooks_PullConfig_testNativeLibrary(JNIEnv *env, jobject thiz) { Java_moe_fuqiuluo_shamrock_xposed_hooks_PullConfig_00024Companion_testNativeLibrary(JNIEnv *env,
jobject thiz) {
return env->NewStringUTF("加载Shamrock库成功~"); return env->NewStringUTF("加载Shamrock库成功~");
} }

View File

@ -52,7 +52,6 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
@ -64,6 +63,7 @@ import androidx.compose.ui.unit.sp
import androidx.core.view.WindowCompat import androidx.core.view.WindowCompat
import com.google.accompanist.systemuicontroller.rememberSystemUiController import com.google.accompanist.systemuicontroller.rememberSystemUiController
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import moe.fuqiuluo.shamrock.ui.app.AppRuntime import moe.fuqiuluo.shamrock.ui.app.AppRuntime
import moe.fuqiuluo.shamrock.ui.app.Logger import moe.fuqiuluo.shamrock.ui.app.Logger
@ -79,7 +79,7 @@ import moe.fuqiuluo.shamrock.ui.theme.RANDOM_SUB_TITLE
import moe.fuqiuluo.shamrock.ui.theme.RANDOM_TITLE import moe.fuqiuluo.shamrock.ui.theme.RANDOM_TITLE
import moe.fuqiuluo.shamrock.ui.theme.ShamrockTheme import moe.fuqiuluo.shamrock.ui.theme.ShamrockTheme
import moe.fuqiuluo.shamrock.ui.tools.NoIndication import moe.fuqiuluo.shamrock.ui.tools.NoIndication
import moe.fuqiuluo.shamrock.ui.tools.ShamrockTab import moe.fuqiuluo.shamrock.ui.tools.ShamrockTabV2
import moe.fuqiuluo.shamrock.ui.tools.getShamrockVersion import moe.fuqiuluo.shamrock.ui.tools.getShamrockVersion
class MainActivity : ComponentActivity() { class MainActivity : ComponentActivity() {
@ -87,6 +87,15 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContent { setContent {
LaunchedEffect(Unit) {
while (true) {
delay(5_000) // Delay in milliseconds
broadcastToModule {
putExtra("__cmd", "switch_status")
}
}
}
CompositionLocalProvider( CompositionLocalProvider(
LocalIndication provides NoIndication LocalIndication provides NoIndication
) { ) {
@ -336,7 +345,7 @@ private fun AnimatedTab(
} }
} }
ShamrockTab( ShamrockTabV2(
selected = curSelected, selected = curSelected,
onClick = { onClick = {
scope.launch { scope.launch {

View File

@ -30,6 +30,7 @@ abstract class ModuleHandler {
} }
} }
putExtra("__hash", callbackId) putExtra("__hash", callbackId)
putExtra("__cmd", cmd)
} }
} }
} }

View File

@ -58,7 +58,7 @@ class MultifunctionalProvider: ContentProvider() {
inline fun Context.broadcastToModule(intentBuilder: Intent.() -> Unit) { inline fun Context.broadcastToModule(intentBuilder: Intent.() -> Unit) {
val intent = Intent() val intent = Intent()
intent.action = "moe.fuqiuluo.xqbot.dynamic" intent.action = "moe.fuqiuluo.onebot.dynamic"
intent.intentBuilder() intent.intentBuilder()
sendBroadcast(intent) sendBroadcast(intent)
} }

View File

@ -242,13 +242,13 @@ private fun Placeable.PlacementScope.placeTextAndIcon(
} }
@Composable @Composable
fun ShamrockTab( fun ShamrockTabV2(
selected: Boolean, selected: Boolean,
onClick: () -> Unit, onClick: () -> Unit,
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
enabled: Boolean = true, enabled: Boolean = true,
text: @Composable (() -> Unit)? = null, text: (@Composable (() -> Unit))? = null,
icon: @Composable (() -> Unit)? = null, icon: (@Composable (() -> Unit))? = null,
selectedContentColor: Color = GlobalColor.TabSelected, selectedContentColor: Color = GlobalColor.TabSelected,
unselectedContentColor: Color = selectedContentColor, unselectedContentColor: Color = selectedContentColor,
indication: Indication? = rememberRipple(bounded = true, color = selectedContentColor), indication: Indication? = rememberRipple(bounded = true, color = selectedContentColor),
@ -262,7 +262,7 @@ fun ShamrockTab(
ProvideTextStyle(style, content = text) ProvideTextStyle(style, content = text)
} }
} }
ShamrockTab( ShamrockTabV2(
selected, selected,
onClick, onClick,
modifier, modifier,
@ -277,7 +277,7 @@ fun ShamrockTab(
} }
@Composable @Composable
fun ShamrockTab( fun ShamrockTabV2(
selected: Boolean, selected: Boolean,
onClick: () -> Unit, onClick: () -> Unit,
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -94,7 +94,8 @@ data class DeleteReq(
@Serializable @Serializable
data class DownloadRkeyReq( data class DownloadRkeyReq(
@ProtoNumber(1) val types: List<Int> @ProtoNumber(1) val types: List<Int>,
@ProtoNumber(2) val downloadType: Int
) )
@Serializable @Serializable

View File

@ -52,11 +52,11 @@ data class DownloadRkeyRsp(
@Serializable @Serializable
data class RKeyInfo( data class RKeyInfo(
@ProtoNumber(1) val rkey: String?, @ProtoNumber(1) val rkey: String,
@ProtoNumber(2) val rkeyTtlSec: ULong?, @ProtoNumber(2) val rkeyTtlSec: ULong?,
@ProtoNumber(3) val storeId: UInt = 0u, @ProtoNumber(3) val storeId: UInt = 0u,
@ProtoNumber(4) val rkeyCreateTime: UInt?, @ProtoNumber(4) val rkeyCreateTime: UInt?,
@ProtoNumber(4) val type: UInt?, @ProtoNumber(5) val type: UInt,
) )
@Serializable @Serializable

View File

@ -146,6 +146,7 @@ public class TroopInfo {
public byte[] troopInfoExtByte; public byte[] troopInfoExtByte;
public String troopLevelMap; public String troopLevelMap;
public String troopRemark; public String troopRemark;
@Deprecated
public String troopcode; public String troopcode;
public short troopface; public short troopface;
public String troopmemo; public String troopmemo;
@ -154,6 +155,7 @@ public class TroopInfo {
public int trooptype; public int trooptype;
public String troopuin; public String troopuin;
public long udwCmdUinRingtoneID; public long udwCmdUinRingtoneID;
@Deprecated
public String uin; public String uin;
public int wClickBAFTipCount; public int wClickBAFTipCount;
public int wInsertBAFTipCount; public int wInsertBAFTipCount;

View File

@ -1,63 +1,92 @@
package com.tencent.mobileqq.data.troop; package com.tencent.mobileqq.data.troop;
import org.jetbrains.annotations.Nullable;
import com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole;
public class TroopMemberInfo { public class TroopMemberInfo {
public long active_point; public static final long VALUE_DISTANCE_TO_SELF_UNKOWN = -100;
protected static final int VALUE_INVALID = -100;
public static final long VALUE_MEMBER_CLOSE_SHARE_LBS = -1001;
public int addState; public int addState;
public byte age;
public String alias; @Deprecated(since = "推荐使用TroopMemberNickInfo")
public String autoremark; public String autoremark;
public long cmduinFlagEx3Grocery;
public long credit_level; public long credit_level;
public long datetime;
public String displayedNamePinyinFirst; public String displayedNamePinyinFirst;
public short faceid;
@Nullable
public TroopMemberInfoExt extInfo;
@Deprecated(since = "推荐使用TroopMemberNickInfo")
public String friendnick; public String friendnick;
public long gagTimeStamp; public long gagTimeStamp;
public String honorList; public String honorList;
public boolean isTroopFollowed;
public long join_time;
public long last_active_time;
public int level;
public int mBigClubVipType;
public byte mHonorRichFlag;
public boolean mIsShielded;
public int mVipType;
public String memberUid;
public String memberuin;
public int newRealLevel;
public TroopMemberNickInfo nickInfo;
public int realLevel;
public MemberRole role;
@Nullable
public TroopMemberSpecialTitleInfo specialTitleInfo;
@Deprecated(since = "推荐使用TroopMemberNickInfo")
public String troopColorNick;
@Deprecated(since = "推荐使用TroopMemberNickInfo")
public int troopColorNickId;
@Deprecated(since = "推荐使用TroopMemberNickInfo")
public String troopnick;
public String troopuin;
public int globalTroopLevel = VALUE_INVALID;
public int flagEx = 0;
// QQ OLD API DATA
public long active_point;
public byte age;
public String alias;
public long cmduinFlagEx3Grocery;
public long datetime;
public short faceid;
public String hwCourse; public String hwCourse;
public int hwIdentity; public int hwIdentity;
public String hwName; public String hwName;
public int isShowQZone; public int isShowQZone;
public boolean isTroopFollowed;
public long join_time;
public long lastMsgUpdateHonorRichTime; public long lastMsgUpdateHonorRichTime;
public long last_active_time;
public int level;
public int mBigClubTemplateId; public int mBigClubTemplateId;
public int mBigClubVipLevel; public int mBigClubVipLevel;
public int mBigClubVipType;
public int mGlamourLevel; public int mGlamourLevel;
public byte mHonorRichFlag;
public int mIsHideBigClub; public int mIsHideBigClub;
public boolean mIsShielded;
public String mUniqueTitle; public String mUniqueTitle;
public int mVipLevel; public int mVipLevel;
public int mVipTemplateId; public int mVipTemplateId;
public int mVipType;
public String memberuin;
public int newRealLevel;
public String pyAll_autoremark; public String pyAll_autoremark;
public String pyAll_friendnick; public String pyAll_friendnick;
public String pyAll_troopnick; public String pyAll_troopnick;
public String pyFirst_autoremark; public String pyFirst_autoremark;
public String pyFirst_friendnick; public String pyFirst_friendnick;
public String pyFirst_troopnick; public String pyFirst_troopnick;
public int realLevel;
public String recommendRemark; public String recommendRemark;
public byte sex; public byte sex;
public byte status; public byte status;
public int tribeLevel; public int tribeLevel;
public int tribePoint; public int tribePoint;
public String troopColorNick;
public int troopColorNickId;
public String troopnick;
public String troopremark; public String troopremark;
public String troopuin;
public int qqVipInfo = 0; public int qqVipInfo = 0;
public int superQqInfo = 0; public int superQqInfo = 0;
public int superVipInfo = 0; public int superVipInfo = 0;
public int hotChatGlamourLevel = -100; public int hotChatGlamourLevel = -100;
public int globalTroopLevel = -100;
public int distance = 0; public int distance = 0;
public long msgseq = -100; public long msgseq = -100;
public double distanceToSelf = -100.0d; public double distanceToSelf = -100.0d;

View File

@ -0,0 +1,48 @@
package com.tencent.mobileqq.data.troop;
import org.jetbrains.annotations.Nullable;
import kotlin.jvm.JvmField;
public class TroopMemberInfoExt {
@JvmField
public int commonFrdCnt;
@JvmField
public long flagEx3;
@JvmField
public int hwIdentity;
@JvmField
public long lastMsgUpdateHonorRichTime;
@JvmField
@Nullable
public String memberUin;
@JvmField
@Nullable
public byte[] nickIconRepeatMsgBuffer;
@JvmField
@Nullable
public String recommendRemark;
@JvmField
@Nullable
public String showNameForPinyin;
@JvmField
@Nullable
public String showNamePinyinAll;
@JvmField
@Nullable
public String showNamePinyinFirst;
@JvmField
@Nullable
public String troopUin;
}

View File

@ -0,0 +1,54 @@
package com.tencent.mobileqq.data.troop;
import org.jetbrains.annotations.NotNull;
public class TroopMemberNickInfo {
@NotNull
public final String getAutoRemark() {
return null;
}
@NotNull
public final String getColorNick() {
return null;
}
public final int getColorNickId() {
return 0;
}
@NotNull
public final String getFriendNick() {
return null;
}
@NotNull
public final String getHBShowName() {
return null;
}
@NotNull
public final String getRemarkFromFriend() {
return null;
}
@NotNull
public final String getRemarkFromFriendV2() {
return null;
}
@NotNull
public final String getShowName() {
return null;
}
@NotNull
public final String getTroopNick() {
return null;
}
@NotNull
public final String getTroopUin() {
return null;
}
}

View File

@ -0,0 +1,29 @@
package com.tencent.mobileqq.data.troop;
import org.jetbrains.annotations.NotNull;
public class TroopMemberSpecialTitleInfo {
public final int getExpireTimeSec() {
return 0;
}
@NotNull
public final String getFriendNick() {
return null;
}
@NotNull
public final String getSpecialTitle() {
return null;
}
@NotNull
public final String getTroopUin() {
return null;
}
@NotNull
public final String getUin() {
return null;
}
}

View File

@ -0,0 +1,15 @@
package com.tencent.mobileqq.l0.b;
public class a {
public void b () {
}
public void c (c cVar) {
}
public void onUpdate(int progress, boolean z, Object obj) {
}
}

View File

@ -0,0 +1,23 @@
package com.tencent.mobileqq.l0.b;
import android.graphics.Point;
import java.util.ArrayList;
public class b {
// text
public String a;
// confidence
public int b;
// coordinates
public ArrayList<Point> c;
/* renamed from: d */
public int d;
/* renamed from: e */
public boolean e;
}

View File

@ -0,0 +1,39 @@
package com.tencent.mobileqq.l0.b;
import java.util.ArrayList;
import java.util.HashMap;
public class c {
// image
public String a;
// width
public int b;
// height
public int c;
// lang
public String d;
// url
public String e;
// results
public ArrayList<b> f;
public ArrayList<String> g;
public HashMap<String, String> h;
public int i;
public int j;
public int k;
public String l;
public int m;
}

View File

@ -1,7 +1,7 @@
package com.tencent.mobileqq.msf.core; package com.tencent.mobileqq.msf.core;
public class MsfCore { public class MsfCore {
public static synchronized int getNextSeq() { public synchronized int getNextSeq() {
return 0; return 0;
} }
} }

View File

@ -0,0 +1,18 @@
package com.tencent.mobileqq.msf.sdk;
import com.tencent.qphone.base.remote.FromServiceMsg;
import com.tencent.qphone.base.remote.ToServiceMsg;
public class MsfMessagePair {
public FromServiceMsg fromServiceMsg;
public String sendProcess;
public ToServiceMsg toServiceMsg;
public MsfMessagePair(String str, ToServiceMsg toServiceMsg, FromServiceMsg fromServiceMsg) {
}
public MsfMessagePair(ToServiceMsg toServiceMsg, FromServiceMsg fromServiceMsg) {
}
}

View File

@ -0,0 +1,22 @@
package com.tencent.mobileqq.msf.service;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import androidx.annotation.Nullable;
import com.tencent.mobileqq.msf.core.MsfCore;
public class MsfService extends Service {
@Nullable
@Override
public IBinder onBind(Intent intent) {
return null;
}
public static MsfCore getCore() {
return null;
}
}

View File

@ -0,0 +1,38 @@
package com.tencent.mobileqq.ocr.a;
public class a {
public String a;
// 1
public int b;
// file location
public String c;
// null
public String d;
// 0
public long e;
// md5
public String f;
// null
public String g;
// false
public boolean h;
// 0
public int i;
// 0
public int j;
// 0
public long k;
// null
public String l;
}

View File

@ -0,0 +1,10 @@
package com.tencent.mobileqq.ocr.api;
import mqq.app.api.IRuntimeService;
public interface IPicOcrService extends IRuntimeService {
void putOcrResult(String str, com.tencent.mobileqq.l0.b.c cVar);
void requestOcr(com.tencent.mobileqq.ocr.a.a aVar, com.tencent.mobileqq.l0.b.a callback);
}

View File

@ -0,0 +1,4 @@
package com.tencent.mobileqq.ocr.api.impl;
public class OcrServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.tencent.mobileqq.ocr.api.impl;
public class PicOcrServiceImpl {
}

View File

@ -0,0 +1,11 @@
package com.tencent.mobileqq.qqguildsdk.api.impl;
import com.tencent.qqnt.kernelgpro.nativeinterface.IKernelGuildService;
public class GProSessionImpl {
public IKernelGuildService getGuildService() {
return null;
}
}

View File

@ -1,20 +1,12 @@
package com.tencent.mobileqq.qqguildsdk.data; package com.tencent.mobileqq.qqguildsdk.data;
import android.text.TextUtils;
import com.tencent.mobileqq.qqguildsdk.data.genc.GGProMedalInfo;
import com.tencent.mobileqq.qqguildsdk.data.genc.GGProNavigationInfo;
import com.tencent.mobileqq.qqguildsdk.data.genc.IGProMedalInfo; import com.tencent.mobileqq.qqguildsdk.data.genc.IGProMedalInfo;
import com.tencent.mobileqq.qqguildsdk.data.genc.IGProNavigationInfo; import com.tencent.mobileqq.qqguildsdk.data.genc.IGProNavigationInfo;
import com.tencent.qqnt.kernel.nativeinterface.GProGuild; import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
import com.tencent.qqnt.kernel.nativeinterface.GProGuildSpeakableThreshold;
import com.tencent.qqnt.kernel.nativeinterface.GProMedalInfo;
import com.tencent.qqnt.kernel.nativeinterface.GProNavigationInfo;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
public class GProGuildInfo implements IGProGuildInfo { public class GProGuildInfo implements IGProGuildInfo {

View File

@ -2,7 +2,7 @@ package com.tencent.mobileqq.qqguildsdk.data;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.tencent.qqnt.kernel.nativeinterface.GProGuildRole; import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,6 +1,6 @@
package com.tencent.mobileqq.qqguildsdk.data; package com.tencent.mobileqq.qqguildsdk.data;
import com.tencent.qqnt.kernel.nativeinterface.GProGuildRole; import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import com.tencent.qqnt.kernel.nativeinterface.GProUser; import com.tencent.qqnt.kernel.nativeinterface.GProUser;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,14 +1,9 @@
package com.tencent.mobileqq.qqguildsdk.data.genc; package com.tencent.mobileqq.qqguildsdk.data.genc;
import com.tencent.mobileqq.qqguildsdk.data.GProGuildRoleInfo;
import com.tencent.mobileqq.qqguildsdk.data.GProUserInfo;
import com.tencent.mobileqq.qqguildsdk.data.IGProGuildRoleInfo; import com.tencent.mobileqq.qqguildsdk.data.IGProGuildRoleInfo;
import com.tencent.mobileqq.qqguildsdk.data.IGProUserInfo; import com.tencent.mobileqq.qqguildsdk.data.IGProUserInfo;
import com.tencent.qqnt.kernel.nativeinterface.GProGuildRole;
import com.tencent.qqnt.kernel.nativeinterface.GProUser;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
public class GGProGuildMemberSearchResult implements IGProGuildMemberSearchResult { public class GGProGuildMemberSearchResult implements IGProGuildMemberSearchResult {

View File

@ -1,7 +1,9 @@
package com.tencent.qphone.base.util; package com.tencent.qphone.base.util;
public abstract class CodecWarpper { 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); public abstract void onResponse(int i2, Object obj, int i3, byte[] bArr);

View File

@ -1,8 +1,8 @@
package com.tencent.qqnt.aio.api; package com.tencent.qqnt.aio.api;
import com.tencent.mobileqq.qroute.QRouteApi; import com.tencent.mobileqq.qroute.QRouteApi;
import com.tencent.qqnt.kernel.nativeinterface.Contact;
import com.tencent.qqnt.kernel.nativeinterface.IOperateCallback; import com.tencent.qqnt.kernel.nativeinterface.IOperateCallback;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
public interface IAIOFileTransfer extends QRouteApi { public interface IAIOFileTransfer extends QRouteApi {
void sendLocalFile(Contact contact, String path, IOperateCallback cb); void sendLocalFile(Contact contact, String path, IOperateCallback cb);

View File

@ -0,0 +1,4 @@
package com.tencent.qqnt.kernel.api.impl;
public class GroupService {
}

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
public final class GProJoinGuildResult { public final class GProJoinGuildResult {
GProGuild guildInfo; GProGuild guildInfo;
GProGuildInit guildInit; GProGuildInit guildInit;

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
import java.io.Serializable; import java.io.Serializable;
public final class GProJoinGuildsResult implements Serializable { public final class GProJoinGuildsResult implements Serializable {

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import java.util.ArrayList; import java.util.ArrayList;
public final class GProRoleMemberList { public final class GProRoleMemberList {

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import java.util.ArrayList; import java.util.ArrayList;
public final class GProSearchMemberAndRoleResult { public final class GProSearchMemberAndRoleResult {

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole;
import java.io.Serializable; import java.io.Serializable;
public final class GrayTipGroupMember implements Serializable { public final class GrayTipGroupMember implements Serializable {

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole;
public final class GroupSimpleInfo implements IKernelModel { public final class GroupSimpleInfo implements IKernelModel {
String avatarUrl; String avatarUrl;
int discussToGroupMaxMsgSeq; int discussToGroupMaxMsgSeq;

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import java.util.ArrayList; import java.util.ArrayList;
public interface IGProFetchChannelInvisibleRoleListCallback { public interface IGProFetchChannelInvisibleRoleListCallback {

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import java.util.ArrayList; import java.util.ArrayList;
public interface IGProFetchChannelLiveableRoleListCallback { public interface IGProFetchChannelLiveableRoleListCallback {

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
public interface IGProFetchGuildInfoCallback { public interface IGProFetchGuildInfoCallback {
void onFetchGuildInfo(int code, String reason, GProGuild gProGuild); void onFetchGuildInfo(int code, String reason, GProGuild gProGuild);
} }

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
import java.util.ArrayList; import java.util.ArrayList;
public interface IGProFetchGuildListCallback { public interface IGProFetchGuildListCallback {

View File

@ -1,5 +0,0 @@
package com.tencent.qqnt.kernel.nativeinterface;
public interface IGProResultCallback {
void onResult(int code, String msg, GProSecurityResult result);
}

View File

@ -0,0 +1,6 @@
package com.tencent.qqnt.kernel.nativeinterface;
public interface IGroupMemberCommonCallback {
void onResult(int i2, String str, GroupMemberCommonListResult groupMemberCommonListResult);
}

View File

@ -0,0 +1,5 @@
package com.tencent.qqnt.kernel.nativeinterface;
public interface IGroupMemberExtCallback {
void onResult(int i2, String str, GroupMemberExtListResult groupMemberExtListResult);
}

View File

@ -0,0 +1,6 @@
package com.tencent.qqnt.kernel.nativeinterface;
public interface IGroupMemberListCallback {
void onResult(int result, String str, GroupMemberListResult groupMemberListResult);
}

View File

@ -1,7 +1,25 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import java.util.ArrayList;
public interface IKernelGroupService { public interface IKernelGroupService {
void getTransferableMemberInfo(long uin, IGetTransferableMemberCallback cb); void getTransferableMemberInfo(long uin, IGetTransferableMemberCallback cb);
long addKernelGroupListener(IKernelGroupListener ln); 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);
} }

View File

@ -1,5 +1,8 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,5 +1,14 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuild;
import com.tencent.qqnt.kernelgpro.nativeinterface.GProRoleCreateInfo;
import com.tencent.qqnt.kernelgpro.nativeinterface.IGProCreateRoleCallback;
import com.tencent.qqnt.kernelgpro.nativeinterface.IGProFetchMemberListWithRoleCallback;
import com.tencent.qqnt.kernelgpro.nativeinterface.IGProFetchMemberRolesCallback;
import com.tencent.qqnt.kernelgpro.nativeinterface.IGProFetchRoleListPermissionCallback;
import com.tencent.qqnt.kernelgpro.nativeinterface.IGProFetchRolePermissionCallback;
import com.tencent.qqnt.kernelgpro.nativeinterface.IGProResultCallback;
import java.util.ArrayList; import java.util.ArrayList;
public interface IKernelGuildService { public interface IKernelGuildService {

View File

@ -2,6 +2,7 @@ package com.tencent.qqnt.kernel.nativeinterface;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
public interface IKernelMsgListener { public interface IKernelMsgListener {
void onAddSendMsg(MsgRecord msgRecord); void onAddSendMsg(MsgRecord msgRecord);
@ -116,7 +117,7 @@ public interface IKernelMsgListener {
void onSendMsgError(long j2, Contact contact, int i2, String str); 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); void onTempChatInfoUpdate(TempChatInfo tempChatInfo);

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
import java.util.ArrayList; import java.util.ArrayList;
public interface IKernelRichMediaService { public interface IKernelRichMediaService {

View File

@ -19,11 +19,6 @@ public interface IQQNTWrapperSession {
return null; return null;
} }
@Override
public IKernelGuildService getGuildService() {
return null;
}
@Override @Override
public IKernelMsgService getMsgService() { public IKernelMsgService getMsgService() {
return null; return null;
@ -93,7 +88,7 @@ public interface IQQNTWrapperSession {
//IKernelGroupService getGroupService(); //IKernelGroupService getGroupService();
IKernelGuildService getGuildService(); //IKernelGuildService getGuildService();
IKernelMsgService getMsgService(); IKernelMsgService getMsgService();

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -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 + ",}";
}
}

View File

@ -1,51 +1,146 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
public final class MemberInfo implements IKernelModel { import com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole;
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;
public MemberInfo() { public final class MemberInfo implements IKernelModel {
this.serialVersionUID = 1L; public int bigClubFlag;
this.uid = ""; public int bigClubLevel;
this.qid = ""; public int cardNameId;
this.nick = ""; public int cardType;
this.remark = ""; public int creditLevel;
this.cardName = ""; public int globalGroupLevel;
this.role = MemberRole.values()[0]; public int globalGroupPoint;
this.avatarPath = ""; 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() { public String getAvatarPath() {
return this.avatarPath; return this.avatarPath;
} }
public int getBigClubFlag() {
return this.bigClubFlag;
}
public int getBigClubLevel() {
return this.bigClubLevel;
}
public String getCardName() { public String getCardName() {
return this.cardName; return this.cardName;
} }
public int getCardNameId() {
return this.cardNameId;
}
public int getCardType() { public int getCardType() {
return this.cardType; 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() { public boolean getIsDelete() {
return this.isDelete; return this.isDelete;
} }
public boolean getIsRobot() {
return this.isRobot;
}
public boolean getIsSpecialConcerned() { public boolean getIsSpecialConcerned() {
return this.isSpecialConcerned; 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() { public String getNick() {
return this.nick; return this.nick;
} }
@ -58,6 +153,10 @@ public final class MemberInfo implements IKernelModel {
return this.remark; return this.remark;
} }
public int getRichFlag() {
return this.richFlag;
}
public MemberRole getRole() { public MemberRole getRole() {
return this.role; return this.role;
} }
@ -66,6 +165,10 @@ public final class MemberInfo implements IKernelModel {
return this.shutUpTime; return this.shutUpTime;
} }
public long getSpecialTitleExpireTime() {
return this.specialTitleExpireTime;
}
public String getUid() { public String getUid() {
return this.uid; return this.uid;
} }
@ -74,26 +177,114 @@ public final class MemberInfo implements IKernelModel {
return this.uin; 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) { public void setAvatarPath(String str) {
this.avatarPath = 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) { public void setCardName(String str) {
this.cardName = str; this.cardName = str;
} }
public void setCardNameId(int i2) {
this.cardNameId = i2;
}
public void setCardType(int i2) { public void setCardType(int i2) {
this.cardType = 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) { public void setIsDelete(boolean z) {
this.isDelete = z; this.isDelete = z;
} }
public void setIsRobot(boolean z) {
this.isRobot = z;
}
public void setIsSpecialConcerned(boolean z) { public void setIsSpecialConcerned(boolean z) {
this.isSpecialConcerned = 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) { public void setNick(String str) {
this.nick = str; this.nick = str;
} }
@ -106,6 +297,10 @@ public final class MemberInfo implements IKernelModel {
this.remark = str; this.remark = str;
} }
public void setRichFlag(int i2) {
this.richFlag = i2;
}
public void setRole(MemberRole memberRole) { public void setRole(MemberRole memberRole) {
this.role = memberRole; this.role = memberRole;
} }
@ -114,6 +309,10 @@ public final class MemberInfo implements IKernelModel {
this.shutUpTime = i2; this.shutUpTime = i2;
} }
public void setSpecialTitleExpireTime(long j2) {
this.specialTitleExpireTime = j2;
}
public void setUid(String str) { public void setUid(String str) {
this.uid = str; this.uid = str;
} }
@ -122,30 +321,16 @@ public final class MemberInfo implements IKernelModel {
this.uin = j2; this.uin = j2;
} }
public String toString() { public void setUserShowFlag(int i2) {
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 + ",}"; 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) { public void setUserShowFlagNew(int i2) {
this.serialVersionUID = 1L; this.userShowFlagNew = i2;
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 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 + ",}";
}
} }

View File

@ -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 + ",}";
}
}

View File

@ -1,5 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,6 +1,7 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernel.nativeinterface;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
public final class UnreadCntInfo { public final class UnreadCntInfo {
UnreadCnt allUnreadCnt; UnreadCnt allUnreadCnt;

View File

@ -1,7 +1,9 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProCmdUinInfo;
import com.tencent.qqnt.kernel.nativeinterface.GProGuildInfo;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
public final class GProGuild implements Serializable { public final class GProGuild implements Serializable {
GProCmdUinInfo cmdUinInfo; GProCmdUinInfo cmdUinInfo;

View File

@ -1,4 +1,6 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProRolePermission;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,6 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProRolePermission;
public final class GProRoleCreateInfo { public final class GProRoleCreateInfo {
boolean bHoist; boolean bHoist;

View File

@ -1,4 +1,6 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProSecurityResult;
public interface IGProCreateRoleCallback { public interface IGProCreateRoleCallback {
void onCreateRoleResult(int code, String msg, GProSecurityResult result, GProGuildRole role); void onCreateRoleResult(int code, String msg, GProSecurityResult result, GProGuildRole role);

View File

@ -1,4 +1,6 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProRoleMemberList;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,8 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProRolePermission;
import com.tencent.qqnt.kernel.nativeinterface.GProRolePermissionCategory;
import com.tencent.qqnt.kernel.nativeinterface.GProRolePermissionDesc;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -0,0 +1,7 @@
package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProSecurityResult;
public interface IGProResultCallback {
void onResult(int code, String msg, GProSecurityResult result);
}

View File

@ -0,0 +1,90 @@
package com.tencent.qqnt.kernelgpro.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.GProFaceAuthInfo;
import com.tencent.qqnt.kernel.nativeinterface.GProGuildReqInfo;
import com.tencent.qqnt.kernel.nativeinterface.GProSimpleProfile;
import com.tencent.qqnt.kernel.nativeinterface.IGProAddGuildInfoCallBack;
import com.tencent.qqnt.kernel.nativeinterface.IGProFetchChannelInvisibleRoleListCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProFetchChannelLiveableRoleListCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProFetchGuildInfoCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProFetchGuildListCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProFetchRetentionGuildListCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProFetchUserJoinedGuildListCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProGetMemberInfoByOpenIdCallback;
import com.tencent.qqnt.kernel.nativeinterface.IGProGetUserInfoCallback;
import com.tencent.qqnt.kernel.nativeinterface.IKernelGuildListener;
import java.util.ArrayList;
public interface IKernelGuildService {
void refreshGuildList(boolean isForced); // 只刷新id详细信息需要额外获取
//ArrayList<GProQQMsgListGuild> getQQMsgListGuilds(); 啥也拿不到
void fetchGuildList(ArrayList<GProGuildReqInfo> reqInfos, byte[] cookie, int i2, IGProFetchGuildListCallback iGProFetchGuildListCallback);
void fetchRetentionGuildList(int i2, int i3, byte[] cookie, long j2, IGProFetchRetentionGuildListCallback iGProFetchRetentionGuildListCallback);
void fetchUserJoinedGuildList(long guildId, long tinyId, String cookie, IGProFetchUserJoinedGuildListCallback cb);
void addKernelGuildListener(IKernelGuildListener iKernelGuildListener);
void GetMemberInfoByOpenId(String str, long j2, boolean z, boolean z2, IGProGetMemberInfoByOpenIdCallback iGProGetMemberInfoByOpenIdCallback);
ArrayList<GProGuild> getGroupGuildListFromCache();
ArrayList<GProGuild> getGuildListFromCache();
void fetchAddGuildInfo(int appId, long guildId, IGProAddGuildInfoCallBack iGProAddGuildInfoCallBack);
void fetchGuildInfo(long guildId, int seq, IGProFetchGuildInfoCallback iGProFetchGuildInfoCallback);
//void fetchGuildInfoByAppIdentity(GProGuildIdentity gProGuildIdentity, String str, String str2, IGProFetchGuildInfoByAppIdentityCallback iGProFetchGuildInfoByAppIdentityCallback);
void fetchGuildInfoForGuest(long guildId, int seq, IGProFetchGuildInfoCallback cb);
//void fetchGuestGuildInfoWithChannelList(String guildId, String str2, int i2, int seq, String str3,
// IGProFetchGuestGuildInfoWithChannelListCallback iGProFetchGuestGuildInfoWithChannelListCallback);
GProGuild getGuildInfoFromCache(long guildId);
// 第一次请求: startIndex = 0 , roleIdIndex = 2
void fetchMemberListWithRole(long guildId, long channelId, long startIndex, long roleIndex, int count, int seq, IGProFetchMemberListWithRoleCallback cb);
void refreshGuildInfo(long guildId, boolean force, int seq);
void refreshGuildInfoOnly(long j2, boolean z, int i2);
void refreshGuildUserProfileInfo(long guildId, long tinyId, int seq);
void fetchUserInfo(long guildId, long channelId, ArrayList<Long> tinyIdList, int seq, IGProGetUserInfoCallback cb);
//@Deprecated(since = "QQ新版本不支持创建话题子频道")
//void fetchTopFeeds(long guildId, long channelId, IGProFetchTopFeedsCallback cb);
void fetchChannelInvisibleRoleList(long guildId, long channelId, IGProFetchChannelInvisibleRoleListCallback cb);
void fetchChannelLiveableRoleList(long guildId, long channelId, IGProFetchChannelLiveableRoleListCallback cb);
void fetchMemberRoles(long guildId, long channelId, long tinyId, int seq, IGProFetchMemberRolesCallback cb);
void fetchRoleListWithPermission(long guildId, int seq, IGProFetchRoleListPermissionCallback cb);
void fetchRoleWithPermission(long guildId, long roleId, int seq, IGProFetchRolePermissionCallback cb);
GProSimpleProfile getSimpleProfile(long guildId, long tinyId, int seq);
GProFaceAuthInfo getFaceAuthInfo();
String getGuildUserAvatarUrl(long guildId, long tinyId, int seq);
String getGuildUserNickname(long guildId);
void deleteRole(long guild, long role, IGProResultCallback cb);
void setMemberRoles(long guild, long u1, long u2, long tinyId, ArrayList<Long> addRoles, ArrayList<Long> removeRoles, IGProResultCallback cb);
void setRoleInfo(long guild, long role, GProRoleCreateInfo info, IGProResultCallback cb);
void createRole(long guildId, GProRoleCreateInfo info, ArrayList<Long> initialUsers, IGProCreateRoleCallback cb);
}

View File

@ -0,0 +1,9 @@
package com.tencent.qqnt.kernelgpro.nativeinterface;
public interface IQQGProWrapperSession {
IKernelGuildService getGuildService();
static class CppProxy {
public static native IQQGProWrapperSession getGProWrapperSession(String str);
}
}

View File

@ -0,0 +1,53 @@
package com.tencent.qqnt.kernelpublic.nativeinterface;
import com.tencent.qqnt.kernel.nativeinterface.IKernelModel;
import java.io.Serializable;
public final class Contact implements IKernelModel, Serializable {
int chatType;
String guildId;
String peerUid;
long serialVersionUID;
public Contact() {
this.serialVersionUID = 1L;
this.peerUid = "";
this.guildId = "";
}
public int getChatType() {
return this.chatType;
}
public String getGuildId() {
return this.guildId;
}
public String getPeerUid() {
return this.peerUid;
}
public void setChatType(int i2) {
this.chatType = i2;
}
public void setGuildId(String str) {
this.guildId = str;
}
public void setPeerUid(String str) {
this.peerUid = str;
}
public String toString() {
return "Contact{chatType=" + this.chatType + ",peerUid=" + this.peerUid + ",guildId=" + this.guildId + ",}";
}
public Contact(int i2, String str, String str2) {
this.serialVersionUID = 1L;
this.chatType = i2;
this.peerUid = str;
this.guildId = str2;
}
}

View File

@ -1,4 +1,4 @@
package com.tencent.qqnt.kernel.nativeinterface; package com.tencent.qqnt.kernelpublic.nativeinterface;
public enum MemberRole { public enum MemberRole {
UNSPECIFIED, UNSPECIFIED,

View File

@ -2,6 +2,7 @@ package com.tencent.qqnt.msg.api;
import com.tencent.mobileqq.qroute.QRouteApi; import com.tencent.mobileqq.qroute.QRouteApi;
import com.tencent.qqnt.kernel.nativeinterface.*; import com.tencent.qqnt.kernel.nativeinterface.*;
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;

View File

@ -0,0 +1,11 @@
package com.tencent.qqnt.ntstartup.nativeinterface;
import java.util.HashMap;
public interface IQQNTStartupSessionWrapper {
HashMap<String, String> getSessionIdList();
int start();
int stop();
}

View File

@ -0,0 +1,45 @@
package com.tencent.qqnt.trooplist;
import androidx.lifecycle.LifecycleOwner;
import com.tencent.mobileqq.data.troop.TroopInfo;
import com.tencent.mobileqq.qroute.QRouteApi;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
public interface ITroopListRepoApi extends QRouteApi {
void fetchTroopLevelInfo(@NotNull String str, boolean z);
void fetchTroopList(boolean z);
//@NotNull
//a<Boolean> getFetchTroopListResultLiveData();
@NotNull
List<TroopInfo> getSortedValidTopTroopInfoFromCache();
@NotNull
List<TroopInfo> getSortedValidTroopInfoFromCache();
@NotNull
List<TroopInfo> getTopTroopListFromCache();
@Nullable
TroopInfo getTroopInfoFromCache(@NotNull String str);
@NotNull
List<TroopInfo> getTroopListFromCache();
//@Nullable
//a<List<TroopInfo>> getTroopListLiveData();
void preloadTroopList();
void requestSetTroopTop(@NotNull LifecycleOwner lifecycleOwner, @NotNull String str, boolean z, @NotNull Function1<? super Boolean, Unit> function1);
}

View File

@ -0,0 +1,75 @@
package com.tencent.qqnt.troopmemberlist;
import androidx.lifecycle.LifecycleOwner;
import com.tencent.mobileqq.data.troop.TroopMemberInfo;
import com.tencent.mobileqq.data.troop.TroopMemberNickInfo;
import com.tencent.mobileqq.qroute.QRouteApi;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Map;
import kotlin.Deprecated;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
public interface ITroopMemberListRepoApi extends QRouteApi {
//void fetchGagTroopMemberInfo(@Nullable String str, @Nullable LifecycleOwner lifecycleOwner, boolean z, @NotNull String str2, @Nullable f fVar);
//void fetchTroopMemberInfo(@Nullable String str, @Nullable String str2, boolean z, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3, @Nullable g gVar);
//void fetchTroopMemberInfoWithExtInfo(@Nullable String str, @Nullable String str2, boolean z, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3, @Nullable g gVar);
//void fetchTroopMemberList(@Nullable String str, @Nullable LifecycleOwner lifecycleOwner, boolean z, @NotNull String str2, @Nullable f fVar);
//void fetchTroopMemberListWithExtInfo(@Nullable String str, @Nullable LifecycleOwner lifecycleOwner, boolean z, @NotNull String str2, @Nullable f fVar);
void fetchTroopMemberName(@Nullable String str, @Nullable String str2, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3, @Nullable Function1<? super TroopMemberNickInfo, Unit> cb);
void fetchTroopMemberName(@Nullable String str, @Nullable String str2, @NotNull String str3, @Nullable Function1<? super TroopMemberNickInfo, Unit> cb);
void fetchTroopMemberUid(@Nullable String str, @NotNull Function2<? super Boolean, ? super String, Unit> function2);
void fetchTroopMemberUid(@NotNull List<String> list, @NotNull Function2<? super Boolean, ? super Map<String, String>, Unit> function2);
void fetchTroopMemberUin(@Nullable String str, @NotNull Function2<? super Boolean, ? super String, Unit> function2);
void fetchTroopMemberUin(@NotNull List<String> list, @NotNull Function2<? super Boolean, ? super Map<String, String>, Unit> function2);
//void fetchTroopMemberUinListInfo(@Nullable String str, @Nullable List<String> list, boolean z, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str2, @Nullable f fVar);
//void fetchTroopMemberUinListInfoWithExtInfo(@Nullable String str, @Nullable List<String> list, boolean z, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str2, @Nullable f fVar);
//@Nullable
//TroopMemberInfo getTroopMemberFromCacheOrFetchAsync(@Nullable String str, @Nullable String str2, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3, @Nullable g gVar);
int getTroopMemberInfoDBVersion();
@Deprecated(message = "兼容旧逻辑,过渡用,新逻辑不要使用")
@Nullable
TroopMemberInfo getTroopMemberInfoSync(@Nullable String groupId, @Nullable String userId, @Nullable LifecycleOwner lifecycleOwner, @NotNull String from);
//@Deprecated(message = "兼容旧逻辑,过渡用,新逻辑不要使用")
//@Nullable
//TroopMemberInfo getTroopMemberInfoSync(@Nullable String str, @Nullable String str2, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3, long j);
//@Deprecated(message = "兼容旧逻辑,过渡用,新逻辑不要使用")
//@Nullable
//TroopMemberInfo getTroopMemberWithExtFromCacheOrFetchAsync(@Nullable String str, @Nullable String str2, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3, @Nullable g gVar);
//@Deprecated(message = "兼容旧逻辑,过渡用,新逻辑不要使用")
//@Nullable
//TroopMemberInfo getTroopMemberWithExtInfoSync(@Nullable String str, @Nullable String str2, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str3);
boolean isTroopMemberInfoDBInited(@NotNull String str);
//void preLoadTroopMemberUinListInfo(@Nullable String str, @Nullable List<String> list, boolean z, @Nullable LifecycleOwner lifecycleOwner, @NotNull String str2, @Nullable f fVar);
}

View File

@ -1,201 +0,0 @@
@file:OptIn(DelicateCoroutinesApi::class)
package moe.fuqiuluo.qqinterface.servlet
import android.os.Bundle
import com.tencent.mobileqq.app.QQAppInterface
import com.tencent.mobileqq.msf.core.MsfCore
import com.tencent.mobileqq.pb.ByteStringMicro
import com.tencent.qphone.base.remote.ToServiceMsg
import io.ktor.utils.io.core.BytePacketBuilder
import io.ktor.utils.io.core.readBytes
import io.ktor.utils.io.core.writeFully
import io.ktor.utils.io.core.writeInt
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.withTimeoutOrNull
import kotlinx.serialization.encodeToByteArray
import moe.fuqiuluo.shamrock.tools.slice
import moe.fuqiuluo.shamrock.utils.DeflateTools
import moe.fuqiuluo.shamrock.utils.PlatformUtils
import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher
import moe.fuqiuluo.shamrock.xposed.helper.internal.DynamicReceiver
import moe.fuqiuluo.shamrock.xposed.helper.internal.IPCRequest
import protobuf.oidb.TrpcOidb
import mqq.app.MobileQQ
import protobuf.auto.toByteArray
import tencent.im.oidb.oidb_sso
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.resume
internal abstract class BaseSvc {
companion object Default: CoroutineScope {
val currentUin: String
get() = app.currentAccountUin
val app: QQAppInterface
get() = AppRuntimeFetcher.appRuntime as QQAppInterface
fun createToServiceMsg(cmd: String): ToServiceMsg {
return ToServiceMsg("mobileqq.service", app.currentAccountUin, cmd)
}
suspend fun sendOidbAW(cmd: String, cmdId: Int, serviceId: Int, data: ByteArray, trpc: Boolean = false, timeout: Long = 5000L): ByteArray? {
val seq = MsfCore.getNextSeq()
val buffer = withTimeoutOrNull(timeout) {
suspendCancellableCoroutine { continuation ->
launch(Dispatchers.Default) {
DynamicReceiver.register(IPCRequest(cmd, seq) {
val buffer = it.getByteArrayExtra("buffer")!!
continuation.resume(buffer)
})
}
if (trpc) sendTrpcOidb(cmd, cmdId, serviceId, data, seq)
else sendOidb(cmd, cmdId, serviceId, data, seq)
}
}.also {
if (it == null)
DynamicReceiver.unregister(seq)
}?.copyOf()
try {
if (buffer != null && buffer.size >= 5 && buffer[4] == 120.toByte()) {
val builder = BytePacketBuilder()
val deBuffer = DeflateTools.uncompress(buffer.slice(4))
builder.writeInt(deBuffer.size)
builder.writeFully(deBuffer)
return builder.build().readBytes()
}
} catch (_: Exception) { }
return buffer
}
suspend fun sendBufferAW(cmd: String, isPb: Boolean, data: ByteArray, timeout: Long = 5000L): ByteArray? {
val seq = MsfCore.getNextSeq()
val buffer = withTimeoutOrNull<ByteArray?>(timeout) {
suspendCancellableCoroutine { continuation ->
launch(Dispatchers.Default) {
DynamicReceiver.register(IPCRequest(cmd, seq) {
val buffer = it.getByteArrayExtra("buffer")!!
continuation.resume(buffer)
})
sendBuffer(cmd, isPb, data, seq)
}
}
}.also {
if (it == null)
DynamicReceiver.unregister(seq)
}?.copyOf()
try {
if (buffer != null && buffer.size >= 5 && buffer[4] == 120.toByte()) {
val builder = BytePacketBuilder()
val deBuffer = DeflateTools.uncompress(buffer.slice(4))
builder.writeInt(deBuffer.size)
builder.writeFully(deBuffer)
return builder.build().readBytes()
}
} catch (_: Exception) { }
return buffer
}
fun sendOidb(cmd: String, cmdId: Int, serviceId: Int, buffer: ByteArray, seq: Int = -1, trpc: Boolean = false) {
if (trpc) {
sendTrpcOidb(cmd, cmdId, serviceId, buffer, seq)
return
}
val to = createToServiceMsg(cmd)
val oidb = oidb_sso.OIDBSSOPkg()
oidb.uint32_command.set(cmdId)
oidb.uint32_service_type.set(serviceId)
oidb.bytes_bodybuffer.set(ByteStringMicro.copyFrom(buffer))
oidb.str_client_version.set(PlatformUtils.getClientVersion(MobileQQ.getContext()))
to.putWupBuffer(oidb.toByteArray())
to.addAttribute("req_pb_protocol_flag", true)
if (seq != -1) {
to.addAttribute("shamrock_seq", seq)
}
app.sendToService(to)
}
fun sendTrpcOidb(cmd: String, cmdId: Int, serviceId: Int, buffer: ByteArray, seq: Int = -1) {
val to = createToServiceMsg(cmd)
val oidb = TrpcOidb(
cmd = cmdId,
service = serviceId,
buffer = buffer,
flag = 1
)
to.putWupBuffer(oidb.toByteArray())
to.addAttribute("req_pb_protocol_flag", true)
if (seq != -1) {
to.addAttribute("shamrock_seq", seq)
}
app.sendToService(to)
}
fun sendBuffer(cmd: String, isPb: Boolean, buffer: ByteArray, seq: Int = MsfCore.getNextSeq()) {
val toServiceMsg = ToServiceMsg("mobileqq.service", app.currentUin, cmd)
toServiceMsg.putWupBuffer(buffer)
toServiceMsg.addAttribute("req_pb_protocol_flag", isPb)
toServiceMsg.addAttribute("shamrock_seq", seq)
app.sendToService(toServiceMsg)
}
@OptIn(ExperimentalCoroutinesApi::class)
override val coroutineContext: CoroutineContext by lazy {
Dispatchers.IO.limitedParallelism(12)
}
}
protected fun send(toServiceMsg: ToServiceMsg) {
app.sendToService(toServiceMsg)
}
protected suspend fun sendAW(toServiceMsg: ToServiceMsg, timeout: Long = 5000L): ByteArray? {
val seq = MsfCore.getNextSeq()
val buffer = withTimeoutOrNull<ByteArray?>(timeout) {
suspendCancellableCoroutine { continuation ->
launch(Dispatchers.Default) {
DynamicReceiver.register(IPCRequest(toServiceMsg.serviceCmd, seq) {
val buffer = it.getByteArrayExtra("buffer")!!
continuation.resume(buffer)
})
toServiceMsg.addAttribute("shamrock_seq", seq)
send(toServiceMsg)
}
}
}.also {
if (it == null) DynamicReceiver.unregister(seq)
}?.copyOf()
try {
if (buffer != null && buffer.size >= 5 && buffer[4] == 120.toByte()) {
val builder = BytePacketBuilder()
val deBuffer = DeflateTools.uncompress(buffer.slice(4))
builder.writeInt(deBuffer.size)
builder.writeFully(deBuffer)
return builder.build().readBytes()
}
} catch (_: Exception) { }
return buffer
}
protected fun sendExtra(cmd: String, builder: (Bundle) -> Unit) {
val toServiceMsg = createToServiceMsg(cmd)
builder(toServiceMsg.extraData)
app.sendToService(toServiceMsg)
}
protected fun sendPb(cmd: String, buffer: ByteArray, seq: Int) {
val toServiceMsg = createToServiceMsg(cmd)
toServiceMsg.putWupBuffer(buffer)
toServiceMsg.addAttribute("req_pb_protocol_flag", true)
toServiceMsg.addAttribute("shamrock_seq", seq)
app.sendToService(toServiceMsg)
}
}

View File

@ -21,12 +21,14 @@ import moe.fuqiuluo.shamrock.tools.json
import moe.fuqiuluo.shamrock.tools.slice import moe.fuqiuluo.shamrock.tools.slice
import moe.fuqiuluo.shamrock.helper.Level import moe.fuqiuluo.shamrock.helper.Level
import moe.fuqiuluo.shamrock.helper.LogCenter import moe.fuqiuluo.shamrock.helper.LogCenter
import moe.fuqiuluo.shamrock.tools.decodeToOidb
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import mqq.app.Packet import mqq.app.Packet
import tencent.im.oidb.cmd0x11b2.oidb_0x11b2 import tencent.im.oidb.cmd0x11b2.oidb_0x11b2
import tencent.im.oidb.oidb_sso import tencent.im.oidb.oidb_sso
import kotlin.coroutines.resume import kotlin.coroutines.resume
internal object CardSvc: BaseSvc() { internal object CardSvc: QQInterfaces() {
private val GetModelShowLock by lazy { private val GetModelShowLock by lazy {
Mutex() Mutex()
} }
@ -46,7 +48,8 @@ internal object CardSvc: BaseSvc() {
val resp = sendBufferAW("VipCustom.GetCustomOnlineStatus", false, uniPacket.encode()) val resp = sendBufferAW("VipCustom.GetCustomOnlineStatus", false, uniPacket.encode())
?: error("unable to fetch contact model_show") ?: error("unable to fetch contact model_show")
Packet.decodePacket(resp, "rsp", GetCustomOnlineStatusRsp()).sBuffer val buffer = resp.wupBuffer
Packet.decodePacket(buffer, "rsp", GetCustomOnlineStatusRsp()).sBuffer
} }
} }
@ -79,10 +82,9 @@ internal object CardSvc: BaseSvc() {
reqBody.uin.set(peerId) reqBody.uin.set(peerId)
reqBody.jump_url.set("mqqapi://card/show_pslcard?src_type=internal&source=sharecard&version=1&uin=$peerId") reqBody.jump_url.set("mqqapi://card/show_pslcard?src_type=internal&source=sharecard&version=1&uin=$peerId")
val buffer = sendOidbAW("OidbSvcTrpcTcp.0x11ca_0", 4790, 0, reqBody.toByteArray()) val fromServiceMsg = sendOidbAW("OidbSvcTrpcTcp.0x11ca_0", 4790, 0, reqBody.toByteArray())
?: error("unable to fetch contact ark_json_text") ?: error("unable to fetch contact ark_json_text")
val body = oidb_sso.OIDBSSOPkg() val body = fromServiceMsg.decodeToOidb()
body.mergeFrom(buffer.slice(4))
val rsp = oidb_0x11b2.BusinessCardV3Rsp() val rsp = oidb_0x11b2.BusinessCardV3Rsp()
rsp.mergeFrom(body.bytes_bodybuffer.get().toByteArray()) rsp.mergeFrom(body.bytes_bodybuffer.get().toByteArray())
return rsp.signed_ark_msg.get() return rsp.signed_ark_msg.get()

View File

@ -1,11 +1,12 @@
package moe.fuqiuluo.qqinterface.servlet package moe.fuqiuluo.qqinterface.servlet
import kotlinx.serialization.encodeToByteArray import kotlinx.serialization.encodeToByteArray
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import protobuf.auto.toByteArray import protobuf.auto.toByteArray
import protobuf.oidb.cmd0x9082.Oidb0x9082 import protobuf.oidb.cmd0x9082.Oidb0x9082
internal object ChatSvc: BaseSvc() { internal object ChatSvc: QQInterfaces() {
fun setGroupMessageCommentFace(peer: Long, msgSeq: ULong, faceIndex: String, isSet: Boolean) { fun setGroupMessageCommentFace(peer: Long, msgSeq: ULong, faceIndex: String, isSet: Boolean) {
val serviceId = if (isSet) 1 else 2 val serviceId = if (isSet) 1 else 2
sendOidb("OidbSvcTrpcTcp.0x9082_$serviceId", 36994, serviceId, Oidb0x9082( sendOidb("OidbSvcTrpcTcp.0x9082_$serviceId", 36994, serviceId, Oidb0x9082(

View File

@ -6,9 +6,11 @@ import moe.fuqiuluo.qqinterface.servlet.transfile.RichProtoSvc
import moe.fuqiuluo.shamrock.helper.Level import moe.fuqiuluo.shamrock.helper.Level
import moe.fuqiuluo.shamrock.helper.LogCenter import moe.fuqiuluo.shamrock.helper.LogCenter
import moe.fuqiuluo.shamrock.tools.EMPTY_BYTE_ARRAY import moe.fuqiuluo.shamrock.tools.EMPTY_BYTE_ARRAY
import moe.fuqiuluo.shamrock.tools.decodeToOidb
import moe.fuqiuluo.shamrock.tools.slice import moe.fuqiuluo.shamrock.tools.slice
import moe.fuqiuluo.shamrock.tools.toHexString import moe.fuqiuluo.shamrock.tools.toHexString
import moe.fuqiuluo.shamrock.utils.DeflateTools import moe.fuqiuluo.shamrock.utils.DeflateTools
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import moe.fuqiuluo.symbols.decodeProtobuf import moe.fuqiuluo.symbols.decodeProtobuf
import protobuf.oidb.cmd0x6d7.CreateFolderReq import protobuf.oidb.cmd0x6d7.CreateFolderReq
import protobuf.oidb.cmd0x6d7.DeleteFolderReq import protobuf.oidb.cmd0x6d7.DeleteFolderReq
@ -21,8 +23,10 @@ import tencent.im.oidb.cmd0x6d8.oidb_0x6d8
import tencent.im.oidb.oidb_sso import tencent.im.oidb.oidb_sso
import protobuf.group_file_common.FolderInfo as GroupFileCommonFolderInfo import protobuf.group_file_common.FolderInfo as GroupFileCommonFolderInfo
import protobuf.auto.toByteArray import protobuf.auto.toByteArray
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
internal object FileSvc: BaseSvc() { internal object FileSvc: QQInterfaces() {
suspend fun createFileFolder(groupId: Long, folderName: String, parentFolderId: String = "/"): Result<GroupFileCommonFolderInfo> { suspend fun createFileFolder(groupId: Long, folderName: String, parentFolderId: String = "/"): Result<GroupFileCommonFolderInfo> {
val data = Oidb0x6d7ReqBody( val data = Oidb0x6d7ReqBody(
createFolder = CreateFolderReq( createFolder = CreateFolderReq(
@ -32,10 +36,9 @@ internal object FileSvc: BaseSvc() {
folderName = folderName folderName = folderName
) )
).toByteArray() ).toByteArray()
val resultBuffer = sendOidbAW("OidbSvc.0x6d7_0", 1751, 0, data) val fromServiceMsg = sendOidbAW("OidbSvc.0x6d7_0", 1751, 0, data)
?: return Result.failure(Exception("unable to fetch result")) ?: return Result.failure(Exception("unable to fetch result"))
val oidbPkg = oidb_sso.OIDBSSOPkg() val oidbPkg = fromServiceMsg.decodeToOidb()
oidbPkg.mergeFrom(resultBuffer.slice(4))
val rsp = oidbPkg.bytes_bodybuffer.get() val rsp = oidbPkg.bytes_bodybuffer.get()
.toByteArray() .toByteArray()
.decodeProtobuf<Oidb0x6d7RespBody>() .decodeProtobuf<Oidb0x6d7RespBody>()
@ -46,21 +49,20 @@ internal object FileSvc: BaseSvc() {
} }
suspend fun deleteGroupFolder(groupId: Long, folderUid: String): Boolean { suspend fun deleteGroupFolder(groupId: Long, folderUid: String): Boolean {
val buffer = sendOidbAW("OidbSvc.0x6d7_1", 1751, 1, Oidb0x6d7ReqBody( val fromServiceMsg = sendOidbAW("OidbSvc.0x6d7_1", 1751, 1, Oidb0x6d7ReqBody(
deleteFolder = DeleteFolderReq( deleteFolder = DeleteFolderReq(
groupCode = groupId.toULong(), groupCode = groupId.toULong(),
appId = 3u, appId = 3u,
folderId = folderUid folderId = folderUid
) )
).toByteArray()) ?: return false ).toByteArray()) ?: return false
val oidbPkg = oidb_sso.OIDBSSOPkg() val oidbPkg = fromServiceMsg.decodeToOidb()
oidbPkg.mergeFrom(buffer.slice(4))
val rsp = oidbPkg.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0x6d7RespBody>() val rsp = oidbPkg.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0x6d7RespBody>()
return rsp.deleteFolder?.retCode == 0 return rsp.deleteFolder?.retCode == 0
} }
suspend fun moveGroupFolder(groupId: Long, folderUid: String, newParentFolderUid: String): Boolean { suspend fun moveGroupFolder(groupId: Long, folderUid: String, newParentFolderUid: String): Boolean {
val buffer = sendOidbAW("OidbSvc.0x6d7_2", 1751, 2, Oidb0x6d7ReqBody( val fromServiceMsg = sendOidbAW("OidbSvc.0x6d7_2", 1751, 2, Oidb0x6d7ReqBody(
moveFolder = MoveFolderReq( moveFolder = MoveFolderReq(
groupCode = groupId.toULong(), groupCode = groupId.toULong(),
appId = 3u, appId = 3u,
@ -68,14 +70,13 @@ internal object FileSvc: BaseSvc() {
parentFolderId = "/" parentFolderId = "/"
) )
).toByteArray()) ?: return false ).toByteArray()) ?: return false
val oidbPkg = oidb_sso.OIDBSSOPkg() val oidbPkg = fromServiceMsg.decodeToOidb()
oidbPkg.mergeFrom(buffer.slice(4))
val rsp = oidbPkg.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0x6d7RespBody>() val rsp = oidbPkg.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0x6d7RespBody>()
return rsp.moveFolder?.retCode == 0 return rsp.moveFolder?.retCode == 0
} }
suspend fun renameFolder(groupId: Long, folderUid: String, name: String): Boolean { suspend fun renameFolder(groupId: Long, folderUid: String, name: String): Boolean {
val buffer = sendOidbAW("OidbSvc.0x6d7_3", 1751, 3, Oidb0x6d7ReqBody( val fromServiceMsg = sendOidbAW("OidbSvc.0x6d7_3", 1751, 3, Oidb0x6d7ReqBody(
renameFolder = RenameFolderReq( renameFolder = RenameFolderReq(
groupCode = groupId.toULong(), groupCode = groupId.toULong(),
appId = 3u, appId = 3u,
@ -83,8 +84,7 @@ internal object FileSvc: BaseSvc() {
folderName = name folderName = name
) )
).toByteArray()) ?: return false ).toByteArray()) ?: return false
val oidbPkg = oidb_sso.OIDBSSOPkg() val oidbPkg = fromServiceMsg.decodeToOidb()
oidbPkg.mergeFrom(buffer.slice(4))
val rsp = oidbPkg.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0x6d7RespBody>() val rsp = oidbPkg.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0x6d7RespBody>()
return rsp.renameFolder?.retCode == 0 return rsp.renameFolder?.retCode == 0
} }
@ -101,8 +101,7 @@ internal object FileSvc: BaseSvc() {
} }
val result = sendOidbAW("OidbSvc.0x6d6_3", 1750, 3, oidb0x6d6ReqBody.toByteArray()) val result = sendOidbAW("OidbSvc.0x6d6_3", 1750, 3, oidb0x6d6ReqBody.toByteArray())
?: return false ?: return false
val oidbPkg = oidb_sso.OIDBSSOPkg() val oidbPkg = result.decodeToOidb()
oidbPkg.mergeFrom(result.slice(4))
val rsp = oidb_0x6d6.RspBody().apply { val rsp = oidb_0x6d6.RspBody().apply {
mergeFrom(oidbPkg.bytes_bodybuffer.get().toByteArray()) mergeFrom(oidbPkg.bytes_bodybuffer.get().toByteArray())
} }
@ -120,8 +119,8 @@ internal object FileSvc: BaseSvc() {
val fileCnt: Int val fileCnt: Int
val limitCnt: Int val limitCnt: Int
if (rspGetFileCntBuffer != null) { if (rspGetFileCntBuffer != null) {
oidb_0x6d8.RspBody().mergeFrom(oidb_sso.OIDBSSOPkg() oidb_0x6d8.RspBody().mergeFrom(
.mergeFrom(rspGetFileCntBuffer.slice(4)) rspGetFileCntBuffer.decodeToOidb()
.bytes_bodybuffer.get() .bytes_bodybuffer.get()
.toByteArray() .toByteArray()
).group_file_cnt_rsp.apply { ).group_file_cnt_rsp.apply {
@ -141,8 +140,8 @@ internal object FileSvc: BaseSvc() {
val totalSpace: Long val totalSpace: Long
val usedSpace: Long val usedSpace: Long
if (rspGetFileSpaceBuffer != null) { if (rspGetFileSpaceBuffer != null) {
oidb_0x6d8.RspBody().mergeFrom(oidb_sso.OIDBSSOPkg() oidb_0x6d8.RspBody().mergeFrom(
.mergeFrom(rspGetFileSpaceBuffer.slice(4)) rspGetFileSpaceBuffer.decodeToOidb()
.bytes_bodybuffer.get() .bytes_bodybuffer.get()
.toByteArray()).group_space_rsp.apply { .toByteArray()).group_space_rsp.apply {
totalSpace = uint64_total_space.get() totalSpace = uint64_total_space.get()
@ -187,15 +186,13 @@ internal object FileSvc: BaseSvc() {
uint32_show_onlinedoc_folder.set(0) uint32_show_onlinedoc_folder.set(0)
}) })
}.toByteArray(), timeout = 15_000L) }.toByteArray(), timeout = 15.seconds)
return kotlin.runCatching { return kotlin.runCatching {
val files = arrayListOf<FileInfo>() val files = arrayListOf<FileInfo>()
val dirs = arrayListOf<FolderInfo>() val dirs = arrayListOf<FolderInfo>()
if (rspGetFileListBuffer != null) { if (rspGetFileListBuffer != null) {
val oidb = oidb_sso.OIDBSSOPkg().mergeFrom(rspGetFileListBuffer.slice(4).let { val oidb = rspGetFileListBuffer.decodeToOidb()
if (it[0] == 0x78.toByte()) DeflateTools.uncompress(it) else it
})
oidb_0x6d8.RspBody().mergeFrom(oidb.bytes_bodybuffer.get().toByteArray()) oidb_0x6d8.RspBody().mergeFrom(oidb.bytes_bodybuffer.get().toByteArray())
.file_list_info_rsp.apply { .file_list_info_rsp.apply {
@ -242,7 +239,7 @@ internal object FileSvc: BaseSvc() {
GroupFileList(files, dirs) GroupFileList(files, dirs)
}.onFailure { }.onFailure {
LogCenter.log(it.message + ", buffer: ${rspGetFileListBuffer.toHexString()}", Level.ERROR) LogCenter.log(it.message + ", buffer: ${rspGetFileListBuffer?.wupBuffer?.toHexString()}", Level.ERROR)
} }
} }
} }

View File

@ -13,13 +13,15 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx.coroutines.suspendCancellableCoroutine
import moe.fuqiuluo.shamrock.tools.decodeToObject
import moe.fuqiuluo.shamrock.tools.slice import moe.fuqiuluo.shamrock.tools.slice
import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import mqq.app.AppRuntime import mqq.app.AppRuntime
import tencent.mobileim.structmsg.structmsg import tencent.mobileim.structmsg.structmsg
import kotlin.coroutines.resume import kotlin.coroutines.resume
internal object FriendSvc: BaseSvc() { internal object FriendSvc: QQInterfaces() {
suspend fun getFriendList(refresh: Boolean): Result<List<Friends>> { suspend fun getFriendList(refresh: Boolean): Result<List<Friends>> {
val runtime = AppRuntimeFetcher.appRuntime val runtime = AppRuntimeFetcher.appRuntime
@ -91,8 +93,7 @@ internal object FriendSvc: BaseSvc() {
ArrayList() ArrayList()
} else { } else {
try { try {
val msg = structmsg.RspSystemMsgNew() val msg = respBuffer.decodeToObject(structmsg.RspSystemMsgNew())
msg.mergeFrom(respBuffer.slice(4))
return msg.friendmsgs.get() return msg.friendmsgs.get()
} catch (err: Throwable) { } catch (err: Throwable) {
requestFriendSystemMsgNew(msgNum, latestFriendSeq, latestGroupSeq, retryCnt - 1) requestFriendSystemMsgNew(msgNum, latestFriendSeq, latestGroupSeq, retryCnt - 1)

View File

@ -3,10 +3,11 @@
package moe.fuqiuluo.qqinterface.servlet package moe.fuqiuluo.qqinterface.servlet
import com.tencent.mobileqq.qqguildsdk.api.IGPSService import com.tencent.mobileqq.qqguildsdk.api.IGPSService
import com.tencent.qqnt.kernel.nativeinterface.GProGuildRole import com.tencent.qqnt.kernelgpro.nativeinterface.GProGuildRole
import com.tencent.qqnt.kernel.nativeinterface.GProRoleCreateInfo import com.tencent.qqnt.kernelgpro.nativeinterface.GProRoleCreateInfo
import com.tencent.qqnt.kernel.nativeinterface.GProRoleMemberList import com.tencent.qqnt.kernel.nativeinterface.GProRoleMemberList
import com.tencent.qqnt.kernel.nativeinterface.GProRolePermission import com.tencent.qqnt.kernel.nativeinterface.GProRolePermission
import com.tencent.qqnt.kernelgpro.nativeinterface.IQQGProWrapperSession
import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.withTimeoutOrNull import kotlinx.coroutines.withTimeoutOrNull
import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.ExperimentalSerializationApi
@ -19,9 +20,11 @@ import moe.fuqiuluo.qqinterface.servlet.structures.SlowModeInfo
import moe.fuqiuluo.shamrock.helper.Level import moe.fuqiuluo.shamrock.helper.Level
import moe.fuqiuluo.shamrock.helper.LogCenter import moe.fuqiuluo.shamrock.helper.LogCenter
import moe.fuqiuluo.shamrock.tools.EMPTY_BYTE_ARRAY import moe.fuqiuluo.shamrock.tools.EMPTY_BYTE_ARRAY
import moe.fuqiuluo.shamrock.tools.slice import moe.fuqiuluo.shamrock.tools.decodeToObject
import moe.fuqiuluo.shamrock.tools.decodeToOidb
import moe.fuqiuluo.shamrock.utils.PlatformUtils import moe.fuqiuluo.shamrock.utils.PlatformUtils
import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import moe.fuqiuluo.symbols.decodeProtobuf import moe.fuqiuluo.symbols.decodeProtobuf
import protobuf.auto.toByteArray import protobuf.auto.toByteArray
import protobuf.guild.GetGuildFeedsReq import protobuf.guild.GetGuildFeedsReq
@ -41,15 +44,18 @@ import protobuf.qweb.DEFAULT_DEVICE_INFO
import protobuf.qweb.QWebExtInfo import protobuf.qweb.QWebExtInfo
import protobuf.qweb.QWebReq import protobuf.qweb.QWebReq
import protobuf.qweb.QWebRsp import protobuf.qweb.QWebRsp
import tencent.im.oidb.oidb_sso
import kotlin.coroutines.resume import kotlin.coroutines.resume
internal object GProSvc: BaseSvc() { internal object GProSvc: QQInterfaces() {
fun getSelfTinyId(): ULong { fun getSelfTinyId(): ULong {
val service = app.getRuntimeService(IGPSService::class.java, "all") val service = app.getRuntimeService(IGPSService::class.java, "all")
return service.selfTinyId.toULong() return service.selfTinyId.toULong()
} }
private fun getNTGProSessionId(): String? {
return NTServiceFetcher.startupSessionWrapper.sessionIdList["gpro"]
}
suspend fun getGuildInfo(guildId: ULong): Result<Oidb0xf57MetaInfo> { suspend fun getGuildInfo(guildId: ULong): Result<Oidb0xf57MetaInfo> {
val respBuffer = sendOidbAW("OidbSvcTrpcTcp.0xf57_9", 0xf57, 9, Oidb0xf57Req( val respBuffer = sendOidbAW("OidbSvcTrpcTcp.0xf57_9", 0xf57, 9, Oidb0xf57Req(
filter = Oidb0xf57Filter( filter = Oidb0xf57Filter(
@ -57,12 +63,8 @@ internal object GProSvc: BaseSvc() {
u2 = Oidb0xf57U2(1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u) u2 = Oidb0xf57U2(1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u)
), ),
guildInfo = Oidb0xf57GuildInfo(guildId = guildId) guildInfo = Oidb0xf57GuildInfo(guildId = guildId)
).toByteArray()) ).toByteArray()) ?: return Result.failure(Exception("unable to send packet"))
val body = oidb_sso.OIDBSSOPkg() val body = respBuffer.decodeToOidb()
if (respBuffer == null) {
return Result.failure(Exception("unable to send packet"))
}
body.mergeFrom(respBuffer.slice(4))
return runCatching { return runCatching {
body.bytes_bodybuffer.get() body.bytes_bodybuffer.get()
.toByteArray() .toByteArray()
@ -71,7 +73,7 @@ internal object GProSvc: BaseSvc() {
} }
suspend fun getGuildFeeds(guildId: ULong, channelId: ULong, startIndex: Int): Result<GetGuildFeedsRsp> { suspend fun getGuildFeeds(guildId: ULong, channelId: ULong, startIndex: Int): Result<GetGuildFeedsRsp> {
val buffer = sendBufferAW("QChannelSvr.trpc.qchannel.commreader.ComReader.GetGuildFeeds", true, QWebReq( val fromServiceMsg = sendBufferAW("QChannelSvr.trpc.qchannel.commreader.ComReader.GetGuildFeeds", true, QWebReq(
seq = 10, seq = 10,
qua = PlatformUtils.getQUA(), qua = PlatformUtils.getQUA(),
deviceInfo = DEFAULT_DEVICE_INFO, deviceInfo = DEFAULT_DEVICE_INFO,
@ -92,7 +94,7 @@ internal object GProSvc: BaseSvc() {
QWebExtInfo("tiny_id", getSelfTinyId().toString()), QWebExtInfo("tiny_id", getSelfTinyId().toString()),
) )
).toByteArray()) ?: return Result.failure(Exception("unable to send packet")) ).toByteArray()) ?: return Result.failure(Exception("unable to send packet"))
val webRsp = buffer.slice(4).decodeProtobuf<QWebRsp>() val webRsp = fromServiceMsg.decodeToObject<QWebRsp>()
if(webRsp.buffer == null) return Result.failure(Exception("server error")) if(webRsp.buffer == null) return Result.failure(Exception("server error"))
val wupBuffer = webRsp.buffer!! val wupBuffer = webRsp.buffer!!
val feeds = wupBuffer.decodeProtobuf<GetGuildFeedsRsp>() val feeds = wupBuffer.decodeProtobuf<GetGuildFeedsRsp>()
@ -133,7 +135,9 @@ internal object GProSvc: BaseSvc() {
} }
fun refreshGuildInfo(guildId: ULong) { fun refreshGuildInfo(guildId: ULong) {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
kernelGProService.refreshGuildInfo(guildId.toLong(), true, 1) kernelGProService.refreshGuildInfo(guildId.toLong(), true, 1)
} }
@ -145,8 +149,8 @@ internal object GProSvc: BaseSvc() {
fetchAll: Boolean = false, fetchAll: Boolean = false,
result: ArrayList<GProRoleMemberList> = arrayListOf() result: ArrayList<GProRoleMemberList> = arrayListOf()
): Result<Pair<GetGuildMemberListNextToken, ArrayList<GProRoleMemberList>>> { ): Result<Pair<GetGuildMemberListNextToken, ArrayList<GProRoleMemberList>>> {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService =
IQQGProWrapperSession.CppProxy.getGProWrapperSession(getNTGProSessionId()).guildService
val fetchGuildMemberListResult: Pair<GetGuildMemberListNextToken, ArrayList<GProRoleMemberList>> = (withTimeoutOrNull(5000) { val fetchGuildMemberListResult: Pair<GetGuildMemberListNextToken, ArrayList<GProRoleMemberList>> = (withTimeoutOrNull(5000) {
suspendCancellableCoroutine { suspendCancellableCoroutine {
kernelGProService.fetchMemberListWithRole(guildId.toLong(), 0, startIndex, roleIndex, count, 0) { code, reason, finish, nextIndex, nextRoleIdIndex, _, seq, roleList -> kernelGProService.fetchMemberListWithRole(guildId.toLong(), 0, startIndex, roleIndex, count, 0) { code, reason, finish, nextIndex, nextRoleIdIndex, _, seq, roleList ->
@ -188,12 +192,8 @@ internal object GProSvc: BaseSvc() {
memberId = 0uL, memberId = 0uL,
tinyId = memberTinyId, tinyId = memberTinyId,
guildId = guildId guildId = guildId
).toByteArray()) ).toByteArray()) ?: return Result.failure(Exception("unable to send packet"))
val body = oidb_sso.OIDBSSOPkg() val body = respBuffer.decodeToOidb()
if (respBuffer == null) {
return Result.failure(Exception("unable to send packet"))
}
body.mergeFrom(respBuffer.slice(4))
return runCatching { return runCatching {
body.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0xf88Rsp>().userInfo!! body.bytes_bodybuffer.get().toByteArray().decodeProtobuf<Oidb0xf88Rsp>().userInfo!!
} }
@ -219,7 +219,8 @@ internal object GProSvc: BaseSvc() {
} }
private fun getGuildListByNt(result: ArrayList<GuildInfo>) { private fun getGuildListByNt(result: ArrayList<GuildInfo>) {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService =
IQQGProWrapperSession.CppProxy.getGProWrapperSession(getNTGProSessionId()).guildService
kernelGProService.guildListFromCache.forEach { kernelGProService.guildListFromCache.forEach {
if (it.result != 0) return@forEach if (it.result != 0) return@forEach
val guildInfo = it.guildInfo val guildInfo = it.guildInfo
@ -241,7 +242,9 @@ internal object GProSvc: BaseSvc() {
} }
suspend fun fetchGuildMemberRoles(guildId: ULong, tinyId: ULong, refresh: Boolean = false): Result<ArrayList<GProGuildRole>> { suspend fun fetchGuildMemberRoles(guildId: ULong, tinyId: ULong, refresh: Boolean = false): Result<ArrayList<GProGuildRole>> {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
if (refresh) { if (refresh) {
kernelGProService.refreshGuildUserProfileInfo(guildId.toLong(), tinyId.toLong(), 1) kernelGProService.refreshGuildUserProfileInfo(guildId.toLong(), tinyId.toLong(), 1)
} }
@ -256,7 +259,9 @@ internal object GProSvc: BaseSvc() {
} }
fun getGuildList(refresh: Boolean = false, forceOldApi: Boolean): ArrayList<GuildInfo> { fun getGuildList(refresh: Boolean = false, forceOldApi: Boolean): ArrayList<GuildInfo> {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
if (refresh) { if (refresh) {
kernelGProService.refreshGuildList(true) kernelGProService.refreshGuildList(true)
kernelGProService.guildListFromCache.forEach { kernelGProService.guildListFromCache.forEach {
@ -279,7 +284,10 @@ internal object GProSvc: BaseSvc() {
} }
suspend fun getGuildRoles(guildId: ULong): Result<List<GProGuildRole>> { suspend fun getGuildRoles(guildId: ULong): Result<List<GProGuildRole>> {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
val roles: List<GProGuildRole> = withTimeoutOrNull(5000) { val roles: List<GProGuildRole> = withTimeoutOrNull(5000) {
suspendCancellableCoroutine { suspendCancellableCoroutine {
kernelGProService.fetchRoleListWithPermission(guildId.toLong(), 1) { code, _, roles, _, _, _ -> kernelGProService.fetchRoleListWithPermission(guildId.toLong(), 1) { code, _, roles, _, _, _ ->
@ -291,7 +299,10 @@ internal object GProSvc: BaseSvc() {
} }
fun deleteGuildRole(guildId: ULong, roleId: ULong) { fun deleteGuildRole(guildId: ULong, roleId: ULong) {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
kernelGProService.deleteRole(guildId.toLong(), roleId.toLong()) { code, msg, result -> kernelGProService.deleteRole(guildId.toLong(), roleId.toLong()) { code, msg, result ->
if (code != 0) { if (code != 0) {
LogCenter.log("deleteGuildRole failed: $code($msg) => $result", Level.WARN) LogCenter.log("deleteGuildRole failed: $code($msg) => $result", Level.WARN)
@ -300,7 +311,10 @@ internal object GProSvc: BaseSvc() {
} }
fun setMemberRole(guildId: ULong, tinyId: ULong, roleId: ULong, isSet: Boolean) { fun setMemberRole(guildId: ULong, tinyId: ULong, roleId: ULong, isSet: Boolean) {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
val addList = arrayListOf<Long>() val addList = arrayListOf<Long>()
val rmList = arrayListOf<Long>() val rmList = arrayListOf<Long>()
(if (isSet) addList else rmList).add(roleId.toLong()) (if (isSet) addList else rmList).add(roleId.toLong())
@ -312,8 +326,11 @@ internal object GProSvc: BaseSvc() {
} }
suspend fun getGuildRolePermission(guildId: ULong, roleId: ULong): Result<GProGuildRole> { suspend fun getGuildRolePermission(guildId: ULong, roleId: ULong): Result<GProGuildRole> {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
val role:GProGuildRole = withTimeoutOrNull(5000) { getNTGProSessionId()
).guildService
val role: GProGuildRole = withTimeoutOrNull(5000) {
suspendCancellableCoroutine { suspendCancellableCoroutine {
kernelGProService.fetchRoleWithPermission(guildId.toLong(), roleId.toLong(), 1) { code, msg, role, _, _, _ -> kernelGProService.fetchRoleWithPermission(guildId.toLong(), roleId.toLong(), 1) { code, msg, role, _, _, _ ->
if (code != 0) { if (code != 0) {
@ -330,10 +347,14 @@ internal object GProSvc: BaseSvc() {
val oldInfo = getGuildRolePermission(guildId, roleId).onFailure { val oldInfo = getGuildRolePermission(guildId, roleId).onFailure {
return Result.failure(it) return Result.failure(it)
}.getOrThrow() }.getOrThrow()
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
val info = GProRoleCreateInfo( getNTGProSessionId()
name, color, oldInfo.bHoist, oldInfo.rolePermissions ).guildService
)
val info =
GProRoleCreateInfo(
name, color, oldInfo.bHoist, oldInfo.rolePermissions
)
kernelGProService.setRoleInfo(guildId.toLong(), roleId.toLong(), info) { code, msg, result -> kernelGProService.setRoleInfo(guildId.toLong(), roleId.toLong(), info) { code, msg, result ->
if (code != 0) { if (code != 0) {
LogCenter.log("updateGuildRole failed: $code($msg) => $result", Level.WARN) LogCenter.log("updateGuildRole failed: $code($msg) => $result", Level.WARN)
@ -343,9 +364,18 @@ internal object GProSvc: BaseSvc() {
} }
suspend fun createGuildRole(guildId: ULong, name: String, color: Long, initialUsers: ArrayList<Long>): Result<GProGuildRole> { suspend fun createGuildRole(guildId: ULong, name: String, color: Long, initialUsers: ArrayList<Long>): Result<GProGuildRole> {
val kernelGProService = NTServiceFetcher.kernelService.wrapperSession.guildService val kernelGProService = IQQGProWrapperSession.CppProxy.getGProWrapperSession(
getNTGProSessionId()
).guildService
val permission = GProRolePermission(false, arrayListOf()) val permission = GProRolePermission(false, arrayListOf())
val info = GProRoleCreateInfo(name, color, false, permission) val info =
GProRoleCreateInfo(
name,
color,
false,
permission
)
val role: GProGuildRole = withTimeoutOrNull(5000) { val role: GProGuildRole = withTimeoutOrNull(5000) {
suspendCancellableCoroutine { suspendCancellableCoroutine {
kernelGProService.createRole(guildId.toLong(), info, initialUsers) { code, msg, result, role -> kernelGProService.createRole(guildId.toLong(), info, initialUsers) { code, msg, result, role ->

View File

@ -10,13 +10,17 @@ import com.tencent.mobileqq.app.BusinessHandlerFactory
import com.tencent.mobileqq.app.QQAppInterface import com.tencent.mobileqq.app.QQAppInterface
import com.tencent.mobileqq.data.troop.TroopInfo import com.tencent.mobileqq.data.troop.TroopInfo
import com.tencent.mobileqq.data.troop.TroopMemberInfo import com.tencent.mobileqq.data.troop.TroopMemberInfo
import com.tencent.mobileqq.data.troop.TroopMemberNickInfo
import com.tencent.mobileqq.pb.ByteStringMicro import com.tencent.mobileqq.pb.ByteStringMicro
import com.tencent.mobileqq.qroute.QRoute
import com.tencent.mobileqq.troop.api.ITroopInfoService import com.tencent.mobileqq.troop.api.ITroopInfoService
import com.tencent.mobileqq.troop.api.ITroopMemberInfoService import com.tencent.mobileqq.troop.api.ITroopMemberInfoService
import com.tencent.protofile.join_group_link.join_group_link import com.tencent.protofile.join_group_link.join_group_link
import com.tencent.qphone.base.remote.ToServiceMsg import com.tencent.qphone.base.remote.ToServiceMsg
import com.tencent.qqnt.kernel.nativeinterface.MemberInfo import com.tencent.qqnt.kernel.nativeinterface.MemberInfo
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
import com.tencent.qqnt.trooplist.ITroopListRepoApi
import com.tencent.qqnt.troopmemberlist.ITroopMemberListRepoApi
import friendlist.stUinInfo import friendlist.stUinInfo
import io.ktor.client.call.body import io.ktor.client.call.body
import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.forms.MultiPartFormDataContent
@ -41,12 +45,10 @@ import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withTimeoutOrNull import kotlinx.coroutines.withTimeoutOrNull
import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.encodeToByteArray
import kotlinx.serialization.json.Json import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.decodeFromStream import kotlinx.serialization.json.decodeFromStream
import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonObject
import moe.fuqiuluo.qqinterface.servlet.TicketSvc.getLongUin import moe.fuqiuluo.qqinterface.servlet.TicketSvc.getLongUin
import moe.fuqiuluo.qqinterface.servlet.TicketSvc.getUin import moe.fuqiuluo.qqinterface.servlet.TicketSvc.getUin
import moe.fuqiuluo.qqinterface.servlet.structures.GroupAtAllRemainInfo import moe.fuqiuluo.qqinterface.servlet.structures.GroupAtAllRemainInfo
@ -68,17 +70,22 @@ import moe.fuqiuluo.shamrock.tools.asJsonObject
import moe.fuqiuluo.shamrock.tools.asLong import moe.fuqiuluo.shamrock.tools.asLong
import moe.fuqiuluo.shamrock.tools.asString import moe.fuqiuluo.shamrock.tools.asString
import moe.fuqiuluo.shamrock.tools.asStringOrNull import moe.fuqiuluo.shamrock.tools.asStringOrNull
import moe.fuqiuluo.shamrock.tools.decodeToObject
import moe.fuqiuluo.shamrock.tools.decodeToOidb
import moe.fuqiuluo.shamrock.tools.ifNullOrEmpty import moe.fuqiuluo.shamrock.tools.ifNullOrEmpty
import moe.fuqiuluo.shamrock.tools.putBuf32Long import moe.fuqiuluo.shamrock.tools.putBuf32Long
import moe.fuqiuluo.shamrock.tools.slice
import moe.fuqiuluo.shamrock.utils.FileUtils import moe.fuqiuluo.shamrock.utils.FileUtils
import moe.fuqiuluo.shamrock.utils.PlatformUtils import moe.fuqiuluo.shamrock.utils.PlatformUtils
import moe.fuqiuluo.shamrock.utils.PlatformUtils.QQ_9_0_71_VER
import moe.fuqiuluo.shamrock.utils.PlatformUtils.QQ_9_0_80_VER
import moe.fuqiuluo.shamrock.utils.PlatformUtils.QQ_9_0_8_VER
import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher
import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher
import protobuf.oidb.cmd0xf16.Oidb0xf16 import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import protobuf.oidb.cmd0xf16.SetGroupRemarkReq
import mqq.app.MobileQQ import mqq.app.MobileQQ
import protobuf.auto.toByteArray import protobuf.auto.toByteArray
import protobuf.oidb.cmd0xf16.Oidb0xf16
import protobuf.oidb.cmd0xf16.SetGroupRemarkReq
import tencent.im.group.group_member_info import tencent.im.group.group_member_info
import tencent.im.oidb.cmd0x88d.oidb_0x88d import tencent.im.oidb.cmd0x88d.oidb_0x88d
import tencent.im.oidb.cmd0x899.oidb_0x899 import tencent.im.oidb.cmd0x899.oidb_0x899
@ -96,8 +103,9 @@ import java.lang.reflect.Method
import java.lang.reflect.Modifier import java.lang.reflect.Modifier
import java.nio.ByteBuffer import java.nio.ByteBuffer
import kotlin.coroutines.resume import kotlin.coroutines.resume
import kotlin.time.Duration.Companion.seconds
internal object GroupSvc: BaseSvc() { internal object GroupSvc: QQInterfaces() {
private const val GET_MEMBER_ROLE_BY_NT = false private const val GET_MEMBER_ROLE_BY_NT = false
private val RefreshTroopMemberInfoLock by lazy { private val RefreshTroopMemberInfoLock by lazy {
@ -114,15 +122,14 @@ internal object GroupSvc: BaseSvc() {
private lateinit var METHOD_REQ_MODIFY_GROUP_NAME: Method private lateinit var METHOD_REQ_MODIFY_GROUP_NAME: Method
suspend fun getGroupRemainAtAllRemain (groupId: Long): Result<GroupAtAllRemainInfo> { suspend fun getGroupRemainAtAllRemain (groupId: Long): Result<GroupAtAllRemainInfo> {
val buffer = sendOidbAW("OidbSvcTrpcTcp.0x8a7_0", 2215, 0, cmd0x8a7.ReqBody().apply { val fromServiceMsg = sendOidbAW("OidbSvcTrpcTcp.0x8a7_0", 2215, 0, cmd0x8a7.ReqBody().apply {
uint32_sub_cmd.set(1) uint32_sub_cmd.set(1)
uint32_limit_interval_type_for_uin.set(2) uint32_limit_interval_type_for_uin.set(2)
uint32_limit_interval_type_for_group.set(1) uint32_limit_interval_type_for_group.set(1)
uint64_uin.set(getLongUin()) uint64_uin.set(getLongUin())
uint64_group_code.set(groupId) uint64_group_code.set(groupId)
}.toByteArray(), trpc = true) ?: return Result.failure(RuntimeException("[oidb] timeout")) }.toByteArray(), trpc = true) ?: return Result.failure(RuntimeException("[oidb] timeout"))
val body = oidb_sso.OIDBSSOPkg() val body = fromServiceMsg.decodeToOidb()
body.mergeFrom(buffer.slice(4))
if(body.uint32_result.get() != 0) { if(body.uint32_result.get() != 0) {
return Result.failure(RuntimeException(body.str_error_msg.get())) return Result.failure(RuntimeException(body.str_error_msg.get()))
} }
@ -135,7 +142,7 @@ internal object GroupSvc: BaseSvc() {
)) ))
} }
suspend fun getProhibitedMemberList(groupId: Long): Result<List<ProhibitedMemberInfo>> { suspend fun getProhibitedMemberList(groupId: Long): Result<List<ProhibitedMemberInfo>> {
val buffer = sendOidbAW("OidbSvc.0x899_0", 2201, 0, oidb_0x899.ReqBody().apply { val fromServiceMsg = sendOidbAW("OidbSvc.0x899_0", 2201, 0, oidb_0x899.ReqBody().apply {
uint64_group_code.set(groupId) uint64_group_code.set(groupId)
uint64_start_uin.set(0) uint64_start_uin.set(0)
uint32_identify_flag.set(6) uint32_identify_flag.set(6)
@ -144,8 +151,7 @@ internal object GroupSvc: BaseSvc() {
uint32_shutup_timestap.set(0) uint32_shutup_timestap.set(0)
}) })
}.toByteArray()) ?: return Result.failure(RuntimeException("[oidb] timeout")) }.toByteArray()) ?: return Result.failure(RuntimeException("[oidb] timeout"))
val body = oidb_sso.OIDBSSOPkg() val body = fromServiceMsg.decodeToOidb()
body.mergeFrom(buffer.slice(4))
if(body.uint32_result.get() != 0) { if(body.uint32_result.get() != 0) {
return Result.failure(RuntimeException(body.str_error_msg.get())) return Result.failure(RuntimeException(body.str_error_msg.get()))
} }
@ -165,36 +171,86 @@ internal object GroupSvc: BaseSvc() {
sendOidb("OidbSvc.0xed3", 3795, 1, req.toByteArray()) sendOidb("OidbSvc.0xed3", 3795, 1, req.toByteArray())
} }
suspend fun getGroupMemberList(groupId: Long, refresh: Boolean): Result<List<TroopMemberInfo>> {
val service = app.getRuntimeService(ITroopMemberInfoService::class.java, "all")
var memberList = service.getAllTroopMembers(groupId.toString())
if (refresh || memberList == null) {
memberList = requestTroopMemberInfo(service, groupId).onFailure {
return Result.failure(Exception("获取群成员列表失败"))
}.getOrThrow()
}
getGroupInfo(groupId, true).onSuccess { suspend fun getGroupMemberList(groupId: Long, refresh: Boolean): Result<HashMap<String, MemberInfo>> {
if(it.wMemberNum > memberList.size) { val kernelService = NTServiceFetcher.kernelService
return getGroupMemberList(groupId, true) 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)
// }
// }
return Result.success(memberMap)
// var memberList = service.getAllTroopMembers(groupId.toString())
// if (refresh || memberList == null) {
// memberList = requestTroopMemberInfo(service, groupId).onFailure {
// return Result.failure(Exception("获取群成员列表失败"))
// }.getOrThrow()
// }
//
// getGroupInfo(groupId, true).onSuccess {
// if(it.wMemberNum > memberList.size) {
// return getGroupMemberList(groupId, true)
// }
// }
// return Result.success(memberList)
return Result.success(memberList)
} }
suspend fun getGroupList(refresh: Boolean): Result<List<TroopInfo>> { suspend fun getGroupList(refresh: Boolean): Result<List<TroopInfo>> {
val service = app.getRuntimeService(ITroopInfoService::class.java, "all") if (PlatformUtils.getQQVersionCode() <= QQ_9_0_80_VER) {
val service = app.getRuntimeService(ITroopInfoService::class.java, "all")
var troopList = service.allTroopList var troopList = service.allTroopList
if(refresh || !service.isTroopCacheInited || troopList == null) { if(refresh || !service.isTroopCacheInited || troopList == null) {
if(!requestGroupInfo(service)) { if(!requestGroupInfo(service)) {
return Result.failure(Exception("获取群列表失败")) return Result.failure(Exception("获取群列表失败"))
} else { } else {
troopList = service.allTroopList troopList = service.allTroopList
}
} }
return Result.success(troopList)
} else {
val service = QRoute.api(ITroopListRepoApi::class.java)
val troopList = service.troopListFromCache
if (troopList == null || troopList.isEmpty() || refresh) {
service.fetchTroopList(true)
return Result.success(service.troopListFromCache)
}
return Result.success(troopList)
} }
return Result.success(troopList)
} }
suspend fun getNotJoinedGroupInfo(groupId: Long): Result<NotJoinedGroupInfo> { suspend fun getNotJoinedGroupInfo(groupId: Long): Result<NotJoinedGroupInfo> {
@ -203,10 +259,10 @@ internal object GroupSvc: BaseSvc() {
toServiceMsg.extraData.putLong("troop_code", groupId) toServiceMsg.extraData.putLong("troop_code", groupId)
toServiceMsg.extraData.putBoolean("is_admin", false) toServiceMsg.extraData.putBoolean("is_admin", false)
toServiceMsg.extraData.putInt("from", 0) toServiceMsg.extraData.putInt("from", 0)
val buffer = sendAW(toServiceMsg) val fromServiceMsg = sendToServiceMsgAW(toServiceMsg) ?: return@timeout Result.failure(Exception("获取群信息超时"))
val uniPacket = UniPacket(true) val uniPacket = UniPacket(true)
uniPacket.encodeName = "utf-8" uniPacket.encodeName = "utf-8"
uniPacket.decode(buffer) uniPacket.decode(fromServiceMsg.wupBuffer)
val respBatchProcess = uniPacket.getByClass("RespBatchProcess", RespBatchProcess()) val respBatchProcess = uniPacket.getByClass("RespBatchProcess", RespBatchProcess())
val batchRespInfo = oidb_0x88d.RspBody().mergeFrom(oidb_sso.OIDBSSOPkg() val batchRespInfo = oidb_0x88d.RspBody().mergeFrom(oidb_sso.OIDBSSOPkg()
.mergeFrom(respBatchProcess.batch_response_list.first().buffer) .mergeFrom(respBatchProcess.batch_response_list.first().buffer)
@ -242,14 +298,24 @@ internal object GroupSvc: BaseSvc() {
} }
suspend fun setGroupUniqueTitle(groupId: Long, userId: Long, title: String) { suspend fun setGroupUniqueTitle(groupId: Long, userId: Long, title: String) {
val localMemberInfo = getTroopMemberInfoByUin(groupId, userId, true).getOrThrow() var nick = getTroopMemberInfoByUinV2(groupId, userId, true).getOrThrow().let {
it.troopnick.ifEmpty { it.troopremark.ifNullOrEmpty("") }
}
if (PlatformUtils.getQQVersionCode() > QQ_9_0_71_VER && nick == null) {
nick = getTroopMemberNickByUin(groupId, userId)?.let {
it.troopNick
.ifNullOrEmpty(it.friendNick)
.ifNullOrEmpty(it.showName)
.ifNullOrEmpty(it.autoRemark)
.ifNullOrEmpty(it.colorNick)
}
}
val req = Oidb_0x8fc.ReqBody() val req = Oidb_0x8fc.ReqBody()
req.uint64_group_code.set(groupId) req.uint64_group_code.set(groupId)
val memberInfo = Oidb_0x8fc.MemberInfo() val memberInfo = Oidb_0x8fc.MemberInfo()
memberInfo.uint64_uin.set(userId) memberInfo.uint64_uin.set(userId)
memberInfo.bytes_uin_name.set(ByteStringMicro.copyFromUtf8(localMemberInfo.troopnick.ifEmpty { memberInfo.bytes_uin_name.set(ByteStringMicro.copyFromUtf8(nick))
localMemberInfo.troopremark.ifNullOrEmpty("")
}))
memberInfo.bytes_special_title.set(ByteStringMicro.copyFromUtf8(title)) memberInfo.bytes_special_title.set(ByteStringMicro.copyFromUtf8(title))
memberInfo.uint32_special_title_expire_time.set(-1) memberInfo.uint32_special_title_expire_time.set(-1)
req.rpt_mem_level_info.add(memberInfo) req.rpt_mem_level_info.add(memberInfo)
@ -270,7 +336,7 @@ internal object GroupSvc: BaseSvc() {
info.dwFlag = 1 info.dwFlag = 1
createToServiceMsg.extraData.putSerializable("vecUinInfo", arrayListOf(info)) createToServiceMsg.extraData.putSerializable("vecUinInfo", arrayListOf(info))
createToServiceMsg.extraData.putLong("dwNewSeq", 0L) createToServiceMsg.extraData.putLong("dwNewSeq", 0L)
send(createToServiceMsg) sendToServiceMsg(createToServiceMsg)
return true return true
} }
@ -286,13 +352,12 @@ internal object GroupSvc: BaseSvc() {
} }
suspend fun setEssenceMessage(groupId: Long, seq: Long, rand: Long): Pair<Boolean, String> { suspend fun setEssenceMessage(groupId: Long, seq: Long, rand: Long): Pair<Boolean, String> {
val buffer = sendOidbAW("OidbSvc.0xeac_1", 3756, 1, oidb_0xeac.ReqBody().apply { val fromServiceMsg = sendOidbAW("OidbSvc.0xeac_1", 3756, 1, oidb_0xeac.ReqBody().apply {
group_code.set(groupId) group_code.set(groupId)
msg_seq.set(seq.toInt()) msg_seq.set(seq.toInt())
msg_random.set(rand.toInt()) msg_random.set(rand.toInt())
}.toByteArray()) ?: return Pair(false, "unknown error") }.toByteArray()) ?: return Pair(false, "unknown error")
val body = oidb_sso.OIDBSSOPkg() val body = fromServiceMsg.decodeToOidb()
body.mergeFrom(buffer.slice(4))
val result = oidb_0xeac.RspBody().mergeFrom(body.bytes_bodybuffer.get().toByteArray()) val result = oidb_0xeac.RspBody().mergeFrom(body.bytes_bodybuffer.get().toByteArray())
return if (result.wording.has()) { return if (result.wording.has()) {
LogCenter.log("设置群精华失败: ${result.wording.get()}") LogCenter.log("设置群精华失败: ${result.wording.get()}")
@ -304,16 +369,12 @@ internal object GroupSvc: BaseSvc() {
} }
suspend fun deleteEssenceMessage(groupId: Long, seq: Long, rand: Long): Pair<Boolean, String> { suspend fun deleteEssenceMessage(groupId: Long, seq: Long, rand: Long): Pair<Boolean, String> {
val buffer = sendOidbAW("OidbSvc.0xeac_2", 3756, 2, oidb_0xeac.ReqBody().apply { val fromServiceMsg = sendOidbAW("OidbSvc.0xeac_2", 3756, 2, oidb_0xeac.ReqBody().apply {
group_code.set(groupId) group_code.set(groupId)
msg_seq.set(seq.toInt()) msg_seq.set(seq.toInt())
msg_random.set(rand.toInt()) msg_random.set(rand.toInt())
}.toByteArray()) }.toByteArray()) ?: return Pair(false, "unknown error")
val body = oidb_sso.OIDBSSOPkg() val body = fromServiceMsg.decodeToOidb()
if (buffer == null) {
return Pair(false, "unknown error")
}
body.mergeFrom(buffer.slice(4))
val result = oidb_0xeac.RspBody().mergeFrom(body.bytes_bodybuffer.get().toByteArray()) val result = oidb_0xeac.RspBody().mergeFrom(body.bytes_bodybuffer.get().toByteArray())
return if (result.wording.has()) { return if (result.wording.has()) {
LogCenter.log("移除群精华失败: ${result.wording.get()}") LogCenter.log("移除群精华失败: ${result.wording.get()}")
@ -405,11 +466,11 @@ internal object GroupSvc: BaseSvc() {
} }
} }
return when(getTroopMemberInfoByUinViaNt(groupId, memberUin, 3000).getOrNull()?.role) { return when(getTroopMemberInfoByUinViaNt(groupId, memberUin, 3000).getOrNull()?.role) {
com.tencent.qqnt.kernel.nativeinterface.MemberRole.STRANGER -> MemberRole.Stranger com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.STRANGER -> MemberRole.Stranger
com.tencent.qqnt.kernel.nativeinterface.MemberRole.MEMBER -> MemberRole.Member com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.MEMBER -> MemberRole.Member
com.tencent.qqnt.kernel.nativeinterface.MemberRole.ADMIN -> MemberRole.Admin com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.ADMIN -> MemberRole.Admin
com.tencent.qqnt.kernel.nativeinterface.MemberRole.OWNER -> MemberRole.Owner com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.OWNER -> MemberRole.Owner
com.tencent.qqnt.kernel.nativeinterface.MemberRole.UNSPECIFIED, null -> when (memberUin) { com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.UNSPECIFIED, null -> when (memberUin) {
getOwner(groupId) -> MemberRole.Owner getOwner(groupId) -> MemberRole.Owner
in getAdminList(groupId) -> MemberRole.Admin in getAdminList(groupId) -> MemberRole.Admin
else -> MemberRole.Member else -> MemberRole.Member
@ -427,12 +488,21 @@ internal object GroupSvc: BaseSvc() {
return groupInfo.troopowneruin == app.account return groupInfo.troopowneruin == app.account
} }
fun isAdmin(groupId: Long): Boolean { suspend fun isAdmin(groupId: Long): Boolean {
if (PlatformUtils.getQQVersionCode() > QQ_9_0_71_VER) {
// 针对新版本api做的适配
val account = app.longAccountUin
getTroopMemberInfoByUinV2(groupId, account, false).onSuccess {
if (it.role == com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.ADMIN
|| it.role == com.tencent.qqnt.kernelpublic.nativeinterface.MemberRole.OWNER) {
return true
}
}
}
val service = app val service = app
.getRuntimeService(ITroopInfoService::class.java, "all") .getRuntimeService(ITroopInfoService::class.java, "all")
val groupInfo = service.getTroopInfo(groupId.toString()) val groupInfo = service.getTroopInfo(groupId.toString())
return groupInfo.isAdmin || groupInfo.troopowneruin == app.account return groupInfo.isAdmin || groupInfo.troopowneruin == app.account
} }
@ -527,65 +597,38 @@ internal object GroupSvc: BaseSvc() {
reqBody.get_ark.set(true) reqBody.get_ark.set(true)
reqBody.type.set(1) reqBody.type.set(1)
reqBody.group_code.set(groupId) reqBody.group_code.set(groupId)
val buffer = sendBufferAW("GroupSvc.JoinGroupLink", true, reqBody.toByteArray()) val fromServiceMsg = sendBufferAW("GroupSvc.JoinGroupLink", true, reqBody.toByteArray())
?: error("unable to fetch contact ark_json_text") ?: error("unable to fetch contact ark_json_text")
val body = join_group_link.RspBody() val body = fromServiceMsg.decodeToObject(join_group_link.RspBody())
body.mergeFrom(buffer.slice(4))
return body.signed_ark.get().toStringUtf8() return body.signed_ark.get().toStringUtf8()
} }
suspend fun getTroopMemberInfoByUin( fun getTroopMemberInfoByUinFromNt(
groupId: Long, groupId: Long,
uin: Long, uin: Long
refresh: Boolean = false
): Result<TroopMemberInfo> { ): Result<TroopMemberInfo> {
val service = app.getRuntimeService(ITroopMemberInfoService::class.java, "all") return kotlin.runCatching {
var info = service.getTroopMember(groupId.toString(), uin.toString()) val api = QRoute.api(ITroopMemberListRepoApi::class.java)
if (refresh || !service.isMemberInCache(groupId.toString(), uin.toString()) || info == null || info.troopnick == null) { api.getTroopMemberInfoSync(groupId.toString(), uin.toString(), null, groupId.toString())
info = requestTroopMemberInfo(service, groupId, uin).getOrNull() ?: throw Exception("获取群成员信息失败: NT兼容接口已废弃")
} }
if (info == null) { }
info = getTroopMemberInfoByUinViaNt(groupId, uin).getOrNull()?.let {
TroopMemberInfo().apply { suspend fun getTroopMemberNickByUin(
troopnick = it.cardName groupId: Long,
friendnick = it.nick uin: Long
} ): TroopMemberNickInfo? {
} if (PlatformUtils.getQQVersionCode() > QQ_9_0_71_VER) {
} val api = QRoute.api(ITroopMemberListRepoApi::class.java)
try { return withTimeoutOrNull(5.seconds) {
if (info != null && (info.alias == null || info.alias.isBlank())) { suspendCancellableCoroutine<TroopMemberNickInfo> { continuation ->
val req = group_member_info.ReqBody() api.fetchTroopMemberName(groupId.toString(), uin.toString(), null, groupId.toString()) {
req.uint64_group_code.set(groupId) continuation.resume(it)
req.uint64_uin.set(uin.toLong())
req.bool_new_client.set(true)
req.uint32_client_type.set(1)
req.uint32_rich_card_name_ver.set(1)
val respBuffer = sendBufferAW("group_member_card.get_group_member_card_info", true, req.toByteArray())
if (respBuffer != null) {
val rsp = group_member_info.RspBody()
rsp.mergeFrom(respBuffer.slice(4))
if (rsp.msg_meminfo.str_location.has()) {
info.alias = rsp.msg_meminfo.str_location.get().toStringUtf8()
}
if (rsp.msg_meminfo.uint32_age.has()) {
info.age = rsp.msg_meminfo.uint32_age.get().toByte()
}
if (rsp.msg_meminfo.bytes_group_honor.has()) {
val honorBytes = rsp.msg_meminfo.bytes_group_honor.get().toByteArray()
val honor = troop_honor.GroupUserCardHonor()
honor.mergeFrom(honorBytes)
info.level = honor.level.get()
// 10315: medal_id not real group level
} }
} }
} }
} catch (err: Throwable) {
LogCenter.log(err.stackTraceToString(), Level.WARN)
}
return if (info != null) {
Result.success(info)
} else { } else {
Result.failure(Exception("获取群成员信息失败")) return null
} }
} }
@ -594,10 +637,15 @@ internal object GroupSvc: BaseSvc() {
uin: Long, uin: Long,
refresh: Boolean = false refresh: Boolean = false
): Result<TroopMemberInfo> { ): Result<TroopMemberInfo> {
val service = app.getRuntimeService(ITroopMemberInfoService::class.java, "all") var info: TroopMemberInfo? = null
var info = service.getTroopMember(groupId.toString(), uin.toString()) if (PlatformUtils.getQQVersionCode() <= QQ_9_0_71_VER) {
if (refresh || !service.isMemberInCache(groupId.toString(), uin.toString()) || info == null || info.troopnick == null) { val service = app.getRuntimeService(ITroopMemberInfoService::class.java, "all")
info = requestTroopMemberInfo(service, groupId, uin, timeout = 2000).getOrNull() info = service.getTroopMember(groupId.toString(), uin.toString())
if (refresh || !service.isMemberInCache(groupId.toString(), uin.toString()) || info == null || info.troopnick == null) {
info = requestTroopMemberInfo(service, groupId, uin, timeout = 2000).getOrNull()
}
} else {
info = getTroopMemberInfoByUinFromNt(groupId, uin).getOrNull()
} }
if (info == null) { if (info == null) {
info = getTroopMemberInfoByUinViaNt(groupId, uin, timeout = 2000L).getOrNull()?.let { info = getTroopMemberInfoByUinViaNt(groupId, uin, timeout = 2000L).getOrNull()?.let {
@ -607,35 +655,36 @@ internal object GroupSvc: BaseSvc() {
} }
} }
} }
try { if (PlatformUtils.getQQVersionCode() <= QQ_9_0_8_VER) {
if (info != null && (info.alias == null || info.alias.isBlank())) { try {
val req = group_member_info.ReqBody() if (info != null && (info.alias == null || info.alias.isBlank())) {
req.uint64_group_code.set(groupId) val req = group_member_info.ReqBody()
req.uint64_uin.set(uin) req.uint64_group_code.set(groupId)
req.bool_new_client.set(true) req.uint64_uin.set(uin)
req.uint32_client_type.set(1) req.bool_new_client.set(true)
req.uint32_rich_card_name_ver.set(1) req.uint32_client_type.set(1)
val respBuffer = sendBufferAW("group_member_card.get_group_member_card_info", true, req.toByteArray(), timeout = 2000) req.uint32_rich_card_name_ver.set(1)
if (respBuffer != null) { val respBuffer = sendBufferAW("group_member_card.get_group_member_card_info", true, req.toByteArray(), timeout = 2.seconds)
val rsp = group_member_info.RspBody() if (respBuffer != null) {
rsp.mergeFrom(respBuffer.slice(4)) val rsp = respBuffer.decodeToObject(group_member_info.RspBody())
if (rsp.msg_meminfo.str_location.has()) { if (rsp.msg_meminfo.str_location.has()) {
info.alias = rsp.msg_meminfo.str_location.get().toStringUtf8() info.alias = rsp.msg_meminfo.str_location.get().toStringUtf8()
} }
if (rsp.msg_meminfo.uint32_age.has()) { if (rsp.msg_meminfo.uint32_age.has()) {
info.age = rsp.msg_meminfo.uint32_age.get().toByte() info.age = rsp.msg_meminfo.uint32_age.get().toByte()
} }
if (rsp.msg_meminfo.bytes_group_honor.has()) { if (rsp.msg_meminfo.bytes_group_honor.has()) {
val honorBytes = rsp.msg_meminfo.bytes_group_honor.get().toByteArray() val honorBytes = rsp.msg_meminfo.bytes_group_honor.get().toByteArray()
val honor = troop_honor.GroupUserCardHonor() val honor = troop_honor.GroupUserCardHonor()
honor.mergeFrom(honorBytes) honor.mergeFrom(honorBytes)
info.level = honor.level.get() info.level = honor.level.get()
// 10315: medal_id not real group level // 10315: medal_id not real group level
}
} }
} }
} catch (err: Throwable) {
LogCenter.log(err.stackTraceToString(), Level.WARN)
} }
} catch (err: Throwable) {
LogCenter.log(err.stackTraceToString(), Level.WARN)
} }
return if (info != null) { return if (info != null) {
Result.success(info) Result.success(info)
@ -644,7 +693,7 @@ internal object GroupSvc: BaseSvc() {
} }
} }
suspend fun getTroopMemberInfoByUinViaNt( private suspend fun getTroopMemberInfoByUinViaNt(
groupId: Long, groupId: Long,
qq: Long, qq: Long,
timeout: Long = 5000L timeout: Long = 5000L
@ -673,7 +722,7 @@ internal object GroupSvc: BaseSvc() {
return if (info != null) { return if (info != null) {
Result.success(info) Result.success(info)
} else { } else {
Result.failure(Exception("获取群成员信息失败")) Result.failure(Exception("[NT]获取群成员信息失败"))
} }
} }
} }
@ -895,7 +944,7 @@ internal object GroupSvc: BaseSvc() {
} }
val respBuffer = sendBufferAW("ProfileService.Pb.ReqSystemMsgAction.Group", true, req.toByteArray()) val respBuffer = sendBufferAW("ProfileService.Pb.ReqSystemMsgAction.Group", true, req.toByteArray())
?: return Result.failure(Exception("操作失败")) ?: return Result.failure(Exception("操作失败"))
val rsp = structmsg.RspSystemMsgAction().mergeFrom(respBuffer.slice(4)) val rsp = respBuffer.decodeToObject(structmsg.RspSystemMsgAction())
return if (rsp.head.result.has()) { return if (rsp.head.result.has()) {
if (rsp.head.result.get() == 0) { if (rsp.head.result.get() == 0) {
Result.success(rsp.msg_detail.get()) Result.success(rsp.msg_detail.get())
@ -946,8 +995,7 @@ internal object GroupSvc: BaseSvc() {
ArrayList() ArrayList()
} else { } else {
try { try {
val msg = structmsg.RspSystemMsgNew() val msg = respBuffer.decodeToObject(structmsg.RspSystemMsgNew())
msg.mergeFrom(respBuffer.slice(4))
return msg.groupmsgs.get().orEmpty() return msg.groupmsgs.get().orEmpty()
} catch (err: Throwable) { } catch (err: Throwable) {
requestGroupSystemMsgNew(msgNum, reqMsgType, latestFriendSeq, latestGroupSeq, retryCnt - 1) requestGroupSystemMsgNew(msgNum, reqMsgType, latestFriendSeq, latestGroupSeq, retryCnt - 1)
@ -1140,8 +1188,7 @@ internal object GroupSvc: BaseSvc() {
return if (buffer == null) { return if (buffer == null) {
Result.failure(Exception("操作失败")) Result.failure(Exception("操作失败"))
} else { } else {
val body = oidb_sso.OIDBSSOPkg() val body = buffer.decodeToOidb()
body.mergeFrom(buffer.slice(4))
val rsp = oidb_0xeb7.RspBody() val rsp = oidb_0xeb7.RspBody()
rsp.mergeFrom(body.bytes_bodybuffer.get().toByteArray()) rsp.mergeFrom(body.bytes_bodybuffer.get().toByteArray())
val doneInfo = rsp.signInWriteRsp.doneInfo val doneInfo = rsp.signInWriteRsp.doneInfo

View File

@ -2,13 +2,16 @@ package moe.fuqiuluo.qqinterface.servlet
import com.tencent.biz.map.trpcprotocol.LbsSendInfo import com.tencent.biz.map.trpcprotocol.LbsSendInfo
import com.tencent.mobileqq.msf.core.MsfCore import com.tencent.mobileqq.msf.core.MsfCore
import com.tencent.mobileqq.msf.service.MsfService
import com.tencent.proto.lbsshare.LBSShare import com.tencent.proto.lbsshare.LBSShare
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
import moe.fuqiuluo.shamrock.helper.IllegalParamsException import moe.fuqiuluo.shamrock.helper.IllegalParamsException
import moe.fuqiuluo.shamrock.tools.decodeToObject
import moe.fuqiuluo.shamrock.tools.slice import moe.fuqiuluo.shamrock.tools.slice
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import kotlin.math.roundToInt import kotlin.math.roundToInt
internal object LbsSvc: BaseSvc() { internal object LbsSvc: QQInterfaces() {
suspend fun tryShareLocation(chatType: Int, peerId: Long, lat: Double, lon: Double): Result<Unit> { suspend fun tryShareLocation(chatType: Int, peerId: Long, lat: Double, lon: Double): Result<Unit> {
val req = LbsSendInfo.SendMessageReq() val req = LbsSendInfo.SendMessageReq()
req.uint64_peer_account.set(peerId) req.uint64_peer_account.set(peerId)
@ -23,8 +26,8 @@ internal object LbsSvc: BaseSvc() {
}.getOrNull()) }.getOrNull())
req.str_lat.set(lat.toString()) req.str_lat.set(lat.toString())
req.str_lng.set(lon.toString()) req.str_lng.set(lon.toString())
sendPb("trpc.qq_lbs.qq_lbs_ark.LocationArk.SsoSendMessage", req.toByteArray(), MsfCore.getNextSeq()) sendBuffer("trpc.qq_lbs.qq_lbs_ark.LocationArk.SsoSendMessage", true, req.toByteArray())
//sendPb("trpc.qq_lbs.qq_lbs_ark.LocationArk.SsoSendMessage", req.toByteArray(), MsfService.getCore().nextSeq)
return Result.success(Unit) return Result.success(Unit)
} }
@ -49,8 +52,7 @@ internal object LbsSvc: BaseSvc() {
req.imei.set("") req.imei.set("")
val buffer = sendBufferAW("LbsShareSvr.location", true, req.toByteArray()) val buffer = sendBufferAW("LbsShareSvr.location", true, req.toByteArray())
?: return Result.failure(Exception("获取位置失败")) ?: return Result.failure(Exception("获取位置失败"))
val resp = LBSShare.LocationResp() val resp = buffer.decodeToObject(LBSShare.LocationResp())
resp.mergeFrom(buffer.slice(4))
val location = resp.mylbs val location = resp.mylbs
return Result.success(location.addr.get()) return Result.success(location.addr.get())
} }

View File

@ -24,6 +24,7 @@ import moe.fuqiuluo.shamrock.remote.structures.SendMsgResult
import moe.fuqiuluo.shamrock.tools.* import moe.fuqiuluo.shamrock.tools.*
import moe.fuqiuluo.shamrock.utils.DeflateTools import moe.fuqiuluo.shamrock.utils.DeflateTools
import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import moe.fuqiuluo.shamrock.xposed.helper.msgService import moe.fuqiuluo.shamrock.xposed.helper.msgService
import moe.fuqiuluo.symbols.decodeProtobuf import moe.fuqiuluo.symbols.decodeProtobuf
import protobuf.auto.toByteArray import protobuf.auto.toByteArray
@ -33,9 +34,10 @@ import java.util.*
import kotlin.coroutines.resume import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine import kotlin.coroutines.suspendCoroutine
import kotlin.random.Random import kotlin.random.Random
import kotlin.time.Duration.Companion.seconds
internal object MsgSvc : BaseSvc() { internal object MsgSvc : QQInterfaces() {
private suspend fun prepareTempChatFromGroup( suspend fun prepareTempChatFromGroup(
groupId: String, groupId: String,
peerId: String peerId: String
): Result<Unit> { ): Result<Unit> {
@ -418,13 +420,9 @@ internal object MsgSvc : BaseSvc() {
) )
).toByteArray() ).toByteArray()
val buffer = sendBufferAW("trpc.group.long_msg_interface.MsgService.SsoSendLongMsg", true, req, timeout = 30_000) val buffer = sendBufferAW("trpc.group.long_msg_interface.MsgService.SsoSendLongMsg", true, req, timeout = 30.seconds)
?: return Result.failure(Exception("unable to upload multi message, response timeout")) ?: return Result.failure(Exception("unable to upload multi message, response timeout"))
val rsp = runCatching { val rsp = buffer.decodeToObject<LongMsgRsp>()
buffer.slice(4).decodeProtobuf<LongMsgRsp>()
}.getOrElse {
buffer.decodeProtobuf<LongMsgRsp>()
}
val resId = rsp.sendResult?.resId ?: return Result.failure(Exception("unable to upload multi message")) val resId = rsp.sendResult?.resId ?: return Result.failure(Exception("unable to upload multi message"))
return Result.success(MessageSegment( return Result.success(MessageSegment(
type = "forward", type = "forward",
@ -456,7 +454,7 @@ internal object MsgSvc : BaseSvc() {
true, true,
req.toByteArray() req.toByteArray()
) ?: return Result.failure(Exception("unable to get multi message")) ) ?: return Result.failure(Exception("unable to get multi message"))
val rsp = buffer.slice(4).decodeProtobuf<LongMsgRsp>() val rsp = buffer.decodeToObject<LongMsgRsp>()
val zippedPayload = DeflateTools.ungzip( val zippedPayload = DeflateTools.ungzip(
rsp.recvResult?.payload ?: return Result.failure(Exception("payload is empty")) rsp.recvResult?.payload ?: return Result.failure(Exception("payload is empty"))
) )

View File

@ -1,8 +1,8 @@
package moe.fuqiuluo.qqinterface.servlet package moe.fuqiuluo.qqinterface.servlet
import com.tencent.qqnt.kernel.nativeinterface.Contact
import com.tencent.qqnt.kernel.nativeinterface.IKernelMsgService import com.tencent.qqnt.kernel.nativeinterface.IKernelMsgService
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
import com.tencent.qqnt.kernelpublic.nativeinterface.Contact
import io.ktor.utils.io.core.BytePacketBuilder import io.ktor.utils.io.core.BytePacketBuilder
import io.ktor.utils.io.core.readBytes import io.ktor.utils.io.core.readBytes
import io.ktor.utils.io.core.writeFully import io.ktor.utils.io.core.writeFully
@ -13,6 +13,7 @@ import moe.fuqiuluo.qqinterface.servlet.msg.MessageTempHandler
import moe.fuqiuluo.shamrock.remote.action.handlers.GetHistoryMsg import moe.fuqiuluo.shamrock.remote.action.handlers.GetHistoryMsg
import moe.fuqiuluo.shamrock.tools.broadcast import moe.fuqiuluo.shamrock.tools.broadcast
import moe.fuqiuluo.shamrock.utils.DeflateTools import moe.fuqiuluo.shamrock.utils.DeflateTools
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import mqq.app.MobileQQ import mqq.app.MobileQQ
import protobuf.auto.toByteArray import protobuf.auto.toByteArray
import protobuf.message.* import protobuf.message.*
@ -21,7 +22,7 @@ import protobuf.push.MessagePush
import kotlin.coroutines.resume import kotlin.coroutines.resume
import kotlin.text.toByteArray import kotlin.text.toByteArray
internal object PacketSvc : BaseSvc() { internal object PacketSvc : QQInterfaces() {
/** /**
* 伪造收到Json卡片消息 * 伪造收到Json卡片消息
*/ */

View File

@ -23,6 +23,7 @@ import moe.fuqiuluo.shamrock.tools.toHexString
import moe.fuqiuluo.shamrock.utils.DeflateTools import moe.fuqiuluo.shamrock.utils.DeflateTools
import moe.fuqiuluo.shamrock.utils.MD5 import moe.fuqiuluo.shamrock.utils.MD5
import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher
import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import protobuf.fav.WeiyunAddRichMediaReq import protobuf.fav.WeiyunAddRichMediaReq
import protobuf.fav.WeiyunAuthor import protobuf.fav.WeiyunAuthor
import protobuf.fav.WeiyunCollectCommInfo import protobuf.fav.WeiyunCollectCommInfo
@ -49,7 +50,7 @@ import kotlin.coroutines.resume
/** /**
* QQ收藏相关接口 * QQ收藏相关接口
*/ */
internal object QFavSvc: BaseSvc() { internal object QFavSvc: QQInterfaces() {
private val SERVER_LIST_COLLECTOR = listOf(ServerAddr().also { private val SERVER_LIST_COLLECTOR = listOf(ServerAddr().also {
it.isIpv6 = false it.isIpv6 = false
it.mIp = "collector.weiyun.com" it.mIp = "collector.weiyun.com"
@ -275,7 +276,7 @@ internal object QFavSvc: BaseSvc() {
override fun onUpdateProgeress(netReq: NetReq, curr: Long, final: Long) {} override fun onUpdateProgeress(netReq: NetReq, curr: Long, final: Long) {}
} }
val vi = (app.getManager(QQAppInterface.TICKET_MANAGER) as TicketManager).getA2(app.currentAccountUin) val vi = ((app as QQAppInterface).getManager(QQAppInterface.TICKET_MANAGER) as TicketManager).getA2(app.currentAccountUin)
//LogCenter.log(pSKey) //LogCenter.log(pSKey)
httpNetReq.mHttpMethod = HttpNetReq.HTTP_POST httpNetReq.mHttpMethod = HttpNetReq.HTTP_POST
httpNetReq.mSendData = BytePacketBuilder().apply { httpNetReq.mSendData = BytePacketBuilder().apply {
@ -381,7 +382,7 @@ internal object QFavSvc: BaseSvc() {
} }
private fun getWeiYunPSKey(): String { private fun getWeiYunPSKey(): String {
val pskey = (app.getManager(QQAppInterface.TICKET_MANAGER) as TicketManager) val pskey = ((app as QQAppInterface).getManager(QQAppInterface.TICKET_MANAGER) as TicketManager)
.getPskey(app.currentAccountUin, 16L, arrayOf("weiyun.com"), WeiYunPSKeyPromise) .getPskey(app.currentAccountUin, 16L, arrayOf("weiyun.com"), WeiYunPSKeyPromise)
return if (pskey != null) pskey.getPSkey("weiyun.com") else "" return if (pskey != null) pskey.getPSkey("weiyun.com") else ""
} }

View File

@ -4,12 +4,12 @@ import QQService.SvcDevLoginInfo
import QQService.SvcReqGetDevLoginInfo import QQService.SvcReqGetDevLoginInfo
import QQService.SvcRspGetDevLoginInfo import QQService.SvcRspGetDevLoginInfo
import com.qq.jce.wup.UniPacket import com.qq.jce.wup.UniPacket
import moe.fuqiuluo.qqinterface.servlet.BaseSvc import moe.fuqiuluo.shamrock.xposed.helper.QQInterfaces
import mqq.app.MobileQQ import mqq.app.MobileQQ
import mqq.app.Packet import mqq.app.Packet
import oicq.wlogin_sdk.tools.util import oicq.wlogin_sdk.tools.util
internal object QSafeSvc: BaseSvc() { internal object QSafeSvc: QQInterfaces() {
suspend fun getOnlineClients(): ArrayList<SvcDevLoginInfo>? { suspend fun getOnlineClients(): ArrayList<SvcDevLoginInfo>? {
val req = SvcReqGetDevLoginInfo() val req = SvcReqGetDevLoginInfo()
@ -26,7 +26,7 @@ internal object QSafeSvc: BaseSvc() {
val resp = sendBufferAW("StatSvc.GetDevLoginInfo", false, uniPacket.encode()) val resp = sendBufferAW("StatSvc.GetDevLoginInfo", false, uniPacket.encode())
?: return null ?: return null
return Packet.decodePacket(resp, "SvcRspGetDevLoginInfo", SvcRspGetDevLoginInfo()).vecCurrentLoginDevInfo return Packet.decodePacket(resp.wupBuffer, "SvcRspGetDevLoginInfo", SvcRspGetDevLoginInfo()).vecCurrentLoginDevInfo
} }

Some files were not shown because too many files have changed in this diff Show More