Commit 6d57f44e authored by Him188's avatar Him188

Optimize useless getters, fix #236

parent d0c7b457
......@@ -3,40 +3,41 @@ package net.mamoe.mirai.qqandroid.network.protocol.data.jce
import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.utils.io.JceStruct
import net.mamoe.mirai.qqandroid.utils.io.serialization.jce.JceId
import kotlin.jvm.JvmField
@Serializable
internal class GroupMngReqJce(
@JceId(0) val reqtype: Int,
@JceId(1) val uin: Long,
@JceId(2) val vecBody: ByteArray,
@JceId(3) val checkInGroup: Byte? = null,
@JceId(4) val sGroupLocation: String? = "",
@JceId(5) val statOption: Byte? = null,
@JceId(6) val wSourceID: Int? = null,
@JceId(7) val wSourceSubID: Int? = null,
@JceId(8) val isSupportAuthQuestionJoin: Byte? = null,
@JceId(9) val ifGetAuthInfo: Byte? = null,
@JceId(10) val dwDiscussUin: Long? = null,
@JceId(11) val sJoinGroupKey: String? = "",
@JceId(12) val sJoinGroupPicUrl: String? = "",
@JceId(13) val vecJoinGroupRichMsg: ByteArray? = null,
@JceId(14) val sJoinGroupAuth: String? = "",
@JceId(15) val sJoinGroupVerifyToken: String? = "",
@JceId(16) val dwJoinVerifyType: Long? = null
@JceId(0) @JvmField val reqtype: Int,
@JceId(1) @JvmField val uin: Long,
@JceId(2) @JvmField val vecBody: ByteArray,
@JceId(3) @JvmField val checkInGroup: Byte? = null,
@JceId(4) @JvmField val sGroupLocation: String? = "",
@JceId(5) @JvmField val statOption: Byte? = null,
@JceId(6) @JvmField val wSourceID: Int? = null,
@JceId(7) @JvmField val wSourceSubID: Int? = null,
@JceId(8) @JvmField val isSupportAuthQuestionJoin: Byte? = null,
@JceId(9) @JvmField val ifGetAuthInfo: Byte? = null,
@JceId(10) @JvmField val dwDiscussUin: Long? = null,
@JceId(11) @JvmField val sJoinGroupKey: String? = "",
@JceId(12) @JvmField val sJoinGroupPicUrl: String? = "",
@JceId(13) @JvmField val vecJoinGroupRichMsg: ByteArray? = null,
@JceId(14) @JvmField val sJoinGroupAuth: String? = "",
@JceId(15) @JvmField val sJoinGroupVerifyToken: String? = "",
@JceId(16) @JvmField val dwJoinVerifyType: Long? = null
) : JceStruct
@Serializable
internal class GroupMngRes(
@JceId(0) val reqtype: Int,
@JceId(1) val result: Byte,
@JceId(2) val vecBody: ByteArray,
@JceId(3) val errorString: String = "",
@JceId(4) val errorCode: Short = 0,
@JceId(5) val isInGroup: Byte? = null,
@JceId(6) val sGroupLocation: String? = "",
@JceId(7) val isMemInvite: Byte? = null,
@JceId(8) val sAuthGrpInfo: String? = "",
@JceId(9) val sJoinQuestion: String? = "",
@JceId(10) val sJoinAnswer: String? = "",
@JceId(11) val dwDis2GrpLimitType: Long? = null
@JceId(0) @JvmField val reqtype: Int,
@JceId(1) @JvmField val result: Byte,
@JceId(2) @JvmField val vecBody: ByteArray,
@JceId(3) @JvmField val errorString: String = "",
@JceId(4) @JvmField val errorCode: Short = 0,
@JceId(5) @JvmField val isInGroup: Byte? = null,
@JceId(6) @JvmField val sGroupLocation: String? = "",
@JceId(7) @JvmField val isMemInvite: Byte? = null,
@JceId(8) @JvmField val sAuthGrpInfo: String? = "",
@JceId(9) @JvmField val sJoinQuestion: String? = "",
@JceId(10) @JvmField val sJoinAnswer: String? = "",
@JceId(11) @JvmField val dwDis2GrpLimitType: Long? = null
) : JceStruct
......@@ -14,67 +14,68 @@ import net.mamoe.mirai.qqandroid.network.Packet
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.utils.io.JceStruct
import net.mamoe.mirai.qqandroid.utils.io.serialization.jce.JceId
import kotlin.jvm.JvmField
@Suppress("ArrayInDataClass")
@Serializable
internal class RequestPushNotify(
@JceId(0) val uin: Long? = 0L,
@JceId(1) val ctype: Byte = 0,
@JceId(2) val strService: String?,
@JceId(3) val strCmd: String?,
@JceId(4) val vNotifyCookie: ByteArray? = EMPTY_BYTE_ARRAY,
@JceId(5) val usMsgType: Int?,
@JceId(6) val wUserActive: Int?,
@JceId(7) val wGeneralFlag: Int?,
@JceId(8) val bindedUin: Long?,
@JceId(9) val stMsgInfo: MsgInfo?,
@JceId(10) val msgCtrlBuf: String?,
@JceId(11) val serverBuf: ByteArray?,
@JceId(12) val pingFlag: Long?,
@JceId(13) val svrip: Int?
@JceId(0) @JvmField val uin: Long? = 0L,
@JceId(1) @JvmField val ctype: Byte = 0,
@JceId(2) @JvmField val strService: String?,
@JceId(3) @JvmField val strCmd: String?,
@JceId(4) @JvmField val vNotifyCookie: ByteArray? = EMPTY_BYTE_ARRAY,
@JceId(5) @JvmField val usMsgType: Int?,
@JceId(6) @JvmField val wUserActive: Int?,
@JceId(7) @JvmField val wGeneralFlag: Int?,
@JceId(8) @JvmField val bindedUin: Long?,
@JceId(9) @JvmField val stMsgInfo: MsgInfo?,
@JceId(10) @JvmField val msgCtrlBuf: String?,
@JceId(11) @JvmField val serverBuf: ByteArray?,
@JceId(12) @JvmField val pingFlag: Long?,
@JceId(13) @JvmField val svrip: Int?
) : JceStruct, Packet
@Serializable
internal class MsgInfo(
@JceId(0) val lFromUin: Long = 0L,
@JceId(1) val uMsgTime: Long = 0L,
@JceId(2) val shMsgType: Short,
@JceId(3) val shMsgSeq: Short,
@JceId(4) val strMsg: String?,
@JceId(5) val uRealMsgTime: Int?,
@JceId(6) val vMsg: ByteArray,
@JceId(7) val uAppShareID: Long?,
@JceId(8) val vMsgCookies: ByteArray? = EMPTY_BYTE_ARRAY,
@JceId(9) val vAppShareCookie: ByteArray? = EMPTY_BYTE_ARRAY,
@JceId(10) val lMsgUid: Long?,
@JceId(11) val lLastChangeTime: Long?,
@JceId(12) val vCPicInfo: List<CPicInfo>?,
@JceId(13) val stShareData: ShareData?,
@JceId(14) val lFromInstId: Long?,
@JceId(15) val vRemarkOfSender: ByteArray?,
@JceId(16) val strFromMobile: String?,
@JceId(17) val strFromName: String?,
@JceId(18) val vNickName: List<String>?//,
//@SerialId(19) val stC2CTmpMsgHead: TempMsgHead?
@JceId(0) @JvmField val lFromUin: Long = 0L,
@JceId(1) @JvmField val uMsgTime: Long = 0L,
@JceId(2) @JvmField val shMsgType: Short,
@JceId(3) @JvmField val shMsgSeq: Short,
@JceId(4) @JvmField val strMsg: String?,
@JceId(5) @JvmField val uRealMsgTime: Int?,
@JceId(6) @JvmField val vMsg: ByteArray,
@JceId(7) @JvmField val uAppShareID: Long?,
@JceId(8) @JvmField val vMsgCookies: ByteArray? = EMPTY_BYTE_ARRAY,
@JceId(9) @JvmField val vAppShareCookie: ByteArray? = EMPTY_BYTE_ARRAY,
@JceId(10) @JvmField val lMsgUid: Long?,
@JceId(11) @JvmField val lLastChangeTime: Long?,
@JceId(12) @JvmField val vCPicInfo: List<CPicInfo>?,
@JceId(13) @JvmField val stShareData: ShareData?,
@JceId(14) @JvmField val lFromInstId: Long?,
@JceId(15) @JvmField val vRemarkOfSender: ByteArray?,
@JceId(16) @JvmField val strFromMobile: String?,
@JceId(17) @JvmField val strFromName: String?,
@JceId(18) @JvmField val vNickName: List<String>?//,
//@SerialId(19) @JvmField val stC2CTmpMsgHead: TempMsgHead?
) : JceStruct
@Serializable
internal class ShareData(
@JceId(0) val pkgname: String = "",
@JceId(1) val msgtail: String = "",
@JceId(2) val picurl: String = "",
@JceId(3) val url: String = ""
@JceId(0) @JvmField val pkgname: String = "",
@JceId(1) @JvmField val msgtail: String = "",
@JceId(2) @JvmField val picurl: String = "",
@JceId(3) @JvmField val url: String = ""
) : JceStruct
@Serializable
internal class TempMsgHead(
@JceId(0) val c2c_type: Int? = 0,
@JceId(1) val serviceType: Int? = 0
@JceId(0) @JvmField val c2c_type: Int? = 0,
@JceId(1) @JvmField val serviceType: Int? = 0
) : JceStruct
@Serializable
internal class CPicInfo(
@JceId(0) val vPath: ByteArray = EMPTY_BYTE_ARRAY,
@JceId(1) val vHost: ByteArray? = EMPTY_BYTE_ARRAY
@JceId(0) @JvmField val vPath: ByteArray = EMPTY_BYTE_ARRAY,
@JceId(1) @JvmField val vHost: ByteArray? = EMPTY_BYTE_ARRAY
) : JceStruct
\ No newline at end of file
......@@ -3,23 +3,24 @@ package net.mamoe.mirai.qqandroid.network.protocol.data.jce
import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.utils.io.JceStruct
import net.mamoe.mirai.qqandroid.utils.io.serialization.jce.JceId
import kotlin.jvm.JvmField
@Serializable
internal class RequestMSFForceOffline(
@JceId(0) val uin: Long = 0L,
@JceId(1) val iSeqno: Long = 0L,
@JceId(2) val kickType: Byte = 0,
@JceId(3) val info: String = "",
@JceId(4) val title: String? = "",
@JceId(5) val sigKick: Byte? = 0,
@JceId(6) val vecSigKickData: ByteArray? = null,
@JceId(7) val sameDevice: Byte? = 0
@JceId(0) @JvmField val uin: Long = 0L,
@JceId(1) @JvmField val iSeqno: Long = 0L,
@JceId(2) @JvmField val kickType: Byte = 0,
@JceId(3) @JvmField val info: String = "",
@JceId(4) @JvmField val title: String? = "",
@JceId(5) @JvmField val sigKick: Byte? = 0,
@JceId(6) @JvmField val vecSigKickData: ByteArray? = null,
@JceId(7) @JvmField val sameDevice: Byte? = 0
) : JceStruct
@Serializable
internal class RspMSFForceOffline(
@JceId(0) val uin: Long,
@JceId(1) val seq: Long,
@JceId(2) val const: Byte = 0
@JceId(0) @JvmField val uin: Long,
@JceId(1) @JvmField val seq: Long,
@JceId(2) @JvmField val const: Byte = 0
) : JceStruct
\ No newline at end of file
......@@ -13,34 +13,35 @@ import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.utils.io.JceStruct
import net.mamoe.mirai.qqandroid.utils.io.serialization.jce.JceId
import kotlin.jvm.JvmField
private val EMPTY_MAP = mapOf<String, String>()
@Serializable
internal class RequestPacket(
@JceId(1) val iVersion: Short? = 3,
@JceId(2) val cPacketType: Byte = 0,
@JceId(3) val iMessageType: Int = 0,
@JceId(4) val iRequestId: Int = 0,
@JceId(5) val sServantName: String = "",
@JceId(6) val sFuncName: String = "",
@JceId(7) val sBuffer: ByteArray = EMPTY_BYTE_ARRAY,
@JceId(8) val iTimeout: Int? = 0,
@JceId(9) val context: Map<String, String>? = EMPTY_MAP,
@JceId(10) val status: Map<String, String>? = EMPTY_MAP
@JceId(1) @JvmField val iVersion: Short? = 3,
@JceId(2) @JvmField val cPacketType: Byte = 0,
@JceId(3) @JvmField val iMessageType: Int = 0,
@JceId(4) @JvmField val iRequestId: Int = 0,
@JceId(5) @JvmField val sServantName: String = "",
@JceId(6) @JvmField val sFuncName: String = "",
@JceId(7) @JvmField val sBuffer: ByteArray = EMPTY_BYTE_ARRAY,
@JceId(8) @JvmField val iTimeout: Int? = 0,
@JceId(9) @JvmField val context: Map<String, String>? = EMPTY_MAP,
@JceId(10) @JvmField val status: Map<String, String>? = EMPTY_MAP
) : JceStruct
@Serializable
internal class RequestDataVersion3(
@JceId(0) val map: Map<String, ByteArray> // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的
@JceId(0) @JvmField val map: Map<String, ByteArray> // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的
) : JceStruct
@Serializable
internal class RequestDataVersion2(
@JceId(0) val map: Map<String, Map<String, ByteArray>>
@JceId(0) @JvmField val map: Map<String, Map<String, ByteArray>>
) : JceStruct
@Serializable
internal class RequestDataStructSvcReqRegister(
@JceId(0) val struct: SvcReqRegister
@JceId(0) @JvmField val struct: SvcReqRegister
) : JceStruct
\ No newline at end of file
......@@ -12,11 +12,12 @@ package net.mamoe.mirai.qqandroid.network.protocol.data.jce
import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.utils.io.JceStruct
import net.mamoe.mirai.qqandroid.utils.io.serialization.jce.JceId
import kotlin.jvm.JvmField
@Serializable
internal class RequestPushForceOffline(
@JceId(0) val uin: Long,
@JceId(1) val title: String? = "",
@JceId(2) val tips: String? = "",
@JceId(3) val sameDevice: Byte? = null
@JceId(0) @JvmField val uin: Long,
@JceId(1) @JvmField val title: String? = "",
@JceId(2) @JvmField val tips: String? = "",
@JceId(3) @JvmField val sameDevice: Byte? = null
) : JceStruct
\ No newline at end of file
......@@ -12,44 +12,45 @@ package net.mamoe.mirai.qqandroid.network.protocol.data.jce
import kotlinx.serialization.Serializable
import net.mamoe.mirai.qqandroid.utils.io.JceStruct
import net.mamoe.mirai.qqandroid.utils.io.serialization.jce.JceId
import kotlin.jvm.JvmField
@Serializable
internal class SvcReqRegister(
@JceId(0) val lUin: Long = 0L,
@JceId(1) val lBid: Long = 0L,
@JceId(2) val cConnType: Byte = 0,
@JceId(3) val sOther: String = "",
@JceId(4) val iStatus: Int = 11,
@JceId(5) val bOnlinePush: Byte = 0,
@JceId(6) val bIsOnline: Byte = 0,
@JceId(7) val bIsShowOnline: Byte = 0,
@JceId(8) val bKikPC: Byte = 0,
@JceId(9) val bKikWeak: Byte = 0,
@JceId(10) val timeStamp: Long = 0L,
@JceId(11) val iOSVersion: Long = 0L,
@JceId(12) val cNetType: Byte = 0,
@JceId(13) val sBuildVer: String? = "",
@JceId(14) val bRegType: Byte = 0,
@JceId(15) val vecDevParam: ByteArray? = null,
@JceId(16) val vecGuid: ByteArray? = null,
@JceId(17) val iLocaleID: Int = 2052,
@JceId(18) val bSlientPush: Byte = 0,
@JceId(19) val strDevName: String? = null,
@JceId(20) val strDevType: String? = null,
@JceId(21) val strOSVer: String? = null,
@JceId(22) val bOpenPush: Byte = 1,
@JceId(23) val iLargeSeq: Long = 0L,
@JceId(24) val iLastWatchStartTime: Long = 0L,
@JceId(26) val uOldSSOIp: Long = 0L,
@JceId(27) val uNewSSOIp: Long = 0L,
@JceId(28) val sChannelNo: String? = null,
@JceId(29) val lCpId: Long = 0L,
@JceId(30) val strVendorName: String? = null,
@JceId(31) val strVendorOSName: String? = null,
@JceId(32) val strIOSIdfa: String? = null,
@JceId(33) val bytes_0x769_reqbody: ByteArray? = null,
@JceId(34) val bIsSetStatus: Byte = 0,
@JceId(35) val vecServerBuf: ByteArray? = null,
@JceId(36) val bSetMute: Byte = 0
@JceId(0) @JvmField val lUin: Long = 0L,
@JceId(1) @JvmField val lBid: Long = 0L,
@JceId(2) @JvmField val cConnType: Byte = 0,
@JceId(3) @JvmField val sOther: String = "",
@JceId(4) @JvmField val iStatus: Int = 11,
@JceId(5) @JvmField val bOnlinePush: Byte = 0,
@JceId(6) @JvmField val bIsOnline: Byte = 0,
@JceId(7) @JvmField val bIsShowOnline: Byte = 0,
@JceId(8) @JvmField val bKikPC: Byte = 0,
@JceId(9) @JvmField val bKikWeak: Byte = 0,
@JceId(10) @JvmField val timeStamp: Long = 0L,
@JceId(11) @JvmField val iOSVersion: Long = 0L,
@JceId(12) @JvmField val cNetType: Byte = 0,
@JceId(13) @JvmField val sBuildVer: String? = "",
@JceId(14) @JvmField val bRegType: Byte = 0,
@JceId(15) @JvmField val vecDevParam: ByteArray? = null,
@JceId(16) @JvmField val vecGuid: ByteArray? = null,
@JceId(17) @JvmField val iLocaleID: Int = 2052,
@JceId(18) @JvmField val bSlientPush: Byte = 0,
@JceId(19) @JvmField val strDevName: String? = null,
@JceId(20) @JvmField val strDevType: String? = null,
@JceId(21) @JvmField val strOSVer: String? = null,
@JceId(22) @JvmField val bOpenPush: Byte = 1,
@JceId(23) @JvmField val iLargeSeq: Long = 0L,
@JceId(24) @JvmField val iLastWatchStartTime: Long = 0L,
@JceId(26) @JvmField val uOldSSOIp: Long = 0L,
@JceId(27) @JvmField val uNewSSOIp: Long = 0L,
@JceId(28) @JvmField val sChannelNo: String? = null,
@JceId(29) @JvmField val lCpId: Long = 0L,
@JceId(30) @JvmField val strVendorName: String? = null,
@JceId(31) @JvmField val strVendorOSName: String? = null,
@JceId(32) @JvmField val strIOSIdfa: String? = null,
@JceId(33) @JvmField val bytes_0x769_reqbody: ByteArray? = null,
@JceId(34) @JvmField val bIsSetStatus: Byte = 0,
@JceId(35) @JvmField val vecServerBuf: ByteArray? = null,
@JceId(36) @JvmField val bSetMute: Byte = 0
// @SerialId(25) var vecBindUin: ArrayList<*>? = null // ?? 未知泛型
) : JceStruct
\ No newline at end of file
......@@ -17,79 +17,80 @@ import kotlinx.serialization.protobuf.ProtoNumberType
import kotlinx.serialization.protobuf.ProtoType
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.utils.io.ProtoBuf
import kotlin.jvm.JvmField
@Serializable
internal class Oidb0x858 : ProtoBuf {
@Serializable
internal 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
@ProtoId(1) @JvmField val type: Int = 0,
@ProtoId(2) @JvmField val billno: String = "",
@ProtoId(3) @JvmField val result: Int = 0,
@ProtoId(4) @JvmField val amount: Int = 0,
@ProtoId(5) @JvmField val total: Int = 0,
@ProtoId(6) @JvmField val interval: Int = 0,
@ProtoId(7) @JvmField val finish: Int = 0,
@ProtoId(8) @JvmField val uin: List<Long>? = null,
@ProtoId(9) @JvmField val action: Int = 0
) : ProtoBuf
@Serializable
internal 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(1) @JvmField val uin: Long = 0L,
@ProtoId(2) @JvmField val nickname: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(3) @JvmField val recalledMsgList: List<MessageMeta> = listOf(),
@ProtoId(4) @JvmField val reminderContent: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(5) @JvmField val userdef: ByteArray = EMPTY_BYTE_ARRAY
) : ProtoBuf {
@Serializable
internal class MessageMeta(
@ProtoId(1) val seq: Int = 0,
@ProtoId(2) val time: Int = 0,
@ProtoId(3) val msgRandom: Int = 0
@ProtoId(1) @JvmField val seq: Int = 0,
@ProtoId(2) @JvmField val time: Int = 0,
@ProtoId(3) @JvmField val msgRandom: Int = 0
) : ProtoBuf
}
@Serializable
internal 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(8) val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null,
// @SerialId(9) val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null,
@ProtoId(10) val optMsgGoldtips: GoldMsgTipsElem? = null
@ProtoId(1) @JvmField val optEnumType: Int /* enum */ = 5,
@ProtoId(2) @JvmField val optUint64MsgTime: Long = 0L,
@ProtoId(3) @JvmField val optUint64MsgExpires: Long = 0L,
@ProtoId(4) @JvmField val optUint64ConfUin: Long = 0L,
@ProtoId(5) @JvmField val optMsgRedtips: RedGrayTipsInfo? = null,
@ProtoId(6) @JvmField val optMsgRecallReminder: MessageRecallReminder? = null,
@ProtoId(7) @JvmField val optMsgObjUpdate: NotifyObjmsgUpdate? = null,
// @SerialId(8) @JvmField val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null,
// @SerialId(9) @JvmField val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null,
@ProtoId(10) @JvmField val optMsgGoldtips: GoldMsgTipsElem? = null
) : ProtoBuf
@Serializable
internal class NotifyObjmsgUpdate(
@ProtoId(1) val objmsgId: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(2) val updateType: Int = 0,
@ProtoId(3) val extMsg: ByteArray = EMPTY_BYTE_ARRAY
@ProtoId(1) @JvmField val objmsgId: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(2) @JvmField val updateType: Int = 0,
@ProtoId(3) @JvmField val extMsg: ByteArray = EMPTY_BYTE_ARRAY
) : ProtoBuf
@Serializable
internal 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
@ProtoId(1) @JvmField val optUint32ShowLastest: Int = 0,
@ProtoId(2) @JvmField val senderUin: Long = 0L,
@ProtoId(3) @JvmField val receiverUin: Long = 0L,
@ProtoId(4) @JvmField val senderRichContent: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(5) @JvmField val receiverRichContent: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(6) @JvmField val authkey: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoType(ProtoNumberType.SIGNED) @ProtoId(7) @JvmField val sint32Msgtype: Int = 0,
@ProtoId(8) @JvmField val luckyFlag: Int = 0,
@ProtoId(9) @JvmField val hideFlag: Int = 0,
@ProtoId(10) @JvmField val pcBody: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(11) @JvmField val icon: Int = 0,
@ProtoId(12) @JvmField val luckyUin: Long = 0L,
@ProtoId(13) @JvmField val time: Int = 0,
@ProtoId(14) @JvmField val random: Int = 0,
@ProtoId(15) @JvmField val broadcastRichContent: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(16) @JvmField val idiom: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(17) @JvmField val idiomSeq: Int = 0,
@ProtoId(18) @JvmField val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(19) @JvmField val jumpurl: ByteArray = EMPTY_BYTE_ARRAY
) : ProtoBuf
}
......@@ -15,45 +15,46 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoId
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.utils.io.ProtoBuf
import kotlin.jvm.JvmField
@Serializable
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
@ProtoId(1) @JvmField val frdUin: Long = 0L,
@ProtoId(91001) @JvmField val musicSwitch: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(101001) @JvmField val mutualmarkAlienation: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(141001) @JvmField val mutualmarkScore: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(151001) @JvmField val ksingSwitch: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(181001) @JvmField val lbsShare: ByteArray = EMPTY_BYTE_ARRAY
) : ProtoBuf
@Serializable
internal class RspBody(
@ProtoId(1) val msgUpdateData: List<ExtSnsFrdData>? = null,
@ProtoId(11) val over: Int = 0,
@ProtoId(12) val nextStart: Int = 0,
@ProtoId(13) val uint64UnfinishedUins: List<Long>? = null
@ProtoId(1) @JvmField val msgUpdateData: List<ExtSnsFrdData>? = null,
@ProtoId(11) @JvmField val over: Int = 0,
@ProtoId(12) @JvmField val nextStart: Int = 0,
@ProtoId(13) @JvmField 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
@ProtoId(1) @JvmField val appid: Long = 0L,
@ProtoId(2) @JvmField val maxPkgSize: Int = 0,
@ProtoId(3) @JvmField val startTime: Int = 0,
@ProtoId(4) @JvmField val startIndex: Int = 0,
@ProtoId(5) @JvmField val reqNum: Int = 0,
@ProtoId(6) @JvmField val uinList: List<Long>? = null,
@ProtoId(91001) @JvmField val reqMusicSwitch: Int = 0,
@ProtoId(101001) @JvmField val reqMutualmarkAlienation: Int = 0,
@ProtoId(141001) @JvmField val reqMutualmarkScore: Int = 0,
@ProtoId(151001) @JvmField val reqKsingSwitch: Int = 0,
@ProtoId(181001) @JvmField val reqMutualmarkLbsshare: Int = 0
) : ProtoBuf
@Serializable
internal class KSingRelationInfo(
@ProtoId(1) val flag: Int = 0
@ProtoId(1) @JvmField val flag: Int = 0
) : ProtoBuf
}
......@@ -61,21 +62,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
@ProtoId(1) @JvmField val maxPkgSize: Int = 0,
@ProtoId(2) @JvmField val startTime: Int = 0,
@ProtoId(11) @JvmField val uinList: List<Long>? = null
) : ProtoBuf
@Serializable
internal class RspBody(
@ProtoId(11) val msgMutualmarkData: List<MutualMarkData>? = null,
@ProtoId(12) val uint64UnfinishedUins: List<Long>? = null
@ProtoId(11) @JvmField val msgMutualmarkData: List<MutualMarkData>? = null,
@ProtoId(12) @JvmField val uint64UnfinishedUins: List<Long>? = null
) : ProtoBuf
@Serializable
internal class MutualMarkData(
@ProtoId(1) val frdUin: Long = 0L,
@ProtoId(2) val result: Int = 0
// @SerialId(11) val mutualmarkInfo: List<net.mamoe.mirai.qqandroid.network.protocol.data.proto.Mutualmark.MutualMark>? = null
@ProtoId(1) @JvmField val frdUin: Long = 0L,
@ProtoId(2) @JvmField val result: Int = 0
// @SerialId(11) @JvmField val mutualmarkInfo: List<net.mamoe.mirai.qqandroid.network.protocol.data.proto.Mutualmark.MutualMark>? = null
) : ProtoBuf
}
\ No newline at end of file
......@@ -13,56 +13,57 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoId
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.utils.io.ProtoBuf
import kotlin.jvm.JvmField
@Serializable
internal class GroupLabel : ProtoBuf {
@Serializable
internal class Label(
@ProtoId(1) val name: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(2) val enumType: Int /* enum */ = 1,
@ProtoId(3) val textColor: Color? = null,
@ProtoId(4) val edgingColor: Color? = null,
@ProtoId(5) val labelAttr: Int = 0,
@ProtoId(6) val labelType: Int = 0
@ProtoId(1) @JvmField val name: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(2) @JvmField val enumType: Int /* enum */ = 1,
@ProtoId(3) @JvmField val textColor: Color? = null,
@ProtoId(4) @JvmField val edgingColor: Color? = null,
@ProtoId(5) @JvmField val labelAttr: Int = 0,
@ProtoId(6) @JvmField val labelType: Int = 0
) : ProtoBuf
@Serializable
internal class RspBody(
@ProtoId(1) val error: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(2) val groupInfo: List<GroupInfo>? = null
@ProtoId(1) @JvmField val error: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoId(2) @JvmField val groupInfo: List<GroupInfo>? = null
) : ProtoBuf
@Serializable
internal class SourceId(
@ProtoId(1) val sourceId: Int = 0
@ProtoId(1) @JvmField val sourceId: Int = 0
) : ProtoBuf
@Serializable
internal class GroupInfo(
@ProtoId(1) val int32Result: Int = 0,
@ProtoId(2) val groupCode: Long = 0L,
@ProtoId(3) val groupLabel: List<Label>? = null
@ProtoId(1) @JvmField val int32Result: Int = 0,
@ProtoId(2) @JvmField val groupCode: Long = 0L,
@ProtoId(3) @JvmField val groupLabel: List<Label>? = null
) : ProtoBuf
@Serializable
internal class Color(
@ProtoId(1) val r: Int = 0,
@ProtoId(2) val g: Int = 0,
@ProtoId(3) val b: Int = 0
@ProtoId(1) @JvmField val r: Int = 0,
@ProtoId(2) @JvmField val g: Int = 0,
@ProtoId(3) @JvmField val b: Int = 0
) : ProtoBuf
@Serializable
internal class ReqBody(
@ProtoId(1) val sourceId: SourceId? = null,
@ProtoId(2) val uinInfo: UinInfo? = null,
@ProtoId(3) val numberLabel: Int = 5,
@ProtoId(4) val groupCode: List<Long>? = null,
@ProtoId(5) val labelStyle: Int = 0
@ProtoId(1) @JvmField val sourceId: SourceId? = null,
@ProtoId(2) @JvmField val uinInfo: UinInfo? = null,
@ProtoId(3) @JvmField val numberLabel: Int = 5,
@ProtoId(4) @JvmField val groupCode: List<Long>? = null,
@ProtoId(5) @JvmField val labelStyle: Int = 0
) : ProtoBuf
@Serializable
internal class UinInfo(
@ProtoId(1) val int64Longitude: Long = 0L,
@ProtoId(2) val int64Latitude: Long = 0L
@ProtoId(1) @JvmField val int64Longitude: Long = 0L,
@ProtoId(2) @JvmField val int64Latitude: Long = 0L
) : ProtoBuf
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoId
import net.mamoe.mirai.qqandroid.utils.io.ProtoBuf
import net.mamoe.mirai.utils.currentTimeSeconds
import kotlin.jvm.JvmField
internal interface ImgReq : ProtoBuf
......@@ -20,22 +21,22 @@ internal interface ImgReq : ProtoBuf
@Serializable
internal class GetImgUrlReq(
@ProtoId(1) val srcUni: Int,
@ProtoId(2) val dstUni: Int,
@ProtoId(3) val fileResID: String,//UUID
@ProtoId(1) @JvmField val srcUni: Int,
@ProtoId(2) @JvmField val dstUni: Int,
@ProtoId(3) @JvmField val fileResID: String,//UUID
/**
* UUID例子: 没有找到
*/
@ProtoId(4) val urlFlag: Int = 1,
@ProtoId(4) @JvmField 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
@ProtoId(6) @JvmField val urlType: Int = 4,
@ProtoId(7) @JvmField val requestTerm: Int = 5,//确定
@ProtoId(8) @JvmField val requestPlatformType: Int = 9,//确定
@ProtoId(9) @JvmField val srcFileType: Int = 1,//2=ftn,1=picplatform,255
@ProtoId(10) @JvmField val innerIP: Int = 0,//确定
@ProtoId(11) @JvmField val addressBook: Int = 0,//[ChatType.internalID]== 1006为1[为CONTACT时] 我觉得发0没问题
@ProtoId(12) @JvmField val buType: Int = 1,//确定
@ProtoId(13) @JvmField val buildVer: String = "8.2.7.4410",//版本号
@ProtoId(14) @JvmField val timestamp: Int = currentTimeSeconds.toInt(),//(pic_up_timestamp)
@ProtoId(15) @JvmField val requestTransferType: Int = 1
) : ImgReq
\ No newline at end of file
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