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
7838ccf0
Commit
7838ccf0
authored
Feb 20, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust file names
parent
57dfd0f1
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
34 additions
and
67 deletions
+34
-67
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/io/serialization/utils.kt
...otlin/net/mamoe/mirai/qqandroid/io/serialization/utils.kt
+5
-1
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageQQA.kt
...in/kotlin/net/mamoe/mirai/qqandroid/message/MessageQQA.kt
+4
-3
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/GuidSource.kt
...Main/kotlin/net/mamoe/mirai/qqandroid/utils/GuidSource.kt
+5
-1
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/flags.kt
...ommonMain/kotlin/net/mamoe/mirai/qqandroid/utils/flags.kt
+6
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/inline.kt
...mmonMain/kotlin/net/mamoe/mirai/qqandroid/utils/inline.kt
+5
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
...commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
+7
-1
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/MiraiEnvironment.kt
...rc/androidMain/kotlin/net/mamoe/mirai/MiraiEnvironment.kt
+0
-14
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/platformAndroid.kt
...droidMain/kotlin/net/mamoe/mirai/utils/platformAndroid.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/MiraiEnvironment.kt
...src/commonMain/kotlin/net.mamoe.mirai/MiraiEnvironment.kt
+0
-25
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/annotataions.kt
...c/commonMain/kotlin/net.mamoe.mirai/utils/annotataions.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/protoBuf.kt
...mmonMain/kotlin/net.mamoe.mirai/utils/cryptor/protoBuf.kt
+0
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/byteArrays.kt
.../commonMain/kotlin/net.mamoe.mirai/utils/io/byteArrays.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/conversion.kt
.../commonMain/kotlin/net.mamoe.mirai/utils/io/conversion.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/debugging.kt
...c/commonMain/kotlin/net.mamoe.mirai/utils/io/debugging.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt
...e/src/commonMain/kotlin/net.mamoe.mirai/utils/io/input.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/output.kt
.../src/commonMain/kotlin/net.mamoe.mirai/utils/io/output.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/maps.kt
...-core/src/commonMain/kotlin/net.mamoe.mirai/utils/maps.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/numbers.kt
...re/src/commonMain/kotlin/net.mamoe.mirai/utils/numbers.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt
...e/src/commonMain/kotlin/net.mamoe.mirai/utils/platform.kt
+0
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/time.kt
...-core/src/commonMain/kotlin/net.mamoe.mirai/utils/time.kt
+0
-1
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt
...-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt
+2
-2
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/MiraiEnvironmentJvm.kt
...src/jvmMain/kotlin/net/mamoe/mirai/MiraiEnvironmentJvm.kt
+0
-18
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/io/serialization/
SerializationU
tils.kt
→
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/io/serialization/
u
tils.kt
View file @
7838ccf0
...
...
@@ -7,6 +7,9 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
JvmName
(
"SerializationUtils"
)
@
file
:
JvmMultifileClass
package
net.mamoe.mirai.qqandroid.io.serialization
import
kotlinx.io.core.*
...
...
@@ -20,7 +23,8 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestDataVersion3
import
net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPacket
import
net.mamoe.mirai.utils.firstValue
import
net.mamoe.mirai.utils.io.read
import
net.mamoe.mirai.utils.io.toUHexString
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
fun
<
T
:
JceStruct
>
ByteArray
.
loadAs
(
deserializer
:
DeserializationStrategy
<
T
>,
c
:
JceCharset
=
JceCharset
.
UTF8
):
T
{
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageQQA.kt
View file @
7838ccf0
...
...
@@ -20,7 +20,7 @@ import net.mamoe.mirai.utils.io.hexToBytes
import
net.mamoe.mirai.utils.io.read
import
net.mamoe.mirai.utils.io.toByteArray
private
val
AT_BUF_1
=
byteArrayOf
(
0
x00
,
0
x01
,
0
x00
,
0
x00
,
0
x00
,
0
x0
A
,
0
x00
)
private
val
AT_BUF_1
=
byteArrayOf
(
0
x00
,
0
x01
,
0
x00
,
0
x00
,
0
x00
,
0
x0
7
,
0
x00
)
// groupCard = 0x07; nick = 0x0A
private
val
AT_BUF_2
=
ByteArray
(
2
)
internal
fun
At
.
toJceData
():
ImMsgBody
.
Text
{
...
...
@@ -328,8 +328,9 @@ internal fun List<ImMsgBody.Elem>.joinToMessageChain(message: MessageChain) {
if
(
it
.
text
.
attr6Buf
.
isEmpty
())
{
message
.
add
(
it
.
text
.
str
.
toMessage
())
}
else
{
//00 01 00 00 00 05 01 00 00 00 00 00 00 all
//00 01 00 00 00 0A 00 3E 03 3F A2 00 00 one
// 00 01 00 00 00 05 01 00 00 00 00 00 00 all
// 00 01 00 00 00 0A 00 3E 03 3F A2 00 00 one/nick
// 00 01 00 00 00 07 00 44 71 47 90 00 00 one/groupCard
val
id
:
Long
it
.
text
.
attr6Buf
.
read
{
discardExact
(
7
)
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/Guid.kt
→
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/Guid
Source
.kt
View file @
7838ccf0
...
...
@@ -7,9 +7,13 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
JvmName
(
"Utils"
)
@
file
:
JvmMultifileClass
package
net.mamoe.mirai.qqandroid.utils
import
net.mamoe.mirai.utils.md5
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
import
kotlin.jvm.JvmStatic
/**
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/
F
lags.kt
→
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/
f
lags.kt
View file @
7838ccf0
...
...
@@ -7,8 +7,14 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
JvmName
(
"Utils"
)
@
file
:
JvmMultifileClass
package
net.mamoe.mirai.qqandroid.utils
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
inline
class
MacOrAndroidIdChangeFlag
(
val
value
:
Long
=
0
)
{
fun
macChanged
():
MacOrAndroidIdChangeFlag
=
MacOrAndroidIdChangeFlag
(
this
.
value
or
0
x1
)
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/inline.kt
View file @
7838ccf0
...
...
@@ -7,11 +7,16 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
JvmName
(
"Utils"
)
@
file
:
JvmMultifileClass
package
net.mamoe.mirai.qqandroid.utils
import
kotlin.contracts.ExperimentalContracts
import
kotlin.contracts.InvocationKind
import
kotlin.contracts.contract
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
/**
* Inline the block
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
View file @
7838ccf0
...
...
@@ -7,10 +7,16 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
JvmName
(
"Utils"
)
@
file
:
JvmMultifileClass
package
net.mamoe.mirai.qqandroid.utils
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
fun
Int
.
toIpV4AddressString
():
String
{
internal
fun
Int
.
toIpV4AddressString
():
String
{
@Suppress
(
"NAME_SHADOWING"
)
var
var0
=
this
.
toLong
()
and
0
xFFFFFFFF
return
buildString
{
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/MiraiEnvironment.kt
deleted
100644 → 0
View file @
57dfd0f1
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
package
net.mamoe.mirai
actual
object
MiraiEnvironment
{
actual
val
platform
:
Platform
get
()
=
Platform
.
ANDROID
}
\ No newline at end of file
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/
PlatformUtils
Android.kt
→
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/
platform
Android.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/MiraiEnvironment.kt
deleted
100644 → 0
View file @
57dfd0f1
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
package
net.mamoe.mirai
/**
* 平台相关环境属性
*/
expect
object
MiraiEnvironment
{
val
platform
:
Platform
}
/**
* 可用平台列表
*/
enum
class
Platform
{
ANDROID
,
JVM
}
\ No newline at end of file
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
Annotat
ions.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
annotata
ions.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/
Proto
.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/
protoBuf
.kt
View file @
7838ccf0
...
...
@@ -17,7 +17,6 @@ import kotlinx.io.core.readUInt
import
kotlinx.io.core.readULong
import
net.mamoe.mirai.utils.MiraiDebugAPI
import
net.mamoe.mirai.utils.MiraiExperimentalAPI
import
net.mamoe.mirai.utils.MiraiInternalAPI
import
net.mamoe.mirai.utils.io.*
import
kotlin.jvm.JvmStatic
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
ByteArrayUtil
.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
byteArrays
.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
TypeC
onversion.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
c
onversion.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
DebugUtil
.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
debugging
.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
InputUtils
.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
input
.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
OutputUtils
.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/
output
.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/map.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/map
s
.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
NumberUtil
s.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
number
s.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
PlatformUtils
.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
platform
.kt
View file @
7838ccf0
File moved
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
T
ime.kt
→
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/
t
ime.kt
View file @
7838ccf0
...
...
@@ -14,7 +14,6 @@ package net.mamoe.mirai.utils
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
import
kotlin.time.seconds
// 临时使用, 待 Kotlin Duration 稳定后使用 Duration.
// 内联属性, 则将来删除这些 API 将不会导致二进制不兼容.
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt
View file @
7838ccf0
...
...
@@ -29,13 +29,13 @@ internal val factory: BotFactory = run {
"""
No BotFactory found. Please ensure that you've added dependency of protocol modules.
Available modules:
- net.mamoe:mirai-core-timpc
- net.mamoe:mirai-core-timpc
(stays at 0.12.0)
- net.mamoe:mirai-core-qqandroid (recommended)
You should have at lease one protocol module installed.
-------------------------------------------------------
找不到 BotFactory. 请确保你依赖了至少一个协议模块.
可用的协议模块:
- net.mamoe:mirai-core-timpc
- net.mamoe:mirai-core-timpc
(0.12.0 后停止更新)
- net.mamoe:mirai-core-qqandroid (推荐)
请添加上述任一模块的依赖(与 mirai-core 版本相同)
"""
.
trimIndent
()
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/MiraiEnvironmentJvm.kt
deleted
100644 → 0
View file @
57dfd0f1
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
Suppress
(
"MayBeConstant"
,
"unused"
)
package
net.mamoe.mirai
actual
object
MiraiEnvironment
{
@JvmStatic
actual
val
platform
:
Platform
get
()
=
Platform
.
JVM
}
\ No newline at end of file
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