mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Merge remote-tracking branch 'origin/kotlin-1.3.70' into kotlin-1.3.70
This commit is contained in:
commit
33d562a296
@ -71,7 +71,7 @@ If you meet any problem or have any questions, be free to open a issue. Our goal
|
||||
|
||||
## Requirements
|
||||
|
||||
Kotlin 1.3.70
|
||||
Kotlin 1.3.61
|
||||
|
||||
On JVM: Java 6
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
## 构建需求
|
||||
|
||||
- Kotlin 1.3.70 (必须)
|
||||
- Kotlin 1.3.61 (必须)
|
||||
- JDK 6 或更高 (必须)
|
||||
- Android SDK 29 (可选, 用于编译安卓目标)
|
||||
|
||||
|
@ -5,9 +5,9 @@ miraiVersion=0.24.1
|
||||
kotlin.incremental.multiplatform=true
|
||||
kotlin.parallel.tasks.in.project=true
|
||||
# kotlin
|
||||
kotlinVersion=1.3.70
|
||||
kotlinVersion=1.3.61
|
||||
# kotlin libraries
|
||||
serializationVersion=0.20.0-1.3.70-eap-274-2
|
||||
serializationVersion=0.14.0
|
||||
coroutinesVersion=1.3.3
|
||||
atomicFuVersion=0.14.1
|
||||
coroutinesIoVersion=0.1.16
|
||||
|
@ -59,7 +59,6 @@ kotlin {
|
||||
languageSettings.enableLanguageFeature("InlineClasses")
|
||||
|
||||
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
|
||||
languageSettings.useExperimentalAnnotation("kotlin.OptIn")
|
||||
|
||||
dependencies {
|
||||
api(project(":mirai-core"))
|
||||
@ -74,7 +73,6 @@ kotlin {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(kotlinx("serialization-runtime-common", serializationVersion))
|
||||
api(kotlinx("serialization-protobuf-common", serializationVersion))
|
||||
}
|
||||
}
|
||||
commonTest {
|
||||
@ -88,7 +86,6 @@ kotlin {
|
||||
if (isAndroidSDKAvailable) {
|
||||
val androidMain by getting {
|
||||
dependencies {
|
||||
api(kotlinx("serialization-protobuf", serializationVersion))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
actual object QQAndroid : BotFactory {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@JvmName("newBot")
|
||||
actual override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
|
||||
return QQAndroidBot(context, BotAccount(qq, password), configuration)
|
||||
@ -30,7 +30,7 @@ actual object QQAndroid : BotFactory {
|
||||
/**
|
||||
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@JvmName("newBot")
|
||||
actual override fun Bot(
|
||||
context: Context,
|
||||
|
@ -14,7 +14,7 @@ import net.mamoe.mirai.utils.BotConfiguration
|
||||
import net.mamoe.mirai.utils.Context
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal actual class QQAndroidBot
|
||||
actual constructor(
|
||||
context: Context,
|
||||
|
@ -367,7 +367,7 @@ internal fun GroupImpl.Companion.checkIsInstance(expression: Boolean) {
|
||||
}
|
||||
|
||||
@Suppress("PropertyName")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal class GroupImpl(
|
||||
bot: QQAndroidBot, override val coroutineContext: CoroutineContext,
|
||||
override val id: Long,
|
||||
@ -383,7 +383,7 @@ internal class GroupImpl(
|
||||
|
||||
override lateinit var owner: Member
|
||||
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
override val botAsMember: Member by lazy {
|
||||
Member(object : MemberInfo {
|
||||
override val nameCard: String
|
||||
@ -401,7 +401,7 @@ internal class GroupImpl(
|
||||
})
|
||||
}
|
||||
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
override lateinit var botPermission: MemberPermission
|
||||
|
||||
var _botMuteTimestamp: Int = groupInfo.botMuteRemaining
|
||||
@ -557,10 +557,10 @@ internal class GroupImpl(
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
override fun Member(memberInfo: MemberInfo): Member {
|
||||
return MemberImpl(
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
bot._lowLevelNewQQ(memberInfo) as QQImpl,
|
||||
this,
|
||||
this.coroutineContext,
|
||||
|
@ -28,22 +28,22 @@ import net.mamoe.mirai.qqandroid.message.OnlineFriendImageImpl
|
||||
import net.mamoe.mirai.qqandroid.message.OnlineGroupImageImpl
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.FriendList
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.PbMessageSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.TroopManagement
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.utils.*
|
||||
import kotlin.collections.asSequence
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal expect class QQAndroidBot constructor(
|
||||
context: Context,
|
||||
account: BotAccount,
|
||||
configuration: BotConfiguration
|
||||
) : QQAndroidBotBase
|
||||
|
||||
@OptIn(MiraiInternalAPI::class, MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, MiraiExperimentalAPI::class)
|
||||
internal abstract class QQAndroidBotBase constructor(
|
||||
context: Context,
|
||||
account: BotAccount,
|
||||
@ -69,7 +69,7 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
override val friends: ContactList<QQ> = ContactList(LockFreeLinkedList())
|
||||
|
||||
override val selfQQ: QQ by lazy {
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
_lowLevelNewQQ(object : FriendInfo {
|
||||
override val uin: Long get() = this@QQAndroidBotBase.uin
|
||||
override val nick: String get() = this@QQAndroidBotBase.nick
|
||||
@ -101,7 +101,7 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
return groups.delegate.getOrNull(uin)
|
||||
}
|
||||
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
override suspend fun _lowLevelQueryGroupList(): Sequence<Long> {
|
||||
return network.run {
|
||||
FriendList.GetTroopListSimplify(bot.client)
|
||||
@ -109,7 +109,7 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
}.groups.asSequence().map { it.groupUin.shl(32) and it.groupCode }
|
||||
}
|
||||
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
override suspend fun _lowLevelQueryGroupInfo(groupCode: Long): GroupInfo = network.run {
|
||||
TroopManagement.GetGroupInfo(
|
||||
client = bot.client,
|
||||
@ -117,7 +117,7 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
).sendAndExpect<GroupInfoImpl>(retry = 2)
|
||||
}
|
||||
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
override suspend fun _lowLevelQueryGroupMemberList(
|
||||
groupUin: Long,
|
||||
groupCode: Long,
|
||||
@ -187,7 +187,7 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
override suspend fun _lowLevelRecallFriendMessage(friendId: Long, messageId: Long, time: Long) {
|
||||
network.run {
|
||||
val response: PbMessageSvc.PbMsgWithDraw.Response =
|
||||
@ -198,7 +198,7 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
override suspend fun _lowLevelRecallGroupMessage(groupId: Long, messageId: Long) {
|
||||
network.run {
|
||||
val response: PbMessageSvc.PbMsgWithDraw.Response =
|
||||
|
@ -12,14 +12,9 @@ package net.mamoe.mirai.qqandroid.io.serialization
|
||||
import io.ktor.utils.io.charsets.Charset
|
||||
import io.ktor.utils.io.core.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.builtins.ByteArraySerializer
|
||||
import kotlinx.serialization.builtins.MapEntrySerializer
|
||||
import kotlinx.serialization.builtins.SetSerializer
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlinx.serialization.internal.*
|
||||
import kotlinx.serialization.modules.EmptyModule
|
||||
import kotlinx.serialization.modules.SerialModule
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.utils.io.readString
|
||||
@ -27,7 +22,6 @@ import net.mamoe.mirai.utils.io.toReadPacket
|
||||
|
||||
@PublishedApi
|
||||
internal val CharsetGBK = Charset.forName("GBK")
|
||||
|
||||
@PublishedApi
|
||||
internal val CharsetUTF8 = Charset.forName("UTF8")
|
||||
|
||||
@ -36,14 +30,12 @@ enum class JceCharset(val kotlinCharset: Charset) {
|
||||
UTF8(Charset.forName("UTF8"))
|
||||
}
|
||||
|
||||
internal fun getSerialId(desc: SerialDescriptor, index: Int): Int? = desc.findAnnotation<ProtoId>(index)?.id
|
||||
internal fun getSerialId(desc: SerialDescriptor, index: Int): Int? = desc.findAnnotation<SerialId>(index)?.id
|
||||
|
||||
/**
|
||||
* Jce 数据结构序列化和反序列化工具, 能将 kotlinx.serialization 通用的注解标记格式的 `class` 序列化为 [ByteArray]
|
||||
*/
|
||||
@OptIn(InternalSerializationApi::class)
|
||||
class Jce private constructor(private val charset: JceCharset, override val context: SerialModule = EmptyModule) :
|
||||
SerialFormat, BinaryFormat {
|
||||
class Jce private constructor(private val charset: JceCharset, context: SerialModule = EmptyModule) : AbstractSerialFormat(context), BinaryFormat {
|
||||
|
||||
private inner class ListWriter(
|
||||
private val count: Int,
|
||||
@ -54,7 +46,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
return 0
|
||||
}
|
||||
|
||||
override fun endEncode(descriptor: SerialDescriptor) {
|
||||
override fun endEncode(desc: SerialDescriptor) {
|
||||
parentEncoder.writeHead(LIST, this.tag)
|
||||
parentEncoder.encodeTaggedInt(0, count)
|
||||
parentEncoder.output.writePacket(this.output.build())
|
||||
@ -76,18 +68,11 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
parentEncoder.output.write(this.output.toByteArray())
|
||||
}*/
|
||||
|
||||
override fun beginCollection(
|
||||
descriptor: SerialDescriptor,
|
||||
collectionSize: Int,
|
||||
vararg typeSerializers: KSerializer<*>
|
||||
): CompositeEncoder {
|
||||
override fun beginCollection(desc: SerialDescriptor, collectionSize: Int, vararg typeParams: KSerializer<*>): CompositeEncoder {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun beginStructure(
|
||||
descriptor: SerialDescriptor,
|
||||
vararg typeSerializers: KSerializer<*>
|
||||
): CompositeEncoder {
|
||||
override fun beginStructure(desc: SerialDescriptor, vararg typeParams: KSerializer<*>): CompositeEncoder {
|
||||
return this
|
||||
}
|
||||
}
|
||||
@ -96,7 +81,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
* From: com.qq.taf.jce.JceOutputStream
|
||||
*/
|
||||
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
||||
@OptIn(ExperimentalIoApi::class)
|
||||
@UseExperimental(ExperimentalIoApi::class)
|
||||
private open inner class JceEncoder(
|
||||
internal val output: BytePacketBuilder
|
||||
) : TaggedEncoder<Int>() {
|
||||
@ -109,39 +94,28 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
/**
|
||||
* 序列化最开始的时候的
|
||||
*/
|
||||
override fun beginStructure(
|
||||
descriptor: SerialDescriptor,
|
||||
vararg typeSerializers: KSerializer<*>
|
||||
): CompositeEncoder = when (descriptor.kind) {
|
||||
override fun beginStructure(desc: SerialDescriptor, vararg typeParams: KSerializer<*>): CompositeEncoder = when (desc.kind) {
|
||||
StructureKind.LIST -> this
|
||||
StructureKind.MAP -> this
|
||||
StructureKind.CLASS, StructureKind.OBJECT -> this
|
||||
StructureKind.CLASS, UnionKind.OBJECT -> this
|
||||
is PolymorphicKind -> this
|
||||
else -> throw SerializationException("Primitives are not supported at top-level")
|
||||
}
|
||||
|
||||
@OptIn(ImplicitReflectionSerializer::class)
|
||||
@UseExperimental(ImplicitReflectionSerializer::class)
|
||||
@Suppress("UNCHECKED_CAST", "NAME_SHADOWING")
|
||||
override fun <T> encodeSerializableValue(serializer: SerializationStrategy<T>, value: T) =
|
||||
when {
|
||||
serializer.descriptor.kind == StructureKind.MAP -> {
|
||||
try {
|
||||
override fun <T> encodeSerializableValue(serializer: SerializationStrategy<T>, value: T) = when (serializer.descriptor) {
|
||||
is MapLikeDescriptor -> {
|
||||
val entries = (value as Map<*, *>).entries
|
||||
val serializer = (serializer as MapLikeSerializer<Any?, Any?, T, *>)
|
||||
val mapEntrySerial = MapEntrySerializer(serializer.keySerializer, serializer.valueSerializer)
|
||||
|
||||
this.writeHead(MAP, currentTag)
|
||||
this.encodeTaggedInt(0, entries.count())
|
||||
SetSerializer(mapEntrySerial).serialize(JceMapWriter(this.output), entries)
|
||||
} catch (e: Exception) {
|
||||
super.encodeSerializableValue(serializer, value)
|
||||
HashSetSerializer(mapEntrySerial).serialize(JceMapWriter(this.output), entries)
|
||||
}
|
||||
}
|
||||
serializer.descriptor == ByteArraySerializer() -> encodeTaggedByteArray(popTag(), value as ByteArray)
|
||||
serializer.descriptor.kind == StructureKind.LIST
|
||||
&& serializer.descriptor.elementDescriptors()[0].kind is PrimitiveKind
|
||||
&& value !is ArrayList<*>
|
||||
&& value !is Array<*> -> {
|
||||
ByteArraySerializer.descriptor -> encodeTaggedByteArray(popTag(), value as ByteArray)
|
||||
is PrimitiveArrayDescriptor -> {
|
||||
serializer.serialize(
|
||||
ListWriter(
|
||||
when (value) {
|
||||
@ -159,22 +133,21 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
value
|
||||
)
|
||||
}
|
||||
serializer.descriptor.kind == StructureKind.LIST -> {
|
||||
if (value is Array<*>) {
|
||||
val descriptors = serializer.descriptor.elementDescriptors()
|
||||
if (descriptors.isNotEmpty() && descriptors[0].kind == PrimitiveKind.BYTE) {
|
||||
is ArrayClassDesc -> {
|
||||
val descriptor = serializer.descriptor as ReferenceArraySerializer<Any, Any?>
|
||||
if (descriptor.typeParams.isNotEmpty() && descriptor.typeParams[0] is ByteSerializer) {
|
||||
encodeTaggedByteArray(popTag(), (value as Array<Byte>).toByteArray())
|
||||
} else
|
||||
serializer.serialize(
|
||||
ListWriter((value as Array<*>).size, popTag(), this),
|
||||
value
|
||||
)
|
||||
} else if (value is Collection<*>) {
|
||||
}
|
||||
is ListLikeDescriptor -> {
|
||||
serializer.serialize(
|
||||
ListWriter((value as Collection<*>).size, popTag(), this),
|
||||
value
|
||||
)
|
||||
} else error("unknown value kind: ${value.getClassName()}")
|
||||
}
|
||||
else -> {
|
||||
if (value is JceStruct) {
|
||||
@ -254,6 +227,10 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
override fun encodeTaggedNull(tag: Int) {
|
||||
}
|
||||
|
||||
override fun encodeTaggedUnit(tag: Int) {
|
||||
encodeTaggedNull(tag)
|
||||
}
|
||||
|
||||
fun encodeTaggedByteArray(tag: Int, bytes: ByteArray) {
|
||||
writeHead(SIMPLE_LIST, tag)
|
||||
writeHead(BYTE, 0)
|
||||
@ -285,7 +262,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
is Double -> encodeTaggedDouble(tag, value)
|
||||
is Boolean -> encodeTaggedBoolean(tag, value)
|
||||
is String -> encodeTaggedString(tag, value)
|
||||
is Unit -> Unit
|
||||
is Unit -> encodeTaggedUnit(tag)
|
||||
else -> error("unsupported type: ${value.getClassName()}")
|
||||
}
|
||||
}
|
||||
@ -309,7 +286,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
val size: Int,
|
||||
input: JceInput
|
||||
) : JceDecoder(input) {
|
||||
override fun decodeCollectionSize(descriptor: SerialDescriptor): Int {
|
||||
override fun decodeCollectionSize(desc: SerialDescriptor): Int {
|
||||
return size
|
||||
}
|
||||
|
||||
@ -323,7 +300,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
val size: Int,
|
||||
input: JceInput
|
||||
) : JceDecoder(input) {
|
||||
override fun decodeCollectionSize(descriptor: SerialDescriptor): Int {
|
||||
override fun decodeCollectionSize(desc: SerialDescriptor): Int {
|
||||
return size
|
||||
}
|
||||
|
||||
@ -335,7 +312,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
private open inner class JceStructReader(
|
||||
input: JceInput
|
||||
) : JceDecoder(input) {
|
||||
override fun endStructure(descriptor: SerialDescriptor) {
|
||||
override fun endStructure(desc: SerialDescriptor) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -368,16 +345,16 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
/**
|
||||
* 在 [KSerializer.serialize] 前
|
||||
*/
|
||||
override fun beginStructure(descriptor: SerialDescriptor, vararg typeParams: KSerializer<*>): CompositeDecoder {
|
||||
override fun beginStructure(desc: SerialDescriptor, vararg typeParams: KSerializer<*>): CompositeDecoder {
|
||||
//// println("beginStructure: desc=${desc.getClassName()}, typeParams: ${typeParams.contentToString()}")
|
||||
when {
|
||||
when (desc) {
|
||||
// 由于 Byte 的数组有两种方式写入, 需特定读取器
|
||||
descriptor == ByteArraySerializer().descriptor -> {
|
||||
ByteArraySerializer.descriptor -> {
|
||||
// ByteArray, 交给 decodeSerializableValue 进行处理
|
||||
return this
|
||||
}
|
||||
descriptor.kind == StructureKind.LIST -> {
|
||||
if (typeParams.isNotEmpty() && typeParams[0] == Byte.serializer()) {
|
||||
is ListLikeDescriptor -> {
|
||||
if (typeParams.isNotEmpty() && typeParams[0] is ByteSerializer) {
|
||||
// Array<Byte>
|
||||
return this // 交给 decodeSerializableValue
|
||||
}
|
||||
@ -394,12 +371,12 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
MAP -> JceMapReader(input.readInt(0), this.input)
|
||||
else -> error("type mismatch")
|
||||
}
|
||||
} == null && descriptor.isNullable) {
|
||||
} == null && desc.isNullable) {
|
||||
return NullReader(this.input)
|
||||
}
|
||||
}
|
||||
|
||||
descriptor.kind == StructureKind.MAP -> {
|
||||
is MapLikeDescriptor -> {
|
||||
val tag = currentTagOrNull
|
||||
if (tag != null) {
|
||||
popTag()
|
||||
@ -414,11 +391,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
return NullReader(this.input)
|
||||
}
|
||||
|
||||
return super.beginStructure(descriptor, *typeParams)
|
||||
}
|
||||
|
||||
override fun decodeElementIndex(descriptor: SerialDescriptor): Int {
|
||||
return 0
|
||||
return super.beginStructure(desc, *typeParams)
|
||||
}
|
||||
|
||||
override fun decodeTaggedNull(tag: Int): Nothing? {
|
||||
@ -446,15 +419,13 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
when {
|
||||
deserializer.descriptor == ByteArraySerializer().descriptor -> {
|
||||
when (deserializer.descriptor) {
|
||||
ByteArraySerializer.descriptor -> {
|
||||
val tag = popTag()
|
||||
return if (isTagMissing(tag)) input.readByteArrayOrNull(tag) as? T
|
||||
else input.readByteArray(tag) as T
|
||||
}
|
||||
deserializer.descriptor.kind == StructureKind.LIST -> {
|
||||
is ListLikeDescriptor -> {
|
||||
if (deserializer is ReferenceArraySerializer<*, *>
|
||||
&& (deserializer as ListLikeSerializer<Any?, T, Any?>).typeParams.isNotEmpty()
|
||||
&& (deserializer as ListLikeSerializer<Any?, T, Any?>).typeParams[0] is ByteSerializer
|
||||
@ -482,17 +453,15 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
}
|
||||
error("UNREACHABLE CODE")
|
||||
}
|
||||
deserializer.descriptor.kind == StructureKind.MAP -> {
|
||||
is MapLikeDescriptor -> {
|
||||
val tag = popTag()
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
if (input.skipToTagOrNull(tag) { head ->
|
||||
check(head.type == MAP) { "type mismatch: ${head.type}" }
|
||||
// 将 mapOf(k1 to v1, k2 to v2, ...) 转换为 listOf(k1, v1, k2, v2, ...) 以便于写入.
|
||||
val serializer = (deserializer as MapLikeSerializer<Any?, Any?, T, *>)
|
||||
val mapEntrySerial =
|
||||
MapEntrySerializer(serializer.keySerializer, serializer.valueSerializer)
|
||||
val setOfEntries =
|
||||
SetSerializer(mapEntrySerial).deserialize(JceMapReader(input.readInt(0), input))
|
||||
val mapEntrySerial = MapEntrySerializer(serializer.keySerializer, serializer.valueSerializer)
|
||||
val setOfEntries = HashSetSerializer(mapEntrySerial).deserialize(JceMapReader(input.readInt(0), input))
|
||||
return setOfEntries.associateBy({ it.key }, { it.value }) as T
|
||||
} == null) {
|
||||
if (isTagMissing(tag)) {
|
||||
@ -503,7 +472,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
}
|
||||
}
|
||||
|
||||
if (deserializer.descriptor.kind == StructureKind.CLASS || deserializer.descriptor.kind == StructureKind.OBJECT) {
|
||||
if (deserializer.descriptor.kind == StructureKind.CLASS || deserializer.descriptor.kind == UnionKind.OBJECT) {
|
||||
val tag = currentTagOrNull
|
||||
if (tag != null) {
|
||||
@Suppress("SENSELESS_COMPARISON") // 推断 bug
|
||||
@ -546,7 +515,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
}
|
||||
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
internal inner class JceInput(
|
||||
@PublishedApi
|
||||
internal val input: ByteReadPacket,
|
||||
@ -592,30 +561,17 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
return currentJceHead
|
||||
}
|
||||
|
||||
fun readBoolean(tag: Int): Boolean =
|
||||
readBooleanOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readByte(tag: Int): Byte =
|
||||
readByteOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readShort(tag: Int): Short =
|
||||
readShortOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readBoolean(tag: Int): Boolean = readBooleanOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readByte(tag: Int): Byte = readByteOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readShort(tag: Int): Short = readShortOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readInt(tag: Int): Int = readIntOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readLong(tag: Int): Long =
|
||||
readLongOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readLong(tag: Int): Long = readLongOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readFloat(tag: Int): Float = readFloatOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readDouble(tag: Int): Double = readDoubleOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readFloat(tag: Int): Float =
|
||||
readFloatOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readString(tag: Int): String = readStringOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readDouble(tag: Int): Double =
|
||||
readDoubleOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readString(tag: Int): String =
|
||||
readStringOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readByteArray(tag: Int): ByteArray =
|
||||
readByteArrayOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
fun readByteArray(tag: Int): ByteArray = readByteArrayOrNull(tag) ?: error("cannot find tag $tag, currentJceHead=$currentJceHead")
|
||||
|
||||
fun readByteArrayOrNull(tag: Int): ByteArray? = skipToTagOrNull(tag) {
|
||||
when (it.type) {
|
||||
@ -711,7 +667,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
} while (head.type.toInt() != 11)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
@PublishedApi
|
||||
internal fun skipField(type: Byte) = when (type.toInt()) {
|
||||
0 -> this.input.discardExact(1)
|
||||
@ -776,8 +732,7 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
internal const val ZERO_TYPE: Byte = 12
|
||||
|
||||
private fun Any?.getClassName(): String =
|
||||
(if (this == null) Unit::class else this::class).qualifiedName?.split(".")?.takeLast(2)?.joinToString(".")
|
||||
?: "<unnamed class>"
|
||||
(if (this == null) Unit::class else this::class).qualifiedName?.split(".")?.takeLast(2)?.joinToString(".") ?: "<unnamed class>"
|
||||
}
|
||||
|
||||
fun <T> dumpAsPacket(serializer: SerializationStrategy<T>, obj: T): ByteReadPacket {
|
||||
@ -787,18 +742,14 @@ class Jce private constructor(private val charset: JceCharset, override val cont
|
||||
return encoder.build()
|
||||
}
|
||||
|
||||
override fun <T> dump(serializer: SerializationStrategy<T>, value: T): ByteArray {
|
||||
return dumpAsPacket(serializer, value).readBytes()
|
||||
override fun <T> dump(serializer: SerializationStrategy<T>, obj: T): ByteArray {
|
||||
return dumpAsPacket(serializer, obj).readBytes()
|
||||
}
|
||||
|
||||
/**
|
||||
* 注意 close [packet]!!
|
||||
*/
|
||||
fun <T> load(
|
||||
deserializer: DeserializationStrategy<T>,
|
||||
packet: ByteReadPacket,
|
||||
length: Int = packet.remaining.toInt()
|
||||
): T {
|
||||
fun <T> load(deserializer: DeserializationStrategy<T>, packet: ByteReadPacket, length: Int = packet.remaining.toInt()): T {
|
||||
return JceDecoder(JceInput(packet, length.toLong())).decode(deserializer)
|
||||
}
|
||||
|
||||
@ -843,7 +794,7 @@ internal inline fun <R> Jce.JceInput.skipToTagOrNull(tag: Int, block: (JceHead)
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
inline class JceHead(private val value: Long) {
|
||||
constructor(tag: Int, type: Byte) : this(tag.toLong().shl(32) or type.toLong())
|
||||
|
||||
|
@ -5,19 +5,11 @@
|
||||
* Some code changed by Mamoe is annotated around "MIRAI MODIFY START" and "MIRAI MODIFY END"
|
||||
*/
|
||||
|
||||
@file:Suppress("DEPRECATION_ERROR")
|
||||
|
||||
package net.mamoe.mirai.qqandroid.io.serialization
|
||||
|
||||
import kotlinx.io.ByteArrayOutputStream
|
||||
import kotlinx.io.ByteBuffer
|
||||
import kotlinx.io.ByteOrder
|
||||
import kotlinx.io.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.builtins.ByteArraySerializer
|
||||
import kotlinx.serialization.builtins.MapEntrySerializer
|
||||
import kotlinx.serialization.builtins.SetSerializer
|
||||
import kotlinx.serialization.internal.MapLikeSerializer
|
||||
import kotlinx.serialization.internal.TaggedEncoder
|
||||
import kotlinx.serialization.internal.*
|
||||
import kotlinx.serialization.modules.EmptyModule
|
||||
import kotlinx.serialization.modules.SerialModule
|
||||
import kotlinx.serialization.protobuf.ProtoBuf
|
||||
@ -41,31 +33,22 @@ internal fun extractParameters(desc: SerialDescriptor, index: Int, zeroBasedDefa
|
||||
*
|
||||
* 代码复制自 kotlinx.serialization. 修改部分已进行标注 (详见 "MIRAI MODIFY START")
|
||||
*/
|
||||
@OptIn(InternalSerializationApi::class, ExperimentalStdlibApi::class)
|
||||
class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModule) : SerialFormat, BinaryFormat {
|
||||
class ProtoBufWithNullableSupport(context: SerialModule = EmptyModule) : AbstractSerialFormat(context), BinaryFormat {
|
||||
|
||||
internal open inner class ProtobufWriter(private val encoder: ProtobufEncoder) : TaggedEncoder<ProtoDesc>() {
|
||||
override val context
|
||||
internal open inner class ProtobufWriter(val encoder: ProtobufEncoder) : TaggedEncoder<ProtoDesc>() {
|
||||
public override val context
|
||||
get() = this@ProtoBufWithNullableSupport.context
|
||||
|
||||
override fun beginStructure(
|
||||
descriptor: SerialDescriptor,
|
||||
vararg typeSerializers: KSerializer<*>
|
||||
): CompositeEncoder =
|
||||
when (descriptor.kind) {
|
||||
override fun beginStructure(desc: SerialDescriptor, vararg typeParams: KSerializer<*>): CompositeEncoder = when (desc.kind) {
|
||||
StructureKind.LIST -> RepeatedWriter(encoder, currentTag)
|
||||
StructureKind.CLASS, StructureKind.OBJECT, is PolymorphicKind -> ObjectWriter(currentTagOrNull, encoder)
|
||||
StructureKind.CLASS, UnionKind.OBJECT, is PolymorphicKind -> ObjectWriter(currentTagOrNull, encoder)
|
||||
StructureKind.MAP -> MapRepeatedWriter(currentTagOrNull, encoder)
|
||||
else -> throw SerializationException("Primitives are not supported at top-level")
|
||||
}
|
||||
|
||||
override fun encodeTaggedInt(tag: ProtoDesc, value: Int) = encoder.writeInt(value, tag.first, tag.second)
|
||||
override fun encodeTaggedByte(tag: ProtoDesc, value: Byte) =
|
||||
encoder.writeInt(value.toInt(), tag.first, tag.second)
|
||||
|
||||
override fun encodeTaggedShort(tag: ProtoDesc, value: Short) =
|
||||
encoder.writeInt(value.toInt(), tag.first, tag.second)
|
||||
|
||||
override fun encodeTaggedByte(tag: ProtoDesc, value: Byte) = encoder.writeInt(value.toInt(), tag.first, tag.second)
|
||||
override fun encodeTaggedShort(tag: ProtoDesc, value: Short) = encoder.writeInt(value.toInt(), tag.first, tag.second)
|
||||
override fun encodeTaggedLong(tag: ProtoDesc, value: Long) = encoder.writeLong(value, tag.first, tag.second)
|
||||
override fun encodeTaggedFloat(tag: ProtoDesc, value: Float) = encoder.writeFloat(value, tag.first)
|
||||
override fun encodeTaggedDouble(tag: ProtoDesc, value: Double) = encoder.writeDouble(value, tag.first)
|
||||
@ -99,15 +82,12 @@ class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModu
|
||||
@Suppress("UNCHECKED_CAST", "NAME_SHADOWING")
|
||||
override fun <T> encodeSerializableValue(serializer: SerializationStrategy<T>, value: T) = when {
|
||||
// encode maps as collection of map entries, not merged collection of key-values
|
||||
serializer.descriptor.kind == StructureKind.MAP -> {
|
||||
serializer.descriptor is MapLikeDescriptor -> {
|
||||
val serializer = (serializer as MapLikeSerializer<Any?, Any?, T, *>)
|
||||
val mapEntrySerial = MapEntrySerializer(serializer.keySerializer, serializer.valueSerializer)
|
||||
SetSerializer(mapEntrySerial).serialize(this, (value as Map<*, *>).entries)
|
||||
HashSetSerializer(mapEntrySerial).serialize(this, (value as Map<*, *>).entries)
|
||||
}
|
||||
serializer.descriptor == ByteArraySerializer().descriptor -> encoder.writeBytes(
|
||||
value as ByteArray,
|
||||
popTag().first
|
||||
)
|
||||
serializer.descriptor == ByteArraySerializer.descriptor -> encoder.writeBytes(value as ByteArray, popTag().first)
|
||||
else -> serializer.serialize(this, value)
|
||||
}
|
||||
}
|
||||
@ -116,7 +96,7 @@ class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModu
|
||||
val parentTag: ProtoDesc?, private val parentEncoder: ProtobufEncoder,
|
||||
private val stream: ByteArrayOutputStream = ByteArrayOutputStream()
|
||||
) : ProtobufWriter(ProtobufEncoder(stream)) {
|
||||
override fun endEncode(descriptor: SerialDescriptor) {
|
||||
override fun endEncode(desc: SerialDescriptor) {
|
||||
if (parentTag != null) {
|
||||
parentEncoder.writeBytes(stream.toByteArray(), parentTag.first)
|
||||
} else {
|
||||
@ -131,8 +111,7 @@ class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModu
|
||||
else 2 to (parentTag?.second ?: ProtoNumberType.DEFAULT)
|
||||
}
|
||||
|
||||
internal inner class RepeatedWriter(encoder: ProtobufEncoder, private val curTag: ProtoDesc) :
|
||||
ProtobufWriter(encoder) {
|
||||
internal inner class RepeatedWriter(encoder: ProtobufEncoder, val curTag: ProtoDesc) : ProtobufWriter(encoder) {
|
||||
override fun SerialDescriptor.getTag(index: Int) = curTag
|
||||
}
|
||||
|
||||
@ -163,7 +142,7 @@ class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModu
|
||||
}
|
||||
|
||||
fun writeString(value: String, tag: Int) {
|
||||
val bytes = value.encodeToByteArray()
|
||||
val bytes = value.toUtf8Bytes()
|
||||
writeBytes(bytes, tag)
|
||||
}
|
||||
|
||||
@ -249,17 +228,17 @@ class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModu
|
||||
internal const val SIZE_DELIMITED = 2
|
||||
internal const val i32 = 5
|
||||
|
||||
private val plain = ProtoBufWithNullableSupport()
|
||||
val plain = ProtoBufWithNullableSupport()
|
||||
|
||||
override fun <T> dump(serializer: SerializationStrategy<T>, value: T): ByteArray = plain.dump(serializer, value)
|
||||
override fun <T> load(deserializer: DeserializationStrategy<T>, bytes: ByteArray): T =
|
||||
plain.load(deserializer, bytes)
|
||||
override fun <T> dump(serializer: SerializationStrategy<T>, obj: T): ByteArray = plain.dump(serializer, obj)
|
||||
override fun <T> load(deserializer: DeserializationStrategy<T>, bytes: ByteArray): T = plain.load(deserializer, bytes)
|
||||
override fun install(module: SerialModule) = throw IllegalStateException("You should not install anything to global instance")
|
||||
}
|
||||
|
||||
override fun <T> dump(serializer: SerializationStrategy<T>, value: T): ByteArray {
|
||||
override fun <T> dump(serializer: SerializationStrategy<T>, obj: T): ByteArray {
|
||||
val encoder = ByteArrayOutputStream()
|
||||
val dumper = ProtobufWriter(ProtobufEncoder(encoder))
|
||||
dumper.encode(serializer, value)
|
||||
dumper.encode(serializer, obj)
|
||||
return encoder.toByteArray()
|
||||
}
|
||||
|
||||
@ -269,3 +248,20 @@ class ProtoBufWithNullableSupport(override val context: SerialModule = EmptyModu
|
||||
|
||||
}
|
||||
|
||||
internal fun InputStream.readExactNBytes(bytes: Int): ByteArray {
|
||||
val array = ByteArray(bytes)
|
||||
var read = 0
|
||||
while (read < bytes) {
|
||||
val i = this.read(array, read, bytes - read)
|
||||
if (i == -1) throw IOException("Unexpected EOF")
|
||||
read += i
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
internal fun InputStream.readToByteBuffer(bytes: Int): ByteBuffer {
|
||||
val arr = readExactNBytes(bytes)
|
||||
val buf = ByteBuffer.allocate(bytes)
|
||||
buf.put(arr).flip()
|
||||
return buf
|
||||
}
|
@ -253,7 +253,7 @@ internal class MessageSourceFromSendFriend(
|
||||
val sequenceId: Int,
|
||||
override val originalMessage: MessageChain
|
||||
) : MessageSourceFromSend() {
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class)
|
||||
override val id: Long
|
||||
get() = sequenceId.toLong().shl(32) or
|
||||
messageRandom.toLong().and(0xFFFFFFFF)
|
||||
@ -277,12 +277,12 @@ internal class MessageSourceFromSendGroup(
|
||||
) : MessageSourceFromSend() {
|
||||
private lateinit var sequenceIdDeferred: Deferred<Int>
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class)
|
||||
override val id: Long
|
||||
get() = sequenceIdDeferred.getCompleted().toLong().shl(32) or
|
||||
messageRandom.toLong().and(0xFFFFFFFF)
|
||||
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
internal fun startWaitingSequenceId(coroutineScope: CoroutineScope) {
|
||||
sequenceIdDeferred =
|
||||
coroutineScope.subscribingGetAsync<OnlinePush.PbPushGroupMsg.SendGroupMessageReceipt, Int>(
|
||||
|
@ -219,7 +219,7 @@ private val atAllData = ImMsgBody.Elem(
|
||||
)
|
||||
)
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal fun MessageChain.toRichTextElems(forGroup: Boolean): MutableList<ImMsgBody.Elem> {
|
||||
val elements = mutableListOf<ImMsgBody.Elem>()
|
||||
|
||||
@ -332,7 +332,7 @@ internal class OnlineFriendImageImpl(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
internal fun MsgComm.Msg.toMessageChain(): MessageChain {
|
||||
val elements = this.msgBody.richText.elems
|
||||
|
||||
@ -343,7 +343,7 @@ internal fun MsgComm.Msg.toMessageChain(): MessageChain {
|
||||
}
|
||||
|
||||
// These two functions are not identical, dont combine.
|
||||
@OptIn(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
internal fun ImMsgBody.SourceMsg.toMessageChain(): MessageChain {
|
||||
val elements = this.elems!!
|
||||
|
||||
@ -368,9 +368,7 @@ private fun MessageChain.removeAtIfHasQuoteReply(): MessageChain =
|
||||
}.asMessageChain()
|
||||
} else this*/
|
||||
|
||||
@OptIn(
|
||||
MiraiInternalAPI::class, ExperimentalUnsignedTypes::class, MiraiDebugAPI::class, LowLevelAPI::class
|
||||
)
|
||||
@UseExperimental(MiraiInternalAPI::class, ExperimentalUnsignedTypes::class, MiraiDebugAPI::class, LowLevelAPI::class)
|
||||
internal fun List<ImMsgBody.Elem>.joinToMessageChain(message: MessageChainBuilder) {
|
||||
this.forEach {
|
||||
when {
|
||||
|
@ -31,6 +31,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.*
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.Heartbeat
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.StatSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.WtLogin
|
||||
@ -44,7 +45,7 @@ import kotlin.jvm.Volatile
|
||||
import kotlin.time.ExperimentalTime
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler() {
|
||||
override val bot: QQAndroidBot by bot.unsafeWeakRef()
|
||||
override val supervisor: CompletableJob = SupervisorJob(bot.coroutineContext[Job])
|
||||
@ -182,7 +183,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
|
||||
internal var pendingIncomingPackets: LockFreeLinkedList<KnownPacketFactories.IncomingPacket<*>>? =
|
||||
LockFreeLinkedList()
|
||||
|
||||
@OptIn(MiraiExperimentalAPI::class, ExperimentalTime::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class, ExperimentalTime::class)
|
||||
override suspend fun init(): Unit = coroutineScope {
|
||||
check(bot.isActive) { "bot is dead therefore network can't init" }
|
||||
check(this@QQAndroidBotNetworkHandler.isActive) { "network is dead therefore can't init" }
|
||||
@ -371,7 +372,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
|
||||
*
|
||||
* @param input 一个完整的包的内容, 去掉开头的 int 包长度
|
||||
*/
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class)
|
||||
fun parsePacketAsync(input: Input): Job {
|
||||
return this.launch(start = CoroutineStart.ATOMIC) {
|
||||
input.use { parsePacket(it) }
|
||||
|
@ -40,7 +40,7 @@ import net.mamoe.mirai.utils.io.*
|
||||
DOMAINS
|
||||
Pskey: "openmobile.qq.com"
|
||||
*/
|
||||
@OptIn(MiraiExperimentalAPI::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class, MiraiInternalAPI::class)
|
||||
@PublishedApi
|
||||
internal open class QQAndroidClient(
|
||||
context: Context,
|
||||
@ -158,7 +158,7 @@ internal open class QQAndroidClient(
|
||||
*/
|
||||
val uin: Long get() = _uin
|
||||
|
||||
@OptIn(RawAccountIdUse::class)
|
||||
@UseExperimental(RawAccountIdUse::class)
|
||||
@Suppress("PropertyName")
|
||||
internal var _uin: Long = bot.account.id
|
||||
|
||||
|
@ -26,7 +26,6 @@ import io.ktor.utils.io.pool.useInstance
|
||||
import kotlinx.coroutines.InternalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.io.InputStream
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.CSDataHighwayHead
|
||||
@ -35,7 +34,7 @@ import net.mamoe.mirai.utils.io.ByteArrayPool
|
||||
import net.mamoe.mirai.utils.io.PlatformSocket
|
||||
import net.mamoe.mirai.utils.io.withUse
|
||||
|
||||
@OptIn(MiraiInternalAPI::class, InternalSerializationApi::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@Suppress("SpellCheckingInspection")
|
||||
internal suspend fun HttpClient.postImage(
|
||||
htcmd: String,
|
||||
@ -93,9 +92,9 @@ internal suspend fun HttpClient.postImage(
|
||||
}
|
||||
} == HttpStatusCode.OK
|
||||
|
||||
@OptIn(MiraiInternalAPI::class, InternalSerializationApi::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal object HighwayHelper {
|
||||
@OptIn(InternalCoroutinesApi::class)
|
||||
@UseExperimental(InternalCoroutinesApi::class)
|
||||
suspend fun uploadImage(
|
||||
client: QQAndroidClient,
|
||||
serverIp: String,
|
||||
|
@ -15,6 +15,7 @@ import io.ktor.utils.io.ByteReadChannel
|
||||
import io.ktor.utils.io.core.*
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.io.InputStream
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.CSDataHighwayHead
|
||||
@ -22,7 +23,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
import net.mamoe.mirai.utils.io.*
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal fun createImageDataPacketSequence( // RequestDataTrans
|
||||
client: QQAndroidClient,
|
||||
command: String,
|
||||
|
@ -9,139 +9,139 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.data.Packet
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class BigDataChannel(
|
||||
@ProtoId(0) val vBigdataIplists: List<BigDataIpList>,
|
||||
@ProtoId(1) val sBigdataSigSession: ByteArray? = null,
|
||||
@ProtoId(2) val sBigdataKeySession: ByteArray? = null,
|
||||
@ProtoId(3) val uSigUin: Long? = null,
|
||||
@ProtoId(4) val iConnectFlag: Int? = 1,
|
||||
@ProtoId(5) val vBigdataPbBuf: ByteArray? = null
|
||||
@SerialId(0) val vBigdataIplists: List<BigDataIpList>,
|
||||
@SerialId(1) val sBigdataSigSession: ByteArray? = null,
|
||||
@SerialId(2) val sBigdataKeySession: ByteArray? = null,
|
||||
@SerialId(3) val uSigUin: Long? = null,
|
||||
@SerialId(4) val iConnectFlag: Int? = 1,
|
||||
@SerialId(5) val vBigdataPbBuf: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class BigDataIpInfo(
|
||||
@ProtoId(0) val uType: Long,
|
||||
@ProtoId(1) val sIp: String = "",
|
||||
@ProtoId(2) val uPort: Long
|
||||
@SerialId(0) val uType: Long,
|
||||
@SerialId(1) val sIp: String = "",
|
||||
@SerialId(2) val uPort: Long
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class BigDataIpList(
|
||||
@ProtoId(0) val uServiceType: Long,
|
||||
@ProtoId(1) val vIplist: List<BigDataIpInfo>,
|
||||
@ProtoId(2) val netSegConfs: List<NetSegConf>? = null,
|
||||
@ProtoId(3) val ufragmentSize: Long? = null
|
||||
@SerialId(0) val uServiceType: Long,
|
||||
@SerialId(1) val vIplist: List<BigDataIpInfo>,
|
||||
@SerialId(2) val netSegConfs: List<NetSegConf>? = null,
|
||||
@SerialId(3) val ufragmentSize: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class ClientLogConfig(
|
||||
@ProtoId(1) val type: Int,
|
||||
@ProtoId(2) val timeStart: TimeStamp? = null,
|
||||
@ProtoId(3) val timeFinish: TimeStamp? = null,
|
||||
@ProtoId(4) val loglevel: Byte? = null,
|
||||
@ProtoId(5) val cookie: Int? = null,
|
||||
@ProtoId(6) val lseq: Long? = null
|
||||
@SerialId(1) val type: Int,
|
||||
@SerialId(2) val timeStart: TimeStamp? = null,
|
||||
@SerialId(3) val timeFinish: TimeStamp? = null,
|
||||
@SerialId(4) val loglevel: Byte? = null,
|
||||
@SerialId(5) val cookie: Int? = null,
|
||||
@SerialId(6) val lseq: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class DomainIpChannel(
|
||||
@ProtoId(0) val vDomainIplists: List<DomainIpList>
|
||||
@SerialId(0) val vDomainIplists: List<DomainIpList>
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class DomainIpInfo(
|
||||
@ProtoId(1) val uIp: Int,
|
||||
@ProtoId(2) val uPort: Int
|
||||
@SerialId(1) val uIp: Int,
|
||||
@SerialId(2) val uPort: Int
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class DomainIpList(
|
||||
@ProtoId(0) val uDomainType: Int,
|
||||
@ProtoId(1) val vIplist: List<DomainIpInfo>
|
||||
@SerialId(0) val uDomainType: Int,
|
||||
@SerialId(1) val vIplist: List<DomainIpInfo>
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class FileStoragePushFSSvcList(
|
||||
@ProtoId(0) val vUpLoadList: List<FileStorageServerListInfo>,
|
||||
@ProtoId(1) val vPicDownLoadList: List<FileStorageServerListInfo>,
|
||||
@ProtoId(2) val vGPicDownLoadList: List<FileStorageServerListInfo>? = null,
|
||||
@ProtoId(3) val vQzoneProxyServiceList: List<FileStorageServerListInfo>? = null,
|
||||
@ProtoId(4) val vUrlEncodeServiceList: List<FileStorageServerListInfo>? = null,
|
||||
@ProtoId(5) val bigDataChannel: BigDataChannel? = null,
|
||||
@ProtoId(6) val vVipEmotionList: List<FileStorageServerListInfo>? = null,
|
||||
@ProtoId(7) val vC2CPicDownList: List<FileStorageServerListInfo>? = null,
|
||||
@ProtoId(8) val fmtIPInfo: FmtIPInfo? = null,
|
||||
@ProtoId(9) val domainIpChannel: DomainIpChannel? = null,
|
||||
@ProtoId(10) val pttlist: ByteArray? = null
|
||||
@SerialId(0) val vUpLoadList: List<FileStorageServerListInfo>,
|
||||
@SerialId(1) val vPicDownLoadList: List<FileStorageServerListInfo>,
|
||||
@SerialId(2) val vGPicDownLoadList: List<FileStorageServerListInfo>? = null,
|
||||
@SerialId(3) val vQzoneProxyServiceList: List<FileStorageServerListInfo>? = null,
|
||||
@SerialId(4) val vUrlEncodeServiceList: List<FileStorageServerListInfo>? = null,
|
||||
@SerialId(5) val bigDataChannel: BigDataChannel? = null,
|
||||
@SerialId(6) val vVipEmotionList: List<FileStorageServerListInfo>? = null,
|
||||
@SerialId(7) val vC2CPicDownList: List<FileStorageServerListInfo>? = null,
|
||||
@SerialId(8) val fmtIPInfo: FmtIPInfo? = null,
|
||||
@SerialId(9) val domainIpChannel: DomainIpChannel? = null,
|
||||
@SerialId(10) val pttlist: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class FileStorageServerListInfo(
|
||||
@ProtoId(1) val sIP: String = "",
|
||||
@ProtoId(2) val iPort: Int
|
||||
@SerialId(1) val sIP: String = "",
|
||||
@SerialId(2) val iPort: Int
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class FmtIPInfo(
|
||||
@ProtoId(0) val sGateIp: String = "",
|
||||
@ProtoId(1) val iGateIpOper: Long
|
||||
@SerialId(0) val sGateIp: String = "",
|
||||
@SerialId(1) val iGateIpOper: Long
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class NetSegConf(
|
||||
@ProtoId(0) val uint32NetType: Long? = null,
|
||||
@ProtoId(1) val uint32Segsize: Long? = null,
|
||||
@ProtoId(2) val uint32Segnum: Long? = null,
|
||||
@ProtoId(3) val uint32Curconnnum: Long? = null
|
||||
@SerialId(0) val uint32NetType: Long? = null,
|
||||
@SerialId(1) val uint32Segsize: Long? = null,
|
||||
@SerialId(2) val uint32Segnum: Long? = null,
|
||||
@SerialId(3) val uint32Curconnnum: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Suppress("ArrayInDataClass")
|
||||
@Serializable
|
||||
internal data class PushReq(
|
||||
@ProtoId(1) val type: Int,
|
||||
@ProtoId(2) val jcebuf: ByteArray,
|
||||
@ProtoId(3) val seq: Long
|
||||
@SerialId(1) val type: Int,
|
||||
@SerialId(2) val jcebuf: ByteArray,
|
||||
@SerialId(3) val seq: Long
|
||||
) : JceStruct, Packet
|
||||
|
||||
@Serializable
|
||||
internal class PushResp(
|
||||
@ProtoId(1) val type: Int,
|
||||
@ProtoId(2) val seq: Long,
|
||||
@ProtoId(3) val jcebuf: ByteArray? = null
|
||||
@SerialId(1) val type: Int,
|
||||
@SerialId(2) val seq: Long,
|
||||
@SerialId(3) val jcebuf: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class SsoServerList(
|
||||
@ProtoId(1) val v2G3GList: List<SsoServerListInfo>,
|
||||
@ProtoId(3) val vWifiList: List<SsoServerListInfo>,
|
||||
@ProtoId(4) val iReconnect: Int,
|
||||
@ProtoId(5) val testSpeed: Byte? = null,
|
||||
@ProtoId(6) val useNewList: Byte? = null,
|
||||
@ProtoId(7) val iMultiConn: Int? = 1,
|
||||
@ProtoId(8) val vHttp2g3glist: List<SsoServerListInfo>? = null,
|
||||
@ProtoId(9) val vHttpWifilist: List<SsoServerListInfo>? = null
|
||||
@SerialId(1) val v2G3GList: List<SsoServerListInfo>,
|
||||
@SerialId(3) val vWifiList: List<SsoServerListInfo>,
|
||||
@SerialId(4) val iReconnect: Int,
|
||||
@SerialId(5) val testSpeed: Byte? = null,
|
||||
@SerialId(6) val useNewList: Byte? = null,
|
||||
@SerialId(7) val iMultiConn: Int? = 1,
|
||||
@SerialId(8) val vHttp2g3glist: List<SsoServerListInfo>? = null,
|
||||
@SerialId(9) val vHttpWifilist: List<SsoServerListInfo>? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class SsoServerListInfo(
|
||||
@ProtoId(1) val sIP: String = "",
|
||||
@ProtoId(2) val iPort: Int,
|
||||
@ProtoId(3) val linkType: Byte,
|
||||
@ProtoId(4) val proxy: Byte,
|
||||
@ProtoId(5) val protocolType: Byte? = null,
|
||||
@ProtoId(6) val iTimeOut: Int? = 10
|
||||
@SerialId(1) val sIP: String = "",
|
||||
@SerialId(2) val iPort: Int,
|
||||
@SerialId(3) val linkType: Byte,
|
||||
@SerialId(4) val proxy: Byte,
|
||||
@SerialId(5) val protocolType: Byte? = null,
|
||||
@SerialId(6) val iTimeOut: Int? = 10
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class TimeStamp(
|
||||
@ProtoId(1) val year: Int,
|
||||
@ProtoId(2) val month: Byte,
|
||||
@ProtoId(3) val day: Byte,
|
||||
@ProtoId(4) val hour: Byte
|
||||
@SerialId(1) val year: Int,
|
||||
@SerialId(2) val month: Byte,
|
||||
@SerialId(3) val day: Byte,
|
||||
@SerialId(4) val hour: Byte
|
||||
) : JceStruct
|
||||
|
@ -9,172 +9,172 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class ModifyGroupCardReq(
|
||||
@ProtoId(0) val dwZero: Long,
|
||||
@ProtoId(1) val dwGroupCode: Long,
|
||||
@ProtoId(2) val dwNewSeq: Long,
|
||||
@ProtoId(3) val vecUinInfo: List<StUinInfo>
|
||||
@SerialId(0) val dwZero: Long,
|
||||
@SerialId(1) val dwGroupCode: Long,
|
||||
@SerialId(2) val dwNewSeq: Long,
|
||||
@SerialId(3) val vecUinInfo: List<stUinInfo>
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class StUinInfo(
|
||||
@ProtoId(0) val dwuin: Long,
|
||||
@ProtoId(1) val dwFlag: Long,
|
||||
@ProtoId(2) val sName: String = "",
|
||||
@ProtoId(3) val gender: Byte,
|
||||
@ProtoId(4) val sPhone: String = "",
|
||||
@ProtoId(5) val sEmail: String = "",
|
||||
@ProtoId(6) val sRemark: String = ""
|
||||
internal class stUinInfo(
|
||||
@SerialId(0) val dwuin: Long,
|
||||
@SerialId(1) val dwFlag: Long,
|
||||
@SerialId(2) val sName: String = "",
|
||||
@SerialId(3) val gender: Byte,
|
||||
@SerialId(4) val sPhone: String = "",
|
||||
@SerialId(5) val sEmail: String = "",
|
||||
@SerialId(6) val sRemark: String = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class GetFriendListReq(
|
||||
@ProtoId(0) val reqtype: Int? = null,
|
||||
@ProtoId(1) val ifReflush: Byte? = null,
|
||||
@ProtoId(2) val uin: Long? = null,
|
||||
@ProtoId(3) val startIndex: Short? = null,
|
||||
@ProtoId(4) val getfriendCount: Short? = null,
|
||||
@ProtoId(5) val groupid: Byte? = null,
|
||||
@ProtoId(6) val ifGetGroupInfo: Byte? = null,
|
||||
@ProtoId(7) val groupstartIndex: Byte? = null,
|
||||
@ProtoId(8) val getgroupCount: Byte? = null,
|
||||
@ProtoId(9) val ifGetMSFGroup: Byte? = null,
|
||||
@ProtoId(10) val ifShowTermType: Byte? = null,
|
||||
@ProtoId(11) val version: Long? = null,
|
||||
@ProtoId(12) val uinList: List<Long>? = null,
|
||||
@ProtoId(13) val eAppType: Int = 0,
|
||||
@ProtoId(14) val ifGetDOVId: Byte? = null,
|
||||
@ProtoId(15) val ifGetBothFlag: Byte? = null,
|
||||
@ProtoId(16) val vec0xd50Req: ByteArray? = null,
|
||||
@ProtoId(17) val vec0xd6bReq: ByteArray? = null,
|
||||
@ProtoId(18) val vecSnsTypelist: List<Long>? = null
|
||||
@SerialId(0) val reqtype: Int? = null,
|
||||
@SerialId(1) val ifReflush: Byte? = null,
|
||||
@SerialId(2) val uin: Long? = null,
|
||||
@SerialId(3) val startIndex: Short? = null,
|
||||
@SerialId(4) val getfriendCount: Short? = null,
|
||||
@SerialId(5) val groupid: Byte? = null,
|
||||
@SerialId(6) val ifGetGroupInfo: Byte? = null,
|
||||
@SerialId(7) val groupstartIndex: Byte? = null,
|
||||
@SerialId(8) val getgroupCount: Byte? = null,
|
||||
@SerialId(9) val ifGetMSFGroup: Byte? = null,
|
||||
@SerialId(10) val ifShowTermType: Byte? = null,
|
||||
@SerialId(11) val version: Long? = null,
|
||||
@SerialId(12) val uinList: List<Long>? = null,
|
||||
@SerialId(13) val eAppType: Int = 0,
|
||||
@SerialId(14) val ifGetDOVId: Byte? = null,
|
||||
@SerialId(15) val ifGetBothFlag: Byte? = null,
|
||||
@SerialId(16) val vec0xd50Req: ByteArray? = null,
|
||||
@SerialId(17) val vec0xd6bReq: ByteArray? = null,
|
||||
@SerialId(18) val vecSnsTypelist: List<Long>? = null
|
||||
) : JceStruct
|
||||
|
||||
|
||||
@Serializable
|
||||
internal class GetFriendListResp(
|
||||
@ProtoId(0) val reqtype: Int,
|
||||
@ProtoId(1) val ifReflush: Byte,
|
||||
@ProtoId(2) val uin: Long,
|
||||
@ProtoId(3) val startIndex: Short,
|
||||
@ProtoId(4) val getfriendCount: Short,
|
||||
@ProtoId(5) val totoalFriendCount: Short,
|
||||
@ProtoId(6) val friendCount: Short,
|
||||
@ProtoId(7) val vecFriendInfo: List<FriendInfo>? = null,
|
||||
@ProtoId(8) val groupid: Byte? = null,
|
||||
@ProtoId(9) val ifGetGroupInfo: Byte,
|
||||
@ProtoId(10) val groupstartIndex: Byte? = null,
|
||||
@ProtoId(11) val getgroupCount: Byte? = null,
|
||||
@ProtoId(12) val totoalGroupCount: Short? = null,
|
||||
@ProtoId(13) val groupCount: Byte? = null,
|
||||
@ProtoId(14) val vecGroupInfo: List<GroupInfo>? = null,
|
||||
@ProtoId(15) val result: Int,
|
||||
@ProtoId(16) val errorCode: Short? = null,
|
||||
@ProtoId(17) val onlineFriendCount: Short? = null,
|
||||
@ProtoId(18) val serverTime: Long? = null,
|
||||
@ProtoId(19) val sqqOnLineCount: Short? = null,
|
||||
@ProtoId(20) val vecMSFGroupInfo: List<GroupInfo>? = null,
|
||||
@ProtoId(21) val respType: Byte? = null,
|
||||
@ProtoId(22) val hasOtherRespFlag: Byte? = null,
|
||||
@ProtoId(23) val stSelfInfo: FriendInfo? = null,
|
||||
@ProtoId(24) val showPcIcon: Byte? = null,
|
||||
@ProtoId(25) val wGetExtSnsRspCode: Short? = null,
|
||||
@ProtoId(26) val stSubSrvRspCode: FriendListSubSrvRspCode? = null
|
||||
@SerialId(0) val reqtype: Int,
|
||||
@SerialId(1) val ifReflush: Byte,
|
||||
@SerialId(2) val uin: Long,
|
||||
@SerialId(3) val startIndex: Short,
|
||||
@SerialId(4) val getfriendCount: Short,
|
||||
@SerialId(5) val totoalFriendCount: Short,
|
||||
@SerialId(6) val friendCount: Short,
|
||||
@SerialId(7) val vecFriendInfo: List<FriendInfo>? = null,
|
||||
@SerialId(8) val groupid: Byte? = null,
|
||||
@SerialId(9) val ifGetGroupInfo: Byte,
|
||||
@SerialId(10) val groupstartIndex: Byte? = null,
|
||||
@SerialId(11) val getgroupCount: Byte? = null,
|
||||
@SerialId(12) val totoalGroupCount: Short? = null,
|
||||
@SerialId(13) val groupCount: Byte? = null,
|
||||
@SerialId(14) val vecGroupInfo: List<GroupInfo>? = null,
|
||||
@SerialId(15) val result: Int,
|
||||
@SerialId(16) val errorCode: Short? = null,
|
||||
@SerialId(17) val onlineFriendCount: Short? = null,
|
||||
@SerialId(18) val serverTime: Long? = null,
|
||||
@SerialId(19) val sqqOnLineCount: Short? = null,
|
||||
@SerialId(20) val vecMSFGroupInfo: List<GroupInfo>? = null,
|
||||
@SerialId(21) val respType: Byte? = null,
|
||||
@SerialId(22) val hasOtherRespFlag: Byte? = null,
|
||||
@SerialId(23) val stSelfInfo: FriendInfo? = null,
|
||||
@SerialId(24) val showPcIcon: Byte? = null,
|
||||
@SerialId(25) val wGetExtSnsRspCode: Short? = null,
|
||||
@SerialId(26) val stSubSrvRspCode: FriendListSubSrvRspCode? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class FriendListSubSrvRspCode(
|
||||
@ProtoId(0) val wGetMutualMarkRspCode: Short? = null,
|
||||
@ProtoId(1) val wGetIntimateInfoRspCode: Short? = null
|
||||
@SerialId(0) val wGetMutualMarkRspCode: Short? = null,
|
||||
@SerialId(1) val wGetIntimateInfoRspCode: Short? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class FriendInfo(
|
||||
@ProtoId(0) val friendUin: Long,
|
||||
@ProtoId(1) val groupId: Byte,
|
||||
@ProtoId(2) val faceId: Short,
|
||||
@ProtoId(3) val remark: String = "",
|
||||
@ProtoId(4) val sqqtype: Byte,
|
||||
@ProtoId(5) val status: Byte = 20,
|
||||
@ProtoId(6) val memberLevel: Byte? = null,
|
||||
@ProtoId(7) val isMqqOnLine: Byte? = null,
|
||||
@ProtoId(8) val sqqOnLineState: Byte? = null,
|
||||
@ProtoId(9) val isIphoneOnline: Byte? = null,
|
||||
@ProtoId(10) val detalStatusFlag: Byte? = null,
|
||||
@ProtoId(11) val sqqOnLineStateV2: Byte? = null,
|
||||
@ProtoId(12) val sShowName: String? = "",
|
||||
@ProtoId(13) val isRemark: Byte? = null,
|
||||
@ProtoId(14) val nick: String? = "",
|
||||
@ProtoId(15) val specialFlag: Byte? = null,
|
||||
@ProtoId(16) val vecIMGroupID: ByteArray? = null,
|
||||
@ProtoId(17) val vecMSFGroupID: ByteArray? = null,
|
||||
@ProtoId(18) val iTermType: Int? = null,
|
||||
@ProtoId(19) val oVipInfo: VipBaseInfo? = null,
|
||||
@ProtoId(20) val network: Byte? = null,
|
||||
@ProtoId(21) val vecRing: ByteArray? = null,
|
||||
@ProtoId(22) val uAbiFlag: Long? = null,
|
||||
@ProtoId(23) val ulFaceAddonId: Long? = null,
|
||||
@ProtoId(24) val eNetworkType: Int? = 0,
|
||||
@ProtoId(25) val uVipFont: Long? = null,
|
||||
@ProtoId(26) val eIconType: Int? = 0,
|
||||
@ProtoId(27) val termDesc: String? = "",
|
||||
@ProtoId(28) val uColorRing: Long? = null,
|
||||
@ProtoId(29) val apolloFlag: Byte? = null,
|
||||
@ProtoId(30) val uApolloTimestamp: Long? = null,
|
||||
@ProtoId(31) val sex: Byte? = null,
|
||||
@ProtoId(32) val uFounderFont: Long? = null,
|
||||
@ProtoId(33) val eimId: String? = "",
|
||||
@ProtoId(34) val eimMobile: String? = "",
|
||||
@ProtoId(35) val olympicTorch: Byte? = null,
|
||||
@ProtoId(36) val uApolloSignTime: Long? = null,
|
||||
@ProtoId(37) val uLaviUin: Long? = null,
|
||||
@ProtoId(38) val uTagUpdateTime: Long? = null,
|
||||
@ProtoId(39) val uGameLastLoginTime: Long? = null,
|
||||
@ProtoId(40) val uGameAppid: Long? = null,
|
||||
@ProtoId(41) val vecCardID: ByteArray? = null,
|
||||
@ProtoId(42) val ulBitSet: Long? = null,
|
||||
@ProtoId(43) val kingOfGloryFlag: Byte? = null,
|
||||
@ProtoId(44) val ulKingOfGloryRank: Long? = null,
|
||||
@ProtoId(45) val masterUin: String? = "",
|
||||
@ProtoId(46) val uLastMedalUpdateTime: Long? = null,
|
||||
@ProtoId(47) val uFaceStoreId: Long? = null,
|
||||
@ProtoId(48) val uFontEffect: Long? = null,
|
||||
@ProtoId(49) val sDOVId: String? = "",
|
||||
@ProtoId(50) val uBothFlag: Long? = null,
|
||||
@ProtoId(51) val centiShow3DFlag: Byte? = null,
|
||||
@ProtoId(52) val vecIntimateInfo: ByteArray? = null,
|
||||
@ProtoId(53) val showNameplate: Byte? = null,
|
||||
@ProtoId(54) val newLoverDiamondFlag: Byte? = null,
|
||||
@ProtoId(55) val vecExtSnsFrdData: ByteArray? = null,
|
||||
@ProtoId(56) val vecMutualMarkData: ByteArray? = null
|
||||
@SerialId(0) val friendUin: Long,
|
||||
@SerialId(1) val groupId: Byte,
|
||||
@SerialId(2) val faceId: Short,
|
||||
@SerialId(3) val remark: String = "",
|
||||
@SerialId(4) val sqqtype: Byte,
|
||||
@SerialId(5) val status: Byte = 20,
|
||||
@SerialId(6) val memberLevel: Byte? = null,
|
||||
@SerialId(7) val isMqqOnLine: Byte? = null,
|
||||
@SerialId(8) val sqqOnLineState: Byte? = null,
|
||||
@SerialId(9) val isIphoneOnline: Byte? = null,
|
||||
@SerialId(10) val detalStatusFlag: Byte? = null,
|
||||
@SerialId(11) val sqqOnLineStateV2: Byte? = null,
|
||||
@SerialId(12) val sShowName: String? = "",
|
||||
@SerialId(13) val isRemark: Byte? = null,
|
||||
@SerialId(14) val nick: String? = "",
|
||||
@SerialId(15) val specialFlag: Byte? = null,
|
||||
@SerialId(16) val vecIMGroupID: ByteArray? = null,
|
||||
@SerialId(17) val vecMSFGroupID: ByteArray? = null,
|
||||
@SerialId(18) val iTermType: Int? = null,
|
||||
@SerialId(19) val oVipInfo: VipBaseInfo? = null,
|
||||
@SerialId(20) val network: Byte? = null,
|
||||
@SerialId(21) val vecRing: ByteArray? = null,
|
||||
@SerialId(22) val uAbiFlag: Long? = null,
|
||||
@SerialId(23) val ulFaceAddonId: Long? = null,
|
||||
@SerialId(24) val eNetworkType: Int? = 0,
|
||||
@SerialId(25) val uVipFont: Long? = null,
|
||||
@SerialId(26) val eIconType: Int? = 0,
|
||||
@SerialId(27) val termDesc: String? = "",
|
||||
@SerialId(28) val uColorRing: Long? = null,
|
||||
@SerialId(29) val apolloFlag: Byte? = null,
|
||||
@SerialId(30) val uApolloTimestamp: Long? = null,
|
||||
@SerialId(31) val sex: Byte? = null,
|
||||
@SerialId(32) val uFounderFont: Long? = null,
|
||||
@SerialId(33) val eimId: String? = "",
|
||||
@SerialId(34) val eimMobile: String? = "",
|
||||
@SerialId(35) val olympicTorch: Byte? = null,
|
||||
@SerialId(36) val uApolloSignTime: Long? = null,
|
||||
@SerialId(37) val uLaviUin: Long? = null,
|
||||
@SerialId(38) val uTagUpdateTime: Long? = null,
|
||||
@SerialId(39) val uGameLastLoginTime: Long? = null,
|
||||
@SerialId(40) val uGameAppid: Long? = null,
|
||||
@SerialId(41) val vecCardID: ByteArray? = null,
|
||||
@SerialId(42) val ulBitSet: Long? = null,
|
||||
@SerialId(43) val kingOfGloryFlag: Byte? = null,
|
||||
@SerialId(44) val ulKingOfGloryRank: Long? = null,
|
||||
@SerialId(45) val masterUin: String? = "",
|
||||
@SerialId(46) val uLastMedalUpdateTime: Long? = null,
|
||||
@SerialId(47) val uFaceStoreId: Long? = null,
|
||||
@SerialId(48) val uFontEffect: Long? = null,
|
||||
@SerialId(49) val sDOVId: String? = "",
|
||||
@SerialId(50) val uBothFlag: Long? = null,
|
||||
@SerialId(51) val centiShow3DFlag: Byte? = null,
|
||||
@SerialId(52) val vecIntimateInfo: ByteArray? = null,
|
||||
@SerialId(53) val showNameplate: Byte? = null,
|
||||
@SerialId(54) val newLoverDiamondFlag: Byte? = null,
|
||||
@SerialId(55) val vecExtSnsFrdData: ByteArray? = null,
|
||||
@SerialId(56) val vecMutualMarkData: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class VipBaseInfo(
|
||||
@ProtoId(0) val mOpenInfo: Map<Int, VipOpenInfo>
|
||||
@SerialId(0) val mOpenInfo: Map<Int, VipOpenInfo>
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class VipOpenInfo(
|
||||
@ProtoId(0) val open: Boolean,
|
||||
@ProtoId(1) val iVipType: Int = -1,
|
||||
@ProtoId(2) val iVipLevel: Int = -1,
|
||||
@ProtoId(3) val iVipFlag: Int? = null,
|
||||
@ProtoId(4) val nameplateId: Long? = null
|
||||
@SerialId(0) val open: Boolean,
|
||||
@SerialId(1) val iVipType: Int = -1,
|
||||
@SerialId(2) val iVipLevel: Int = -1,
|
||||
@SerialId(3) val iVipFlag: Int? = null,
|
||||
@SerialId(4) val nameplateId: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class GroupInfo(
|
||||
@ProtoId(0) val groupId: Byte,
|
||||
@ProtoId(1) val groupname: String = "",
|
||||
@ProtoId(2) val friendCount: Int,
|
||||
@ProtoId(3) val onlineFriendCount: Int,
|
||||
@ProtoId(4) val seqid: Byte? = null,
|
||||
@ProtoId(5) val sqqOnLineCount: Int? = null
|
||||
@SerialId(0) val groupId: Byte,
|
||||
@SerialId(1) val groupname: String = "",
|
||||
@SerialId(2) val friendCount: Int,
|
||||
@SerialId(3) val onlineFriendCount: Int,
|
||||
@SerialId(4) val seqid: Byte? = null,
|
||||
@SerialId(5) val sqqOnLineCount: Int? = null
|
||||
) : JceStruct
|
||||
|
||||
|
@ -9,250 +9,250 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
|
||||
internal class OnlinePushPack {
|
||||
@Serializable
|
||||
internal class DelMsgInfo(
|
||||
@ProtoId(0) val fromUin: Long,
|
||||
@ProtoId(1) val uMsgTime: Long,
|
||||
@ProtoId(2) val shMsgSeq: Short,
|
||||
@ProtoId(3) val vMsgCookies: ByteArray? = null,
|
||||
@ProtoId(4) val wCmd: Short? = null,
|
||||
@ProtoId(5) val uMsgType: Long? = null,
|
||||
@ProtoId(6) val uAppId: Long? = null,
|
||||
@ProtoId(7) val sendTime: Long? = null,
|
||||
@ProtoId(8) val ssoSeq: Int? = null,
|
||||
@ProtoId(9) val ssoIp: Int? = null,
|
||||
@ProtoId(10) val clientIp: Int? = null
|
||||
@SerialId(0) val fromUin: Long,
|
||||
@SerialId(1) val uMsgTime: Long,
|
||||
@SerialId(2) val shMsgSeq: Short,
|
||||
@SerialId(3) val vMsgCookies: ByteArray? = null,
|
||||
@SerialId(4) val wCmd: Short? = null,
|
||||
@SerialId(5) val uMsgType: Long? = null,
|
||||
@SerialId(6) val uAppId: Long? = null,
|
||||
@SerialId(7) val sendTime: Long? = null,
|
||||
@SerialId(8) val ssoSeq: Int? = null,
|
||||
@SerialId(9) val ssoIp: Int? = null,
|
||||
@SerialId(10) val clientIp: Int? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class DeviceInfo(
|
||||
@ProtoId(0) val netType: Byte? = null,
|
||||
@ProtoId(1) val devType: String? = "",
|
||||
@ProtoId(2) val oSVer: String? = "",
|
||||
@ProtoId(3) val vendorName: String? = "",
|
||||
@ProtoId(4) val vendorOSName: String? = "",
|
||||
@ProtoId(5) val iOSIdfa: String? = ""
|
||||
@SerialId(0) val netType: Byte? = null,
|
||||
@SerialId(1) val devType: String? = "",
|
||||
@SerialId(2) val oSVer: String? = "",
|
||||
@SerialId(3) val vendorName: String? = "",
|
||||
@SerialId(4) val vendorOSName: String? = "",
|
||||
@SerialId(5) val iOSIdfa: String? = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class Name(
|
||||
@ProtoId(0) val fromUin: Long,
|
||||
@ProtoId(1) val uMsgTime: Long,
|
||||
@ProtoId(2) val shMsgType: Short,
|
||||
@ProtoId(3) val shMsgSeq: Short,
|
||||
@ProtoId(4) val msg: String = "",
|
||||
@ProtoId(5) val uRealMsgTime: Int? = null,
|
||||
@ProtoId(6) val vMsg: ByteArray? = null,
|
||||
@ProtoId(7) val uAppShareID: Long? = null,
|
||||
@ProtoId(8) val vMsgCookies: ByteArray? = null,
|
||||
@ProtoId(9) val vAppShareCookie: ByteArray? = null,
|
||||
@ProtoId(10) val msgUid: Long? = null,
|
||||
@ProtoId(11) val lastChangeTime: Long? = 1L,
|
||||
@ProtoId(12) val vCPicInfo: List<CPicInfo>? = null,
|
||||
@ProtoId(13) val stShareData: ShareData? = null,
|
||||
@ProtoId(14) val fromInstId: Long? = null,
|
||||
@ProtoId(15) val vRemarkOfSender: ByteArray? = null,
|
||||
@ProtoId(16) val fromMobile: String? = "",
|
||||
@ProtoId(17) val fromName: String? = "",
|
||||
@ProtoId(18) val vNickName: List<String>? = null,
|
||||
@ProtoId(19) val stC2CTmpMsgHead: TempMsgHead? = null
|
||||
@SerialId(0) val fromUin: Long,
|
||||
@SerialId(1) val uMsgTime: Long,
|
||||
@SerialId(2) val shMsgType: Short,
|
||||
@SerialId(3) val shMsgSeq: Short,
|
||||
@SerialId(4) val msg: String = "",
|
||||
@SerialId(5) val uRealMsgTime: Int? = null,
|
||||
@SerialId(6) val vMsg: ByteArray? = null,
|
||||
@SerialId(7) val uAppShareID: Long? = null,
|
||||
@SerialId(8) val vMsgCookies: ByteArray? = null,
|
||||
@SerialId(9) val vAppShareCookie: ByteArray? = null,
|
||||
@SerialId(10) val msgUid: Long? = null,
|
||||
@SerialId(11) val lastChangeTime: Long? = 1L,
|
||||
@SerialId(12) val vCPicInfo: List<CPicInfo>? = null,
|
||||
@SerialId(13) val stShareData: ShareData? = null,
|
||||
@SerialId(14) val fromInstId: Long? = null,
|
||||
@SerialId(15) val vRemarkOfSender: ByteArray? = null,
|
||||
@SerialId(16) val fromMobile: String? = "",
|
||||
@SerialId(17) val fromName: String? = "",
|
||||
@SerialId(18) val vNickName: List<String>? = null,
|
||||
@SerialId(19) val stC2CTmpMsgHead: TempMsgHead? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class SvcReqPushMsg(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val uMsgTime: Long,
|
||||
@ProtoId(2) val vMsgInfos: List<MsgInfo>,
|
||||
@ProtoId(3) val svrip: Int? = 0,
|
||||
@ProtoId(4) val vSyncCookie: ByteArray? = null,
|
||||
@ProtoId(5) val vUinPairMsg: List<UinPairMsg>? = null,
|
||||
@ProtoId(6) val mPreviews: Map<String, ByteArray>? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val uMsgTime: Long,
|
||||
@SerialId(2) val vMsgInfos: List<MsgInfo>,
|
||||
@SerialId(3) val svrip: Int? = 0,
|
||||
@SerialId(4) val vSyncCookie: ByteArray? = null,
|
||||
@SerialId(5) val vUinPairMsg: List<UinPairMsg>? = null,
|
||||
@SerialId(6) val mPreviews: Map<String, ByteArray>? = null
|
||||
// @SerialId(7) val wUserActive: Int? = null,
|
||||
//@SerialId(12) val wGeneralFlag: Int? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class SvcRespPushMsg(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val vDelInfos: List<DelMsgInfo>,
|
||||
@ProtoId(2) val svrip: Int,
|
||||
@ProtoId(3) val pushToken: ByteArray? = null,
|
||||
@ProtoId(4) val serviceType: Int? = null,
|
||||
@ProtoId(5) val deviceInfo: DeviceInfo? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val vDelInfos: List<DelMsgInfo>,
|
||||
@SerialId(2) val svrip: Int,
|
||||
@SerialId(3) val pushToken: ByteArray? = null,
|
||||
@SerialId(4) val serviceType: Int? = null,
|
||||
@SerialId(5) val deviceInfo: DeviceInfo? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class UinPairMsg(
|
||||
@ProtoId(1) val uLastReadTime: Long? = null,
|
||||
@ProtoId(2) val peerUin: Long? = null,
|
||||
@ProtoId(3) val uMsgCompleted: Long? = null,
|
||||
@ProtoId(4) val vMsgInfos: List<MsgInfo>? = null
|
||||
@SerialId(1) val uLastReadTime: Long? = null,
|
||||
@SerialId(2) val peerUin: Long? = null,
|
||||
@SerialId(3) val uMsgCompleted: Long? = null,
|
||||
@SerialId(4) val vMsgInfos: List<MsgInfo>? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210(
|
||||
@ProtoId(0) val uSubMsgType: Long,
|
||||
@ProtoId(1) val stMsgInfo0x2: MsgType0x210SubMsgType0x2? = null,
|
||||
@ProtoId(3) val stMsgInfo0xa: MsgType0x210SubMsgType0xa? = null,
|
||||
@ProtoId(4) val stMsgInfo0xe: MsgType0x210SubMsgType0xe? = null,
|
||||
@ProtoId(5) val stMsgInfo0x13: MsgType0x210SubMsgType0x13? = null,
|
||||
@ProtoId(6) val stMsgInfo0x17: MsgType0x210SubMsgType0x17? = null,
|
||||
@ProtoId(7) val stMsgInfo0x20: MsgType0x210SubMsgType0x20? = null,
|
||||
@ProtoId(8) val stMsgInfo0x1d: MsgType0x210SubMsgType0x1d? = null,
|
||||
@ProtoId(9) val stMsgInfo0x24: MsgType0x210SubMsgType0x24? = null,
|
||||
@ProtoId(10) val vProtobuf: ByteArray? = null
|
||||
@SerialId(0) val uSubMsgType: Long,
|
||||
@SerialId(1) val stMsgInfo0x2: MsgType0x210SubMsgType0x2? = null,
|
||||
@SerialId(3) val stMsgInfo0xa: MsgType0x210SubMsgType0xa? = null,
|
||||
@SerialId(4) val stMsgInfo0xe: MsgType0x210SubMsgType0xe? = null,
|
||||
@SerialId(5) val stMsgInfo0x13: MsgType0x210SubMsgType0x13? = null,
|
||||
@SerialId(6) val stMsgInfo0x17: MsgType0x210SubMsgType0x17? = null,
|
||||
@SerialId(7) val stMsgInfo0x20: MsgType0x210SubMsgType0x20? = null,
|
||||
@SerialId(8) val stMsgInfo0x1d: MsgType0x210SubMsgType0x1d? = null,
|
||||
@SerialId(9) val stMsgInfo0x24: MsgType0x210SubMsgType0x24? = null,
|
||||
@SerialId(10) val vProtobuf: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0x13(
|
||||
@ProtoId(0) val uint32SrcAppId: Long? = null,
|
||||
@ProtoId(1) val uint32SrcInstId: Long? = null,
|
||||
@ProtoId(2) val uint32DstAppId: Long? = null,
|
||||
@ProtoId(3) val uint32DstInstId: Long? = null,
|
||||
@ProtoId(4) val uint64DstUin: Long? = null,
|
||||
@ProtoId(5) val uint64Sessionid: Long? = null,
|
||||
@ProtoId(6) val uint32Size: Long? = null,
|
||||
@ProtoId(7) val uint32Index: Long? = null,
|
||||
@ProtoId(8) val uint32Type: Long? = null,
|
||||
@ProtoId(9) val buf: ByteArray? = null
|
||||
@SerialId(0) val uint32SrcAppId: Long? = null,
|
||||
@SerialId(1) val uint32SrcInstId: Long? = null,
|
||||
@SerialId(2) val uint32DstAppId: Long? = null,
|
||||
@SerialId(3) val uint32DstInstId: Long? = null,
|
||||
@SerialId(4) val uint64DstUin: Long? = null,
|
||||
@SerialId(5) val uint64Sessionid: Long? = null,
|
||||
@SerialId(6) val uint32Size: Long? = null,
|
||||
@SerialId(7) val uint32Index: Long? = null,
|
||||
@SerialId(8) val uint32Type: Long? = null,
|
||||
@SerialId(9) val buf: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0x17(
|
||||
@ProtoId(0) val dwOpType: Long? = null,
|
||||
@ProtoId(1) val stAddGroup: AddGroup? = null,
|
||||
@ProtoId(2) val stDelGroup: DelGroup? = null,
|
||||
@ProtoId(3) val stModGroupName: ModGroupName? = null,
|
||||
@ProtoId(4) val stModGroupSort: ModGroupSort? = null,
|
||||
@ProtoId(5) val stModFriendGroup: ModFriendGroup? = null
|
||||
@SerialId(0) val dwOpType: Long? = null,
|
||||
@SerialId(1) val stAddGroup: AddGroup? = null,
|
||||
@SerialId(2) val stDelGroup: DelGroup? = null,
|
||||
@SerialId(3) val stModGroupName: ModGroupName? = null,
|
||||
@SerialId(4) val stModGroupSort: ModGroupSort? = null,
|
||||
@SerialId(5) val stModFriendGroup: ModFriendGroup? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class AddGroup(
|
||||
@ProtoId(0) val dwGroupID: Long? = null,
|
||||
@ProtoId(1) val dwSortID: Long? = null,
|
||||
@ProtoId(2) val groupName: String? = ""
|
||||
@SerialId(0) val dwGroupID: Long? = null,
|
||||
@SerialId(1) val dwSortID: Long? = null,
|
||||
@SerialId(2) val groupName: String? = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class DelGroup(
|
||||
@ProtoId(0) val dwGroupID: Long? = null
|
||||
@SerialId(0) val dwGroupID: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class ModFriendGroup(
|
||||
@ProtoId(0) val vMsgFrdGroup: List<FriendGroup>? = null
|
||||
@SerialId(0) val vMsgFrdGroup: List<FriendGroup>? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class FriendGroup(
|
||||
@ProtoId(0) val dwFuin: Long? = null,
|
||||
@ProtoId(1) val vOldGroupID: List<Long>? = null,
|
||||
@ProtoId(2) val vNewGroupID: List<Long>? = null
|
||||
@SerialId(0) val dwFuin: Long? = null,
|
||||
@SerialId(1) val vOldGroupID: List<Long>? = null,
|
||||
@SerialId(2) val vNewGroupID: List<Long>? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class ModGroupName(
|
||||
@ProtoId(0) val dwGroupID: Long? = null,
|
||||
@ProtoId(1) val groupName: String? = ""
|
||||
@SerialId(0) val dwGroupID: Long? = null,
|
||||
@SerialId(1) val groupName: String? = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class ModGroupSort(
|
||||
@ProtoId(0) val vMsgGroupSort: List<GroupSort>? = null
|
||||
@SerialId(0) val vMsgGroupSort: List<GroupSort>? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class GroupSort(
|
||||
@ProtoId(0) val dwGroupID: Long? = null,
|
||||
@ProtoId(1) val dwSortID: Long? = null
|
||||
@SerialId(0) val dwGroupID: Long? = null,
|
||||
@SerialId(1) val dwSortID: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0x1d(
|
||||
@ProtoId(0) val dwOpType: Long? = null,
|
||||
@ProtoId(1) val dwUin: Long? = null,
|
||||
@ProtoId(2) val dwID: Long? = null,
|
||||
@ProtoId(3) val value: String? = ""
|
||||
@SerialId(0) val dwOpType: Long? = null,
|
||||
@SerialId(1) val dwUin: Long? = null,
|
||||
@SerialId(2) val dwID: Long? = null,
|
||||
@SerialId(3) val value: String? = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0x2(
|
||||
@ProtoId(0) val uSrcAppId: Long? = null,
|
||||
@ProtoId(1) val uSrcInstId: Long? = null,
|
||||
@ProtoId(2) val uDstAppId: Long? = null,
|
||||
@ProtoId(3) val uDstInstId: Long? = null,
|
||||
@ProtoId(4) val uDstUin: Long? = null,
|
||||
@ProtoId(5) val fileName: ByteArray? = null,
|
||||
@ProtoId(6) val fileIndex: ByteArray? = null,
|
||||
@ProtoId(7) val fileMd5: ByteArray? = null,
|
||||
@ProtoId(8) val fileKey: ByteArray? = null,
|
||||
@ProtoId(9) val uServerIp: Long? = null,
|
||||
@ProtoId(10) val uServerPort: Long? = null,
|
||||
@ProtoId(11) val fileLen: Long? = null,
|
||||
@ProtoId(12) val sessionId: Long? = null,
|
||||
@ProtoId(13) val originfileMd5: ByteArray? = null,
|
||||
@ProtoId(14) val uOriginfiletype: Long? = null,
|
||||
@ProtoId(15) val uSeq: Long? = null
|
||||
@SerialId(0) val uSrcAppId: Long? = null,
|
||||
@SerialId(1) val uSrcInstId: Long? = null,
|
||||
@SerialId(2) val uDstAppId: Long? = null,
|
||||
@SerialId(3) val uDstInstId: Long? = null,
|
||||
@SerialId(4) val uDstUin: Long? = null,
|
||||
@SerialId(5) val fileName: ByteArray? = null,
|
||||
@SerialId(6) val fileIndex: ByteArray? = null,
|
||||
@SerialId(7) val fileMd5: ByteArray? = null,
|
||||
@SerialId(8) val fileKey: ByteArray? = null,
|
||||
@SerialId(9) val uServerIp: Long? = null,
|
||||
@SerialId(10) val uServerPort: Long? = null,
|
||||
@SerialId(11) val fileLen: Long? = null,
|
||||
@SerialId(12) val sessionId: Long? = null,
|
||||
@SerialId(13) val originfileMd5: ByteArray? = null,
|
||||
@SerialId(14) val uOriginfiletype: Long? = null,
|
||||
@SerialId(15) val uSeq: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0x20(
|
||||
@ProtoId(0) val dwOpType: Long? = null,
|
||||
@ProtoId(1) val dwType: Long? = null,
|
||||
@ProtoId(2) val dwUin: Long? = null,
|
||||
@ProtoId(3) val remaek: String? = ""
|
||||
@SerialId(0) val dwOpType: Long? = null,
|
||||
@SerialId(1) val dwType: Long? = null,
|
||||
@SerialId(2) val dwUin: Long? = null,
|
||||
@SerialId(3) val remaek: String? = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0x24(
|
||||
@ProtoId(0) val vPluginNumList: List<PluginNum>? = null
|
||||
@SerialId(0) val vPluginNumList: List<PluginNum>? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class PluginNum(
|
||||
@ProtoId(0) val dwID: Long? = null,
|
||||
@ProtoId(1) val dwNUm: Long? = null,
|
||||
@ProtoId(2) val flag: Byte? = null
|
||||
@SerialId(0) val dwID: Long? = null,
|
||||
@SerialId(1) val dwNUm: Long? = null,
|
||||
@SerialId(2) val flag: Byte? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0xa(
|
||||
@ProtoId(0) val uSrcAppId: Long? = null,
|
||||
@ProtoId(1) val uSrcInstId: Long? = null,
|
||||
@ProtoId(2) val uDstAppId: Long? = null,
|
||||
@ProtoId(3) val uDstInstId: Long? = null,
|
||||
@ProtoId(4) val uDstUin: Long? = null,
|
||||
@ProtoId(5) val uType: Long? = null,
|
||||
@ProtoId(6) val uServerIp: Long? = null,
|
||||
@ProtoId(7) val uServerPort: Long? = null,
|
||||
@ProtoId(8) val vUrlNotify: ByteArray? = null,
|
||||
@ProtoId(9) val vTokenKey: ByteArray? = null,
|
||||
@ProtoId(10) val uFileLen: Long? = null,
|
||||
@ProtoId(11) val fileName: ByteArray? = null,
|
||||
@ProtoId(12) val vMd5: ByteArray? = null,
|
||||
@ProtoId(13) val sessionId: Long? = null,
|
||||
@ProtoId(14) val originfileMd5: ByteArray? = null,
|
||||
@ProtoId(15) val uOriginfiletype: Long? = null,
|
||||
@ProtoId(16) val uSeq: Long? = null
|
||||
@SerialId(0) val uSrcAppId: Long? = null,
|
||||
@SerialId(1) val uSrcInstId: Long? = null,
|
||||
@SerialId(2) val uDstAppId: Long? = null,
|
||||
@SerialId(3) val uDstInstId: Long? = null,
|
||||
@SerialId(4) val uDstUin: Long? = null,
|
||||
@SerialId(5) val uType: Long? = null,
|
||||
@SerialId(6) val uServerIp: Long? = null,
|
||||
@SerialId(7) val uServerPort: Long? = null,
|
||||
@SerialId(8) val vUrlNotify: ByteArray? = null,
|
||||
@SerialId(9) val vTokenKey: ByteArray? = null,
|
||||
@SerialId(10) val uFileLen: Long? = null,
|
||||
@SerialId(11) val fileName: ByteArray? = null,
|
||||
@SerialId(12) val vMd5: ByteArray? = null,
|
||||
@SerialId(13) val sessionId: Long? = null,
|
||||
@SerialId(14) val originfileMd5: ByteArray? = null,
|
||||
@SerialId(15) val uOriginfiletype: Long? = null,
|
||||
@SerialId(16) val uSeq: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210SubMsgType0xe(
|
||||
@ProtoId(0) val uint32SrcAppId: Long? = null,
|
||||
@ProtoId(1) val uint32SrcInstId: Long? = null,
|
||||
@ProtoId(2) val uint32DstAppId: Long? = null,
|
||||
@ProtoId(3) val uint32DstInstId: Long? = null,
|
||||
@ProtoId(4) val uint64DstUin: Long? = null,
|
||||
@ProtoId(5) val uint64Sessionid: Long? = null,
|
||||
@ProtoId(6) val uint32Operate: Long? = null,
|
||||
@ProtoId(7) val uint32Seq: Long? = null,
|
||||
@ProtoId(8) val uint32Code: Long? = null,
|
||||
@ProtoId(9) val msg: String? = ""
|
||||
@SerialId(0) val uint32SrcAppId: Long? = null,
|
||||
@SerialId(1) val uint32SrcInstId: Long? = null,
|
||||
@SerialId(2) val uint32DstAppId: Long? = null,
|
||||
@SerialId(3) val uint32DstInstId: Long? = null,
|
||||
@SerialId(4) val uint64DstUin: Long? = null,
|
||||
@SerialId(5) val uint64Sessionid: Long? = null,
|
||||
@SerialId(6) val uint32Operate: Long? = null,
|
||||
@SerialId(7) val uint32Seq: Long? = null,
|
||||
@SerialId(8) val uint32Code: Long? = null,
|
||||
@SerialId(9) val msg: String? = ""
|
||||
) : JceStruct
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.data.Packet
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
@ -18,63 +18,63 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
@Suppress("ArrayInDataClass")
|
||||
@Serializable
|
||||
internal data class RequestPushNotify(
|
||||
@ProtoId(0) val uin: Long? = 0L,
|
||||
@ProtoId(1) val ctype: Byte = 0,
|
||||
@ProtoId(2) val strService: String?,
|
||||
@ProtoId(3) val strCmd: String?,
|
||||
@ProtoId(4) val vNotifyCookie: ByteArray? = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val usMsgType: Int?,
|
||||
@ProtoId(6) val wUserActive: Int?,
|
||||
@ProtoId(7) val wGeneralFlag: Int?,
|
||||
@ProtoId(8) val bindedUin: Long?,
|
||||
@ProtoId(9) val stMsgInfo: MsgInfo?,
|
||||
@ProtoId(10) val msgCtrlBuf: String?,
|
||||
@ProtoId(11) val serverBuf: ByteArray?,
|
||||
@ProtoId(12) val pingFlag: Long?,
|
||||
@ProtoId(13) val svrip: Int?
|
||||
@SerialId(0) val uin: Long? = 0L,
|
||||
@SerialId(1) val ctype: Byte = 0,
|
||||
@SerialId(2) val strService: String?,
|
||||
@SerialId(3) val strCmd: String?,
|
||||
@SerialId(4) val vNotifyCookie: ByteArray? = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val usMsgType: Int?,
|
||||
@SerialId(6) val wUserActive: Int?,
|
||||
@SerialId(7) val wGeneralFlag: Int?,
|
||||
@SerialId(8) val bindedUin: Long?,
|
||||
@SerialId(9) val stMsgInfo: MsgInfo?,
|
||||
@SerialId(10) val msgCtrlBuf: String?,
|
||||
@SerialId(11) val serverBuf: ByteArray?,
|
||||
@SerialId(12) val pingFlag: Long?,
|
||||
@SerialId(13) val svrip: Int?
|
||||
) : JceStruct, Packet
|
||||
|
||||
@Serializable
|
||||
internal class MsgInfo(
|
||||
@ProtoId(0) val lFromUin: Long? = 0L,
|
||||
@ProtoId(1) val uMsgTime: Long? = 0L,
|
||||
@ProtoId(2) val shMsgType: Short,
|
||||
@ProtoId(3) val shMsgSeq: Short,
|
||||
@ProtoId(4) val strMsg: String?,
|
||||
@ProtoId(5) val uRealMsgTime: Int?,
|
||||
@ProtoId(6) val vMsg: ByteArray?,
|
||||
@ProtoId(7) val uAppShareID: Long?,
|
||||
@ProtoId(8) val vMsgCookies: ByteArray? = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(9) val vAppShareCookie: ByteArray? = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val lMsgUid: Long?,
|
||||
@ProtoId(11) val lLastChangeTime: Long?,
|
||||
@ProtoId(12) val vCPicInfo: List<CPicInfo>?,
|
||||
@ProtoId(13) val stShareData: ShareData?,
|
||||
@ProtoId(14) val lFromInstId: Long?,
|
||||
@ProtoId(15) val vRemarkOfSender: ByteArray?,
|
||||
@ProtoId(16) val strFromMobile: String?,
|
||||
@ProtoId(17) val strFromName: String?,
|
||||
@ProtoId(18) val vNickName: List<String>?//,
|
||||
@SerialId(0) val lFromUin: Long? = 0L,
|
||||
@SerialId(1) val uMsgTime: Long? = 0L,
|
||||
@SerialId(2) val shMsgType: Short,
|
||||
@SerialId(3) val shMsgSeq: Short,
|
||||
@SerialId(4) val strMsg: String?,
|
||||
@SerialId(5) val uRealMsgTime: Int?,
|
||||
@SerialId(6) val vMsg: ByteArray?,
|
||||
@SerialId(7) val uAppShareID: Long?,
|
||||
@SerialId(8) val vMsgCookies: ByteArray? = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(9) val vAppShareCookie: ByteArray? = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val lMsgUid: Long?,
|
||||
@SerialId(11) val lLastChangeTime: Long?,
|
||||
@SerialId(12) val vCPicInfo: List<CPicInfo>?,
|
||||
@SerialId(13) val stShareData: ShareData?,
|
||||
@SerialId(14) val lFromInstId: Long?,
|
||||
@SerialId(15) val vRemarkOfSender: ByteArray?,
|
||||
@SerialId(16) val strFromMobile: String?,
|
||||
@SerialId(17) val strFromName: String?,
|
||||
@SerialId(18) val vNickName: List<String>?//,
|
||||
//@SerialId(19) val stC2CTmpMsgHead: TempMsgHead?
|
||||
) : JceStruct
|
||||
|
||||
|
||||
@Serializable
|
||||
internal class ShareData(
|
||||
@ProtoId(0) val pkgname: String = "",
|
||||
@ProtoId(1) val msgtail: String = "",
|
||||
@ProtoId(2) val picurl: String = "",
|
||||
@ProtoId(3) val url: String = ""
|
||||
@SerialId(0) val pkgname: String = "",
|
||||
@SerialId(1) val msgtail: String = "",
|
||||
@SerialId(2) val picurl: String = "",
|
||||
@SerialId(3) val url: String = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class TempMsgHead(
|
||||
@ProtoId(0) val c2c_type: Int? = 0,
|
||||
@ProtoId(1) val serviceType: Int? = 0
|
||||
@SerialId(0) val c2c_type: Int? = 0,
|
||||
@SerialId(1) val serviceType: Int? = 0
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class CPicInfo(
|
||||
@ProtoId(0) val vPath: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(1) val vHost: ByteArray? = EMPTY_BYTE_ARRAY
|
||||
@SerialId(0) val vPath: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(1) val vHost: ByteArray? = EMPTY_BYTE_ARRAY
|
||||
) : JceStruct
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,29 +18,29 @@ private val EMPTY_MAP = mapOf<String, String>()
|
||||
|
||||
@Serializable
|
||||
internal class RequestPacket(
|
||||
@ProtoId(1) val iVersion: Short = 3,
|
||||
@ProtoId(2) val cPacketType: Byte = 0,
|
||||
@ProtoId(3) val iMessageType: Int = 0,
|
||||
@ProtoId(4) val iRequestId: Int,
|
||||
@ProtoId(5) val sServantName: String = "",
|
||||
@ProtoId(6) val sFuncName: String = "",
|
||||
@ProtoId(7) val sBuffer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val iTimeout: Int? = 0,
|
||||
@ProtoId(9) val context: Map<String, String>? = EMPTY_MAP,
|
||||
@ProtoId(10) val status: Map<String, String>? = EMPTY_MAP
|
||||
@SerialId(1) val iVersion: Short = 3,
|
||||
@SerialId(2) val cPacketType: Byte = 0,
|
||||
@SerialId(3) val iMessageType: Int = 0,
|
||||
@SerialId(4) val iRequestId: Int,
|
||||
@SerialId(5) val sServantName: String = "",
|
||||
@SerialId(6) val sFuncName: String = "",
|
||||
@SerialId(7) val sBuffer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val iTimeout: Int? = 0,
|
||||
@SerialId(9) val context: Map<String, String>? = EMPTY_MAP,
|
||||
@SerialId(10) val status: Map<String, String>? = EMPTY_MAP
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class RequestDataVersion3(
|
||||
@ProtoId(0) val map: Map<String, ByteArray> // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的
|
||||
@SerialId(0) val map: Map<String, ByteArray> // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class RequestDataVersion2(
|
||||
@ProtoId(0) val map: Map<String, Map<String, ByteArray>>
|
||||
@SerialId(0) val map: Map<String, Map<String, ByteArray>>
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class RequestDataStructSvcReqRegister(
|
||||
@ProtoId(0) val struct: SvcReqRegister
|
||||
@SerialId(0) val struct: SvcReqRegister
|
||||
) : JceStruct
|
@ -9,14 +9,14 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class RequestPushForceOffline(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val title: String? = "",
|
||||
@ProtoId(2) val tips: String? = "",
|
||||
@ProtoId(3) val sameDevice: Byte? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val title: String? = "",
|
||||
@SerialId(2) val tips: String? = "",
|
||||
@SerialId(3) val sameDevice: Byte? = null
|
||||
) : JceStruct
|
@ -9,47 +9,47 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class SvcReqRegister(
|
||||
@ProtoId(0) val lUin: Long = 0L,
|
||||
@ProtoId(1) val lBid: Long = 0L,
|
||||
@ProtoId(2) val cConnType: Byte = 0,
|
||||
@ProtoId(3) val sOther: String = "",
|
||||
@ProtoId(4) val iStatus: Int = 11,
|
||||
@ProtoId(5) val bOnlinePush: Byte = 0,
|
||||
@ProtoId(6) val bIsOnline: Byte = 0,
|
||||
@ProtoId(7) val bIsShowOnline: Byte = 0,
|
||||
@ProtoId(8) val bKikPC: Byte = 0,
|
||||
@ProtoId(9) val bKikWeak: Byte = 0,
|
||||
@ProtoId(10) val timeStamp: Long = 0L,
|
||||
@ProtoId(11) val iOSVersion: Long = 0L,
|
||||
@ProtoId(12) val cNetType: Byte = 0,
|
||||
@ProtoId(13) val sBuildVer: String? = "",
|
||||
@ProtoId(14) val bRegType: Byte = 0,
|
||||
@ProtoId(15) val vecDevParam: ByteArray? = null,
|
||||
@ProtoId(16) val vecGuid: ByteArray? = null,
|
||||
@ProtoId(17) val iLocaleID: Int = 2052,
|
||||
@ProtoId(18) val bSlientPush: Byte = 0,
|
||||
@ProtoId(19) val strDevName: String? = null,
|
||||
@ProtoId(20) val strDevType: String? = null,
|
||||
@ProtoId(21) val strOSVer: String? = null,
|
||||
@ProtoId(22) val bOpenPush: Byte = 1,
|
||||
@ProtoId(23) val iLargeSeq: Long = 0L,
|
||||
@ProtoId(24) val iLastWatchStartTime: Long = 0L,
|
||||
@ProtoId(26) val uOldSSOIp: Long = 0L,
|
||||
@ProtoId(27) val uNewSSOIp: Long = 0L,
|
||||
@ProtoId(28) val sChannelNo: String? = null,
|
||||
@ProtoId(29) val lCpId: Long = 0L,
|
||||
@ProtoId(30) val strVendorName: String? = null,
|
||||
@ProtoId(31) val strVendorOSName: String? = null,
|
||||
@ProtoId(32) val strIOSIdfa: String? = null,
|
||||
@ProtoId(33) val bytes_0x769_reqbody: ByteArray? = null,
|
||||
@ProtoId(34) val bIsSetStatus: Byte = 0,
|
||||
@ProtoId(35) val vecServerBuf: ByteArray? = null,
|
||||
@ProtoId(36) val bSetMute: Byte = 0
|
||||
@SerialId(0) val lUin: Long = 0L,
|
||||
@SerialId(1) val lBid: Long = 0L,
|
||||
@SerialId(2) val cConnType: Byte = 0,
|
||||
@SerialId(3) val sOther: String = "",
|
||||
@SerialId(4) val iStatus: Int = 11,
|
||||
@SerialId(5) val bOnlinePush: Byte = 0,
|
||||
@SerialId(6) val bIsOnline: Byte = 0,
|
||||
@SerialId(7) val bIsShowOnline: Byte = 0,
|
||||
@SerialId(8) val bKikPC: Byte = 0,
|
||||
@SerialId(9) val bKikWeak: Byte = 0,
|
||||
@SerialId(10) val timeStamp: Long = 0L,
|
||||
@SerialId(11) val iOSVersion: Long = 0L,
|
||||
@SerialId(12) val cNetType: Byte = 0,
|
||||
@SerialId(13) val sBuildVer: String? = "",
|
||||
@SerialId(14) val bRegType: Byte = 0,
|
||||
@SerialId(15) val vecDevParam: ByteArray? = null,
|
||||
@SerialId(16) val vecGuid: ByteArray? = null,
|
||||
@SerialId(17) val iLocaleID: Int = 2052,
|
||||
@SerialId(18) val bSlientPush: Byte = 0,
|
||||
@SerialId(19) val strDevName: String? = null,
|
||||
@SerialId(20) val strDevType: String? = null,
|
||||
@SerialId(21) val strOSVer: String? = null,
|
||||
@SerialId(22) val bOpenPush: Byte = 1,
|
||||
@SerialId(23) val iLargeSeq: Long = 0L,
|
||||
@SerialId(24) val iLastWatchStartTime: Long = 0L,
|
||||
@SerialId(26) val uOldSSOIp: Long = 0L,
|
||||
@SerialId(27) val uNewSSOIp: Long = 0L,
|
||||
@SerialId(28) val sChannelNo: String? = null,
|
||||
@SerialId(29) val lCpId: Long = 0L,
|
||||
@SerialId(30) val strVendorName: String? = null,
|
||||
@SerialId(31) val strVendorOSName: String? = null,
|
||||
@SerialId(32) val strIOSIdfa: String? = null,
|
||||
@SerialId(33) val bytes_0x769_reqbody: ByteArray? = null,
|
||||
@SerialId(34) val bIsSetStatus: Byte = 0,
|
||||
@SerialId(35) val vecServerBuf: ByteArray? = null,
|
||||
@SerialId(36) val bSetMute: Byte = 0
|
||||
// @SerialId(25) var vecBindUin: ArrayList<*>? = null // ?? 未知泛型
|
||||
) : JceStruct
|
@ -9,183 +9,183 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class GetTroopListReqV2Simplify(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val getMSFMsgFlag: Byte? = null,
|
||||
@ProtoId(2) val vecCookies: ByteArray? = null,
|
||||
@ProtoId(3) val vecGroupInfo: List<StTroopNumSimplify>? = null,
|
||||
@ProtoId(4) val groupFlagExt: Byte? = null,
|
||||
@ProtoId(5) val shVersion: Int? = null,
|
||||
@ProtoId(6) val dwCompanyId: Long? = null,
|
||||
@ProtoId(7) val versionNum: Long? = null,
|
||||
@ProtoId(8) val getLongGroupName: Byte? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val getMSFMsgFlag: Byte? = null,
|
||||
@SerialId(2) val vecCookies: ByteArray? = null,
|
||||
@SerialId(3) val vecGroupInfo: List<StTroopNumSimplify>? = null,
|
||||
@SerialId(4) val groupFlagExt: Byte? = null,
|
||||
@SerialId(5) val shVersion: Int? = null,
|
||||
@SerialId(6) val dwCompanyId: Long? = null,
|
||||
@SerialId(7) val versionNum: Long? = null,
|
||||
@SerialId(8) val getLongGroupName: Byte? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class StTroopNumSimplify(
|
||||
@ProtoId(0) val groupCode: Long,
|
||||
@ProtoId(1) val dwGroupInfoSeq: Long? = null,
|
||||
@ProtoId(2) val dwGroupFlagExt: Long? = null,
|
||||
@ProtoId(3) val dwGroupRankSeq: Long? = null
|
||||
@SerialId(0) val groupCode: Long,
|
||||
@SerialId(1) val dwGroupInfoSeq: Long? = null,
|
||||
@SerialId(2) val dwGroupFlagExt: Long? = null,
|
||||
@SerialId(3) val dwGroupRankSeq: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
|
||||
@Serializable
|
||||
internal class GetTroopListRespV2(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val troopCount: Short,
|
||||
@ProtoId(2) val result: Int,
|
||||
@ProtoId(3) val errorCode: Short? = null,
|
||||
@ProtoId(4) val vecCookies: ByteArray? = null,
|
||||
@ProtoId(5) val vecTroopList: List<StTroopNum>? = null,
|
||||
@ProtoId(6) val vecTroopListDel: List<StTroopNum>? = null,
|
||||
@ProtoId(7) val vecTroopRank: List<StGroupRankInfo>? = null,
|
||||
@ProtoId(8) val vecFavGroup: List<StFavoriteGroup>? = null,
|
||||
@ProtoId(9) val vecTroopListExt: List<StTroopNum>? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val troopCount: Short,
|
||||
@SerialId(2) val result: Int,
|
||||
@SerialId(3) val errorCode: Short? = null,
|
||||
@SerialId(4) val vecCookies: ByteArray? = null,
|
||||
@SerialId(5) val vecTroopList: List<StTroopNum>? = null,
|
||||
@SerialId(6) val vecTroopListDel: List<StTroopNum>? = null,
|
||||
@SerialId(7) val vecTroopRank: List<StGroupRankInfo>? = null,
|
||||
@SerialId(8) val vecFavGroup: List<StFavoriteGroup>? = null,
|
||||
@SerialId(9) val vecTroopListExt: List<StTroopNum>? = null
|
||||
) : JceStruct
|
||||
|
||||
|
||||
@Serializable
|
||||
internal class StTroopNum(
|
||||
@ProtoId(0) val groupUin: Long,
|
||||
@ProtoId(1) val groupCode: Long,
|
||||
@ProtoId(2) val flag: Byte? = null,
|
||||
@ProtoId(3) val dwGroupInfoSeq: Long? = null,
|
||||
@ProtoId(4) val groupName: String = "",
|
||||
@ProtoId(5) val groupMemo: String = "",
|
||||
@ProtoId(6) val dwGroupFlagExt: Long? = null,
|
||||
@ProtoId(7) val dwGroupRankSeq: Long? = null,
|
||||
@ProtoId(8) val dwCertificationType: Long? = null,
|
||||
@ProtoId(9) val dwShutUpTimestamp: Long? = null,
|
||||
@ProtoId(10) val dwMyShutUpTimestamp: Long? = null,
|
||||
@ProtoId(11) val dwCmdUinUinFlag: Long? = null,
|
||||
@ProtoId(12) val dwAdditionalFlag: Long? = null,
|
||||
@ProtoId(13) val dwGroupTypeFlag: Long? = null,
|
||||
@ProtoId(14) val dwGroupSecType: Long? = null,
|
||||
@ProtoId(15) val dwGroupSecTypeInfo: Long? = null,
|
||||
@ProtoId(16) val dwGroupClassExt: Long? = null,
|
||||
@ProtoId(17) val dwAppPrivilegeFlag: Long? = null,
|
||||
@ProtoId(18) val dwSubscriptionUin: Long? = null,
|
||||
@ProtoId(19) val dwMemberNum: Long? = null,
|
||||
@ProtoId(20) val dwMemberNumSeq: Long? = null,
|
||||
@ProtoId(21) val dwMemberCardSeq: Long? = null,
|
||||
@ProtoId(22) val dwGroupFlagExt3: Long? = null,
|
||||
@ProtoId(23) val dwGroupOwnerUin: Long,
|
||||
@ProtoId(24) val isConfGroup: Byte? = null,
|
||||
@ProtoId(25) val isModifyConfGroupFace: Byte? = null,
|
||||
@ProtoId(26) val isModifyConfGroupName: Byte? = null,
|
||||
@ProtoId(27) val dwCmduinJoinTime: Long? = null,
|
||||
@ProtoId(28) val ulCompanyId: Long? = null,
|
||||
@ProtoId(29) val dwMaxGroupMemberNum: Long? = null,
|
||||
@ProtoId(30) val dwCmdUinGroupMask: Long? = null,
|
||||
@ProtoId(31) val udwHLGuildAppid: Long? = null,
|
||||
@ProtoId(32) val udwHLGuildSubType: Long? = null,
|
||||
@ProtoId(33) val udwCmdUinRingtoneID: Long? = null,
|
||||
@ProtoId(34) val udwCmdUinFlagEx2: Long? = null
|
||||
@SerialId(0) val groupUin: Long,
|
||||
@SerialId(1) val groupCode: Long,
|
||||
@SerialId(2) val flag: Byte? = null,
|
||||
@SerialId(3) val dwGroupInfoSeq: Long? = null,
|
||||
@SerialId(4) val groupName: String = "",
|
||||
@SerialId(5) val groupMemo: String = "",
|
||||
@SerialId(6) val dwGroupFlagExt: Long? = null,
|
||||
@SerialId(7) val dwGroupRankSeq: Long? = null,
|
||||
@SerialId(8) val dwCertificationType: Long? = null,
|
||||
@SerialId(9) val dwShutUpTimestamp: Long? = null,
|
||||
@SerialId(10) val dwMyShutUpTimestamp: Long? = null,
|
||||
@SerialId(11) val dwCmdUinUinFlag: Long? = null,
|
||||
@SerialId(12) val dwAdditionalFlag: Long? = null,
|
||||
@SerialId(13) val dwGroupTypeFlag: Long? = null,
|
||||
@SerialId(14) val dwGroupSecType: Long? = null,
|
||||
@SerialId(15) val dwGroupSecTypeInfo: Long? = null,
|
||||
@SerialId(16) val dwGroupClassExt: Long? = null,
|
||||
@SerialId(17) val dwAppPrivilegeFlag: Long? = null,
|
||||
@SerialId(18) val dwSubscriptionUin: Long? = null,
|
||||
@SerialId(19) val dwMemberNum: Long? = null,
|
||||
@SerialId(20) val dwMemberNumSeq: Long? = null,
|
||||
@SerialId(21) val dwMemberCardSeq: Long? = null,
|
||||
@SerialId(22) val dwGroupFlagExt3: Long? = null,
|
||||
@SerialId(23) val dwGroupOwnerUin: Long,
|
||||
@SerialId(24) val isConfGroup: Byte? = null,
|
||||
@SerialId(25) val isModifyConfGroupFace: Byte? = null,
|
||||
@SerialId(26) val isModifyConfGroupName: Byte? = null,
|
||||
@SerialId(27) val dwCmduinJoinTime: Long? = null,
|
||||
@SerialId(28) val ulCompanyId: Long? = null,
|
||||
@SerialId(29) val dwMaxGroupMemberNum: Long? = null,
|
||||
@SerialId(30) val dwCmdUinGroupMask: Long? = null,
|
||||
@SerialId(31) val udwHLGuildAppid: Long? = null,
|
||||
@SerialId(32) val udwHLGuildSubType: Long? = null,
|
||||
@SerialId(33) val udwCmdUinRingtoneID: Long? = null,
|
||||
@SerialId(34) val udwCmdUinFlagEx2: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class StGroupRankInfo(
|
||||
@ProtoId(0) val dwGroupCode: Long,
|
||||
@ProtoId(1) val groupRankSysFlag: Byte? = null,
|
||||
@ProtoId(2) val groupRankUserFlag: Byte? = null,
|
||||
@ProtoId(3) val vecRankMap: List<StLevelRankPair>? = null,
|
||||
@ProtoId(4) val dwGroupRankSeq: Long? = null,
|
||||
@ProtoId(5) val ownerName: String? = "",
|
||||
@ProtoId(6) val adminName: String? = "",
|
||||
@ProtoId(7) val dwOfficeMode: Long? = null
|
||||
@SerialId(0) val dwGroupCode: Long,
|
||||
@SerialId(1) val groupRankSysFlag: Byte? = null,
|
||||
@SerialId(2) val groupRankUserFlag: Byte? = null,
|
||||
@SerialId(3) val vecRankMap: List<StLevelRankPair>? = null,
|
||||
@SerialId(4) val dwGroupRankSeq: Long? = null,
|
||||
@SerialId(5) val ownerName: String? = "",
|
||||
@SerialId(6) val adminName: String? = "",
|
||||
@SerialId(7) val dwOfficeMode: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class StFavoriteGroup(
|
||||
@ProtoId(0) val dwGroupCode: Long,
|
||||
@ProtoId(1) val dwTimestamp: Long? = null,
|
||||
@ProtoId(2) val dwSnsFlag: Long? = 1L,
|
||||
@ProtoId(3) val dwOpenTimestamp: Long? = null
|
||||
@SerialId(0) val dwGroupCode: Long,
|
||||
@SerialId(1) val dwTimestamp: Long? = null,
|
||||
@SerialId(2) val dwSnsFlag: Long? = 1L,
|
||||
@SerialId(3) val dwOpenTimestamp: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class StLevelRankPair(
|
||||
@ProtoId(0) val dwLevel: Long? = null,
|
||||
@ProtoId(1) val rank: String? = ""
|
||||
@SerialId(0) val dwLevel: Long? = null,
|
||||
@SerialId(1) val rank: String? = ""
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class GetTroopMemberListReq(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val groupCode: Long,
|
||||
@ProtoId(2) val nextUin: Long,
|
||||
@ProtoId(3) val groupUin: Long,
|
||||
@ProtoId(4) val version: Long? = null,
|
||||
@ProtoId(5) val reqType: Long? = null,
|
||||
@ProtoId(6) val getListAppointTime: Long? = null,
|
||||
@ProtoId(7) val richCardNameVer: Byte? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val groupCode: Long,
|
||||
@SerialId(2) val nextUin: Long,
|
||||
@SerialId(3) val groupUin: Long,
|
||||
@SerialId(4) val version: Long? = null,
|
||||
@SerialId(5) val reqType: Long? = null,
|
||||
@SerialId(6) val getListAppointTime: Long? = null,
|
||||
@SerialId(7) val richCardNameVer: Byte? = null
|
||||
) : JceStruct
|
||||
|
||||
|
||||
@Serializable
|
||||
internal class GetTroopMemberListResp(
|
||||
@ProtoId(0) val uin: Long,
|
||||
@ProtoId(1) val groupCode: Long,
|
||||
@ProtoId(2) val groupUin: Long,
|
||||
@ProtoId(3) val vecTroopMember: List<StTroopMemberInfo>,
|
||||
@ProtoId(4) val nextUin: Long,
|
||||
@ProtoId(5) val result: Int,
|
||||
@ProtoId(6) val errorCode: Short? = null,
|
||||
@ProtoId(7) val officeMode: Long? = null,
|
||||
@ProtoId(8) val nextGetTime: Long? = null
|
||||
@SerialId(0) val uin: Long,
|
||||
@SerialId(1) val groupCode: Long,
|
||||
@SerialId(2) val groupUin: Long,
|
||||
@SerialId(3) val vecTroopMember: List<StTroopMemberInfo>,
|
||||
@SerialId(4) val nextUin: Long,
|
||||
@SerialId(5) val result: Int,
|
||||
@SerialId(6) val errorCode: Short? = null,
|
||||
@SerialId(7) val officeMode: Long? = null,
|
||||
@SerialId(8) val nextGetTime: Long? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class StTroopMemberInfo(
|
||||
@ProtoId(0) val memberUin: Long,
|
||||
@ProtoId(1) val faceId: Short,
|
||||
@ProtoId(2) val age: Byte,
|
||||
@ProtoId(3) val gender: Byte,
|
||||
@ProtoId(4) val nick: String = "",
|
||||
@ProtoId(5) val status: Byte = 20,
|
||||
@ProtoId(6) val sShowName: String? = null,
|
||||
@ProtoId(8) val sName: String? = null,
|
||||
@ProtoId(9) val cGender: Byte? = null,
|
||||
@ProtoId(10) val sPhone: String? = "",
|
||||
@ProtoId(11) val sEmail: String? = "",
|
||||
@ProtoId(12) val sMemo: String? = "",
|
||||
@ProtoId(13) val autoRemark: String? = "",
|
||||
@ProtoId(14) val dwMemberLevel: Long? = null,
|
||||
@ProtoId(15) val dwJoinTime: Long? = null,
|
||||
@ProtoId(16) val dwLastSpeakTime: Long? = null,
|
||||
@ProtoId(17) val dwCreditLevel: Long? = null,
|
||||
@ProtoId(18) val dwFlag: Long? = null,
|
||||
@ProtoId(19) val dwFlagExt: Long? = null,
|
||||
@ProtoId(20) val dwPoint: Long? = null,
|
||||
@ProtoId(21) val concerned: Byte? = null,
|
||||
@ProtoId(22) val shielded: Byte? = null,
|
||||
@ProtoId(23) val sSpecialTitle: String? = "",
|
||||
@ProtoId(24) val dwSpecialTitleExpireTime: Long? = null,
|
||||
@ProtoId(25) val job: String? = "",
|
||||
@ProtoId(26) val apolloFlag: Byte? = null,
|
||||
@ProtoId(27) val dwApolloTimestamp: Long? = null,
|
||||
@ProtoId(28) val dwGlobalGroupLevel: Long? = null,
|
||||
@ProtoId(29) val dwTitleId: Long? = null,
|
||||
@ProtoId(30) val dwShutupTimestap: Long? = null,
|
||||
@ProtoId(31) val dwGlobalGroupPoint: Long? = null,
|
||||
@ProtoId(32) val qzusrinfo: QzoneUserInfo? = null,
|
||||
@ProtoId(33) val richCardNameVer: Byte? = null,
|
||||
@ProtoId(34) val dwVipType: Long? = null,
|
||||
@ProtoId(35) val dwVipLevel: Long? = null,
|
||||
@ProtoId(36) val dwBigClubLevel: Long? = null,
|
||||
@ProtoId(37) val dwBigClubFlag: Long? = null,
|
||||
@ProtoId(38) val dwNameplate: Long? = null,
|
||||
@ProtoId(39) val vecGroupHonor: ByteArray? = null
|
||||
@SerialId(0) val memberUin: Long,
|
||||
@SerialId(1) val faceId: Short,
|
||||
@SerialId(2) val age: Byte,
|
||||
@SerialId(3) val gender: Byte,
|
||||
@SerialId(4) val nick: String = "",
|
||||
@SerialId(5) val status: Byte = 20,
|
||||
@SerialId(6) val sShowName: String? = null,
|
||||
@SerialId(8) val sName: String? = null,
|
||||
@SerialId(9) val cGender: Byte? = null,
|
||||
@SerialId(10) val sPhone: String? = "",
|
||||
@SerialId(11) val sEmail: String? = "",
|
||||
@SerialId(12) val sMemo: String? = "",
|
||||
@SerialId(13) val autoRemark: String? = "",
|
||||
@SerialId(14) val dwMemberLevel: Long? = null,
|
||||
@SerialId(15) val dwJoinTime: Long? = null,
|
||||
@SerialId(16) val dwLastSpeakTime: Long? = null,
|
||||
@SerialId(17) val dwCreditLevel: Long? = null,
|
||||
@SerialId(18) val dwFlag: Long? = null,
|
||||
@SerialId(19) val dwFlagExt: Long? = null,
|
||||
@SerialId(20) val dwPoint: Long? = null,
|
||||
@SerialId(21) val concerned: Byte? = null,
|
||||
@SerialId(22) val shielded: Byte? = null,
|
||||
@SerialId(23) val sSpecialTitle: String? = "",
|
||||
@SerialId(24) val dwSpecialTitleExpireTime: Long? = null,
|
||||
@SerialId(25) val job: String? = "",
|
||||
@SerialId(26) val apolloFlag: Byte? = null,
|
||||
@SerialId(27) val dwApolloTimestamp: Long? = null,
|
||||
@SerialId(28) val dwGlobalGroupLevel: Long? = null,
|
||||
@SerialId(29) val dwTitleId: Long? = null,
|
||||
@SerialId(30) val dwShutupTimestap: Long? = null,
|
||||
@SerialId(31) val dwGlobalGroupPoint: Long? = null,
|
||||
@SerialId(32) val qzusrinfo: QzoneUserInfo? = null,
|
||||
@SerialId(33) val richCardNameVer: Byte? = null,
|
||||
@SerialId(34) val dwVipType: Long? = null,
|
||||
@SerialId(35) val dwVipLevel: Long? = null,
|
||||
@SerialId(36) val dwBigClubLevel: Long? = null,
|
||||
@SerialId(37) val dwBigClubFlag: Long? = null,
|
||||
@SerialId(38) val dwNameplate: Long? = null,
|
||||
@SerialId(39) val vecGroupHonor: ByteArray? = null
|
||||
) : JceStruct
|
||||
|
||||
@Serializable
|
||||
internal class QzoneUserInfo(
|
||||
@ProtoId(0) val eStarState: Int? = null,
|
||||
@ProtoId(1) val extendInfo: Map<String, String>? = null
|
||||
@SerialId(0) val eStarState: Int? = null,
|
||||
@SerialId(1) val extendInfo: Map<String, String>? = null
|
||||
) : JceStruct
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,118 +18,118 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
internal class Cmd0x352 : ProtoBuf {
|
||||
@Serializable
|
||||
class DelImgReq(
|
||||
@ProtoId(1) val srcUin: Long = 0L,
|
||||
@ProtoId(2) val dstUin: Long = 0L,
|
||||
@ProtoId(3) val reqTerm: Int = 0,
|
||||
@ProtoId(4) val reqPlatformType: Int = 0,
|
||||
@ProtoId(5) val buType: Int = 0,
|
||||
@ProtoId(6) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val picWidth: Int = 0,
|
||||
@ProtoId(9) val picHeight: Int = 0
|
||||
@SerialId(1) val srcUin: Long = 0L,
|
||||
@SerialId(2) val dstUin: Long = 0L,
|
||||
@SerialId(3) val reqTerm: Int = 0,
|
||||
@SerialId(4) val reqPlatformType: Int = 0,
|
||||
@SerialId(5) val buType: Int = 0,
|
||||
@SerialId(6) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val picWidth: Int = 0,
|
||||
@SerialId(9) val picHeight: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DelImgRsp(
|
||||
@ProtoId(1) val result: Int = 0,
|
||||
@ProtoId(2) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val fileResid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val result: Int = 0,
|
||||
@SerialId(2) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val fileResid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GetImgUrlReq(
|
||||
@ProtoId(1) val srcUin: Long = 0L,
|
||||
@ProtoId(2) val dstUin: Long = 0L,
|
||||
@ProtoId(3) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val urlFlag: Int = 0,
|
||||
@ProtoId(6) val urlType: Int = 0,
|
||||
@ProtoId(7) val reqTerm: Int = 0,
|
||||
@ProtoId(8) val reqPlatformType: Int = 0,
|
||||
@ProtoId(9) val srcFileType: Int = 0,
|
||||
@ProtoId(10) val innerIp: Int = 0,
|
||||
@ProtoId(11) val boolAddressBook: Boolean = false,
|
||||
@ProtoId(12) val buType: Int = 0,
|
||||
@ProtoId(13) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(14) val picUpTimestamp: Int = 0,
|
||||
@ProtoId(15) val reqTransferType: Int = 0
|
||||
@SerialId(1) val srcUin: Long = 0L,
|
||||
@SerialId(2) val dstUin: Long = 0L,
|
||||
@SerialId(3) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val urlFlag: Int = 0,
|
||||
@SerialId(6) val urlType: Int = 0,
|
||||
@SerialId(7) val reqTerm: Int = 0,
|
||||
@SerialId(8) val reqPlatformType: Int = 0,
|
||||
@SerialId(9) val srcFileType: Int = 0,
|
||||
@SerialId(10) val innerIp: Int = 0,
|
||||
@SerialId(11) val boolAddressBook: Boolean = false,
|
||||
@SerialId(12) val buType: Int = 0,
|
||||
@SerialId(13) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(14) val picUpTimestamp: Int = 0,
|
||||
@SerialId(15) val reqTransferType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GetImgUrlRsp(
|
||||
@ProtoId(1) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val clientIp: Int = 0,
|
||||
@ProtoId(3) val result: Int = 0,
|
||||
@ProtoId(4) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val bytesThumbDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(6) val bytesOriginalDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(7) val msgImgInfo: ImgInfo? = null,
|
||||
@ProtoId(8) val uint32DownIp: List<Int>? = null,
|
||||
@ProtoId(9) val uint32DownPort: List<Int>? = null,
|
||||
@ProtoId(10) val thumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(11) val originalDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(12) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(13) val bytesBigDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(14) val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(15) val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(16) val httpsUrlFlag: Int = 0,
|
||||
@ProtoId(26) val msgDownIp6: List<IPv6Info>? = null,
|
||||
@ProtoId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val clientIp: Int = 0,
|
||||
@SerialId(3) val result: Int = 0,
|
||||
@SerialId(4) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val bytesThumbDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(6) val bytesOriginalDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(7) val msgImgInfo: ImgInfo? = null,
|
||||
@SerialId(8) val uint32DownIp: List<Int>? = null,
|
||||
@SerialId(9) val uint32DownPort: List<Int>? = null,
|
||||
@SerialId(10) val thumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(11) val originalDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(12) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(13) val bytesBigDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(14) val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(15) val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(16) val httpsUrlFlag: Int = 0,
|
||||
@SerialId(26) val msgDownIp6: List<IPv6Info>? = null,
|
||||
@SerialId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Suppress("ArrayInDataClass")
|
||||
@Serializable
|
||||
data class ImgInfo(
|
||||
@ProtoId(1) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val fileType: Int = 0,
|
||||
@ProtoId(3) val fileSize: Long = 0L,
|
||||
@ProtoId(4) val fileWidth: Int = 0,
|
||||
@ProtoId(5) val fileHeight: Int = 0,
|
||||
@ProtoId(6) val fileFlag: Long = 0L,
|
||||
@ProtoId(7) val fileCutPos: Int = 0
|
||||
@SerialId(1) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val fileType: Int = 0,
|
||||
@SerialId(3) val fileSize: Long = 0L,
|
||||
@SerialId(4) val fileWidth: Int = 0,
|
||||
@SerialId(5) val fileHeight: Int = 0,
|
||||
@SerialId(6) val fileFlag: Long = 0L,
|
||||
@SerialId(7) val fileCutPos: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class IPv6Info(
|
||||
@ProtoId(1) val ip6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val port: Int = 0
|
||||
@SerialId(1) val ip6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val port: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReqBody(
|
||||
@ProtoId(1) val subcmd: Int = 0, //2是GetImgUrlReq 1是UploadImgReq
|
||||
@ProtoId(2) val msgTryupImgReq: List<TryUpImgReq>? = null,// optional
|
||||
@ProtoId(3) val msgGetimgUrlReq: List<GetImgUrlReq>? = null,// optional
|
||||
@ProtoId(4) val msgDelImgReq: List<DelImgReq>? = null,
|
||||
@ProtoId(10) val netType: Int = 3// 数据网络=5
|
||||
@SerialId(1) val subcmd: Int = 0, //2是GetImgUrlReq 1是UploadImgReq
|
||||
@SerialId(2) val msgTryupImgReq: List<TryUpImgReq>? = null,// optional
|
||||
@SerialId(3) val msgGetimgUrlReq: List<GetImgUrlReq>? = null,// optional
|
||||
@SerialId(4) val msgDelImgReq: List<DelImgReq>? = null,
|
||||
@SerialId(10) val netType: Int = 3// 数据网络=5
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1) val subcmd: Int = 0,
|
||||
@ProtoId(2) val msgTryupImgRsp: List<TryUpImgRsp>? = null,
|
||||
@ProtoId(3) val msgGetimgUrlRsp: List<GetImgUrlRsp>? = null,
|
||||
@ProtoId(4) val boolNewBigchan: Boolean = false,
|
||||
@ProtoId(5) val msgDelImgRsp: List<DelImgRsp>? = null,
|
||||
@ProtoId(10) val failMsg: String? = ""
|
||||
@SerialId(1) val subcmd: Int = 0,
|
||||
@SerialId(2) val msgTryupImgRsp: List<TryUpImgRsp>? = null,
|
||||
@SerialId(3) val msgGetimgUrlRsp: List<GetImgUrlRsp>? = null,
|
||||
@SerialId(4) val boolNewBigchan: Boolean = false,
|
||||
@SerialId(5) val msgDelImgRsp: List<DelImgRsp>? = null,
|
||||
@SerialId(10) val failMsg: String? = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class TryUpImgReq(
|
||||
@ProtoId(1) val srcUin: Int,
|
||||
@ProtoId(2) val dstUin: Int,
|
||||
@ProtoId(3) val fileId: Int = 0,//从0开始的自增数?貌似有一个连接就要自增1, 但是又会重置回0
|
||||
@ProtoId(4) val fileMd5: ByteArray,
|
||||
@ProtoId(5) val fileSize: Int,
|
||||
@ProtoId(6) val fileName: String,//默认为md5+".jpg"
|
||||
@ProtoId(7) val srcTerm: Int = 5,
|
||||
@ProtoId(8) val platformType: Int = 9,
|
||||
@ProtoId(9) val innerIP: Int = 0,
|
||||
@ProtoId(10) val addressBook: Int = 0,//chatType == 1006为1 我觉得发0没问题
|
||||
@ProtoId(11) val retry: Int = 0,//default
|
||||
@ProtoId(12) val buType: Int = 1,//1或96 不确定
|
||||
@ProtoId(13) val imgOriginal: Int,//是否为原图
|
||||
@ProtoId(14) val imgWidth: Int,
|
||||
@ProtoId(15) val imgHeight: Int,
|
||||
@SerialId(1) val srcUin: Int,
|
||||
@SerialId(2) val dstUin: Int,
|
||||
@SerialId(3) val fileId: Int = 0,//从0开始的自增数?貌似有一个连接就要自增1, 但是又会重置回0
|
||||
@SerialId(4) val fileMd5: ByteArray,
|
||||
@SerialId(5) val fileSize: Int,
|
||||
@SerialId(6) val fileName: String,//默认为md5+".jpg"
|
||||
@SerialId(7) val srcTerm: Int = 5,
|
||||
@SerialId(8) val platformType: Int = 9,
|
||||
@SerialId(9) val innerIP: Int = 0,
|
||||
@SerialId(10) val addressBook: Int = 0,//chatType == 1006为1 我觉得发0没问题
|
||||
@SerialId(11) val retry: Int = 0,//default
|
||||
@SerialId(12) val buType: Int = 1,//1或96 不确定
|
||||
@SerialId(13) val imgOriginal: Int,//是否为原图
|
||||
@SerialId(14) val imgWidth: Int,
|
||||
@SerialId(15) val imgHeight: Int,
|
||||
/**
|
||||
* ImgType:
|
||||
* JPG: 1000
|
||||
@ -140,50 +140,50 @@ internal class Cmd0x352 : ProtoBuf {
|
||||
* APNG: 2001
|
||||
* SHARPP: 1004
|
||||
*/
|
||||
@ProtoId(16) val imgType: Int = 1000,
|
||||
@ProtoId(17) val buildVer: String = "8.2.7.4410",//版本号
|
||||
@ProtoId(18) val fileIndex: ByteArray = EMPTY_BYTE_ARRAY,//default
|
||||
@ProtoId(19) val fileStoreDays: Int = 0,//default
|
||||
@ProtoId(20) val stepFlag: Int = 0,//default
|
||||
@ProtoId(21) val rejectTryFast: Int = 0,//bool
|
||||
@ProtoId(22) val srvUpload: Int = 1,//typeHotPic[1/2/3]
|
||||
@ProtoId(23) val transferUrl: ByteArray = EMPTY_BYTE_ARRAY//rawDownloadUrl, 如果没有就是EMPTY_BYTE_ARRAY
|
||||
@SerialId(16) val imgType: Int = 1000,
|
||||
@SerialId(17) val buildVer: String = "8.2.7.4410",//版本号
|
||||
@SerialId(18) val fileIndex: ByteArray = EMPTY_BYTE_ARRAY,//default
|
||||
@SerialId(19) val fileStoreDays: Int = 0,//default
|
||||
@SerialId(20) val stepFlag: Int = 0,//default
|
||||
@SerialId(21) val rejectTryFast: Int = 0,//bool
|
||||
@SerialId(22) val srvUpload: Int = 1,//typeHotPic[1/2/3]
|
||||
@SerialId(23) val transferUrl: ByteArray = EMPTY_BYTE_ARRAY//rawDownloadUrl, 如果没有就是EMPTY_BYTE_ARRAY
|
||||
) : ImgReq
|
||||
|
||||
@Serializable
|
||||
class TryUpImgRsp(
|
||||
@ProtoId(1) val fileId: Long = 0L,
|
||||
@ProtoId(2) val clientIp: Int = 0,
|
||||
@ProtoId(3) val result: Int = 0,
|
||||
@ProtoId(4) val failMsg: String? = "",
|
||||
@ProtoId(5) val boolFileExit: Boolean = false,
|
||||
@ProtoId(6) val msgImgInfo: ImgInfo? = null,
|
||||
@ProtoId(7) val uint32UpIp: List<Int>? = null,
|
||||
@ProtoId(8) val uint32UpPort: List<Int>? = null,
|
||||
@ProtoId(9) val upUkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val upResid: String = "",
|
||||
@ProtoId(11) val upUuid: String = "",
|
||||
@ProtoId(12) val upOffset: Long = 0L,
|
||||
@ProtoId(13) val blockSize: Long = 0L,
|
||||
@ProtoId(14) val encryptDstip: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(15) val roamdays: Int = 0,
|
||||
@ProtoId(26) val msgUpIp6: List<IPv6Info>? = null,
|
||||
@ProtoId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(60) val thumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(61) val originalDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(62) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(64) val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(65) val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(66) val httpsUrlFlag: Int = 0,
|
||||
@ProtoId(1001) val msgInfo4busi: TryUpInfo4Busi? = null
|
||||
@SerialId(1) val fileId: Long = 0L,
|
||||
@SerialId(2) val clientIp: Int = 0,
|
||||
@SerialId(3) val result: Int = 0,
|
||||
@SerialId(4) val failMsg: String? = "",
|
||||
@SerialId(5) val boolFileExit: Boolean = false,
|
||||
@SerialId(6) val msgImgInfo: ImgInfo? = null,
|
||||
@SerialId(7) val uint32UpIp: List<Int>? = null,
|
||||
@SerialId(8) val uint32UpPort: List<Int>? = null,
|
||||
@SerialId(9) val upUkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val upResid: String = "",
|
||||
@SerialId(11) val upUuid: String = "",
|
||||
@SerialId(12) val upOffset: Long = 0L,
|
||||
@SerialId(13) val blockSize: Long = 0L,
|
||||
@SerialId(14) val encryptDstip: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(15) val roamdays: Int = 0,
|
||||
@SerialId(26) val msgUpIp6: List<IPv6Info>? = null,
|
||||
@SerialId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(60) val thumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(61) val originalDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(62) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(64) val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(65) val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(66) val httpsUrlFlag: Int = 0,
|
||||
@SerialId(1001) val msgInfo4busi: TryUpInfo4Busi? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TryUpInfo4Busi(
|
||||
@ProtoId(1) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val thumbDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val originalDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val thumbDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val originalDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,141 +18,141 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
internal class Cmd0x388 : ProtoBuf {
|
||||
@Serializable
|
||||
class DelImgReq(
|
||||
@ProtoId(1) val srcUin: Long = 0L,
|
||||
@ProtoId(2) val dstUin: Long = 0L,
|
||||
@ProtoId(3) val reqTerm: Int = 0,
|
||||
@ProtoId(4) val reqPlatformType: Int = 0,
|
||||
@ProtoId(5) val buType: Int = 0,
|
||||
@ProtoId(6) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val picWidth: Int = 0,
|
||||
@ProtoId(9) val picHeight: Int = 0
|
||||
@SerialId(1) val srcUin: Long = 0L,
|
||||
@SerialId(2) val dstUin: Long = 0L,
|
||||
@SerialId(3) val reqTerm: Int = 0,
|
||||
@SerialId(4) val reqPlatformType: Int = 0,
|
||||
@SerialId(5) val buType: Int = 0,
|
||||
@SerialId(6) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val picWidth: Int = 0,
|
||||
@SerialId(9) val picHeight: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DelImgRsp(
|
||||
@ProtoId(1) val result: Int = 0,
|
||||
@ProtoId(2) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val fileResid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val result: Int = 0,
|
||||
@SerialId(2) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val fileResid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ExpRoamExtendInfo(
|
||||
@ProtoId(1) val resid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val resid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ExpRoamPicInfo(
|
||||
@ProtoId(1) val shopFlag: Int = 0,
|
||||
@ProtoId(2) val pkgId: Int = 0,
|
||||
@ProtoId(3) val picId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val shopFlag: Int = 0,
|
||||
@SerialId(2) val pkgId: Int = 0,
|
||||
@SerialId(3) val picId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ExtensionCommPicTryUp(
|
||||
@ProtoId(1) val bytesExtinfo: List<ByteArray>? = null
|
||||
@SerialId(1) val bytesExtinfo: List<ByteArray>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ExtensionExpRoamTryUp(
|
||||
@ProtoId(1) val msgExproamPicInfo: List<ExpRoamPicInfo>? = null
|
||||
@SerialId(1) val msgExproamPicInfo: List<ExpRoamPicInfo>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GetImgUrlReq(
|
||||
@ProtoId(1) val groupCode: Long = 0L,
|
||||
@ProtoId(2) val dstUin: Long = 0L,
|
||||
@ProtoId(3) val fileid: Long = 0L,
|
||||
@ProtoId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val urlFlag: Int = 0,
|
||||
@ProtoId(6) val urlType: Int = 0,
|
||||
@ProtoId(7) val reqTerm: Int = 0,
|
||||
@ProtoId(8) val reqPlatformType: Int = 0,
|
||||
@ProtoId(9) val innerIp: Int = 0,
|
||||
@ProtoId(10) val buType: Int = 0,
|
||||
@ProtoId(11) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(12) val fileId: Long = 0L,
|
||||
@ProtoId(13) val fileSize: Long = 0L,
|
||||
@ProtoId(14) val originalPic: Int = 0,
|
||||
@ProtoId(15) val retryReq: Int = 0,
|
||||
@ProtoId(16) val fileHeight: Int = 0,
|
||||
@ProtoId(17) val fileWidth: Int = 0,
|
||||
@ProtoId(18) val picType: Int = 0,
|
||||
@ProtoId(19) val picUpTimestamp: Int = 0,
|
||||
@ProtoId(20) val reqTransferType: Int = 0
|
||||
@SerialId(1) val groupCode: Long = 0L,
|
||||
@SerialId(2) val dstUin: Long = 0L,
|
||||
@SerialId(3) val fileid: Long = 0L,
|
||||
@SerialId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val urlFlag: Int = 0,
|
||||
@SerialId(6) val urlType: Int = 0,
|
||||
@SerialId(7) val reqTerm: Int = 0,
|
||||
@SerialId(8) val reqPlatformType: Int = 0,
|
||||
@SerialId(9) val innerIp: Int = 0,
|
||||
@SerialId(10) val buType: Int = 0,
|
||||
@SerialId(11) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(12) val fileId: Long = 0L,
|
||||
@SerialId(13) val fileSize: Long = 0L,
|
||||
@SerialId(14) val originalPic: Int = 0,
|
||||
@SerialId(15) val retryReq: Int = 0,
|
||||
@SerialId(16) val fileHeight: Int = 0,
|
||||
@SerialId(17) val fileWidth: Int = 0,
|
||||
@SerialId(18) val picType: Int = 0,
|
||||
@SerialId(19) val picUpTimestamp: Int = 0,
|
||||
@SerialId(20) val reqTransferType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GetImgUrlRsp(
|
||||
@ProtoId(1) val fileid: Long = 0L,
|
||||
@ProtoId(2) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val result: Int = 0,
|
||||
@ProtoId(4) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val msgImgInfo: ImgInfo? = null,
|
||||
@ProtoId(6) val bytesThumbDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(7) val bytesOriginalDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(8) val bytesBigDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(9) val uint32DownIp: List<Int>? = null,
|
||||
@ProtoId(10) val uint32DownPort: List<Int>? = null,
|
||||
@ProtoId(11) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(12) val thumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(13) val originalDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(14) val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(15) val fileId: Long = 0L,
|
||||
@ProtoId(16) val autoDownType: Int = 0,
|
||||
@ProtoId(17) val uint32OrderDownType: List<Int>? = null,
|
||||
@ProtoId(19) val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(20) val httpsUrlFlag: Int = 0,
|
||||
@ProtoId(26) val msgDownIp6: List<IPv6Info>? = null,
|
||||
@ProtoId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val fileid: Long = 0L,
|
||||
@SerialId(2) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val result: Int = 0,
|
||||
@SerialId(4) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val msgImgInfo: ImgInfo? = null,
|
||||
@SerialId(6) val bytesThumbDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(7) val bytesOriginalDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(8) val bytesBigDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(9) val uint32DownIp: List<Int>? = null,
|
||||
@SerialId(10) val uint32DownPort: List<Int>? = null,
|
||||
@SerialId(11) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(12) val thumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(13) val originalDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(14) val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(15) val fileId: Long = 0L,
|
||||
@SerialId(16) val autoDownType: Int = 0,
|
||||
@SerialId(17) val uint32OrderDownType: List<Int>? = null,
|
||||
@SerialId(19) val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(20) val httpsUrlFlag: Int = 0,
|
||||
@SerialId(26) val msgDownIp6: List<IPv6Info>? = null,
|
||||
@SerialId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GetPttUrlReq(
|
||||
@ProtoId(1) val groupCode: Long = 0L,
|
||||
@ProtoId(2) val dstUin: Long = 0L,
|
||||
@ProtoId(3) val fileid: Long = 0L,
|
||||
@ProtoId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val reqTerm: Int = 0,
|
||||
@ProtoId(6) val reqPlatformType: Int = 0,
|
||||
@ProtoId(7) val innerIp: Int = 0,
|
||||
@ProtoId(8) val buType: Int = 0,
|
||||
@ProtoId(9) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val fileId: Long = 0L,
|
||||
@ProtoId(11) val fileKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(12) val codec: Int = 0,
|
||||
@ProtoId(13) val buId: Int = 0,
|
||||
@ProtoId(14) val reqTransferType: Int = 0,
|
||||
@ProtoId(15) val isAuto: Int = 0
|
||||
@SerialId(1) val groupCode: Long = 0L,
|
||||
@SerialId(2) val dstUin: Long = 0L,
|
||||
@SerialId(3) val fileid: Long = 0L,
|
||||
@SerialId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val reqTerm: Int = 0,
|
||||
@SerialId(6) val reqPlatformType: Int = 0,
|
||||
@SerialId(7) val innerIp: Int = 0,
|
||||
@SerialId(8) val buType: Int = 0,
|
||||
@SerialId(9) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val fileId: Long = 0L,
|
||||
@SerialId(11) val fileKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(12) val codec: Int = 0,
|
||||
@SerialId(13) val buId: Int = 0,
|
||||
@SerialId(14) val reqTransferType: Int = 0,
|
||||
@SerialId(15) val isAuto: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GetPttUrlRsp(
|
||||
@ProtoId(1) val fileid: Long = 0L,
|
||||
@ProtoId(2) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val result: Int = 0,
|
||||
@ProtoId(4) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val bytesDownUrl: List<ByteArray>? = null,
|
||||
@ProtoId(6) val uint32DownIp: List<Int>? = null,
|
||||
@ProtoId(7) val uint32DownPort: List<Int>? = null,
|
||||
@ProtoId(8) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(9) val downPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val fileId: Long = 0L,
|
||||
@ProtoId(11) val transferType: Int = 0,
|
||||
@ProtoId(12) val allowRetry: Int = 0,
|
||||
@ProtoId(26) val msgDownIp6: List<IPv6Info>? = null,
|
||||
@ProtoId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(28) val strDomain: String = ""
|
||||
@SerialId(1) val fileid: Long = 0L,
|
||||
@SerialId(2) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val result: Int = 0,
|
||||
@SerialId(4) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val bytesDownUrl: List<ByteArray>? = null,
|
||||
@SerialId(6) val uint32DownIp: List<Int>? = null,
|
||||
@SerialId(7) val uint32DownPort: List<Int>? = null,
|
||||
@SerialId(8) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(9) val downPara: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val fileId: Long = 0L,
|
||||
@SerialId(11) val transferType: Int = 0,
|
||||
@SerialId(12) val allowRetry: Int = 0,
|
||||
@SerialId(26) val msgDownIp6: List<IPv6Info>? = null,
|
||||
@SerialId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(28) val strDomain: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Suppress("ArrayInDataClass")
|
||||
@Serializable
|
||||
data class ImgInfo(
|
||||
@ProtoId(1) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val fileType: Int = 0,
|
||||
@ProtoId(3) val fileSize: Long = 0L,
|
||||
@ProtoId(4) val fileWidth: Int = 0,
|
||||
@ProtoId(5) val fileHeight: Int = 0
|
||||
@SerialId(1) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val fileType: Int = 0,
|
||||
@SerialId(3) val fileSize: Long = 0L,
|
||||
@SerialId(4) val fileWidth: Int = 0,
|
||||
@SerialId(5) val fileHeight: Int = 0
|
||||
) : ProtoBuf {
|
||||
override fun toString(): String {
|
||||
return "ImgInfo(fileMd5=${fileMd5.contentToString()}, fileType=$fileType, fileSize=$fileSize, fileWidth=$fileWidth, fileHeight=$fileHeight)"
|
||||
@ -161,128 +161,128 @@ internal class Cmd0x388 : ProtoBuf {
|
||||
|
||||
@Serializable
|
||||
class IPv6Info(
|
||||
@ProtoId(1) val ip6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val port: Int = 0
|
||||
@SerialId(1) val ip6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val port: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PicSize(
|
||||
@ProtoId(1) val original: Int = 0,
|
||||
@ProtoId(2) val thumb: Int = 0,
|
||||
@ProtoId(3) val high: Int = 0
|
||||
@SerialId(1) val original: Int = 0,
|
||||
@SerialId(2) val thumb: Int = 0,
|
||||
@SerialId(3) val high: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReqBody(
|
||||
@ProtoId(1) val netType: Int = 0,
|
||||
@ProtoId(2) val subcmd: Int = 0,
|
||||
@ProtoId(3) val msgTryupImgReq: List<TryUpImgReq>? = null,
|
||||
@ProtoId(4) val msgGetimgUrlReq: List<GetImgUrlReq>? = null,
|
||||
@ProtoId(5) val msgTryupPttReq: List<TryUpPttReq>? = null,
|
||||
@ProtoId(6) val msgGetpttUrlReq: List<GetPttUrlReq>? = null,
|
||||
@ProtoId(7) val commandId: Int = 0,
|
||||
@ProtoId(8) val msgDelImgReq: List<DelImgReq>? = null,
|
||||
@ProtoId(1001) val extension: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val netType: Int = 0,
|
||||
@SerialId(2) val subcmd: Int = 0,
|
||||
@SerialId(3) val msgTryupImgReq: List<TryUpImgReq>? = null,
|
||||
@SerialId(4) val msgGetimgUrlReq: List<GetImgUrlReq>? = null,
|
||||
@SerialId(5) val msgTryupPttReq: List<TryUpPttReq>? = null,
|
||||
@SerialId(6) val msgGetpttUrlReq: List<GetPttUrlReq>? = null,
|
||||
@SerialId(7) val commandId: Int = 0,
|
||||
@SerialId(8) val msgDelImgReq: List<DelImgReq>? = null,
|
||||
@SerialId(1001) val extension: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1) val clientIp: Int = 0,
|
||||
@ProtoId(2) val subcmd: Int = 0,
|
||||
@ProtoId(3) val msgTryupImgRsp: List<TryUpImgRsp>? = null,
|
||||
@ProtoId(4) val msgGetimgUrlRsp: List<GetImgUrlRsp>? = null,
|
||||
@ProtoId(5) val msgTryupPttRsp: List<TryUpPttRsp>? = null,
|
||||
@ProtoId(6) val msgGetpttUrlRsp: List<GetPttUrlRsp>? = null,
|
||||
@ProtoId(7) val msgDelImgRsp: List<DelImgRsp>? = null
|
||||
@SerialId(1) val clientIp: Int = 0,
|
||||
@SerialId(2) val subcmd: Int = 0,
|
||||
@SerialId(3) val msgTryupImgRsp: List<TryUpImgRsp>? = null,
|
||||
@SerialId(4) val msgGetimgUrlRsp: List<GetImgUrlRsp>? = null,
|
||||
@SerialId(5) val msgTryupPttRsp: List<TryUpPttRsp>? = null,
|
||||
@SerialId(6) val msgGetpttUrlRsp: List<GetPttUrlRsp>? = null,
|
||||
@SerialId(7) val msgDelImgRsp: List<DelImgRsp>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TryUpImgReq(
|
||||
@ProtoId(1) val groupCode: Long = 0L,
|
||||
@ProtoId(2) val srcUin: Long = 0L,
|
||||
@ProtoId(3) val fileId: Long = 0L,
|
||||
@ProtoId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val fileSize: Long = 0L,
|
||||
@ProtoId(6) val fileName: String = "",
|
||||
@ProtoId(7) val srcTerm: Int = 0,
|
||||
@ProtoId(8) val platformType: Int = 0,
|
||||
@ProtoId(9) val buType: Int = 0,
|
||||
@ProtoId(10) val picWidth: Int = 0,
|
||||
@ProtoId(11) val picHeight: Int = 0,
|
||||
@ProtoId(12) val picType: Int = 0,
|
||||
@ProtoId(13) val buildVer: String = "",
|
||||
@ProtoId(14) val innerIp: Int = 0,
|
||||
@ProtoId(15) val appPicType: Int = 0,
|
||||
@ProtoId(16) val originalPic: Int = 0,
|
||||
@ProtoId(17) val fileIndex: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(18) val dstUin: Long = 0L,
|
||||
@ProtoId(19) val srvUpload: Int = 0,
|
||||
@ProtoId(20) val transferUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val groupCode: Long = 0L,
|
||||
@SerialId(2) val srcUin: Long = 0L,
|
||||
@SerialId(3) val fileId: Long = 0L,
|
||||
@SerialId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val fileSize: Long = 0L,
|
||||
@SerialId(6) val fileName: String ="",
|
||||
@SerialId(7) val srcTerm: Int = 0,
|
||||
@SerialId(8) val platformType: Int = 0,
|
||||
@SerialId(9) val buType: Int = 0,
|
||||
@SerialId(10) val picWidth: Int = 0,
|
||||
@SerialId(11) val picHeight: Int = 0,
|
||||
@SerialId(12) val picType: Int = 0,
|
||||
@SerialId(13) val buildVer: String = "",
|
||||
@SerialId(14) val innerIp: Int = 0,
|
||||
@SerialId(15) val appPicType: Int = 0,
|
||||
@SerialId(16) val originalPic: Int = 0,
|
||||
@SerialId(17) val fileIndex: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(18) val dstUin: Long = 0L,
|
||||
@SerialId(19) val srvUpload: Int = 0,
|
||||
@SerialId(20) val transferUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ImgReq
|
||||
|
||||
@Serializable
|
||||
class TryUpImgRsp(
|
||||
@ProtoId(1) val fileId: Long = 0L,
|
||||
@ProtoId(2) val result: Int = 0,
|
||||
@ProtoId(3) val failMsg: String = "",
|
||||
@ProtoId(4) val boolFileExit: Boolean = false,
|
||||
@ProtoId(5) val msgImgInfo: ImgInfo? = null,
|
||||
@ProtoId(6) val uint32UpIp: List<Int>? = null,
|
||||
@ProtoId(7) val uint32UpPort: List<Int>? = null,
|
||||
@ProtoId(8) val upUkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(9) val fileid: Long = 0L,
|
||||
@ProtoId(10) val upOffset: Long = 0L,
|
||||
@ProtoId(11) val blockSize: Long = 0L,
|
||||
@ProtoId(12) val boolNewBigChan: Boolean = false,
|
||||
@ProtoId(26) val msgUpIp6: List<IPv6Info>? = null,
|
||||
@ProtoId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(1001) val msgInfo4busi: TryUpInfo4Busi? = null
|
||||
@SerialId(1) val fileId: Long = 0L,
|
||||
@SerialId(2) val result: Int = 0,
|
||||
@SerialId(3) val failMsg: String = "",
|
||||
@SerialId(4) val boolFileExit: Boolean = false,
|
||||
@SerialId(5) val msgImgInfo: ImgInfo? = null,
|
||||
@SerialId(6) val uint32UpIp: List<Int>? = null,
|
||||
@SerialId(7) val uint32UpPort: List<Int>? = null,
|
||||
@SerialId(8) val upUkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(9) val fileid: Long = 0L,
|
||||
@SerialId(10) val upOffset: Long = 0L,
|
||||
@SerialId(11) val blockSize: Long = 0L,
|
||||
@SerialId(12) val boolNewBigChan: Boolean = false,
|
||||
@SerialId(26) val msgUpIp6: List<IPv6Info>? = null,
|
||||
@SerialId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(1001) val msgInfo4busi: TryUpInfo4Busi? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TryUpInfo4Busi(
|
||||
@ProtoId(1) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val thumbDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val originalDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val fileResid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val downDomain: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val thumbDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val originalDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val fileResid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TryUpPttReq(
|
||||
@ProtoId(1) val groupCode: Long = 0L,
|
||||
@ProtoId(2) val srcUin: Long = 0L,
|
||||
@ProtoId(3) val fileId: Long = 0L,
|
||||
@ProtoId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val fileSize: Long = 0L,
|
||||
@ProtoId(6) val fileName: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val srcTerm: Int = 0,
|
||||
@ProtoId(8) val platformType: Int = 0,
|
||||
@ProtoId(9) val buType: Int = 0,
|
||||
@ProtoId(10) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(11) val innerIp: Int = 0,
|
||||
@ProtoId(12) val voiceLength: Int = 0,
|
||||
@ProtoId(13) val boolNewUpChan: Boolean = false,
|
||||
@ProtoId(14) val codec: Int = 0,
|
||||
@ProtoId(15) val voiceType: Int = 0,
|
||||
@ProtoId(16) val buId: Int = 0
|
||||
@SerialId(1) val groupCode: Long = 0L,
|
||||
@SerialId(2) val srcUin: Long = 0L,
|
||||
@SerialId(3) val fileId: Long = 0L,
|
||||
@SerialId(4) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val fileSize: Long = 0L,
|
||||
@SerialId(6) val fileName: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val srcTerm: Int = 0,
|
||||
@SerialId(8) val platformType: Int = 0,
|
||||
@SerialId(9) val buType: Int = 0,
|
||||
@SerialId(10) val buildVer: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(11) val innerIp: Int = 0,
|
||||
@SerialId(12) val voiceLength: Int = 0,
|
||||
@SerialId(13) val boolNewUpChan: Boolean = false,
|
||||
@SerialId(14) val codec: Int = 0,
|
||||
@SerialId(15) val voiceType: Int = 0,
|
||||
@SerialId(16) val buId: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TryUpPttRsp(
|
||||
@ProtoId(1) val fileId: Long = 0L,
|
||||
@ProtoId(2) val result: Int = 0,
|
||||
@ProtoId(3) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val boolFileExit: Boolean = false,
|
||||
@ProtoId(5) val uint32UpIp: List<Int>? = null,
|
||||
@ProtoId(6) val uint32UpPort: List<Int>? = null,
|
||||
@ProtoId(7) val upUkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val fileid: Long = 0L,
|
||||
@ProtoId(9) val upOffset: Long = 0L,
|
||||
@ProtoId(10) val blockSize: Long = 0L,
|
||||
@ProtoId(11) val fileKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(12) val channelType: Int = 0,
|
||||
@ProtoId(26) val msgUpIp6: List<IPv6Info>? = null,
|
||||
@ProtoId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val fileId: Long = 0L,
|
||||
@SerialId(2) val result: Int = 0,
|
||||
@SerialId(3) val failMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val boolFileExit: Boolean = false,
|
||||
@SerialId(5) val uint32UpIp: List<Int>? = null,
|
||||
@SerialId(6) val uint32UpPort: List<Int>? = null,
|
||||
@SerialId(7) val upUkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val fileid: Long = 0L,
|
||||
@SerialId(9) val upOffset: Long = 0L,
|
||||
@SerialId(10) val blockSize: Long = 0L,
|
||||
@SerialId(11) val fileKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(12) val channelType: Int = 0,
|
||||
@SerialId(26) val msgUpIp6: List<IPv6Info>? = null,
|
||||
@SerialId(27) val clientIp6: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
}
|
@ -11,8 +11,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import kotlinx.serialization.protobuf.ProtoNumberType
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
@ -21,50 +21,50 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
class GroupOpenSysMsg : ProtoBuf {
|
||||
@Serializable
|
||||
class LightApp(
|
||||
@ProtoId(1) val app: String = "",
|
||||
@ProtoId(2) val view: String = "",
|
||||
@ProtoId(3) val desc: String = "",
|
||||
@ProtoId(4) val prompt: String = "",
|
||||
@ProtoId(5) val ver: String = "",
|
||||
@ProtoId(6) val meta: String = "",
|
||||
@ProtoId(7) val config: String = "",
|
||||
@ProtoId(8) val source: Source? = null
|
||||
@SerialId(1) val app: String = "",
|
||||
@SerialId(2) val view: String = "",
|
||||
@SerialId(3) val desc: String = "",
|
||||
@SerialId(4) val prompt: String = "",
|
||||
@SerialId(5) val ver: String = "",
|
||||
@SerialId(6) val meta: String = "",
|
||||
@SerialId(7) val config: String = "",
|
||||
@SerialId(8) val source: Source? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RichMsg(
|
||||
@ProtoId(1) val title: String = "",
|
||||
@ProtoId(2) val desc: String = "",
|
||||
@ProtoId(3) val brief: String = "",
|
||||
@ProtoId(4) val cover: String = "",
|
||||
@ProtoId(5) val url: String = "",
|
||||
@ProtoId(6) val source: Source? = null
|
||||
@SerialId(1) val title: String = "",
|
||||
@SerialId(2) val desc: String = "",
|
||||
@SerialId(3) val brief: String = "",
|
||||
@SerialId(4) val cover: String = "",
|
||||
@SerialId(5) val url: String = "",
|
||||
@SerialId(6) val source: Source? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Sender(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val nick: String = "",
|
||||
@ProtoId(3) val avatar: String = "",
|
||||
@ProtoId(4) val url: String = ""
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val nick: String = "",
|
||||
@SerialId(3) val avatar: String = "",
|
||||
@SerialId(4) val url: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Source(
|
||||
@ProtoId(1) val name: String = "",
|
||||
@ProtoId(2) val icon: String = "",
|
||||
@ProtoId(3) val url: String = ""
|
||||
@SerialId(1) val name: String = "",
|
||||
@SerialId(2) val icon: String = "",
|
||||
@SerialId(3) val url: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SysMsgBody(
|
||||
@ProtoId(1) val groupId: Long = 0L,
|
||||
@ProtoId(2) val appid: Long = 0L,
|
||||
@ProtoId(3) val sender: Sender? = null,
|
||||
@ProtoId(4) val msgType: Int = 0,
|
||||
@ProtoId(5) val content: String = "",
|
||||
@ProtoId(6) val richMsg: RichMsg? = null,
|
||||
@ProtoId(7) val lightApp: LightApp? = null
|
||||
@SerialId(1) val groupId: Long = 0L,
|
||||
@SerialId(2) val appid: Long = 0L,
|
||||
@SerialId(3) val sender: Sender? = null,
|
||||
@SerialId(4) val msgType: Int = 0,
|
||||
@SerialId(5) val content: String = "",
|
||||
@SerialId(6) val richMsg: RichMsg? = null,
|
||||
@SerialId(7) val lightApp: LightApp? = null
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -72,337 +72,337 @@ class GroupOpenSysMsg : ProtoBuf {
|
||||
class TroopTips0x857 : ProtoBuf {
|
||||
@Serializable
|
||||
class AIOGrayTipsInfo(
|
||||
@ProtoId(1) val optUint32ShowLastest: Int = 0,
|
||||
@ProtoId(2) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val optUint32Remind: Int = 0,
|
||||
@ProtoId(4) val optBytesBrief: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val receiverUin: Long = 0L,
|
||||
@ProtoId(6) val reliaoAdminOpt: Int = 0,
|
||||
@ProtoId(7) val robotGroupOpt: Int = 0
|
||||
@SerialId(1) val optUint32ShowLastest: Int = 0,
|
||||
@SerialId(2) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val optUint32Remind: Int = 0,
|
||||
@SerialId(4) val optBytesBrief: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val receiverUin: Long = 0L,
|
||||
@SerialId(6) val reliaoAdminOpt: Int = 0,
|
||||
@SerialId(7) val robotGroupOpt: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class AIOTopTipsInfo(
|
||||
@ProtoId(1) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val optUint32Icon: Int = 0,
|
||||
@ProtoId(3) val optEnumAction: Int /* enum */ = 1,
|
||||
@ProtoId(4) val optBytesUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val optBytesData: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val optBytesDataI: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val optBytesDataA: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val optBytesDataP: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val optUint32Icon: Int = 0,
|
||||
@SerialId(3) val optEnumAction: Int /* enum */ = 1,
|
||||
@SerialId(4) val optBytesUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val optBytesData: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val optBytesDataI: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val optBytesDataA: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val optBytesDataP: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FloatedTipsInfo(
|
||||
@ProtoId(1) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GeneralGrayTipInfo(
|
||||
@ProtoId(1) val busiType: Long = 0L,
|
||||
@ProtoId(2) val busiId: Long = 0L,
|
||||
@ProtoId(3) val ctrlFlag: Int = 0,
|
||||
@ProtoId(4) val c2cType: Int = 0,
|
||||
@ProtoId(5) val serviceType: Int = 0,
|
||||
@ProtoId(6) val templId: Long = 0L,
|
||||
@ProtoId(7) val msgTemplParam: List<TemplParam>? = null,
|
||||
@ProtoId(8) val content: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val tipsSeqId: Long = 0L,
|
||||
@ProtoId(100) val pbReserv: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val busiType: Long = 0L,
|
||||
@SerialId(2) val busiId: Long = 0L,
|
||||
@SerialId(3) val ctrlFlag: Int = 0,
|
||||
@SerialId(4) val c2cType: Int = 0,
|
||||
@SerialId(5) val serviceType: Int = 0,
|
||||
@SerialId(6) val templId: Long = 0L,
|
||||
@SerialId(7) val msgTemplParam: List<TemplParam>? = null,
|
||||
@SerialId(8) val content: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val tipsSeqId: Long = 0L,
|
||||
@SerialId(100) val pbReserv: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GoldMsgTipsElem(
|
||||
@ProtoId(1) val type: Int = 0,
|
||||
@ProtoId(2) val billno: String = "",
|
||||
@ProtoId(3) val result: Int = 0,
|
||||
@ProtoId(4) val amount: Int = 0,
|
||||
@ProtoId(5) val total: Int = 0,
|
||||
@ProtoId(6) val interval: Int = 0,
|
||||
@ProtoId(7) val finish: Int = 0,
|
||||
@ProtoId(8) val uin: List<Long>? = null,
|
||||
@ProtoId(9) val action: Int = 0
|
||||
@SerialId(1) val type: Int = 0,
|
||||
@SerialId(2) val billno: String = "",
|
||||
@SerialId(3) val result: Int = 0,
|
||||
@SerialId(4) val amount: Int = 0,
|
||||
@SerialId(5) val total: Int = 0,
|
||||
@SerialId(6) val interval: Int = 0,
|
||||
@SerialId(7) val finish: Int = 0,
|
||||
@SerialId(8) val uin: List<Long>? = null,
|
||||
@SerialId(9) val action: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GroupInfoChange(
|
||||
@ProtoId(1) val groupHonorSwitch: Int = 0
|
||||
@SerialId(1) val groupHonorSwitch: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GroupNotifyInfo(
|
||||
@ProtoId(1) val optUint32AutoPullFlag: Int = 0,
|
||||
@ProtoId(2) val optBytesFeedsId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val optUint32AutoPullFlag: Int = 0,
|
||||
@SerialId(2) val optBytesFeedsId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class InstCtrl(
|
||||
@ProtoId(1) val msgSendToInst: List<InstInfo>? = null,
|
||||
@ProtoId(2) val msgExcludeInst: List<InstInfo>? = null,
|
||||
@ProtoId(3) val msgFromInst: InstInfo? = null
|
||||
@SerialId(1) val msgSendToInst: List<InstInfo>? = null,
|
||||
@SerialId(2) val msgExcludeInst: List<InstInfo>? = null,
|
||||
@SerialId(3) val msgFromInst: InstInfo? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class InstInfo(
|
||||
@ProtoId(1) val apppid: Int = 0,
|
||||
@ProtoId(2) val instid: Int = 0,
|
||||
@ProtoId(3) val platform: Int = 0,
|
||||
@ProtoId(4) val openAppid: Int = 0,
|
||||
@ProtoId(5) val productid: Int = 0,
|
||||
@ProtoId(6) val ssoBid: Int = 0,
|
||||
@ProtoId(7) val guid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val verMin: Int = 0,
|
||||
@ProtoId(9) val verMax: Int = 0
|
||||
@SerialId(1) val apppid: Int = 0,
|
||||
@SerialId(2) val instid: Int = 0,
|
||||
@SerialId(3) val platform: Int = 0,
|
||||
@SerialId(4) val openAppid: Int = 0,
|
||||
@SerialId(5) val productid: Int = 0,
|
||||
@SerialId(6) val ssoBid: Int = 0,
|
||||
@SerialId(7) val guid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val verMin: Int = 0,
|
||||
@SerialId(9) val verMax: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class LbsShareChangePushInfo(
|
||||
@ProtoId(1) val msgType: Int = 0,
|
||||
@ProtoId(2) val msgInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val versionCtrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val groupId: Long = 0L,
|
||||
@ProtoId(5) val operUin: Long = 0L,
|
||||
@ProtoId(6) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val msgSeq: Long = 0L,
|
||||
@ProtoId(8) val joinNums: Int = 0,
|
||||
@ProtoId(99) val pushType: Int = 0,
|
||||
@ProtoId(100) val extInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val msgType: Int = 0,
|
||||
@SerialId(2) val msgInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val versionCtrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val groupId: Long = 0L,
|
||||
@SerialId(5) val operUin: Long = 0L,
|
||||
@SerialId(6) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val msgSeq: Long = 0L,
|
||||
@SerialId(8) val joinNums: Int = 0,
|
||||
@SerialId(99) val pushType: Int = 0,
|
||||
@SerialId(100) val extInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class LuckyBagNotify(
|
||||
@ProtoId(1) val msgTips: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val msgTips: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class MediaChangePushInfo(
|
||||
@ProtoId(1) val msgType: Int = 0,
|
||||
@ProtoId(2) val msgInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val versionCtrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val groupId: Long = 0L,
|
||||
@ProtoId(5) val operUin: Long = 0L,
|
||||
@ProtoId(6) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val msgSeq: Long = 0L,
|
||||
@ProtoId(8) val joinNums: Int = 0,
|
||||
@ProtoId(9) val msgPerSetting: PersonalSetting? = null,
|
||||
@ProtoId(10) val playMode: Int = 0,
|
||||
@ProtoId(99) val mediaType: Int = 0,
|
||||
@ProtoId(100) val extInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val msgType: Int = 0,
|
||||
@SerialId(2) val msgInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val versionCtrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val groupId: Long = 0L,
|
||||
@SerialId(5) val operUin: Long = 0L,
|
||||
@SerialId(6) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val msgSeq: Long = 0L,
|
||||
@SerialId(8) val joinNums: Int = 0,
|
||||
@SerialId(9) val msgPerSetting: PersonalSetting? = null,
|
||||
@SerialId(10) val playMode: Int = 0,
|
||||
@SerialId(99) val mediaType: Int = 0,
|
||||
@SerialId(100) val extInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf {
|
||||
@Serializable
|
||||
class PersonalSetting(
|
||||
@ProtoId(1) val themeId: Int = 0,
|
||||
@ProtoId(2) val playerId: Int = 0,
|
||||
@ProtoId(3) val fontId: Int = 0
|
||||
@SerialId(1) val themeId: Int = 0,
|
||||
@SerialId(2) val playerId: Int = 0,
|
||||
@SerialId(3) val fontId: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@Serializable
|
||||
class MessageBoxInfo(
|
||||
@ProtoId(1) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val optBytesTitle: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val optBytesButton: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val optBytesTitle: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val optBytesButton: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class MessageRecallReminder(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val recalledMsgList: List<MessageMeta> = listOf(),
|
||||
@ProtoId(4) val reminderContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val userdef: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val groupType: Int = 0,
|
||||
@ProtoId(7) val opType: Int = 0
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val recalledMsgList: List<MessageMeta> = listOf(),
|
||||
@SerialId(4) val reminderContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val userdef: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val groupType: Int = 0,
|
||||
@SerialId(7) val opType: Int = 0
|
||||
) : ProtoBuf {
|
||||
@Serializable
|
||||
class MessageMeta(
|
||||
@ProtoId(1) val seq: Int = 0,
|
||||
@ProtoId(2) val time: Int = 0,
|
||||
@ProtoId(3) val msgRandom: Int = 0,
|
||||
@ProtoId(4) val msgType: Int = 0,
|
||||
@ProtoId(5) val msgFlag: Int = 0,
|
||||
@ProtoId(6) val authorUin: Long = 0L
|
||||
@SerialId(1) val seq: Int = 0,
|
||||
@SerialId(2) val time: Int = 0,
|
||||
@SerialId(3) val msgRandom: Int = 0,
|
||||
@SerialId(4) val msgType: Int = 0,
|
||||
@SerialId(5) val msgFlag: Int = 0,
|
||||
@SerialId(6) val authorUin: Long = 0L
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@Serializable
|
||||
class MiniAppNotify(
|
||||
@ProtoId(1) val msg: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val msg: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NotifyMsgBody(
|
||||
@ProtoId(1) val optEnumType: Int /* enum */ = 1,
|
||||
@ProtoId(2) val optUint64MsgTime: Long = 0L,
|
||||
@ProtoId(3) val optUint64MsgExpires: Long = 0L,
|
||||
@ProtoId(4) val optUint64GroupCode: Long = 0L,
|
||||
@ProtoId(5) val optMsgGraytips: AIOGrayTipsInfo? = null,
|
||||
@ProtoId(6) val optMsgMessagebox: MessageBoxInfo? = null,
|
||||
@ProtoId(7) val optMsgFloatedtips: FloatedTipsInfo? = null,
|
||||
@ProtoId(8) val optMsgToptips: AIOTopTipsInfo? = null,
|
||||
@ProtoId(9) val optMsgRedtips: RedGrayTipsInfo? = null,
|
||||
@ProtoId(10) val optMsgGroupNotify: GroupNotifyInfo? = null,
|
||||
@ProtoId(11) val optMsgRecall: MessageRecallReminder? = null,
|
||||
@ProtoId(12) val optMsgThemeNotify: ThemeStateNotify? = null,
|
||||
@ProtoId(13) val serviceType: Int = 0,
|
||||
@ProtoId(14) val optMsgObjmsgUpdate: NotifyObjmsgUpdate? = null,
|
||||
@ProtoId(15) val optMsgWerewolfPush: WereWolfPush? = null,
|
||||
@SerialId(1) val optEnumType: Int /* enum */ = 1,
|
||||
@SerialId(2) val optUint64MsgTime: Long = 0L,
|
||||
@SerialId(3) val optUint64MsgExpires: Long = 0L,
|
||||
@SerialId(4) val optUint64GroupCode: Long = 0L,
|
||||
@SerialId(5) val optMsgGraytips: AIOGrayTipsInfo? = null,
|
||||
@SerialId(6) val optMsgMessagebox: MessageBoxInfo? = null,
|
||||
@SerialId(7) val optMsgFloatedtips: FloatedTipsInfo? = null,
|
||||
@SerialId(8) val optMsgToptips: AIOTopTipsInfo? = null,
|
||||
@SerialId(9) val optMsgRedtips: RedGrayTipsInfo? = null,
|
||||
@SerialId(10) val optMsgGroupNotify: GroupNotifyInfo? = null,
|
||||
@SerialId(11) val optMsgRecall: MessageRecallReminder? = null,
|
||||
@SerialId(12) val optMsgThemeNotify: ThemeStateNotify? = null,
|
||||
@SerialId(13) val serviceType: Int = 0,
|
||||
@SerialId(14) val optMsgObjmsgUpdate: NotifyObjmsgUpdate? = null,
|
||||
@SerialId(15) val optMsgWerewolfPush: WereWolfPush? = null,
|
||||
// @SerialId(16) val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null,
|
||||
// @SerialId(17) val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null,
|
||||
@ProtoId(18) val optMsgGoldtips: GoldMsgTipsElem? = null,
|
||||
@ProtoId(20) val optMsgMiniappNotify: MiniAppNotify? = null,
|
||||
@ProtoId(21) val optUint64SenderUin: Long = 0L,
|
||||
@ProtoId(22) val optMsgLuckybagNotify: LuckyBagNotify? = null,
|
||||
@ProtoId(23) val optMsgTroopformtipsPush: TroopFormGrayTipsInfo? = null,
|
||||
@ProtoId(24) val optMsgMediaPush: MediaChangePushInfo? = null,
|
||||
@ProtoId(26) val optGeneralGrayTip: GeneralGrayTipInfo? = null,
|
||||
@ProtoId(27) val optMsgVideoPush: VideoChangePushInfo? = null,
|
||||
@ProtoId(28) val optLbsShareChangePlusInfo: LbsShareChangePushInfo? = null,
|
||||
@ProtoId(29) val optMsgSingPush: SingChangePushInfo? = null,
|
||||
@ProtoId(30) val optMsgGroupInfoChange: GroupInfoChange? = null
|
||||
@SerialId(18) val optMsgGoldtips: GoldMsgTipsElem? = null,
|
||||
@SerialId(20) val optMsgMiniappNotify: MiniAppNotify? = null,
|
||||
@SerialId(21) val optUint64SenderUin: Long = 0L,
|
||||
@SerialId(22) val optMsgLuckybagNotify: LuckyBagNotify? = null,
|
||||
@SerialId(23) val optMsgTroopformtipsPush: TroopFormGrayTipsInfo? = null,
|
||||
@SerialId(24) val optMsgMediaPush: MediaChangePushInfo? = null,
|
||||
@SerialId(26) val optGeneralGrayTip: GeneralGrayTipInfo? = null,
|
||||
@SerialId(27) val optMsgVideoPush: VideoChangePushInfo? = null,
|
||||
@SerialId(28) val optLbsShareChangePlusInfo: LbsShareChangePushInfo? = null,
|
||||
@SerialId(29) val optMsgSingPush: SingChangePushInfo? = null,
|
||||
@SerialId(30) val optMsgGroupInfoChange: GroupInfoChange? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NotifyObjmsgUpdate(
|
||||
@ProtoId(1) val objmsgId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val updateType: Int = 0,
|
||||
@ProtoId(3) val extMsg: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val objmsgId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val updateType: Int = 0,
|
||||
@SerialId(3) val extMsg: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RedGrayTipsInfo(
|
||||
@ProtoId(1) val optUint32ShowLastest: Int = 0,
|
||||
@ProtoId(2) val senderUin: Long = 0L,
|
||||
@ProtoId(3) val receiverUin: Long = 0L,
|
||||
@ProtoId(4) val senderRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val receiverRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val authkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoType(ProtoNumberType.SIGNED) @ProtoId(7) val sint32Msgtype: Int = 0,
|
||||
@ProtoId(8) val luckyFlag: Int = 0,
|
||||
@ProtoId(9) val hideFlag: Int = 0,
|
||||
@ProtoId(10) val pcBody: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(11) val icon: Int = 0,
|
||||
@ProtoId(12) val luckyUin: Long = 0L,
|
||||
@ProtoId(13) val time: Int = 0,
|
||||
@ProtoId(14) val random: Int = 0,
|
||||
@ProtoId(15) val broadcastRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(16) val idiom: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(17) val idiomSeq: Int = 0,
|
||||
@ProtoId(18) val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(19) val jumpurl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val optUint32ShowLastest: Int = 0,
|
||||
@SerialId(2) val senderUin: Long = 0L,
|
||||
@SerialId(3) val receiverUin: Long = 0L,
|
||||
@SerialId(4) val senderRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val receiverRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val authkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoType(ProtoNumberType.SIGNED) @SerialId(7) val sint32Msgtype: Int = 0,
|
||||
@SerialId(8) val luckyFlag: Int = 0,
|
||||
@SerialId(9) val hideFlag: Int = 0,
|
||||
@SerialId(10) val pcBody: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(11) val icon: Int = 0,
|
||||
@SerialId(12) val luckyUin: Long = 0L,
|
||||
@SerialId(13) val time: Int = 0,
|
||||
@SerialId(14) val random: Int = 0,
|
||||
@SerialId(15) val broadcastRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(16) val idiom: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(17) val idiomSeq: Int = 0,
|
||||
@SerialId(18) val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(19) val jumpurl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReqBody(
|
||||
@ProtoId(1) val optUint64GroupCode: Long = 0L,
|
||||
@ProtoId(2) val uint64Memberuins: List<Long>? = null,
|
||||
@ProtoId(3) val optUint32Offline: Int = 0,
|
||||
@ProtoId(4) val msgInstCtrl: InstCtrl? = null,
|
||||
@ProtoId(5) val optBytesMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val optUint32BusiType: Int = 0
|
||||
@SerialId(1) val optUint64GroupCode: Long = 0L,
|
||||
@SerialId(2) val uint64Memberuins: List<Long>? = null,
|
||||
@SerialId(3) val optUint32Offline: Int = 0,
|
||||
@SerialId(4) val msgInstCtrl: InstCtrl? = null,
|
||||
@SerialId(5) val optBytesMsg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val optUint32BusiType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1) val optUint64GroupCode: Long = 0L
|
||||
@SerialId(1) val optUint64GroupCode: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SingChangePushInfo(
|
||||
@ProtoId(1) val seq: Long = 0L,
|
||||
@ProtoId(2) val actionType: Int = 0,
|
||||
@ProtoId(3) val groupId: Long = 0L,
|
||||
@ProtoId(4) val operUin: Long = 0L,
|
||||
@ProtoId(5) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val joinNums: Int = 0
|
||||
@SerialId(1) val seq: Long = 0L,
|
||||
@SerialId(2) val actionType: Int = 0,
|
||||
@SerialId(3) val groupId: Long = 0L,
|
||||
@SerialId(4) val operUin: Long = 0L,
|
||||
@SerialId(5) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val joinNums: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TemplParam(
|
||||
@ProtoId(1) val name: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val value: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val name: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val value: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ThemeStateNotify(
|
||||
@ProtoId(1) val state: Int = 0,
|
||||
@ProtoId(2) val feedsId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val themeName: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val actionUin: Long = 0L,
|
||||
@ProtoId(5) val createUin: Long = 0L
|
||||
@SerialId(1) val state: Int = 0,
|
||||
@SerialId(2) val feedsId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val themeName: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val actionUin: Long = 0L,
|
||||
@SerialId(5) val createUin: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TroopFormGrayTipsInfo(
|
||||
@ProtoId(1) val writerUin: Long = 0L,
|
||||
@ProtoId(2) val creatorUin: Long = 0L,
|
||||
@ProtoId(3) val richContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val optBytesUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val creatorNick: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val writerUin: Long = 0L,
|
||||
@SerialId(2) val creatorUin: Long = 0L,
|
||||
@SerialId(3) val richContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val optBytesUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val creatorNick: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class VideoChangePushInfo(
|
||||
@ProtoId(1) val seq: Long = 0L,
|
||||
@ProtoId(2) val actionType: Int = 0,
|
||||
@ProtoId(3) val groupId: Long = 0L,
|
||||
@ProtoId(4) val operUin: Long = 0L,
|
||||
@ProtoId(5) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val joinNums: Int = 0,
|
||||
@ProtoId(100) val extInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val seq: Long = 0L,
|
||||
@SerialId(2) val actionType: Int = 0,
|
||||
@SerialId(3) val groupId: Long = 0L,
|
||||
@SerialId(4) val operUin: Long = 0L,
|
||||
@SerialId(5) val grayTips: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val joinNums: Int = 0,
|
||||
@SerialId(100) val extInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class WereWolfPush(
|
||||
@ProtoId(1) val pushType: Int = 0,
|
||||
@ProtoId(2) val gameRoom: Long = 0L,
|
||||
@ProtoId(3) val enumGameState: Int = 0,
|
||||
@ProtoId(4) val gameRound: Int = 0,
|
||||
@ProtoId(5) val roles: List<Role>? = null,
|
||||
@ProtoId(6) val speaker: Long = 0L,
|
||||
@ProtoId(7) val judgeUin: Long = 0L,
|
||||
@ProtoId(8) val judgeWords: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(9) val enumOperation: Int = 0,
|
||||
@ProtoId(10) val srcUser: Long = 0L,
|
||||
@ProtoId(11) val dstUser: Long = 0L,
|
||||
@ProtoId(12) val deadUsers: List<Long>? = null,
|
||||
@ProtoId(13) val gameResult: Int = 0,
|
||||
@ProtoId(14) val timeoutSec: Int = 0,
|
||||
@ProtoId(15) val killConfirmed: Int = 0,
|
||||
@ProtoId(16) val judgeNickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(17) val votedTieUsers: List<Long>? = null
|
||||
@SerialId(1) val pushType: Int = 0,
|
||||
@SerialId(2) val gameRoom: Long = 0L,
|
||||
@SerialId(3) val enumGameState: Int = 0,
|
||||
@SerialId(4) val gameRound: Int = 0,
|
||||
@SerialId(5) val roles: List<Role>? = null,
|
||||
@SerialId(6) val speaker: Long = 0L,
|
||||
@SerialId(7) val judgeUin: Long = 0L,
|
||||
@SerialId(8) val judgeWords: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(9) val enumOperation: Int = 0,
|
||||
@SerialId(10) val srcUser: Long = 0L,
|
||||
@SerialId(11) val dstUser: Long = 0L,
|
||||
@SerialId(12) val deadUsers: List<Long>? = null,
|
||||
@SerialId(13) val gameResult: Int = 0,
|
||||
@SerialId(14) val timeoutSec: Int = 0,
|
||||
@SerialId(15) val killConfirmed: Int = 0,
|
||||
@SerialId(16) val judgeNickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(17) val votedTieUsers: List<Long>? = null
|
||||
) : ProtoBuf {
|
||||
@Serializable
|
||||
class GameRecord(
|
||||
@ProtoId(1) val total: Int = 0,
|
||||
@ProtoId(2) val win: Int = 0,
|
||||
@ProtoId(3) val lose: Int = 0,
|
||||
@ProtoId(4) val draw: Int = 0
|
||||
@SerialId(1) val total: Int = 0,
|
||||
@SerialId(2) val win: Int = 0,
|
||||
@SerialId(3) val lose: Int = 0,
|
||||
@SerialId(4) val draw: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Role(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val enumType: Int = 0,
|
||||
@ProtoId(3) val enumState: Int = 0,
|
||||
@ProtoId(4) val canSpeak: Int = 0,
|
||||
@ProtoId(5) val canListen: Int = 0,
|
||||
@ProtoId(6) val position: Int = 0,
|
||||
@ProtoId(7) val canVote: Int = 0,
|
||||
@ProtoId(8) val canVoted: Int = 0,
|
||||
@ProtoId(9) val alreadyChecked: Int = 0,
|
||||
@ProtoId(10) val alreadySaved: Int = 0,
|
||||
@ProtoId(11) val alreadyPoisoned: Int = 0,
|
||||
@ProtoId(12) val playerState: Int = 0,
|
||||
@ProtoId(13) val enumDeadOp: Int = 0,
|
||||
@ProtoId(14) val enumOperation: Int = 0,
|
||||
@ProtoId(15) val dstUser: Long = 0L,
|
||||
@ProtoId(16) val operationRound: Int = 0,
|
||||
@ProtoId(17) val msgGameRecord: GameRecord? = null,
|
||||
@ProtoId(18) val isWerewolf: Int = 0,
|
||||
@ProtoId(19) val defendedUser: Long = 0L,
|
||||
@ProtoId(20) val isSheriff: Int = 0
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val enumType: Int = 0,
|
||||
@SerialId(3) val enumState: Int = 0,
|
||||
@SerialId(4) val canSpeak: Int = 0,
|
||||
@SerialId(5) val canListen: Int = 0,
|
||||
@SerialId(6) val position: Int = 0,
|
||||
@SerialId(7) val canVote: Int = 0,
|
||||
@SerialId(8) val canVoted: Int = 0,
|
||||
@SerialId(9) val alreadyChecked: Int = 0,
|
||||
@SerialId(10) val alreadySaved: Int = 0,
|
||||
@SerialId(11) val alreadyPoisoned: Int = 0,
|
||||
@SerialId(12) val playerState: Int = 0,
|
||||
@SerialId(13) val enumDeadOp: Int = 0,
|
||||
@SerialId(14) val enumOperation: Int = 0,
|
||||
@SerialId(15) val dstUser: Long = 0L,
|
||||
@SerialId(16) val operationRound: Int = 0,
|
||||
@SerialId(17) val msgGameRecord: GameRecord? = null,
|
||||
@SerialId(18) val isWerewolf: Int = 0,
|
||||
@SerialId(19) val defendedUser: Long = 0L,
|
||||
@SerialId(20) val isSheriff: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
}
|
@ -11,8 +11,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import kotlinx.serialization.protobuf.ProtoNumberType
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
@ -22,74 +22,74 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
class Oidb0x858 : ProtoBuf {
|
||||
@Serializable
|
||||
class GoldMsgTipsElem(
|
||||
@ProtoId(1) val type: Int = 0,
|
||||
@ProtoId(2) val billno: String = "",
|
||||
@ProtoId(3) val result: Int = 0,
|
||||
@ProtoId(4) val amount: Int = 0,
|
||||
@ProtoId(5) val total: Int = 0,
|
||||
@ProtoId(6) val interval: Int = 0,
|
||||
@ProtoId(7) val finish: Int = 0,
|
||||
@ProtoId(8) val uin: List<Long>? = null,
|
||||
@ProtoId(9) val action: Int = 0
|
||||
@SerialId(1) val type: Int = 0,
|
||||
@SerialId(2) val billno: String = "",
|
||||
@SerialId(3) val result: Int = 0,
|
||||
@SerialId(4) val amount: Int = 0,
|
||||
@SerialId(5) val total: Int = 0,
|
||||
@SerialId(6) val interval: Int = 0,
|
||||
@SerialId(7) val finish: Int = 0,
|
||||
@SerialId(8) val uin: List<Long>? = null,
|
||||
@SerialId(9) val action: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class MessageRecallReminder(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val recalledMsgList: List<MessageMeta> = listOf(),
|
||||
@ProtoId(4) val reminderContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val userdef: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val recalledMsgList: List<MessageMeta> = listOf(),
|
||||
@SerialId(4) val reminderContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val userdef: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf {
|
||||
@Serializable
|
||||
class MessageMeta(
|
||||
@ProtoId(1) val seq: Int = 0,
|
||||
@ProtoId(2) val time: Int = 0,
|
||||
@ProtoId(3) val msgRandom: Int = 0
|
||||
@SerialId(1) val seq: Int = 0,
|
||||
@SerialId(2) val time: Int = 0,
|
||||
@SerialId(3) val msgRandom: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@Serializable
|
||||
class NotifyMsgBody(
|
||||
@ProtoId(1) val optEnumType: Int /* enum */ = 5,
|
||||
@ProtoId(2) val optUint64MsgTime: Long = 0L,
|
||||
@ProtoId(3) val optUint64MsgExpires: Long = 0L,
|
||||
@ProtoId(4) val optUint64ConfUin: Long = 0L,
|
||||
@ProtoId(5) val optMsgRedtips: RedGrayTipsInfo? = null,
|
||||
@ProtoId(6) val optMsgRecallReminder: MessageRecallReminder? = null,
|
||||
@ProtoId(7) val optMsgObjUpdate: NotifyObjmsgUpdate? = null,
|
||||
@SerialId(1) val optEnumType: Int /* enum */ = 5,
|
||||
@SerialId(2) val optUint64MsgTime: Long = 0L,
|
||||
@SerialId(3) val optUint64MsgExpires: Long = 0L,
|
||||
@SerialId(4) val optUint64ConfUin: Long = 0L,
|
||||
@SerialId(5) val optMsgRedtips: RedGrayTipsInfo? = null,
|
||||
@SerialId(6) val optMsgRecallReminder: MessageRecallReminder? = null,
|
||||
@SerialId(7) val optMsgObjUpdate: NotifyObjmsgUpdate? = null,
|
||||
// @SerialId(8) val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null,
|
||||
// @SerialId(9) val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null,
|
||||
@ProtoId(10) val optMsgGoldtips: GoldMsgTipsElem? = null
|
||||
@SerialId(10) val optMsgGoldtips: GoldMsgTipsElem? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NotifyObjmsgUpdate(
|
||||
@ProtoId(1) val objmsgId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val updateType: Int = 0,
|
||||
@ProtoId(3) val extMsg: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val objmsgId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val updateType: Int = 0,
|
||||
@SerialId(3) val extMsg: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RedGrayTipsInfo(
|
||||
@ProtoId(1) val optUint32ShowLastest: Int = 0,
|
||||
@ProtoId(2) val senderUin: Long = 0L,
|
||||
@ProtoId(3) val receiverUin: Long = 0L,
|
||||
@ProtoId(4) val senderRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val receiverRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val authkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoType(ProtoNumberType.SIGNED) @ProtoId(7) val sint32Msgtype: Int = 0,
|
||||
@ProtoId(8) val luckyFlag: Int = 0,
|
||||
@ProtoId(9) val hideFlag: Int = 0,
|
||||
@ProtoId(10) val pcBody: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(11) val icon: Int = 0,
|
||||
@ProtoId(12) val luckyUin: Long = 0L,
|
||||
@ProtoId(13) val time: Int = 0,
|
||||
@ProtoId(14) val random: Int = 0,
|
||||
@ProtoId(15) val broadcastRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(16) val idiom: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(17) val idiomSeq: Int = 0,
|
||||
@ProtoId(18) val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(19) val jumpurl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val optUint32ShowLastest: Int = 0,
|
||||
@SerialId(2) val senderUin: Long = 0L,
|
||||
@SerialId(3) val receiverUin: Long = 0L,
|
||||
@SerialId(4) val senderRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val receiverRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val authkey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoType(ProtoNumberType.SIGNED) @SerialId(7) val sint32Msgtype: Int = 0,
|
||||
@SerialId(8) val luckyFlag: Int = 0,
|
||||
@SerialId(9) val hideFlag: Int = 0,
|
||||
@SerialId(10) val pcBody: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(11) val icon: Int = 0,
|
||||
@SerialId(12) val luckyUin: Long = 0L,
|
||||
@SerialId(13) val time: Int = 0,
|
||||
@SerialId(14) val random: Int = 0,
|
||||
@SerialId(15) val broadcastRichContent: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(16) val idiom: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(17) val idiomSeq: Int = 0,
|
||||
@SerialId(18) val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(19) val jumpurl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,56 +18,56 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
class Common : ProtoBuf {
|
||||
@Serializable
|
||||
class BindInfo(
|
||||
@ProtoId(1) val friUin: Long = 0L,
|
||||
@ProtoId(2) val friNick: String = "",
|
||||
@ProtoId(3) val time: Long = 0L,
|
||||
@ProtoId(4) val bindStatus: Int = 0
|
||||
@SerialId(1) val friUin: Long = 0L,
|
||||
@SerialId(2) val friNick: String = "",
|
||||
@SerialId(3) val time: Long = 0L,
|
||||
@SerialId(4) val bindStatus: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class MedalInfo(
|
||||
@ProtoId(1) val id: Int = 0,
|
||||
@ProtoId(2) val type: Int = 0,
|
||||
@ProtoId(4) val seq: Long = 0,
|
||||
@ProtoId(5) val name: String = "",
|
||||
@ProtoId(6) val newflag: Int = 0,
|
||||
@ProtoId(7) val time: Long = 0L,
|
||||
@ProtoId(8) val msgBindFri: Common.BindInfo? = null,
|
||||
@ProtoId(11) val desc: String = "",
|
||||
@ProtoId(31) val level: Int = 0,
|
||||
@ProtoId(36) val taskinfos: List<Common.MedalTaskInfo>? = null,
|
||||
@ProtoId(40) val point: Int = 0,
|
||||
@ProtoId(41) val pointLevel2: Int = 0,
|
||||
@ProtoId(42) val pointLevel3: Int = 0,
|
||||
@ProtoId(43) val seqLevel2: Long = 0,
|
||||
@ProtoId(44) val seqLevel3: Long = 0,
|
||||
@ProtoId(45) val timeLevel2: Long = 0L,
|
||||
@ProtoId(46) val timeLevel3: Long = 0L,
|
||||
@ProtoId(47) val descLevel2: String = "",
|
||||
@ProtoId(48) val descLevel3: String = "",
|
||||
@ProtoId(49) val endtime: Int = 0,
|
||||
@ProtoId(50) val detailUrl: String = "",
|
||||
@ProtoId(51) val detailUrl2: String = "",
|
||||
@ProtoId(52) val detailUrl3: String = "",
|
||||
@ProtoId(53) val taskDesc: String = "",
|
||||
@ProtoId(54) val taskDesc2: String = "",
|
||||
@ProtoId(55) val taskDesc3: String = "",
|
||||
@ProtoId(56) val levelCount: Int = 0,
|
||||
@ProtoId(57) val noProgress: Int = 0,
|
||||
@ProtoId(58) val resource: String = "",
|
||||
@ProtoId(59) val fromuinLevel: Int = 0,
|
||||
@ProtoId(60) val unread: Int = 0,
|
||||
@ProtoId(61) val unread2: Int = 0,
|
||||
@ProtoId(62) val unread3: Int = 0
|
||||
@SerialId(1) val id: Int = 0,
|
||||
@SerialId(2) val type: Int = 0,
|
||||
@SerialId(4) val seq: Long = 0,
|
||||
@SerialId(5) val name: String = "",
|
||||
@SerialId(6) val newflag: Int = 0,
|
||||
@SerialId(7) val time: Long = 0L,
|
||||
@SerialId(8) val msgBindFri: Common.BindInfo? = null,
|
||||
@SerialId(11) val desc: String = "",
|
||||
@SerialId(31) val level: Int = 0,
|
||||
@SerialId(36) val taskinfos: List<Common.MedalTaskInfo>? = null,
|
||||
@SerialId(40) val point: Int = 0,
|
||||
@SerialId(41) val pointLevel2: Int = 0,
|
||||
@SerialId(42) val pointLevel3: Int = 0,
|
||||
@SerialId(43) val seqLevel2: Long = 0,
|
||||
@SerialId(44) val seqLevel3: Long = 0,
|
||||
@SerialId(45) val timeLevel2: Long = 0L,
|
||||
@SerialId(46) val timeLevel3: Long = 0L,
|
||||
@SerialId(47) val descLevel2: String = "",
|
||||
@SerialId(48) val descLevel3: String = "",
|
||||
@SerialId(49) val endtime: Int = 0,
|
||||
@SerialId(50) val detailUrl: String = "",
|
||||
@SerialId(51) val detailUrl2: String = "",
|
||||
@SerialId(52) val detailUrl3: String = "",
|
||||
@SerialId(53) val taskDesc: String = "",
|
||||
@SerialId(54) val taskDesc2: String = "",
|
||||
@SerialId(55) val taskDesc3: String = "",
|
||||
@SerialId(56) val levelCount: Int = 0,
|
||||
@SerialId(57) val noProgress: Int = 0,
|
||||
@SerialId(58) val resource: String = "",
|
||||
@SerialId(59) val fromuinLevel: Int = 0,
|
||||
@SerialId(60) val unread: Int = 0,
|
||||
@SerialId(61) val unread2: Int = 0,
|
||||
@SerialId(62) val unread3: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class MedalTaskInfo(
|
||||
@ProtoId(1) val taskid: Int = 0,
|
||||
@ProtoId(32) val int32TaskValue: Int = 0,
|
||||
@ProtoId(33) val tarValue: Int = 0,
|
||||
@ProtoId(34) val tarValueLevel2: Int = 0,
|
||||
@ProtoId(35) val tarValueLevel3: Int = 0
|
||||
@SerialId(1) val taskid: Int = 0,
|
||||
@SerialId(32) val int32TaskValue: Int = 0,
|
||||
@SerialId(33) val tarValue: Int = 0,
|
||||
@SerialId(34) val tarValueLevel2: Int = 0,
|
||||
@SerialId(35) val tarValueLevel3: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -75,475 +75,475 @@ class Common : ProtoBuf {
|
||||
class AppointDefine : ProtoBuf {
|
||||
@Serializable
|
||||
class ADFeedContent(
|
||||
@ProtoId(1) val msgUserInfo: AppointDefine.UserInfo? = null,
|
||||
@ProtoId(2) val strPicUrl: List<String> = listOf(),
|
||||
@ProtoId(3) val msgText: AppointDefine.RichText? = null,
|
||||
@ProtoId(4) val attendInfo: String = "",
|
||||
@ProtoId(5) val actionUrl: String = "",
|
||||
@ProtoId(6) val publishTime: Int = 0,
|
||||
@ProtoId(7) val msgHotTopicList: AppointDefine.HotTopicList? = null,
|
||||
@ProtoId(8) val moreUrl: String = "",
|
||||
@ProtoId(9) val recordDuration: String = ""
|
||||
@SerialId(1) val msgUserInfo: AppointDefine.UserInfo? = null,
|
||||
@SerialId(2) val strPicUrl: List<String> = listOf(),
|
||||
@SerialId(3) val msgText: AppointDefine.RichText? = null,
|
||||
@SerialId(4) val attendInfo: String = "",
|
||||
@SerialId(5) val actionUrl: String = "",
|
||||
@SerialId(6) val publishTime: Int = 0,
|
||||
@SerialId(7) val msgHotTopicList: AppointDefine.HotTopicList? = null,
|
||||
@SerialId(8) val moreUrl: String = "",
|
||||
@SerialId(9) val recordDuration: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RichText(
|
||||
@ProtoId(1) val msgElems: List<AppointDefine.Elem>? = null
|
||||
@SerialId(1) val msgElems: List<AppointDefine.Elem>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RankEvent(
|
||||
@ProtoId(1) val listtype: Int = 0,
|
||||
@ProtoId(2) val notifytype: Int = 0,
|
||||
@ProtoId(3) val eventtime: Int = 0,
|
||||
@ProtoId(4) val seq: Int = 0,
|
||||
@ProtoId(5) val notifyTips: String = ""
|
||||
@SerialId(1) val listtype: Int = 0,
|
||||
@SerialId(2) val notifytype: Int = 0,
|
||||
@SerialId(3) val eventtime: Int = 0,
|
||||
@SerialId(4) val seq: Int = 0,
|
||||
@SerialId(5) val notifyTips: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Wifi(
|
||||
@ProtoId(1) val mac: Long = 0L,
|
||||
@ProtoId(2) val int32Rssi: Int = 0
|
||||
@SerialId(1) val mac: Long = 0L,
|
||||
@SerialId(2) val int32Rssi: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class InterestItem(
|
||||
@ProtoId(1) val tagId: Long = 0L,
|
||||
@ProtoId(2) val tagName: String = "",
|
||||
@ProtoId(3) val tagIconUrl: String = "",
|
||||
@ProtoId(4) val tagHref: String = "",
|
||||
@ProtoId(5) val tagBackColor: String = "",
|
||||
@ProtoId(6) val tagFontColor: String = "",
|
||||
@ProtoId(7) val tagVid: String = "",
|
||||
@ProtoId(8) val tagType: Int = 0,
|
||||
@ProtoId(9) val addTime: Int = 0,
|
||||
@ProtoId(10) val tagCategory: String = "",
|
||||
@ProtoId(11) val tagOtherUrl: String = "",
|
||||
@ProtoId(12) val bid: Int = 0
|
||||
@SerialId(1) val tagId: Long = 0L,
|
||||
@SerialId(2) val tagName: String = "",
|
||||
@SerialId(3) val tagIconUrl: String = "",
|
||||
@SerialId(4) val tagHref: String = "",
|
||||
@SerialId(5) val tagBackColor: String = "",
|
||||
@SerialId(6) val tagFontColor: String = "",
|
||||
@SerialId(7) val tagVid: String = "",
|
||||
@SerialId(8) val tagType: Int = 0,
|
||||
@SerialId(9) val addTime: Int = 0,
|
||||
@SerialId(10) val tagCategory: String = "",
|
||||
@SerialId(11) val tagOtherUrl: String = "",
|
||||
@SerialId(12) val bid: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ShopID(
|
||||
@ProtoId(1) val shopid: String = "",
|
||||
@ProtoId(2) val sp: Int = 0
|
||||
@SerialId(1) val shopid: String = "",
|
||||
@SerialId(2) val sp: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FeedComment(
|
||||
@ProtoId(1) val commentId: String = "",
|
||||
@ProtoId(2) val feedId: String = "",
|
||||
@ProtoId(3) val msgPublisherInfo: AppointDefine.StrangerInfo? = null,
|
||||
@ProtoId(4) val time: Int = 0,
|
||||
@ProtoId(6) val msgReplyInfo: AppointDefine.ReplyInfo? = null,
|
||||
@ProtoId(7) val flag: Int = 0,
|
||||
@ProtoId(8) val msgContent: AppointDefine.RichText? = null,
|
||||
@ProtoId(9) val hot: Int = 0
|
||||
@SerialId(1) val commentId: String = "",
|
||||
@SerialId(2) val feedId: String = "",
|
||||
@SerialId(3) val msgPublisherInfo: AppointDefine.StrangerInfo? = null,
|
||||
@SerialId(4) val time: Int = 0,
|
||||
@SerialId(6) val msgReplyInfo: AppointDefine.ReplyInfo? = null,
|
||||
@SerialId(7) val flag: Int = 0,
|
||||
@SerialId(8) val msgContent: AppointDefine.RichText? = null,
|
||||
@SerialId(9) val hot: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ADFeed(
|
||||
@ProtoId(1) val taskId: Int = 0,
|
||||
@ProtoId(2) val style: Int = 0,
|
||||
@ProtoId(3) val content: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val taskId: Int = 0,
|
||||
@SerialId(2) val style: Int = 0,
|
||||
@SerialId(3) val content: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Cell(
|
||||
@ProtoId(1) val int32Mcc: Int = -1,
|
||||
@ProtoId(2) val int32Mnc: Int = -1,
|
||||
@ProtoId(3) val int32Lac: Int = -1,
|
||||
@ProtoId(4) val int32Cellid: Int = -1,
|
||||
@ProtoId(5) val int32Rssi: Int = 0
|
||||
@SerialId(1) val int32Mcc: Int = -1,
|
||||
@SerialId(2) val int32Mnc: Int = -1,
|
||||
@SerialId(3) val int32Lac: Int = -1,
|
||||
@SerialId(4) val int32Cellid: Int = -1,
|
||||
@SerialId(5) val int32Rssi: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RecentVistorEvent(
|
||||
@ProtoId(1) val eventtype: Int = 0,
|
||||
@ProtoId(2) val eventTinyid: Long = 0L,
|
||||
@ProtoId(3) val unreadCount: Int = 0
|
||||
@SerialId(1) val eventtype: Int = 0,
|
||||
@SerialId(2) val eventTinyid: Long = 0L,
|
||||
@SerialId(3) val unreadCount: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class OrganizerInfo(
|
||||
@ProtoId(1) val hostName: String = "",
|
||||
@ProtoId(2) val hostUrl: String = "",
|
||||
@ProtoId(3) val hostCover: String = ""
|
||||
@SerialId(1) val hostName: String = "",
|
||||
@SerialId(2) val hostUrl: String = "",
|
||||
@SerialId(3) val hostCover: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class InterestTag(
|
||||
@ProtoId(1) val tagType: Int = 0,
|
||||
@ProtoId(2) val msgTagList: List<AppointDefine.InterestItem>? = null
|
||||
@SerialId(1) val tagType: Int = 0,
|
||||
@SerialId(2) val msgTagList: List<AppointDefine.InterestItem>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class AppointInfoEx(
|
||||
@ProtoId(1) val feedsPicUrl: String = "",
|
||||
@ProtoId(2) val feedsUrl: String = "",
|
||||
@ProtoId(3) val detailTitle: String = "",
|
||||
@ProtoId(4) val detailDescribe: String = "",
|
||||
@ProtoId(5) val showPublisher: Int = 0,
|
||||
@ProtoId(6) val detailPicUrl: String = "",
|
||||
@ProtoId(7) val detailUrl: String = "",
|
||||
@ProtoId(8) val showAttend: Int = 0
|
||||
@SerialId(1) val feedsPicUrl: String = "",
|
||||
@SerialId(2) val feedsUrl: String = "",
|
||||
@SerialId(3) val detailTitle: String = "",
|
||||
@SerialId(4) val detailDescribe: String = "",
|
||||
@SerialId(5) val showPublisher: Int = 0,
|
||||
@SerialId(6) val detailPicUrl: String = "",
|
||||
@SerialId(7) val detailUrl: String = "",
|
||||
@SerialId(8) val showAttend: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DateComment(
|
||||
@ProtoId(1) val commentId: String = "",
|
||||
@ProtoId(2) val msgAppointId: AppointDefine.AppointID? = null,
|
||||
@ProtoId(3) val msgPublisherInfo: AppointDefine.StrangerInfo? = null,
|
||||
@ProtoId(4) val time: Int = 0,
|
||||
@ProtoId(6) val msgReplyInfo: AppointDefine.ReplyInfo? = null,
|
||||
@ProtoId(7) val flag: Int = 0,
|
||||
@ProtoId(8) val msgContent: AppointDefine.RichText? = null
|
||||
@SerialId(1) val commentId: String = "",
|
||||
@SerialId(2) val msgAppointId: AppointDefine.AppointID? = null,
|
||||
@SerialId(3) val msgPublisherInfo: AppointDefine.StrangerInfo? = null,
|
||||
@SerialId(4) val time: Int = 0,
|
||||
@SerialId(6) val msgReplyInfo: AppointDefine.ReplyInfo? = null,
|
||||
@SerialId(7) val flag: Int = 0,
|
||||
@SerialId(8) val msgContent: AppointDefine.RichText? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class AppointContent(
|
||||
@ProtoId(1) val appointSubject: Int = 0,
|
||||
@ProtoId(2) val payType: Int = 0,
|
||||
@ProtoId(3) val appointDate: Int = 0,
|
||||
@ProtoId(4) val appointGender: Int = 0,
|
||||
@ProtoId(5) val appointIntroduce: String = "",
|
||||
@ProtoId(6) val msgAppointAddress: AppointDefine.AddressInfo? = null,
|
||||
@ProtoId(7) val msgTravelInfo: AppointDefine.TravelInfo? = null
|
||||
@SerialId(1) val appointSubject: Int = 0,
|
||||
@SerialId(2) val payType: Int = 0,
|
||||
@SerialId(3) val appointDate: Int = 0,
|
||||
@SerialId(4) val appointGender: Int = 0,
|
||||
@SerialId(5) val appointIntroduce: String = "",
|
||||
@SerialId(6) val msgAppointAddress: AppointDefine.AddressInfo? = null,
|
||||
@SerialId(7) val msgTravelInfo: AppointDefine.TravelInfo? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FeedInfo(
|
||||
@ProtoId(1) val feedType: Long = 0L,
|
||||
@ProtoId(2) val feedId: String = "",
|
||||
@ProtoId(3) val msgFeedContent: AppointDefine.FeedContent? = null,
|
||||
@ProtoId(4) val msgTopicInfo: AppointDefine.NearbyTopic? = null,
|
||||
@ProtoId(5) val publishTime: Long = 0,
|
||||
@ProtoId(6) val praiseCount: Int = 0,
|
||||
@ProtoId(7) val praiseFlag: Int = 0,
|
||||
@ProtoId(8) val msgPraiseUser: List<AppointDefine.StrangerInfo>? = null,
|
||||
@ProtoId(9) val commentCount: Int = 0,
|
||||
@ProtoId(10) val msgCommentList: List<AppointDefine.FeedComment>? = null,
|
||||
@ProtoId(11) val commentRetAll: Int = 0,
|
||||
@ProtoId(12) val hotFlag: Int = 0,
|
||||
@ProtoId(13) val svrReserved: Long = 0L,
|
||||
@ProtoId(14) val msgHotEntry: AppointDefine.HotEntry? = null
|
||||
@SerialId(1) val feedType: Long = 0L,
|
||||
@SerialId(2) val feedId: String = "",
|
||||
@SerialId(3) val msgFeedContent: AppointDefine.FeedContent? = null,
|
||||
@SerialId(4) val msgTopicInfo: AppointDefine.NearbyTopic? = null,
|
||||
@SerialId(5) val publishTime: Long = 0,
|
||||
@SerialId(6) val praiseCount: Int = 0,
|
||||
@SerialId(7) val praiseFlag: Int = 0,
|
||||
@SerialId(8) val msgPraiseUser: List<AppointDefine.StrangerInfo>? = null,
|
||||
@SerialId(9) val commentCount: Int = 0,
|
||||
@SerialId(10) val msgCommentList: List<AppointDefine.FeedComment>? = null,
|
||||
@SerialId(11) val commentRetAll: Int = 0,
|
||||
@SerialId(12) val hotFlag: Int = 0,
|
||||
@SerialId(13) val svrReserved: Long = 0L,
|
||||
@SerialId(14) val msgHotEntry: AppointDefine.HotEntry? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HotTopicList(
|
||||
@ProtoId(1) val topicList: List<AppointDefine.HotTopic>? = null
|
||||
@SerialId(1) val topicList: List<AppointDefine.HotTopic>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FeedContent(
|
||||
@ProtoId(1) val strPicUrl: List<String> = listOf(),
|
||||
@ProtoId(2) val msgText: AppointDefine.RichText? = null,
|
||||
@ProtoId(3) val hrefUrl: String = "",
|
||||
@ProtoId(5) val groupName: String = "",
|
||||
@ProtoId(6) val groupBulletin: String = "",
|
||||
@ProtoId(7) val feedType: Int = 0,
|
||||
@ProtoId(8) val poiId: String = "",
|
||||
@ProtoId(9) val poiTitle: String = "",
|
||||
@ProtoId(20) val effectiveTime: Int = 0,
|
||||
@ProtoId(21) val expiationTime: Int = 0,
|
||||
@ProtoId(22) val msgLocale: AppointDefine.LocaleInfo? = null,
|
||||
@ProtoId(23) val feedsIndex: Int = 0,
|
||||
@ProtoId(24) val msgAd: AppointDefine.ADFeed? = null,
|
||||
@ProtoId(25) val privateData: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val strPicUrl: List<String> = listOf(),
|
||||
@SerialId(2) val msgText: AppointDefine.RichText? = null,
|
||||
@SerialId(3) val hrefUrl: String = "",
|
||||
@SerialId(5) val groupName: String = "",
|
||||
@SerialId(6) val groupBulletin: String = "",
|
||||
@SerialId(7) val feedType: Int = 0,
|
||||
@SerialId(8) val poiId: String = "",
|
||||
@SerialId(9) val poiTitle: String = "",
|
||||
@SerialId(20) val effectiveTime: Int = 0,
|
||||
@SerialId(21) val expiationTime: Int = 0,
|
||||
@SerialId(22) val msgLocale: AppointDefine.LocaleInfo? = null,
|
||||
@SerialId(23) val feedsIndex: Int = 0,
|
||||
@SerialId(24) val msgAd: AppointDefine.ADFeed? = null,
|
||||
@SerialId(25) val privateData: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class TravelInfo(
|
||||
@ProtoId(1) val msgDepartLocale: AppointDefine.LocaleInfo? = null,
|
||||
@ProtoId(2) val msgDestination: AppointDefine.LocaleInfo? = null,
|
||||
@ProtoId(3) val vehicle: Int = 0,
|
||||
@ProtoId(4) val partnerCount: Int = 0,
|
||||
@ProtoId(5) val placePicUrl: String = "",
|
||||
@ProtoId(6) val placeUrl: String = ""
|
||||
@SerialId(1) val msgDepartLocale: AppointDefine.LocaleInfo? = null,
|
||||
@SerialId(2) val msgDestination: AppointDefine.LocaleInfo? = null,
|
||||
@SerialId(3) val vehicle: Int = 0,
|
||||
@SerialId(4) val partnerCount: Int = 0,
|
||||
@SerialId(5) val placePicUrl: String = "",
|
||||
@SerialId(6) val placeUrl: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RecentFreshFeed(
|
||||
@ProtoId(1) val freshFeedInfo: List<AppointDefine.FreshFeedInfo>? = null,
|
||||
@ProtoId(2) val uid: Long = 0L
|
||||
@SerialId(1) val freshFeedInfo: List<AppointDefine.FreshFeedInfo>? = null,
|
||||
@SerialId(2) val uid: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GPS(
|
||||
@ProtoId(1) val int32Lat: Int = 900000000,
|
||||
@ProtoId(2) val int32Lon: Int = 900000000,
|
||||
@ProtoId(3) val int32Alt: Int = -10000000,
|
||||
@ProtoId(4) val int32Type: Int = 0
|
||||
@SerialId(1) val int32Lat: Int = 900000000,
|
||||
@SerialId(2) val int32Lon: Int = 900000000,
|
||||
@SerialId(3) val int32Alt: Int = -10000000,
|
||||
@SerialId(4) val int32Type: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class AppointID(
|
||||
@ProtoId(1) val requestId: String = ""
|
||||
@SerialId(1) val requestId: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class LocaleInfo(
|
||||
@ProtoId(1) val name: String = "",
|
||||
@ProtoId(2) val country: String = "",
|
||||
@ProtoId(3) val province: String = "",
|
||||
@ProtoId(4) val city: String = "",
|
||||
@ProtoId(5) val region: String = "",
|
||||
@ProtoId(6) val poi: String = "",
|
||||
@ProtoId(7) val msgGps: AppointDefine.GPS? = null,
|
||||
@ProtoId(8) val address: String = ""
|
||||
@SerialId(1) val name: String = "",
|
||||
@SerialId(2) val country: String = "",
|
||||
@SerialId(3) val province: String = "",
|
||||
@SerialId(4) val city: String = "",
|
||||
@SerialId(5) val region: String = "",
|
||||
@SerialId(6) val poi: String = "",
|
||||
@SerialId(7) val msgGps: AppointDefine.GPS? = null,
|
||||
@SerialId(8) val address: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class LBSInfo(
|
||||
@ProtoId(1) val msgGps: AppointDefine.GPS? = null,
|
||||
@ProtoId(2) val msgWifis: List<AppointDefine.Wifi>? = null,
|
||||
@ProtoId(3) val msgCells: List<AppointDefine.Cell>? = null
|
||||
@SerialId(1) val msgGps: AppointDefine.GPS? = null,
|
||||
@SerialId(2) val msgWifis: List<AppointDefine.Wifi>? = null,
|
||||
@SerialId(3) val msgCells: List<AppointDefine.Cell>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FeedEvent(
|
||||
@ProtoId(1) val eventId: Long = 0L,
|
||||
@ProtoId(2) val time: Int = 0,
|
||||
@ProtoId(3) val eventtype: Int = 0,
|
||||
@ProtoId(4) val msgUserInfo: AppointDefine.StrangerInfo? = null,
|
||||
@ProtoId(5) val msgFeedInfo: AppointDefine.FeedInfo? = null,
|
||||
@ProtoId(6) val eventTips: String = "",
|
||||
@ProtoId(7) val msgComment: AppointDefine.FeedComment? = null,
|
||||
@ProtoId(8) val cancelEventId: Long = 0L
|
||||
@SerialId(1) val eventId: Long = 0L,
|
||||
@SerialId(2) val time: Int = 0,
|
||||
@SerialId(3) val eventtype: Int = 0,
|
||||
@SerialId(4) val msgUserInfo: AppointDefine.StrangerInfo? = null,
|
||||
@SerialId(5) val msgFeedInfo: AppointDefine.FeedInfo? = null,
|
||||
@SerialId(6) val eventTips: String = "",
|
||||
@SerialId(7) val msgComment: AppointDefine.FeedComment? = null,
|
||||
@SerialId(8) val cancelEventId: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FeedsCookie(
|
||||
@ProtoId(1) val strList: List<String> = listOf(),
|
||||
@ProtoId(2) val pose: Int = 0,
|
||||
@ProtoId(3) val cookie: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val uint64Topics: List<Long>? = null
|
||||
@SerialId(1) val strList: List<String> = listOf(),
|
||||
@SerialId(2) val pose: Int = 0,
|
||||
@SerialId(3) val cookie: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val uint64Topics: List<Long>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NearbyTopic(
|
||||
@ProtoId(1) val topicId: Long = 0L,
|
||||
@ProtoId(2) val topic: String = "",
|
||||
@ProtoId(3) val foreword: String = "",
|
||||
@ProtoId(4) val createTime: Int = 0,
|
||||
@ProtoId(5) val updateTime: Int = 0,
|
||||
@ProtoId(6) val hotFlag: Int = 0,
|
||||
@ProtoId(7) val buttonStyle: Int = 0,
|
||||
@ProtoId(8) val buttonSrc: String = "",
|
||||
@ProtoId(9) val backgroundSrc: String = "",
|
||||
@ProtoId(10) val attendeeInfo: String = "",
|
||||
@ProtoId(11) val index: Int = 0,
|
||||
@ProtoId(12) val publishScope: Int = 0,
|
||||
@ProtoId(13) val effectiveTime: Int = 0,
|
||||
@ProtoId(14) val expiationTime: Int = 0,
|
||||
@ProtoId(15) val pushedUsrCount: Int = 0,
|
||||
@ProtoId(16) val timerangeLeft: Int = 0,
|
||||
@ProtoId(17) val timerangeRight: Int = 0,
|
||||
@ProtoId(18) val area: String = ""
|
||||
@SerialId(1) val topicId: Long = 0L,
|
||||
@SerialId(2) val topic: String = "",
|
||||
@SerialId(3) val foreword: String = "",
|
||||
@SerialId(4) val createTime: Int = 0,
|
||||
@SerialId(5) val updateTime: Int = 0,
|
||||
@SerialId(6) val hotFlag: Int = 0,
|
||||
@SerialId(7) val buttonStyle: Int = 0,
|
||||
@SerialId(8) val buttonSrc: String = "",
|
||||
@SerialId(9) val backgroundSrc: String = "",
|
||||
@SerialId(10) val attendeeInfo: String = "",
|
||||
@SerialId(11) val index: Int = 0,
|
||||
@SerialId(12) val publishScope: Int = 0,
|
||||
@SerialId(13) val effectiveTime: Int = 0,
|
||||
@SerialId(14) val expiationTime: Int = 0,
|
||||
@SerialId(15) val pushedUsrCount: Int = 0,
|
||||
@SerialId(16) val timerangeLeft: Int = 0,
|
||||
@SerialId(17) val timerangeRight: Int = 0,
|
||||
@SerialId(18) val area: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NearbyEvent(
|
||||
@ProtoId(1) val eventtype: Int = 0,
|
||||
@ProtoId(2) val msgRankevent: AppointDefine.RankEvent? = null,
|
||||
@ProtoId(3) val eventUin: Long = 0L,
|
||||
@ProtoId(4) val eventTinyid: Long = 0L
|
||||
@SerialId(1) val eventtype: Int = 0,
|
||||
@SerialId(2) val msgRankevent: AppointDefine.RankEvent? = null,
|
||||
@SerialId(3) val eventUin: Long = 0L,
|
||||
@SerialId(4) val eventTinyid: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Feed(
|
||||
@ProtoId(1) val msgUserInfo: AppointDefine.PublisherInfo? = null,
|
||||
@ProtoId(2) val msgFeedInfo: AppointDefine.FeedInfo? = null,
|
||||
@ProtoId(3) val ownerFlag: Int = 0
|
||||
@SerialId(1) val msgUserInfo: AppointDefine.PublisherInfo? = null,
|
||||
@SerialId(2) val msgFeedInfo: AppointDefine.FeedInfo? = null,
|
||||
@SerialId(3) val ownerFlag: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ActivityInfo(
|
||||
@ProtoId(2) val name: String = "",
|
||||
@ProtoId(3) val cover: String = "",
|
||||
@ProtoId(4) val url: String = "",
|
||||
@ProtoId(5) val startTime: Int = 0,
|
||||
@ProtoId(6) val endTime: Int = 0,
|
||||
@ProtoId(7) val locName: String = "",
|
||||
@ProtoId(8) val enroll: Long = 0L,
|
||||
@ProtoId(9) val createUin: Long = 0L,
|
||||
@ProtoId(10) val createTime: Int = 0,
|
||||
@ProtoId(11) val organizerInfo: AppointDefine.OrganizerInfo = OrganizerInfo(),
|
||||
@ProtoId(12) val flag: Long? = null
|
||||
@SerialId(2) val name: String = "",
|
||||
@SerialId(3) val cover: String = "",
|
||||
@SerialId(4) val url: String = "",
|
||||
@SerialId(5) val startTime: Int = 0,
|
||||
@SerialId(6) val endTime: Int = 0,
|
||||
@SerialId(7) val locName: String = "",
|
||||
@SerialId(8) val enroll: Long = 0L,
|
||||
@SerialId(9) val createUin: Long = 0L,
|
||||
@SerialId(10) val createTime: Int = 0,
|
||||
@SerialId(11) val organizerInfo: AppointDefine.OrganizerInfo = OrganizerInfo(),
|
||||
@SerialId(12) val flag: Long? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HotEntry(
|
||||
@ProtoId(1) val openFlag: Int = 0,
|
||||
@ProtoId(2) val restTime: Int = 0,
|
||||
@ProtoId(3) val foreword: String = "",
|
||||
@ProtoId(4) val backgroundSrc: String = ""
|
||||
@SerialId(1) val openFlag: Int = 0,
|
||||
@SerialId(2) val restTime: Int = 0,
|
||||
@SerialId(3) val foreword: String = "",
|
||||
@SerialId(4) val backgroundSrc: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class UserFeed(
|
||||
@ProtoId(1) val msgUserInfo: AppointDefine.PublisherInfo? = null,
|
||||
@ProtoId(2) val msgFeedInfo: AppointDefine.FeedInfo? = null,
|
||||
@ProtoId(3) val ownerFlag: Int = 0,
|
||||
@ProtoId(4) val msgActivityInfo: AppointDefine.ActivityInfo? = null
|
||||
@SerialId(1) val msgUserInfo: AppointDefine.PublisherInfo? = null,
|
||||
@SerialId(2) val msgFeedInfo: AppointDefine.FeedInfo? = null,
|
||||
@SerialId(3) val ownerFlag: Int = 0,
|
||||
@SerialId(4) val msgActivityInfo: AppointDefine.ActivityInfo? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Elem(
|
||||
@ProtoId(1) val content: String = "",
|
||||
@ProtoId(2) val msgFaceInfo: AppointDefine.Face? = null
|
||||
@SerialId(1) val content: String = "",
|
||||
@SerialId(2) val msgFaceInfo: AppointDefine.Face? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HotFreshFeedList(
|
||||
@ProtoId(1) val msgFeeds: List<AppointDefine.HotUserFeed>? = null,
|
||||
@ProtoId(2) val updateTime: Int = 0
|
||||
@SerialId(1) val msgFeeds: List<AppointDefine.HotUserFeed>? = null,
|
||||
@SerialId(2) val updateTime: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RptInterestTag(
|
||||
@ProtoId(1) val interestTags: List<AppointDefine.InterestTag>? = null
|
||||
@SerialId(1) val interestTags: List<AppointDefine.InterestTag>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class AddressInfo(
|
||||
@ProtoId(1) val companyZone: String = "",
|
||||
@ProtoId(2) val companyName: String = "",
|
||||
@ProtoId(3) val companyAddr: String = "",
|
||||
@ProtoId(4) val companyPicUrl: String = "",
|
||||
@ProtoId(5) val companyUrl: String = "",
|
||||
@ProtoId(6) val msgCompanyId: AppointDefine.ShopID? = null
|
||||
@SerialId(1) val companyZone: String = "",
|
||||
@SerialId(2) val companyName: String = "",
|
||||
@SerialId(3) val companyAddr: String = "",
|
||||
@SerialId(4) val companyPicUrl: String = "",
|
||||
@SerialId(5) val companyUrl: String = "",
|
||||
@SerialId(6) val msgCompanyId: AppointDefine.ShopID? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PublisherInfo(
|
||||
@ProtoId(1) val tinyid: Long = 0L,
|
||||
@ProtoId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val age: Int = 0,
|
||||
@ProtoId(4) val gender: Int = 0,
|
||||
@ProtoId(5) val constellation: String = "",
|
||||
@ProtoId(6) val profession: Int = 0,
|
||||
@ProtoId(7) val distance: String = "",
|
||||
@ProtoId(8) val marriage: Int = 0,
|
||||
@ProtoId(9) val vipinfo: String = "",
|
||||
@ProtoId(10) val recommend: Int = 0,
|
||||
@ProtoId(11) val godflag: Int = 0,
|
||||
@ProtoId(12) val chatflag: Int = 0,
|
||||
@ProtoId(13) val chatupCount: Int = 0,
|
||||
@ProtoId(14) val charm: Int = 0,
|
||||
@ProtoId(15) val charmLevel: Int = 0,
|
||||
@ProtoId(16) val pubNumber: Int = 0,
|
||||
@ProtoId(17) val msgCommonLabel: AppointDefine.CommonLabel? = null,
|
||||
@ProtoId(18) val recentVistorTime: Int = 0,
|
||||
@ProtoId(19) val strangerDeclare: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(20) val friendUin: Long = 0L,
|
||||
@ProtoId(21) val historyFlag: Int = 0,
|
||||
@ProtoId(22) val followflag: Long = 0L
|
||||
@SerialId(1) val tinyid: Long = 0L,
|
||||
@SerialId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val age: Int = 0,
|
||||
@SerialId(4) val gender: Int = 0,
|
||||
@SerialId(5) val constellation: String = "",
|
||||
@SerialId(6) val profession: Int = 0,
|
||||
@SerialId(7) val distance: String = "",
|
||||
@SerialId(8) val marriage: Int = 0,
|
||||
@SerialId(9) val vipinfo: String = "",
|
||||
@SerialId(10) val recommend: Int = 0,
|
||||
@SerialId(11) val godflag: Int = 0,
|
||||
@SerialId(12) val chatflag: Int = 0,
|
||||
@SerialId(13) val chatupCount: Int = 0,
|
||||
@SerialId(14) val charm: Int = 0,
|
||||
@SerialId(15) val charmLevel: Int = 0,
|
||||
@SerialId(16) val pubNumber: Int = 0,
|
||||
@SerialId(17) val msgCommonLabel: AppointDefine.CommonLabel? = null,
|
||||
@SerialId(18) val recentVistorTime: Int = 0,
|
||||
@SerialId(19) val strangerDeclare: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(20) val friendUin: Long = 0L,
|
||||
@SerialId(21) val historyFlag: Int = 0,
|
||||
@SerialId(22) val followflag: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HotUserFeed(
|
||||
@ProtoId(1) val feedId: String = "",
|
||||
@ProtoId(2) val praiseCount: Int = 0,
|
||||
@ProtoId(3) val publishUid: Long = 0L,
|
||||
@ProtoId(4) val publishTime: Int = 0
|
||||
@SerialId(1) val feedId: String = "",
|
||||
@SerialId(2) val praiseCount: Int = 0,
|
||||
@SerialId(3) val publishUid: Long = 0L,
|
||||
@SerialId(4) val publishTime: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FreshFeedInfo(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val time: Int = 0,
|
||||
@ProtoId(3) val feedId: String = "",
|
||||
@ProtoId(4) val feedType: Long = 0L
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val time: Int = 0,
|
||||
@SerialId(3) val feedId: String = "",
|
||||
@SerialId(4) val feedType: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class CommonLabel(
|
||||
@ProtoId(1) val lableId: Int = 0,
|
||||
@ProtoId(2) val lableMsgPre: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val lableMsgLast: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val interstName: List<ByteArray>? = null,
|
||||
@ProtoId(5) val interstType: List<Int>? = null
|
||||
@SerialId(1) val lableId: Int = 0,
|
||||
@SerialId(2) val lableMsgPre: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val lableMsgLast: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val interstName: List<ByteArray>? = null,
|
||||
@SerialId(5) val interstType: List<Int>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Face(
|
||||
@ProtoId(1) val index: Int = 0
|
||||
@SerialId(1) val index: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class StrangerInfo(
|
||||
@ProtoId(1) val tinyid: Long = 0L,
|
||||
@ProtoId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val age: Int = 0,
|
||||
@ProtoId(4) val gender: Int = 0,
|
||||
@ProtoId(5) val dating: Int = 0,
|
||||
@ProtoId(6) val listIdx: Int = 0,
|
||||
@ProtoId(7) val constellation: String = "",
|
||||
@ProtoId(8) val profession: Int = 0,
|
||||
@ProtoId(9) val marriage: Int = 0,
|
||||
@ProtoId(10) val vipinfo: String = "",
|
||||
@ProtoId(11) val recommend: Int = 0,
|
||||
@ProtoId(12) val godflag: Int = 0,
|
||||
@ProtoId(13) val charm: Int = 0,
|
||||
@ProtoId(14) val charmLevel: Int = 0,
|
||||
@ProtoId(15) val uin: Long = 0L
|
||||
@SerialId(1) val tinyid: Long = 0L,
|
||||
@SerialId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val age: Int = 0,
|
||||
@SerialId(4) val gender: Int = 0,
|
||||
@SerialId(5) val dating: Int = 0,
|
||||
@SerialId(6) val listIdx: Int = 0,
|
||||
@SerialId(7) val constellation: String = "",
|
||||
@SerialId(8) val profession: Int = 0,
|
||||
@SerialId(9) val marriage: Int = 0,
|
||||
@SerialId(10) val vipinfo: String = "",
|
||||
@SerialId(11) val recommend: Int = 0,
|
||||
@SerialId(12) val godflag: Int = 0,
|
||||
@SerialId(13) val charm: Int = 0,
|
||||
@SerialId(14) val charmLevel: Int = 0,
|
||||
@SerialId(15) val uin: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HotTopic(
|
||||
@ProtoId(1) val id: Long = 0L,
|
||||
@ProtoId(2) val title: String = "",
|
||||
@ProtoId(3) val topicType: Long = 0L,
|
||||
@ProtoId(4) val total: Long = 0L,
|
||||
@ProtoId(5) val times: Long = 0L,
|
||||
@ProtoId(6) val historyTimes: Long = 0L,
|
||||
@ProtoId(7) val bgUrl: String = "",
|
||||
@ProtoId(8) val url: String = "",
|
||||
@ProtoId(9) val extraInfo: String = ""
|
||||
@SerialId(1) val id: Long = 0L,
|
||||
@SerialId(2) val title: String = "",
|
||||
@SerialId(3) val topicType: Long = 0L,
|
||||
@SerialId(4) val total: Long = 0L,
|
||||
@SerialId(5) val times: Long = 0L,
|
||||
@SerialId(6) val historyTimes: Long = 0L,
|
||||
@SerialId(7) val bgUrl: String = "",
|
||||
@SerialId(8) val url: String = "",
|
||||
@SerialId(9) val extraInfo: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DateEvent(
|
||||
@ProtoId(1) val eventId: Long = 0L,
|
||||
@ProtoId(2) val time: Int = 0,
|
||||
@ProtoId(3) val type: Int = 0,
|
||||
@ProtoId(4) val msgUserInfo: AppointDefine.StrangerInfo? = null,
|
||||
@ProtoId(5) val msgDateInfo: AppointDefine.AppointInfo? = null,
|
||||
@ProtoId(6) val attendIdx: Int = 0,
|
||||
@ProtoId(7) val eventTips: String = "",
|
||||
@ProtoId(8) val msgComment: AppointDefine.DateComment? = null,
|
||||
@ProtoId(9) val cancelEventId: Long = 0L
|
||||
@SerialId(1) val eventId: Long = 0L,
|
||||
@SerialId(2) val time: Int = 0,
|
||||
@SerialId(3) val type: Int = 0,
|
||||
@SerialId(4) val msgUserInfo: AppointDefine.StrangerInfo? = null,
|
||||
@SerialId(5) val msgDateInfo: AppointDefine.AppointInfo? = null,
|
||||
@SerialId(6) val attendIdx: Int = 0,
|
||||
@SerialId(7) val eventTips: String = "",
|
||||
@SerialId(8) val msgComment: AppointDefine.DateComment? = null,
|
||||
@SerialId(9) val cancelEventId: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class AppointInfo(
|
||||
@ProtoId(1) val msgAppointId: AppointDefine.AppointID? = null,
|
||||
@ProtoId(2) val msgAppointment: AppointDefine.AppointContent? = null,
|
||||
@ProtoId(3) val appointStatus: Int = 0,
|
||||
@ProtoId(4) val joinWording: String = "",
|
||||
@ProtoId(5) val viewWording: String = "",
|
||||
@ProtoId(6) val unreadCount: Int = 0,
|
||||
@ProtoId(7) val owner: Int = 0,
|
||||
@ProtoId(8) val join: Int = 0,
|
||||
@ProtoId(9) val view: Int = 0,
|
||||
@ProtoId(10) val commentWording: String = "",
|
||||
@ProtoId(11) val commentNum: Int = 0,
|
||||
@ProtoId(12) val attendStatus: Int = 0,
|
||||
@ProtoId(13) val msgAppointmentEx: AppointDefine.AppointInfoEx? = null
|
||||
@SerialId(1) val msgAppointId: AppointDefine.AppointID? = null,
|
||||
@SerialId(2) val msgAppointment: AppointDefine.AppointContent? = null,
|
||||
@SerialId(3) val appointStatus: Int = 0,
|
||||
@SerialId(4) val joinWording: String = "",
|
||||
@SerialId(5) val viewWording: String = "",
|
||||
@SerialId(6) val unreadCount: Int = 0,
|
||||
@SerialId(7) val owner: Int = 0,
|
||||
@SerialId(8) val join: Int = 0,
|
||||
@SerialId(9) val view: Int = 0,
|
||||
@SerialId(10) val commentWording: String = "",
|
||||
@SerialId(11) val commentNum: Int = 0,
|
||||
@SerialId(12) val attendStatus: Int = 0,
|
||||
@SerialId(13) val msgAppointmentEx: AppointDefine.AppointInfoEx? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class UserInfo(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val age: Int = 0,
|
||||
@ProtoId(4) val gender: Int = 0,
|
||||
@ProtoId(5) val avatar: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val nickname: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val age: Int = 0,
|
||||
@SerialId(4) val gender: Int = 0,
|
||||
@SerialId(5) val avatar: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReplyInfo(
|
||||
@ProtoId(1) val commentId: String = "",
|
||||
@ProtoId(2) val msgStrangerInfo: AppointDefine.StrangerInfo? = null
|
||||
@SerialId(1) val commentId: String = "",
|
||||
@SerialId(2) val msgStrangerInfo: AppointDefine.StrangerInfo? = null
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,40 +18,40 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
internal class Vec0xd50 : ProtoBuf {
|
||||
@Serializable
|
||||
internal class ExtSnsFrdData(
|
||||
@ProtoId(1) val frdUin: Long = 0L,
|
||||
@ProtoId(91001) val musicSwitch: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(101001) val mutualmarkAlienation: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(141001) val mutualmarkScore: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(151001) val ksingSwitch: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(181001) val lbsShare: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val frdUin: Long = 0L,
|
||||
@SerialId(91001) val musicSwitch: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(101001) val mutualmarkAlienation: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(141001) val mutualmarkScore: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(151001) val ksingSwitch: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(181001) val lbsShare: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class RspBody(
|
||||
@ProtoId(1) val msgUpdateData: List<Vec0xd50.ExtSnsFrdData>? = null,
|
||||
@ProtoId(11) val over: Int = 0,
|
||||
@ProtoId(12) val nextStart: Int = 0,
|
||||
@ProtoId(13) val uint64UnfinishedUins: List<Long>? = null
|
||||
@SerialId(1) val msgUpdateData: List<Vec0xd50.ExtSnsFrdData>? = null,
|
||||
@SerialId(11) val over: Int = 0,
|
||||
@SerialId(12) val nextStart: Int = 0,
|
||||
@SerialId(13) val uint64UnfinishedUins: List<Long>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class ReqBody(
|
||||
@ProtoId(1) val appid: Long = 0L,
|
||||
@ProtoId(2) val maxPkgSize: Int = 0,
|
||||
@ProtoId(3) val startTime: Int = 0,
|
||||
@ProtoId(4) val startIndex: Int = 0,
|
||||
@ProtoId(5) val reqNum: Int = 0,
|
||||
@ProtoId(6) val uinList: List<Long>? = null,
|
||||
@ProtoId(91001) val reqMusicSwitch: Int = 0,
|
||||
@ProtoId(101001) val reqMutualmarkAlienation: Int = 0,
|
||||
@ProtoId(141001) val reqMutualmarkScore: Int = 0,
|
||||
@ProtoId(151001) val reqKsingSwitch: Int = 0,
|
||||
@ProtoId(181001) val reqMutualmarkLbsshare: Int = 0
|
||||
@SerialId(1) val appid: Long = 0L,
|
||||
@SerialId(2) val maxPkgSize: Int = 0,
|
||||
@SerialId(3) val startTime: Int = 0,
|
||||
@SerialId(4) val startIndex: Int = 0,
|
||||
@SerialId(5) val reqNum: Int = 0,
|
||||
@SerialId(6) val uinList: List<Long>? = null,
|
||||
@SerialId(91001) val reqMusicSwitch: Int = 0,
|
||||
@SerialId(101001) val reqMutualmarkAlienation: Int = 0,
|
||||
@SerialId(141001) val reqMutualmarkScore: Int = 0,
|
||||
@SerialId(151001) val reqKsingSwitch: Int = 0,
|
||||
@SerialId(181001) val reqMutualmarkLbsshare: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class KSingRelationInfo(
|
||||
@ProtoId(1) val flag: Int = 0
|
||||
@SerialId(1) val flag: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -59,21 +59,21 @@ internal class Vec0xd50 : ProtoBuf {
|
||||
internal class Vec0xd6b : ProtoBuf {
|
||||
@Serializable
|
||||
internal class ReqBody(
|
||||
@ProtoId(1) val maxPkgSize: Int = 0,
|
||||
@ProtoId(2) val startTime: Int = 0,
|
||||
@ProtoId(11) val uinList: List<Long>? = null
|
||||
@SerialId(1) val maxPkgSize: Int = 0,
|
||||
@SerialId(2) val startTime: Int = 0,
|
||||
@SerialId(11) val uinList: List<Long>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class RspBody(
|
||||
@ProtoId(11) val msgMutualmarkData: List<Vec0xd6b.MutualMarkData>? = null,
|
||||
@ProtoId(12) val uint64UnfinishedUins: List<Long>? = null
|
||||
@SerialId(11) val msgMutualmarkData: List<Vec0xd6b.MutualMarkData>? = null,
|
||||
@SerialId(12) val uint64UnfinishedUins: List<Long>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MutualMarkData(
|
||||
@ProtoId(1) val frdUin: Long = 0L,
|
||||
@ProtoId(2) val result: Int = 0
|
||||
@SerialId(1) val frdUin: Long = 0L,
|
||||
@SerialId(2) val result: Int = 0
|
||||
// @SerialId(11) val mutualmarkInfo: List<Mutualmark.MutualMark>? = null
|
||||
) : ProtoBuf
|
||||
}
|
||||
@ -82,26 +82,26 @@ internal class Vec0xd6b : ProtoBuf {
|
||||
internal class Mutualmark : ProtoBuf {
|
||||
@Serializable
|
||||
internal class MutualmarkInfo(
|
||||
@ProtoId(1) val lastActionTime: Long = 0L,
|
||||
@ProtoId(2) val level: Int = 0,
|
||||
@ProtoId(3) val lastChangeTime: Long = 0L,
|
||||
@ProtoId(4) val continueDays: Int = 0,
|
||||
@ProtoId(5) val wildcardWording: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val notifyTime: Long = 0L,
|
||||
@ProtoId(7) val iconStatus: Long = 0L,
|
||||
@ProtoId(8) val iconStatusEndTime: Long = 0L,
|
||||
@ProtoId(9) val closeFlag: Int = 0,
|
||||
@ProtoId(10) val resourceInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val lastActionTime: Long = 0L,
|
||||
@SerialId(2) val level: Int = 0,
|
||||
@SerialId(3) val lastChangeTime: Long = 0L,
|
||||
@SerialId(4) val continueDays: Int = 0,
|
||||
@SerialId(5) val wildcardWording: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val notifyTime: Long = 0L,
|
||||
@SerialId(7) val iconStatus: Long = 0L,
|
||||
@SerialId(8) val iconStatusEndTime: Long = 0L,
|
||||
@SerialId(9) val closeFlag: Int = 0,
|
||||
@SerialId(10) val resourceInfo: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class ResourceInfo17(
|
||||
@ProtoId(1) val dynamicUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val staticUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val cartoonUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val cartoonMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val playCartoon: Int = 0,
|
||||
@ProtoId(6) val word: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val dynamicUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val staticUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val cartoonUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val cartoonMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val playCartoon: Int = 0,
|
||||
@SerialId(6) val word: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,51 +18,51 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
class GroupLabel : ProtoBuf {
|
||||
@Serializable
|
||||
class Label(
|
||||
@ProtoId(1) val name: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val enumType: Int /* enum */ = 1,
|
||||
@ProtoId(3) val textColor: GroupLabel.Color? = null,
|
||||
@ProtoId(4) val edgingColor: GroupLabel.Color? = null,
|
||||
@ProtoId(5) val labelAttr: Int = 0,
|
||||
@ProtoId(6) val labelType: Int = 0
|
||||
@SerialId(1) val name: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val enumType: Int /* enum */ = 1,
|
||||
@SerialId(3) val textColor: GroupLabel.Color? = null,
|
||||
@SerialId(4) val edgingColor: GroupLabel.Color? = null,
|
||||
@SerialId(5) val labelAttr: Int = 0,
|
||||
@SerialId(6) val labelType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1) val error: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val groupInfo: List<GroupLabel.GroupInfo>? = null
|
||||
@SerialId(1) val error: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val groupInfo: List<GroupLabel.GroupInfo>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SourceId(
|
||||
@ProtoId(1) val sourceId: Int = 0
|
||||
@SerialId(1) val sourceId: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class GroupInfo(
|
||||
@ProtoId(1) val int32Result: Int = 0,
|
||||
@ProtoId(2) val groupCode: Long = 0L,
|
||||
@ProtoId(3) val groupLabel: List<GroupLabel.Label>? = null
|
||||
@SerialId(1) val int32Result: Int = 0,
|
||||
@SerialId(2) val groupCode: Long = 0L,
|
||||
@SerialId(3) val groupLabel: List<GroupLabel.Label>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Color(
|
||||
@ProtoId(1) val r: Int = 0,
|
||||
@ProtoId(2) val g: Int = 0,
|
||||
@ProtoId(3) val b: Int = 0
|
||||
@SerialId(1) val r: Int = 0,
|
||||
@SerialId(2) val g: Int = 0,
|
||||
@SerialId(3) val b: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReqBody(
|
||||
@ProtoId(1) val sourceId: GroupLabel.SourceId? = null,
|
||||
@ProtoId(2) val uinInfo: GroupLabel.UinInfo? = null,
|
||||
@ProtoId(3) val numberLabel: Int = 5,
|
||||
@ProtoId(4) val groupCode: List<Long>? = null,
|
||||
@ProtoId(5) val labelStyle: Int = 0
|
||||
@SerialId(1) val sourceId: GroupLabel.SourceId? = null,
|
||||
@SerialId(2) val uinInfo: GroupLabel.UinInfo? = null,
|
||||
@SerialId(3) val numberLabel: Int = 5,
|
||||
@SerialId(4) val groupCode: List<Long>? = null,
|
||||
@SerialId(5) val labelStyle: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class UinInfo(
|
||||
@ProtoId(1) val int64Longitude: Long = 0L,
|
||||
@ProtoId(2) val int64Latitude: Long = 0L
|
||||
@SerialId(1) val int64Longitude: Long = 0L,
|
||||
@SerialId(2) val int64Latitude: Long = 0L
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import kotlinx.serialization.protobuf.ProtoNumberType
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
@ -20,90 +20,90 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
class BdhExtinfo : ProtoBuf {
|
||||
@Serializable
|
||||
class CommFileExtReq(
|
||||
@ProtoId(1) val actionType: Int = 0,
|
||||
@ProtoId(2) val uuid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val actionType: Int = 0,
|
||||
@SerialId(2) val uuid: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class CommFileExtRsp(
|
||||
@ProtoId(1) val int32Retcode: Int = 0,
|
||||
@ProtoId(2) val downloadUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val int32Retcode: Int = 0,
|
||||
@SerialId(2) val downloadUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PicInfo(
|
||||
@ProtoId(1) val idx: Int = 0,
|
||||
@ProtoId(2) val size: Int = 0,
|
||||
@ProtoId(3) val binMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val type: Int = 0
|
||||
@SerialId(1) val idx: Int = 0,
|
||||
@SerialId(2) val size: Int = 0,
|
||||
@SerialId(3) val binMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val type: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class QQVoiceExtReq(
|
||||
@ProtoId(1) val qid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val fmt: Int = 0,
|
||||
@ProtoId(3) val rate: Int = 0,
|
||||
@ProtoId(4) val bits: Int = 0,
|
||||
@ProtoId(5) val channel: Int = 0,
|
||||
@ProtoId(6) val pinyin: Int = 0
|
||||
@SerialId(1) val qid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val fmt: Int = 0,
|
||||
@SerialId(3) val rate: Int = 0,
|
||||
@SerialId(4) val bits: Int = 0,
|
||||
@SerialId(5) val channel: Int = 0,
|
||||
@SerialId(6) val pinyin: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class QQVoiceExtRsp(
|
||||
@ProtoId(1) val qid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val int32Retcode: Int = 0,
|
||||
@ProtoId(3) val msgResult: List<QQVoiceResult>? = null
|
||||
@SerialId(1) val qid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val int32Retcode: Int = 0,
|
||||
@SerialId(3) val msgResult: List<QQVoiceResult>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class QQVoiceResult(
|
||||
@ProtoId(1) val text: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val pinyin: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val source: Int = 0
|
||||
@SerialId(1) val text: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val pinyin: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val source: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ShortVideoReqExtInfo(
|
||||
@ProtoId(1) val cmd: Int = 0,
|
||||
@ProtoId(2) val sessionId: Long = 0L,
|
||||
@ProtoId(3) val msgThumbinfo: PicInfo? = null,
|
||||
@ProtoId(4) val msgVideoinfo: VideoInfo? = null,
|
||||
@ProtoId(5) val msgShortvideoSureReq: ShortVideoSureReqInfo? = null,
|
||||
@ProtoId(6) val boolIsMergeCmdBeforeData: Boolean = false
|
||||
@SerialId(1) val cmd: Int = 0,
|
||||
@SerialId(2) val sessionId: Long = 0L,
|
||||
@SerialId(3) val msgThumbinfo: PicInfo? = null,
|
||||
@SerialId(4) val msgVideoinfo: VideoInfo? = null,
|
||||
@SerialId(5) val msgShortvideoSureReq: ShortVideoSureReqInfo? = null,
|
||||
@SerialId(6) val boolIsMergeCmdBeforeData: Boolean = false
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ShortVideoRspExtInfo(
|
||||
@ProtoId(1) val cmd: Int = 0,
|
||||
@ProtoId(2) val sessionId: Long = 0L,
|
||||
@ProtoId(3) val int32Retcode: Int = 0,
|
||||
@ProtoId(4) val errinfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val msgThumbinfo: PicInfo? = null,
|
||||
@ProtoId(6) val msgVideoinfo: VideoInfo? = null,
|
||||
@ProtoId(7) val msgShortvideoSureRsp: ShortVideoSureRspInfo? = null,
|
||||
@ProtoId(8) val retryFlag: Int = 0
|
||||
@SerialId(1) val cmd: Int = 0,
|
||||
@SerialId(2) val sessionId: Long = 0L,
|
||||
@SerialId(3) val int32Retcode: Int = 0,
|
||||
@SerialId(4) val errinfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val msgThumbinfo: PicInfo? = null,
|
||||
@SerialId(6) val msgVideoinfo: VideoInfo? = null,
|
||||
@SerialId(7) val msgShortvideoSureRsp: ShortVideoSureRspInfo? = null,
|
||||
@SerialId(8) val retryFlag: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ShortVideoSureReqInfo(
|
||||
@ProtoId(1) val fromuin: Long = 0L,
|
||||
@ProtoId(2) val chatType: Int = 0,
|
||||
@ProtoId(3) val touin: Long = 0L,
|
||||
@ProtoId(4) val groupCode: Long = 0L,
|
||||
@ProtoId(5) val clientType: Int = 0,
|
||||
@ProtoId(6) val msgThumbinfo: PicInfo? = null,
|
||||
@ProtoId(7) val msgMergeVideoinfo: List<VideoInfo>? = null,
|
||||
@ProtoId(8) val msgDropVideoinfo: List<VideoInfo>? = null,
|
||||
@ProtoId(9) val businessType: Int = 0,
|
||||
@ProtoId(10) val subBusinessType: Int = 0
|
||||
@SerialId(1) val fromuin: Long = 0L,
|
||||
@SerialId(2) val chatType: Int = 0,
|
||||
@SerialId(3) val touin: Long = 0L,
|
||||
@SerialId(4) val groupCode: Long = 0L,
|
||||
@SerialId(5) val clientType: Int = 0,
|
||||
@SerialId(6) val msgThumbinfo: PicInfo? = null,
|
||||
@SerialId(7) val msgMergeVideoinfo: List<VideoInfo>? = null,
|
||||
@SerialId(8) val msgDropVideoinfo: List<VideoInfo>? = null,
|
||||
@SerialId(9) val businessType: Int = 0,
|
||||
@SerialId(10) val subBusinessType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ShortVideoSureRspInfo(
|
||||
@ProtoId(1) val fileid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val ukey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val msgVideoinfo: VideoInfo? = null,
|
||||
@ProtoId(4) val mergeCost: Int = 0
|
||||
@SerialId(1) val fileid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val ukey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val msgVideoinfo: VideoInfo? = null,
|
||||
@SerialId(4) val mergeCost: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
@ -111,31 +111,31 @@ class BdhExtinfo : ProtoBuf {
|
||||
|
||||
@Serializable
|
||||
class StoryVideoExtRsp(
|
||||
@ProtoId(1) val int32Retcode: Int = 0,
|
||||
@ProtoId(2) val msg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val cdnUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val fileKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val fileId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val int32Retcode: Int = 0,
|
||||
@SerialId(2) val msg: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val cdnUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val fileKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val fileId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class UploadPicExtInfo(
|
||||
@ProtoId(1) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val downloadUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val thumbDownloadUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val fileResid: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val downloadUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val thumbDownloadUrl: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class VideoInfo(
|
||||
@ProtoId(1) val idx: Int = 0,
|
||||
@ProtoId(2) val size: Int = 0,
|
||||
@ProtoId(3) val binMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val format: Int = 0,
|
||||
@ProtoId(5) val resLen: Int = 0,
|
||||
@ProtoId(6) val resWidth: Int = 0,
|
||||
@ProtoId(7) val time: Int = 0,
|
||||
@ProtoId(8) val starttime: Long = 0L,
|
||||
@ProtoId(9) val isAudio: Int = 0
|
||||
@SerialId(1) val idx: Int = 0,
|
||||
@SerialId(2) val size: Int = 0,
|
||||
@SerialId(3) val binMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val format: Int = 0,
|
||||
@SerialId(5) val resLen: Int = 0,
|
||||
@SerialId(6) val resWidth: Int = 0,
|
||||
@SerialId(7) val time: Int = 0,
|
||||
@SerialId(8) val starttime: Long = 0L,
|
||||
@SerialId(9) val isAudio: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -143,142 +143,142 @@ class BdhExtinfo : ProtoBuf {
|
||||
class CSDataHighwayHead : ProtoBuf {
|
||||
@Serializable
|
||||
class C2CCommonExtendinfo(
|
||||
@ProtoId(1) val infoId: Int = 0,
|
||||
@ProtoId(2) val msgFilterExtendinfo: FilterExtendinfo? = null
|
||||
@SerialId(1) val infoId: Int = 0,
|
||||
@SerialId(2) val msgFilterExtendinfo: FilterExtendinfo? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DataHighwayHead(
|
||||
@ProtoId(1) val version: Int = 0,
|
||||
@ProtoId(2) val uin: String = "", // yes
|
||||
@ProtoId(3) val command: String = "",
|
||||
@ProtoId(4) val seq: Int = 0,
|
||||
@ProtoId(5) val retryTimes: Int = 0,
|
||||
@ProtoId(6) val appid: Int = 0,
|
||||
@ProtoId(7) val dataflag: Int = 0,
|
||||
@ProtoId(8) val commandId: Int = 0,
|
||||
@ProtoId(9) val buildVer: String = "",
|
||||
@ProtoId(10) val localeId: Int = 0
|
||||
@SerialId(1) val version: Int = 0,
|
||||
@SerialId(2) val uin: String = "", // yes
|
||||
@SerialId(3) val command: String = "",
|
||||
@SerialId(4) val seq: Int = 0,
|
||||
@SerialId(5) val retryTimes: Int = 0,
|
||||
@SerialId(6) val appid: Int = 0,
|
||||
@SerialId(7) val dataflag: Int = 0,
|
||||
@SerialId(8) val commandId: Int = 0,
|
||||
@SerialId(9) val buildVer: String = "",
|
||||
@SerialId(10) val localeId: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DataHole(
|
||||
@ProtoId(1) val begin: Long = 0L,
|
||||
@ProtoId(2) val end: Long = 0L
|
||||
@SerialId(1) val begin: Long = 0L,
|
||||
@SerialId(2) val end: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FilterExtendinfo(
|
||||
@ProtoId(1) val filterFlag: Int = 0,
|
||||
@ProtoId(2) val msgImageFilterRequest: ImageFilterRequest? = null
|
||||
@SerialId(1) val filterFlag: Int = 0,
|
||||
@SerialId(2) val msgImageFilterRequest: ImageFilterRequest? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class FilterStyle(
|
||||
@ProtoId(1) val styleId: Int = 0,
|
||||
@ProtoId(2) val styleName: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val styleId: Int = 0,
|
||||
@SerialId(2) val styleName: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ImageFilterRequest(
|
||||
@ProtoId(1) val sessionId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val clientIp: Int = 0,
|
||||
@ProtoId(3) val uin: Long = 0L,
|
||||
@ProtoId(4) val style: FilterStyle? = null,
|
||||
@ProtoId(5) val width: Int = 0,
|
||||
@ProtoId(6) val height: Int = 0,
|
||||
@ProtoId(7) val imageData: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val sessionId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val clientIp: Int = 0,
|
||||
@SerialId(3) val uin: Long = 0L,
|
||||
@SerialId(4) val style: FilterStyle? = null,
|
||||
@SerialId(5) val width: Int = 0,
|
||||
@SerialId(6) val height: Int = 0,
|
||||
@SerialId(7) val imageData: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ImageFilterResponse(
|
||||
@ProtoId(1) val retCode: Int = 0,
|
||||
@ProtoId(2) val imageData: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val costTime: Int = 0
|
||||
@SerialId(1) val retCode: Int = 0,
|
||||
@SerialId(2) val imageData: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val costTime: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class LoginSigHead(
|
||||
@ProtoId(1) val loginsigType: Int = 0,
|
||||
@ProtoId(2) val loginsig: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val loginsigType: Int = 0,
|
||||
@SerialId(2) val loginsig: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NewServiceTicket(
|
||||
@ProtoId(1) val signature: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val ukey: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val signature: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val ukey: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PicInfoExt(
|
||||
@ProtoId(1) val picWidth: Int = 0,
|
||||
@ProtoId(2) val picHeight: Int = 0,
|
||||
@ProtoId(3) val picFlag: Int = 0,
|
||||
@ProtoId(4) val busiType: Int = 0,
|
||||
@ProtoId(5) val srcTerm: Int = 0,
|
||||
@ProtoId(6) val platType: Int = 0,
|
||||
@ProtoId(7) val netType: Int = 0,
|
||||
@ProtoId(8) val imgType: Int = 0,
|
||||
@ProtoId(9) val appPicType: Int = 0
|
||||
@SerialId(1) val picWidth: Int = 0,
|
||||
@SerialId(2) val picHeight: Int = 0,
|
||||
@SerialId(3) val picFlag: Int = 0,
|
||||
@SerialId(4) val busiType: Int = 0,
|
||||
@SerialId(5) val srcTerm: Int = 0,
|
||||
@SerialId(6) val platType: Int = 0,
|
||||
@SerialId(7) val netType: Int = 0,
|
||||
@SerialId(8) val imgType: Int = 0,
|
||||
@SerialId(9) val appPicType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PicRspExtInfo(
|
||||
@ProtoId(1) val skey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val clientIp: Int = 0,
|
||||
@ProtoId(3) val upOffset: Long = 0L,
|
||||
@ProtoId(4) val blockSize: Long = 0L
|
||||
@SerialId(1) val skey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val clientIp: Int = 0,
|
||||
@SerialId(3) val upOffset: Long = 0L,
|
||||
@SerialId(4) val blockSize: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class QueryHoleRsp(
|
||||
@ProtoId(1) val result: Int = 0,
|
||||
@ProtoId(2) val dataHole: List<DataHole>? = null,
|
||||
@ProtoId(3) val boolCompFlag: Boolean = false
|
||||
@SerialId(1) val result: Int = 0,
|
||||
@SerialId(2) val dataHole: List<DataHole>? = null,
|
||||
@SerialId(3) val boolCompFlag: Boolean = false
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReqDataHighwayHead(
|
||||
@ProtoId(1) val msgBasehead: DataHighwayHead? = null,
|
||||
@ProtoId(2) val msgSeghead: SegHead? = null,
|
||||
@ProtoId(3) val reqExtendinfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val timestamp: Long = 0L,
|
||||
@ProtoId(5) val msgLoginSigHead: LoginSigHead? = null
|
||||
@SerialId(1) val msgBasehead: DataHighwayHead? = null,
|
||||
@SerialId(2) val msgSeghead: SegHead? = null,
|
||||
@SerialId(3) val reqExtendinfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val timestamp: Long = 0L,
|
||||
@SerialId(5) val msgLoginSigHead: LoginSigHead? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1) val msgQueryHoleRsp: QueryHoleRsp? = null
|
||||
@SerialId(1) val msgQueryHoleRsp: QueryHoleRsp? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspDataHighwayHead(
|
||||
@ProtoId(1) val msgBasehead: DataHighwayHead? = null,
|
||||
@ProtoId(2) val msgSeghead: SegHead? = null,
|
||||
@ProtoId(3) val errorCode: Int = 0,
|
||||
@ProtoId(4) val allowRetry: Int = 0,
|
||||
@ProtoId(5) val cachecost: Int = 0,
|
||||
@ProtoId(6) val htcost: Int = 0,
|
||||
@ProtoId(7) val rspExtendinfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(8) val timestamp: Long = 0L,
|
||||
@ProtoId(9) val range: Long = 0L,
|
||||
@ProtoId(10) val isReset: Int = 0
|
||||
@SerialId(1) val msgBasehead: DataHighwayHead? = null,
|
||||
@SerialId(2) val msgSeghead: SegHead? = null,
|
||||
@SerialId(3) val errorCode: Int = 0,
|
||||
@SerialId(4) val allowRetry: Int = 0,
|
||||
@SerialId(5) val cachecost: Int = 0,
|
||||
@SerialId(6) val htcost: Int = 0,
|
||||
@SerialId(7) val rspExtendinfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(8) val timestamp: Long = 0L,
|
||||
@SerialId(9) val range: Long = 0L,
|
||||
@SerialId(10) val isReset: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SegHead(
|
||||
@ProtoId(1) val serviceid: Int = 0,
|
||||
@ProtoId(2) val filesize: Long = 0L,
|
||||
@ProtoId(3) val dataoffset: Long = 0L,
|
||||
@ProtoId(4) val datalength: Int = 0,
|
||||
@ProtoId(5) val rtcode: Int = 0,
|
||||
@ProtoId(6) val serviceticket: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val flag: Int = 0,
|
||||
@ProtoId(8) val md5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(9) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val cacheAddr: Int = 0,
|
||||
@ProtoId(11) val queryTimes: Int = 0,
|
||||
@ProtoId(12) val updateCacheip: Int = 0
|
||||
@SerialId(1) val serviceid: Int = 0,
|
||||
@SerialId(2) val filesize: Long = 0L,
|
||||
@SerialId(3) val dataoffset: Long = 0L,
|
||||
@SerialId(4) val datalength: Int = 0,
|
||||
@SerialId(5) val rtcode: Int = 0,
|
||||
@SerialId(6) val serviceticket: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val flag: Int = 0,
|
||||
@SerialId(8) val md5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(9) val fileMd5: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val cacheAddr: Int = 0,
|
||||
@SerialId(11) val queryTimes: Int = 0,
|
||||
@SerialId(12) val updateCacheip: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -286,31 +286,31 @@ class CSDataHighwayHead : ProtoBuf {
|
||||
class HwConfigPersistentPB : ProtoBuf {
|
||||
@Serializable
|
||||
class HwConfigItemPB(
|
||||
@ProtoId(1) val ingKey: String = "",
|
||||
@ProtoId(2) val endPointList: List<HwEndPointPB>? = null
|
||||
@SerialId(1) val ingKey: String = "",
|
||||
@SerialId(2) val endPointList: List<HwEndPointPB>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HwConfigPB(
|
||||
@ProtoId(1) val configItemList: List<HwConfigItemPB>? = null,
|
||||
@ProtoId(2) val netSegConfList: List<HwNetSegConfPB>? = null,
|
||||
@ProtoId(3) val shortVideoNetConf: List<HwNetSegConfPB>? = null,
|
||||
@ProtoId(4) val configItemListIp6: List<HwConfigItemPB>? = null
|
||||
@SerialId(1) val configItemList: List<HwConfigItemPB>? = null,
|
||||
@SerialId(2) val netSegConfList: List<HwNetSegConfPB>? = null,
|
||||
@SerialId(3) val shortVideoNetConf: List<HwNetSegConfPB>? = null,
|
||||
@SerialId(4) val configItemListIp6: List<HwConfigItemPB>? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HwEndPointPB(
|
||||
@ProtoId(1) val ingHost: String = "",
|
||||
@ProtoId(2) val int32Port: Int = 0,
|
||||
@ProtoId(3) val int64Timestampe: Long = 0L
|
||||
@SerialId(1) val ingHost: String = "",
|
||||
@SerialId(2) val int32Port: Int = 0,
|
||||
@SerialId(3) val int64Timestampe: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class HwNetSegConfPB(
|
||||
@ProtoId(1) val int64NetType: Long = 0L,
|
||||
@ProtoId(2) val int64SegSize: Long = 0L,
|
||||
@ProtoId(3) val int64SegNum: Long = 0L,
|
||||
@ProtoId(4) val int64CurConnNum: Long = 0L
|
||||
@SerialId(1) val int64NetType: Long = 0L,
|
||||
@SerialId(2) val int64SegSize: Long = 0L,
|
||||
@SerialId(3) val int64SegNum: Long = 0L,
|
||||
@SerialId(4) val int64CurConnNum: Long = 0L
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -318,8 +318,8 @@ class HwConfigPersistentPB : ProtoBuf {
|
||||
class HwSessionInfoPersistentPB : ProtoBuf {
|
||||
@Serializable
|
||||
class HwSessionInfoPB(
|
||||
@ProtoId(1) val httpconnSigSession: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val sessionKey: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val httpconnSigSession: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val sessionKey: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -327,137 +327,137 @@ class HwSessionInfoPersistentPB : ProtoBuf {
|
||||
class Subcmd0x501 : ProtoBuf {
|
||||
@Serializable
|
||||
class ReqBody(
|
||||
@ProtoId(1281) val msgSubcmd0x501ReqBody: SubCmd0x501ReqBody? = null
|
||||
@SerialId(1281) val msgSubcmd0x501ReqBody: SubCmd0x501ReqBody? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1281) val msgSubcmd0x501RspBody: SubCmd0x501Rspbody? = null
|
||||
@SerialId(1281) val msgSubcmd0x501RspBody: SubCmd0x501Rspbody? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SubCmd0x501ReqBody(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val idcId: Int = 0,
|
||||
@ProtoId(3) val appid: Int = 0,
|
||||
@ProtoId(4) val loginSigType: Int = 0,
|
||||
@ProtoId(5) val loginSigTicket: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val requestFlag: Int = 0,
|
||||
@ProtoId(7) val uint32ServiceTypes: List<Int>? = null,
|
||||
@ProtoId(8) val bid: Int = 0,
|
||||
@ProtoId(9) val term: Int = 0,
|
||||
@ProtoId(10) val plat: Int = 0,
|
||||
@ProtoId(11) val net: Int = 0,
|
||||
@ProtoId(12) val caller: Int = 0
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val idcId: Int = 0,
|
||||
@SerialId(3) val appid: Int = 0,
|
||||
@SerialId(4) val loginSigType: Int = 0,
|
||||
@SerialId(5) val loginSigTicket: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val requestFlag: Int = 0,
|
||||
@SerialId(7) val uint32ServiceTypes: List<Int>? = null,
|
||||
@SerialId(8) val bid: Int = 0,
|
||||
@SerialId(9) val term: Int = 0,
|
||||
@SerialId(10) val plat: Int = 0,
|
||||
@SerialId(11) val net: Int = 0,
|
||||
@SerialId(12) val caller: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SubCmd0x501Rspbody(
|
||||
@ProtoId(1) val httpconnSigSession: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val sessionKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val msgHttpconnAddrs: List<SrvAddrs>? = null,
|
||||
@ProtoId(4) val preConnection: Int = 0,
|
||||
@ProtoId(5) val csConn: Int = 0,
|
||||
@ProtoId(6) val msgIpLearnConf: IpLearnConf? = null,
|
||||
@ProtoId(7) val msgDynTimeoutConf: DynTimeOutConf? = null,
|
||||
@ProtoId(8) val msgOpenUpConf: OpenUpConf? = null,
|
||||
@ProtoId(9) val msgDownloadEncryptConf: DownloadEncryptConf? = null,
|
||||
@ProtoId(10) val msgShortVideoConf: ShortVideoConf? = null,
|
||||
@ProtoId(11) val msgPtvConf: PTVConf? = null
|
||||
@SerialId(1) val httpconnSigSession: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val sessionKey: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val msgHttpconnAddrs: List<SrvAddrs>? = null,
|
||||
@SerialId(4) val preConnection: Int = 0,
|
||||
@SerialId(5) val csConn: Int = 0,
|
||||
@SerialId(6) val msgIpLearnConf: IpLearnConf? = null,
|
||||
@SerialId(7) val msgDynTimeoutConf: DynTimeOutConf? = null,
|
||||
@SerialId(8) val msgOpenUpConf: OpenUpConf? = null,
|
||||
@SerialId(9) val msgDownloadEncryptConf: DownloadEncryptConf? = null,
|
||||
@SerialId(10) val msgShortVideoConf: ShortVideoConf? = null,
|
||||
@SerialId(11) val msgPtvConf: PTVConf? = null
|
||||
) : ProtoBuf {
|
||||
@Serializable
|
||||
class DownloadEncryptConf(
|
||||
@ProtoId(1) val boolEnableEncryptRequest: Boolean = false,
|
||||
@ProtoId(2) val boolEnableEncryptedPic: Boolean = false,
|
||||
@ProtoId(3) val ctrlFlag: Int = 0
|
||||
@SerialId(1) val boolEnableEncryptRequest: Boolean = false,
|
||||
@SerialId(2) val boolEnableEncryptedPic: Boolean = false,
|
||||
@SerialId(3) val ctrlFlag: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DynTimeOutConf(
|
||||
@ProtoId(1) val tbase2g: Int = 0,
|
||||
@ProtoId(2) val tbase3g: Int = 0,
|
||||
@ProtoId(3) val tbase4g: Int = 0,
|
||||
@ProtoId(4) val tbaseWifi: Int = 0,
|
||||
@ProtoId(5) val torg2g: Int = 0,
|
||||
@ProtoId(6) val torg3g: Int = 0,
|
||||
@ProtoId(7) val torg4g: Int = 0,
|
||||
@ProtoId(8) val torgWifi: Int = 0,
|
||||
@ProtoId(9) val maxTimeout: Int = 0,
|
||||
@ProtoId(10) val enableDynTimeout: Int = 0,
|
||||
@ProtoId(11) val maxTimeout2g: Int = 0,
|
||||
@ProtoId(12) val maxTimeout3g: Int = 0,
|
||||
@ProtoId(13) val maxTimeout4g: Int = 0,
|
||||
@ProtoId(14) val maxTimeoutWifi: Int = 0,
|
||||
@ProtoId(15) val hbTimeout2g: Int = 0,
|
||||
@ProtoId(16) val hbTimeout3g: Int = 0,
|
||||
@ProtoId(17) val hbTimeout4g: Int = 0,
|
||||
@ProtoId(18) val hbTimeoutWifi: Int = 0,
|
||||
@ProtoId(19) val hbTimeoutDefault: Int = 0
|
||||
@SerialId(1) val tbase2g: Int = 0,
|
||||
@SerialId(2) val tbase3g: Int = 0,
|
||||
@SerialId(3) val tbase4g: Int = 0,
|
||||
@SerialId(4) val tbaseWifi: Int = 0,
|
||||
@SerialId(5) val torg2g: Int = 0,
|
||||
@SerialId(6) val torg3g: Int = 0,
|
||||
@SerialId(7) val torg4g: Int = 0,
|
||||
@SerialId(8) val torgWifi: Int = 0,
|
||||
@SerialId(9) val maxTimeout: Int = 0,
|
||||
@SerialId(10) val enableDynTimeout: Int = 0,
|
||||
@SerialId(11) val maxTimeout2g: Int = 0,
|
||||
@SerialId(12) val maxTimeout3g: Int = 0,
|
||||
@SerialId(13) val maxTimeout4g: Int = 0,
|
||||
@SerialId(14) val maxTimeoutWifi: Int = 0,
|
||||
@SerialId(15) val hbTimeout2g: Int = 0,
|
||||
@SerialId(16) val hbTimeout3g: Int = 0,
|
||||
@SerialId(17) val hbTimeout4g: Int = 0,
|
||||
@SerialId(18) val hbTimeoutWifi: Int = 0,
|
||||
@SerialId(19) val hbTimeoutDefault: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Ip6Addr(
|
||||
@ProtoId(1) val type: Int = 0,
|
||||
@ProtoId(2) val ip6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val port: Int = 0,
|
||||
@ProtoId(4) val area: Int = 0,
|
||||
@ProtoId(5) val sameIsp: Int = 0
|
||||
@SerialId(1) val type: Int = 0,
|
||||
@SerialId(2) val ip6: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val port: Int = 0,
|
||||
@SerialId(4) val area: Int = 0,
|
||||
@SerialId(5) val sameIsp: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class IpAddr(
|
||||
@ProtoId(1) val type: Int = 0,
|
||||
@ProtoType(ProtoNumberType.FIXED) @ProtoId(2) val ip: Int = 0,
|
||||
@ProtoId(3) val port: Int = 0,
|
||||
@ProtoId(4) val area: Int = 0,
|
||||
@ProtoId(5) val sameIsp: Int = 0
|
||||
@SerialId(1) val type: Int = 0,
|
||||
@ProtoType(ProtoNumberType.FIXED) @SerialId(2) val ip: Int = 0,
|
||||
@SerialId(3) val port: Int = 0,
|
||||
@SerialId(4) val area: Int = 0,
|
||||
@SerialId(5) val sameIsp: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class IpLearnConf(
|
||||
@ProtoId(1) val refreshCachedIp: Int = 0,
|
||||
@ProtoId(2) val enableIpLearn: Int = 0
|
||||
@SerialId(1) val refreshCachedIp: Int = 0,
|
||||
@SerialId(2) val enableIpLearn: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class NetSegConf(
|
||||
@ProtoId(1) val netType: Int = 0,
|
||||
@ProtoId(2) val segsize: Int = 0,
|
||||
@ProtoId(3) val segnum: Int = 0,
|
||||
@ProtoId(4) val curconnnum: Int = 0
|
||||
@SerialId(1) val netType: Int = 0,
|
||||
@SerialId(2) val segsize: Int = 0,
|
||||
@SerialId(3) val segnum: Int = 0,
|
||||
@SerialId(4) val curconnnum: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class OpenUpConf(
|
||||
@ProtoId(1) val boolEnableOpenup: Boolean = false,
|
||||
@ProtoId(2) val preSendSegnum: Int = 0,
|
||||
@ProtoId(3) val preSendSegnum3g: Int = 0,
|
||||
@ProtoId(4) val preSendSegnum4g: Int = 0,
|
||||
@ProtoId(5) val preSendSegnumWifi: Int = 0
|
||||
@SerialId(1) val boolEnableOpenup: Boolean = false,
|
||||
@SerialId(2) val preSendSegnum: Int = 0,
|
||||
@SerialId(3) val preSendSegnum3g: Int = 0,
|
||||
@SerialId(4) val preSendSegnum4g: Int = 0,
|
||||
@SerialId(5) val preSendSegnumWifi: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PTVConf(
|
||||
@ProtoId(1) val channelType: Int = 0,
|
||||
@ProtoId(2) val msgNetsegconf: List<NetSegConf>? = null,
|
||||
@ProtoId(3) val boolOpenHardwareCodec: Boolean = false
|
||||
@SerialId(1) val channelType: Int = 0,
|
||||
@SerialId(2) val msgNetsegconf: List<NetSegConf>? = null,
|
||||
@SerialId(3) val boolOpenHardwareCodec: Boolean = false
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ShortVideoConf(
|
||||
@ProtoId(1) val channelType: Int = 0,
|
||||
@ProtoId(2) val msgNetsegconf: List<NetSegConf>? = null,
|
||||
@ProtoId(3) val boolOpenHardwareCodec: Boolean = false,
|
||||
@ProtoId(4) val boolSendAheadSignal: Boolean = false
|
||||
@SerialId(1) val channelType: Int = 0,
|
||||
@SerialId(2) val msgNetsegconf: List<NetSegConf>? = null,
|
||||
@SerialId(3) val boolOpenHardwareCodec: Boolean = false,
|
||||
@SerialId(4) val boolSendAheadSignal: Boolean = false
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class SrvAddrs(
|
||||
@ProtoId(1) val serviceType: Int = 0,
|
||||
@ProtoId(2) val msgAddrs: List<IpAddr>? = null,
|
||||
@ProtoId(3) val fragmentSize: Int = 0,
|
||||
@ProtoId(4) val msgNetsegconf: List<NetSegConf>? = null,
|
||||
@ProtoId(5) val msgAddrsV6: List<Ip6Addr>? = null
|
||||
@SerialId(1) val serviceType: Int = 0,
|
||||
@SerialId(2) val msgAddrs: List<IpAddr>? = null,
|
||||
@SerialId(3) val fragmentSize: Int = 0,
|
||||
@SerialId(4) val msgNetsegconf: List<NetSegConf>? = null,
|
||||
@SerialId(5) val msgAddrsV6: List<Ip6Addr>? = null
|
||||
) : ProtoBuf
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.utils.currentTimeSeconds
|
||||
|
||||
@ -20,22 +20,22 @@ interface ImgReq : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class GetImgUrlReq(
|
||||
@ProtoId(1) val srcUni: Int,
|
||||
@ProtoId(2) val dstUni: Int,
|
||||
@ProtoId(3) val fileResID: String,//UUID
|
||||
@SerialId(1) val srcUni: Int,
|
||||
@SerialId(2) val dstUni: Int,
|
||||
@SerialId(3) val fileResID: String,//UUID
|
||||
/**
|
||||
* UUID例子: 没有找到
|
||||
*/
|
||||
@ProtoId(4) val urlFlag: Int = 1,
|
||||
@SerialId(4) val urlFlag: Int = 1,
|
||||
//5 unknown, 好像没用
|
||||
@ProtoId(6) val urlType: Int = 4,
|
||||
@ProtoId(7) val requestTerm: Int = 5,//确定
|
||||
@ProtoId(8) val requestPlatformType: Int = 9,//确定
|
||||
@ProtoId(9) val srcFileType: Int = 1,//2=ftn,1=picplatform,255
|
||||
@ProtoId(10) val innerIP: Int = 0,//确定
|
||||
@ProtoId(11) val addressBook: Int = 0,//[ChatType.internalID]== 1006为1[为CONTACT时] 我觉得发0没问题
|
||||
@ProtoId(12) val buType: Int = 1,//确定
|
||||
@ProtoId(13) val buildVer: String = "8.2.7.4410",//版本号
|
||||
@ProtoId(14) val timestamp: Int = currentTimeSeconds.toInt(),//(pic_up_timestamp)
|
||||
@ProtoId(15) val requestTransferType: Int = 1
|
||||
@SerialId(6) val urlType: Int = 4,
|
||||
@SerialId(7) val requestTerm: Int = 5,//确定
|
||||
@SerialId(8) val requestPlatformType: Int = 9,//确定
|
||||
@SerialId(9) val srcFileType: Int = 1,//2=ftn,1=picplatform,255
|
||||
@SerialId(10) val innerIP: Int = 0,//确定
|
||||
@SerialId(11) val addressBook: Int = 0,//[ChatType.internalID]== 1006为1[为CONTACT时] 我觉得发0没问题
|
||||
@SerialId(12) val buType: Int = 1,//确定
|
||||
@SerialId(13) val buildVer: String = "8.2.7.4410",//版本号
|
||||
@SerialId(14) val timestamp: Int = currentTimeSeconds.toInt(),//(pic_up_timestamp)
|
||||
@SerialId(15) val requestTransferType: Int = 1
|
||||
) : ImgReq
|
File diff suppressed because it is too large
Load Diff
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -21,143 +21,143 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
internal class MsgComm : ProtoBuf {
|
||||
@Serializable
|
||||
internal class AppShareInfo(
|
||||
@ProtoId(1) val appshareId: Int = 0,
|
||||
@ProtoId(2) val appshareCookie: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val appshareResource: PluginInfo? = null
|
||||
@SerialId(1) val appshareId: Int = 0,
|
||||
@SerialId(2) val appshareCookie: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val appshareResource: PluginInfo? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class C2CTmpMsgHead(
|
||||
@ProtoId(1) val c2cType: Int = 0,
|
||||
@ProtoId(2) val serviceType: Int = 0,
|
||||
@ProtoId(3) val groupUin: Long = 0L,
|
||||
@ProtoId(4) val groupCode: Long = 0L,
|
||||
@ProtoId(5) val sig: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val sigType: Int = 0,
|
||||
@ProtoId(7) val fromPhone: String = "",
|
||||
@ProtoId(8) val toPhone: String = "",
|
||||
@ProtoId(9) val lockDisplay: Int = 0,
|
||||
@ProtoId(10) val directionFlag: Int = 0,
|
||||
@ProtoId(11) val reserved: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val c2cType: Int = 0,
|
||||
@SerialId(2) val serviceType: Int = 0,
|
||||
@SerialId(3) val groupUin: Long = 0L,
|
||||
@SerialId(4) val groupCode: Long = 0L,
|
||||
@SerialId(5) val sig: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val sigType: Int = 0,
|
||||
@SerialId(7) val fromPhone: String = "",
|
||||
@SerialId(8) val toPhone: String = "",
|
||||
@SerialId(9) val lockDisplay: Int = 0,
|
||||
@SerialId(10) val directionFlag: Int = 0,
|
||||
@SerialId(11) val reserved: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class ContentHead(
|
||||
@ProtoId(1) val pkgNum: Int = 0,
|
||||
@ProtoId(2) val pkgIndex: Int = 0,
|
||||
@ProtoId(3) val divSeq: Int = 0,
|
||||
@ProtoId(4) val autoReply: Int = 0
|
||||
@SerialId(1) val pkgNum: Int = 0,
|
||||
@SerialId(2) val pkgIndex: Int = 0,
|
||||
@SerialId(3) val divSeq: Int = 0,
|
||||
@SerialId(4) val autoReply: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class DiscussInfo(
|
||||
@ProtoId(1) val discussUin: Long = 0L,
|
||||
@ProtoId(2) val discussType: Int = 0,
|
||||
@ProtoId(3) val discussInfoSeq: Long = 0L,
|
||||
@ProtoId(4) val discussRemark: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val discussName: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val discussUin: Long = 0L,
|
||||
@SerialId(2) val discussType: Int = 0,
|
||||
@SerialId(3) val discussInfoSeq: Long = 0L,
|
||||
@SerialId(4) val discussRemark: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val discussName: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class ExtGroupKeyInfo(
|
||||
@ProtoId(1) val curMaxSeq: Int = 0,
|
||||
@ProtoId(2) val curTime: Long = 0L
|
||||
@SerialId(1) val curMaxSeq: Int = 0,
|
||||
@SerialId(2) val curTime: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class GroupInfo(
|
||||
@ProtoId(1) val groupCode: Long = 0L,
|
||||
@ProtoId(2) val groupType: Int = 0,
|
||||
@ProtoId(3) val groupInfoSeq: Long = 0L,
|
||||
@ProtoId(4) val groupCard: String = "",
|
||||
@ProtoId(5) val groupRank: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(6) val groupLevel: Int = 0,
|
||||
@ProtoId(7) val groupCardType: Int = 0,
|
||||
@ProtoId(8) val groupName: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val groupCode: Long = 0L,
|
||||
@SerialId(2) val groupType: Int = 0,
|
||||
@SerialId(3) val groupInfoSeq: Long = 0L,
|
||||
@SerialId(4) val groupCard: String = "",
|
||||
@SerialId(5) val groupRank: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(6) val groupLevel: Int = 0,
|
||||
@SerialId(7) val groupCardType: Int = 0,
|
||||
@SerialId(8) val groupName: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Msg(
|
||||
@ProtoId(1) val msgHead: MsgHead,
|
||||
@ProtoId(2) val contentHead: ContentHead? = null,
|
||||
@ProtoId(3) val msgBody: ImMsgBody.MsgBody,
|
||||
@ProtoId(4) val appshareInfo: AppShareInfo? = null
|
||||
@SerialId(1) val msgHead: MsgHead,
|
||||
@SerialId(2) val contentHead: ContentHead? = null,
|
||||
@SerialId(3) val msgBody: ImMsgBody.MsgBody,
|
||||
@SerialId(4) val appshareInfo: AppShareInfo? = null
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MsgHead(
|
||||
@ProtoId(1) val fromUin: Long = 0L,
|
||||
@ProtoId(2) val toUin: Long = 0L,
|
||||
@ProtoId(3) val msgType: Int = 0,
|
||||
@ProtoId(4) val c2cCmd: Int = 0,
|
||||
@ProtoId(5) val msgSeq: Int = 0,
|
||||
@ProtoId(6) val msgTime: Int = 0,
|
||||
@ProtoId(7) var msgUid: Long = 0L,
|
||||
@ProtoId(8) val c2cTmpMsgHead: C2CTmpMsgHead? = null,
|
||||
@ProtoId(9) val groupInfo: GroupInfo? = null,
|
||||
@ProtoId(10) val fromAppid: Int = 0,
|
||||
@ProtoId(11) val fromInstid: Int = 0,
|
||||
@ProtoId(12) val userActive: Int = 0,
|
||||
@ProtoId(13) val discussInfo: DiscussInfo? = null,
|
||||
@ProtoId(14) val fromNick: String = "",
|
||||
@ProtoId(15) val authUin: Long = 0L,
|
||||
@ProtoId(16) val authNick: String = "",
|
||||
@ProtoId(17) val msgFlag: Int = 0,
|
||||
@ProtoId(18) val authRemark: String = "",
|
||||
@ProtoId(19) val groupName: String = "",
|
||||
@ProtoId(20) val mutiltransHead: MutilTransHead? = null,
|
||||
@ProtoId(21) val msgInstCtrl: ImMsgHead.InstCtrl? = null,
|
||||
@ProtoId(22) val publicAccountGroupSendFlag: Int = 0,
|
||||
@ProtoId(23) val wseqInC2cMsghead: Int = 0,
|
||||
@ProtoId(24) val cpid: Long = 0L,
|
||||
@ProtoId(25) val extGroupKeyInfo: ExtGroupKeyInfo? = null,
|
||||
@ProtoId(26) val multiCompatibleText: String = "",
|
||||
@ProtoId(27) val authSex: Int = 0,
|
||||
@ProtoId(28) val isSrcMsg: Boolean = false
|
||||
@SerialId(1) val fromUin: Long = 0L,
|
||||
@SerialId(2) val toUin: Long = 0L,
|
||||
@SerialId(3) val msgType: Int = 0,
|
||||
@SerialId(4) val c2cCmd: Int = 0,
|
||||
@SerialId(5) val msgSeq: Int = 0,
|
||||
@SerialId(6) val msgTime: Int = 0,
|
||||
@SerialId(7) var msgUid: Long = 0L,
|
||||
@SerialId(8) val c2cTmpMsgHead: C2CTmpMsgHead? = null,
|
||||
@SerialId(9) val groupInfo: GroupInfo? = null,
|
||||
@SerialId(10) val fromAppid: Int = 0,
|
||||
@SerialId(11) val fromInstid: Int = 0,
|
||||
@SerialId(12) val userActive: Int = 0,
|
||||
@SerialId(13) val discussInfo: DiscussInfo? = null,
|
||||
@SerialId(14) val fromNick: String = "",
|
||||
@SerialId(15) val authUin: Long = 0L,
|
||||
@SerialId(16) val authNick: String = "",
|
||||
@SerialId(17) val msgFlag: Int = 0,
|
||||
@SerialId(18) val authRemark: String = "",
|
||||
@SerialId(19) val groupName: String = "",
|
||||
@SerialId(20) val mutiltransHead: MutilTransHead? = null,
|
||||
@SerialId(21) val msgInstCtrl: ImMsgHead.InstCtrl? = null,
|
||||
@SerialId(22) val publicAccountGroupSendFlag: Int = 0,
|
||||
@SerialId(23) val wseqInC2cMsghead: Int = 0,
|
||||
@SerialId(24) val cpid: Long = 0L,
|
||||
@SerialId(25) val extGroupKeyInfo: ExtGroupKeyInfo? = null,
|
||||
@SerialId(26) val multiCompatibleText: String = "",
|
||||
@SerialId(27) val authSex: Int = 0,
|
||||
@SerialId(28) val isSrcMsg: Boolean = false
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MsgType0x210(
|
||||
@ProtoId(1) val subMsgType: Int = 0,
|
||||
@ProtoId(2) val msgContent: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val subMsgType: Int = 0,
|
||||
@SerialId(2) val msgContent: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MutilTransHead(
|
||||
@ProtoId(1) val status: Int = 0,
|
||||
@ProtoId(2) val msgId: Int = 0
|
||||
@SerialId(1) val status: Int = 0,
|
||||
@SerialId(2) val msgId: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class PluginInfo(
|
||||
@ProtoId(1) val resId: Int = 0,
|
||||
@ProtoId(2) val pkgName: String = "",
|
||||
@ProtoId(3) val newVer: Int = 0,
|
||||
@ProtoId(4) val resType: Int = 0,
|
||||
@ProtoId(5) val lanType: Int = 0,
|
||||
@ProtoId(6) val priority: Int = 0,
|
||||
@ProtoId(7) val resName: String = "",
|
||||
@ProtoId(8) val resDesc: String = "",
|
||||
@ProtoId(9) val resUrlBig: String = "",
|
||||
@ProtoId(10) val resUrlSmall: String = "",
|
||||
@ProtoId(11) val resConf: String = ""
|
||||
@SerialId(1) val resId: Int = 0,
|
||||
@SerialId(2) val pkgName: String = "",
|
||||
@SerialId(3) val newVer: Int = 0,
|
||||
@SerialId(4) val resType: Int = 0,
|
||||
@SerialId(5) val lanType: Int = 0,
|
||||
@SerialId(6) val priority: Int = 0,
|
||||
@SerialId(7) val resName: String = "",
|
||||
@SerialId(8) val resDesc: String = "",
|
||||
@SerialId(9) val resUrlBig: String = "",
|
||||
@SerialId(10) val resUrlSmall: String = "",
|
||||
@SerialId(11) val resConf: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Uin2Nick(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val nick: String = ""
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val nick: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class UinPairMsg(
|
||||
@ProtoId(1) val lastReadTime: Int = 0,
|
||||
@ProtoId(2) val peerUin: Long = 0L,
|
||||
@ProtoId(3) val msgCompleted: Int = 0,
|
||||
@ProtoId(4) val msg: List<Msg>? = null,
|
||||
@ProtoId(5) val unreadMsgNum: Int = 0,
|
||||
@ProtoId(8) val c2cType: Int = 0,
|
||||
@ProtoId(9) val serviceType: Int = 0,
|
||||
@ProtoId(10) val pbReserve: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val lastReadTime: Int = 0,
|
||||
@SerialId(2) val peerUin: Long = 0L,
|
||||
@SerialId(3) val msgCompleted: Int = 0,
|
||||
@SerialId(4) val msg: List<Msg>? = null,
|
||||
@SerialId(5) val unreadMsgNum: Int = 0,
|
||||
@SerialId(8) val c2cType: Int = 0,
|
||||
@SerialId(9) val serviceType: Int = 0,
|
||||
@SerialId(10) val pbReserve: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,30 +9,30 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
|
||||
class MsgRevokeUserDef : ProtoBuf {
|
||||
@Serializable
|
||||
class MsgInfoUserDef(
|
||||
@ProtoId(1) val longMessageFlag: Int = 0,
|
||||
@ProtoId(2) val longMsgInfo: List<MsgInfoDef>? = null,
|
||||
@ProtoId(3) val fileUuid: List<String> = listOf()
|
||||
@SerialId(1) val longMessageFlag: Int = 0,
|
||||
@SerialId(2) val longMsgInfo: List<MsgInfoDef>? = null,
|
||||
@SerialId(3) val fileUuid: List<String> = listOf()
|
||||
) : ProtoBuf {
|
||||
@Serializable
|
||||
class MsgInfoDef(
|
||||
@ProtoId(1) val msgSeq: Int = 0,
|
||||
@ProtoId(2) val longMsgId: Int = 0,
|
||||
@ProtoId(3) val longMsgNum: Int = 0,
|
||||
@ProtoId(4) val longMsgIndex: Int = 0
|
||||
@SerialId(1) val msgSeq: Int = 0,
|
||||
@SerialId(2) val longMsgId: Int = 0,
|
||||
@SerialId(3) val longMsgNum: Int = 0,
|
||||
@SerialId(4) val longMsgIndex: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@Serializable
|
||||
class UinTypeUserDef(
|
||||
@ProtoId(1) val fromUinType: Int = 0,
|
||||
@ProtoId(2) val fromGroupCode: Long = 0L,
|
||||
@ProtoId(3) val fileUuid: List<String> = listOf()
|
||||
@SerialId(1) val fromUinType: Int = 0,
|
||||
@SerialId(2) val fromGroupCode: Long = 0L,
|
||||
@SerialId(3) val fileUuid: List<String> = listOf()
|
||||
) : ProtoBuf
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
|
||||
class Oidb0x769 {
|
||||
@Serializable
|
||||
class RequestBody(
|
||||
@ProtoId(1) val rpt_config_list: List<ConfigSeq>
|
||||
// @SerialId(2) val msg_device_info: DeviceInfo,
|
||||
// @SerialId(3) val str_info: String = "",
|
||||
// @SerialId(4) val province: String,
|
||||
// @SerialId(5) val city: String,
|
||||
// @SerialId(6) val req_debug_msg: Int = 0,
|
||||
// @SerialId(101) val query_uin_package_usage_req: QueryUinPackageUsageReq
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class QueryUinPackageUsageReq(
|
||||
@ProtoId(1) val type: Int,
|
||||
@ProtoId(2) val uinFileSize: Long = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ConfigSeq(
|
||||
@ProtoId(1) val type: Int, // uint
|
||||
@ProtoId(2) val version: Int // uint
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DeviceInfo(
|
||||
@ProtoId(1) val brand: String,
|
||||
@ProtoId(2) val model: String
|
||||
//@SerialId(3) val os: OS,
|
||||
//@SerialId(4) val cpu: CPU,
|
||||
//@SerialId(5) val memory: Memory,
|
||||
//@SerialId(6) val storage: Storage,
|
||||
//@SerialId(7) val screen: Screen,
|
||||
//@SerialId(8) val camera: Camera
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class OS(
|
||||
@ProtoId(1) val type: Int = 1,
|
||||
@ProtoId(2) val version: String,
|
||||
@ProtoId(3) val sdk: String,
|
||||
@ProtoId(4) val kernel: String,
|
||||
@ProtoId(5) val rom: String
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Camera(
|
||||
@ProtoId(1) val primary: Long,
|
||||
@ProtoId(2) val secondary: Long,
|
||||
@ProtoId(3) val flag: Boolean
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class CPU(
|
||||
@ProtoId(1) val model: String,
|
||||
@ProtoId(2) val frequency: Int,
|
||||
@ProtoId(3) val cores: Int
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Memory(
|
||||
@ProtoId(1) val total: Int,
|
||||
@ProtoId(2) val process: Int
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Screen(
|
||||
@ProtoId(1) val model: String,
|
||||
@ProtoId(2) val width: Int,
|
||||
@ProtoId(3) val height: Int,
|
||||
@ProtoId(4) val dpi: Int,
|
||||
@ProtoId(5) val multiTouch: Boolean
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Storage(
|
||||
@ProtoId(1) val builtin: Int,
|
||||
@ProtoId(2) val external: Int
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,11 +18,11 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
internal class MsgOnlinePush {
|
||||
@Serializable
|
||||
internal class PbPushMsg(
|
||||
@ProtoId(1) val msg: MsgComm.Msg,
|
||||
@ProtoId(2) val svrip: Int = 0,
|
||||
@ProtoId(3) val pushToken: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val pingFlag: Int = 0,
|
||||
@ProtoId(9) val generalFlag: Int = 0
|
||||
@SerialId(1) val msg: MsgComm.Msg,
|
||||
@SerialId(2) val svrip: Int = 0,
|
||||
@SerialId(3) val pushToken: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val pingFlag: Int = 0,
|
||||
@SerialId(9) val generalFlag: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -30,24 +30,24 @@ internal class MsgOnlinePush {
|
||||
class OnlinePushTrans : ProtoBuf {
|
||||
@Serializable
|
||||
class ExtGroupKeyInfo(
|
||||
@ProtoId(1) val curMaxSeq: Int = 0,
|
||||
@ProtoId(2) val curTime: Long = 0L
|
||||
@SerialId(1) val curMaxSeq: Int = 0,
|
||||
@SerialId(2) val curTime: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class PbMsgInfo(
|
||||
@ProtoId(1) val fromUin: Long = 0L,
|
||||
@ProtoId(2) val toUin: Long = 0L,
|
||||
@ProtoId(3) val msgType: Int = 0,
|
||||
@ProtoId(4) val msgSubtype: Int = 0,
|
||||
@ProtoId(5) val msgSeq: Int = 0,
|
||||
@ProtoId(6) val msgUid: Long = 0L,
|
||||
@ProtoId(7) val msgTime: Int = 0,
|
||||
@ProtoId(8) val realMsgTime: Int = 0,
|
||||
@ProtoId(9) val nickName: String = "",
|
||||
@ProtoId(10) val msgData: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(11) val svrIp: Int = 0,
|
||||
@ProtoId(12) val extGroupKeyInfo: OnlinePushTrans.ExtGroupKeyInfo? = null,
|
||||
@ProtoId(17) val generalFlag: Int = 0
|
||||
@SerialId(1) val fromUin: Long = 0L,
|
||||
@SerialId(2) val toUin: Long = 0L,
|
||||
@SerialId(3) val msgType: Int = 0,
|
||||
@SerialId(4) val msgSubtype: Int = 0,
|
||||
@SerialId(5) val msgSeq: Int = 0,
|
||||
@SerialId(6) val msgUid: Long = 0L,
|
||||
@SerialId(7) val msgTime: Int = 0,
|
||||
@SerialId(8) val realMsgTime: Int = 0,
|
||||
@SerialId(9) val nickName: String = "",
|
||||
@SerialId(10) val msgData: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(11) val svrIp: Int = 0,
|
||||
@SerialId(12) val extGroupKeyInfo: OnlinePushTrans.ExtGroupKeyInfo? = null,
|
||||
@SerialId(17) val generalFlag: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
|
||||
@ -18,68 +18,68 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
class Generalflags : ProtoBuf {
|
||||
@Serializable
|
||||
class ResvAttr(
|
||||
@ProtoId(1) val globalGroupLevel: Int = 0,
|
||||
@ProtoId(2) val nearbyCharmLevel: Int = 0,
|
||||
@ProtoId(3) val redbagMsgSenderUin: Long = 0L,
|
||||
@ProtoId(4) val titleId: Int = 0,
|
||||
@ProtoId(5) val robotMsgFlag: Int = 0,
|
||||
@ProtoId(6) val wantGiftSenderUin: Long = 0L,
|
||||
@ProtoId(7) val stickerX: Float = 0.0f,
|
||||
@ProtoId(8) val stickerY: Float = 0.0f,
|
||||
@ProtoId(9) val stickerWidth: Float = 0.0f,
|
||||
@ProtoId(10) val stickerHeight: Float = 0.0f,
|
||||
@ProtoId(11) val stickerRotate: Int = 0,
|
||||
@ProtoId(12) val stickerHostMsgseq: Long = 0L,
|
||||
@ProtoId(13) val stickerHostMsguid: Long = 0L,
|
||||
@ProtoId(14) val stickerHostTime: Long = 0L,
|
||||
@ProtoId(15) val mobileCustomFont: Int = 0,
|
||||
@ProtoId(16) val tailKey: Int = 0,
|
||||
@ProtoId(17) val showTailFlag: Int = 0,
|
||||
@ProtoId(18) val doutuMsgType: Int = 0,
|
||||
@ProtoId(19) val doutuCombo: Int = 0,
|
||||
@ProtoId(20) val customFeatureid: Int = 0,
|
||||
@ProtoId(21) val goldenMsgType: Int = 0,
|
||||
@ProtoId(22) val goldenMsgInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(23) val botMessageClassId: Int = 0,
|
||||
@ProtoId(24) val subscriptionUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(25) val pendantDiyId: Int = 0,
|
||||
@ProtoId(26) val timedMessage: Int = 0,
|
||||
@ProtoId(27) val holidayFlag: Int = 0,
|
||||
@ProtoId(29) val kplInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(30) val faceId: Int = 0,
|
||||
@ProtoId(31) val diyFontTimestamp: Int = 0,
|
||||
@ProtoId(32) val redEnvelopeType: Int = 0,
|
||||
@ProtoId(33) val shortVideoId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(34) val reqFontEffectId: Int = 0,
|
||||
@ProtoId(35) val loveLanguageFlag: Int = 0,
|
||||
@ProtoId(36) val aioSyncToStoryFlag: Int = 0,
|
||||
@ProtoId(37) val uploadImageToQzoneFlag: Int = 0,
|
||||
@ProtoId(39) val uploadImageToQzoneParam: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(40) val groupConfessSig: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(41) val subfontId: Long = 0L,
|
||||
@ProtoId(42) val msgFlagType: Int = 0,
|
||||
@ProtoId(43) val uint32CustomFeatureid: List<Int>? = null,
|
||||
@ProtoId(44) val richCardNameVer: Int = 0,
|
||||
@ProtoId(47) val msgInfoFlag: Int = 0,
|
||||
@ProtoId(48) val serviceMsgType: Int = 0,
|
||||
@ProtoId(49) val serviceMsgRemindType: Int = 0,
|
||||
@ProtoId(50) val serviceMsgName: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(51) val vipType: Int = 0,
|
||||
@ProtoId(52) val vipLevel: Int = 0,
|
||||
@ProtoId(53) val pbPttWaveform: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(54) val userBigclubLevel: Int = 0,
|
||||
@ProtoId(55) val userBigclubFlag: Int = 0,
|
||||
@ProtoId(56) val nameplate: Int = 0,
|
||||
@ProtoId(57) val autoReply: Int = 0,
|
||||
@ProtoId(58) val reqIsBigclubHidden: Int = 0,
|
||||
@ProtoId(59) val showInMsgList: Int = 0,
|
||||
@ProtoId(60) val oacMsgExtend: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(61) val groupMemberFlagEx2: Int = 0,
|
||||
@ProtoId(62) val groupRingtoneId: Int = 0,
|
||||
@ProtoId(63) val robotGeneralTrans: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(64) val troopPobingTemplate: Int = 0,
|
||||
@ProtoId(65) val hudongMark: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(66) val groupInfoFlagEx3: Int = 0
|
||||
@SerialId(1) val globalGroupLevel: Int = 0,
|
||||
@SerialId(2) val nearbyCharmLevel: Int = 0,
|
||||
@SerialId(3) val redbagMsgSenderUin: Long = 0L,
|
||||
@SerialId(4) val titleId: Int = 0,
|
||||
@SerialId(5) val robotMsgFlag: Int = 0,
|
||||
@SerialId(6) val wantGiftSenderUin: Long = 0L,
|
||||
@SerialId(7) val stickerX: Float = 0.0f,
|
||||
@SerialId(8) val stickerY: Float = 0.0f,
|
||||
@SerialId(9) val stickerWidth: Float = 0.0f,
|
||||
@SerialId(10) val stickerHeight: Float = 0.0f,
|
||||
@SerialId(11) val stickerRotate: Int = 0,
|
||||
@SerialId(12) val stickerHostMsgseq: Long = 0L,
|
||||
@SerialId(13) val stickerHostMsguid: Long = 0L,
|
||||
@SerialId(14) val stickerHostTime: Long = 0L,
|
||||
@SerialId(15) val mobileCustomFont: Int = 0,
|
||||
@SerialId(16) val tailKey: Int = 0,
|
||||
@SerialId(17) val showTailFlag: Int = 0,
|
||||
@SerialId(18) val doutuMsgType: Int = 0,
|
||||
@SerialId(19) val doutuCombo: Int = 0,
|
||||
@SerialId(20) val customFeatureid: Int = 0,
|
||||
@SerialId(21) val goldenMsgType: Int = 0,
|
||||
@SerialId(22) val goldenMsgInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(23) val botMessageClassId: Int = 0,
|
||||
@SerialId(24) val subscriptionUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(25) val pendantDiyId: Int = 0,
|
||||
@SerialId(26) val timedMessage: Int = 0,
|
||||
@SerialId(27) val holidayFlag: Int = 0,
|
||||
@SerialId(29) val kplInfo: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(30) val faceId: Int = 0,
|
||||
@SerialId(31) val diyFontTimestamp: Int = 0,
|
||||
@SerialId(32) val redEnvelopeType: Int = 0,
|
||||
@SerialId(33) val shortVideoId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(34) val reqFontEffectId: Int = 0,
|
||||
@SerialId(35) val loveLanguageFlag: Int = 0,
|
||||
@SerialId(36) val aioSyncToStoryFlag: Int = 0,
|
||||
@SerialId(37) val uploadImageToQzoneFlag: Int = 0,
|
||||
@SerialId(39) val uploadImageToQzoneParam: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(40) val groupConfessSig: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(41) val subfontId: Long = 0L,
|
||||
@SerialId(42) val msgFlagType: Int = 0,
|
||||
@SerialId(43) val uint32CustomFeatureid: List<Int>? = null,
|
||||
@SerialId(44) val richCardNameVer: Int = 0,
|
||||
@SerialId(47) val msgInfoFlag: Int = 0,
|
||||
@SerialId(48) val serviceMsgType: Int = 0,
|
||||
@SerialId(49) val serviceMsgRemindType: Int = 0,
|
||||
@SerialId(50) val serviceMsgName: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(51) val vipType: Int = 0,
|
||||
@SerialId(52) val vipLevel: Int = 0,
|
||||
@SerialId(53) val pbPttWaveform: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(54) val userBigclubLevel: Int = 0,
|
||||
@SerialId(55) val userBigclubFlag: Int = 0,
|
||||
@SerialId(56) val nameplate: Int = 0,
|
||||
@SerialId(57) val autoReply: Int = 0,
|
||||
@SerialId(58) val reqIsBigclubHidden: Int = 0,
|
||||
@SerialId(59) val showInMsgList: Int = 0,
|
||||
@SerialId(60) val oacMsgExtend: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(61) val groupMemberFlagEx2: Int = 0,
|
||||
@SerialId(62) val groupRingtoneId: Int = 0,
|
||||
@SerialId(63) val robotGeneralTrans: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(64) val troopPobingTemplate: Int = 0,
|
||||
@SerialId(65) val hudongMark: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(66) val groupInfoFlagEx3: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -87,27 +87,27 @@ class Generalflags : ProtoBuf {
|
||||
class ResvAttrForGiftMsg : ProtoBuf {
|
||||
@Serializable
|
||||
class ActivityGiftInfo(
|
||||
@ProtoId(1) val isActivityGift: Int = 0,
|
||||
@ProtoId(2) val textColor: String = "",
|
||||
@ProtoId(3) val text: String = "",
|
||||
@ProtoId(4) val url: String = ""
|
||||
@SerialId(1) val isActivityGift: Int = 0,
|
||||
@SerialId(2) val textColor: String = "",
|
||||
@SerialId(3) val text: String = "",
|
||||
@SerialId(4) val url: String = ""
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class InteractGift(
|
||||
@ProtoId(1) val interactId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
@SerialId(1) val interactId: ByteArray = EMPTY_BYTE_ARRAY
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ResvAttr(
|
||||
@ProtoId(1) val int32SendScore: Int = 0,
|
||||
@ProtoId(2) val int32RecvScore: Int = 0,
|
||||
@ProtoId(3) val charmHeroism: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val buttonFlag: Int = 0,
|
||||
@ProtoId(5) val objColor: Int = 0,
|
||||
@ProtoId(6) val animationType: Int = 0,
|
||||
@ProtoId(7) val msgInteractGift: ResvAttrForGiftMsg.InteractGift? = null,
|
||||
@ProtoId(8) val activityGiftInfo: ResvAttrForGiftMsg.ActivityGiftInfo? = null
|
||||
@SerialId(1) val int32SendScore: Int = 0,
|
||||
@SerialId(2) val int32RecvScore: Int = 0,
|
||||
@SerialId(3) val charmHeroism: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val buttonFlag: Int = 0,
|
||||
@SerialId(5) val objColor: Int = 0,
|
||||
@SerialId(6) val animationType: Int = 0,
|
||||
@SerialId(7) val msgInteractGift: ResvAttrForGiftMsg.InteractGift? = null,
|
||||
@SerialId(8) val activityGiftInfo: ResvAttrForGiftMsg.ActivityGiftInfo? = null
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -115,9 +115,9 @@ class ResvAttrForGiftMsg : ProtoBuf {
|
||||
class SourceMsg : ProtoBuf {
|
||||
@Serializable
|
||||
class ResvAttr(
|
||||
@ProtoId(1) val richMsg2: ByteArray? = null,
|
||||
@ProtoId(2) val oriMsgtype: Int? = null,
|
||||
@ProtoId(3) val origUids: Long? = null // 原来是 list
|
||||
@SerialId(1) val richMsg2: ByteArray? = null,
|
||||
@SerialId(2) val oriMsgtype: Int? = null,
|
||||
@SerialId(3) val origUids: Long? = null // 原来是 list
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
||||
@ -125,17 +125,17 @@ class SourceMsg : ProtoBuf {
|
||||
class VideoFile : ProtoBuf {
|
||||
@Serializable
|
||||
class ResvAttr(
|
||||
@ProtoId(1) val hotvideoIcon: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(2) val hotvideoTitle: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(3) val hotvideoUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(4) val hotvideoIconSub: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(5) val specialVideoType: Int = 0,
|
||||
@ProtoId(6) val dynamicText: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(7) val msgTailType: Int = 0,
|
||||
@ProtoId(8) val redEnvelopeType: Int = 0,
|
||||
@ProtoId(9) val shortVideoId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(10) val animojiModelId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoId(11) val longVideoKandianType: Int = 0,
|
||||
@ProtoId(12) val source: Int = 0
|
||||
@SerialId(1) val hotvideoIcon: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(2) val hotvideoTitle: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(3) val hotvideoUrl: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(4) val hotvideoIconSub: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(5) val specialVideoType: Int = 0,
|
||||
@SerialId(6) val dynamicText: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(7) val msgTailType: Int = 0,
|
||||
@SerialId(8) val redEnvelopeType: Int = 0,
|
||||
@SerialId(9) val shortVideoId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(10) val animojiModelId: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@SerialId(11) val longVideoKandianType: Int = 0,
|
||||
@SerialId(12) val source: Int = 0
|
||||
) : ProtoBuf
|
||||
}
|
||||
|
@ -9,30 +9,30 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
|
||||
class StatSvcGetOnline {
|
||||
@Serializable
|
||||
class Instance(
|
||||
@ProtoId(1) val instanceId: Int = 0,
|
||||
@ProtoId(2) val clientType: Int = 0
|
||||
@SerialId(1) val instanceId: Int = 0,
|
||||
@SerialId(2) val clientType: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ReqBody(
|
||||
@ProtoId(1) val uin: Long = 0L,
|
||||
@ProtoId(2) val appid: Int = 0
|
||||
@SerialId(1) val uin: Long = 0L,
|
||||
@SerialId(2) val appid: Int = 0
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class RspBody(
|
||||
@ProtoId(1) val errorCode: Int = 0,
|
||||
@ProtoId(2) val errorMsg: String = "",
|
||||
@ProtoId(3) val uin: Long = 0L,
|
||||
@ProtoId(4) val appid: Int = 0,
|
||||
@ProtoId(5) val timeInterval: Int = 0,
|
||||
@ProtoId(6) val msgInstances: List<StatSvcGetOnline.Instance>? = null
|
||||
@SerialId(1) val errorCode: Int = 0,
|
||||
@SerialId(2) val errorMsg: String = "",
|
||||
@SerialId(3) val uin: Long = 0L,
|
||||
@SerialId(4) val appid: Int = 0,
|
||||
@SerialId(5) val timeInterval: Int = 0,
|
||||
@SerialId(6) val msgInstances: List<StatSvcGetOnline.Instance>? = null
|
||||
) : ProtoBuf
|
||||
}
|
@ -9,23 +9,23 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
import kotlin.math.absoluteValue
|
||||
import kotlin.random.Random
|
||||
|
||||
@Serializable
|
||||
class SyncCookie(
|
||||
@ProtoId(1) val time1: Long? = null, // 1580277992
|
||||
@ProtoId(2) val time: Long, // 1580277992
|
||||
@ProtoId(3) val unknown1: Long = Random.nextLong().absoluteValue,// 678328038
|
||||
@ProtoId(4) val unknown2: Long = Random.nextLong().absoluteValue, // 1687142153
|
||||
@ProtoId(5) val const1: Long = const1_, // 1458467940
|
||||
@ProtoId(11) val const2: Long = const2_, // 2683038258
|
||||
@ProtoId(12) val unknown3: Long = 0x1d,
|
||||
@ProtoId(13) val lastSyncTime: Long? = null,
|
||||
@ProtoId(14) val unknown4: Long = 0
|
||||
@SerialId(1) val time1: Long? = null, // 1580277992
|
||||
@SerialId(2) val time: Long, // 1580277992
|
||||
@SerialId(3) val unknown1: Long = Random.nextLong().absoluteValue,// 678328038
|
||||
@SerialId(4) val unknown2: Long = Random.nextLong().absoluteValue, // 1687142153
|
||||
@SerialId(5) val const1: Long = const1_, // 1458467940
|
||||
@SerialId(11) val const2: Long = const2_, // 2683038258
|
||||
@SerialId(12) val unknown3: Long = 0x1d,
|
||||
@SerialId(13) val lastSyncTime: Long? = null,
|
||||
@SerialId(14) val unknown4: Long = 0
|
||||
) : ProtoBuf
|
||||
|
||||
private val const1_: Long = Random.nextLong().absoluteValue
|
||||
|
@ -16,7 +16,7 @@ import net.mamoe.mirai.utils.cryptor.ECDHKeyPair
|
||||
import net.mamoe.mirai.utils.io.encryptAndWrite
|
||||
import net.mamoe.mirai.utils.io.writeShortLVByteArray
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
internal interface EncryptMethod {
|
||||
val id: Int
|
||||
|
||||
|
@ -7,14 +7,12 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.io
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.packet
|
||||
|
||||
import kotlinx.io.InputStream
|
||||
import kotlinx.io.OutputStream
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.ProtoBufWithNullableSupport
|
||||
|
||||
@OptIn(InternalSerializationApi::class)
|
||||
typealias OutputStream = OutputStream
|
||||
interface MessageMicro
|
||||
|
||||
@OptIn(InternalSerializationApi::class)
|
||||
typealias InputStream = InputStream
|
||||
|
||||
fun <T : MessageMicro> T.toByteArray(serializer: SerializationStrategy<T>): ByteArray = ProtoBufWithNullableSupport.dump(serializer, this)
|
@ -31,7 +31,7 @@ internal class OutgoingPacket constructor(
|
||||
internal val KEY_16_ZEROS = ByteArray(16)
|
||||
internal val EMPTY_BYTE_ARRAY = ByteArray(0)
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal inline fun OutgoingPacketFactory<*>.buildOutgoingUniPacket(
|
||||
client: QQAndroidClient,
|
||||
bodyType: Byte = 1, // 1: PB?
|
||||
@ -64,7 +64,7 @@ internal inline fun OutgoingPacketFactory<*>.buildOutgoingUniPacket(
|
||||
}
|
||||
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal inline fun IncomingPacketFactory<*>.buildResponseUniPacket(
|
||||
client: QQAndroidClient,
|
||||
bodyType: Byte = 1, // 1: PB?
|
||||
@ -95,7 +95,7 @@ internal inline fun IncomingPacketFactory<*>.buildResponseUniPacket(
|
||||
})
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal inline fun BytePacketBuilder.writeUniPacket(
|
||||
commandName: String,
|
||||
unknownData: ByteArray,
|
||||
@ -128,7 +128,7 @@ internal val NO_ENCRYPT: ByteArray = ByteArray(0)
|
||||
/**
|
||||
* com.tencent.qphone.base.util.CodecWarpper#encodeRequest(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, byte[], int, int, java.lang.String, byte, byte, byte, byte[], byte[], boolean)
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal inline fun OutgoingPacketFactory<*>.buildLoginOutgoingPacket(
|
||||
client: QQAndroidClient,
|
||||
bodyType: Byte,
|
||||
@ -166,7 +166,7 @@ internal inline fun OutgoingPacketFactory<*>.buildLoginOutgoingPacket(
|
||||
|
||||
private inline val BRP_STUB get() = ByteReadPacket.Empty
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal inline fun BytePacketBuilder.writeSsoPacket(
|
||||
client: QQAndroidClient,
|
||||
subAppId: Long,
|
||||
@ -232,7 +232,7 @@ internal inline fun BytePacketBuilder.writeSsoPacket(
|
||||
writeIntLVPacket(lengthOffset = { it + 4 }, builder = body)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
internal fun BytePacketBuilder.writeOicqRequestPacket(
|
||||
client: QQAndroidClient,
|
||||
encryptMethod: EncryptMethod,
|
||||
|
@ -20,6 +20,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.ImgStore
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.LongConn
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePush
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.ConfigPushSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.Heartbeat
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.StatSvc
|
||||
@ -47,7 +48,7 @@ internal sealed class PacketFactory<TPacket : Packet?> {
|
||||
*
|
||||
* @param TPacket 服务器回复包解析结果
|
||||
*/
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
internal abstract class OutgoingPacketFactory<TPacket : Packet?>(
|
||||
/**
|
||||
* 命令名. 如 `wtlogin.login`, `ConfigPushSvc.PushDomain`
|
||||
@ -116,7 +117,7 @@ internal val PacketLogger: MiraiLoggerWithSwitch = DefaultLogger("Packet").withS
|
||||
/**
|
||||
* 已知的数据包工厂列表.
|
||||
*/
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
internal object KnownPacketFactories {
|
||||
object OutgoingFactories : List<OutgoingPacketFactory<*>> by mutableListOf(
|
||||
WtLogin.Login,
|
||||
@ -163,7 +164,7 @@ internal object KnownPacketFactories {
|
||||
* full packet without length
|
||||
*/
|
||||
// do not inline. Exceptions thrown will not be reported correctly
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
suspend fun <T : Packet?> parseIncomingPacket(bot: QQAndroidBot, rawInput: Input, consumer: PacketConsumer<T>) = with(rawInput) {
|
||||
// login
|
||||
@ -225,7 +226,7 @@ internal object KnownPacketFactories {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal suspend fun <T : Packet?> handleIncomingPacket(it: IncomingPacket<T>, bot: QQAndroidBot, flag2: Int, consumer: PacketConsumer<T>) {
|
||||
if (it.packetFactory == null) {
|
||||
bot.network.logger.debug("Received commandName: ${it.commandName}")
|
||||
@ -274,7 +275,7 @@ internal object KnownPacketFactories {
|
||||
/**
|
||||
* 解析 SSO 层包装
|
||||
*/
|
||||
@OptIn(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
private fun parseSsoFrame(bot: QQAndroidBot, input: ByteReadPacket): IncomingPacket<*> {
|
||||
val commandName: String
|
||||
val ssoSequenceId: Int
|
||||
@ -335,7 +336,7 @@ internal object KnownPacketFactories {
|
||||
return IncomingPacket(packetFactory, ssoSequenceId, packet, commandName)
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
private suspend fun <T : Packet?> ByteReadPacket.parseOicqResponse(
|
||||
bot: QQAndroidBot,
|
||||
packetFactory: OutgoingPacketFactory<T>,
|
||||
|
@ -18,7 +18,7 @@ import net.mamoe.mirai.qqandroid.io.serialization.*
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.ModifyGroupCardReq
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.StUinInfo
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.stUinInfo
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.*
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacketFactory
|
||||
@ -402,7 +402,7 @@ internal class TroopManagement {
|
||||
dwGroupCode = member.group.id,
|
||||
dwNewSeq = 0L,
|
||||
vecUinInfo = listOf(
|
||||
StUinInfo(
|
||||
stUinInfo(
|
||||
gender = 0,
|
||||
dwuin = member.id,
|
||||
dwFlag = 31,
|
||||
|
@ -42,6 +42,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgSvc
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.SyncCookie
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.*
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.utils.MiraiExperimentalAPI
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
import net.mamoe.mirai.utils.currentTimeSeconds
|
||||
@ -73,7 +74,7 @@ internal class MessageSvc {
|
||||
/**
|
||||
* 获取好友消息和消息记录
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal object PbGetMsg : OutgoingPacketFactory<PbGetMsg.Response>("MessageSvc.PbGetMsg") {
|
||||
operator fun invoke(
|
||||
client: QQAndroidClient,
|
||||
@ -104,7 +105,7 @@ internal class MessageSvc {
|
||||
)
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
open class GetMsgSuccess(delegate: List<Packet>) : Response(MsgSvc.SyncFlag.STOP, delegate) {
|
||||
override fun toString(): String = "MessageSvc.PbGetMsg.GetMsgSuccess(messages=<Iterable>))"
|
||||
}
|
||||
@ -121,7 +122,7 @@ internal class MessageSvc {
|
||||
|
||||
object EmptyResponse : GetMsgSuccess(emptyList())
|
||||
|
||||
@OptIn(MiraiInternalAPI::class, MiraiExperimentalAPI::class, FlowPreview::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, MiraiExperimentalAPI::class, FlowPreview::class)
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
|
||||
// 00 00 01 0F 08 00 12 00 1A 34 08 FF C1 C4 F1 05 10 FF C1 C4 F1 05 18 E6 ED B9 C3 02 20 89 FE BE A4 06 28 8A CA 91 D1 0C 48 9B A5 BD 9B 0A 58 DE 9D 99 F8 08 60 1D 68 FF C1 C4 F1 05 70 00 20 02 2A 9D 01 08 F3 C1 C4 F1 05 10 A2 FF 8C F0 03 18 01 22 8A 01 0A 2A 08 A2 FF 8C F0 03 10 DD F1 92 B7 07 18 A6 01 20 0B 28 AE F9 01 30 F4 C1 C4 F1 05 38 A7 E3 D8 D4 84 80 80 80 01 B8 01 CD B5 01 12 08 08 01 10 00 18 00 20 00 1A 52 0A 50 0A 27 08 00 10 F4 C1 C4 F1 05 18 A7 E3 D8 D4 04 20 00 28 0C 30 00 38 86 01 40 22 4A 0C E5 BE AE E8 BD AF E9 9B 85 E9 BB 91 12 08 0A 06 0A 04 4E 4D 53 4C 12 15 AA 02 12 9A 01 0F 80 01 01 C8 01 00 F0 01 00 F8 01 00 90 02 00 12 04 4A 02 08 00 30 01 2A 15 08 97 A2 C1 F1 05 10 95 A6 F5 E5 0C 18 01 30 01 40 01 48 81 01 2A 10 08 D3 F7 B5 F1 05 10 DD F1 92 B7 07 18 01 30 01 38 00 42 00 48 00
|
||||
val resp = readProtoBuf(MsgSvc.PbGetMsgResp.serializer())
|
||||
@ -276,7 +277,6 @@ internal class MessageSvc {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("FunctionName")
|
||||
inline fun ToFriend(
|
||||
client: QQAndroidClient,
|
||||
toUin: Long,
|
||||
@ -327,7 +327,6 @@ internal class MessageSvc {
|
||||
}
|
||||
|
||||
|
||||
@Suppress("FunctionName")
|
||||
inline fun ToGroup(
|
||||
client: QQAndroidClient,
|
||||
groupCode: Long,
|
||||
|
@ -55,7 +55,7 @@ internal class OnlinePush {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot, sequenceId: Int): Packet? {
|
||||
// 00 00 02 E4 0A D5 05 0A 4F 08 A2 FF 8C F0 03 10 DD F1 92 B7 07 18 52 20 00 28 BC 3D 30 8C 82 AB F1 05 38 D2 80 E0 8C 80 80 80 80 02 4A 21 08 E7 C1 AD B8 02 10 01 18 BA 05 22 09 48 69 6D 31 38 38 6D 6F 65 30 06 38 02 42 05 4D 69 72 61 69 50 01 58 01 60 00 88 01 08 12 06 08 01 10 00 18 00 1A F9 04 0A F6 04 0A 26 08 00 10 87 82 AB F1 05 18 B7 B4 BF 30 20 00 28 0C 30 00 38 86 01 40 22 4A 0C E5 BE AE E8 BD AF E9 9B 85 E9 BB 91 12 E6 03 42 E3 03 12 2A 7B 34 45 31 38 35 38 32 32 2D 30 45 37 42 2D 46 38 30 46 2D 43 35 42 31 2D 33 34 34 38 38 33 37 34 44 33 39 43 7D 2E 6A 70 67 22 00 2A 04 03 00 00 00 32 60 15 36 20 39 36 6B 45 31 41 38 35 32 32 39 64 63 36 39 38 34 37 39 37 37 62 20 20 20 20 20 20 35 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7B 34 45 31 38 35 38 32 32 2D 30 45 37 42 2D 46 38 30 46 2D 43 35 42 31 2D 33 34 34 38 38 33 37 34 44 33 39 43 7D 2E 6A 70 67 31 32 31 32 41 38 C6 BB 8A A9 08 40 FB AE 9E C2 09 48 50 50 41 5A 00 60 01 6A 10 4E 18 58 22 0E 7B F8 0F C5 B1 34 48 83 74 D3 9C 72 59 2F 67 63 68 61 74 70 69 63 5F 6E 65 77 2F 31 30 34 30 34 30 30 32 39 30 2F 36 35 35 30 35 37 31 32 37 2D 32 32 33 33 36 33 38 33 34 32 2D 34 45 31 38 35 38 32 32 30 45 37 42 46 38 30 46 43 35 42 31 33 34 34 38 38 33 37 34 44 33 39 43 2F 31 39 38 3F 74 65 72 6D 3D 32 82 01 57 2F 67 63 68 61 74 70 69 63 5F 6E 65 77 2F 31 30 34 30 34 30 30 32 39 30 2F 36 35 35 30 35 37 31 32 37 2D 32 32 33 33 36 33 38 33 34 32 2D 34 45 31 38 35 38 32 32 30 45 37 42 46 38 30 46 43 35 42 31 33 34 34 38 38 33 37 34 44 33 39 43 2F 30 3F 74 65 72 6D 3D 32 B0 01 4D B8 01 2E C8 01 FF 05 D8 01 4D E0 01 2E FA 01 59 2F 67 63 68 61 74 70 69 63 5F 6E 65 77 2F 31 30 34 30 34 30 30 32 39 30 2F 36 35 35 30 35 37 31 32 37 2D 32 32 33 33 36 33 38 33 34 32 2D 34 45 31 38 35 38 32 32 30 45 37 42 46 38 30 46 43 35 42 31 33 34 34 38 38 33 37 34 44 33 39 43 2F 34 30 30 3F 74 65 72 6D 3D 32 80 02 4D 88 02 2E 12 45 AA 02 42 50 03 60 00 68 00 9A 01 39 08 09 20 BF 50 80 01 01 C8 01 00 F0 01 00 F8 01 00 90 02 00 98 03 00 A0 03 20 B0 03 00 C0 03 00 D0 03 00 E8 03 00 8A 04 04 08 02 08 01 90 04 80 80 80 10 B8 04 00 C0 04 00 12 06 4A 04 08 00 40 01 12 14 82 01 11 0A 09 48 69 6D 31 38 38 6D 6F 65 18 06 20 08 28 03 10 8A CA 9D A1 07 1A 00
|
||||
if (!bot.firstLoginSucceed) return null
|
||||
@ -94,7 +94,7 @@ internal class OnlinePush {
|
||||
|
||||
internal object PbPushTransMsg : IncomingPacketFactory<Packet>("OnlinePush.PbPushTransMsg", "OnlinePush.RespPush") {
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@ExperimentalUnsignedTypes
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot, sequenceId: Int): Packet {
|
||||
val content = this.readProtoBuf(OnlinePushTrans.PbMsgInfo.serializer())
|
||||
@ -187,7 +187,7 @@ internal class OnlinePush {
|
||||
//0C 01 B1 89 BE 09 5E 3D 72 A6 00 01 73 68 FC 06 00 00 00 3C
|
||||
internal object ReqPush : IncomingPacketFactory<Packet>("OnlinePush.ReqPush", "OnlinePush.RespPush") {
|
||||
@ExperimentalUnsignedTypes
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot, sequenceId: Int): Packet {
|
||||
val reqPushMsg = decodeUniPacket(OnlinePushPack.SvcReqPushMsg.serializer(), "req")
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.packet
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.packet.list
|
||||
|
||||
import io.ktor.utils.io.core.ByteReadPacket
|
||||
import net.mamoe.mirai.data.Packet
|
||||
@ -19,6 +19,10 @@ import net.mamoe.mirai.qqandroid.io.serialization.writeJceStruct
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.*
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.Vec0xd50
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgoingUniPacket
|
||||
|
||||
|
||||
internal class FriendList {
|
||||
@ -77,9 +81,7 @@ internal class FriendList {
|
||||
OutgoingPacketFactory<GetTroopListSimplify.Response>("friendlist.GetTroopListReqV2") {
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
|
||||
val res = this.decodeUniPacket(GetTroopListRespV2.serializer())
|
||||
return Response(
|
||||
res.vecTroopList.orEmpty()
|
||||
)
|
||||
return Response(res.vecTroopList.orEmpty())
|
||||
}
|
||||
|
||||
class Response(
|
@ -16,18 +16,18 @@ import net.mamoe.mirai.qqandroid.io.serialization.*
|
||||
import net.mamoe.mirai.qqandroid.network.QQAndroidClient
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.jce.SvcReqRegister
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.Oidb0x769
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.StatSvcGetOnline
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.buildLoginOutgoingPacket
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.oidb.oidb0x769.Oidb0x769
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.writeSsoPacket
|
||||
import net.mamoe.mirai.qqandroid.utils.NetworkType
|
||||
import net.mamoe.mirai.utils.io.encodeToString
|
||||
import net.mamoe.mirai.utils.io.toReadPacket
|
||||
import net.mamoe.mirai.utils.localIpAddress
|
||||
|
||||
@Suppress("EnumEntryName", "unused")
|
||||
@Suppress("EnumEntryName")
|
||||
internal enum class RegPushReason {
|
||||
appRegister,
|
||||
createDefaultRegInfo,
|
||||
@ -52,7 +52,6 @@ internal class StatSvc {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
class Failed(val errno: Int, val message: String) : Response() {
|
||||
override fun toString(): String {
|
||||
return "StatSvc.GetOnlineStatus.Response.Failed(errno=$errno, message=$message)"
|
||||
|
@ -29,7 +29,7 @@ internal class WtLogin {
|
||||
* OicqRequest
|
||||
*/
|
||||
@Suppress("FunctionName")
|
||||
@OptIn(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class, MiraiInternalAPI::class)
|
||||
internal object Login : OutgoingPacketFactory<Login.LoginPacketResponse>("wtlogin.login") {
|
||||
private const val subAppId = 537062845L
|
||||
|
||||
@ -127,7 +127,7 @@ internal class WtLogin {
|
||||
private const val appId = 16L
|
||||
private const val subAppId = 537062845L
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
operator fun invoke(
|
||||
client: QQAndroidClient
|
||||
): OutgoingPacket = buildLoginOutgoingPacket(client, bodyType = 2) { sequenceId ->
|
||||
@ -309,7 +309,7 @@ internal class WtLogin {
|
||||
}
|
||||
|
||||
@InternalAPI
|
||||
@OptIn(MiraiDebugAPI::class)
|
||||
@UseExperimental(MiraiDebugAPI::class)
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): LoginPacketResponse {
|
||||
|
||||
discardExact(2) // subCommand
|
||||
@ -368,7 +368,7 @@ internal class WtLogin {
|
||||
}
|
||||
|
||||
@InternalAPI
|
||||
@OptIn(MiraiDebugAPI::class)
|
||||
@UseExperimental(MiraiDebugAPI::class)
|
||||
private fun onSolveLoginCaptcha(tlvMap: TlvMap, bot: QQAndroidBot): LoginPacketResponse.Captcha {
|
||||
/*
|
||||
java.lang.IllegalStateException: UNKNOWN CAPTCHA QUESTION:
|
||||
@ -404,7 +404,7 @@ internal class WtLogin {
|
||||
error("UNKNOWN CAPTCHA, tlvMap=" + tlvMap._miraiContentToString())
|
||||
}
|
||||
|
||||
@OptIn(MiraiDebugAPI::class)
|
||||
@UseExperimental(MiraiDebugAPI::class)
|
||||
private fun onLoginSuccess(tlvMap: TlvMap, bot: QQAndroidBot): LoginPacketResponse.Success {
|
||||
val client = bot.client
|
||||
//println("TLV KEYS: " + tlvMap.keys.joinToString { it.contentToString() })
|
||||
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2020 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.packet.oidb.command
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.MessageMicro
|
||||
|
||||
/**
|
||||
* oidb_cmd0xcf8$GetPublicAccountDetailInfoRequest
|
||||
*/
|
||||
@Serializable
|
||||
class GetPublicAccountDetailInfoRequest(
|
||||
val seqno: Int, // uint
|
||||
val uinLong: Long,
|
||||
val version: Int, // uint
|
||||
val versionInfo: String
|
||||
) : MessageMicro
|
||||
|
||||
class GetPublicAccountDetailInfoResponse(
|
||||
|
||||
) : MessageMicro
|
@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright 2020 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.packet.oidb.oidb0x769
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.qqandroid.io.ProtoBuf
|
||||
|
||||
class Oidb0x769 {
|
||||
@Serializable
|
||||
class RequestBody(
|
||||
@SerialId(1) val rpt_config_list: List<ConfigSeq>
|
||||
// @SerialId(2) val msg_device_info: DeviceInfo,
|
||||
// @SerialId(3) val str_info: String = "",
|
||||
// @SerialId(4) val province: String,
|
||||
// @SerialId(5) val city: String,
|
||||
// @SerialId(6) val req_debug_msg: Int = 0,
|
||||
// @SerialId(101) val query_uin_package_usage_req: QueryUinPackageUsageReq
|
||||
) : ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class QueryUinPackageUsageReq(
|
||||
@SerialId(1) val type: Int,
|
||||
@SerialId(2) val uinFileSize: Long = 0
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class ConfigSeq(
|
||||
@SerialId(1) val type: Int, // uint
|
||||
@SerialId(2) val version: Int // uint
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class DeviceInfo(
|
||||
@SerialId(1) val brand: String,
|
||||
@SerialId(2) val model: String
|
||||
//@SerialId(3) val os: OS,
|
||||
//@SerialId(4) val cpu: CPU,
|
||||
//@SerialId(5) val memory: Memory,
|
||||
//@SerialId(6) val storage: Storage,
|
||||
//@SerialId(7) val screen: Screen,
|
||||
//@SerialId(8) val camera: Camera
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class OS(
|
||||
@SerialId(1) val type: Int = 1,
|
||||
@SerialId(2) val version: String,
|
||||
@SerialId(3) val sdk: String,
|
||||
@SerialId(4) val kernel: String,
|
||||
@SerialId(5) val rom: String
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Camera(
|
||||
@SerialId(1) val primary: Long,
|
||||
@SerialId(2) val secondary: Long,
|
||||
@SerialId(3) val flag: Boolean
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class CPU(
|
||||
@SerialId(1) val model: String,
|
||||
@SerialId(2) val frequency: Int,
|
||||
@SerialId(3) val cores: Int
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Memory(
|
||||
@SerialId(1) val total: Int,
|
||||
@SerialId(2) val process: Int
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Screen(
|
||||
@SerialId(1) val model: String,
|
||||
@SerialId(2) val width: Int,
|
||||
@SerialId(3) val height: Int,
|
||||
@SerialId(4) val dpi: Int,
|
||||
@SerialId(5) val multiTouch: Boolean
|
||||
): ProtoBuf
|
||||
|
||||
@Serializable
|
||||
class Storage(
|
||||
@SerialId(1) val builtin: Int,
|
||||
@SerialId(2) val external: Int
|
||||
): ProtoBuf
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2020 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.qqandroid.network.protocol.packet.oidb.sso
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.qqandroid.network.protocol.packet.MessageMicro
|
||||
|
||||
/**
|
||||
* oidb_sso$OIDBSSOPkg
|
||||
*/
|
||||
@Serializable
|
||||
class OidbSsoPackage(
|
||||
@SerialId(1) val command: Int, // uint
|
||||
@SerialId(2) val serviceType: Int, // uint
|
||||
@SerialId(3) val result: Int, // uint
|
||||
@SerialId(4) val bodyBuffer: ByteArray,
|
||||
@SerialId(5) val errorMessage: String,
|
||||
@SerialId(6) val clientVersion: String
|
||||
) : MessageMicro
|
||||
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ import kotlin.jvm.JvmName
|
||||
/**
|
||||
* Inline the block
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
@PublishedApi
|
||||
internal inline fun <R> inline(block: () -> R): R {
|
||||
contract {
|
||||
|
@ -35,7 +35,7 @@ inline fun ByteArray.debugPrintThis(name: String): ByteArray {
|
||||
return this
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalContracts::class, MiraiInternalAPI::class)
|
||||
@UseExperimental(ExperimentalContracts::class, MiraiInternalAPI::class)
|
||||
inline fun <R> Input.debugIfFail(name: String = "", onFail: (ByteArray) -> ByteReadPacket = { it.toReadPacket() }, block: ByteReadPacket.() -> R): R {
|
||||
|
||||
contract {
|
||||
|
@ -23,7 +23,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
* QQ for Android
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
actual object QQAndroid : BotFactory {
|
||||
|
||||
/**
|
||||
|
@ -15,11 +15,11 @@ import net.mamoe.mirai.utils.Context
|
||||
import net.mamoe.mirai.utils.ContextImpl
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@Suppress("FunctionName")
|
||||
internal fun QQAndroidBot(account: BotAccount, configuration: BotConfiguration): QQAndroidBot = QQAndroidBot(ContextImpl(), account, configuration)
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
internal actual class QQAndroidBot actual constructor(
|
||||
context: Context,
|
||||
account: BotAccount,
|
||||
|
@ -161,7 +161,7 @@ data class PBFieldInfo(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
fun String.generateProtoBufDataClass(): GeneratedClass {
|
||||
if (this.indexOf("extends") == -1) {
|
||||
val javaClassname = substringBetween("class", "{")
|
||||
@ -367,7 +367,7 @@ fun String.getNumericalValue(): Int? {
|
||||
return this.filter { it in '0'..'9' }.toDoubleOrNull()?.toInt()
|
||||
}
|
||||
|
||||
@OptIn(MiraiDebugAPI::class)
|
||||
@UseExperimental(MiraiDebugAPI::class)
|
||||
fun ProtoType.mapToKotlinType(): String {
|
||||
return when (this) {
|
||||
ProtoType.VAR_INT -> "Int"
|
||||
|
@ -59,7 +59,6 @@ kotlin {
|
||||
languageSettings.enableLanguageFeature("InlineClasses")
|
||||
|
||||
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
|
||||
languageSettings.useExperimentalAnnotation("kotlin.OptIn")
|
||||
|
||||
dependencies {
|
||||
api(kotlin("stdlib", kotlinVersion))
|
||||
@ -76,7 +75,6 @@ kotlin {
|
||||
api(kotlin("serialization", kotlinVersion))
|
||||
api(kotlinx("coroutines-core-common", coroutinesVersion))
|
||||
api(kotlinx("serialization-runtime-common", serializationVersion))
|
||||
api(kotlinx("serialization-protobuf-common", serializationVersion))
|
||||
|
||||
api(ktor("http-cio", ktorVersion))
|
||||
api(ktor("http", ktorVersion))
|
||||
@ -105,7 +103,6 @@ kotlin {
|
||||
|
||||
api(kotlinx("serialization-runtime", serializationVersion))
|
||||
api(kotlinx("coroutines-android", coroutinesVersion))
|
||||
api(kotlinx("serialization-protobuf", serializationVersion))
|
||||
|
||||
api(ktor("client-android", ktorVersion))
|
||||
}
|
||||
@ -132,7 +129,6 @@ kotlin {
|
||||
api(kotlinx("coroutines-io", coroutinesIoVersion))
|
||||
api(kotlinx("coroutines-io-jvm", coroutinesIoVersion))
|
||||
api(kotlinx("io-jvm", coroutinesIoVersion))
|
||||
api(kotlinx("serialization-protobuf", serializationVersion))
|
||||
|
||||
api("org.bouncycastle:bcprov-jdk15on:1.64")
|
||||
runtimeOnly(files("build/classes/kotlin/jvm/main")) // classpath is not properly set by IDE
|
||||
|
@ -24,9 +24,7 @@ import net.mamoe.mirai.utils.*
|
||||
* @see kotlinx.coroutines.isActive 判断 [Bot] 是否正常运行中. (在线, 且没有被 [close])
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@OptIn(
|
||||
MiraiInternalAPI::class, LowLevelAPI::class, MiraiExperimentalAPI::class, JavaHappyAPI::class
|
||||
)
|
||||
@UseExperimental(MiraiInternalAPI::class, LowLevelAPI::class, MiraiExperimentalAPI::class, JavaHappyAPI::class)
|
||||
actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIAccessor, BotJavaHappyAPI() {
|
||||
actual companion object {
|
||||
/**
|
||||
@ -236,6 +234,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
|
||||
*/
|
||||
actual abstract fun close(cause: Throwable?)
|
||||
|
||||
@OptIn(LowLevelAPI::class, MiraiExperimentalAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class, MiraiExperimentalAPI::class)
|
||||
actual final override fun toString(): String = "Bot(${uin})"
|
||||
}
|
@ -132,7 +132,7 @@ actual abstract class BotJavaHappyAPI actual constructor() {
|
||||
message: String? = null,
|
||||
remark: String? = null
|
||||
): AddFriendResult {
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
return runBlocking { addFriend(id, message, remark) }
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ actual abstract class BotJavaHappyAPI actual constructor() {
|
||||
}
|
||||
|
||||
// !! 不要 crossinline, 会编译失败
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class)
|
||||
internal fun <R, C : CoroutineScope> C.future(block: suspend C.() -> R): Future<R> {
|
||||
val future = object : Future<R> {
|
||||
val value: CompletableDeferred<R> = CompletableDeferred()
|
||||
@ -215,7 +215,7 @@ internal fun <R, C : CoroutineScope> C.future(block: suspend C.() -> R): Future<
|
||||
}
|
||||
|
||||
launch {
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class)
|
||||
future.value.completeWith(kotlin.runCatching { block() })
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ import net.mamoe.mirai.utils.WeakRefProperty
|
||||
* @author Him188moe
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@OptIn(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
actual abstract class Contact : CoroutineScope, ContactJavaHappyAPI() {
|
||||
/**
|
||||
* 这个联系人所属 [Bot].
|
||||
|
@ -21,7 +21,7 @@ import net.mamoe.mirai.utils.WeakRefProperty
|
||||
* 群成员.
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@OptIn(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
actual abstract class Member : MemberJavaHappyAPI() {
|
||||
/**
|
||||
* 所在的群.
|
||||
|
@ -16,7 +16,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
/**
|
||||
* 平台相关扩展
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
actual abstract class MessagePacket<TSender : QQ, TSubject : Contact> actual constructor() : MessagePacketBase<TSender, TSubject>() {
|
||||
// suspend inline fun uploadImage(image: Bitmap): Image = subject.uploadImage(image)
|
||||
//suspend inline fun uploadImage(image: URL): Image = subject.uploadImage(image)
|
||||
|
@ -28,7 +28,7 @@ import net.mamoe.mirai.utils.unsafeWeakRef
|
||||
* @see MessageReceipt.sourceTime 源时间
|
||||
*/
|
||||
@Suppress("FunctionName")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
actual open class MessageReceipt<C : Contact> actual constructor(
|
||||
actual val source: MessageSource,
|
||||
target: C,
|
||||
@ -94,7 +94,7 @@ actual open class MessageReceipt<C : Contact> actual constructor(
|
||||
*/
|
||||
actual open suspend fun quote(): QuoteReplyToSend {
|
||||
this.source.ensureSequenceIdAvailable()
|
||||
@OptIn(LowLevelAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class)
|
||||
return _unsafeQuote()
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ import io.ktor.utils.io.errors.IOException
|
||||
import io.ktor.utils.io.streams.asOutput
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
import java.io.File
|
||||
import java.io.InputStream
|
||||
import java.net.URL
|
||||
@ -31,7 +30,7 @@ import java.net.URL
|
||||
|
||||
|
||||
/**
|
||||
* 读取 [Bitmap] 的属性, 然后构造 [ExternalImage]
|
||||
* 读取 [BufferedImage] 的属性, 然后构造 [ExternalImage]
|
||||
*/
|
||||
@Throws(IOException::class)
|
||||
fun Bitmap.toExternalImage(formatName: String = "gif"): Nothing {
|
||||
@ -125,7 +124,6 @@ suspend inline fun Input.suspendToExternalImage(): ExternalImage = withContext(I
|
||||
/**
|
||||
* 保存为临时文件然后调用 [File.toExternalImage].
|
||||
*/
|
||||
@InternalSerializationApi
|
||||
suspend fun ByteReadChannel.toExternalImage(): ExternalImage {
|
||||
val file = createTempFile().apply { deleteOnExit() }
|
||||
file.outputStream().use {
|
||||
|
@ -23,7 +23,7 @@ import java.io.File
|
||||
/**
|
||||
* 加载一个设备信息. 若文件不存在或为空则随机并创建一个设备信息保存.
|
||||
*/
|
||||
@OptIn(UnstableDefault::class)
|
||||
@UseExperimental(UnstableDefault::class)
|
||||
fun File.loadAsDeviceInfo(context: Context): DeviceInfo {
|
||||
if (!this.exists() || this.length() == 0L) {
|
||||
return SystemDeviceInfo(context).also {
|
||||
|
@ -80,7 +80,7 @@ actual class PlatformSocket : Closeable {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalIoApi::class)
|
||||
@UseExperimental(ExperimentalIoApi::class)
|
||||
actual suspend fun connect(serverHost: String, serverPort: Int) {
|
||||
withContext(Dispatchers.IO) {
|
||||
socket = Socket(serverHost, serverPort)
|
||||
|
@ -26,7 +26,7 @@ import java.util.zip.Inflater
|
||||
/**
|
||||
* Ktor HttpClient. 不同平台使用不同引擎.
|
||||
*/
|
||||
@OptIn(KtorExperimentalAPI::class)
|
||||
@UseExperimental(KtorExperimentalAPI::class)
|
||||
actual val Http: HttpClient
|
||||
get() = HttpClient(CIO)
|
||||
|
||||
@ -76,7 +76,7 @@ private inline fun InputStream.readInSequence(block: (Int) -> Unit) {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
actual fun ByteArray.unzip(offset: Int, length: Int): ByteArray {
|
||||
this.checkOffsetAndLength(offset, length)
|
||||
if (length == 0) return ByteArray(0)
|
||||
|
@ -41,7 +41,7 @@ import kotlin.jvm.JvmSynthetic
|
||||
* @see kotlinx.coroutines.isActive 判断 [Bot] 是否正常运行中. (在线, 且没有被 [close])
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@OptIn(MiraiInternalAPI::class, LowLevelAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, LowLevelAPI::class)
|
||||
expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor {
|
||||
companion object {
|
||||
/**
|
||||
@ -241,7 +241,7 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor {
|
||||
*/
|
||||
abstract fun close(cause: Throwable? = null)
|
||||
|
||||
@OptIn(LowLevelAPI::class, MiraiExperimentalAPI::class)
|
||||
@UseExperimental(LowLevelAPI::class, MiraiExperimentalAPI::class)
|
||||
final override fun toString(): String
|
||||
}
|
||||
|
||||
|
@ -52,5 +52,5 @@ data class BotAccount(
|
||||
@MiraiInternalAPI
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(CLASS, TYPEALIAS, FUNCTION, PROPERTY, FIELD, CONSTRUCTOR)
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@Experimental(level = Experimental.Level.WARNING)
|
||||
annotation class RawAccountIdUse
|
@ -27,7 +27,7 @@ import kotlin.coroutines.CoroutineContext
|
||||
/*
|
||||
* 泛型 N 不需要向外(接口)暴露.
|
||||
*/
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
@MiraiInternalAPI
|
||||
abstract class BotImpl<N : BotNetworkHandler> constructor(
|
||||
context: Context,
|
||||
@ -43,7 +43,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
|
||||
@Suppress("CanBePrimaryConstructorProperty") // for logger
|
||||
final override val account: BotAccount = account
|
||||
|
||||
@OptIn(RawAccountIdUse::class)
|
||||
@UseExperimental(RawAccountIdUse::class)
|
||||
override val uin: Long
|
||||
get() = account.id
|
||||
final override val logger: MiraiLogger by lazy { configuration.botLoggerSupplier(this) }
|
||||
@ -172,7 +172,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
|
||||
|
||||
// endregion
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
override fun close(cause: Throwable?) {
|
||||
if (!this.botJob.isActive) {
|
||||
// already cancelled
|
||||
|
@ -36,7 +36,7 @@ import kotlin.jvm.JvmSynthetic
|
||||
*
|
||||
* @author Him188moe
|
||||
*/ // 不要删除多平台结构 !!! kotlin bug
|
||||
@OptIn(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
expect abstract class Contact() : CoroutineScope, ContactJavaHappyAPI {
|
||||
/**
|
||||
|
@ -19,7 +19,7 @@ import net.mamoe.mirai.utils.*
|
||||
*
|
||||
* @see ContactList.asSequence
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@Suppress("unused")
|
||||
class ContactList<C : Contact>(@MiraiInternalAPI val delegate: LockFreeLinkedList<C>) {
|
||||
/**
|
||||
@ -79,7 +79,7 @@ fun <E : Contact> ContactList<E>.toList(): List<E> = toMutableList()
|
||||
/**
|
||||
* Collect all the elements into a [MutableList].
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun <E : Contact> ContactList<E>.toMutableList(): MutableList<E> = this.delegate.toMutableList()
|
||||
|
||||
/**
|
||||
@ -90,7 +90,7 @@ fun <E : Contact> ContactList<E>.toSet(): Set<E> = toMutableSet()
|
||||
/**
|
||||
* Collect all the elements into a [MutableSet].
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun <E : Contact> ContactList<E>.toMutableSet(): MutableSet<E> = this.delegate.toMutableSet()
|
||||
|
||||
/**
|
||||
@ -98,7 +98,7 @@ fun <E : Contact> ContactList<E>.toMutableSet(): MutableSet<E> = this.delegate.t
|
||||
*
|
||||
* Note that the sequence is dynamic, that is, elements are yielded atomically only when it is required
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun <E : Contact> ContactList<E>.asSequence(): Sequence<E> {
|
||||
return this.delegate.asSequence()
|
||||
}
|
@ -25,7 +25,7 @@ import kotlin.time.ExperimentalTime
|
||||
* 群成员.
|
||||
*/ // 不要删除多平台结构, kotlin bug
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@OptIn(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, JavaHappyAPI::class)
|
||||
expect abstract class Member() : MemberJavaHappyAPI {
|
||||
/**
|
||||
* 所在的群.
|
||||
|
@ -82,7 +82,7 @@ expect class PermissionDeniedException : IllegalStateException {
|
||||
*
|
||||
* @throws PermissionDeniedException
|
||||
*/
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
inline fun Group.checkBotPermission(
|
||||
required: MemberPermission,
|
||||
lazyMessage: () -> String = {
|
||||
@ -99,7 +99,7 @@ inline fun Group.checkBotPermission(
|
||||
*
|
||||
* @throws PermissionDeniedException
|
||||
*/
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
inline fun Group.checkBotPermissionOperator(
|
||||
lazyMessage: () -> String = {
|
||||
"Permission denied: required ${MemberPermission.ADMINISTRATOR} or ${MemberPermission.OWNER}, got actual $botPermission for $bot in group $id"
|
||||
|
@ -66,7 +66,7 @@ abstract class AbstractCancellableEvent : Event, CancellableEvent {
|
||||
/**
|
||||
* 广播一个事件的唯一途径.
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
suspend fun <E : Event> E.broadcast(): E = apply {
|
||||
if (this is BroadcastControllable && !this.shouldBroadcast) {
|
||||
return@apply
|
||||
|
@ -143,7 +143,7 @@ sealed class MessageRecallEvent : BotEvent {
|
||||
) : MessageRecallEvent(), GroupOperableEvent, Packet
|
||||
}
|
||||
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
val MessageRecallEvent.GroupRecall.author: Member
|
||||
get() = if (authorId == bot.uin) group.botAsMember else group[authorId]
|
||||
|
||||
|
@ -73,7 +73,7 @@ val GroupOperableEvent.isByBot: Boolean get() = operator == null
|
||||
* 当操作人为 [Member] 时获取这个 [Member],
|
||||
* 当操作人为 [Bot] 时获取 [Group.botAsMember]
|
||||
*/
|
||||
@OptIn(MiraiExperimentalAPI::class)
|
||||
@UseExperimental(MiraiExperimentalAPI::class)
|
||||
val GroupOperableEvent.operatorOrBot: Member
|
||||
get() = this.operator ?: this.group.botAsMember
|
||||
|
||||
|
@ -36,7 +36,7 @@ internal fun <E : Event> CoroutineScope.Handler(
|
||||
coroutineContext: CoroutineContext,
|
||||
handler: suspend (E) -> ListeningStatus
|
||||
): Handler<E> {
|
||||
@OptIn(ExperimentalCoroutinesApi::class) // don't remove
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class) // don't remove
|
||||
val context = this.newCoroutineContext(coroutineContext)
|
||||
return Handler(context[Job], context, handler)
|
||||
}
|
||||
@ -50,7 +50,7 @@ internal class Handler<in E : Event>
|
||||
@PublishedApi internal constructor(parentJob: Job?, private val subscriberContext: CoroutineContext, @JvmField val handler: suspend (E) -> ListeningStatus) :
|
||||
Listener<E>, CompletableJob by Job(parentJob) {
|
||||
|
||||
@OptIn(MiraiDebugAPI::class)
|
||||
@UseExperimental(MiraiDebugAPI::class)
|
||||
override suspend fun onEvent(event: E): ListeningStatus {
|
||||
if (isCompleted || isCancelled) return ListeningStatus.STOPPED
|
||||
if (!isActive) return ListeningStatus.LISTENING
|
||||
@ -155,7 +155,7 @@ internal suspend inline fun Event.broadcastInternal() = coroutineScope {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
private fun <E : Event> CoroutineScope.callAndRemoveIfRequired(event: E, listeners: EventListeners<E>) {
|
||||
// atomic foreach
|
||||
listeners.forEachNode { node ->
|
||||
|
@ -33,7 +33,7 @@ import kotlin.coroutines.EmptyCoroutineContext
|
||||
*
|
||||
* @see CoroutineScope.incoming
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> CoroutineScope.subscribeMessages(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
crossinline listeners: MessageSubscribersBuilder<MessagePacket<*, *>>.() -> R
|
||||
@ -58,7 +58,7 @@ inline fun <R> CoroutineScope.subscribeMessages(
|
||||
*
|
||||
* @see CoroutineScope.incoming
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> CoroutineScope.subscribeGroupMessages(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
crossinline listeners: MessageSubscribersBuilder<GroupMessage>.() -> R
|
||||
@ -78,7 +78,7 @@ inline fun <R> CoroutineScope.subscribeGroupMessages(
|
||||
*
|
||||
* @see CoroutineScope.incoming
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> CoroutineScope.subscribeFriendMessages(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
crossinline listeners: MessageSubscribersBuilder<FriendMessage>.() -> R
|
||||
@ -98,7 +98,7 @@ inline fun <R> CoroutineScope.subscribeFriendMessages(
|
||||
*
|
||||
* @see CoroutineScope.incoming
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> Bot.subscribeMessages(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
crossinline listeners: MessageSubscribersBuilder<MessagePacket<*, *>>.() -> R
|
||||
@ -120,7 +120,7 @@ inline fun <R> Bot.subscribeMessages(
|
||||
*
|
||||
* @see CoroutineScope.incoming
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> Bot.subscribeGroupMessages(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
crossinline listeners: MessageSubscribersBuilder<GroupMessage>.() -> R
|
||||
@ -140,7 +140,7 @@ inline fun <R> Bot.subscribeGroupMessages(
|
||||
*
|
||||
* @see CoroutineScope.incoming
|
||||
*/
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> Bot.subscribeFriendMessages(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
crossinline listeners: MessageSubscribersBuilder<FriendMessage>.() -> R
|
||||
@ -189,7 +189,7 @@ typealias MessageListener<T> = @MessageDsl suspend T.(String) -> Unit
|
||||
* 消息订阅构造器
|
||||
*
|
||||
* @see subscribeFriendMessages
|
||||
// * @sample demo.subscribe.messageDSL
|
||||
* @sample demo.subscribe.messageDSL
|
||||
*/
|
||||
// TODO: 2019/12/23 应定义为 inline, 但这会导致一个 JVM run-time VerifyError. 等待 kotlin 修复 bug (Kotlin 1.3.61)
|
||||
@Suppress("unused")
|
||||
|
@ -118,7 +118,7 @@ interface Listener<in E : Event> : CompletableJob {
|
||||
* @see subscribeGroupMessages 监听群消息 DSL
|
||||
* @see subscribeFriendMessages 监听好友消息 DSL
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
inline fun <reified E : Event> CoroutineScope.subscribe(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
noinline handler: suspend E.(E) -> ListeningStatus
|
||||
@ -136,7 +136,7 @@ inline fun <reified E : Event> CoroutineScope.subscribe(
|
||||
*
|
||||
* @see subscribe 获取更多说明
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class, ExperimentalContracts::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, ExperimentalContracts::class)
|
||||
inline fun <reified E : Event> CoroutineScope.subscribeAlways(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
noinline listener: suspend E.(E) -> Unit
|
||||
@ -158,7 +158,7 @@ inline fun <reified E : Event> CoroutineScope.subscribeAlways(
|
||||
*
|
||||
* @see subscribe 获取更多说明
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
inline fun <reified E : Event> CoroutineScope.subscribeOnce(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
noinline listener: suspend E.(E) -> Unit
|
||||
@ -184,7 +184,7 @@ inline fun <reified E : Event> CoroutineScope.subscribeOnce(
|
||||
* @see subscribe 获取更多说明
|
||||
*/
|
||||
@JvmName("subscribeAlwaysForBot")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
inline fun <reified E : BotEvent> Bot.subscribe(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
noinline handler: suspend E.(E) -> ListeningStatus
|
||||
@ -204,7 +204,7 @@ inline fun <reified E : BotEvent> Bot.subscribe(
|
||||
* @see subscribe 获取更多说明
|
||||
*/
|
||||
@JvmName("subscribeAlwaysForBot1")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
inline fun <reified E : BotEvent> Bot.subscribeAlways(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
noinline listener: suspend E.(E) -> Unit
|
||||
@ -224,7 +224,7 @@ inline fun <reified E : BotEvent> Bot.subscribeAlways(
|
||||
* @see subscribe 获取更多说明
|
||||
*/
|
||||
@JvmName("subscribeOnceForBot2")
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
inline fun <reified E : BotEvent> Bot.subscribeOnce(
|
||||
coroutineContext: CoroutineContext = EmptyCoroutineContext,
|
||||
noinline listener: suspend E.(E) -> Unit
|
||||
|
@ -15,7 +15,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
* 表明这个 API 是为了让 Java 使用者调用更方便.
|
||||
*/
|
||||
@MiraiInternalAPI
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.ERROR)
|
||||
@Experimental(level = Experimental.Level.ERROR)
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.CLASS)
|
||||
annotation class JavaHappyAPI
|
||||
|
||||
|
@ -25,7 +25,7 @@ import net.mamoe.mirai.utils.WeakRef
|
||||
* 使用低级的 API 无法带来任何安全和便捷保障.
|
||||
* 仅在某些使用结构化 API 可能影响性能的情况下使用这些低级 API.
|
||||
*/
|
||||
@RequiresOptIn
|
||||
@Experimental
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
annotation class LowLevelAPI
|
||||
|
@ -33,7 +33,7 @@ import kotlin.jvm.JvmName
|
||||
* 一条从服务器接收到的消息事件.
|
||||
* 请查看各平台的 `actual` 实现的说明.
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
expect abstract class MessagePacket<TSender : QQ, TSubject : Contact>() : MessagePacketBase<TSender, TSubject>
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,6 @@ import kotlin.jvm.JvmStatic
|
||||
* @see AtAll 全体成员
|
||||
*/
|
||||
class At
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
private constructor(val target: Long, val display: String) : Message, MessageContent {
|
||||
|
||||
/**
|
||||
|
@ -76,7 +76,7 @@ interface OnlineImage : Image {
|
||||
* 查询原图下载链接.
|
||||
*/
|
||||
suspend fun Image.queryUrl(): String {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
return when (this) {
|
||||
is OnlineImage -> this.originUrl
|
||||
else -> BotImpl.instances.peekFirst().get()?.queryImageUrl(this)
|
||||
@ -102,7 +102,7 @@ interface OfflineImage : Image
|
||||
* 原图下载链接. 包含域名
|
||||
*/
|
||||
suspend fun OfflineImage.queryOriginUrl(): String {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
return BotImpl.instances.peekFirst().get()?.queryImageUrl(this) ?: error("No Bot available to query image url")
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ suspend fun OfflineImage.queryOriginUrl(): String {
|
||||
* 群图片
|
||||
*/
|
||||
// CustomFace
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
sealed class GroupImage : AbstractImage() {
|
||||
abstract val filepath: String
|
||||
abstract val fileId: Int
|
||||
@ -184,7 +184,7 @@ abstract class OnlineGroupImage : GroupImage(), OnlineImage
|
||||
/**
|
||||
* 好友图片
|
||||
*/ // NotOnlineImage
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
sealed class FriendImage : AbstractImage() {
|
||||
abstract val resourceId: String
|
||||
abstract val md5: ByteArray
|
||||
|
@ -39,7 +39,7 @@ open class QuoteReply
|
||||
* 用于发送的引用回复.
|
||||
* 总是使用 [quote] 来构造实例.
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
sealed class QuoteReplyToSend
|
||||
@MiraiInternalAPI constructor(source: MessageSource) : QuoteReply(source) {
|
||||
class ToGroup(source: MessageSource, val sender: QQ) : QuoteReplyToSend(source) {
|
||||
@ -53,7 +53,7 @@ sealed class QuoteReplyToSend
|
||||
* 引用这条消息.
|
||||
* @see sender 消息发送人.
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun MessageChain.quote(sender: QQ?): QuoteReplyToSend {
|
||||
this.firstOrNull<MessageSource>()?.let {
|
||||
return it.quote(sender)
|
||||
@ -65,7 +65,7 @@ fun MessageChain.quote(sender: QQ?): QuoteReplyToSend {
|
||||
* 引用这条消息.
|
||||
* @see from 消息来源. 若是好友发送
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun MessageSource.quote(from: QQ?): QuoteReplyToSend {
|
||||
return if (this.groupId != 0L) {
|
||||
check(from is Member) { "sender must be Member to quote a GroupMessage" }
|
||||
|
@ -101,7 +101,7 @@ abstract class BotNetworkHandler : CoroutineScope {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
suspend fun BotNetworkHandler.closeAndJoin(cause: Throwable? = null) {
|
||||
this.close(cause)
|
||||
this.supervisor.join()
|
||||
|
@ -9,10 +9,10 @@
|
||||
|
||||
package net.mamoe.mirai.utils
|
||||
|
||||
import kotlinx.serialization.SerialId
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.Transient
|
||||
import kotlinx.serialization.protobuf.ProtoBuf
|
||||
import kotlinx.serialization.protobuf.ProtoId
|
||||
|
||||
/**
|
||||
* 设备信息. 可通过继承 [SystemDeviceInfo] 来在默认的基础上修改
|
||||
@ -60,15 +60,15 @@ abstract class DeviceInfo {
|
||||
fun generateDeviceInfoData(): ByteArray {
|
||||
@Serializable
|
||||
class DevInfo(
|
||||
@ProtoId(1) val bootloader: ByteArray,
|
||||
@ProtoId(2) val procVersion: ByteArray,
|
||||
@ProtoId(3) val codename: ByteArray,
|
||||
@ProtoId(4) val incremental: ByteArray,
|
||||
@ProtoId(5) val fingerprint: ByteArray,
|
||||
@ProtoId(6) val bootId: ByteArray,
|
||||
@ProtoId(7) val androidId: ByteArray,
|
||||
@ProtoId(8) val baseBand: ByteArray,
|
||||
@ProtoId(9) val innerVersion: ByteArray
|
||||
@SerialId(1) val bootloader: ByteArray,
|
||||
@SerialId(2) val procVersion: ByteArray,
|
||||
@SerialId(3) val codename: ByteArray,
|
||||
@SerialId(4) val incremental: ByteArray,
|
||||
@SerialId(5) val fingerprint: ByteArray,
|
||||
@SerialId(6) val bootId: ByteArray,
|
||||
@SerialId(7) val androidId: ByteArray,
|
||||
@SerialId(8) val baseBand: ByteArray,
|
||||
@SerialId(9) val innerVersion: ByteArray
|
||||
)
|
||||
|
||||
return ProtoBuf.dump(
|
||||
@ -120,7 +120,7 @@ class DeviceInfoData(
|
||||
@Transient
|
||||
override lateinit var context: Context
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
override val ipAddress: ByteArray
|
||||
get() = localIpAddress().split(".").map { it.toUByte().toByte() }.takeIf { it.size == 4 }?.toByteArray() ?: byteArrayOf()
|
||||
override val androidId: ByteArray get() = display
|
||||
|
@ -18,7 +18,7 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
* 非常不建议在发行版本中使用这些 API.
|
||||
*/
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.ERROR)
|
||||
@Experimental(level = Experimental.Level.ERROR)
|
||||
@Target(
|
||||
CLASS, TYPEALIAS, FUNCTION, PROPERTY, FIELD, CONSTRUCTOR,
|
||||
CLASS,
|
||||
@ -36,7 +36,7 @@ annotation class MiraiInternalAPI(
|
||||
* 不建议在发行版本中使用这些 API.
|
||||
*/
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@Experimental(level = Experimental.Level.WARNING)
|
||||
@Target(CLASS, TYPEALIAS, FUNCTION, PROPERTY, FIELD, CONSTRUCTOR)
|
||||
annotation class MiraiExperimentalAPI(
|
||||
val message: String = ""
|
||||
@ -49,7 +49,7 @@ annotation class MiraiExperimentalAPI(
|
||||
* 非常不建议在发行版本中使用这些 API.
|
||||
*/
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@Experimental(level = Experimental.Level.WARNING)
|
||||
@Target(CLASS, TYPEALIAS, FUNCTION, PROPERTY, FIELD, CONSTRUCTOR)
|
||||
annotation class MiraiDebugAPI(
|
||||
val message: String = ""
|
||||
|
@ -20,7 +20,6 @@ import io.ktor.utils.io.core.writeFully
|
||||
import io.ktor.utils.io.pool.useInstance
|
||||
import io.ktor.utils.io.readAvailable
|
||||
import kotlinx.io.OutputStream
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
import net.mamoe.mirai.utils.io.ByteArrayPool
|
||||
import kotlin.jvm.JvmMultifileClass
|
||||
import kotlin.jvm.JvmName
|
||||
@ -30,9 +29,8 @@ import kotlin.jvm.JvmName
|
||||
/**
|
||||
* 从接收者管道读取所有数据并写入 [dst]. 不会关闭 [dst]
|
||||
*/
|
||||
@InternalSerializationApi
|
||||
suspend fun ByteReadChannel.copyTo(dst: OutputStream) {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
ByteArrayPool.useInstance { buffer ->
|
||||
var size: Int
|
||||
while (this.readAvailable(buffer).also { size = it } > 0) {
|
||||
@ -45,7 +43,7 @@ suspend fun ByteReadChannel.copyTo(dst: OutputStream) {
|
||||
* 从接收者管道读取所有数据并写入 [dst]. 不会关闭 [dst]
|
||||
*/
|
||||
suspend fun ByteReadChannel.copyTo(dst: Output) {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
ByteArrayPool.useInstance { buffer ->
|
||||
var size: Int
|
||||
while (this.readAvailable(buffer).also { size = it } > 0) {
|
||||
@ -75,10 +73,9 @@ suspend fun ByteReadChannel.copyTo(dst: kotlinx.coroutines.io.ByteWriteChannel)
|
||||
/**
|
||||
* 从接收者管道读取所有数据并写入 [dst], 最终关闭 [dst]
|
||||
*/
|
||||
@InternalSerializationApi
|
||||
suspend fun ByteReadChannel.copyAndClose(dst: OutputStream) {
|
||||
try {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
ByteArrayPool.useInstance { buffer ->
|
||||
var size: Int
|
||||
while (this.readAvailable(buffer).also { size = it } > 0) {
|
||||
@ -95,7 +92,7 @@ suspend fun ByteReadChannel.copyAndClose(dst: OutputStream) {
|
||||
*/
|
||||
suspend fun ByteReadChannel.copyAndClose(dst: Output) {
|
||||
try {
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
ByteArrayPool.useInstance { buffer ->
|
||||
var size: Int
|
||||
while (this.readAvailable(buffer).also { size = it } > 0) {
|
||||
|
@ -30,7 +30,7 @@ import kotlin.jvm.JvmSynthetic
|
||||
|
||||
@JvmOverloads
|
||||
@Suppress("DuplicatedCode") // false positive. foreach is not common to UByteArray and ByteArray
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
fun List<Byte>.toUHexString(separator: String = " ", offset: Int = 0, length: Int = this.size - offset): String {
|
||||
require(offset >= 0) { "offset shouldn't be negative: $offset" }
|
||||
require(length >= 0) { "length shouldn't be negative: $length" }
|
||||
@ -54,7 +54,7 @@ fun List<Byte>.toUHexString(separator: String = " ", offset: Int = 0, length: In
|
||||
|
||||
@JvmOverloads
|
||||
@Suppress("DuplicatedCode") // false positive. foreach is not common to UByteArray and ByteArray
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class)
|
||||
fun ByteArray.toUHexString(separator: String = " ", offset: Int = 0, length: Int = this.size - offset): String {
|
||||
this.checkOffsetAndLength(offset, length)
|
||||
if (length == 0) {
|
||||
@ -99,7 +99,7 @@ inline fun ByteArray.encodeToString(charset: Charset = Charsets.UTF_8): String =
|
||||
inline fun ByteArray.toReadPacket(offset: Int = 0, length: Int = this.size - offset) =
|
||||
ByteReadPacket(this, offset = offset, length = length)
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <R> ByteArray.read(t: ByteReadPacket.() -> R): R {
|
||||
contract {
|
||||
callsInPlace(t, InvocationKind.EXACTLY_ONCE)
|
||||
|
@ -19,7 +19,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.flow
|
||||
import kotlinx.coroutines.flow.flowOf
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
import kotlinx.io.InputStream
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ class ChunkedInput(
|
||||
*
|
||||
* 若 [ByteReadPacket.remaining] 小于 [sizePerPacket], 将会返回唯一元素 [this] 的 [Sequence]
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun ByteReadPacket.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
ByteArrayPool.checkBufferSize(sizePerPacket)
|
||||
if (this.remaining <= sizePerPacket.toLong()) {
|
||||
@ -76,7 +76,7 @@ fun ByteReadPacket.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
* 对于一个 1000 长度的 [ByteReadChannel] 和参数 [sizePerPacket] = 300, 将会产生含四个元素的 [Sequence],
|
||||
* 其长度分别为: 300, 300, 300, 100.
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun ByteReadChannel.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
ByteArrayPool.checkBufferSize(sizePerPacket)
|
||||
if (this.isClosedForRead) {
|
||||
@ -100,7 +100,7 @@ fun ByteReadChannel.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
* 对于一个 1000 长度的 [Input] 和参数 [sizePerPacket] = 300, 将会产生含四个元素的 [Sequence],
|
||||
* 其长度分别为: 300, 300, 300, 100.
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class, ExperimentalCoroutinesApi::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, ExperimentalCoroutinesApi::class)
|
||||
internal fun Input.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
ByteArrayPool.checkBufferSize(sizePerPacket)
|
||||
|
||||
@ -127,7 +127,7 @@ internal fun Input.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
*
|
||||
* 若 [ByteReadPacket.remaining] 小于 [sizePerPacket], 将会返回唯一元素 [this] 的 [Sequence]
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class, ExperimentalCoroutinesApi::class, InternalSerializationApi::class)
|
||||
@UseExperimental(MiraiInternalAPI::class, ExperimentalCoroutinesApi::class)
|
||||
internal fun InputStream.chunkedFlow(sizePerPacket: Int): Flow<ChunkedInput> {
|
||||
ByteArrayPool.checkBufferSize(sizePerPacket)
|
||||
|
||||
|
@ -18,7 +18,6 @@ import io.ktor.utils.io.charsets.Charsets
|
||||
import io.ktor.utils.io.core.*
|
||||
import io.ktor.utils.io.pool.useInstance
|
||||
import kotlinx.io.OutputStream
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
import net.mamoe.mirai.utils.MiraiDebugAPI
|
||||
import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
@ -28,8 +27,7 @@ import kotlin.jvm.JvmMultifileClass
|
||||
import kotlin.jvm.JvmName
|
||||
import kotlin.jvm.JvmSynthetic
|
||||
|
||||
@InternalSerializationApi
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
fun ByteReadPacket.copyTo(outputStream: OutputStream) {
|
||||
ByteArrayPool.useInstance {
|
||||
while (this.isNotEmpty) {
|
||||
@ -52,7 +50,7 @@ inline fun ByteReadPacket.readPacketExact(
|
||||
n: Int = remaining.toInt()//not that safe but adequate
|
||||
): ByteReadPacket = this.readBytes(n).toReadPacket()
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
@UseExperimental(ExperimentalContracts::class)
|
||||
inline fun <C : Closeable, R> C.withUse(block: C.() -> R): R {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
|
@ -68,6 +68,6 @@ fun BytePacketBuilder.writeHex(uHex: String) {
|
||||
/**
|
||||
* 会使用 [ByteArrayPool] 缓存
|
||||
*/
|
||||
@OptIn(MiraiInternalAPI::class)
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
inline fun BytePacketBuilder.encryptAndWrite(key: ByteArray, encoder: BytePacketBuilder.() -> Unit) =
|
||||
TEA.encrypt(BytePacketBuilder().apply(encoder).build(), key) { decrypted -> writeFully(decrypted) }
|
@ -35,7 +35,7 @@ internal class CombinedMessageTest {
|
||||
|
||||
private val toAdd = "1".toMessage()
|
||||
|
||||
@OptIn(ExperimentalTime::class)
|
||||
@UseExperimental(ExperimentalTime::class)
|
||||
@Test
|
||||
fun speedTest() = repeat(100) {
|
||||
var count = 1L
|
||||
@ -86,7 +86,7 @@ internal class CombinedMessageTest {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalTime::class)
|
||||
@UseExperimental(ExperimentalTime::class)
|
||||
@Test
|
||||
fun testFastIteration() {
|
||||
println("start!")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user