mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-18 10:22:26 +08:00
Fix package
This commit is contained in:
parent
9eaccfca2a
commit
ade169253b
@ -31,6 +31,7 @@ import net.mamoe.mirai.internal.network.protocol.packet.chat.*
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.voice.PttStore
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.message.MessageReceipt
|
||||
import net.mamoe.mirai.message.action.Nudge
|
||||
import net.mamoe.mirai.message.data.*
|
||||
@ -39,7 +40,6 @@ import net.mamoe.mirai.message.data.Image.Key.FRIEND_IMAGE_ID_REGEX_2
|
||||
import net.mamoe.mirai.message.data.Image.Key.GROUP_IMAGE_ID_REGEX
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.ExternalResource.Companion.toExternalResource
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import kotlin.math.absoluteValue
|
||||
import kotlin.random.Random
|
||||
|
@ -13,11 +13,11 @@ package net.mamoe.mirai.internal.message
|
||||
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.HummerCommelem
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.ImMsgBody
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.message.data.FlashImage
|
||||
import net.mamoe.mirai.message.data.isFriendImage
|
||||
import net.mamoe.mirai.message.data.isGroupImage
|
||||
import net.mamoe.mirai.message.data.md5
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
|
||||
|
||||
internal fun FlashImage.toJceData(): ImMsgBody.Elem {
|
||||
|
@ -24,10 +24,10 @@ import net.mamoe.mirai.contact.Group
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.*
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.ImMsgBody
|
||||
import net.mamoe.mirai.internal.utils.*
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.InvocationKind
|
||||
import kotlin.contracts.contract
|
||||
|
@ -14,12 +14,12 @@ import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.Transient
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.HummerCommelem
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.ImMsgBody
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.message.code.internal.appendAsMiraiCode
|
||||
import net.mamoe.mirai.message.data.Face
|
||||
import net.mamoe.mirai.message.data.MarketFace
|
||||
import net.mamoe.mirai.utils.MiraiExperimentalApi
|
||||
import net.mamoe.mirai.utils.hexToBytes
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import net.mamoe.mirai.utils.toByteArray
|
||||
|
||||
internal val FACE_BUF = "00 01 00 04 52 CC F5 D0".hexToBytes()
|
||||
|
@ -21,6 +21,7 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.SourceMsg
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.message.data.Message
|
||||
import net.mamoe.mirai.message.data.MessageChain
|
||||
import net.mamoe.mirai.message.data.MessageSource
|
||||
@ -28,7 +29,6 @@ import net.mamoe.mirai.message.data.OnlineMessageSource
|
||||
import net.mamoe.mirai.utils.encodeToBase64
|
||||
import net.mamoe.mirai.utils.encodeToString
|
||||
import net.mamoe.mirai.utils.mapToIntArray
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
internal interface MessageSourceInternal {
|
||||
|
@ -15,11 +15,11 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.ImMsgBody
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.SourceMsg
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.message.data.MessageChain
|
||||
import net.mamoe.mirai.message.data.MessageSourceKind
|
||||
import net.mamoe.mirai.message.data.OfflineMessageSource
|
||||
import net.mamoe.mirai.utils.mapToIntArray
|
||||
import net.mamoe.mirai.utils.serialization.loadAs
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
|
||||
|
@ -26,10 +26,10 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.SourceMsg
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.receive.OnlinePushPbPushGroupMsg.SendGroupMessageReceipt
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.toLongUnsigned
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.message.data.MessageChain
|
||||
import net.mamoe.mirai.message.data.MessageSource
|
||||
import net.mamoe.mirai.message.data.OnlineMessageSource
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
|
||||
|
@ -27,10 +27,10 @@ import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.internal.utils.PlatformSocket
|
||||
import net.mamoe.mirai.internal.utils.SocketException
|
||||
import net.mamoe.mirai.internal.utils.addSuppressedMirai
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.internal.utils.toIpV4AddressString
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import java.io.InputStream
|
||||
import kotlin.math.roundToInt
|
||||
import kotlin.time.ExperimentalTime
|
||||
|
@ -11,8 +11,8 @@ package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.internal.network.Packet
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class BigDataChannel(
|
||||
|
@ -9,8 +9,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class DeviceItemDes(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class ModifyGroupCardReq(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class GroupMngReqJce(
|
||||
|
@ -11,8 +11,8 @@ package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.contact.ClientKind
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal data class InstanceInfo(
|
||||
|
@ -11,8 +11,8 @@ package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class AddGroup(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
internal class OnlinePushPack {
|
||||
@Serializable
|
||||
|
@ -12,8 +12,8 @@ package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.internal.network.Packet
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Suppress("ArrayInDataClass")
|
||||
@Serializable
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class RequestMSFForceOffline(
|
||||
|
@ -11,8 +11,8 @@ package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
private val EMPTY_MAP = mapOf<String, String>()
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class RequestPushForceOffline(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal data class SvcDevLoginInfo(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
// ANDROID PHONE QQ
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class SvcReqRegister(
|
||||
|
@ -12,8 +12,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class SvcRequestPushReadedNotify(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
|
||||
@Serializable
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class SvcRspGetDevLoginInfo(
|
||||
|
@ -10,8 +10,8 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@Serializable
|
||||
internal class GetTroopListReqV2Simplify(
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Cmd0x352 : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Cmd0x388 : ProtoBuf {
|
||||
|
@ -16,7 +16,7 @@ import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class GroupOpenSysMsg : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -16,7 +16,7 @@ import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Oidb0x858 : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class Common : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -14,7 +14,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Vec0xd50 : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class GroupLabel : ProtoBuf {
|
||||
|
@ -14,7 +14,7 @@ import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class BdhExtinfo : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class HummerCommelem : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -13,7 +13,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MarketFaceExtPb : ProtoBuf {
|
||||
|
@ -14,7 +14,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class HummerResv21 : ProtoBuf {
|
||||
|
@ -11,7 +11,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.utils.currentTimeSeconds
|
||||
|
||||
internal interface ImgReq : ProtoBuf
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class LongMsg : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -14,8 +14,8 @@ import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
|
||||
@Serializable
|
||||
internal class ImCommon : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
/**
|
||||
* msf.msgcomm.msg_comm
|
||||
|
@ -11,7 +11,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class MsgRevokeUserDef : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -13,7 +13,7 @@ import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.Packet
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MsgSvc : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class MsgTransmit : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MultiMsg : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Oidb0x8a0 : ProtoBuf {
|
||||
|
@ -14,7 +14,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class Oidb0x769 : ProtoBuf {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class MsgOnlinePush {
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class Generalflags : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -11,7 +11,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class StatSvcGetOnline {
|
||||
@Serializable
|
||||
|
@ -12,7 +12,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
internal class QPayReminderMsg : ProtoBuf {
|
||||
@Serializable
|
||||
|
@ -11,7 +11,7 @@ package net.mamoe.mirai.internal.network.protocol.data.proto
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import kotlin.math.absoluteValue
|
||||
import kotlin.random.Random
|
||||
|
||||
|
@ -16,7 +16,7 @@ import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
@Serializable
|
||||
internal class SubMsgType0x43 : ProtoBuf {
|
||||
|
@ -16,7 +16,7 @@ import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoNumber
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
|
||||
|
||||
@Serializable
|
||||
|
@ -27,13 +27,13 @@ import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.PacketLogger
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.message.data.ForwardMessage
|
||||
import net.mamoe.mirai.message.data.asMessageChain
|
||||
import net.mamoe.mirai.utils.gzip
|
||||
import net.mamoe.mirai.utils.md5
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
|
||||
internal class MessageValidationData(
|
||||
val data: ByteArray,
|
||||
|
@ -25,8 +25,8 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.Structmsg
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.utils.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
|
||||
internal class NewContact {
|
||||
|
||||
|
@ -19,9 +19,9 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.OidbSso
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
|
||||
internal object NudgePacket : OutgoingPacketFactory<NudgePacket.Response>("OidbSvc.0xed3") {
|
||||
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
|
||||
|
@ -20,10 +20,10 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.MsgSvc
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.utils.hexToBytes
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
|
||||
internal class PbMessageSvc {
|
||||
object PbMsgWithDraw : OutgoingPacketFactory<PbMsgWithDraw.Response>(
|
||||
|
@ -26,8 +26,8 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.*
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.*
|
||||
import net.mamoe.mirai.utils.daysToSeconds
|
||||
import net.mamoe.mirai.utils.serialization.*
|
||||
import net.mamoe.mirai.data.GroupInfo as MiraiGroupInfo
|
||||
|
||||
@OptIn(LowLevelApi::class)
|
||||
|
@ -18,8 +18,8 @@ import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.toLongUnsigned
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import kotlin.random.Random
|
||||
import kotlin.random.nextInt
|
||||
|
||||
|
@ -18,8 +18,8 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.GetImgUrlReq
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
|
||||
internal class LongConn {
|
||||
|
||||
|
@ -19,7 +19,7 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.MsgSvc
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
|
||||
internal object MessageSvcPbDeleteMsg : OutgoingPacketFactory<Nothing?>("MessageSvc.PbDeleteMsg") {
|
||||
|
||||
|
@ -46,12 +46,12 @@ import net.mamoe.mirai.internal.network.protocol.packet.chat.NewContact
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.toLongUnsigned
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.internal.utils.*
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.message.data.PlainText
|
||||
import net.mamoe.mirai.message.data.buildMessageChain
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import kotlin.random.Random
|
||||
|
||||
|
||||
|
@ -32,10 +32,10 @@ import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.message.data.*
|
||||
import net.mamoe.mirai.utils.currentTimeSeconds
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import kotlin.contracts.InvocationKind
|
||||
import kotlin.contracts.contract
|
||||
|
@ -14,7 +14,7 @@ import net.mamoe.mirai.event.events.BotOfflineEvent
|
||||
import net.mamoe.mirai.internal.QQAndroidBot
|
||||
import net.mamoe.mirai.internal.network.protocol.data.jce.RequestPushForceOffline
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.utils.serialization.readUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readUniPacket
|
||||
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ import net.mamoe.mirai.internal.network.protocol.data.jce.RequestPushNotify
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.MsgSvc
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.IncomingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.utils.serialization.readUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readUniPacket
|
||||
|
||||
|
||||
/**
|
||||
|
@ -33,9 +33,9 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.MsgOnlinePush
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.Oidb0x8fc
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.IncomingPacketFactory
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.loadAs
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
|
||||
/**
|
||||
* 接受群消息
|
||||
|
@ -36,8 +36,8 @@ import net.mamoe.mirai.internal.network.protocol.packet.IncomingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildResponseUniPacket
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
|
||||
|
||||
internal object OnlinePushPbPushTransMsg :
|
||||
|
@ -45,8 +45,9 @@ import net.mamoe.mirai.internal.network.protocol.packet.IncomingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildResponseUniPacket
|
||||
import net.mamoe.mirai.internal.utils.*
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.*
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.*
|
||||
|
||||
|
||||
//0C 01 B1 89 BE 09 5E 3D 72 A6 00 01 73 68 FC 06 00 00 00 3C
|
||||
|
@ -18,9 +18,9 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.Cmd0x388
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.utils.encodeToString
|
||||
import net.mamoe.mirai.utils.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.utils.serialization.writeProtoBuf
|
||||
|
||||
internal class PttStore {
|
||||
object GroupPttUp : OutgoingPacketFactory<GroupPttUp.Response>("PttStore.GroupPttUp") {
|
||||
|
@ -19,10 +19,10 @@ import net.mamoe.mirai.internal.network.protocol.packet.EMPTY_BYTE_ARRAY
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.jceRequestSBuffer
|
||||
import net.mamoe.mirai.utils.serialization.readUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.toByteArray
|
||||
import net.mamoe.mirai.utils.serialization.writeJceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.jceRequestSBuffer
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.toByteArray
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeJceStruct
|
||||
|
||||
|
||||
internal class FriendList {
|
||||
|
@ -19,9 +19,9 @@ import net.mamoe.mirai.internal.network.protocol.data.jce.RequestPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.jceRequestSBuffer
|
||||
import net.mamoe.mirai.utils.serialization.readUniPacket
|
||||
import net.mamoe.mirai.utils.serialization.writeJceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.jceRequestSBuffer
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeJceStruct
|
||||
import net.mamoe.mirai.utils.toByteArray
|
||||
|
||||
internal class ProfileService {
|
||||
|
@ -22,8 +22,13 @@ import net.mamoe.mirai.internal.network.protocol.data.jce.RequestPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.IncomingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildResponseUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.jceRequestSBuffer
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeJceStruct
|
||||
import net.mamoe.mirai.utils.*
|
||||
import net.mamoe.mirai.utils.serialization.*
|
||||
import net.mamoe.mirai.internal.network.protocol.data.jce.PushReq as PushReqJceStruct
|
||||
|
||||
|
||||
|
@ -33,10 +33,10 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.StatSvcGetOnline
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.*
|
||||
import net.mamoe.mirai.internal.utils.NetworkType
|
||||
import net.mamoe.mirai.internal.utils._miraiContentToString
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.*
|
||||
import net.mamoe.mirai.utils.currentTimeMillis
|
||||
import net.mamoe.mirai.utils.encodeToString
|
||||
import net.mamoe.mirai.utils.localIpAddress
|
||||
import net.mamoe.mirai.utils.serialization.*
|
||||
import net.mamoe.mirai.utils.toReadPacket
|
||||
|
||||
@Suppress("EnumEntryName", "unused")
|
||||
|
@ -7,6 +7,6 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils
|
||||
package net.mamoe.mirai.internal.utils.io
|
||||
|
||||
internal interface JceStruct
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils
|
||||
package net.mamoe.mirai.internal.utils.io
|
||||
|
||||
/**
|
||||
* 仅有标示作用
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
@file:Suppress("DEPRECATION_ERROR")
|
||||
|
||||
package net.mamoe.mirai.utils.serialization
|
||||
package net.mamoe.mirai.internal.utils.io.serialization
|
||||
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.builtins.ByteArraySerializer
|
||||
@ -26,8 +26,8 @@ import kotlinx.serialization.modules.SerializersModule
|
||||
import kotlinx.serialization.protobuf.ProtoBuf
|
||||
import kotlinx.serialization.protobuf.ProtoIntegerType
|
||||
import kotlinx.serialization.protobuf.ProtoType
|
||||
import net.mamoe.mirai.utils.serialization.ProtoBufWithNullableSupport.Varint.encodeVarint
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.ProtoBufWithNullableSupport.Varint.encodeVarint
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
@file:Suppress("MemberVisibilityCanBePrivate", "unused")
|
||||
|
||||
package net.mamoe.mirai.utils.serialization.tars
|
||||
package net.mamoe.mirai.internal.utils.io.serialization.tars
|
||||
|
||||
import kotlinx.io.charsets.Charset
|
||||
import kotlinx.io.charsets.Charsets
|
||||
@ -17,9 +17,9 @@ import kotlinx.io.core.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.modules.EmptySerializersModule
|
||||
import kotlinx.serialization.modules.SerializersModule
|
||||
import net.mamoe.mirai.utils.serialization.tars.internal.TarsDecoder
|
||||
import net.mamoe.mirai.utils.serialization.tars.internal.TarsInput
|
||||
import net.mamoe.mirai.utils.serialization.tars.internal.TarsOld
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.internal.TarsDecoder
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.internal.TarsInput
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.internal.TarsOld
|
||||
|
||||
/**
|
||||
* The main entry point to work with Tars serialization.
|
||||
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.serialization.tars
|
||||
package net.mamoe.mirai.internal.utils.io.serialization.tars
|
||||
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
import kotlinx.serialization.SerialInfo
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
@file:Suppress("PrivatePropertyName")
|
||||
|
||||
package net.mamoe.mirai.utils.serialization.tars.internal
|
||||
package net.mamoe.mirai.internal.utils.io.serialization.tars.internal
|
||||
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
import kotlinx.serialization.InternalSerializationApi
|
||||
@ -18,8 +18,9 @@ import kotlinx.serialization.encoding.AbstractDecoder
|
||||
import kotlinx.serialization.encoding.CompositeDecoder
|
||||
import kotlinx.serialization.internal.TaggedDecoder
|
||||
import kotlinx.serialization.modules.SerializersModule
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.internal.*
|
||||
|
||||
|
||||
@OptIn(InternalSerializationApi::class, ExperimentalSerializationApi::class)
|
||||
|
@ -7,11 +7,11 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.serialization.tars.internal
|
||||
package net.mamoe.mirai.internal.utils.io.serialization.tars.internal
|
||||
|
||||
import kotlinx.io.charsets.Charset
|
||||
import kotlinx.io.core.*
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars
|
||||
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.serialization.tars.internal
|
||||
package net.mamoe.mirai.internal.utils.io.serialization.tars.internal
|
||||
|
||||
import kotlinx.io.charsets.Charset
|
||||
import kotlinx.io.charsets.Charsets
|
||||
@ -24,22 +24,22 @@ import kotlinx.serialization.internal.MapLikeSerializer
|
||||
import kotlinx.serialization.internal.TaggedEncoder
|
||||
import kotlinx.serialization.modules.EmptySerializersModule
|
||||
import kotlinx.serialization.modules.SerializersModule
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.BYTE
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.DOUBLE
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.FLOAT
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.INT
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.LIST
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.LONG
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.MAP
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.SHORT
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.SIMPLE_LIST
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.STRING1
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.STRING4
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.STRUCT_BEGIN
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.STRUCT_END
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.Tars_MAX_STRING_LENGTH
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars.Companion.ZERO_TYPE
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.BYTE
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.DOUBLE
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.FLOAT
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.INT
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.LIST
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.LONG
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.MAP
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.SHORT
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.SIMPLE_LIST
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.STRING1
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.STRING4
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.STRUCT_BEGIN
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.STRUCT_END
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.Tars_MAX_STRING_LENGTH
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars.Companion.ZERO_TYPE
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId
|
||||
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
internal inline fun <reified A : Annotation> SerialDescriptor.findAnnotation(elementIndex: Int): A? {
|
||||
|
@ -7,12 +7,12 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.serialization.tars.internal
|
||||
package net.mamoe.mirai.internal.utils.io.serialization.tars.internal
|
||||
|
||||
import kotlinx.io.core.Output
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars
|
||||
|
||||
|
||||
internal abstract class TarsTag {
|
||||
|
@ -10,7 +10,7 @@
|
||||
@file:JvmName("SerializationUtils")
|
||||
@file:JvmMultifileClass
|
||||
|
||||
package net.mamoe.mirai.utils.serialization
|
||||
package net.mamoe.mirai.internal.utils.io.serialization
|
||||
|
||||
import kotlinx.io.core.*
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
@ -19,11 +19,11 @@ import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import net.mamoe.mirai.internal.network.protocol.data.jce.RequestDataVersion2
|
||||
import net.mamoe.mirai.internal.network.protocol.data.jce.RequestDataVersion3
|
||||
import net.mamoe.mirai.internal.network.protocol.data.jce.RequestPacket
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.JceStruct
|
||||
import net.mamoe.mirai.internal.utils.io.ProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.tars.Tars
|
||||
import net.mamoe.mirai.utils.read
|
||||
import net.mamoe.mirai.utils.readPacketExact
|
||||
import net.mamoe.mirai.utils.serialization.tars.Tars
|
||||
|
||||
internal fun <T : JceStruct> ByteArray.loadWithUniPacket(
|
||||
deserializer: DeserializationStrategy<T>,
|
||||
|
Loading…
Reference in New Issue
Block a user