1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

refactor: use new protobuf impl oidb0x6d9

This commit is contained in:
Mrs4s 2021-11-05 20:05:57 +08:00
parent b0fd43cea1
commit a8760a5821
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7
6 changed files with 512 additions and 3428 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d6"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d7"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d8"
"github.com/Mrs4s/MiraiGo/internal/protobuf/data/oidb/oidb0x6d9"
"go.dedis.ch/protobuf"
"io"
"math/rand"
@ -302,10 +303,10 @@ func (c *QQClient) buildGroupFileUploadReqPacket(parentFolderID, fileName string
func (c *QQClient) buildGroupFileFeedsRequest(groupCode int64, fileID string, busId, msgRand int32) (uint16, []byte) {
seq := c.nextSeq()
req := c.packOIDBPackageProto(1753, 4, &oidb.D6D9ReqBody{FeedsInfoReq: &oidb.FeedsReqBody{
req := c.packOIDBPackageProto2(1753, 4, &oidb0x6d9.ReqBody{FeedsInfoReq: &oidb0x6d9.FeedsReqBody{
GroupCode: proto.Uint64(uint64(groupCode)),
AppId: proto.Uint32(3),
FeedsInfoList: []*oidb.GroupFileFeedsInfo{{
FeedsInfoList: []*oidb0x6d9.GroupFileFeedsInfo{{
FileId: &fileID,
FeedFlag: proto.Uint32(1),
BusId: proto.Uint32(uint32(busId)),

File diff suppressed because it is too large Load Diff

View File

@ -1,171 +0,0 @@
syntax = "proto2";
option go_package = "./;oidb";
message D5EBReqBody {
repeated uint64 uins = 1;
optional uint32 max_package_size = 3;
repeated bytes openid = 4;
optional uint32 appid = 5;
optional uint32 reqNick = 20002;
optional uint32 reqCountry = 20003;
optional int32 reqProvince = 20004;
optional int32 reqGender = 20009;
optional int32 reqAllow = 20014;
optional int32 reqFaceId = 20015;
optional int32 reqCity = 20020;
optional int32 reqConstellation = 20022;
optional int32 reqCommonPlace1 = 20027;
optional int32 reqMss3Bitmapextra = 20030;
optional int32 reqBirthday = 20031;
optional int32 reqCityId = 20032;
optional int32 reqLang1 = 20033;
optional int32 reqLang2 = 20034;
optional int32 reqLang3 = 20035;
optional int32 reqAge = 20037;
optional int32 reqCityZoneId = 20041;
optional int32 reqOin = 20056;
optional int32 reqBubbleId = 20059;
optional int32 reqMss2Identity = 21001;
optional int32 reqMss1Service = 21002;
optional int32 reqLflag = 21003;
optional int32 reqExtFlag = 21004;
optional int32 reqBasicSvrFlag = 21006;
optional int32 reqBasicCliFlag = 21007;
optional int32 reqFullBirthday = 26004;
optional int32 reqFullAge = 26005;
optional int32 reqSimpleUpdateTime = 26010;
optional int32 reqMssUpdateTime = 26011;
optional int32 reqPstnMultiCallTime = 26012;
optional int32 reqPstnMultiLastGuideRechargeTime = 26013;
optional int32 reqPstnC2cCallTime = 26014;
optional int32 reqPstnC2cLastGuideRechargeTime = 26015;
optional int32 reqGroupMemCreditFlag = 27022;
optional int32 reqFaceAddonId = 27025;
optional int32 reqMusicGene = 27026;
optional int32 reqStrangerNick = 27034;
optional int32 reqStrangerDeclare = 27035;
optional int32 reqLoveStatus = 27036;
optional int32 reqProfession = 27037;
optional int32 reqVasColorringFlag = 27041;
optional int32 reqCharm = 27052;
optional int32 reqApolloTimestamp = 27059;
optional int32 reqVasFontIdFlag = 27201;
optional int32 reqGlobalGroupLevel = 27208;
optional int32 reqInvite2groupAutoAgreeFlag = 40346;
optional int32 reqSubaccountDisplayThirdQqFlag = 40348;
optional int32 notifyPartakeLikeRankingListFlag = 40350;
optional int32 reqLightalkSwitch = 40506;
optional int32 reqMusicRingVisible = 40507;
optional int32 reqMusicRingAutoplay = 40508;
optional int32 reqMusicRingRedpoint = 40509;
optional int32 torchDisableFlag = 40525;
optional int32 reqVasMagicfontFlag = 40530;
optional int32 reqVipFlag = 41756;
optional int32 reqAuthFlag = 41783;
optional int32 reqForbidFlag = 41784;
optional int32 reqGodForbid = 41804;
optional int32 reqGodFlag = 41805;
optional int32 reqCharmLevel = 41950;
optional int32 reqCharmShown = 41973;
optional int32 reqFreshnewsNotifyFlag = 41993;
optional int32 reqApolloVipLevel = 41999;
optional int32 reqApolloVipFlag = 42003;
optional int32 reqPstnC2cVip = 42005;
optional int32 reqPstnMultiVip = 42006;
optional int32 reqPstnEverC2cVip = 42007;
optional int32 reqPstnEverMultiVip = 42008;
optional int32 reqPstnMultiTryFlag = 42011;
optional int32 reqPstnC2cTryFlag = 42012;
optional int32 reqSubscribeNearbyassistantSwitch = 42024;
optional int32 reqTorchbearerFlag = 42051;
optional int32 preloadDisableFlag = 42073;
optional int32 reqMedalwallFlag = 42075;
optional int32 notifyOnLikeRankingListFlag = 42092;
optional int32 reqApolloStatus = 42980;
}
message D5EBRspBody {
repeated UdcUinData uinData = 11;
repeated int64 unfinishedUins = 12;
}
message UdcUinData {
optional int64 uin = 1;
optional bytes openid = 4;
optional bytes nick = 20002;
optional bytes country = 20003;
optional bytes province = 20004;
optional int32 gender = 20009;
optional int32 allow = 20014;
optional int32 faceId = 20015;
optional bytes city = 20020;
optional int32 constellation = 20022;
optional int32 commonPlace1 = 20027;
optional bytes mss3Bitmapextra = 20030;
optional bytes birthday = 20031;
optional bytes cityId = 20032;
optional int32 lang1 = 20033;
optional int32 lang2 = 20034;
optional int32 lang3 = 20035;
optional int32 age = 20037;
optional int32 cityZoneId = 20041;
optional int32 oin = 20056;
optional int32 bubbleId = 20059;
optional bytes mss2Identity = 21001;
optional bytes mss1Service = 21002;
optional int32 lflag = 21003;
optional int32 extFlag = 21004;
optional bytes basicSvrFlag = 21006;
optional bytes basicCliFlag = 21007;
optional bytes fullBirthday = 26004;
optional bytes fullAge = 26005;
optional int32 simpleUpdateTime = 26010;
optional int32 mssUpdateTime = 26011;
optional int32 pstnMultiCallTime = 26012;
optional int32 pstnMultiLastGuideRechargeTime = 26013;
optional int32 pstnC2cCallTime = 26014;
optional int32 pstnC2cLastGuideRechargeTime = 26015;
optional int32 groupMemCreditFlag = 27022;
optional int64 faceAddonId = 27025;
optional bytes musicGene = 27026;
optional bytes strangerNick = 27034;
optional bytes strangerDeclare = 27035;
optional int32 loveStatus = 27036;
optional int32 profession = 27037;
optional int32 vasColorringId = 27041;
optional int32 charm = 27052;
optional int32 apolloTimestamp = 27059;
optional int32 vasFontId = 27201;
optional int32 globalGroupLevel = 27208;
optional int32 reqInvite2groupAutoAgreeFlag = 40346;
optional int32 subaccountDisplayThirdQqFlag = 40348;
optional int32 notifyPartakeLikeRankingListFlag = 40350;
optional int32 lightalkSwitch = 40506;
optional int32 musicRingVisible = 40507;
optional int32 musicRingAutoplay = 40508;
optional int32 musicRingRedpoint = 40509;
optional int32 torchDisableFlag = 40525;
optional int32 vasMagicfontFlag = 40530;
optional int32 vipFlag = 41756;
optional int32 authFlag = 41783;
optional int32 forbidFlag = 41784;
optional int32 godForbid = 41804;
optional int32 godFlag = 41805;
optional int32 charmLevel = 41950;
optional int32 charmShown = 41973;
optional int32 freshnewsNotifyFlag = 41993;
optional int32 apolloVipLevel = 41999;
optional int32 apolloVipFlag = 42003;
optional int32 pstnC2cVip = 42005;
optional int32 pstnMultiVip = 42006;
optional int32 pstnEverC2cVip = 42007;
optional int32 pstnEverMultiVip = 42008;
optional int32 pstnMultiTryFlag = 42011;
optional int32 pstnC2cTryFlag = 42012;
optional int32 subscribeNearbyassistantSwitch = 42024;
optional int32 torchbearerFlag = 42051;
optional int32 preloadDisableFlag = 42073;
optional int32 reqMedalwallFlag = 42075;
optional int32 notifyOnLikeRankingListFlag = 42092;
optional int32 apolloStatus = 42980;
}

File diff suppressed because it is too large Load Diff

View File

@ -71,14 +71,14 @@ message FeedsRspBody {
optional uint32 svrbusyWaitTime = 5;
}
message D6D9ReqBody {
message ReqBody {
optional TransFileReqBody transFileReq = 1;
optional CopyFromReqBody copyFromReq = 2;
optional CopyToReqBody copyToReq = 3;
optional FeedsReqBody feedsInfoReq = 5;
}
message D6D9RspBody {
message RspBody {
optional TransFileRspBody transFileRsp = 1;
optional CopyFromRspBody copyFromRsp = 2;
optional CopyToRspBody copyToRsp = 3;

View File

@ -0,0 +1,507 @@
// Code generated by Proto2Go.Net. Only used for MiraiGo. DO NOT EDIT.
// Source: oidb0x6d9.proto
package oidb0x6d9
import (
"github.com/pkg/errors"
"go.dedis.ch/protobuf"
)
type (
GroupFileFeedsInfo struct {
BusId *uint32 `protobuf:"1,opt"`
FileId *string `protobuf:"2,opt"`
MsgRandom *uint32 `protobuf:"3,opt"`
Ext []byte `protobuf:"4,opt"`
FeedFlag *uint32 `protobuf:"5,opt"`
}
CopyFromReqBody struct {
GroupCode *uint64 `protobuf:"1,opt"`
AppId *uint32 `protobuf:"2,opt"`
SrcBusId *uint32 `protobuf:"3,opt"`
SrcParentFolder []byte `protobuf:"4,opt"`
SrcFilePath []byte `protobuf:"5,opt"`
DstBusId *uint32 `protobuf:"6,opt"`
DstFolderId []byte `protobuf:"7,opt"`
FileSize *uint64 `protobuf:"8,opt"`
LocalPath *string `protobuf:"9,opt"`
FileName *string `protobuf:"10,opt"`
SrcUin *uint64 `protobuf:"11,opt"`
Md5 []byte `protobuf:"12,opt"`
}
CopyFromRspBody struct {
RetCode *int32 `protobuf:"1,opt"`
RetMsg *string `protobuf:"2,opt"`
ClientWording *string `protobuf:"3,opt"`
SaveFilePath []byte `protobuf:"4,opt"`
BusId *uint32 `protobuf:"5,opt"`
}
CopyToReqBody struct {
GroupCode *uint64 `protobuf:"1,opt"`
AppId *uint32 `protobuf:"2,opt"`
SrcBusId *uint32 `protobuf:"3,opt"`
SrcFileId *string `protobuf:"4,opt"`
DstBusId *uint32 `protobuf:"5,opt"`
DstUin *uint64 `protobuf:"6,opt"`
NewFileName *string `protobuf:"40,opt"`
TimCloudPdirKey []byte `protobuf:"100,opt"`
TimCloudPpdirKey []byte `protobuf:"101,opt"`
TimCloudExtensionInfo []byte `protobuf:"102,opt"`
TimFileExistOption *uint32 `protobuf:"103,opt"`
}
CopyToRspBody struct {
RetCode *int32 `protobuf:"1,opt"`
RetMsg *string `protobuf:"2,opt"`
ClientWording *string `protobuf:"3,opt"`
SaveFilePath *string `protobuf:"4,opt"`
BusId *uint32 `protobuf:"5,opt"`
FileName *string `protobuf:"40,opt"`
}
FeedsReqBody struct {
GroupCode *uint64 `protobuf:"1,opt"`
AppId *uint32 `protobuf:"2,opt"`
FeedsInfoList []*GroupFileFeedsInfo `protobuf:"3"`
MultiSendSeq *uint32 `protobuf:"4,opt"`
}
FeedsRspBody struct {
RetCode *int32 `protobuf:"1,opt"`
RetMsg *string `protobuf:"2,opt"`
ClientWording *string `protobuf:"3,opt"`
SvrbusyWaitTime *uint32 `protobuf:"5,opt"`
}
ReqBody struct {
TransFileReq *TransFileReqBody `protobuf:"1,opt"`
CopyFromReq *CopyFromReqBody `protobuf:"2,opt"`
CopyToReq *CopyToReqBody `protobuf:"3,opt"`
FeedsInfoReq *FeedsReqBody `protobuf:"5,opt"`
}
RspBody struct {
TransFileRsp *TransFileRspBody `protobuf:"1,opt"`
CopyFromRsp *CopyFromRspBody `protobuf:"2,opt"`
CopyToRsp *CopyToRspBody `protobuf:"3,opt"`
FeedsInfoRsp *FeedsRspBody `protobuf:"5,opt"`
}
TransFileReqBody struct {
GroupCode *uint64 `protobuf:"1,opt"`
AppId *uint32 `protobuf:"2,opt"`
BusId *uint32 `protobuf:"3,opt"`
FileId *string `protobuf:"4,opt"`
}
TransFileRspBody struct {
RetCode *int32 `protobuf:"1,opt"`
RetMsg *string `protobuf:"2,opt"`
ClientWording *string `protobuf:"3,opt"`
SaveBusId *uint32 `protobuf:"4,opt"`
SaveFilePath *string `protobuf:"5,opt"`
}
)
func (x *GroupFileFeedsInfo) GetBusId() uint32 {
if x != nil && x.BusId != nil {
return *x.BusId
}
return 0
}
func (x *GroupFileFeedsInfo) GetFileId() string {
if x != nil && x.FileId != nil {
return *x.FileId
}
return ""
}
func (x *GroupFileFeedsInfo) GetMsgRandom() uint32 {
if x != nil && x.MsgRandom != nil {
return *x.MsgRandom
}
return 0
}
func (x *GroupFileFeedsInfo) GetFeedFlag() uint32 {
if x != nil && x.FeedFlag != nil {
return *x.FeedFlag
}
return 0
}
func (x *GroupFileFeedsInfo) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *CopyFromReqBody) GetGroupCode() uint64 {
if x != nil && x.GroupCode != nil {
return *x.GroupCode
}
return 0
}
func (x *CopyFromReqBody) GetAppId() uint32 {
if x != nil && x.AppId != nil {
return *x.AppId
}
return 0
}
func (x *CopyFromReqBody) GetSrcBusId() uint32 {
if x != nil && x.SrcBusId != nil {
return *x.SrcBusId
}
return 0
}
func (x *CopyFromReqBody) GetDstBusId() uint32 {
if x != nil && x.DstBusId != nil {
return *x.DstBusId
}
return 0
}
func (x *CopyFromReqBody) GetFileSize() uint64 {
if x != nil && x.FileSize != nil {
return *x.FileSize
}
return 0
}
func (x *CopyFromReqBody) GetLocalPath() string {
if x != nil && x.LocalPath != nil {
return *x.LocalPath
}
return ""
}
func (x *CopyFromReqBody) GetFileName() string {
if x != nil && x.FileName != nil {
return *x.FileName
}
return ""
}
func (x *CopyFromReqBody) GetSrcUin() uint64 {
if x != nil && x.SrcUin != nil {
return *x.SrcUin
}
return 0
}
func (x *CopyFromReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *CopyFromRspBody) GetRetCode() int32 {
if x != nil && x.RetCode != nil {
return *x.RetCode
}
return 0
}
func (x *CopyFromRspBody) GetRetMsg() string {
if x != nil && x.RetMsg != nil {
return *x.RetMsg
}
return ""
}
func (x *CopyFromRspBody) GetClientWording() string {
if x != nil && x.ClientWording != nil {
return *x.ClientWording
}
return ""
}
func (x *CopyFromRspBody) GetBusId() uint32 {
if x != nil && x.BusId != nil {
return *x.BusId
}
return 0
}
func (x *CopyFromRspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *CopyToReqBody) GetGroupCode() uint64 {
if x != nil && x.GroupCode != nil {
return *x.GroupCode
}
return 0
}
func (x *CopyToReqBody) GetAppId() uint32 {
if x != nil && x.AppId != nil {
return *x.AppId
}
return 0
}
func (x *CopyToReqBody) GetSrcBusId() uint32 {
if x != nil && x.SrcBusId != nil {
return *x.SrcBusId
}
return 0
}
func (x *CopyToReqBody) GetSrcFileId() string {
if x != nil && x.SrcFileId != nil {
return *x.SrcFileId
}
return ""
}
func (x *CopyToReqBody) GetDstBusId() uint32 {
if x != nil && x.DstBusId != nil {
return *x.DstBusId
}
return 0
}
func (x *CopyToReqBody) GetDstUin() uint64 {
if x != nil && x.DstUin != nil {
return *x.DstUin
}
return 0
}
func (x *CopyToReqBody) GetNewFileName() string {
if x != nil && x.NewFileName != nil {
return *x.NewFileName
}
return ""
}
func (x *CopyToReqBody) GetTimFileExistOption() uint32 {
if x != nil && x.TimFileExistOption != nil {
return *x.TimFileExistOption
}
return 0
}
func (x *CopyToReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *CopyToRspBody) GetRetCode() int32 {
if x != nil && x.RetCode != nil {
return *x.RetCode
}
return 0
}
func (x *CopyToRspBody) GetRetMsg() string {
if x != nil && x.RetMsg != nil {
return *x.RetMsg
}
return ""
}
func (x *CopyToRspBody) GetClientWording() string {
if x != nil && x.ClientWording != nil {
return *x.ClientWording
}
return ""
}
func (x *CopyToRspBody) GetSaveFilePath() string {
if x != nil && x.SaveFilePath != nil {
return *x.SaveFilePath
}
return ""
}
func (x *CopyToRspBody) GetBusId() uint32 {
if x != nil && x.BusId != nil {
return *x.BusId
}
return 0
}
func (x *CopyToRspBody) GetFileName() string {
if x != nil && x.FileName != nil {
return *x.FileName
}
return ""
}
func (x *CopyToRspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *FeedsReqBody) GetGroupCode() uint64 {
if x != nil && x.GroupCode != nil {
return *x.GroupCode
}
return 0
}
func (x *FeedsReqBody) GetAppId() uint32 {
if x != nil && x.AppId != nil {
return *x.AppId
}
return 0
}
func (x *FeedsReqBody) GetMultiSendSeq() uint32 {
if x != nil && x.MultiSendSeq != nil {
return *x.MultiSendSeq
}
return 0
}
func (x *FeedsReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *FeedsRspBody) GetRetCode() int32 {
if x != nil && x.RetCode != nil {
return *x.RetCode
}
return 0
}
func (x *FeedsRspBody) GetRetMsg() string {
if x != nil && x.RetMsg != nil {
return *x.RetMsg
}
return ""
}
func (x *FeedsRspBody) GetClientWording() string {
if x != nil && x.ClientWording != nil {
return *x.ClientWording
}
return ""
}
func (x *FeedsRspBody) GetSvrbusyWaitTime() uint32 {
if x != nil && x.SvrbusyWaitTime != nil {
return *x.SvrbusyWaitTime
}
return 0
}
func (x *FeedsRspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *ReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *RspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *TransFileReqBody) GetGroupCode() uint64 {
if x != nil && x.GroupCode != nil {
return *x.GroupCode
}
return 0
}
func (x *TransFileReqBody) GetAppId() uint32 {
if x != nil && x.AppId != nil {
return *x.AppId
}
return 0
}
func (x *TransFileReqBody) GetBusId() uint32 {
if x != nil && x.BusId != nil {
return *x.BusId
}
return 0
}
func (x *TransFileReqBody) GetFileId() string {
if x != nil && x.FileId != nil {
return *x.FileId
}
return ""
}
func (x *TransFileReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}
func (x *TransFileRspBody) GetRetCode() int32 {
if x != nil && x.RetCode != nil {
return *x.RetCode
}
return 0
}
func (x *TransFileRspBody) GetRetMsg() string {
if x != nil && x.RetMsg != nil {
return *x.RetMsg
}
return ""
}
func (x *TransFileRspBody) GetClientWording() string {
if x != nil && x.ClientWording != nil {
return *x.ClientWording
}
return ""
}
func (x *TransFileRspBody) GetSaveBusId() uint32 {
if x != nil && x.SaveBusId != nil {
return *x.SaveBusId
}
return 0
}
func (x *TransFileRspBody) GetSaveFilePath() string {
if x != nil && x.SaveFilePath != nil {
return *x.SaveFilePath
}
return ""
}
func (x *TransFileRspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil pointer error")
}
return protobuf.Encode(x)
}