mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: Gwellekaat dilemel ar restr strollad
This commit is contained in:
parent
b9c2de744e
commit
2af8d6d817
@ -24,7 +24,7 @@ android {
|
|||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
versionCode = (System.currentTimeMillis() / 1000).toInt()
|
versionCode = (System.currentTimeMillis() / 1000).toInt()
|
||||||
versionName = "1.0.5-dev" + gitCommitHash()
|
versionName = "1.0.6-dev" + gitCommitHash()
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables {
|
vectorDrawables {
|
||||||
@ -66,6 +66,7 @@ android {
|
|||||||
create("app") {
|
create("app") {
|
||||||
dimension = "mode"
|
dimension = "mode"
|
||||||
ndk {
|
ndk {
|
||||||
|
println("Full architecture and full compilation.")
|
||||||
abiFilters.add("arm64-v8a")
|
abiFilters.add("arm64-v8a")
|
||||||
abiFilters.add("x86_64")
|
abiFilters.add("x86_64")
|
||||||
}
|
}
|
||||||
@ -73,12 +74,14 @@ android {
|
|||||||
create("arm64") {
|
create("arm64") {
|
||||||
dimension = "mode"
|
dimension = "mode"
|
||||||
ndk {
|
ndk {
|
||||||
|
println("Full compilation of arm64 architecture")
|
||||||
abiFilters.add("arm64-v8a")
|
abiFilters.add("arm64-v8a")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
create("x64") {
|
create("x64") {
|
||||||
dimension = "mode"
|
dimension = "mode"
|
||||||
ndk {
|
ndk {
|
||||||
|
println("Full compilation of x64 architecture")
|
||||||
abiFilters.add("x86_64")
|
abiFilters.add("x86_64")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package com.tencent.qqnt.kernel.nativeinterface;
|
package com.tencent.qqnt.kernel.nativeinterface;
|
||||||
|
|
||||||
/* compiled from: P */
|
|
||||||
/* loaded from: classes2.dex */
|
|
||||||
public final class GroupFileCommonResult {
|
public final class GroupFileCommonResult {
|
||||||
String clientWording;
|
String clientWording;
|
||||||
int retCode;
|
int retCode;
|
||||||
@ -29,8 +27,6 @@ public final class GroupFileCommonResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GroupFileCommonResult(int i2, String str, String str2) {
|
public GroupFileCommonResult(int i2, String str, String str2) {
|
||||||
this.retMsg = "";
|
|
||||||
this.clientWording = "";
|
|
||||||
this.retCode = i2;
|
this.retCode = i2;
|
||||||
this.retMsg = str;
|
this.retMsg = str;
|
||||||
this.clientWording = str2;
|
this.clientWording = str2;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package com.tencent.qqnt.kernel.nativeinterface;
|
package com.tencent.qqnt.kernel.nativeinterface;
|
||||||
|
|
||||||
public interface IDeleteGroupFileCallback {
|
public interface IDeleteGroupFileCallback {
|
||||||
void onResult(int i2, String str, DeleteGroupFileResult deleteGroupFileResult);
|
void onResult(int code, String why, DeleteGroupFileResult result);
|
||||||
}
|
}
|
@ -9,7 +9,7 @@ public interface IKernelRichMediaService {
|
|||||||
|
|
||||||
void cancelTransferTask(Contact contact, ArrayList<Long> arrayList, ArrayList<Integer> arrayList2, IOperateTransferInfoCallback iOperateTransferInfoCallback);
|
void cancelTransferTask(Contact contact, ArrayList<Long> arrayList, ArrayList<Integer> arrayList2, IOperateTransferInfoCallback iOperateTransferInfoCallback);
|
||||||
|
|
||||||
void deleteGroupFile(long j2, String str, int i2, IDeleteGroupFileCallback iDeleteGroupFileCallback);
|
void deleteGroupFile(long groupCode, String fileUid, int bizId, IDeleteGroupFileCallback cb);
|
||||||
|
|
||||||
void deleteTransferInfo(Contact contact, ArrayList<Long> arrayList, IOperateTransferInfoCallback iOperateTransferInfoCallback);
|
void deleteTransferInfo(Contact contact, ArrayList<Long> arrayList, IOperateTransferInfoCallback iOperateTransferInfoCallback);
|
||||||
|
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
package moe.fuqiuluo.qqinterface.servlet
|
package moe.fuqiuluo.qqinterface.servlet
|
||||||
|
|
||||||
import com.tencent.mobileqq.pb.ByteStringMicro
|
import com.tencent.mobileqq.pb.ByteStringMicro
|
||||||
|
import com.tencent.qqnt.kernel.nativeinterface.DeleteGroupFileResult
|
||||||
|
import com.tencent.qqnt.kernel.nativeinterface.GroupFileCommonResult
|
||||||
|
import com.tencent.qqnt.kernel.nativeinterface.IDeleteGroupFileCallback
|
||||||
import io.ktor.util.Deflate
|
import io.ktor.util.Deflate
|
||||||
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
|
import kotlinx.coroutines.withTimeoutOrNull
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import moe.fuqiuluo.proto.protobufOf
|
import moe.fuqiuluo.proto.protobufOf
|
||||||
@ -12,8 +17,11 @@ import moe.fuqiuluo.shamrock.tools.EMPTY_BYTE_ARRAY
|
|||||||
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.NTServiceFetcher
|
||||||
import tencent.im.oidb.cmd0x6d8.oidb_0x6d8
|
import tencent.im.oidb.cmd0x6d8.oidb_0x6d8
|
||||||
import tencent.im.oidb.oidb_sso
|
import tencent.im.oidb.oidb_sso
|
||||||
|
import kotlin.coroutines.resume
|
||||||
|
import kotlin.coroutines.suspendCoroutine
|
||||||
|
|
||||||
internal object FileSvc: BaseSvc() {
|
internal object FileSvc: BaseSvc() {
|
||||||
fun createFileFolder(groupId: String, folderName: String) {
|
fun createFileFolder(groupId: String, folderName: String) {
|
||||||
@ -38,6 +46,21 @@ internal object FileSvc: BaseSvc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun deleteGroupFile(groupId: String, bizId: Int, fileUid: String) {
|
fun deleteGroupFile(groupId: String, bizId: Int, fileUid: String) {
|
||||||
|
/*
|
||||||
|
val kernelService = NTServiceFetcher.kernelService
|
||||||
|
val sessionService = kernelService.wrapperSession
|
||||||
|
val richMediaService = sessionService.richMediaService
|
||||||
|
|
||||||
|
val result = withTimeoutOrNull(3000L) {
|
||||||
|
suspendCancellableCoroutine {
|
||||||
|
richMediaService.deleteGroupFile(groupId.toLong(), fileUid, bizId) { code, _, result ->
|
||||||
|
it.resume(code to result.result)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return if (result == null) Result.failure(RuntimeException("delete group file timeout")) else Result.success(result)*/
|
||||||
|
// 调用QQ内部实现会导致闪退!
|
||||||
sendOidb("OidbSvc.0x6d6_3", 1750, 3, protobufOf(
|
sendOidb("OidbSvc.0x6d6_3", 1750, 3, protobufOf(
|
||||||
4 to mapOf(
|
4 to mapOf(
|
||||||
1 to groupId.toLong(),
|
1 to groupId.toLong(),
|
||||||
|
@ -14,10 +14,30 @@ internal object DeleteGroupFile: IActionHandler() {
|
|||||||
return invoke(groupId, fileId, busid, session.echo)
|
return invoke(groupId, fileId, busid, session.echo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
suspend operator fun invoke(
|
||||||
|
groupId: String,
|
||||||
|
fileId: String,
|
||||||
|
bizId: Int,
|
||||||
|
echo: JsonElement = EmptyJsonString
|
||||||
|
): String {
|
||||||
|
val result = FileSvc.deleteGroupFile(groupId, bizId, fileId)
|
||||||
|
if(result.isFailure) {
|
||||||
|
return error(result.exceptionOrNull()?.message ?: "删除群文件失败", echo)
|
||||||
|
}
|
||||||
|
val commonResult = result.getOrThrow()
|
||||||
|
if (commonResult.first != 0 || commonResult.second.retCode != 0) {
|
||||||
|
return error(commonResult.second.clientWording, echo)
|
||||||
|
}
|
||||||
|
return ok("成功", echo)
|
||||||
|
}
|
||||||
|
*/
|
||||||
operator fun invoke(groupId: String, fileId: String, bizId: Int, echo: JsonElement = EmptyJsonString): String {
|
operator fun invoke(groupId: String, fileId: String, bizId: Int, echo: JsonElement = EmptyJsonString): String {
|
||||||
FileSvc.deleteGroupFile(groupId, bizId, fileId)
|
FileSvc.deleteGroupFile(groupId, bizId, fileId)
|
||||||
return ok("成功", echo)
|
return ok("成功", echo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val requiredParams: Array<String> = arrayOf("group_id", "file_id", "busid")
|
||||||
|
|
||||||
override fun path(): String = "delete_group_file"
|
override fun path(): String = "delete_group_file"
|
||||||
}
|
}
|
@ -52,7 +52,7 @@ internal object PrimitiveListener {
|
|||||||
) return
|
) return
|
||||||
val msgType = pb[1, 2, 1].asInt
|
val msgType = pb[1, 2, 1].asInt
|
||||||
var subType = 0
|
var subType = 0
|
||||||
if (pb.has(1, 2, 3)) {
|
if (pb.has(1, 2, 3) && pb.has(1, 2, 2)) {
|
||||||
subType = pb[1, 2, 2].asInt
|
subType = pb[1, 2, 2].asInt
|
||||||
}
|
}
|
||||||
val msgTime = pb[1, 2, 6].asLong
|
val msgTime = pb[1, 2, 6].asLong
|
||||||
|
Loading…
x
Reference in New Issue
Block a user