mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-25 03:30:15 +08:00
* [core] update protocol * [core] fix t106 decryption key * [core] handle t543 * [core] revert t106 * [core] revert native test pow data * [core] split build version and apk version name * [core] pass time to t1 instead of time diff * [core] remove unused t106 writer & rename param ip to ipv4 of t1 and t106 * [core] implement qimei for t545 TODO: aes and rsa crypto for nativeMain * [core] fix base64 decode for android in rsa * [core] fix unix timestamp parsing on native and add more tests * [api] DeviceInfo move `androidId` to main constructor and adjust test. * [api] do not request qimei when protocol is neither ANDROID_PHONE nor ANDROID_PAD * [api] implement aes crypto for native target * [api] rsa crypto for multi-platform * [api] crypto test * [api] move freePointer util * [api] openssl api compatibility * [core] add explicit `androidId` param * [core] remove unused `tlvCount` * [core] optimize crypto * [core] move Qimei to network package * [core] move appId to protocol * [core] lazily initialize qimeiLogger * [core] write byte array to BIO mem * [core] move qimei to client, add direct serializer for DeviceInfo * [core] optimize DeviceInfoDelegateSerializer * [core] real user-agent when requesting qimei * [core] use `DeviceInfo.version.release` * [core] remove unused wtlogin packet * [core] do what constructor serializer should do * [core] fix endless cache validation caused by not upgrading device info file. * [core] request qimei before fast-login * [core] tlv order * [core] remove wrong tests and print more detail when deserialize failed. * [core] device info upgrade for native * [core] request qimei after validating cache * [core] DeviceInfo compatibility * [core] DeviceInfo test name * [core] compatibility serializer * [core] disable rsa crypto test on android unit test * [core] move rsa impl to jvmBase * action * import * api dump * api dump * revert wrong api dumps * [core] Deprecate DeviceInfo constructor and serializer, provide `serializeToString` and `deserializeFromString` for replacement * rerun ci * optimize * use serializer directly * optimize test * revert * [core] CacheValidator use `DeviceInfo.serializeToString()` instead of direct serializer * Remove `println` in `DeviceInfoManager` * Add legacy deserialize overload for ABI compatibility * Remove uncompleted docs for DeviceInfo * Suppress DeviceInfo deprecation warnings for internal usages --------- Co-authored-by: Him188 <Him188@mamoe.net> |
||
---|---|---|
.. | ||
compatibility-validation | ||
src | ||
.gitignore | ||
build.gradle.kts | ||
README.md |
mirai-core
mirai 核心实现模块。首先阅读 mirai-core-api/README.md。
本文仅介绍重要部分。
架构
包名 | 描述 |
---|---|
net.mamoe.mirai.internal |
mirai 核心 API 的实现 |
.contact |
联系人实现 |
.message |
消息系统的实现 |
.network |
网络层实现 |
.utils |
工具类 |
net.mamoe.mirai.internal.contact
AbstractContact
所有 Contact
实现的基类. 实现生命周期等.
SendMessageHandler
处理 mirai 消息系统 Message
到协议数据结构的转换, 并处理长消息上传, 音乐转发上传等.
net.mamoe.mirai.internal.message
ReceiveMessageTransformer
处理协议数据结构到 Message
的转换. 设有 RefinableMessage
处理长消息下载, 合并转发下载并展开等.
RefinableMessage
支持处理长消息下载, 合并转发下载并展开等.
Image
实现
图片的实现的基类为 AbstractImage
.
在底层协议, 群图片与私聊图片很不同. 因此图片实现可以是 GroupImage
或 FriendImage
.
图片又细分了 OnlineImage
和 OfflineImage
. 故有 OnlineGroupImage
等四个类型, 及他们分别的 Impl
.
OnlineImage
为通过 Contact.uploadImage
上传得到的, 或刚刚从服务器接收的图片对象. OfflineImage
则为反序列化得到的对象.
MessageSource
实现
MessageSource
在协议底层十分复杂,