Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
c69502a9
Commit
c69502a9
authored
Feb 03, 2020
by
jiahua.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proto Bufs
parent
584cdd7d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2718 additions
and
1 deletion
+2718
-1
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Common.kt
...moe/mirai/qqandroid/network/protocol/data/proto/Common.kt
+60
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Define.kt
...moe/mirai/qqandroid/network/protocol/data/proto/Define.kt
+540
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Group.kt
...amoe/mirai/qqandroid/network/protocol/data/proto/Group.kt
+59
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/OIDB.kt
...mamoe/mirai/qqandroid/network/protocol/data/proto/OIDB.kt
+2058
-0
mirai-core-qqandroid/src/jvmTest/kotlin/test/ProtoBufDataClassGenerator.kt
...oid/src/jvmTest/kotlin/test/ProtoBufDataClassGenerator.kt
+1
-1
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Common.kt
0 → 100644
View file @
c69502a9
import
kotlinx.serialization.SerialId
import
kotlinx.serialization.Serializable
import
net.mamoe.mirai.qqandroid.io.ProtoBuf
@Serializable
class
Common
:
ProtoBuf
{
@Serializable
class
BindInfo
(
@SerialId
(
1
)
val
friUin
:
Long
=
0L
,
@SerialId
(
2
)
val
friNick
:
String
=
""
,
@SerialId
(
3
)
val
time
:
Long
=
0L
,
@SerialId
(
4
)
val
bindStatus
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
MedalInfo
(
@SerialId
(
1
)
val
id
:
Int
=
0
,
@SerialId
(
2
)
val
type
:
Int
=
0
,
@SerialId
(
4
)
val
seq
:
Long
=
0
,
@SerialId
(
5
)
val
name
:
String
=
""
,
@SerialId
(
6
)
val
newflag
:
Int
=
0
,
@SerialId
(
7
)
val
time
:
Long
=
0L
,
@SerialId
(
8
)
val
msgBindFri
:
Common
.
BindInfo
?
=
null
,
@SerialId
(
11
)
val
desc
:
String
=
""
,
@SerialId
(
31
)
val
level
:
Int
=
0
,
@SerialId
(
36
)
val
taskinfos
:
List
<
Common
.
MedalTaskInfo
>?
=
null
,
@SerialId
(
40
)
val
point
:
Int
=
0
,
@SerialId
(
41
)
val
pointLevel2
:
Int
=
0
,
@SerialId
(
42
)
val
pointLevel3
:
Int
=
0
,
@SerialId
(
43
)
val
seqLevel2
:
Long
=
0
,
@SerialId
(
44
)
val
seqLevel3
:
Long
=
0
,
@SerialId
(
45
)
val
timeLevel2
:
Long
=
0L
,
@SerialId
(
46
)
val
timeLevel3
:
Long
=
0L
,
@SerialId
(
47
)
val
descLevel2
:
String
=
""
,
@SerialId
(
48
)
val
descLevel3
:
String
=
""
,
@SerialId
(
49
)
val
endtime
:
Int
=
0
,
@SerialId
(
50
)
val
detailUrl
:
String
=
""
,
@SerialId
(
51
)
val
detailUrl2
:
String
=
""
,
@SerialId
(
52
)
val
detailUrl3
:
String
=
""
,
@SerialId
(
53
)
val
taskDesc
:
String
=
""
,
@SerialId
(
54
)
val
taskDesc2
:
String
=
""
,
@SerialId
(
55
)
val
taskDesc3
:
String
=
""
,
@SerialId
(
56
)
val
levelCount
:
Int
=
0
,
@SerialId
(
57
)
val
noProgress
:
Int
=
0
,
@SerialId
(
58
)
val
resource
:
String
=
""
,
@SerialId
(
59
)
val
fromuinLevel
:
Int
=
0
,
@SerialId
(
60
)
val
unread
:
Int
=
0
,
@SerialId
(
61
)
val
unread2
:
Int
=
0
,
@SerialId
(
62
)
val
unread3
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
MedalTaskInfo
(
@SerialId
(
1
)
val
taskid
:
Int
=
0
,
@SerialId
(
32
)
val
int32TaskValue
:
Int
=
0
,
@SerialId
(
33
)
val
tarValue
:
Int
=
0
,
@SerialId
(
34
)
val
tarValueLevel2
:
Int
=
0
,
@SerialId
(
35
)
val
tarValueLevel3
:
Int
=
0
)
:
ProtoBuf
}
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Define.kt
0 → 100644
View file @
c69502a9
This diff is collapsed.
Click to expand it.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/Group.kt
0 → 100644
View file @
c69502a9
package
net.mamoe.mirai.qqandroid.network.protocol.data.proto
import
kotlinx.serialization.SerialId
import
kotlinx.serialization.Serializable
import
net.mamoe.mirai.qqandroid.io.ProtoBuf
import
net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
@Serializable
class
GroupLabel
:
ProtoBuf
{
@Serializable
class
Label
(
@SerialId
(
1
)
val
name
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
2
)
val
enumType
:
Int
/* enum */
=
1
,
@SerialId
(
3
)
val
textColor
:
GroupLabel
.
Color
?
=
null
,
@SerialId
(
4
)
val
edgingColor
:
GroupLabel
.
Color
?
=
null
,
@SerialId
(
5
)
val
labelAttr
:
Int
=
0
,
@SerialId
(
6
)
val
labelType
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
RspBody
(
@SerialId
(
1
)
val
error
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@SerialId
(
2
)
val
groupInfo
:
List
<
GroupLabel
.
GroupInfo
>?
=
null
)
:
ProtoBuf
@Serializable
class
SourceId
(
@SerialId
(
1
)
val
sourceId
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
GroupInfo
(
@SerialId
(
1
)
val
int32Result
:
Int
=
0
,
@SerialId
(
2
)
val
groupCode
:
Long
=
0L
,
@SerialId
(
3
)
val
groupLabel
:
List
<
GroupLabel
.
Label
>?
=
null
)
:
ProtoBuf
@Serializable
class
Color
(
@SerialId
(
1
)
val
r
:
Int
=
0
,
@SerialId
(
2
)
val
g
:
Int
=
0
,
@SerialId
(
3
)
val
b
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
ReqBody
(
@SerialId
(
1
)
val
sourceId
:
GroupLabel
.
SourceId
?
=
null
,
@SerialId
(
2
)
val
uinInfo
:
GroupLabel
.
UinInfo
?
=
null
,
@SerialId
(
3
)
val
numberLabel
:
Int
=
5
,
@SerialId
(
4
)
val
groupCode
:
List
<
Long
>?
=
null
,
@SerialId
(
5
)
val
labelStyle
:
Int
=
0
)
:
ProtoBuf
@Serializable
class
UinInfo
(
@SerialId
(
1
)
val
int64Longitude
:
Long
=
0L
,
@SerialId
(
2
)
val
int64Latitude
:
Long
=
0L
)
:
ProtoBuf
}
\ No newline at end of file
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/OIDB.kt
0 → 100644
View file @
c69502a9
This diff is collapsed.
Click to expand it.
mirai-core-qqandroid/src/jvmTest/kotlin/test/ProtoBufDataClassGenerator.kt
View file @
c69502a9
...
...
@@ -6,7 +6,7 @@ import java.io.File
fun
main
()
{
println
(
File
(
"""/Users/jiahua.liu/Desktop/QQAndroid-F/app/src/main/java/tencent/im/
s2c/msgtype0x210/submsgtype0xc7/bussinfo/mutualmark
"""
)
File
(
"""/Users/jiahua.liu/Desktop/QQAndroid-F/app/src/main/java/tencent/im/
group/group_label/
"""
)
.
generateUnarrangedClasses
().
toMutableList
().
arrangeClasses
().
joinToString
(
"\n\n"
)
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment