Commit 592d328e authored by Him188's avatar Him188

Make internal

parent e6be82fa
...@@ -25,8 +25,9 @@ internal data class RequestPushNotify( ...@@ -25,8 +25,9 @@ internal data class RequestPushNotify(
@SerialId(13) val svrip: Int? @SerialId(13) val svrip: Int?
) : JceStruct, Packet ) : JceStruct, Packet
@Suppress("ArrayInDataClass")
@Serializable @Serializable
internal class MsgInfo( internal data class MsgInfo(
@SerialId(0) val lFromUin: Long = 0L, @SerialId(0) val lFromUin: Long = 0L,
@SerialId(1) val uMsgTime: Long = 0L, @SerialId(1) val uMsgTime: Long = 0L,
@SerialId(2) val shMsgType: Short, @SerialId(2) val shMsgType: Short,
...@@ -51,7 +52,7 @@ internal class MsgInfo( ...@@ -51,7 +52,7 @@ internal class MsgInfo(
@Serializable @Serializable
class ShareData( internal class ShareData(
@SerialId(0) val pkgname: String = "", @SerialId(0) val pkgname: String = "",
@SerialId(1) val msgtail: String = "", @SerialId(1) val msgtail: String = "",
@SerialId(2) val picurl: String = "", @SerialId(2) val picurl: String = "",
...@@ -59,13 +60,13 @@ class ShareData( ...@@ -59,13 +60,13 @@ class ShareData(
) : JceStruct ) : JceStruct
@Serializable @Serializable
class TempMsgHead( internal class TempMsgHead(
@SerialId(0) val c2c_type: Int? = 0, @SerialId(0) val c2c_type: Int? = 0,
@SerialId(1) val serviceType: Int? = 0 @SerialId(1) val serviceType: Int? = 0
) : JceStruct ) : JceStruct
@Serializable @Serializable
class CPicInfo( internal class CPicInfo(
@SerialId(0) val vPath: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(0) val vPath: ByteArray = EMPTY_BYTE_ARRAY,
@SerialId(1) val vHost: ByteArray? = EMPTY_BYTE_ARRAY @SerialId(1) val vHost: ByteArray? = EMPTY_BYTE_ARRAY
) : JceStruct ) : JceStruct
\ No newline at end of file
...@@ -8,7 +8,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY ...@@ -8,7 +8,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
private val EMPTY_MAP = mapOf<String, String>() private val EMPTY_MAP = mapOf<String, String>()
@Serializable @Serializable
class RequestPacket( internal class RequestPacket(
@SerialId(1) val iVersion: Short = 3, @SerialId(1) val iVersion: Short = 3,
@SerialId(2) val cPacketType: Byte = 0, @SerialId(2) val cPacketType: Byte = 0,
@SerialId(3) val iMessageType: Int = 0, @SerialId(3) val iMessageType: Int = 0,
...@@ -22,16 +22,16 @@ class RequestPacket( ...@@ -22,16 +22,16 @@ class RequestPacket(
) : JceStruct ) : JceStruct
@Serializable @Serializable
class RequestDataVersion3( internal class RequestDataVersion3(
@SerialId(0) val map: Map<String, ByteArray> // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的 @SerialId(0) val map: Map<String, ByteArray> // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的
) : JceStruct ) : JceStruct
@Serializable @Serializable
class RequestDataVersion2( internal class RequestDataVersion2(
@SerialId(0) val map: Map<String, Map<String, ByteArray>> @SerialId(0) val map: Map<String, Map<String, ByteArray>>
) : JceStruct ) : JceStruct
@Serializable @Serializable
class RequestDataStructSvcReqRegister( internal class RequestDataStructSvcReqRegister(
@SerialId(0) val struct: SvcReqRegister @SerialId(0) val struct: SvcReqRegister
) : JceStruct ) : JceStruct
\ No newline at end of file
package net.mamoe.mirai.qqandroid.network.protocol.data.jce package net.mamoe.mirai.qqandroid.network.protocol.data.jce
import kotlinx.serialization.Polymorphic
import kotlinx.serialization.SerialId import kotlinx.serialization.SerialId
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.io.JceStruct import net.mamoe.mirai.qqandroid.io.JceStruct
@Serializable @Serializable
class SvcReqRegister( internal class SvcReqRegister(
@SerialId(0) val lUin: Long = 0L, @SerialId(0) val lUin: Long = 0L,
@SerialId(1) val lBid: Long = 0L, @SerialId(1) val lBid: Long = 0L,
@SerialId(2) val cConnType: Byte = 0, @SerialId(2) val cConnType: Byte = 0,
......
...@@ -6,9 +6,9 @@ import net.mamoe.mirai.qqandroid.io.ProtoBuf ...@@ -6,9 +6,9 @@ import net.mamoe.mirai.qqandroid.io.ProtoBuf
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
@Serializable @Serializable
class Vec0xd50 : ProtoBuf { internal class Vec0xd50 : ProtoBuf {
@Serializable @Serializable
class ExtSnsFrdData( internal class ExtSnsFrdData(
@SerialId(1) val frdUin: Long = 0L, @SerialId(1) val frdUin: Long = 0L,
@SerialId(91001) val musicSwitch: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(91001) val musicSwitch: ByteArray = EMPTY_BYTE_ARRAY,
@SerialId(101001) val mutualmarkAlienation: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(101001) val mutualmarkAlienation: ByteArray = EMPTY_BYTE_ARRAY,
...@@ -18,7 +18,7 @@ class Vec0xd50 : ProtoBuf { ...@@ -18,7 +18,7 @@ class Vec0xd50 : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class RspBody( internal class RspBody(
@SerialId(1) val msgUpdateData: List<Vec0xd50.ExtSnsFrdData>? = null, @SerialId(1) val msgUpdateData: List<Vec0xd50.ExtSnsFrdData>? = null,
@SerialId(11) val over: Int = 0, @SerialId(11) val over: Int = 0,
@SerialId(12) val nextStart: Int = 0, @SerialId(12) val nextStart: Int = 0,
...@@ -26,7 +26,7 @@ class Vec0xd50 : ProtoBuf { ...@@ -26,7 +26,7 @@ class Vec0xd50 : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class ReqBody( internal class ReqBody(
@SerialId(1) val appid: Long = 0L, @SerialId(1) val appid: Long = 0L,
@SerialId(2) val maxPkgSize: Int = 0, @SerialId(2) val maxPkgSize: Int = 0,
@SerialId(3) val startTime: Int = 0, @SerialId(3) val startTime: Int = 0,
...@@ -41,28 +41,28 @@ class Vec0xd50 : ProtoBuf { ...@@ -41,28 +41,28 @@ class Vec0xd50 : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class KSingRelationInfo( internal class KSingRelationInfo(
@SerialId(1) val flag: Int = 0 @SerialId(1) val flag: Int = 0
) : ProtoBuf ) : ProtoBuf
} }
@Serializable @Serializable
class Vec0xd6b : ProtoBuf { internal class Vec0xd6b : ProtoBuf {
@Serializable @Serializable
class ReqBody( internal class ReqBody(
@SerialId(1) val maxPkgSize: Int = 0, @SerialId(1) val maxPkgSize: Int = 0,
@SerialId(2) val startTime: Int = 0, @SerialId(2) val startTime: Int = 0,
@SerialId(11) val uinList: List<Long>? = null @SerialId(11) val uinList: List<Long>? = null
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class RspBody( internal class RspBody(
@SerialId(11) val msgMutualmarkData: List<Vec0xd6b.MutualMarkData>? = null, @SerialId(11) val msgMutualmarkData: List<Vec0xd6b.MutualMarkData>? = null,
@SerialId(12) val uint64UnfinishedUins: List<Long>? = null @SerialId(12) val uint64UnfinishedUins: List<Long>? = null
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class MutualMarkData( internal class MutualMarkData(
@SerialId(1) val frdUin: Long = 0L, @SerialId(1) val frdUin: Long = 0L,
@SerialId(2) val result: Int = 0 @SerialId(2) val result: Int = 0
// @SerialId(11) val mutualmarkInfo: List<Mutualmark.MutualMark>? = null // @SerialId(11) val mutualmarkInfo: List<Mutualmark.MutualMark>? = null
...@@ -70,9 +70,9 @@ class Vec0xd6b : ProtoBuf { ...@@ -70,9 +70,9 @@ class Vec0xd6b : ProtoBuf {
} }
@Serializable @Serializable
class Mutualmark : ProtoBuf { internal class Mutualmark : ProtoBuf {
@Serializable @Serializable
class MutualmarkInfo( internal class MutualmarkInfo(
@SerialId(1) val lastActionTime: Long = 0L, @SerialId(1) val lastActionTime: Long = 0L,
@SerialId(2) val level: Int = 0, @SerialId(2) val level: Int = 0,
@SerialId(3) val lastChangeTime: Long = 0L, @SerialId(3) val lastChangeTime: Long = 0L,
...@@ -86,7 +86,7 @@ class Mutualmark : ProtoBuf { ...@@ -86,7 +86,7 @@ class Mutualmark : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class ResourceInfo17( internal class ResourceInfo17(
@SerialId(1) val dynamicUrl: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(1) val dynamicUrl: ByteArray = EMPTY_BYTE_ARRAY,
@SerialId(2) val staticUrl: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(2) val staticUrl: ByteArray = EMPTY_BYTE_ARRAY,
@SerialId(3) val cartoonUrl: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(3) val cartoonUrl: ByteArray = EMPTY_BYTE_ARRAY,
......
...@@ -2,8 +2,8 @@ package net.mamoe.mirai.qqandroid.network.protocol.data.proto ...@@ -2,8 +2,8 @@ package net.mamoe.mirai.qqandroid.network.protocol.data.proto
import kotlinx.serialization.SerialId import kotlinx.serialization.SerialId
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.io.ProtoBuf import net.mamoe.mirai.qqandroid.io.ProtoBuf
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.utils.currentTimeSeconds import net.mamoe.mirai.utils.currentTimeSeconds
interface ImgReq : ProtoBuf interface ImgReq : ProtoBuf
......
...@@ -9,16 +9,16 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY ...@@ -9,16 +9,16 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
* msf.msgcomm.msg_comm * msf.msgcomm.msg_comm
*/ */
@Serializable @Serializable
class MsgComm : ProtoBuf { internal class MsgComm : ProtoBuf {
@Serializable @Serializable
class AppShareInfo( internal class AppShareInfo(
@SerialId(1) val appshareId: Int = 0, @SerialId(1) val appshareId: Int = 0,
@SerialId(2) val appshareCookie: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(2) val appshareCookie: ByteArray = EMPTY_BYTE_ARRAY,
@SerialId(3) val appshareResource: PluginInfo? = null @SerialId(3) val appshareResource: PluginInfo? = null
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class C2CTmpMsgHead( internal class C2CTmpMsgHead(
@SerialId(1) val c2cType: Int = 0, @SerialId(1) val c2cType: Int = 0,
@SerialId(2) val serviceType: Int = 0, @SerialId(2) val serviceType: Int = 0,
@SerialId(3) val groupUin: Long = 0L, @SerialId(3) val groupUin: Long = 0L,
...@@ -33,7 +33,7 @@ class MsgComm : ProtoBuf { ...@@ -33,7 +33,7 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class ContentHead( internal class ContentHead(
@SerialId(1) val pkgNum: Int = 0, @SerialId(1) val pkgNum: Int = 0,
@SerialId(2) val pkgIndex: Int = 0, @SerialId(2) val pkgIndex: Int = 0,
@SerialId(3) val divSeq: Int = 0, @SerialId(3) val divSeq: Int = 0,
...@@ -41,7 +41,7 @@ class MsgComm : ProtoBuf { ...@@ -41,7 +41,7 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class DiscussInfo( internal class DiscussInfo(
@SerialId(1) val discussUin: Long = 0L, @SerialId(1) val discussUin: Long = 0L,
@SerialId(2) val discussType: Int = 0, @SerialId(2) val discussType: Int = 0,
@SerialId(3) val discussInfoSeq: Long = 0L, @SerialId(3) val discussInfoSeq: Long = 0L,
...@@ -50,13 +50,13 @@ class MsgComm : ProtoBuf { ...@@ -50,13 +50,13 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class ExtGroupKeyInfo( internal class ExtGroupKeyInfo(
@SerialId(1) val curMaxSeq: Int = 0, @SerialId(1) val curMaxSeq: Int = 0,
@SerialId(2) val curTime: Long = 0L @SerialId(2) val curTime: Long = 0L
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class GroupInfo( internal class GroupInfo(
@SerialId(1) val groupCode: Long = 0L, @SerialId(1) val groupCode: Long = 0L,
@SerialId(2) val groupType: Int = 0, @SerialId(2) val groupType: Int = 0,
@SerialId(3) val groupInfoSeq: Long = 0L, @SerialId(3) val groupInfoSeq: Long = 0L,
...@@ -68,7 +68,7 @@ class MsgComm : ProtoBuf { ...@@ -68,7 +68,7 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class Msg( internal class Msg(
@SerialId(1) val msgHead: MsgHead, @SerialId(1) val msgHead: MsgHead,
@SerialId(2) val contentHead: ContentHead? = null, @SerialId(2) val contentHead: ContentHead? = null,
@SerialId(3) val msgBody: ImMsgBody.MsgBody, @SerialId(3) val msgBody: ImMsgBody.MsgBody,
...@@ -76,7 +76,7 @@ class MsgComm : ProtoBuf { ...@@ -76,7 +76,7 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class MsgHead( internal class MsgHead(
@SerialId(1) val fromUin: Long = 0L, @SerialId(1) val fromUin: Long = 0L,
@SerialId(2) val toUin: Long = 0L, @SerialId(2) val toUin: Long = 0L,
@SerialId(3) val msgType: Int = 0, @SerialId(3) val msgType: Int = 0,
...@@ -108,19 +108,19 @@ class MsgComm : ProtoBuf { ...@@ -108,19 +108,19 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class MsgType0x210( internal class MsgType0x210(
@SerialId(1) val subMsgType: Int = 0, @SerialId(1) val subMsgType: Int = 0,
@SerialId(2) val msgContent: ByteArray = EMPTY_BYTE_ARRAY @SerialId(2) val msgContent: ByteArray = EMPTY_BYTE_ARRAY
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class MutilTransHead( internal class MutilTransHead(
@SerialId(1) val status: Int = 0, @SerialId(1) val status: Int = 0,
@SerialId(2) val msgId: Int = 0 @SerialId(2) val msgId: Int = 0
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class PluginInfo( internal class PluginInfo(
@SerialId(1) val resId: Int = 0, @SerialId(1) val resId: Int = 0,
@SerialId(2) val pkgName: String = "", @SerialId(2) val pkgName: String = "",
@SerialId(3) val newVer: Int = 0, @SerialId(3) val newVer: Int = 0,
...@@ -135,13 +135,13 @@ class MsgComm : ProtoBuf { ...@@ -135,13 +135,13 @@ class MsgComm : ProtoBuf {
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class Uin2Nick( internal class Uin2Nick(
@SerialId(1) val uin: Long = 0L, @SerialId(1) val uin: Long = 0L,
@SerialId(2) val nick: String = "" @SerialId(2) val nick: String = ""
) : ProtoBuf ) : ProtoBuf
@Serializable @Serializable
class UinPairMsg( internal class UinPairMsg(
@SerialId(1) val lastReadTime: Int = 0, @SerialId(1) val lastReadTime: Int = 0,
@SerialId(2) val peerUin: Long = 0L, @SerialId(2) val peerUin: Long = 0L,
@SerialId(3) val msgCompleted: Int = 0, @SerialId(3) val msgCompleted: Int = 0,
......
...@@ -6,9 +6,9 @@ import net.mamoe.mirai.qqandroid.io.ProtoBuf ...@@ -6,9 +6,9 @@ import net.mamoe.mirai.qqandroid.io.ProtoBuf
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
@Serializable @Serializable
class MsgOnlinePush { internal class MsgOnlinePush {
@Serializable @Serializable
class PbPushMsg( internal class PbPushMsg(
@SerialId(1) val msg: MsgComm.Msg, @SerialId(1) val msg: MsgComm.Msg,
@SerialId(2) val svrip: Int = 0, @SerialId(2) val svrip: Int = 0,
@SerialId(3) val pushToken: ByteArray = EMPTY_BYTE_ARRAY, @SerialId(3) val pushToken: ByteArray = EMPTY_BYTE_ARRAY,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment