From 361b842aa1910f87d9ca218494b498c619fe95c3 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 20 Dec 2019 09:34:35 +0800 Subject: [PATCH] Move package `...network.data` to `...data` --- .../commonMain/kotlin/net.mamoe.mirai.timpc/TIMPCBot.kt | 3 +++ .../kotlin/net.mamoe.mirai.timpc/internal/RawGroupInfo.kt | 2 +- .../kotlin/net.mamoe.mirai.timpc/network/ContactImpl.kt | 8 ++++---- .../net.mamoe.mirai.timpc/network/TIMBotNetworkHandler.kt | 4 ++-- .../network/handler/TemporaryPacketHandler.kt | 2 +- .../network/packet/OutgoingPacket.kt | 2 +- .../kotlin/net.mamoe.mirai.timpc/network/packet/Packet.kt | 2 +- .../net.mamoe.mirai.timpc/network/packet/PacketFactory.kt | 2 +- .../network/packet/action/AddContact.kt | 6 +++--- .../network/packet/action/FriendImage.kt | 4 ++-- .../network/packet/action/FriendList.kt | 2 +- .../network/packet/action/GradeInfo.kt | 2 +- .../network/packet/action/GroupImage.kt | 4 ++-- .../network/packet/action/GroupPacket.kt | 2 +- .../network/packet/action/Profile.kt | 6 +++--- .../net.mamoe.mirai.timpc/network/packet/action/Remark.kt | 2 +- .../network/packet/action/RequestFriendListPacket.kt | 2 +- .../network/packet/action/SendFriendMessagePacket.kt | 2 +- .../network/packet/event/AndroidOnlineStatusChange.kt | 2 +- .../network/packet/event/EventPacketFactory.kt | 2 +- .../network/packet/event/FriendConversationIniliaze.kt | 2 +- .../network/packet/event/GroupFileUpload.kt | 2 +- .../net.mamoe.mirai.timpc/network/packet/event/Ignored.kt | 2 +- .../network/packet/event/MemberKickEvent.kt | 2 +- .../network/packet/event/MemberPermission.kt | 2 +- .../net.mamoe.mirai.timpc/network/packet/event/Unknown.kt | 2 +- .../net.mamoe.mirai.timpc/network/packet/login/Captcha.kt | 2 +- .../network/packet/login/ChangeOnlineStatusPacket.kt | 2 +- .../network/packet/login/Heartbeat.kt | 2 +- .../network/packet/login/PasswordSubmission.kt | 6 +++--- .../net.mamoe.mirai.timpc/network/packet/login/SKey.kt | 2 +- .../net.mamoe.mirai.timpc/network/packet/login/Session.kt | 2 +- .../net.mamoe.mirai.timpc/network/packet/login/Touch.kt | 2 +- mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt | 4 ++-- .../src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt | 3 ++- .../commonMain/kotlin/net.mamoe.mirai/contact/Group.kt | 2 +- .../src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt | 6 +++--- .../net.mamoe.mirai/{network => }/data/AddFriendResult.kt | 2 +- .../net.mamoe.mirai/{network => }/data/EventPacket.kt | 2 +- .../{network => }/data/FriendNameRemark.kt | 2 +- .../net.mamoe.mirai/{network => }/data/GroupInfo.kt | 2 +- .../net.mamoe.mirai/{network => }/data/ImageLink.kt | 2 +- .../net.mamoe.mirai/{network => }/data/LoginResult.kt | 2 +- .../kotlin/net.mamoe.mirai/{network => }/data/Packet.kt | 2 +- .../{network => }/data/PreviousNameList.kt | 2 +- .../kotlin/net.mamoe.mirai/{network => }/data/Profile.kt | 2 +- .../event/events/ConnectionOccupiedEvent.kt | 2 +- .../net.mamoe.mirai/event/events/FriendStatusChanged.kt | 2 +- .../kotlin/net.mamoe.mirai/event/events/MuteEvent.kt | 2 +- .../event/events/ReceiveFriendAddRequestEvent.kt | 2 +- .../kotlin/net.mamoe.mirai/message/MessagePacket.kt | 4 ++-- .../kotlin/net.mamoe.mirai/utils/LoginFailedException.kt | 2 +- 52 files changed, 71 insertions(+), 67 deletions(-) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/AddFriendResult.kt (96%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/EventPacket.kt (80%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/FriendNameRemark.kt (71%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/GroupInfo.kt (95%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/ImageLink.kt (92%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/LoginResult.kt (96%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/Packet.kt (59%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/PreviousNameList.kt (88%) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/{network => }/data/Profile.kt (97%) diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/TIMPCBot.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/TIMPCBot.kt index e1332c944..637c73475 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/TIMPCBot.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/TIMPCBot.kt @@ -5,6 +5,9 @@ import net.mamoe.mirai.Bot import net.mamoe.mirai.BotAccount import net.mamoe.mirai.BotImpl import net.mamoe.mirai.contact.* +import net.mamoe.mirai.data.AddFriendResult +import net.mamoe.mirai.data.ImageLink +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.ImageId0x03 import net.mamoe.mirai.message.data.ImageId0x06 diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/internal/RawGroupInfo.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/internal/RawGroupInfo.kt index 94b90d38c..9482f927b 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/internal/RawGroupInfo.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/internal/RawGroupInfo.kt @@ -1,7 +1,7 @@ package net.mamoe.mirai.timpc.internal import net.mamoe.mirai.contact.* -import net.mamoe.mirai.network.data.GroupInfo +import net.mamoe.mirai.data.GroupInfo import net.mamoe.mirai.timpc.TIMPCBot import net.mamoe.mirai.timpc.network.packet.action.GroupPacket import net.mamoe.mirai.utils.LockFreeLinkedList diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/ContactImpl.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/ContactImpl.kt index 3191bf2e9..8518ab32c 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/ContactImpl.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/ContactImpl.kt @@ -9,10 +9,10 @@ import net.mamoe.mirai.contact.* import net.mamoe.mirai.event.subscribeAlways import net.mamoe.mirai.message.data.ImageId import net.mamoe.mirai.message.data.MessageChain -import net.mamoe.mirai.network.data.FriendNameRemark -import net.mamoe.mirai.network.data.GroupInfo -import net.mamoe.mirai.network.data.PreviousNameList -import net.mamoe.mirai.network.data.Profile +import net.mamoe.mirai.data.FriendNameRemark +import net.mamoe.mirai.data.GroupInfo +import net.mamoe.mirai.data.PreviousNameList +import net.mamoe.mirai.data.Profile import net.mamoe.mirai.qqAccount import net.mamoe.mirai.timpc.TIMPCBot import net.mamoe.mirai.timpc.internal.RawGroupInfo diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/TIMBotNetworkHandler.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/TIMBotNetworkHandler.kt index 9b9d41435..c5d994a1f 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/TIMBotNetworkHandler.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/TIMBotNetworkHandler.kt @@ -12,8 +12,8 @@ import net.mamoe.mirai.event.Subscribable import net.mamoe.mirai.event.broadcast import net.mamoe.mirai.event.events.BotLoginSucceedEvent import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.LoginResult -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.LoginResult +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.qqAccount import net.mamoe.mirai.timpc.TIMPCBot import net.mamoe.mirai.timpc.network.handler.DataPacketSocketAdapter diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/handler/TemporaryPacketHandler.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/handler/TemporaryPacketHandler.kt index edd2f4400..36d9c6c66 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/handler/TemporaryPacketHandler.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/handler/TemporaryPacketHandler.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.handler import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.withContext -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import kotlin.coroutines.CoroutineContext import kotlin.reflect.KClass diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/OutgoingPacket.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/OutgoingPacket.kt index 8cb546594..409670cb0 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/OutgoingPacket.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/OutgoingPacket.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.* import kotlinx.serialization.SerializationStrategy import kotlinx.serialization.protobuf.ProtoBuf import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.utils.io.hexToBytes import net.mamoe.mirai.utils.io.writeQQ diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/Packet.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/Packet.kt index 41833e612..6ea111429 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/Packet.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/Packet.kt @@ -2,7 +2,7 @@ package net.mamoe.mirai.timpc.network.packet import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.readBytes -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.utils.io.toUHexString /** diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/PacketFactory.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/PacketFactory.kt index e18f36e9f..94326783c 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/PacketFactory.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/PacketFactory.kt @@ -10,7 +10,7 @@ import kotlinx.io.pool.useInstance import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.protobuf.ProtoBuf import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.utils.io.ByteArrayPool import net.mamoe.mirai.utils.io.debugPrint import net.mamoe.mirai.utils.io.read diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/AddContact.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/AddContact.kt index bbfd9ee71..8b1ee8d9b 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/AddContact.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/AddContact.kt @@ -5,9 +5,9 @@ package net.mamoe.mirai.timpc.network.packet.action import kotlinx.io.core.* import net.mamoe.mirai.contact.QQ import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.EventPacket -import net.mamoe.mirai.network.data.Packet -import net.mamoe.mirai.network.data.PreviousNameList +import net.mamoe.mirai.data.EventPacket +import net.mamoe.mirai.data.Packet +import net.mamoe.mirai.data.PreviousNameList import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendImage.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendImage.kt index d7155edb3..2c5ad30fa 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendImage.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendImage.kt @@ -8,8 +8,8 @@ import net.mamoe.mirai.message.data.ImageId import net.mamoe.mirai.message.data.ImageId0x06 import net.mamoe.mirai.message.data.requireLength import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.EventPacket -import net.mamoe.mirai.network.data.ImageLink +import net.mamoe.mirai.data.EventPacket +import net.mamoe.mirai.data.ImageLink import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.ExternalImage diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendList.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendList.kt index 2e335bf39..3375a6802 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendList.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/FriendList.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.packet.action import kotlinx.io.core.ByteReadPacket import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.packet.PacketId import net.mamoe.mirai.timpc.network.packet.SessionPacketFactory diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GradeInfo.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GradeInfo.kt index 6329677af..9ec3f9c13 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GradeInfo.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GradeInfo.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.writeFully import kotlinx.io.core.writeUByte import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.writeQQ diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupImage.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupImage.kt index 3cb7a94b9..244ac85d7 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupImage.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupImage.kt @@ -9,8 +9,8 @@ import net.mamoe.mirai.contact.GroupInternalId import net.mamoe.mirai.message.data.ImageId0x03 import net.mamoe.mirai.message.data.requireLength import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.EventPacket -import net.mamoe.mirai.network.data.ImageLink +import net.mamoe.mirai.data.EventPacket +import net.mamoe.mirai.data.ImageLink import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.timpc.utils.assertUnreachable import net.mamoe.mirai.utils.ExternalImage diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupPacket.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupPacket.kt index df1ea70c7..b2eb5681d 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupPacket.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/GroupPacket.kt @@ -9,7 +9,7 @@ import net.mamoe.mirai.contact.groupInternalId import net.mamoe.mirai.message.data.MessageChain import net.mamoe.mirai.message.internal.toPacket import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.internal.RawGroupInfo import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Profile.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Profile.kt index 27d133dd2..bfed95602 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Profile.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Profile.kt @@ -4,10 +4,10 @@ package net.mamoe.mirai.timpc.network.packet.action import io.ktor.util.date.GMTDate import kotlinx.io.core.* -import net.mamoe.mirai.network.data.Gender -import net.mamoe.mirai.network.data.Profile +import net.mamoe.mirai.data.Gender +import net.mamoe.mirai.data.Profile import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Remark.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Remark.kt index 7a41f6dd9..11289ca1c 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Remark.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/Remark.kt @@ -5,7 +5,7 @@ package net.mamoe.mirai.timpc.network.packet.action import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.discardExact import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.FriendNameRemark +import net.mamoe.mirai.data.FriendNameRemark import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.readUShortLVString import net.mamoe.mirai.utils.io.writeQQ diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/RequestFriendListPacket.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/RequestFriendListPacket.kt index 48cb56a61..9d5f47716 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/RequestFriendListPacket.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/RequestFriendListPacket.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.packet.action import kotlinx.io.core.ByteReadPacket import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.writeZero diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/SendFriendMessagePacket.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/SendFriendMessagePacket.kt index 98a3366f7..0eaaf02bd 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/SendFriendMessagePacket.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/action/SendFriendMessagePacket.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.* import net.mamoe.mirai.message.data.MessageChain import net.mamoe.mirai.message.internal.toPacket import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/AndroidOnlineStatusChange.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/AndroidOnlineStatusChange.kt index 069ee8dc9..5d8f8cbad 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/AndroidOnlineStatusChange.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/AndroidOnlineStatusChange.kt @@ -5,7 +5,7 @@ package net.mamoe.mirai.timpc.network.packet.event import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.discardExact import net.mamoe.mirai.Bot -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.packet.PacketVersion import net.mamoe.mirai.utils.io.readBoolean diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/EventPacketFactory.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/EventPacketFactory.kt index c95d6fd68..433f5105a 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/EventPacketFactory.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/EventPacketFactory.kt @@ -5,7 +5,7 @@ package net.mamoe.mirai.timpc.network.packet.event import kotlinx.io.core.* import net.mamoe.mirai.Bot import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMBotNetworkHandler import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.qqAccount diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/FriendConversationIniliaze.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/FriendConversationIniliaze.kt index 4c954af93..3b1868871 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/FriendConversationIniliaze.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/FriendConversationIniliaze.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.discardExact import kotlinx.io.core.readUInt import net.mamoe.mirai.Bot -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.timpc.network.packet.PacketVersion import net.mamoe.mirai.utils.io.readQQ diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/GroupFileUpload.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/GroupFileUpload.kt index 27fd9c472..765f31edd 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/GroupFileUpload.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/GroupFileUpload.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.packet.event import kotlinx.io.core.ByteReadPacket import net.mamoe.mirai.Bot -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.timpc.network.packet.PacketVersion import net.mamoe.mirai.utils.io.debugPrint diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Ignored.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Ignored.kt index 4f334d8e9..fb60c6837 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Ignored.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Ignored.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.packet.event import kotlinx.io.core.ByteReadPacket import net.mamoe.mirai.Bot -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.utils.io.toUHexString internal inline class IgnoredEventPacket(val id: UShort) : EventPacket { diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberKickEvent.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberKickEvent.kt index be1bcb1f7..36f3299f3 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberKickEvent.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberKickEvent.kt @@ -7,7 +7,7 @@ import kotlinx.io.core.readUByte import net.mamoe.mirai.Bot import net.mamoe.mirai.contact.Group import net.mamoe.mirai.contact.Member -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.qqAccount import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberPermission.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberPermission.kt index e325e0f19..86b3c105e 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberPermission.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/MemberPermission.kt @@ -5,7 +5,7 @@ package net.mamoe.mirai.timpc.network.packet.event import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.discardExact import net.mamoe.mirai.Bot -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.timpc.network.packet.PacketVersion import net.mamoe.mirai.utils.io.readQQ import net.mamoe.mirai.contact.Member diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Unknown.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Unknown.kt index 89caf36ed..9f3bd3b4c 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Unknown.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/event/Unknown.kt @@ -7,7 +7,7 @@ import kotlinx.io.core.readBytes import kotlinx.io.pool.useInstance import net.mamoe.mirai.Bot import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.utils.io.ByteArrayPool import net.mamoe.mirai.utils.io.toUHexString diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Captcha.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Captcha.kt index f42dd56fb..2b7a34946 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Captcha.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Captcha.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.packet.login import kotlinx.io.core.* import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/ChangeOnlineStatusPacket.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/ChangeOnlineStatusPacket.kt index 0771e148e..14e61071b 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/ChangeOnlineStatusPacket.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/ChangeOnlineStatusPacket.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.writeFully import kotlinx.io.core.writeUByte import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.OnlineStatus diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Heartbeat.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Heartbeat.kt index c4d1c26f6..7ce4efeaa 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Heartbeat.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Heartbeat.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.writeFully import net.mamoe.mirai.event.Subscribable import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.writeHex diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/PasswordSubmission.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/PasswordSubmission.kt index f6affcbc4..7ccbb92d9 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/PasswordSubmission.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/PasswordSubmission.kt @@ -3,10 +3,10 @@ package net.mamoe.mirai.timpc.network.packet.login import kotlinx.io.core.* -import net.mamoe.mirai.network.data.Gender +import net.mamoe.mirai.data.Gender import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.LoginResult -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.LoginResult +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/SKey.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/SKey.kt index 176851afa..f8c3b4c04 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/SKey.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/SKey.kt @@ -6,7 +6,7 @@ import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.discardExact import kotlinx.io.core.writeFully import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Session.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Session.kt index 010ea95c1..dede09af8 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Session.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Session.kt @@ -4,7 +4,7 @@ package net.mamoe.mirai.timpc.network.packet.login import kotlinx.io.core.* import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Touch.kt b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Touch.kt index 42c79bed9..bb87f2003 100644 --- a/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Touch.kt +++ b/mirai-core-timpc/src/commonMain/kotlin/net.mamoe.mirai.timpc/network/packet/login/Touch.kt @@ -7,7 +7,7 @@ import kotlinx.io.core.discardExact import kotlinx.io.core.readBytes import kotlinx.io.core.writeFully import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.Packet +import net.mamoe.mirai.data.Packet import net.mamoe.mirai.timpc.network.TIMProtocol import net.mamoe.mirai.timpc.network.packet.* import net.mamoe.mirai.utils.io.* diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt index 8cd51b69b..1eecc5603 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt @@ -8,10 +8,10 @@ import kotlinx.io.OutputStream import kotlinx.io.core.ByteReadPacket import kotlinx.io.core.use import net.mamoe.mirai.contact.* +import net.mamoe.mirai.data.AddFriendResult +import net.mamoe.mirai.data.ImageLink import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.network.BotNetworkHandler -import net.mamoe.mirai.network.data.AddFriendResult -import net.mamoe.mirai.network.data.ImageLink import net.mamoe.mirai.utils.BotConfiguration import net.mamoe.mirai.utils.GroupNotFoundException import net.mamoe.mirai.utils.MiraiInternalAPI diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt index 9428393b3..067608893 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt @@ -1,3 +1,5 @@ +@file:Suppress("FunctionName") + package net.mamoe.mirai import kotlinx.coroutines.CoroutineScope @@ -10,7 +12,6 @@ import net.mamoe.mirai.utils.MiraiLogger * - `mirai-core-timpc`: `TIMPC` * - `mirai-core-qqandroid`: `QQAndroid` */ -@Suppress("FunctionName") interface BotFactory { /** * 在当前 CoroutineScope 下构造 Bot 实例 diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt index 7e6d753cc..2f6f80eb6 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt @@ -3,7 +3,7 @@ package net.mamoe.mirai.contact import kotlinx.coroutines.CoroutineScope -import net.mamoe.mirai.network.data.GroupInfo +import net.mamoe.mirai.data.GroupInfo import net.mamoe.mirai.utils.internal.coerceAtLeastOrFail diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt index 711de3f99..918a787e7 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt @@ -4,9 +4,9 @@ package net.mamoe.mirai.contact import kotlinx.coroutines.CoroutineScope import net.mamoe.mirai.Bot -import net.mamoe.mirai.network.data.FriendNameRemark -import net.mamoe.mirai.network.data.PreviousNameList -import net.mamoe.mirai.network.data.Profile +import net.mamoe.mirai.data.FriendNameRemark +import net.mamoe.mirai.data.PreviousNameList +import net.mamoe.mirai.data.Profile /** * QQ 对象. diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/AddFriendResult.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/AddFriendResult.kt similarity index 96% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/AddFriendResult.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/AddFriendResult.kt index 302b3390e..f1fa27b5f 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/AddFriendResult.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/AddFriendResult.kt @@ -2,7 +2,7 @@ @file:JvmName("BotHelperKt") @file:Suppress("EXPERIMENTAL_API_USAGE") -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data import kotlin.jvm.JvmMultifileClass import kotlin.jvm.JvmName diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/EventPacket.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/EventPacket.kt similarity index 80% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/EventPacket.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/EventPacket.kt index de92630c8..2d45617f8 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/EventPacket.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/EventPacket.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data import net.mamoe.mirai.event.Subscribable diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/FriendNameRemark.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/FriendNameRemark.kt similarity index 71% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/FriendNameRemark.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/FriendNameRemark.kt index 64bc4f9f7..896730a31 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/FriendNameRemark.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/FriendNameRemark.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data /** * 给好友设置的备注 diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/GroupInfo.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/GroupInfo.kt similarity index 95% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/GroupInfo.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/GroupInfo.kt index da45a8152..46f147ae7 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/GroupInfo.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/GroupInfo.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data import net.mamoe.mirai.contact.ContactList import net.mamoe.mirai.contact.Group diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/ImageLink.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/ImageLink.kt similarity index 92% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/ImageLink.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/ImageLink.kt index 55e24564a..1437f0c9b 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/ImageLink.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/ImageLink.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data import io.ktor.client.request.get import io.ktor.util.KtorExperimentalAPI diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/LoginResult.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/LoginResult.kt similarity index 96% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/LoginResult.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/LoginResult.kt index 88e30b4d4..1dda11427 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/LoginResult.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/LoginResult.kt @@ -1,6 +1,6 @@ @file:Suppress("unused") -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data import net.mamoe.mirai.utils.BotConfiguration diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/Packet.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/Packet.kt similarity index 59% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/Packet.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/Packet.kt index 9d7d08b6d..507dd17a3 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/Packet.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/Packet.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data /** * 一个包的数据 (body) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/PreviousNameList.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/PreviousNameList.kt similarity index 88% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/PreviousNameList.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/PreviousNameList.kt index 637f93924..6c87a61f3 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/PreviousNameList.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/PreviousNameList.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data /** * 曾用名列表 diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/Profile.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/Profile.kt similarity index 97% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/Profile.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/Profile.kt index 80d8d9303..1daabbf4f 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/data/Profile.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/data/Profile.kt @@ -1,6 +1,6 @@ @file:Suppress("EXPERIMENTAL_API_USAGE") -package net.mamoe.mirai.network.data +package net.mamoe.mirai.data import io.ktor.util.date.GMTDate diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ConnectionOccupiedEvent.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ConnectionOccupiedEvent.kt index 73a4a0c16..b82486131 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ConnectionOccupiedEvent.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ConnectionOccupiedEvent.kt @@ -1,6 +1,6 @@ package net.mamoe.mirai.event.events -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket /** * 被挤下线. 只能获取到中文的消息 diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/FriendStatusChanged.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/FriendStatusChanged.kt index 22de35d54..b889aca96 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/FriendStatusChanged.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/FriendStatusChanged.kt @@ -1,7 +1,7 @@ package net.mamoe.mirai.event.events import net.mamoe.mirai.contact.QQ -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.utils.OnlineStatus data class FriendStatusChanged( diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/MuteEvent.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/MuteEvent.kt index bba468b87..c06918963 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/MuteEvent.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/MuteEvent.kt @@ -2,7 +2,7 @@ package net.mamoe.mirai.event.events import net.mamoe.mirai.contact.Group import net.mamoe.mirai.contact.Member -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket // region mute diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ReceiveFriendAddRequestEvent.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ReceiveFriendAddRequestEvent.kt index 20f1ae813..0a7d591b1 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ReceiveFriendAddRequestEvent.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/ReceiveFriendAddRequestEvent.kt @@ -1,7 +1,7 @@ package net.mamoe.mirai.event.events import net.mamoe.mirai.contact.QQ -import net.mamoe.mirai.network.data.EventPacket +import net.mamoe.mirai.data.EventPacket import net.mamoe.mirai.utils.unsafeWeakRef import kotlin.jvm.JvmOverloads diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt index e4ec5c9a2..9353d58b3 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt @@ -5,10 +5,10 @@ package net.mamoe.mirai.message import kotlinx.io.core.ByteReadPacket import net.mamoe.mirai.Bot import net.mamoe.mirai.contact.* +import net.mamoe.mirai.data.EventPacket +import net.mamoe.mirai.data.ImageLink import net.mamoe.mirai.event.events.BotEvent import net.mamoe.mirai.message.data.* -import net.mamoe.mirai.network.data.EventPacket -import net.mamoe.mirai.network.data.ImageLink import net.mamoe.mirai.utils.* import net.mamoe.mirai.utils.internal.coerceAtLeastOrFail import kotlin.jvm.JvmName diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/LoginFailedException.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/LoginFailedException.kt index 5274825e0..a853af3ec 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/LoginFailedException.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/LoginFailedException.kt @@ -1,6 +1,6 @@ package net.mamoe.mirai.utils -import net.mamoe.mirai.network.data.LoginResult +import net.mamoe.mirai.data.LoginResult class LoginFailedException( val result: LoginResult,