185 Commits

Author SHA1 Message Date
46ed966c18 Shamrock: recommend Lagrange
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-24 01:01:41 +08:00
623dc5da07 Shamrock: fix all multimedia pic fetch
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-24 00:34:28 +08:00
bd6d4f046c Shamrock: Remove rkey cache
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-23 20:52:44 +08:00
9ad66f2f92 Shamrock: fix #251
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-23 19:33:36 +08:00
b4c40e236a Shamrock: 快速序列化/反序列化 Protobuf
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-23 18:23:02 +08:00
9bbcc2f160 Shamrock: 允许私聊接收multimedia资源图片 #251
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-23 14:17:52 +08:00
00b355b877 Shamrock: fix #248
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-23 08:36:34 +08:00
071ddbb69a Shamrock: update LICENSE
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-22 18:13:55 +08:00
4d5c054bc4 Shamrock: 开源开发许可证
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-22 18:12:31 +08:00
87629666f2 refactor send_forward_msg(暂时只支持收发文字消息) 2024-02-22 01:04:56 +08:00
75633f78c4 Shamrock: fix #248
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-21 21:31:59 +08:00
c940aea153 Shamrock: Reusable and restrictive coroutine context
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-21 15:17:53 +08:00
18126b1fda fix bug 2024-02-21 02:16:47 +08:00
e9884a5fa8 fix bug(暂未完成 请勿使用) 2024-02-21 02:16:47 +08:00
aa7b241dba refactor send_forward_msg(暂未完成 请勿使用) 2024-02-21 02:16:46 +08:00
c70f3eabfe Shamrock: typo BaseTransmitServlet.kt
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-19 11:30:22 +08:00
1c65aab673 refactor send_forward_msg(暂未完成 请勿使用) 2024-02-19 04:14:26 +08:00
a5cdd64686 upgrade workflow 2024-02-19 04:13:50 +08:00
b07ca5bd03 fix linq 2024-02-19 04:13:49 +08:00
8f8580d542 Shamrock: remove debug log #242
Signed-off-by: 白池 <whitechi73@outlook.com>
2024-02-18 21:16:23 +08:00
0ed4480878 Shamrock: fix #242 2024-02-18 21:16:04 +08:00
c3e0031aa4 Shamrock: debug #242 2024-02-18 20:36:42 +08:00
388c963e88 Shamrock: fix markdown parser 2024-02-18 20:28:45 +08:00
4283651b1e Shamrock: fix comm_elem parser 2024-02-18 20:08:57 +08:00
50d7dfa06d Shamrock: support inline_keyboard msg 2024-02-18 20:00:37 +08:00
b3a2e605fb Shamrock: fix NT image acquisition 2024-02-18 18:52:56 +08:00
14bf5fc0a2 Shamrock: fix fakeReceiveSelfMsg 2024-02-18 07:51:43 +08:00
2c8b57a7dc Shamrock: fix #238 2024-02-18 07:45:48 +08:00
8e6c167987 Shamrock: fix #236 2024-02-18 07:37:47 +08:00
2c8094c8c8 Shamrock: 临时修补rkey缺失导致的qqnt图片无法获取 #236 2024-02-17 19:39:26 +08:00
62385d6f62 Shamrock: 修复合并转发获取图片错误 #236 2024-02-17 15:43:12 +08:00
3b210d7ed0 Shamrock: fix #236 2024-02-17 09:37:01 +08:00
63ce2d40bd Shamrock: fix get role by nt crash 2024-02-16 10:50:00 +08:00
36f8b6e54b Shamrock: Change the image upload source to a camera 2024-02-16 09:50:31 +08:00
58413044e9 Shamrock: typo log 2024-02-16 09:16:05 +08:00
3395cd9d95 Shamrock: 支持群临时消息推送携带群号以及群名称 2024-02-16 09:12:45 +08:00
494b1f1fd0 Shamrock: 允许禁止QQ启动无关紧要的进程服务 2024-02-16 00:09:35 +08:00
cf943fd13a Shamrock: atメッセージ優先nameパラメータ 2024-02-15 13:18:43 +08:00
9608b46799 Shamrock: 是正メッセージプッシュアイデンティティの取得が遅い 2024-02-15 13:14:37 +08:00
502956e3ec Shamrock: エイト・メッセージにニックネームの迅速なクエリを許可する 2024-02-15 13:01:34 +08:00
27b4c26da7 Shamrock: fix GlobalEventTransmitter x2 2024-02-11 14:28:07 +08:00
65f54360f8 Shamrock: not fix GlobalEventTransmitter x2 2024-02-11 14:06:10 +08:00
9a9fad975f Shamrock: not fix GlobalEventTransmitter 2024-02-11 13:57:58 +08:00
7153b21cd4 Shamrock: fix GlobalEventTransmitter 2024-02-11 13:42:28 +08:00
fdb2486090 Shamrock: Disable lost connection detection 2024-02-10 00:41:38 +08:00
d60b2a25d1 Update SECURITY.md 2024-02-09 08:04:40 +08:00
2d8dde6951 add history msg to database 2024-02-08 23:52:21 +08:00
78fd60dade Merge pull request #228 from Mythologyli/master
feat: get group applier uin from request msg
2024-02-08 22:34:40 +08:00
80dbf6af28 feat: get group applier uin from request msg 2024-02-08 22:27:55 +08:00
1e53753b5a Shamrock: fix #227 2024-02-08 20:17:51 +08:00
e727877268 Merge pull request #225 from MrXiaoM/fix-guild-message
修复 频道消息事件不符合 go-cqhttp 规范
2024-02-08 20:16:01 +08:00
63b69df3ea fix missing guild_id and channel_id 2024-02-08 14:51:14 +08:00
b03e02675b Shamrock: add timeout #223 2024-02-05 22:16:12 +08:00
e68a1ffd37 Shamrock: fix guild sync 2024-02-05 22:12:20 +08:00
fb00e5c1ff Shamrock: support /create_guild_role 2024-02-03 16:31:54 +08:00
7bfb9b7b61 Shamrock: support /set_guild_member_role 2024-02-03 06:21:34 +08:00
c43689822b Shamrock: support /delete_guild_role 2024-02-03 05:59:49 +08:00
7952453137 Shamrock: support /get_guild_roles 2024-02-03 05:45:25 +08:00
2f61f6da00 Shamrock: support /get_guild_feeds 2024-02-03 03:05:38 +08:00
db252b6b6c Shamrock: support /send_guild_channel_msg 2024-02-02 22:47:38 +08:00
137c354acc Shamrock: support receiving all guild msg 2024-02-02 22:07:56 +08:00
1c7f6bd034 Shamrock: support /get_guild_member_profile 2024-02-02 19:11:45 +08:00
649d8771ca Shamrock: fix error as clover.cpp changed 2024-02-02 18:37:47 +08:00
af7b0f732e Merge remote-tracking branch 'origin/master' 2024-02-02 18:36:08 +08:00
12738fd52c Shamrock: fix #219 2024-02-02 18:35:49 +08:00
b165e1c0c2 Merge pull request #221 from PisLuanyao/master
👻
2024-02-02 18:30:03 +08:00
29c1ad8bc9 Clover.cpp
临时解决Nox提示 "QQ 屡次停止运行" ,不清楚副作用
2024-02-02 14:39:41 +08:00
262af4108b Shamrock: Anti Provider Detection 2024-02-02 09:12:36 +08:00
a22dc50f14 Shamrock: support /get_guild_member_list 2024-02-01 15:42:24 +08:00
e629981218 Shamrock: support /get_guild_channel_list 2024-02-01 14:56:30 +08:00
103381c17a Shamrock: support /get_guild_meta_by_guest 2024-02-01 00:43:04 +08:00
7540ef04bb Shamrock: support /get_guild_service_profile 2024-01-31 16:52:28 +08:00
30b48c6677 Shamrock: bypass shamrock detection 2024-01-31 12:30:48 +08:00
48e4648110 Shamrock: fix guild refresh error 2024-01-31 12:22:01 +08:00
b10b10d4a2 Shamrock: add version restrictions for GuildSdk 2024-01-31 12:17:33 +08:00
036f8a49ac Shamrock: support get_guild_list #71 2024-01-31 12:09:24 +08:00
67f52b8df0 Shamrock: fix #216 2024-01-30 22:46:28 +08:00
dd1b909bb0 Shamrock: Rewrite timeout message sending #215 2024-01-30 18:27:47 +08:00
72c3c7bdf7 Shamrock: Rewrite timeout message sending 2024-01-30 18:23:48 +08:00
e0e7a9fc2e Shamrock: 支持新年龙表情,点开提交查看评论获取使用方法 2024-01-30 15:09:11 +08:00
b3d853dec3 Shamrock: support original for Image 2024-01-30 00:49:33 +08:00
e0a4aad3cd Shamrock: fix QuickOperation 2024-01-30 00:38:14 +08:00
328e656859 Shamrock: try fix #214 2024-01-30 00:25:32 +08:00
c97f79335a Shamrock: Support /set_group_comment_face 2024-01-28 23:45:05 +08:00
e07e75747a Shamrock: Support big face and bubble face 2024-01-28 23:22:06 +08:00
9482641c38 Shamrock: fix #213 2024-01-28 22:38:54 +08:00
a485e72ddf Shamrock: Adjusting the xposed API for KSP 2024-01-28 15:38:36 +08:00
c7265ba628 Shamrock: Remove outdated dependencies and add new APIs 2024-01-27 21:06:39 +08:00
c39c2a172f Shamrock: Fix #199 2024-01-25 15:13:27 +08:00
64b7b00253 Shamrock: Failed to modify UID and obtain result 0 2024-01-23 00:49:31 +08:00
ec132d224e Shamrock: 为请求事件增加user_uid #150 2024-01-23 00:36:44 +08:00
9c9fbfa753 Merge remote-tracking branch 'origin/master' 2024-01-23 00:26:29 +08:00
4b5932b319 Shamrock: fix #190 2024-01-23 00:26:11 +08:00
0c91028469 Shamrock: fix 9.0.15 crash 2024-01-20 14:56:29 +08:00
48b720bdd7 Merge remote-tracking branch 'origin/master' 2024-01-20 03:03:07 +08:00
2038d81ce8 Shamrock: 调整包拦截策略 2024-01-20 03:02:55 +08:00
81be383b5f revert 2024-01-18 20:05:18 +08:00
0fb88e3e44 give more love to 2024-01-18 16:51:44 +08:00
e92b04ad0f Shamrock: fix build error #201 2024-01-18 09:58:16 +08:00
160d1a11ac Shamrock: #201 2024-01-18 09:49:56 +08:00
b9cfe73eae Shamrock: fix #150 2024-01-17 04:53:07 +08:00
8d6d984849 Shamrock: 尝试修复重复Client连接 #187 2024-01-17 04:15:24 +08:00
25fe9fab37 Shamrock: fix 9.0.8 2024-01-17 03:52:49 +08:00
ba7058a838 add retryCnt 2024-01-14 16:24:37 +08:00
0858395e60 add retryCnt 2024-01-14 15:49:44 +08:00
fdd769d9ff should fix #176 2024-01-10 00:17:53 +08:00
f47ae69653 Merge pull request #193 from MrXiaoM/fix-group-ban
支持全员禁言通知事件
2024-01-07 15:13:43 +08:00
f311ae3797 Merge pull request #194 from MrXiaoM/fix-group-title-change
修复群头衔更改通知报错
2024-01-07 15:13:19 +08:00
5a941f889f add group-title-change notify busiId 2024-01-07 04:39:42 +08:00
69e50c6f93 fix group title change notice on 8.9.80 2024-01-07 04:38:45 +08:00
f7ac3a5d23 whole group ban notice support (go-cqhttp) 2024-01-07 03:52:29 +08:00
b6b54a805e more debug log when error 2024-01-07 03:31:49 +08:00
131f56a468 Shamrock: fix #191 2024-01-06 18:53:42 +08:00
e45e9e7fa0 Merge pull request #189 from super1207/patch-3
fix groupid get
2024-01-05 10:46:32 +08:00
cac0aad1f2 fix groupid get 2024-01-04 19:40:01 +08:00
2c1bd9e726 Shamrock: fix #186 2024-01-04 00:30:36 +08:00
2645e8f451 Merge remote-tracking branch 'origin/master' 2024-01-03 17:45:43 +08:00
e92c227bba Shamrock: 对QQ9支持,并尝试修复#181 2024-01-03 17:45:32 +08:00
a31fe92c0b feat: 获取频道列表接口 (TODO 状态 返回空数组) 2024-01-01 19:01:38 +08:00
70cb876439 Merge remote-tracking branch 'origin/master' 2024-01-01 19:00:48 +08:00
9aa4c37354 fix: WebSocket 部分操作未正常返回数据 (close #182) 2024-01-01 19:00:28 +08:00
d44150ea1a Shamrock: 在获取某些字段错误时,将字段值定义为0 #150 2024-01-01 00:42:47 +08:00
0360c81bee Shamrock: fix #173 2024-01-01 00:40:55 +08:00
cb904c1f1c Shamrock: fix #179 2024-01-01 00:38:44 +08:00
bc754db959 Merge remote-tracking branch 'origin/master' 2024-01-01 00:37:35 +08:00
8df799a6e4 Shamrock: fix #180 2024-01-01 00:37:12 +08:00
71dd9469ca Merge pull request #178 from super1207/patch-2
fix cq code parse
2023-12-27 20:00:49 +09:00
79788d2cdc fix cq code parse 2023-12-26 19:53:00 +08:00
c28c9981c4 Shamrock: 修复QQ收藏异常 2023-12-23 05:13:16 +08:00
8fadd0016a Shamrock: fix #171 #165 2023-12-23 05:06:37 +08:00
77504d68fd Shamrock: 支持获取QQ收藏的列表 /fav/get_item_list 2023-12-23 04:47:11 +08:00
1490450178 Shamrock: 支持获取指定QQ收藏的内容 /fav/get_item_content 2023-12-23 04:16:11 +08:00
88beaf8b6f Shamrock: 支持添加QQ收藏(图片) /fav/add_image_msg 2023-12-22 14:19:56 +08:00
df25b0bc76 Shamrock: 支持添加QQ收藏(文本) /fav/add_rich_media_msg 2023-12-22 03:08:46 +08:00
d07eea7766 Shamrock: Shamrock更新后自动重新启动 2023-12-22 02:26:39 +08:00
5000453002 Shamrock: 完成QQ收藏数据分析 2023-12-21 02:25:20 +08:00
35c82fcc51 Shamrock: fix #169 2023-12-21 00:55:56 +08:00
89a4912ed7 Shamrock: fix #166 2023-12-20 18:58:17 +08:00
aeabc66067 Shamrock: 兼容性正反向HTTP调整 2023-12-20 18:52:24 +08:00
ccbfc9a1e1 Shamrock: fix #159 2023-12-19 22:11:22 +08:00
31936feb98 Merge remote-tracking branch 'origin/master' 2023-12-19 22:10:03 +08:00
538db69754 Shamrock: fix #159 2023-12-19 22:09:23 +08:00
25ea5bd6a8 Merge pull request #162 from callng/master
`Shamrock`: Upgrade build tools
2023-12-19 22:07:32 +08:00
460cd84258 Shamrock: Upgrade build tools 2023-12-19 21:13:28 +08:00
3f9613c43c Shamrock: 输出心跳日志 2023-12-19 21:07:28 +08:00
34eccda233 Shamrock: Määritetty tunnus ei vaadi suuraakkosia 2023-12-19 01:21:08 +08:00
741d2c7a84 Shamrock: fix #117 2023-12-19 01:13:39 +08:00
6ee5ceb321 Shamrock: fix #155 2023-12-18 21:15:56 +08:00
6107ec6ffb Shamrock: fix #156 2023-12-17 11:40:05 +08:00
4ef014a8ac Shamrock: fix card event and kickme operation 2023-12-13 15:09:46 +08:00
135a7c2f56 Shamrock: 优化构建流程 2023-12-13 01:23:40 +08:00
420f11784d Shamrock: fix field error 2023-12-13 00:22:06 +08:00
951e7462c4 Shamrock: add shut_up_timestamp field to get_group_member_list 2023-12-13 00:18:57 +08:00
1b0550b5e1 readme: fix broken link 2023-12-12 17:17:31 +08:00
919c4a7d80 Shamrock: fix #149 again 2023-12-12 11:11:21 +08:00
dcb2b0a26f Shamrock: fix #149 2023-12-12 10:28:24 +08:00
d388e5df0c Shamrock: fix #149 2023-12-11 14:29:07 +08:00
5776524579 Shamrock: 好友请求系统消息 2023-12-10 18:40:33 +08:00
1d0a0731fb Shamrock: 修复群消息撤回事件群号获取错误 2023-12-10 01:57:38 +08:00
4dafa75944 Shamrock: 修复群禁言事件群号获取错误 #148 2023-12-10 01:21:38 +08:00
85cdc86b07 Merge pull request #144 from PisLuanyao/master
`Clover.cpp`: NoxAppPlayer里的鸡脚so
2023-12-10 01:09:21 +08:00
cd19426d1b Clover.cpp: NoxAppPlayer
稍微动了一下,方便看,希望没搞错
2023-12-09 19:14:22 +08:00
48b1b40e1c Clover.cpp: NoxAppPlayer
也许是无效的?
2023-12-09 18:56:00 +08:00
50d469cc45 Clover.cpp: NoxAppPlayer
夜神模拟器里的鸡脚so
2023-12-09 18:41:53 +08:00
37f74d5284 Shamrock: 优化检测逻辑 2023-12-09 16:18:30 +08:00
adb7b12c16 Shamrock: feat 群打卡 2023-12-08 21:52:35 +08:00
27791cc848 Shamrock: fix friend request type typo 2023-12-08 12:54:34 +08:00
bd45523e25 Shamrock: 修正被动WebSocket日志 2023-12-07 23:44:55 +08:00
c0f2242679 Shamrock: 修复防止系统打盹错误 2023-12-07 00:24:06 +08:00
c309a2b3ed Shamrock: fix 部分事件日志错误打印 2023-12-06 16:42:00 +08:00
48c9048a00 Merge branch 'master' of github.com:whitechi73/OpenShamrock 2023-12-06 15:53:11 +08:00
4d2f7a794b Shamrock: 补充群成员信息area、age和level字段 2023-12-06 15:53:01 +08:00
ab6e431872 Merge remote-tracking branch 'origin/master' 2023-12-06 09:44:20 +08:00
9423df2670 Shamrock: 修复回复类型id错误 2023-12-06 09:44:10 +08:00
a2b3e42eee Shamrock: fix #125 2023-12-06 00:52:57 +08:00
d9a045bbf0 Shamrock: 修复构建 2023-12-05 18:26:15 +08:00
42ca17339e Shamrock: 不处理发给自己的消息 2023-12-05 18:24:22 +08:00
003c4d4456 Shamrock: 修复群戳一戳丶群打卡获取的群号错误 2023-12-04 19:42:46 +08:00
ec39aa7bc3 Shamrock: fix #124 2023-12-04 15:07:33 +08:00
4e3870a512 Shamrock: fix #124 2023-12-04 12:58:53 +08:00
97534b01a6 Merge pull request #121 from Miuzarte/patch-1
go-cqhttp like card and nickname field
2023-12-03 12:43:16 +08:00
61bed61bfb go-cqhttp like card and nickname field 2023-12-03 02:15:17 +08:00
a0ff4782db Merge remote-tracking branch 'origin/master' 2023-12-02 23:55:57 +08:00
41dd1de8f8 Shamrock: try fix #120 2023-12-02 23:55:48 +08:00
fa6634d6af Shamrock: fix #111 and add group sign event 2023-12-02 22:59:37 +08:00
1955 changed files with 41557 additions and 6644 deletions

BIN
.github/jetbrains-variant-3.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

View File

@ -13,24 +13,38 @@ on:
jobs:
build:
name: Build APK
name: Build Shamrock
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: "temurin"
fetch-depth: 0
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
cache: 'gradle'
distribution: "adopt"
- name: Setup cmake
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmake;3.22.1" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
- name: Cache Gradle Dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
restore-keys: gradle-deps
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.9.0
- name: Cache Gradle Build
uses: actions/cache@v4
with:
path: |
~/.gradle/caches/build-cache-*
~/.gradle/buildOutputCleanup/cache.properties
key: gradle-builds-core-${{ github.sha }}
restore-keys: gradle-builds
- name: Build with Gradle
run: |
@ -46,42 +60,41 @@ jobs:
KEY_ALIAS: ${{ secrets.SIGN_ALIAS }}
KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
- name: Install aapt
run: sudo apt-get update && sudo apt-get install -y aapt
- name: Set Shamrock Version
run: |
apk_file=${{ env.APK_FILE_ALL }}
apk_dump=$(aapt dump badging "$apk_file")
version_name=$(sed -n "s/.*versionName='\([^']*\)'.*/\1/p" <<< "$apk_dump")
echo "SHAMROCK_VERSION=$version_name" >> $GITHUB_ENV
version_name_all=$(basename -s .apk "${{ env.APK_FILE_ALL }}")
version_name_arm64=$(basename -s .apk "${{ env.APK_FILE_ARM64 }}")
version_name_x86_64=$(basename -s .apk "${{ env.APK_FILE_X86_64 }}")
echo "SHAMROCK_VERSION_ALL=$version_name_all" >> $GITHUB_ENV
echo "SHAMROCK_VERSION_ARM64=$version_name_arm64" >> $GITHUB_ENV
echo "SHAMROCK_VERSION_x86_64=$version_name_x86_64" >> $GITHUB_ENV
- name: Show Artifacts SHA256
run: |
echo "### Build Success :rocket:" >> $GITHUB_STEP_SUMMARY
echo "|ABI|SHA256|" >> $GITHUB_STEP_SUMMARY
echo "|:--------:|:----------|" >> $GITHUB_STEP_SUMMARY
all=($(sha256sum ${{ env.APK_FILE_ALL }}))
all=($(sha256sum "${{ env.APK_FILE_ALL }}"))
echo "|all|$all" >> $GITHUB_STEP_SUMMARY
arm64=($(sha256sum ${{ env.APK_FILE_ARM64 }}))
arm64=($(sha256sum "${{ env.APK_FILE_ARM64 }}"))
echo "|arm64|$arm64" >> $GITHUB_STEP_SUMMARY
x86_64=($(sha256sum ${{ env.APK_FILE_X86_64 }}))
x86_64=($(sha256sum "${{ env.APK_FILE_X86_64 }}"))
echo "|x86_64|$x86_64" >> $GITHUB_STEP_SUMMARY
- name: Upload ALL APK RELEASE
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Shamrock-v${{ env.SHAMROCK_VERSION }}-all
path: ${{ env.APK_FILE_ALL }}
name: "${{ env.SHAMROCK_VERSION_ALL }}"
path: "${{ env.APK_FILE_ALL }}"
- name: Upload ARM64 APK RELEASE
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Shamrock-v${{ env.SHAMROCK_VERSION }}-arm64
path: ${{ env.APK_FILE_ARM64 }}
name: "${{ env.SHAMROCK_VERSION_ARM64 }}"
path: "${{ env.APK_FILE_ARM64 }}"
- name: Upload X86_64 APK RELEASE
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Shamrock-v${{ env.SHAMROCK_VERSION }}-x86_64
path: ${{ env.APK_FILE_X86_64 }}
name: "${{ env.SHAMROCK_VERSION_x86_64 }}"
path: "${{ env.APK_FILE_X86_64 }}"

View File

@ -1,57 +0,0 @@
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '24 7 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3.6.0
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Setup JDK 17
uses: actions/setup-java@v3.12.0
with:
distribution: "temurin"
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.8.0
- name: Setup cmake
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmake;3.22.1" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
- name: Build
run: |
chmod +x ./gradlew
./gradlew :app:assembleAppRelease
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

View File

@ -1,73 +0,0 @@
name: Shamrock Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
cache: 'gradle'
- name: Setup cmake
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmake;3.22.1" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.9.0
- name: Build with Gradle
run: |
echo ${{ secrets.SIGN_KEYSTORE_BASE64 }} | base64 -d > keystore.jks
chmod +x ./gradlew
./gradlew :app:assembleRelease --build-cache --parallel --daemon --warning-mode all --stacktrace
echo "APK_FILE_ALL=$(find app/build/outputs/apk/app/release -name '*.apk')" >> $GITHUB_ENV
echo "APK_FILE_ARM64=$(find app/build/outputs/apk/arm64/release -name '*.apk')" >> $GITHUB_ENV
echo "APK_FILE_X86_64=$(find app/build/outputs/apk/x64/release -name '*.apk')" >> $GITHUB_ENV
env:
KEYSTORE_PATH: "../keystore.jks"
KEYSTORE_PASSWORD: ${{ secrets.SIGN_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.SIGN_ALIAS }}
KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
- name: Install aapt
run: sudo apt-get update && sudo apt-get install -y aapt
- name: Set Shamrock Version
run: |
apk_file=${{ env.APK_FILE_ALL }}
apk_dump=$(aapt dump badging "$apk_file")
version_name=$(sed -n "s/.*versionName='\([^']*\)'.*/\1/p" <<< "$apk_dump")
echo "SHAMROCK_VERSION=$version_name" >> $GITHUB_ENV
- name: Show Artifacts SHA256
run: |
echo "### Build Success :rocket:" >> $GITHUB_STEP_SUMMARY
echo "|ABI|SHA256|" >> $GITHUB_STEP_SUMMARY
echo "|:--------:|:----------|" >> $GITHUB_STEP_SUMMARY
all=($(sha256sum ${{ env.APK_FILE_ALL }}))
echo "|all|$all" >> $GITHUB_STEP_SUMMARY
arm64=($(sha256sum ${{ env.APK_FILE_ARM64 }}))
echo "|arm64|$arm64" >> $GITHUB_STEP_SUMMARY
x86_64=($(sha256sum ${{ env.APK_FILE_X86_64 }}))
echo "|x86_64|$x86_64" >> $GITHUB_STEP_SUMMARY
- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: Shamrock v${{ env.SHAMROCK_VERSION }}
files: |
${{ env.APK_FILE_ALL }}
${{ env.APK_FILE_ARM64 }}
${{ env.APK_FILE_X86_64 }}

View File

@ -16,10 +16,11 @@
## 简介
☘ 基于 Xposed 实现 OneBot 标准的 QQ 机器人框架,原作者[**fuqiuluo**](https://github.com/fuqiuluo)已脱离开发接下来由白池接手哦本项目为OpenShamrock不会有任何收费行为欢迎大家的加入
☘ 基于 Lsposed(**Non**-Riru) 实现 OneBot 标准的 QQ 机器人框架,原作者[**fuqiuluo**](https://github.com/fuqiuluo)已脱离开发接下来由白池接手哦本项目为OpenShamrock不会有任何收费行为欢迎大家的加入
> 本项目仅提供学习与交流用途请在24小时内删除。
> 本项目目的是研究 Xposed 和 LSPosed 框架的使用。 Epic 框架开发相关知识。
> Riru可能导致封禁请减少使用。
> 如有违反法律,请联系删除。
> 请勿在任何平台宣传,宣扬,转发本项目,请勿恶意修改企业安装包造成相关企业产生损失,如有违背,必将追责到底。
> 官方论坛,[点我直达](https://forum.libfekit.so/)
@ -28,6 +29,7 @@
- 一键移植:本项目基于 go-cqhttp 的文档进行开发实现。
- 平行部署:可多平台部署,未来将会支持 Docker 部署的教程。
- 替代方案:[Lagrange.Core](https://github.com/LagrangeDev/Lagrange.Core)
## 权限声明
@ -45,13 +47,19 @@
<img src="https://github.com/whitechi73/OpenShamrock/assets/98259561/f04d60bc-ec40-41fc-bc15-62c146f1a1f1" width="160px" alt="Shamrock"> **我可爱吗?欢迎你的到来,这里是一个很大的地方,有着无限可能,主要是有你啦!**
## 鸣谢
感谢[**JetBrains**](https://www.jetbrains.com/zh-cn/community/opensource/#support)提供的开源开发许可证JetBrains 通过为核心项目贡献者免费提供一套一流的开发者工具来支持非商业开源项目。
[<img src=".github/jetbrains-variant-3.png" width="200"/>](https://www.jetbrains.com/zh-cn/community/opensource/#support)
## 开源协议
本项目使用 [GPL-3.0](LICENSE) 协议开放源代码
```text
Shamrock - OneBot standard QQ robot framework based on Xposed implementation
Copyright (C) 2023 Shamrock Team
Copyright (C) 2023 ~ 2024 Shamrock Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@ -94,10 +102,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
[docs-link]: https://whitechi73.github.io/OpenShamrock/
[hook-system]: https://github.com/whitechi73/OpenShamrock/blob/master/xposed/src/main/java/moe/fuqiuluo/shamrock/xposed/loader/FuckAMS.kt
[hook-system]: https://github.com/whitechi73/OpenShamrock/blob/master/xposed/src/main/java/moe/fuqiuluo/shamrock/xposed/loader/KeepAlive.kt
[voice-support]: https://whitechi73.github.io/OpenShamrock/advanced/voice.html
[contrib-image]: https://contrib.rocks/image?repo=whitechi73/OpenShamrock
[contrib-link]: https://github.com/whitechi73/OpenShamrock/graphs/contributors

View File

@ -1,11 +1,19 @@
# Security Policy
## Support Version
## 支持的版本
| Version | Supported |
| 版本 | 支持状态 |
| ------- | ------------------ |
| 9.0.15 | :white_check_mark: |
| 8.9.75 | :white_check_mark: |
| 8.9.73 | :white_check_mark: |
| 8.9.98 | :white_check_mark: |
| < 8.9.68| :x: |
## 频道支持性说明
如果需要使用`频道`相关功能请升级QQ到9.0.8版本
## Riru检测问题
QQ自`9.0.8`开始将会检测riru可能作为封号因素

1
annotations/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -0,0 +1,14 @@
plugins {
id("java-library")
id("org.jetbrains.kotlin.jvm")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {
implementation(DEPENDENCY_PROTOBUF)
implementation(kotlinx("serialization-protobuf", "1.6.2"))
}

View File

@ -0,0 +1,8 @@
package moe.fuqiuluo.symbols
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.CLASS)
annotation class OneBotHandler(
val actionName: String,
val alias: Array<String> = []
)

View File

@ -0,0 +1,16 @@
package moe.fuqiuluo.symbols
import kotlinx.serialization.decodeFromByteArray
import kotlinx.serialization.protobuf.ProtoBuf
import kotlin.reflect.KClass
interface Protobuf<T: Protobuf<T>>
inline fun <reified T: Protobuf<T>> KClass<T>.decode(data: ByteArray): T {
return ProtoBuf.decodeFromByteArray(data)
}
inline fun <reified T: Protobuf<T>> ByteArray.decodeProtobuf(to: KClass<T>? = null): T {
return ProtoBuf.decodeFromByteArray(this)
}

View File

@ -0,0 +1,13 @@
package moe.fuqiuluo.symbols
enum class Process {
ALL,
MAIN,
MSF
}
@Target(AnnotationTarget.CLASS)
annotation class XposedHook(
val process: Process = Process.ALL,
val priority: Int = 10
)

View File

@ -1,35 +1,29 @@
import com.android.build.api.dsl.ApplicationExtension
fun gitCommitHash(): String {
val builder = ProcessBuilder("git", "rev-parse", "--short", "HEAD")
val process = builder.start()
val reader = process.inputReader()
val hash = reader.readText().trim()
return if (hash.isNotEmpty()) ".$hash" else ""
}
import java.io.ByteArrayOutputStream
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
kotlin("plugin.serialization") version "1.8.10"
kotlin("plugin.serialization") version "1.9.21"
}
android {
namespace = "moe.fuqiuluo.shamrock"
ndkVersion = "25.1.8937393"
compileSdk = 33
compileSdk = 34
defaultConfig {
applicationId = "moe.fuqiuluo.shamrock"
minSdk = 24
targetSdk = 33
versionCode = (System.currentTimeMillis() / 1000).toInt()
versionName = "1.0.7-dev" + gitCommitHash()
minSdk = 27
targetSdk = 34
versionCode = getVersionCode()
versionName = "1.0.8" + ".r${getGitCommitCount()}." + getVersionName()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
@Suppress("UnstableApiUsage")
externalNativeBuild {
cmake {
cppFlags += ""
@ -50,8 +44,7 @@ android {
android.applicationVariants.all {
outputs.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
.forEach {
val abi = it.outputFileName.split("-")[1].split(".apk")[0]
val abiName = when (abi) {
val abiName = when (val abi = it.outputFileName.split("-")[1].split(".apk")[0]) {
"app" -> "all"
"x64" -> "x86_64"
else -> abi
@ -69,6 +62,7 @@ android {
println("Full architecture and full compilation.")
abiFilters.add("arm64-v8a")
abiFilters.add("x86_64")
abiFilters.add("x86")
}
}
create("arm64") {
@ -98,7 +92,7 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
kotlinCompilerExtensionVersion = "1.5.4"
}
packaging {
jniLibs {
@ -133,6 +127,11 @@ android {
}
configureAppSigningConfigsForRelease(project)
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
}
fun configureAppSigningConfigsForRelease(project: Project) {
@ -154,15 +153,47 @@ fun configureAppSigningConfigsForRelease(project: Project) {
release {
signingConfig = signingConfigs.findByName("release")
}
debug {
signingConfig = signingConfigs.findByName("release")
}
}
}
}
fun getGitCommitCount(): Int {
val out = ByteArrayOutputStream()
exec {
commandLine("git", "rev-list", "--count", "HEAD")
standardOutput = out
}
return out.toString().trim().toInt()
}
fun getGitCommitHash(): String {
val out = ByteArrayOutputStream()
exec {
commandLine("git", "rev-parse", "--short", "HEAD")
standardOutput = out
}
return out.toString().trim()
}
fun getVersionCode(): Int {
return (System.currentTimeMillis() / 1000L).toInt()
}
fun getVersionName(): String {
return getGitCommitHash()
}
dependencies {
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation(platform("androidx.compose:compose-bom:2023.06.01"))
val composeBom = platform("androidx.compose:compose-bom:2023.10.01")
implementation(composeBom)
DEPENDENCY_ANDROIDX.forEach {
implementation(it)
}
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
@ -171,31 +202,26 @@ dependencies {
implementation("com.google.accompanist:accompanist-pager:0.31.5+")
//noinspection GradleDynamicVersion
implementation("com.google.accompanist:accompanist-systemuicontroller:0.31.5+")
//noinspection GradleDynamicVersion useless
// implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0+")
implementation("io.coil-kt:coil:2.4.0")
implementation("io.coil-kt:coil-compose:2.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-io-jvm:0.1.16")
val ktorVersion = "2.3.3"
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-server-host-common:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
//implementation("io.ktor:ktor-serialization-kotlinx-protobuf:$ktorVersion")
implementation(kotlinx("io-jvm", "0.1.16"))
implementation(ktor("server", "core"))
implementation(ktor("server", "host-common"))
implementation(ktor("server", "status-pages"))
implementation(ktor("server", "netty"))
implementation(ktor("server", "content-negotiation"))
implementation(ktor("client", "core"))
implementation(ktor("client", "content-negotiation"))
implementation(ktor("client", "cio"))
implementation(ktor("serialization", "kotlinx-json"))
implementation(project(":xposed"))
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.06.01"))
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")

View File

@ -3,10 +3,6 @@
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:name=".app.MyApplication"
@ -19,7 +15,6 @@
android:theme="@style/Theme.Shamrock"
android:zygotePreloadName="@string/app_name"
android:multiArch="true"
android:extractNativeLibs="true"
tools:targetApi="31">
<activity
android:name=".MainActivity"
@ -36,7 +31,7 @@
<provider
android:name=".ui.service.internal.MultifunctionalProvider"
android:authorities="moe.fuqiuluo.xqbot.provider"
android:authorities="moe.fuqiuluo.108.provider"
android:exported="true"
android:grantUriPermissions="true"
tools:ignore="ExportedContentProvider" />

View File

@ -9,52 +9,61 @@ inline void replace_string(std::string& str, const std::string& from, const std:
}
}
inline int utf8_next_len(const std::string& str, size_t offset)
{
uint8_t c = (uint8_t)str[offset];
if (c >= 0xFC)
return 6;
else if (c >= 0xF8)
return 5;
else if (c >= 0xF0)
return 4;
else if (c >= 0xE0)
return 3;
else if (c >= 0xC0)
return 2;
else if (c > 0x00)
return 1;
else
return 0;
}
void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::string, std::string>>& dest) {
std::string cache;
bool is_start = false;
std::string key_tmp;
std::unordered_map<std::string, std::string> kv;
for(int i = 0; i < code.size(); i++) {
auto c = code[i];
if (c == '[') {
for(size_t i = 0; i < code.size(); i++) {
int utf8_char_len = utf8_next_len(code, i);
if(utf8_char_len == 0) {
continue;
}
std::string_view c(&code[i],utf8_char_len);
if (c == "[") {
if (is_start) {
throw illegal_code();
} else {
if (!cache.empty()) {
std::unordered_map<std::string, std::string> kv;
replace_string(cache, "&#91;", "[");
replace_string(cache, "&#93;", "]");
replace_string(cache, "&amp;", "&");
kv.emplace("_type", "text");
kv.emplace("text", cache);
dest.push_back(kv);
cache.clear();
}
auto c1 = code[i + 1];
if (c1 == 'C') {
i++;
auto c2 = code[i + 1];
if(c2 == 'Q') {
i++;
auto c3 = code[i + 1];
if (c3 == ':') {
i++;
std::string_view cq_flag(&code[i],4);
if(cq_flag == "[CQ:"){
is_start = true;
} else {
i += 3;
}else{
cache += c;
cache += c1;
cache += c2;
continue;
}
} else {
cache += c;
cache += c1;
continue;
}
} else {
cache += c;
continue;
}
}
}
else if (c == '=') {
else if (c == "=") {
if (is_start) {
if (cache.empty()) {
throw illegal_code();
@ -70,17 +79,17 @@ void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::
cache += c;
}
}
else if (c == ',') {
else if (c == ",") {
if (is_start) {
if (kv.count("_type") == 0 && !cache.empty()) {
kv.emplace("_type", cache);
cache.clear();
} else {
if (!key_tmp.empty()) {
replace_string(cache, "&amp;", "&");
replace_string(cache, "&#91;", "[");
replace_string(cache, "&#93;", "]");
replace_string(cache, "&#44;", ",");
replace_string(cache, "&amp;", "&");
kv.emplace(key_tmp, cache);
cache.clear();
key_tmp.clear();
@ -90,14 +99,14 @@ void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::
cache += c;
}
}
else if (c == ']') {
else if (c == "]") {
if (is_start) {
if (!cache.empty()) {
if (!key_tmp.empty()) {
replace_string(cache, "&amp;", "&");
replace_string(cache, "&#91;", "[");
replace_string(cache, "&#93;", "]");
replace_string(cache, "&#44;", ",");
replace_string(cache, "&amp;", "&");
kv.emplace(key_tmp, cache);
} else {
kv.emplace("_type", cache);
@ -114,10 +123,14 @@ void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::
}
else {
cache += c;
i += (utf8_char_len - 1);
}
}
if (!cache.empty()) {
std::unordered_map<std::string, std::string> kv;
replace_string(cache, "&#91;", "[");
replace_string(cache, "&#93;", "]");
replace_string(cache, "&amp;", "&");
kv.emplace("_type", "text");
kv.emplace("text", cache);
dest.push_back(kv);

View File

@ -12,7 +12,7 @@
extern "C"
JNIEXPORT jstring JNICALL
Java_moe_fuqiuluo_shamrock_xposed_actions_PullConfig_testNativeLibrary(JNIEnv *env, jobject thiz) {
Java_moe_fuqiuluo_shamrock_xposed_hooks_PullConfig_testNativeLibrary(JNIEnv *env, jobject thiz) {
return env->NewStringUTF("加载Shamrock库成功~");
}
@ -37,6 +37,26 @@ Java_moe_fuqiuluo_shamrock_utils_MD5_genFileMd5Hex(JNIEnv *env, jobject thiz, js
return env->NewStringUTF(md5Hex.c_str());
}
extern "C"
JNIEXPORT jbyteArray JNICALL
Java_moe_fuqiuluo_shamrock_utils_MD5_genFileMd5(JNIEnv *env, jobject thiz, jstring file_path) {
auto cPathStr = env->GetStringUTFChars(file_path, nullptr);
std::filesystem::path filePath(cPathStr);
if (!std::filesystem::exists(filePath)) {
jclass exClass = env->FindClass("java/io/FileNotFoundException");
env->ThrowNew(exClass, "目标文件不存在");
env->DeleteLocalRef(exClass);
return nullptr;
}
auto file = std::ifstream(filePath.c_str(), std::ios::binary);
MD5 md5;
md5.update(file);
auto md5Bytes = md5.digest();
auto jByteArray = env->NewByteArray(16);
env->SetByteArrayRegion(jByteArray, 0, 16, reinterpret_cast<const jbyte*>(md5Bytes));
return jByteArray;
}
extern "C"
JNIEXPORT jstring JNICALL
Java_moe_fuqiuluo_shamrock_utils_MD5_getMd5Hex(JNIEnv *env, jobject thiz, jbyteArray bytes) {

View File

@ -52,6 +52,7 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.painterResource
@ -84,6 +85,7 @@ import moe.fuqiuluo.shamrock.ui.tools.getShamrockVersion
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
CompositionLocalProvider(
LocalIndication provides NoIndication
@ -120,7 +122,7 @@ private fun AppMainView() {
val coreVersion = remember { mutableStateOf(getShamrockVersion(context)) }
val coreName = remember { mutableStateOf("Xposed") }
val voiceSwitch = remember { mutableStateOf(false) }
@Suppress("LocalVariableName") val LocalString = LocalString
@Suppress("LocalVariableName") val LocalString = LocalString.init()
if (!AppRuntime.isInit) {
AppRuntime.state = remember {
@ -147,7 +149,7 @@ private fun AppMainView() {
AppRuntime.requestCount = remember { mutableIntStateOf(0) }
AppRuntime.isInit = false
AppRuntime.isInit = true
}
val ctx = LocalContext.current

View File

@ -229,6 +229,16 @@ object ShamrockConfig {
return preferences.getBoolean("anti_qq_trace", true)
}
fun isForbidUselessProcess(ctx: Context): Boolean {
val preferences = ctx.getSharedPreferences("config", 0)
return preferences.getBoolean("forbid_useless_process", false)
}
fun setForbidUselessProcess(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
preferences.edit().putBoolean("forbid_useless_process", v).apply()
}
fun setAntiTrace(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
preferences.edit().putBoolean("anti_qq_trace", v).apply()
@ -249,6 +259,11 @@ object ShamrockConfig {
return preferences.getBoolean("enable_auto_start", false)
}
fun disableAutoSyncSetting(ctx: Context): Boolean {
val preferences = ctx.getSharedPreferences("config", 0)
return preferences.getBoolean("disable_auto_sync_setting", false)
}
fun enableAliveReply(ctx: Context): Boolean {
val preferences = ctx.getSharedPreferences("config", 0)
return preferences.getBoolean("alive_reply", false)
@ -264,6 +279,11 @@ object ShamrockConfig {
preferences.edit().putBoolean("enable_auto_start", v).apply()
}
fun setDisableAutoSyncSetting(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
preferences.edit().putBoolean("disable_auto_sync_setting", v).apply()
}
fun setAliveReply(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
preferences.edit().putBoolean("alive_reply", v).apply()
@ -279,19 +299,19 @@ object ShamrockConfig {
return preferences.getBoolean("enable_self_msg", false)
}
fun enableSyncMsgAsSentMsg(ctx: Context): Boolean {
val preferences = ctx.getSharedPreferences("config", 0)
return preferences.getBoolean("enable_sync_msg_as_sent_msg", false)
}
fun setEnableSelfMsg(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
preferences.edit().putBoolean("enable_self_msg", v).apply()
}
fun isEchoNumber(ctx: Context): Boolean {
fun setEnableSyncMsgAsSentMsg(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
return preferences.getBoolean("echo_number", false)
}
fun setEchoNumber(ctx: Context, v: Boolean) {
val preferences = ctx.getSharedPreferences("config", 0)
preferences.edit().putBoolean("echo_number", v).apply()
preferences.edit().putBoolean("enable_sync_msg_as_sent_msg", v).apply()
}
fun getConfigMap(ctx: Context): Map<String, Any?> {
@ -321,6 +341,9 @@ object ShamrockConfig {
"echo_number" to preferences.getBoolean("echo_number", false),
"shell" to preferences.getBoolean("shell", false),
"alive_reply" to preferences.getBoolean("alive_reply", false),
"enable_sync_msg_as_sent_msg" to preferences.getBoolean("enable_sync_msg_as_sent_msg", false),
"disable_auto_sync_setting" to preferences.getBoolean("disable_auto_sync_setting", false),
"forbid_useless_process" to preferences.getBoolean("forbid_useless_process", false)
)
}

View File

@ -278,9 +278,7 @@ private fun APIInfoCard(
text = authToken,
hint = "请填写鉴权token",
error = "输入的参数不合法",
checker = {
it.length in 0 .. 36
},
checker = { true },
confirm = {
ShamrockConfig.setToken(ctx, authToken.value)
AppRuntime.log("设置鉴权Token为[${authToken.value}]。")

View File

@ -91,7 +91,7 @@ fun LabFragment() {
ActionBox(
modifier = Modifier.padding(top = 12.dp),
painter = painterResource(id = R.drawable.round_logo_dev_24),
title = "实验功能"
title = "基础设置"
) { color ->
Column {
Divider(
@ -100,17 +100,16 @@ fun LabFragment() {
thickness = 0.2.dp
)
/*
Function(
title = "自动清理QQ垃圾",
desc = "也许会导致奇怪的问题(无效)。",
title = "禁止无用进程",
desc = "禁止QQ生成无用进程浪费内存",
descColor = color,
isSwitch = ShamrockConfig.isAutoClean(ctx)
isSwitch = ShamrockConfig.isForbidUselessProcess(ctx)
) {
ShamrockConfig.setAutoClean(ctx, it)
ShamrockConfig.setForbidUselessProcess(ctx, it)
ShamrockConfig.pushUpdate(ctx)
return@Function false
}*/
return@Function true
}
Function(
title = "自回复测试",
@ -142,6 +141,16 @@ fun LabFragment() {
return@Function true
}
Function(
title = "禁止Shamrock同步设置",
desc = "禁止Shamrock同步设置防止恢复手动修改后的配置文件。",
descColor = color,
isSwitch = ShamrockConfig.disableAutoSyncSetting(ctx)
) {
ShamrockConfig.setDisableAutoSyncSetting(ctx, it)
return@Function true
}
kotlin.runCatching {
ctx.getSharedPreferences("shared_config", Context.MODE_WORLD_READABLE)
}.onSuccess {
@ -275,6 +284,17 @@ fun LabFragment() {
return@Function true
}
Function(
title = "同步消息推送类型异换",
desc = "推送来自同号异设备消息,将同步消息作为自发消息推送。",
descColor = it,
isSwitch = ShamrockConfig.enableSyncMsgAsSentMsg(ctx)
) {
ShamrockConfig.setEnableSyncMsgAsSentMsg(ctx, it)
ShamrockConfig.pushUpdate(ctx)
return@Function true
}
/*
Function(
title = "使用纯数字ECHO",

View File

@ -7,7 +7,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.core.content.ContextCompat.startActivity
import io.ktor.client.request.get
import io.ktor.client.request.header
import io.ktor.client.request.parameter
import io.ktor.client.request.url
import io.ktor.client.statement.bodyAsText
import io.ktor.http.HttpStatusCode
@ -16,9 +16,9 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.serialization.json.Json
import moe.fuqiuluo.shamrock.remote.entries.CommonResult
import moe.fuqiuluo.shamrock.remote.entries.CurrentAccount
import moe.fuqiuluo.shamrock.remote.entries.Status
import moe.fuqiuluo.shamrock.remote.structures.CommonResult
import moe.fuqiuluo.shamrock.remote.structures.CurrentAccount
import moe.fuqiuluo.shamrock.remote.structures.Status
import moe.fuqiuluo.shamrock.tools.GlobalClient
import moe.fuqiuluo.shamrock.ui.app.AppRuntime.AccountInfo
import moe.fuqiuluo.shamrock.ui.app.AppRuntime.log
@ -58,7 +58,8 @@ object DashboardInitializer {
url("http://127.0.0.1:$servicePort/get_account_info")
val token = ShamrockConfig.getToken(context)
if (token.isNotBlank()) {
header("Authorization", "Bearer $token")
//header("Authorization", "Bearer $token")
parameter("access_token", token)
}
}.let {
if (it.status == HttpStatusCode.OK) {

View File

@ -6,7 +6,9 @@ package moe.fuqiuluo.shamrock.ui.theme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import moe.fuqiuluo.shamrock.R
private val LocalStringDefault = Default()
@ -164,4 +166,14 @@ open class VarString(
var persistentText: String,
var persistentTextDesc: String
)
) {
private var inited = false
@Composable
fun init(): VarString {
if (inited) return this
inited = true
return this
}
}

View File

@ -1,7 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.2" apply false
id("org.jetbrains.kotlin.android") version "1.8.10" apply false
id("com.android.library") version "8.1.2" apply false
//id("io.realm.kotlin") version "1.11.0" apply false
id("com.android.application") version "8.2.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.20" apply false
id("com.android.library") version "8.2.0" apply false
}

10
buildSrc/build.gradle.kts Normal file
View File

@ -0,0 +1,10 @@
plugins {
kotlin("jvm") version "1.9.21"
}
repositories {
mavenCentral()
}
dependencies {
}

View File

@ -0,0 +1,26 @@
val DEPENDENCY_ANDROIDX = arrayOf(
"androidx.core:core-ktx:1.12.0",
"androidx.appcompat:appcompat:1.6.1",
"com.google.android.material:material:1.11.0",
"androidx.exifinterface:exifinterface:1.3.7",
"androidx.lifecycle:lifecycle-runtime-ktx:2.6.1",
"androidx.activity:activity-compose:1.7.2",
)
const val DEPENDENCY_JSON5K = "io.github.xn32:json5k:0.3.0"
const val DEPENDENCY_PROTOBUF = "com.google.protobuf:protobuf-java:3.24.0"
const val DEPENDENCY_JAVA_WEBSOCKET = "org.java-websocket:Java-WebSocket:1.5.4"
fun room(name: String) = "androidx.room:room-$name:${Versions.roomVersion}"
fun kotlinx(name: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$name:$version"
fun ktor(target: String, name: String): String {
return "io.ktor:ktor-$target-$name:${Versions.ktorVersion}"
}
object Versions {
const val roomVersion = "2.5.0"
const val ktorVersion = "2.3.3"
}

View File

@ -22,3 +22,5 @@ kotlin.code.style=official
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.default.buildFeatures.aidl=true
kotlin.experimental.tryK2=true
ksp.incremental=false

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

3
gradlew vendored
View File

@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

1
processor/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -0,0 +1,22 @@
plugins {
kotlin("jvm")
id("com.google.devtools.ksp") version "1.9.21-1.0.15"
kotlin("plugin.serialization") version "1.9.21"
}
ksp {
arg("autoserviceKsp.verify", "true")
arg("autoserviceKsp.verbose", "true")
}
dependencies {
implementation(project(":annotations"))
implementation("com.google.auto.service:auto-service-annotations:1.1.1")
implementation("com.google.devtools.ksp:symbol-processing-api:1.9.21-1.0.15")
implementation("com.squareup:kotlinpoet:1.14.2")
implementation(DEPENDENCY_PROTOBUF)
implementation(kotlinx("serialization-protobuf", "1.6.2"))
ksp("dev.zacsweers.autoservice:auto-service-ksp:1.1.0")
}

View File

21
processor/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@ -0,0 +1,85 @@
@file:OptIn(KspExperimental::class)
@file:Suppress("LocalVariableName", "UNCHECKED_CAST")
package moe.fuqiuluo.ksp.impl
import com.google.devtools.ksp.KspExperimental
import com.google.devtools.ksp.getAnnotationsByType
import com.google.devtools.ksp.getClassDeclarationByName
import com.google.devtools.ksp.getKotlinClassByName
import com.google.devtools.ksp.processing.CodeGenerator
import com.google.devtools.ksp.processing.Dependencies
import com.google.devtools.ksp.processing.KSPLogger
import com.google.devtools.ksp.processing.Resolver
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.symbol.ClassKind
import com.google.devtools.ksp.symbol.KSAnnotated
import com.google.devtools.ksp.symbol.KSClassDeclaration
import com.google.devtools.ksp.symbol.KSVisitorVoid
import com.google.devtools.ksp.validate
import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.FunSpec
import moe.fuqiuluo.symbols.OneBotHandler
class OneBotHandlerProcessor(
private val codeGenerator: CodeGenerator,
private val logger: KSPLogger
): SymbolProcessor {
override fun process(resolver: Resolver): List<KSAnnotated> {
val ActionManagerNode = resolver.getClassDeclarationByName("moe.fuqiuluo.shamrock.remote.action.ActionManager")
?: resolver.getKotlinClassByName("moe.fuqiuluo.shamrock.remote.action.ActionManager")
?: resolver.getClassDeclarationByName("ActionManager")
val symbols = resolver.getSymbolsWithAnnotation(OneBotHandler::class.qualifiedName!!)
val unableToProcess = symbols.filterNot { it.validate() }
if (ActionManagerNode != null) {
val oneBotHandlers = (symbols.filter {
it is KSClassDeclaration && it.validate() && it.classKind == ClassKind.OBJECT
} as Sequence<KSClassDeclaration>).toList()
if (oneBotHandlers.isNotEmpty()) {
ActionManagerNode.accept(ActionManagerVisitor(oneBotHandlers), Unit)
}
}
return unableToProcess.toList()
}
inner class ActionManagerVisitor(
private val actionHandlers: List<KSClassDeclaration>
): KSVisitorVoid() {
override fun visitClassDeclaration(classDeclaration: KSClassDeclaration, data: Unit) {
val packageName = classDeclaration.packageName.asString()
// generate kotlin `init { }`
val fileSpec = FileSpec.builder(packageName, classDeclaration.qualifiedName?.asString() ?: run {
throw IllegalStateException("ActionManagerVisitor: classDeclaration.qualifiedName is null")
}).addFunction(FunSpec.builder("initManager").apply {
actionHandlers.forEach { handler ->
// fetch the params of the annotation
val annotation = handler.getAnnotationsByType(OneBotHandler::class).first()
val actionName = annotation.actionName
val alias = annotation.alias
alias.forEach { name ->
addStatement("actionMap[\"$name\"] = ${handler.simpleName.asString()}")
}
addStatement("actionMap[\"$actionName\"] = ${handler.simpleName.asString()}")
}
}.build()).apply {
addImport("moe.fuqiuluo.shamrock.remote.action.ActionManager", "actionMap")
actionHandlers.forEach {
addImport(it.packageName.asString(), it.simpleName.asString())
}
}.build()
codeGenerator.createNewFile(
dependencies = Dependencies(aggregating = false),
packageName = packageName,
fileName = "Auto" + classDeclaration.simpleName.asString()
).use { outputStream ->
outputStream.writer().use {
fileSpec.writeTo(it)
}
}
}
}
}

View File

@ -0,0 +1,77 @@
@file:Suppress("UNCHECKED_CAST")
package moe.fuqiuluo.ksp.impl
import com.google.devtools.ksp.isInternal
import com.google.devtools.ksp.isPrivate
import com.google.devtools.ksp.processing.CodeGenerator
import com.google.devtools.ksp.processing.Dependencies
import com.google.devtools.ksp.processing.KSPLogger
import com.google.devtools.ksp.processing.Resolver
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.symbol.ClassKind
import com.google.devtools.ksp.symbol.KSAnnotated
import com.google.devtools.ksp.symbol.KSClassDeclaration
import com.google.devtools.ksp.symbol.KSDeclaration
import com.google.devtools.ksp.validate
import com.squareup.kotlinpoet.FileSpec
import kotlinx.serialization.Serializable
class ProtobufProcessor(
private val codeGenerator: CodeGenerator,
private val logger: KSPLogger
): SymbolProcessor {
override fun process(resolver: Resolver): List<KSAnnotated> {
val symbols = resolver.getSymbolsWithAnnotation(Serializable::class.qualifiedName!!)
val unableToProcess = symbols.filterNot { it.validate() }
val actions = (symbols.filter {
it is KSClassDeclaration && it.validate() && it.classKind == ClassKind.CLASS
} as Sequence<KSClassDeclaration>).filter {
it.superTypes.any { superType ->
superType.resolve().declaration.qualifiedName?.asString() == "moe.fuqiuluo.symbols.Protobuf"
}
}.toList()
if (actions.isNotEmpty()) {
actions.forEachIndexed { index, clz ->
if (clz.isInternal()) return@forEachIndexed
if (clz.isPrivate()) return@forEachIndexed
val packageName = "protobuf.auto"
val fileSpecBuilder = FileSpec.scriptBuilder("FastProtobuf", packageName)
fileSpecBuilder.addImport("kotlinx.serialization.protobuf", "ProtoBuf")
fileSpecBuilder.addImport("kotlinx.serialization", "decodeFromByteArray")
fileSpecBuilder.addImport("kotlinx.serialization", "encodeToByteArray")
if (clz.parentDeclaration != null) {
fileSpecBuilder.addImport(clz.importPackage, clz.simpleName.asString())
} else {
fileSpecBuilder.addImport(clz.packageName.asString(), clz.simpleName.asString())
}
if (clz.typeParameters.isNotEmpty()) {
val genericType = clz.typeParameters.joinToString(", ") { it.name.asString() }
fileSpecBuilder.addStatement("""inline fun <$genericType> ${clz.simpleName.asString()}<$genericType>.toByteArray() = ProtoBuf.encodeToByteArray(this)""")
} else {
fileSpecBuilder.addStatement("inline fun ${clz.simpleName.asString()}.toByteArray() = ProtoBuf.encodeToByteArray(this)")
}
codeGenerator.createNewFile(
dependencies = Dependencies.ALL_FILES,
packageName = packageName,
fileName = "FP${clz.simpleName.asString().hashCode()}"
).use { outputStream ->
outputStream.writer().use {
fileSpecBuilder.build().writeTo(it)
}
}
}
}
return unableToProcess.toList()
}
private val KSDeclaration.importPackage: String
get() = if (parentDeclaration != null) {
parentDeclaration!!.importPackage + "." + parentDeclaration!!.simpleName.asString()
} else packageName.asString()
}

View File

@ -0,0 +1,111 @@
@file:Suppress("UNCHECKED_CAST", "LocalVariableName", "PrivatePropertyName")
@file:OptIn(KspExperimental::class)
package moe.fuqiuluo.ksp.impl
import com.google.devtools.ksp.KspExperimental
import com.google.devtools.ksp.getAnnotationsByType
import com.google.devtools.ksp.getClassDeclarationByName
import com.google.devtools.ksp.processing.CodeGenerator
import com.google.devtools.ksp.processing.Dependencies
import com.google.devtools.ksp.processing.KSPLogger
import com.google.devtools.ksp.processing.Resolver
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.symbol.ClassKind
import com.google.devtools.ksp.symbol.KSAnnotated
import com.google.devtools.ksp.symbol.KSClassDeclaration
import com.google.devtools.ksp.symbol.KSVisitorVoid
import com.google.devtools.ksp.validate
import com.squareup.kotlinpoet.ClassName
import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.FunSpec
import moe.fuqiuluo.symbols.Process
import moe.fuqiuluo.symbols.XposedHook
class XposedHookProcessor(
private val codeGenerator: CodeGenerator,
private val logger: KSPLogger
): SymbolProcessor {
override fun process(resolver: Resolver): List<KSAnnotated> {
val symbols = resolver.getSymbolsWithAnnotation(XposedHook::class.qualifiedName!!)
val unableToProcess = symbols.filterNot { it.validate() }
val actions = (symbols.filter {
it is KSClassDeclaration && it.validate() && it.classKind == ClassKind.CLASS
} as Sequence<KSClassDeclaration>).toList()
if (actions.isNotEmpty()) {
val firstActions = arrayListOf<KSClassDeclaration>()
val serviceActions = arrayListOf<KSClassDeclaration>()
actions.forEach {
val priority = it.getAnnotationsByType(XposedHook::class).first().priority
if (priority >= 10) {
serviceActions.add(it)
} else {
firstActions.add(it)
}
}
val context = ClassName("android.content", "Context")
val packageName = "moe.fuqiuluo.shamrock.xposed.hooks"
val fileSpec = FileSpec.builder(packageName, "AutoActionLoader").addFunction(FunSpec.builder("runFirstActions")
.addParameter("ctx", context)
.apply {
firstActions.forEach { handler ->
val annotation = handler.getAnnotationsByType(XposedHook::class).first()
val process = annotation.process
val className = handler.simpleName.asString()
if (process == Process.MAIN) {
addStatement("if (PlatformUtils.isMainProcess()) ")
} else if (process == Process.MSF) {
addStatement("if (PlatformUtils.isMsfProcess()) ")
}
addStatement("$className().invoke(ctx)")
}
}.build()
).addFunction(FunSpec.builder("runServiceActions")
.addParameter("ctx", context).apply {
serviceActions.forEach { handler ->
val annotation = handler.getAnnotationsByType(XposedHook::class).first()
val process = annotation.process
val className = handler.simpleName.asString()
if (process == Process.MAIN) {
addStatement("if (PlatformUtils.isMainProcess()) ")
} else if (process == Process.MSF) {
addStatement("if (PlatformUtils.isMsfProcess()) ")
}
addStatement("$className().invoke(ctx)")
}
}.build()
).apply {
firstActions.forEach {
addImport(it.packageName.asString(), it.simpleName.asString())
}
serviceActions.forEach {
addImport(it.packageName.asString(), it.simpleName.asString())
}
addImport("moe.fuqiuluo.shamrock.utils", "PlatformUtils")
}.build()
codeGenerator.createNewFile(
dependencies = Dependencies(aggregating = false),
packageName = packageName,
fileName = "AutoActionLoader"
).use { outputStream ->
outputStream.writer().use {
fileSpec.writeTo(it)
}
}
}
return unableToProcess.toList()
}
inner class ActionLoaderVisitor(
private val firstActions: List<KSClassDeclaration>,
private val serviceActions: List<KSClassDeclaration>,
): KSVisitorVoid() {
override fun visitClassDeclaration(classDeclaration: KSClassDeclaration, data: Unit) {
}
}
}

View File

@ -0,0 +1,17 @@
package moe.fuqiuluo.ksp.providers
import com.google.auto.service.AutoService
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
import com.google.devtools.ksp.processing.SymbolProcessorProvider
import moe.fuqiuluo.ksp.impl.OneBotHandlerProcessor
@AutoService(SymbolProcessorProvider::class)
class OneBotHandlerProcessorProvider: SymbolProcessorProvider {
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
return OneBotHandlerProcessor(
environment.codeGenerator,
environment.logger
)
}
}

View File

@ -0,0 +1,17 @@
package moe.fuqiuluo.ksp.providers
import com.google.auto.service.AutoService
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
import com.google.devtools.ksp.processing.SymbolProcessorProvider
import moe.fuqiuluo.ksp.impl.ProtobufProcessor
@AutoService(SymbolProcessorProvider::class)
class ProtobufProvider: SymbolProcessorProvider {
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
return ProtobufProcessor(
environment.codeGenerator,
environment.logger
)
}
}

View File

@ -0,0 +1,14 @@
package moe.fuqiuluo.ksp.providers
import com.google.auto.service.AutoService
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
import com.google.devtools.ksp.processing.SymbolProcessorProvider
import moe.fuqiuluo.ksp.impl.XposedHookProcessor
@AutoService(SymbolProcessorProvider::class)
class XposedHookProcessorProvider: SymbolProcessorProvider {
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
return XposedHookProcessor(environment.codeGenerator, environment.logger)
}
}

1
protobuf/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

45
protobuf/build.gradle.kts Normal file
View File

@ -0,0 +1,45 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
kotlin("plugin.serialization") version "1.9.21"
id("com.google.devtools.ksp") version "1.9.21-1.0.15"
}
android {
namespace = "moe.whitechi73.protobuf"
compileSdk = 34
defaultConfig {
minSdk = 24
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation(DEPENDENCY_PROTOBUF)
implementation(kotlinx("serialization-protobuf", "1.6.2"))
implementation(kotlinx("serialization-json", "1.6.2"))
implementation(project(":annotations"))
ksp(project(":processor"))
}

View File

21
protobuf/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@ -0,0 +1,128 @@
@file:OptIn(ExperimentalSerializationApi::class)
@file:Suppress("ArrayInDataClass")
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunAddRichMediaReq(
@ProtoNumber(1) val commInfo: WeiyunCollectCommInfo? = null,
@ProtoNumber(2) val summary: WeiyunRichMediaSummary? = null,
@ProtoNumber(3) val richMediaContent: List<WeiyunRichMediaContent>? = null,
@ProtoNumber(4) val needShareUrl: Boolean = false,
)
@Serializable
data class WeiyunRichMediaSummary(
@ProtoNumber(1) val title: String? = null,
@ProtoNumber(2) val subTitle: String = "",
@ProtoNumber(3) val brief: String = "",
@ProtoNumber(4) val picList: List<WeiyunPicInfo>? = null,
@ProtoNumber(5) val contentType: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val originalUri: String = "",
@ProtoNumber(7) val publisher: String = "",
@ProtoNumber(8) val richMediaVersion: UInt = UInt.MIN_VALUE,
)
@Serializable
data class WeiyunRichMediaContent(
@ProtoNumber(1) val richMedia: WeiyunRichMedia? = null,
@ProtoNumber(2) val rawData: ByteArray? = null,
@ProtoNumber(3) val bizDataList: List<ByteArray>? = null,
@ProtoNumber(4) val picList: List<WeiyunPicInfo>? = null,
@ProtoNumber(5) val fileList: List<WeiyunFileInfo>? = null,
)
@Serializable
data class WeiyunFileInfo(
@ProtoNumber(1) val src: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val uid: ULong = ULong.MIN_VALUE,
@ProtoNumber(3) val bid: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val fid: String = "",
@ProtoNumber(5) val name: String = "",
@ProtoNumber(6) val size: ULong = ULong.MIN_VALUE,
@ProtoNumber(7) val md5: ByteArray? = null,
@ProtoNumber(8) val sha1: ByteArray? = null,
@ProtoNumber(9) val category: UInt = UInt.MIN_VALUE,
)
@Serializable
data class WeiyunRichMedia(
@ProtoNumber(1) val sections: List<WeiyunSection>? = null
)
@Serializable
data class WeiyunSection(
@ProtoNumber(1) val items: List<WeiyunItem>? = null
)
@Serializable
data class WeiyunItem(
@ProtoNumber(1) val itemType: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val paragraph: WeiyunParagraph? = null,
@ProtoNumber(3) val anchor: WeiyunAnchor? = null,
@ProtoNumber(4) val picInfo: WeiyunPicInfo? = null,
)
@Serializable
data class WeiyunPicInfo(
@ProtoNumber(1) val uri: String = "",
@ProtoNumber(2) val md5: ByteArray? = null,
@ProtoNumber(3) val sha1: ByteArray? = null,
@ProtoNumber(4) val name: String = "",
@ProtoNumber(5) val note: String = "",
@ProtoNumber(6) val width: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val height: UInt = UInt.MIN_VALUE,
@ProtoNumber(8) val size: ULong = ULong.MIN_VALUE,
@ProtoNumber(9) val type: UInt = UInt.MIN_VALUE,
@ProtoNumber(10) val owner: WeiyunAuthor? = null,
@ProtoNumber(11) val picId: String = "",
)
@Serializable
data class WeiyunAnchor(
@ProtoNumber(1) val url: String = "",
@ProtoNumber(2) val desc: String = "",
)
@Serializable
data class WeiyunParagraph(
@ProtoNumber(1) val content: String = "",
@ProtoNumber(2) val style: WeiyunStyle? = null,
)
@Serializable
data class WeiyunStyle(
@ProtoNumber(1) val color: String = "#FFFFFF",
@ProtoNumber(2) val fontFamily: String = "",
@ProtoNumber(3) val fontWeight: String = "normal",
@ProtoNumber(4) val fontSize: String = "",
)
@Serializable
data class WeiyunCollectCommInfo(
@ProtoNumber(1) val bid: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val category: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val author: WeiyunAuthor? = null,
@ProtoNumber(4) val createTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(5) val seq: ULong = ULong.MIN_VALUE,
@ProtoNumber(6) val bizKey: String = "",
@ProtoNumber(7) val bizDataList: List<ByteArray>? = null,
@ProtoNumber(8) val shareUrl: String = "",
@ProtoNumber(9) val originalAppId: UInt = UInt.MIN_VALUE,
@ProtoNumber(10) val customGroupId: UInt = UInt.MIN_VALUE,
@ProtoNumber(11) val modifyTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(12) val qzoneUgcKey: String = "",
)
@Serializable
data class WeiyunAuthor(
@ProtoNumber(1) val type: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val numId: ULong = ULong.MIN_VALUE,
@ProtoNumber(3) val strId: String = "",
@ProtoNumber(4) val groupId: ULong = ULong.MIN_VALUE,
@ProtoNumber(5) val groupName: String = "",
)

View File

@ -0,0 +1,13 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunAddRichMediaResp(
@ProtoNumber(1) val cid: String = "",
@ProtoNumber(2) val collectTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(3) val shareUrl: String = "",
)

View File

@ -0,0 +1,11 @@
package protobuf.fav
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class WeiyunComm(
@ProtoNumber(1) val req: WeiyunCommonReq? = null,
@ProtoNumber(2) val resp: WeiyunCommonResp? = null
): Protobuf<WeiyunComm>

View File

@ -0,0 +1,15 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunCommonReq (
@ProtoNumber(2000) val getFavListReq: WeiyunGetFavListReq? = null,
@ProtoNumber(2001) val getFavContentReq: WeiyunGetFavContentReq? = null,
@ProtoNumber(2009) val addRichMediaReq: WeiyunAddRichMediaReq? = null,
@ProtoNumber(2010) val fastUploadResourceReq: WeiyunFastUploadResourceReq? = null,
)

View File

@ -0,0 +1,14 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunCommonResp(
@ProtoNumber(20000) val getFavListResp: WeiyunGetFavListResp? = null,
@ProtoNumber(20001) val getFavContentResp: WeiyunGetFavContentResp? = null,
@ProtoNumber(20009) val addRichMediaResp: WeiyunAddRichMediaResp? = null,
@ProtoNumber(20010) val fastUploadResourceResp: WeiyunFastUploadResourceResp? = null,
)

View File

@ -0,0 +1,14 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunFastUploadResourceReq(
@ProtoNumber(1) val picInfoList: List<WeiyunPicInfo>? = null,
@ProtoNumber(2) val fileInfoList: List<WeiyunFileInfo>? = null,
@ProtoNumber(3) val hostFlag: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val httpsFlag: UInt = UInt.MIN_VALUE,
)

View File

@ -0,0 +1,39 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunFastUploadResourceResp(
@ProtoNumber(1) val picResultList: List<WeiyunFastUploadPicResult>? = null,
@ProtoNumber(2) val fileResultList: List<WeiyunFastUploadFileResult>? = null,
)
@Serializable
data class WeiyunFastUploadPicResult(
@ProtoNumber(1) val result: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val picInfo: WeiyunPicInfo? = null,
)
@Serializable
data class WeiyunFastUploadFileResult(
@ProtoNumber(1) val result: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val picInfo: WeiyunPicInfo? = null,
@ProtoNumber(3) val uploadFileInfo: WeiyunUploadFileInfo? = null,
@ProtoNumber(4) val notRetransmission: UInt = UInt.MIN_VALUE,
@ProtoNumber(5) val failedTips: String = "",
)
@Serializable
data class WeiyunUploadFileInfo(
@ProtoNumber(1) val fileId: String = "",
@ProtoNumber(2) val sha1: ByteArray? = null,
@ProtoNumber(3) val checkKey: ByteArray? = null,
@ProtoNumber(4) val host: String = "",
@ProtoNumber(5) val port: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val httpsHost: String = "",
@ProtoNumber(7) val httpsPort: UInt = UInt.MIN_VALUE,
)

View File

@ -0,0 +1,11 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunGetFavContentReq(
@ProtoNumber(1) var cidList: List<String> = emptyList(),
)

View File

@ -0,0 +1,50 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunGetFavContentResp(
@ProtoNumber(1) val content: List<WeiyunContent>? = null
)
@Serializable
data class WeiyunContent(
@ProtoNumber(1) val text: WeiyunTextContent? = null,
@ProtoNumber(2) val link: WeiyunLinkContent? = null,
@ProtoNumber(3) val galley: WeiyunGalleyContent? = null,
@ProtoNumber(4) val audio: WeiyunAudioContent? = null,
@ProtoNumber(5) val video: WeiyunVideoContent? = null,
@ProtoNumber(6) val file: WeiyunFileContent? = null,
@ProtoNumber(7) val location: WeiyunLocationContent? = null,
@ProtoNumber(8) val richMedia: WeiyunRichMediaContent? = null,
)
@Serializable
data class WeiyunTextContent(
@ProtoNumber(1) val data: String,
@ProtoNumber(2) val hasEmoji: Boolean = false
)
@Serializable
class WeiyunLinkContent
@Serializable
class WeiyunGalleyContent
@Serializable
data class WeiyunAudioContent(
@ProtoNumber(1) val data: ByteArray,
)
@Serializable
class WeiyunVideoContent
@Serializable
class WeiyunFileContent
@Serializable
class WeiyunLocationContent

View File

@ -0,0 +1,19 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunGetFavListReq(
@ProtoNumber(1) val type: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val bid: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val category: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val startTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(5) val orderType: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val startPos: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val pageSize: UInt = UInt.MIN_VALUE,
@ProtoNumber(8) val syncPolicy: UInt = UInt.MIN_VALUE,
@ProtoNumber(9) val reqSource: UInt = UInt.MIN_VALUE,
)

View File

@ -0,0 +1,41 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class WeiyunGetFavListResp(
@ProtoNumber(1) val collections: List<WeiyunCollection>? = null,
@ProtoNumber(2) val totalCnt: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val result: UInt = UInt.MIN_VALUE,
)
@Serializable
data class WeiyunCollection(
@ProtoNumber(1) val cid: String = "",
@ProtoNumber(2) val type: Int = Int.MIN_VALUE,
@ProtoNumber(3) val status: Int = Int.MIN_VALUE,
@ProtoNumber(4) val author: WeiyunAuthor? = null,
@ProtoNumber(5) val bid: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val srcAppId: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val srcAppVer: String = "",
@ProtoNumber(8) val category: UInt = UInt.MIN_VALUE,
@ProtoNumber(9) val createTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(10) val collectTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(11) val modifyTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(12) val seq: ULong = ULong.MIN_VALUE,
@ProtoNumber(13) val bizKey: String = "",
@ProtoNumber(14) val bizDataList: List<ByteArray>? = null,
@ProtoNumber(15) val summary: String = "",
@ProtoNumber(16) val starMark: Boolean = false,
@ProtoNumber(17) val starTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(18) val shareUrl: String = "",
@ProtoNumber(19) val originalAppId: UInt = UInt.MIN_VALUE,
@ProtoNumber(20) val customGroupId: UInt = UInt.MIN_VALUE,
@ProtoNumber(21) val securityBeat: UInt = UInt.MIN_VALUE,
@ProtoNumber(22) val qzoneUgcKey: String = "",
)

View File

@ -0,0 +1,32 @@
@file:OptIn(ExperimentalSerializationApi::class)
@file:Suppress("ArrayInDataClass")
package protobuf.fav
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class WeiyunMsgHead(
@ProtoNumber(1) val uin: ULong = ULong.MIN_VALUE,
@ProtoNumber(2) val seq: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val type: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val cmd: UInt = UInt.MIN_VALUE,
@ProtoNumber(5) val appId: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val version: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val netType: UInt = UInt.MIN_VALUE,
@ProtoNumber(8) val clientIp: String? = null,
@ProtoNumber(9) val encrypt: UInt = UInt.MIN_VALUE,
@ProtoNumber(10) val keyType: UInt = UInt.MIN_VALUE,
@ProtoNumber(11) val key: ByteArray? = null,
@ProtoNumber(14) val majorVersion: UInt = UInt.MIN_VALUE,
@ProtoNumber(15) val minorVersion: UInt = UInt.MIN_VALUE,
@ProtoNumber(101) val retCode: UInt = UInt.MIN_VALUE,
@ProtoNumber(102) val retMsg: String? = null,
@ProtoNumber(103) val promptMsg: String? = null,
@ProtoNumber(111) val totalSpace: ULong = ULong.MIN_VALUE,
@ProtoNumber(112) val usedSpace: ULong = ULong.MIN_VALUE,
): Protobuf<WeiyunMsgHead>

View File

@ -0,0 +1,20 @@
package protobuf.group_file_common
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class FolderInfo(
@SerialName("folder_id") @ProtoNumber(1) val folderId: String = "",
@SerialName("parent_folder_id") @ProtoNumber(2) val parentFolderId: String = "",
@SerialName("folder_name") @ProtoNumber(3) val folderName: String = "",
@SerialName("create_time") @ProtoNumber(4) val createTime: UInt = UInt.MIN_VALUE,
@SerialName("modify_time") @ProtoNumber(5) val modifyTime: UInt = UInt.MIN_VALUE,
@SerialName("creator_uin") @ProtoNumber(6) val createUin: ULong = ULong.MIN_VALUE,
@SerialName("creator_name") @ProtoNumber(7) val creatorName: String? = null,
@SerialName("total_file_cnt") @ProtoNumber(8) val totalFileCnt: UInt = UInt.MIN_VALUE,
@SerialName("modifier_uin") @ProtoNumber(9) val modifyUin: ULong? = null,
@SerialName("modifier_name") @ProtoNumber(10) val modifierName: String? = null,
@SerialName("used_space") @ProtoNumber(11) val usedSpace: ULong = ULong.MIN_VALUE,
)

View File

@ -0,0 +1,406 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.guild
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
import protobuf.qweb.QWebExtInfo
@Serializable
data class GetGuildFeedsReq(
@ProtoNumber(1) var count: Int,
@ProtoNumber(2) var from: Int? = null,
@ProtoNumber(3) var feedAttchInfo: ByteArray? = null,
@ProtoNumber(4) var guildId: ULong? = null,
@ProtoNumber(5) var getType: Int? = null,
@ProtoNumber(6) var sortOption: Int? = null,
@ProtoNumber(7) var u7: Int? = null,
@ProtoNumber(8) var u8: Int? = null,
@ProtoNumber(9) var u9: ByteArray? = null,
): Protobuf<GetGuildFeedsReq>
@Serializable
data class GetGuildFeedsRsp(
@ProtoNumber(1) var vecFeed: List<StFeed>? = null,
@ProtoNumber(2) var isFinish: Int = 0,
//@ProtoNumber(3) var feedAttchInfo: ByteArray? = null,
//@ProtoNumber(4) var traceId: String? = null,
): Protobuf<GetGuildFeedsRsp>
@Serializable
data class StFeed(
@SerialName("id") @ProtoNumber(1) var id: String,
@SerialName("title") @ProtoNumber(2) var title: StRichText,
@SerialName("poster") @ProtoNumber(4) var poster: StUser? = null,
@SerialName("videos") @ProtoNumber(5) var videos: List<StVideo>? = null,
@SerialName("contents") @ProtoNumber(6) var contents: StRichText? = null,
@SerialName("create_time") @ProtoNumber(7) var createTime: ULong? = null,
@SerialName("comment_count") @ProtoNumber(9) var commentCount: UInt? = null,
@SerialName("comments") @ProtoNumber(10) var vecComment: List<StComment>? = null,
@SerialName("share") @ProtoNumber(11) var share: StShare? = null,
@SerialName("visitor_info") @ProtoNumber(12) var visitorInfo: StVisitor? = null,
@SerialName("images") @ProtoNumber(13) var images: List<StImage>? = null,
@SerialName("poi") @ProtoNumber(14) var poiInfo: StPoiInfoV2? = null,
@SerialName("op_mask") @ProtoNumber(17) var opMask: List<Int>? = null,
@SerialName("channel_info") @ProtoNumber(21) var channelInfo: StChannelInfo? = null,
@SerialName("create_time_ns") @ProtoNumber(22) var createTimeNs: ULong? = null,
@SerialName("update_time") @ProtoNumber(28) var updateTime: ULong? = null,
@SerialName("total_like") @ProtoNumber(29) var totalLike: StTotalLike? = null,
@SerialName("discussion_mum") @ProtoNumber(31) var discussionMum: UInt? = null,
@SerialName("feed_type") @ProtoNumber(32) var feedType: UInt? = null,
@SerialName("default_background_img") @ProtoNumber(34) var defaultBackgroundImg: String? = null,
@SerialName("group_code") @ProtoNumber(35) var groupCode: ULong? = null,
)
@Serializable
data class StTotalLike (
@SerialName("count") @ProtoNumber(1) var likeCount: UInt? = null,
@SerialName("is_clicked") @ProtoNumber(2) var isClicked: UInt? = null,
)
@Serializable
data class StPoiInfoV2(
@SerialName("poi_id") @ProtoNumber(1) var poiId: String? = null,
@SerialName("name") @ProtoNumber(2) var name: String? = null,
@SerialName("poi_type") @ProtoNumber(3) var poiType: Int? = null,
@SerialName("type_name") @ProtoNumber(4) var typeName: String? = null,
@SerialName("address") @ProtoNumber(5) var address: String? = null,
@SerialName("district_code") @ProtoNumber(6) var districtCode: Int? = null,
@SerialName("gps") @ProtoNumber(7) var gps: StGPSV2? = null,
@SerialName("distance") @ProtoNumber(8) var distance: Int? = null,
@SerialName("hot_value") @ProtoNumber(9) var hotValue: Int? = null,
@SerialName("phone") @ProtoNumber(10) var phone: String? = null,
@SerialName("country") @ProtoNumber(11) var country: String? = null,
@SerialName("province") @ProtoNumber(12) var province: String? = null,
@SerialName("city") @ProtoNumber(13) var city: String? = null,
@SerialName("poi_num") @ProtoNumber(14) var poiNum: Int? = null,
@SerialName("poi_order_type") @ProtoNumber(15) var poiOrderType: Int? = null,
@SerialName("default_name") @ProtoNumber(16) var defaultName: String? = null,
@SerialName("district") @ProtoNumber(17) var district: String? = null,
@SerialName("dian_ping_id") @ProtoNumber(18) var dianPingId: String? = null,
@SerialName("distance_text") @ProtoNumber(19) var distanceText: String? = null,
@SerialName("display_name") @ProtoNumber(20) var displayName: String? = null,
)
@Serializable
data class StGPSV2(
@SerialName("lat") @ProtoNumber(1) var latitude: Long? = null,
@SerialName("lon") @ProtoNumber(2) var longitude: Long? = null,
)
@Serializable
data class StShare(
@SerialName("title") @ProtoNumber(1) var title: String? = null,
@SerialName("desc") @ProtoNumber(2) var desc: String? = null,
@SerialName("type") @ProtoNumber(3) var type: UInt? = null,
@SerialName("url") @ProtoNumber(4) var url: String? = null,
@SerialName("author") @ProtoNumber(5) var author: StUser? = null,
@SerialName("poster") @ProtoNumber(6) var poster: StUser? = null,
@SerialName("videos") @ProtoNumber(7) var videos: List<StVideo>? = null,
@SerialName("short_url") @ProtoNumber(8) var shorturl: String? = null,
@SerialName("share_card_info") @ProtoNumber(9) var shareCardInfo: String? = null,
//@ProtoNumber(10) var shareQzoneInfo: Any? = null,
@SerialName("images") @ProtoNumber(11) var images: List<StImage>? = null,
@SerialName("publish_total_user") @ProtoNumber(12) var publishTotalUser: UInt? = null,
@SerialName("shared_count") @ProtoNumber(13) var sharedCount: UInt? = null,
//@ProtoNumber(14) var channelShareInfo: Any? = null,
)
@Serializable
data class StVisitor(
@SerialName("view_count")
@ProtoNumber(1) val viewCount: UInt? = null,
@SerialName("recome_count")
@ProtoNumber(3) val recomeCount: UInt? = null,
@SerialName("view_desc")
@ProtoNumber(4) val viewDesc: String? = null,
)
@Serializable
data class StComment(
@SerialName("id") @ProtoNumber(1) var id: String? = null,
@SerialName("poster") @ProtoNumber(2) var postUser: StUser? = null,
@SerialName("create_time") @ProtoNumber(3) var createTime: ULong? = null,
@SerialName("content") @ProtoNumber(4) var content: String? = null,
@SerialName("reply_count") @ProtoNumber(5) var replyCount: UInt? = null,
@SerialName("replies") @ProtoNumber(6) var vecReply: List<StReply>? = null,
//@ProtoNumber(7) var busiData: Any? = null,
@SerialName("like_info") @ProtoNumber(8) var likeInfo: StLike? = null,
@SerialName("type_flag") @ProtoNumber(9) var typeFlag: UInt? = null,
@SerialName("at_uin_list") @ProtoNumber(10) var atUinList: List<String>? = null,
@SerialName("type_flag2") @ProtoNumber(11) var typeFlag2: UInt? = null,
@SerialName("create_time_ns") @ProtoNumber(12) var createTimeNs: ULong? = null,
@SerialName("store_ext_info") @ProtoNumber(13) var storeExtInfo: List<QWebExtInfo>? = null,
@SerialName("third_id") @ProtoNumber(14) var thirdId: String? = null,
@SerialName("source_type") @ProtoNumber(15) var sourceType: UInt? = null,
@SerialName("rich_contents") @ProtoNumber(16) var richContents: StRichText? = null,
@SerialName("images") @ProtoNumber(17) var images: List<StImage>? = null,
@SerialName("sequence") @ProtoNumber(18) var sequence: ULong? = null,
@SerialName("next_page_reply") @ProtoNumber(19) var nextPageReply: Boolean? = null,
@SerialName("attach_info") @ProtoNumber(20) var attachInfo: String? = null,
)
@Serializable
data class StReply(
@SerialName("id") @ProtoNumber(1) var id: String? = null,
@SerialName("poster") @ProtoNumber(2) var postUser: StUser? = null,
@SerialName("create_time") @ProtoNumber(3) var createTime: ULong? = null,
@SerialName("content") @ProtoNumber(4) var content: String? = null,
@SerialName("target") @ProtoNumber(5) var targetUser: StUser? = null,
//@ProtoNumber(6) var busiData: ByteArray? = null,
@SerialName("like_info") @ProtoNumber(7) var likeInfo: StLike? = null,
@SerialName("type_flag") @ProtoNumber(8) var typeFlag: UInt? = null,
@SerialName("modify_flag") @ProtoNumber(9) var modifyflag: UInt? = null,
@SerialName("at_uin_list") @ProtoNumber(10) var atUinList: List<String>? = null,
@SerialName("type_flag2") @ProtoNumber(11) var typeFlag2: UInt? = null,
@SerialName("create_time_ns") @ProtoNumber(12) var createTimeNs: ULong? = null,
@SerialName("store_ext_info") @ProtoNumber(13) var storeExtInfo: List<QWebExtInfo>? = null,
@SerialName("third_id") @ProtoNumber(14) var thirdId: String? = null,
@SerialName("target_reply_id") @ProtoNumber(15) var targetReplyID: String? = null,
@SerialName("source_type") @ProtoNumber(16) var sourceType: UInt? = null,
@SerialName("rich_contents") @ProtoNumber(17) var richContents: StRichText? = null,
@SerialName("images") @ProtoNumber(18) var images: List<StImage>? = null,
)
@Serializable
data class StLike(
@SerialName("id")
@ProtoNumber(1) var id: String? = null,
@SerialName("count")
@ProtoNumber(2) var count: UInt? = null,
@SerialName("status")
@ProtoNumber(3) var status: UInt? = null,
@SerialName("like_uin_list")
@ProtoNumber(4) var vecUser: List<StUser>? = null,
@SerialName("poster")
@ProtoNumber(6) var postUser: StUser? = null,
@SerialName("has_liked_count")
@ProtoNumber(7) var hasLikedCount: UInt? = null,
@SerialName("owner_status")
@ProtoNumber(8) var ownerStatus: UInt? = null,
@SerialName("jump_url")
@ProtoNumber(9) var jumpUrl: String? = null,
)
@Serializable
data class StVideo(
@SerialName("file_id") @ProtoNumber(1) var fileId: String? = null,
@SerialName("file_size") @ProtoNumber(2) var fileSize: UInt? = null,
@SerialName("duration") @ProtoNumber(3) var duration: UInt? = null,
@SerialName("width") @ProtoNumber(4) var width: UInt? = null,
@SerialName("height") @ProtoNumber(5) var height: UInt? = null,
@SerialName("play_url") @ProtoNumber(6) var playUrl: String? = null,
@SerialName("trans_status") @ProtoNumber(7) var transStatus: UInt? = null,
@SerialName("video_prior") @ProtoNumber(8) var videoPrior: UInt? = null,
@SerialName("video_rate") @ProtoNumber(9) var videoRate: UInt? = null,
//@ProtoNumber(10) var vecVideoUrl: String? = null,
//@ProtoNumber(11) var busiData: Any? = null,
@SerialName("approval_status") @ProtoNumber(12) var approvalStatus: UInt? = null,
@SerialName("video_source") @ProtoNumber(13) var videoSource: UInt? = null,
@SerialName("media_quality_rank") @ProtoNumber(14) var mediaQualityRank: UInt? = null,
@SerialName("media_quality_score") @ProtoNumber(15) var mediaQualityScore: Float? = null,
@SerialName("md5") @ProtoNumber(16) var videoMD5: String? = null,
@SerialName("is_quic") @ProtoNumber(17) var isQuic: UInt? = null,
@SerialName("orientation") @ProtoNumber(18) var orientation: Int? = null,
@SerialName("cover") @ProtoNumber(19) var cover: StImage? = null,
@SerialName("pattern_id") @ProtoNumber(20) var patternId: String? = null,
@SerialName("display_index") @ProtoNumber(21) var displayIndex: UInt? = null,
)
@Serializable
data class StRichText(
@SerialName("contents") @ProtoNumber(1) var contents: List<StRichTextContent>? = null,
@SerialName("images") @ProtoNumber(2) var images: List<StImage>? = null,
)
@Serializable
data class StRichTextContent(
@SerialName("type") @ProtoNumber(1) var type: Int? = null,
@SerialName("pattern_id") @ProtoNumber(2) var patternId: String? = null,
@SerialName("text") @ProtoNumber(3) var textContent: StRichTextTextContent? = null,
@SerialName("at") @ProtoNumber(4) var atContent: StRichTextAtContent? = null,
@SerialName("url") @ProtoNumber(5) var urlContent: StRichTextURLContent? = null,
@SerialName("emoji") @ProtoNumber(6) var emojiContent: StRichTextEmojiContent? = null,
@SerialName("channel") @ProtoNumber(7) var channelContent: StRichTextChannelContent? = null,
@SerialName("guild") @ProtoNumber(8) var guildContent: StRichTextGuildContent? = null,
@SerialName("icon") @ProtoNumber(9) var iconContent: StRichTextIconContent? = null,
)
@Serializable
data class StRichTextIconContent(
@SerialName("url") @ProtoNumber(1) val url: String? = null
)
@Serializable
data class StRichTextGuildContent(
@SerialName("channel_info") @ProtoNumber(1) val channelInfo: StChannelInfo? = null
)
@Serializable
data class StRichTextChannelContent(
@SerialName("channel_info") @ProtoNumber(1) val channelInfo: StChannelInfo? = null
)
@Serializable
data class StChannelInfo(
//@SerialName("sign") @ProtoNumber(1) var sign: String? = null,
@SerialName("name")
@ProtoNumber(2) var name: String? = null,
@SerialName("icon_url")
@ProtoNumber(3) var iconUrl: String? = null,
@SerialName("type")
@ProtoNumber(4) var privateType: Int? = null,
@SerialName("guild_name")
@ProtoNumber(5) var guildName: String? = null,
@SerialName("hot_icon")
@ProtoNumber(6) var hotIcon: String? = null,
@SerialName("hot_index")
@ProtoNumber(7) var hotIndex: UInt? = null,
)
@Serializable
data class StRichTextEmojiContent(
@ProtoNumber(1) var id: String? = null,
@ProtoNumber(2) var type: String? = null,
@ProtoNumber(3) var name: String? = null,
@ProtoNumber(4) var url: String? = null,
)
@Serializable
data class StRichTextURLContent(
@ProtoNumber(1) var url: String? = null,
@SerialName("display") @ProtoNumber(2) var displayText: String? = null,
@ProtoNumber(3) var type: Int? = null,
@SerialName("play_url") @ProtoNumber(4) var playUrl: String? = null,
@SerialName("platform") @ProtoNumber(5) var thirdPlatform: ThirdPlatform? = null,
@SerialName("third_video_info") @ProtoNumber(6) var thirdVideoInfo: CommThirdVideoInfo? = null,
)
@Serializable
data class CommThirdVideoInfo(
@SerialName("cover") @ProtoNumber(1) val cover: String? = null,
@SerialName("duration") @ProtoNumber(2) val duration: ULong? = null,
)
@Serializable
data class ThirdPlatform(
@ProtoNumber(1) var icon: String? = null,
@ProtoNumber(2) var name: String? = null,
)
@Serializable
data class StRichTextTextContent(
@ProtoNumber(1) var text: String? = null
)
@Serializable
data class StRichTextAtContent(
@ProtoNumber(1) var type: Int? = null,
@SerialName("guild_info") @ProtoNumber(2) var guildInfo: GuildInfo? = null,
@SerialName("role_info") @ProtoNumber(3) var roleGroupId: RoleGroupInfo? = null,
@ProtoNumber(4) var user: StUser? = null,
)
@Serializable
data class StUser(
@ProtoNumber(1) var id: String? = null,
@ProtoNumber(2) var nick: String? = null,
@ProtoNumber(3) var icon: StIconInfo? = null,
@ProtoNumber(4) var desc: String? = null,
@SerialName("follow_state") @ProtoNumber(5) var followState: UInt? = null,
@ProtoNumber(6) var type: UInt? = null,
@ProtoNumber(7) var sex: UInt? = null,
@ProtoNumber(8) var birthday: ULong? = null,
@ProtoNumber(9) var school: String? = null,
@ProtoNumber(11) var location: String? = null,
//@ProtoNumber(12) var busiData: ByteArray? = null,
@SerialName("frd") @ProtoNumber(13) var frdState: UInt? = null,
@SerialName("relation_state") @ProtoNumber(14) var relationState: UInt? = null,
@SerialName("black_state") @ProtoNumber(15) var blackState: UInt? = null,
@ProtoNumber(16) var medal: StTagMedalInfo? = null,
@ProtoNumber(17) var constellation: Int? = null,
@SerialName("jump_url") @ProtoNumber(18) var jumpUrl: String? = null,
@SerialName("location_code") @ProtoNumber(19) var locationCode: String? = null,
@SerialName("third_id") @ProtoNumber(20) var thirdId: String? = null,
@ProtoNumber(21) var company: String? = null,
@SerialName("certification_desc") @ProtoNumber(22) var certificationDesc: String? = null,
@SerialName("desc_type") @ProtoNumber(23) var descType: UInt? = null,
//@ProtoNumber(24) var channelUserInfo: Any? = null,
//@SerialName("login_id") @ProtoNumber(25) var loginId: String? = null,
@ProtoNumber(26) var uin: ULong? = null,
@SerialName("nick_flag") @ProtoNumber(27) var nickFlag: UInt? = null,
@SerialName("manage_tag") @ProtoNumber(28) var manageTag: CustomManageTag? = null,
//@SerialName("personal_medal") @ProtoNumber(29) var personalMedal: PersonalMedal? = null,
)
@Serializable
data class PersonalMedal(
@SerialName("start") @ProtoNumber(1) val startTime: ULong? = null,
@SerialName("end") @ProtoNumber(2) val endTime: ULong? = null,
@ProtoNumber(3) var url: String? = null,
)
@Serializable
data class StTagMedalInfo(
@SerialName("id") @ProtoNumber(1) val tagId: ULong? = null,
@SerialName("name") @ProtoNumber(2) val tagName: String? = null,
@ProtoNumber(3) val rank: ULong? = null,
)
@Serializable
data class CustomManageTag(
@ProtoNumber(3) val color: UInt? = null,
@SerialName("name") @ProtoNumber(2) val tagName: String? = null,
)
@Serializable
data class StIconInfo(
//@SerialName("url_40") @ProtoNumber(1) var iconUrl40: String? = null,
//@SerialName("url_100") @ProtoNumber(2) var iconUrl100: String? = null,
//@SerialName("url_140") @ProtoNumber(3) var iconUrl140: String? = null,
//@SerialName("url_640") @ProtoNumber(4) var iconUrl640: String? = null,
@SerialName("url") @ProtoNumber(5) var iconUrl: String? = null,
)
@Serializable
data class RoleGroupInfo(
@SerialName("role") @ProtoNumber(1) var roleId: ULong? = null,
@ProtoNumber(2) var name: String? = null,
@ProtoNumber(3) var color: ULong? = null,
)
@Serializable
data class GuildInfo(
@SerialName("guild_id") @ProtoNumber(1) var guildId: ULong? = null,
@ProtoNumber(2) var name: String? = null,
@SerialName("join_time") @ProtoNumber(3) var joinTime: ULong? = null,
)
@Serializable
data class StImage(
@ProtoNumber(1) var width: UInt? = null,
@ProtoNumber(2) var height: UInt? = null,
@ProtoNumber(3) var picUrl: String? = null,
@SerialName("image_urls") @ProtoNumber(4) var vecImageUrl: List<StImageUrl>? = null,
@SerialName("id") @ProtoNumber(5) var picId: String? = null,
//@ProtoNumber(6) var busiData: Any? = null,
@SerialName("md5") @ProtoNumber(7) var imageMD5: String? = null,
@SerialName("layer_pic_url") @ProtoNumber(8) var layerPicUrl: String? = null,
@SerialName("pattern_id") @ProtoNumber(9) var patternId: String? = null,
@SerialName("display_index") @ProtoNumber(10) var displayIndex: Int? = null,
@SerialName("size") @ProtoNumber(11) var origSize: UInt? = null,
@SerialName("is_original") @ProtoNumber(12) var isOrig: Boolean? = null,
@SerialName("is_gif") @ProtoNumber(13) var isGif: Boolean? = null,
)
@Serializable
data class StImageUrl(
@SerialName("level_type") @ProtoNumber(1) var levelType: UInt? = null,
@ProtoNumber(2) var url: String? = null,
@ProtoNumber(3) var width: UInt? = null,
@ProtoNumber(4) var height: UInt? = null,
//@ProtoNumber(5) var busiData: Any? = null,
)

View File

@ -0,0 +1,37 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.lightapp
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class AdaptShareInfoReq(
//@ProtoNumber(1) var extInfo: Any? = null,
@ProtoNumber(2) var appid: String? = null,
@ProtoNumber(3) var title: String? = null,
@ProtoNumber(4) var desc: String? = null,
@ProtoNumber(5) var time: ULong? = null,
@ProtoNumber(6) var scene: UInt? = null,
@ProtoNumber(7) var templetType: UInt? = null,
@ProtoNumber(8) var businessType: UInt? = null,
@ProtoNumber(9) var picUrl: String? = null,
@ProtoNumber(10) var vidUrl: String? = null,
@ProtoNumber(11) var jumpUrl: String? = null,
@ProtoNumber(12) var iconUrl: String? = null,
@ProtoNumber(13) var verType: UInt? = null,
@ProtoNumber(14) var shareType: UInt? = null,
@ProtoNumber(15) var versionId: String? = null,
@ProtoNumber(16) var withShareTicket: UInt? = null,
@ProtoNumber(17) var webURL: String? = null,
//@ProtoNumber(18) var appidRich: Any? = null,
@ProtoNumber(19) var template: Template? = null,
//@ProtoNumber(20) var rcvOpenId: Any? = null,
): Protobuf<AdaptShareInfoReq>
@Serializable
data class Template(
@ProtoNumber(1) var templateId: UInt? = null,
@ProtoNumber(2) var templateData: ByteArray? = null,
)

View File

@ -0,0 +1,17 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.message
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class RichMessage(
@ProtoNumber(1) val font: Font? = null,
@ProtoNumber(2) val elements: List<MessageElement>? = null
)
@Serializable
data class Font(
@ProtoNumber(9) val fontName: String? = null
)

View File

@ -0,0 +1,11 @@
package protobuf.message
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class MessageBody(
@ProtoNumber(1) val rich: RichMessage? = null,
@ProtoNumber(2) val rawBuffer: ByteArray? = null,
@ProtoNumber(3) val MsgEncryptContent: ByteArray? = null
)

View File

@ -0,0 +1,31 @@
package protobuf.message
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class MessageContent(
@ProtoNumber(1) val msgType: Int = Int.MIN_VALUE,
@ProtoNumber(2) val msgSubType: Int? = null,
@ProtoNumber(3) val u1: Int? = null,
@ProtoNumber(4) val msgViaRandom: Long = Long.MIN_VALUE,
@ProtoNumber(5) val msgSeq_: Long? = null,
@ProtoNumber(6) val msgTime: Long? = null,
@ProtoNumber(7) val u2: Int? = null,
@ProtoNumber(8) val u6: Int? = null,
@ProtoNumber(9) val u7: Int? = null,
@ProtoNumber(11) val msgSeq: Long? = null,
@ProtoNumber(12) val msgRandom: Long = Long.MIN_VALUE,
@ProtoNumber(14) val u4: Long? = null,
@ProtoNumber(15) val forwardHead: ForwardHead? = null,
@ProtoNumber(28) val u5: Long? = null
)
@Serializable
data class ForwardHead(
@ProtoNumber(1) val u1: Int? = null,
@ProtoNumber(2) val u2: Int? = null,
@ProtoNumber(3) val u3: Int? = null,
@ProtoNumber(4) val ub641: String? = null,
@ProtoNumber(5) val Avatar: String? = null
)

View File

@ -0,0 +1,13 @@
package protobuf.message
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import protobuf.message.element.*
@Serializable
data class MessageElement(
@ProtoNumber(1) val text: TextElement? = null,
@ProtoNumber(2) val face: FaceElement? = null,
@ProtoNumber(51) val json: JsonElement? = null,
@ProtoNumber(53) val comm: CommonElement? = null,
)

View File

@ -0,0 +1,33 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.message
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class MessageHead(
@ProtoNumber(1) val peer: Long = Long.MIN_VALUE,
@ProtoNumber(2) val peerUid: String? = null,
@ProtoNumber(3) val flag: Int = Int.MIN_VALUE,
@ProtoNumber(4) val appId: Int = Int.MIN_VALUE,
@ProtoNumber(5) val receiver: Long? = null,
@ProtoNumber(6) val receiverUid: String? = null,
@ProtoNumber(7) val forward: MessageForward? = null,
@ProtoNumber(8) val groupInfo: GroupInfo? = null,
)
@Serializable
data class MessageForward(
@ProtoNumber(6) val friendName: String? = null,
@ProtoNumber(11) val u1: Int? = null,
)
@Serializable
data class GroupInfo(
@ProtoNumber(1) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(4) val memberCard: String? = null,
@ProtoNumber(5) val u1: Int? = null,
@ProtoNumber(7) val groupName: String? = null,
@ProtoNumber(10) val u2: Int? = null,
)

View File

@ -0,0 +1,11 @@
package protobuf.message
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class NtMessage(
@ProtoNumber(1) val msgHead: MessageHead? = null,
@ProtoNumber(2) val contentHead: MessageContent? = null,
@ProtoNumber(3) val body: MessageBody? = null,
)

View File

@ -0,0 +1,11 @@
package protobuf.message.element
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class CommonElement(
@ProtoNumber(1) val type: Int? = null,
@ProtoNumber(2) val data: ByteArray? = null,
@ProtoNumber(3) val u1: Int? = null,
)

View File

@ -0,0 +1,9 @@
package protobuf.message.element
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class FaceElement(
@ProtoNumber(1) val id: Int? = null,
)

View File

@ -0,0 +1,9 @@
package protobuf.message.element
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class JsonElement(
@ProtoNumber(1) val data: ByteArray? = null,
)

View File

@ -0,0 +1,40 @@
package protobuf.message.element
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class TextElement(
@ProtoNumber(1) val text: String? = null,
@ProtoNumber(2) val link: String? = null,
@ProtoNumber(3) val attr6Buf: ByteArray? = null,
@ProtoNumber(4) val attr7Buf: ByteArray? = null,
@ProtoNumber(11) val buf: ByteArray? = null,
@ProtoNumber(12) val pbReserve: TextResvAttr? = null,
) {
companion object {
@Serializable
data class TextResvAttr(
@ProtoNumber(1) val wording: ByteArray? = null,
@ProtoNumber(2) val textAnalysisResult: Int? = null,
@ProtoNumber(3) val atType: Int? = null,
@ProtoNumber(4) val atMemberUin: Long? = null,
@ProtoNumber(5) val atMemberTinyid: Long? = null,
@ProtoNumber(6) val atChannelInfo: ExtChannelInfo? = null,
@ProtoNumber(7) val atRoleInfo: ExtRoleInfo? = null,
)
@Serializable
data class ExtChannelInfo(
@ProtoNumber(1) val guildId: Long? = null,
@ProtoNumber(2) val channelId: Long? = null,
)
@Serializable
data class ExtRoleInfo(
@ProtoNumber(1) val id: Long? = null,
@ProtoNumber(2) val info: ByteArray? = null,
@ProtoNumber(3) val flag: Int? = null,
)
}
}

View File

@ -0,0 +1,63 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.message.longmsg
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class LongMsgSettings(
@ProtoNumber(1) val field1: Int? = null,
@ProtoNumber(2) val field2: Int? = null,
@ProtoNumber(3) val field3: Int? = null,
@ProtoNumber(4) val field4: Int? = null,
)
@Serializable
data class LongMsgUid(
@ProtoNumber(2) val uid: String? = null,
)
@Serializable
data class RecvLongMsgInfo(
@ProtoNumber(1) val uid: LongMsgUid? = null,
@ProtoNumber(2) val resId: String? = null,
@ProtoNumber(3) val u1: Int? = null,
)
@Serializable
data class SendLongMsgInfo(
@ProtoNumber(1) val type: Int? = null,
@ProtoNumber(2) val uid: LongMsgUid? = null,
@ProtoNumber(3) val groupUin: Int? = null,
@ProtoNumber(4) val payload: ByteArray? = null,
)
@Serializable
data class LongMsgReq(
@ProtoNumber(1) val recvInfo: RecvLongMsgInfo? = null,
@ProtoNumber(2) val sendInfo: SendLongMsgInfo? = null,
@ProtoNumber(15) val setting: LongMsgSettings? = null,
): Protobuf<LongMsgReq>
@Serializable
data class LongMsgRsp(
@ProtoNumber(1) val recvResult: RecvLongMsgResult? = null,
@ProtoNumber(2) val sendResult: SendLongMsgResult? = null,
@ProtoNumber(15) val setting: LongMsgSettings? = null
): Protobuf<LongMsgRsp> {
companion object {
@Serializable
data class SendLongMsgResult(
@ProtoNumber(3) val resId: String? = null,
)
@Serializable
data class RecvLongMsgResult(
@ProtoNumber(3) val resId: String? = null,
@ProtoNumber(4) val payload: ByteArray? = null,
)
}
}

View File

@ -0,0 +1,33 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.message.longmsg
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
import protobuf.message.MessageBody
import protobuf.message.MessageContent
import protobuf.message.MessageHead
@Serializable
data class PushMsgBody(
@ProtoNumber(1) val head: MessageHead? = null,
@ProtoNumber(2) val content: MessageContent? = null,
@ProtoNumber(3) val body: MessageBody? = null
)
@Serializable
data class LongMsgContent(
@ProtoNumber(1) val body: List<PushMsgBody>? = null
)
@Serializable
data class LongMsgAction(
@ProtoNumber(1) val command: String? = null,
@ProtoNumber(2) val data: LongMsgContent? = null
)
@Serializable
data class LongMsgPayload(
@ProtoNumber(2) val action: List<LongMsgAction>? = null
): Protobuf<LongMsgPayload>

View File

@ -0,0 +1,55 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.message.multimedia
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class RichMediaForPicData(
@ProtoNumber(1) val info: MediaInfo?,
@ProtoNumber(2) val display: DisplayMediaInfo?,
): Protobuf<RichMediaForPicData> {
companion object {
@Serializable
data class MediaInfo(
@ProtoNumber(1) val picture: Picture? = null,
)
@Serializable
data class Picture(
@ProtoNumber(1) val info: PictureInfo? = null,
@ProtoNumber(2) val fileId: String? = null,
@ProtoNumber(4) val time: ULong? = null,
)
@Serializable
data class PictureInfo(
@ProtoNumber(2) val md5Hex: String? = null,
@ProtoNumber(3) val sha: String? = null,
@ProtoNumber(4) val name: String? = null,
@ProtoNumber(6) val width: Int? = null,
@ProtoNumber(7) val height: Int? = null,
)
}
}
@Serializable
data class DisplayMediaInfo(
@ProtoNumber(1) val show: Show? = null,
) {
companion object {
@Serializable
data class Show(
@ProtoNumber(2) val text: String? = null,
@ProtoNumber(12) val download: Download? = null
)
@Serializable
data class Download(
@ProtoNumber(30) val url: String? = null,
)
}
}

View File

@ -0,0 +1,104 @@
package protobuf.msg
import com.google.protobuf.Internal.EMPTY_BYTE_ARRAY
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class MsgBody(
@ProtoNumber(1) var richText: RichText,
//@ProtoNumber(2) var msgContent: ByteArray = EMPTY_BYTE_ARRAY,
//@/ProtoNumber(3) var msgEncryptContent: ByteArray = EMPTY_BYTE_ARRAY,
)
@Serializable
data class RichText(
//@ProtoNumber(1) var attr: Attr? = null,
@ProtoNumber(2) var elems: ArrayList<Elem>? = null,
//@ProtoNumber(3) var not_online_file: NotOnlineFile? = null,
//@ProtoNumber(4) var ptt: Ptt? = null,
//@ProtoNumber(5) var tmp_ptt: TmpPtt? = null,
//@ProtoNumber(6) var trans_211_tmp_msg: Trans211TmpMsg? = null,
)
@Serializable
data class Elem(
/*@ProtoNumber(1) var text: TextMsg? = null,
@ProtoNumber(2) var face: FaceMsg? = null,
@ProtoNumber(3) var online_image: OnlineImage? = null,
@ProtoNumber(4) var not_online_image: NotOnlineImage? = null,
@ProtoNumber(5) var trans_elem_info: TransElem? = null,
@ProtoNumber(6) var market_face: MarketFace? = null,
@ProtoNumber(7) var elem_flags: ElemFlags? = null,
@ProtoNumber(8) var customFace: CustomFace? = null,
@ProtoNumber(9) var elem_flags2: ElemFlags2? = null,
@ProtoNumber(10) var fun_face: FunFace? = null,
@ProtoNumber(11) var secret_file: SecretFileMsg? = null,
@ProtoNumber(12) var rich_msg: RichMsg? = null,
@ProtoNumber(13) var group_file: GroupFile? = null,
@ProtoNumber(14) var pub_group: PubGroup? = null,
@ProtoNumber(15) var market_trans: MarketTrans? = null,
@ProtoNumber(16) var extra_info: ExtraInfo? = null,
@ProtoNumber(17) var shake_window: ShakeWindow? = null,
@ProtoNumber(18) var pub_account: PubAccount? = null,
@ProtoNumber(19) var video_file: VideoFile? = null,
@ProtoNumber(20) var tips_info: TipsInfo? = null,
@ProtoNumber(21) var anon_group_msg: AnonymousGroupMsg? = null,
@ProtoNumber(22) var qq_live_old: QQLiveOld? = null,
@ProtoNumber(23) var life_online: LifeOnlineAccount? = null,
@ProtoNumber(24) var qqwallet_msg: QQWalletMsg? = null,
@ProtoNumber(25) var crm_elem: CrmElem? = null,
@ProtoNumber(26) var conference_tips_info: ConferenceTipsInfo? = null,
@ProtoNumber(27) var redbag_info: RedBagInfo? = null,
@ProtoNumber(28) var low_version_tips: LowVersionTips? = null,
@ProtoNumber(29) var bankcode_ctrl_info: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoNumber(30) var near_by_msg: NearByMessageType? = null,
@ProtoNumber(31) var custom_elem: CustomElem? = null,
@ProtoNumber(32) var location_info: LocationInfo? = null,
@ProtoNumber(33) var pub_acc_info: PubAccInfo? = null,
@ProtoNumber(34) var small_emoji: SmallEmoji? = null,
@ProtoNumber(35) var fsj_msg_elem: FSJMessageElem? = null,
@ProtoNumber(36) var ark_app: ArkAppElem? = null,
*/
@ProtoNumber(37) var generalFlags: GeneralFlags? = null,
/*
@ProtoNumber(38) var hc_flash_pic: CustomFace? = null,
@ProtoNumber(39) var deliver_gift_msg: DeliverGiftMsg? = null,
@ProtoNumber(40) var bitapp_msg: BitAppMsg? = null,
@ProtoNumber(41) var open_qq_data: OpenQQData? = null,
@ProtoNumber(42) var apollo_msg: ApolloActMsg? = null,
@ProtoNumber(43) var group_pub_acc_info: GroupPubAccountInfo? = null,
@ProtoNumber(44) var bless_msg: BlessingMessage? = null,
@ProtoNumber(45) var src_msg: SourceMsg? = null,
@ProtoNumber(46) var lola_msg: LolaMsg? = null,
@ProtoNumber(47) var group_business_msg: GroupBusinessMsg? = null,
@ProtoNumber(48) var msg_workflow_notify: WorkflowNotifyMsg? = null,
@ProtoNumber(49) var pat_elem: PatsElem? = null,
@ProtoNumber(50) var group_post_elem: GroupPostElem? = null,
@ProtoNumber(51) var light_app: LightAppElem? = null,
@ProtoNumber(52) var eim_info: EIMInfo? = null,
@ProtoNumber(53) var commonElem: CommonElem? = null,*/
)
@Serializable
data class GeneralFlags(
@ProtoNumber(1) var uint32_bubble_diy_text_id: UInt = 0u,
@ProtoNumber(2) var uint32_group_flag_new: UInt = 0u,
@ProtoNumber(3) var uint64_uin: ULong = 0u,
@ProtoNumber(4) var bytes_rp_id: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoNumber(5) var uint32_prp_fold: UInt = 0u,
@ProtoNumber(6) var long_text_flag: UInt = 0u,
@ProtoNumber(7) var long_text_resid: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoNumber(8) var uint32_group_type: UInt = 0u,
@ProtoNumber(9) var uint32_to_uin_flag: UInt = 0u,
@ProtoNumber(10) var uint32_glamour_level: UInt = 0u,
@ProtoNumber(11) var uint32_member_level: UInt = 0u,
@ProtoNumber(12) var uint64_group_rank_seq: ULong = 0u,
@ProtoNumber(13) var uint32_olympic_torch: UInt = 0u,
@ProtoNumber(14) var babyq_guide_msg_cookie: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoNumber(15) var uin32_expert_flag: UInt = 0u,
@ProtoNumber(16) var uint32_bubble_sub_id: UInt = 0u,
@ProtoNumber(17) var pendantId: ULong = 0u,
@ProtoNumber(18) var bytes_rp_index: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoNumber(19) var reserve: ByteArray = EMPTY_BYTE_ARRAY,
)

View File

@ -0,0 +1,67 @@
package protobuf.msg
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
class PbSendMsgReq(
@ProtoNumber(1) var routingHead: RoutingHead,
@ProtoNumber(2) var contentHead: ContentHead,
@ProtoNumber(3) var msgBody: MsgBody,
@ProtoNumber(4) var msgSeq: ULong = 0u,
@ProtoNumber(5) var msgRand: UInt = 0u,
//@ProtoNumber(6) var sync_cookie: ByteArray = EMPTY_BYTE_ARRAY,
//@ProtoNumber(7) var app_share: AppShareInfo? = null,
@ProtoNumber(8) var msgVia: UInt = 0u,
//@ProtoNumber(9) var data_statist: UInt = 0u,
//@ProtoNumber(10) var multi_msg_assist: MultiMsgAssist? = null,
//@ProtoNumber(11) var input_notify_info: PbInputNotifyInfo? = null,
//@ProtoNumber(12) var msgCtrl: MsgCtrl? = null,
//@ProtoNumber(13) var receipt_req: ReceiptReq? = null,
//@ProtoNumber(14) var multi_send_seq: UInt = 0u,
): Protobuf<PbSendMsgReq>
@Serializable
data class ContentHead(
@ProtoNumber(1) var pkg_num: UInt = 0u,
@ProtoNumber(2) var pkg_index: UInt = 0u,
@ProtoNumber(3) var div_seq: UInt = 0u,
@ProtoNumber(4) var auto_reply: UInt = 0u,
)
@Serializable
class RoutingHead(
@ProtoNumber(1) var c2c: C2C? = null,
@ProtoNumber(2) var grp: Grp? = null,
// @ProtoNumber(3) var grp_tmp: GrpTmp? = null,
//@ProtoNumber(4) var dis: Dis? = null,
// @ProtoNumber(5) var dis_tmp: DisTmp? = null,
// @ProtoNumber(6) var wpa_tmp: WPATmp? = null,
// @ProtoNumber(7) var secret_file: SecretFileHead? = null,
// @ProtoNumber(8) var public_plat: PublicPlat? = null,
/*@ProtoNumber(9) var trans_msg: TransMsg? = null,
@ProtoNumber(10) var address_list: AddressListTmp? = null,
@ProtoNumber(11) var rich_status_tmp: RichStatusTmp? = null,
@ProtoNumber(12) var trans_cmd: TransCmd? = null,
@ProtoNumber(13) var accost_tmp: AccostTmp? = null,
@ProtoNumber(14) var pub_group_tmp: PubGroupTmp? = null,
@ProtoNumber(15) var trans_0x211: Trans0x211? = null,
@ProtoNumber(16) var business_wpa_tmp: BusinessWPATmp? = null,
@ProtoNumber(17) var auth_tmp: AuthTmp? = null,
@ProtoNumber(18) var bsns_tmp: BsnsTmp? = null,
@ProtoNumber(19) var qq_querybusiness_tmp: QQQueryBusinessTmp? = null,
@ProtoNumber(20) var nearby_dating_tmp: NearByDatingTmp? = null,
@ProtoNumber(21) var nearby_assistant_tmp: NearByAssistantTmp? = null,
@ProtoNumber(22) var comm_tmp: CommTmp? = null,*/
)
@Serializable
class C2C(
@ProtoNumber(1) var to_uin: ULong = 0u,
)
@Serializable
class Grp(
@ProtoNumber(1) var groupCode: ULong = 0u,
)

View File

@ -0,0 +1,14 @@
package protobuf.oidb
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class TrpcOidb(
@ProtoNumber(1) val cmd: Int = Int.MIN_VALUE,
@ProtoNumber(2) val service: Int = Int.MIN_VALUE,
@ProtoNumber(4) val buffer: ByteArray,
//@ProtoNumber(11) val traceParams: Map<String, String> = mapOf(),
@ProtoNumber(12) val flag: Int = Int.MIN_VALUE,
): Protobuf<TrpcOidb>

View File

@ -0,0 +1,272 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.oidb.cmd0x11c5
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class NtV2RichMediaReq(
@ProtoNumber(1) val head: MultiMediaReqHead,
@ProtoNumber(2) val upload: UploadReq? = null, // 100
@ProtoNumber(3) val download: DownloadReq? = null,
@ProtoNumber(4) val downloadRkey: DownloadRkeyReq? = null,
@ProtoNumber(5) val delete: DeleteReq? = null,
@ProtoNumber(6) val uploadCompleted: UploadCompletedReq? = null,
@ProtoNumber(7) val msgInfoAuth: MsgInfoAuthReq? = null,
@ProtoNumber(8) val uploadKeyRenewal: UploadKeyRenewalReq? = null,
@ProtoNumber(9) val downloadSafe: DownloadSafeReq? = null,
@ProtoNumber(99) val extension: ByteArray? = null,
): Protobuf<NtV2RichMediaReq>
@Serializable
data class DownloadSafeReq(
@ProtoNumber(1) val index: IndexNode,
)
@Serializable
data class UploadKeyRenewalReq(
@ProtoNumber(1) val oldUkey: String,
@ProtoNumber(2) val subType: UInt,
)
@Serializable
data class MsgInfoAuthReq(
@ProtoNumber(1) val msg: ByteArray,
@ProtoNumber(2) val authTime: ULong,
)
@Serializable
data class UploadCompletedReq(
@ProtoNumber(1) val srvSendMsg: Boolean,
@ProtoNumber(2) val clientRandomId: ULong,
@ProtoNumber(3) val msgInfo: MsgInfo,
@ProtoNumber(4) val clientSeq: UInt,
)
@Serializable
data class MsgInfo(
@ProtoNumber(1) val msgInfoBody: List<MsgInfoBody>,
@ProtoNumber(2) val extBizInfo: ExtBizInfo,
)
@Serializable
data class MsgInfoBody(
@ProtoNumber(1) val index: IndexNode? = null,
@ProtoNumber(2) val picture: PictureInfo? = null,
@ProtoNumber(3) val video: VideoInfo? = null,
@ProtoNumber(4) val audio: AudioInfo? = null,
@ProtoNumber(5) val fileExist: Boolean? = null,
@ProtoNumber(6) val hashSum: ByteArray? = null,
)
@Serializable
class VideoInfo
@Serializable
class AudioInfo
@Serializable
data class PictureInfo(
@ProtoNumber(1) val urlPath: String,
@ProtoNumber(2) val ext: PicUrlExtInfo? = null,
@ProtoNumber(3) val domain: String? = null
)
@Serializable
data class PicUrlExtInfo(
@ProtoNumber(1) val originalParameter: String? = null,
@ProtoNumber(2) val bigParameter: String? = null,
@ProtoNumber(3) val thumbParameter: String? = null
)
@Serializable
data class DeleteReq(
@ProtoNumber(1) val index: List<IndexNode>,
@ProtoNumber(2) val needRecallMsg: Boolean? = null,
@ProtoNumber(3) val msgSeq: ULong? = null,
@ProtoNumber(4) val msgRandom: ULong? = null,
@ProtoNumber(5) val msgTime: ULong? = null,
)
@Serializable
data class DownloadRkeyReq(
@ProtoNumber(1) val types: List<Int>
)
@Serializable
data class UploadReq(
@ProtoNumber(1) val uploadInfo: List<UploadInfo>,
@ProtoNumber(2) val tryFastUploadCompleted: Boolean? = null,
@ProtoNumber(3) val srvSendMsg: Boolean? = null,
@ProtoNumber(4) val clientRandomId: ULong = ULong.MIN_VALUE,
@ProtoNumber(5) val compatQMsgSceneType: UInt? = null,
@ProtoNumber(6) val extBizInfo: ExtBizInfo? = null,
@ProtoNumber(7) val clientSeq: UInt? = null,
@ProtoNumber(8) val noNeedCompatMsg: Boolean = false,
)
@Serializable
data class ExtBizInfo(
@ProtoNumber(1) val pic: PicExtBizInfo? = null,
@ProtoNumber(2) val video: VideoExtBizInfo? = null,
@ProtoNumber(3) val ptt: PttExtBizInfo? = null,
@ProtoNumber(10) val busiType: UInt,
)
@Serializable
data class PttExtBizInfo(
@ProtoNumber(1) val srcUin: ULong,
@ProtoNumber(2) val pttScene: UInt,
@ProtoNumber(3) val pttType: UInt,
@ProtoNumber(4) val changeVoice: UInt,
@ProtoNumber(5) val waveform: ByteArray? = null,
@ProtoNumber(6) val autoConvertText: UInt? = null,
@ProtoNumber(11) val bytesReserve: ByteArray? = null,
@ProtoNumber(12) val bytesPbReserve: ByteArray? = null,
@ProtoNumber(13) val bytesGeneralFlags: ByteArray? = null,
)
@Serializable
data class VideoExtBizInfo(
@ProtoNumber(1) val fromScene: UInt,
@ProtoNumber(2) val toScene: UInt,
@ProtoNumber(3) val bytesPbReserve: ByteArray,
)
@Serializable
data class PicExtBizInfo(
@ProtoNumber(1) val bizType: UInt,
@ProtoNumber(2) val textSummary: String,
@ProtoNumber(11) val bytesPbReserveC2c: ByteArray? = null,
@ProtoNumber(12) val bytesPbReserveTroop: ByteArray? = null,
@ProtoNumber(1001) val fromScene: UInt? = null,
@ProtoNumber(1002) val toScene: UInt? = null,
@ProtoNumber(1003) val oldFileId: UInt? = null,
)
@Serializable
data class UploadInfo(
@ProtoNumber(1) val fileInfo: FileInfo,
@ProtoNumber(2) val subFileType: UInt
)
@Serializable
data class FileInfo(
@ProtoNumber(1) val fileSize: ULong,
@ProtoNumber(2) val md5: String,
@ProtoNumber(3) val sha1: String,
@ProtoNumber(4) val name: String,
@ProtoNumber(5) val fileType: FileType,
@ProtoNumber(6) val width: UInt,
@ProtoNumber(7) val height: UInt,
@ProtoNumber(8) val time: UInt,
@ProtoNumber(9) val original: UInt,
)
@Serializable
data class FileType(
@ProtoNumber(1) val fileType: UInt = 0u,
@ProtoNumber(2) val picFormat: UInt = 0u,
@ProtoNumber(3) val videoFormat: UInt? = null,
@ProtoNumber(4) val voiceFormat: UInt? = null,
)
@Serializable
data class DownloadReq(
@ProtoNumber(1) val index: IndexNode,
@ProtoNumber(2) val ext: DownloadExt,
)
@Serializable
data class DownloadExt(
@ProtoNumber(1) val pic: PicDownloadExt? = null,
@ProtoNumber(2) val video: VideoDownloadExt,
@ProtoNumber(3) val voice: PttDownloadExt? = null,
)
@Serializable
class PicDownloadExt
@Serializable
class PttDownloadExt
@Serializable
data class VideoDownloadExt(
@ProtoNumber(1) val busiType: UInt?,
@ProtoNumber(2) val sceneType: UInt? = null,
@ProtoNumber(3) val subBusiType: UInt?,
@ProtoNumber(4) val msgCodecConfig: CodecConfigReq,
@ProtoNumber(5) val flag: UInt?,
)
@Serializable
data class CodecConfigReq(
@ProtoNumber(1) val platformChipinfo: String,
@ProtoNumber(2) val osVer: String,
@ProtoNumber(3) val deviceName: String,
)
@Serializable
data class IndexNode(
@ProtoNumber(1) val fileInfo: FileInfo,
@ProtoNumber(2) val fileUuid: String,
@ProtoNumber(3) val storeId: UInt, // 0为旧服务器 1为nt服务器
@ProtoNumber(4) val uploadTime: ULong,
@ProtoNumber(5) val ttl: ULong,
@ProtoNumber(6) val subType: UInt,
@ProtoNumber(7) val storeAppId: UInt? = null
)
@Serializable
data class MultiMediaReqHead(
@ProtoNumber(1) val commonHead: CommonHead,
@ProtoNumber(2) val sceneInfo: SceneInfo,
@ProtoNumber(3) val clientMeta: ClientMeta
)
@Serializable
data class ClientMeta(
@ProtoNumber(1) val agentType: UInt,
)
@Serializable
data class SceneInfo(
@ProtoNumber(101) val requestType: UInt,
@ProtoNumber(102) val businessType: UInt,
@ProtoNumber(103) val appType: UInt? = null,
@ProtoNumber(200) var sceneType: UInt? = null,
@ProtoNumber(201) var c2c: C2CUserInfo? = null,
@ProtoNumber(202) var grp: GroupUserInfo? = null,
@ProtoNumber(203) var channel: ChannelUserInfo? = null,
@ProtoNumber(205) val byteArr: ByteArray?= null
)
@Serializable
data class ChannelUserInfo(
@ProtoNumber(1) val guildId: ULong,
@ProtoNumber(2) val channelId: ULong,
@ProtoNumber(3) val channelType: UInt,
)
@Serializable
data class GroupUserInfo(
@ProtoNumber(1) val uin: ULong,
)
@Serializable
data class C2CUserInfo(
@ProtoNumber(1) val accountType: UInt,
@ProtoNumber(2) val uid: String,
@ProtoNumber(3) val byteArr: ByteArray? = null
)
@Serializable
data class CommonHead(
@ProtoNumber(1) val requestId: ULong,
@ProtoNumber(2) val cmd: UInt,
@ProtoNumber(3) val msg: String? = null
)

View File

@ -0,0 +1,139 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.oidb.cmd0x11c5
import com.google.protobuf.Internal.EMPTY_BYTE_ARRAY
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class NtV2RichMediaRsp(
@ProtoNumber(1) val head: RspHead,
@ProtoNumber(2) val upload: UploadRsp?,
@ProtoNumber(3) val download: DownloadRsp?,
@ProtoNumber(4) val downloadRkeyRsp: DownloadRkeyRsp?,
@ProtoNumber(5) val delete: DeleteRsp?,
@ProtoNumber(6) val uploadCompleted: UploadCompletedRsp?,
@ProtoNumber(7) val msgInfoAuth: MsgInfoAuthRsp?,
@ProtoNumber(8) val uploadKeyRenew: UploadKeyRenewalRsp?,
@ProtoNumber(9) val downloadSafe: DownloadSafeRsp?,
@ProtoNumber(99) val extension: ByteArray? = null,
): Protobuf<NtV2RichMediaRsp>
@Serializable
class DownloadSafeRsp
@Serializable
data class UploadKeyRenewalRsp(
@ProtoNumber(1) val ukey: String,
@ProtoNumber(2) val ukeyTtlSec: ULong,
)
@Serializable
data class MsgInfoAuthRsp(
@ProtoNumber(1) val authCode: UInt = 0u,
@ProtoNumber(2) val msg: ByteArray = EMPTY_BYTE_ARRAY,
@ProtoNumber(3) val resultTime: ULong = 0u,
)
@Serializable
data class UploadCompletedRsp(
@ProtoNumber(1) val msgSeq: ULong
)
@Serializable
class DeleteRsp
@Serializable
data class DownloadRkeyRsp(
@ProtoNumber(1) val rkeys: List<RKeyInfo>
)
@Serializable
data class RKeyInfo(
@ProtoNumber(1) val rkey: String,
@ProtoNumber(2) val rkeyTtlSec: ULong,
@ProtoNumber(3) val storeId: UInt = 0u,
@ProtoNumber(4) val rkeyCreateTime: UInt?,
@ProtoNumber(4) val type: UInt?,
)
@Serializable
data class DownloadRsp(
@ProtoNumber(1) val rkeyParam: String,
@ProtoNumber(2) val rkeyTtlSec: ULong,
@ProtoNumber(3) val downloadInfo: DownloadInfo?,
@ProtoNumber(4) val rkeyCreateTime: UInt?
)
@Serializable
data class DownloadInfo(
@ProtoNumber(1) val domain: String,
@ProtoNumber(2) val urlPath: String? = null,
@ProtoNumber(3) val httpsPort: Int = Int.MIN_VALUE,
@ProtoNumber(4) val ipv4: List<Ipv4>,
@ProtoNumber(5) val ipv6: List<Ipv6>,
@ProtoNumber(6) val picUrlExtInfo: PicUrlExtInfo?,
@ProtoNumber(7) val videoExtInfo: VideoExtInfo? = null,
)
@Serializable
data class VideoExtInfo(
@ProtoNumber(1) val videoCodecFormat: UInt,
)
@Serializable
data class UploadRsp(
@ProtoNumber(1) val ukey: String,
@ProtoNumber(2) val ukeyTtlSec: ULong,
@ProtoNumber(3) val ipv4: List<Ipv4>,
@ProtoNumber(4) val ipv6: List<Ipv6>,
@ProtoNumber(5) val msgSeq: ULong,
@ProtoNumber(6) val msgInfo: MsgInfo? = null,
@ProtoNumber(7) val ext: List<RichmediaStorageTransInfo>? = null,
@ProtoNumber(8) val compatQMsg: ByteArray? = null,
@ProtoNumber(10) val subFileInfos: List<SubFileInfo>? = null,
)
@Serializable
data class SubFileInfo(
@ProtoNumber(1) val subType: UInt,
@ProtoNumber(2) val ukey: String,
@ProtoNumber(3) val ukeyTTLSec: ULong,
@ProtoNumber(4) val ipv4: List<Ipv4>,
@ProtoNumber(5) val ipv6: List<Ipv6>,
)
@Serializable
data class RichmediaStorageTransInfo(
@ProtoNumber(1) val subType: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) val extType: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val extValue: ByteArray? = null,
)
@Serializable
data class Ipv4(
@ProtoNumber(1) val outIp: Int = Int.MIN_VALUE,
@ProtoNumber(2) val outPort: Int = Int.MIN_VALUE,
@ProtoNumber(3) val inIp: Int = Int.MIN_VALUE,
@ProtoNumber(4) val inPort: Int = Int.MIN_VALUE,
@ProtoNumber(5) val ipType: Int = Int.MIN_VALUE,
)
@Serializable
data class Ipv6(
@ProtoNumber(1) val outIp: ByteArray? = null,
@ProtoNumber(2) val outPort: Int = Int.MIN_VALUE,
@ProtoNumber(3) val inIp: ByteArray? = null,
@ProtoNumber(4) val inPort: Int = Int.MIN_VALUE,
@ProtoNumber(5) val ipType: Int = Int.MIN_VALUE,
)
@Serializable
data class RspHead(
@ProtoNumber(1) val commonHead: CommonHead,
@ProtoNumber(2) val retCode: UInt = 0u,
@ProtoNumber(3) val msg: String
)

View File

@ -0,0 +1,88 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.oidb.cmd0x6d7
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
import protobuf.group_file_common.FolderInfo
@Serializable
data class Oidb0x6d7ReqBody(
@ProtoNumber(1) val createFolder: CreateFolderReq? = null,
@ProtoNumber(2) val deleteFolder: DeleteFolderReq? = null,
@ProtoNumber(3) val moveFolder: MoveFolderReq? = null,
@ProtoNumber(4) val renameFolder: RenameFolderReq? = null,
): Protobuf<Oidb0x6d7ReqBody>
@Serializable
data class CreateFolderReq(
@ProtoNumber(1) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(2) val appId: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val parentFolderId: String = "",
@ProtoNumber(4) val folderName: String = "",
)
@Serializable
data class DeleteFolderReq(
@ProtoNumber(1) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(2) val appId: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val folderId: String = "",
)
@Serializable
data class MoveFolderReq(
@ProtoNumber(1) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(2) val appId: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val folderId: String = "",
@ProtoNumber(4) val parentFolderId: String = "",
@ProtoNumber(5) val destFolderId: String = "",
)
@Serializable
data class RenameFolderReq(
@ProtoNumber(1) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(2) val appId: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) val folderId: String = "",
@ProtoNumber(4) val folderName: String = "",
)
@Serializable
data class Oidb0x6d7RespBody(
@ProtoNumber(1) val createFolder: CreateFolderResp? = null,
@ProtoNumber(2) val deleteFolder: DeleteFolderResp? = null,
@ProtoNumber(3) val moveFolder: MoveFolderResp? = null,
@ProtoNumber(4) val renameFolder: RenameFolderResp? = null,
): Protobuf<Oidb0x6d7RespBody>
@Serializable
data class CreateFolderResp(
@ProtoNumber(1) val retCode: Int = Int.MIN_VALUE,
@ProtoNumber(2) val retMsg: String = "",
@ProtoNumber(3) val clientWording: String = "",
@ProtoNumber(4) val folderInfo: FolderInfo? = null,
)
@Serializable
data class DeleteFolderResp(
@ProtoNumber(1) val retCode: Int = Int.MIN_VALUE,
@ProtoNumber(2) val retMsg: String = "",
@ProtoNumber(3) val clientWording: String = "",
)
@Serializable
data class MoveFolderResp(
@ProtoNumber(1) val retCode: Int = Int.MIN_VALUE,
@ProtoNumber(2) val retMsg: String = "",
@ProtoNumber(3) val clientWording: String = "",
@ProtoNumber(4) val folderInfo: FolderInfo? = null,
)
@Serializable
data class RenameFolderResp(
@ProtoNumber(1) val retCode: Int = Int.MIN_VALUE,
@ProtoNumber(2) val retMsg: String = "",
@ProtoNumber(3) val clientWording: String = "",
@ProtoNumber(4) val folderInfo: FolderInfo? = null,
)

View File

@ -0,0 +1,15 @@
package protobuf.oidb.cmd0x9082
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class Oidb0x9082(
@ProtoNumber(2) val peer: ULong = ULong.MIN_VALUE,
@ProtoNumber(3) val msgSeq: ULong = ULong.MIN_VALUE,
@ProtoNumber(4) val faceIndex: String = "",
@ProtoNumber(5) val flag: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val u1: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val u2: UInt = UInt.MIN_VALUE,
): Protobuf<Oidb0x9082>

View File

@ -0,0 +1,17 @@
package protobuf.oidb.cmd0xf16
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class Oidb0xf16(
@ProtoNumber(1) var setGroupRemarkReq: SetGroupRemarkReq? = null,
): Protobuf<Oidb0xf16>
@Serializable
data class SetGroupRemarkReq(
@ProtoNumber(1) var groupCode: ULong,
@ProtoNumber(2) var groupUin: ULong,
@ProtoNumber(3) var groupRemark: String
)

View File

@ -0,0 +1,118 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.oidb.cmd0xf88
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class Oidb0xf88Req(
@ProtoNumber(1) val filter: GProFilter,
@ProtoNumber(2) val memberId: ULong,
@ProtoNumber(3) val tinyId: ULong,
@ProtoNumber(4) val guildId: ULong,
): Protobuf<Oidb0xf88Req>
@Serializable
data class Oidb0xf88Rsp(
@ProtoNumber(1) val userInfo: GProUserInfo?
): Protobuf<Oidb0xf88Rsp>
@Serializable
data class GProUserInfo(
@ProtoNumber(1) var memberId: ULong = ULong.MIN_VALUE,
@ProtoNumber(2) var memberTinyid: ULong = ULong.MIN_VALUE,
@ProtoNumber(3) var nickName: String? = null,
@ProtoNumber(4) var gender: UInt = UInt.MIN_VALUE,
@ProtoNumber(5) var allow: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) var url: String? = null,
@ProtoNumber(7) var birthday: String? = null,
@ProtoNumber(8) var fullBirthday: String? = null,
@ProtoNumber(9) var fullAge: String? = null,
@ProtoNumber(10) var country: String? = null,
@ProtoNumber(11) var province: String? = null,
@ProtoNumber(12) var city: String? = null,
@ProtoNumber(13) var cityId: String? = null,
@ProtoNumber(14) var cityZoneId: UInt = UInt.MIN_VALUE,
@ProtoNumber(15) var msgHeadInfo: GProHeadInfo? = null,
@ProtoNumber(16) var joinTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(17) var memberRole: UInt = UInt.MIN_VALUE,
@ProtoNumber(18) var memberType: UInt = UInt.MIN_VALUE,
@ProtoNumber(19) var beAdminTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(20) var memberName: String? = null,
//@ProtoNumber(21) var clientPresence: Any? = null,
//@ProtoNumber(22) var client_archive: ArrayList<>? = null,
//@ProtoNumber(23) var bind_client_account: ArrayList<>? = null,
@ProtoNumber(24) var hasMoreArchive: Boolean = false,
//@ProtoNumber(25) var firstArchiveArkData: Any? = null,
@ProtoNumber(26) var directMsgBlackFlag: UInt = UInt.MIN_VALUE,
@ProtoNumber(27) var setGroupProProfile: Boolean = false,
@ProtoNumber(28) var joinGroupProTimestamp: ULong = ULong.MIN_VALUE,
@ProtoNumber(29) var shutUpExpireTime: ULong = ULong.MIN_VALUE,
@ProtoNumber(30) var avatarMeta: ByteArray? = null,
@ProtoNumber(31) var memberNameFlag: UInt = UInt.MIN_VALUE,
@ProtoNumber(32) var faceAuthStatus: UInt = UInt.MIN_VALUE,
@ProtoNumber(33) var verifyUrl: String? = null,
@ProtoNumber(34) var constellation: UInt = UInt.MIN_VALUE,
@ProtoNumber(35) var personalSign: ByteArray? = null,
//@ProtoNumber(36) var voice_live_info: Any? = null,
@ProtoNumber(37) var avatarFlag: UInt = UInt.MIN_VALUE,
//@ProtoNumber(38) var isQQFriend: Any? = null,
//@ProtoNumber(39) var openid: Any? = null,
//@ProtoNumber(40) var personalSignTemplate: Any? = null,
//@ProtoNumber(41) var showVoiceLiveStatusSwitch: Any? = null,
@ProtoNumber(99) var isMember: UInt = UInt.MIN_VALUE,
)
@Serializable
data class GProHeadInfo(
@ProtoNumber(1) var timestamp: UInt = UInt.MIN_VALUE,
@ProtoNumber(2) var faceFlag: UInt = UInt.MIN_VALUE,
@ProtoNumber(3) var baseUrl: String? = null,
@ProtoNumber(4) var type: UInt = UInt.MIN_VALUE
)
@Serializable
data class GProFilter(
@ProtoNumber(3) val nickName: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val gender: UInt = UInt.MIN_VALUE,
@ProtoNumber(5) val allow: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val url: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val birthday: UInt = UInt.MIN_VALUE,
@ProtoNumber(8) val fullBirthday: UInt = UInt.MIN_VALUE,
@ProtoNumber(9) val fullAge: UInt = UInt.MIN_VALUE,
@ProtoNumber(10) val country: UInt = UInt.MIN_VALUE,
@ProtoNumber(11) val province: UInt = UInt.MIN_VALUE,
@ProtoNumber(12) val city: UInt = UInt.MIN_VALUE,
@ProtoNumber(13) val cityId: UInt = UInt.MIN_VALUE,
@ProtoNumber(14) val cityZoneId: UInt = UInt.MIN_VALUE,
@ProtoNumber(15) val headInfo: UInt = UInt.MIN_VALUE,
@ProtoNumber(16) val joinTime: UInt = UInt.MIN_VALUE,
@ProtoNumber(17) val memberRole: UInt = UInt.MIN_VALUE,
@ProtoNumber(18) val memberType: UInt = UInt.MIN_VALUE,
@ProtoNumber(19) val beAdminTime: UInt = UInt.MIN_VALUE,
@ProtoNumber(20) val memberName: UInt = UInt.MIN_VALUE,
@ProtoNumber(21) val clientPresence: UInt = UInt.MIN_VALUE,
@ProtoNumber(22) val clientArchive: UInt = UInt.MIN_VALUE,
@ProtoNumber(23) val bindClientAccount: UInt = UInt.MIN_VALUE,
@ProtoNumber(24) val hasMoreArchive: UInt = UInt.MIN_VALUE,
@ProtoNumber(25) val firstArchiveBaseInfo: UInt = UInt.MIN_VALUE,
@ProtoNumber(26) val directMsgBlackFlag: UInt = UInt.MIN_VALUE,
@ProtoNumber(27) val joinGroupProTimestamp: UInt = UInt.MIN_VALUE,
@ProtoNumber(28) val shutupExpireTime: UInt = UInt.MIN_VALUE,
@ProtoNumber(29) val faceAuthStatus: UInt = UInt.MIN_VALUE,
@ProtoNumber(30) val constellation: UInt = UInt.MIN_VALUE,
@ProtoNumber(31) val personalSign: UInt = UInt.MIN_VALUE,
@ProtoNumber(32) val voiceLiveInfo: UInt = UInt.MIN_VALUE,
@ProtoNumber(33) val isQQFriend: UInt = UInt.MIN_VALUE,
@ProtoNumber(34) val personalSignTemplate: UInt = UInt.MIN_VALUE,
@ProtoNumber(35) val showVoiceLiveStatusSwitch: UInt = UInt.MIN_VALUE,
@ProtoNumber(36) val openid: UInt = UInt.MIN_VALUE,
@ProtoNumber(37) val isMember: UInt = UInt.MIN_VALUE,
@ProtoNumber(99) val needGroupProProfile: UInt = UInt.MIN_VALUE,
@ProtoNumber(100) val avatarMeta: UInt = UInt.MIN_VALUE,
) {
}

View File

@ -0,0 +1,62 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.oidb.cmd0xfc2
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class Oidb0xfc2ReqBody(
@ProtoNumber(1) var msgCmd: Int? = null,
@ProtoNumber(3) var msgBusType: Int? = null,
@ProtoNumber(4) var msgChannelInfo: Oidb0xfc2ChannelInfo? = null,
@ProtoNumber(5) var msgTerminalType: Int? = null,
//@ProtoNumber(100) var msg_apply_upload_req: Any? = null,
//@ProtoNumber(200) var msg_upload_completed_req: Any? = null,
@ProtoNumber(300) var msgApplyDownloadReq: Oidb0xfc2MsgApplyDownloadReq? = null,
//@ProtoNumber(400) var msg_apply_preview_req: Any? = null,
//@ProtoNumber(500) var msg_apply_security_strike_req: Any? = null,
): Protobuf<Oidb0xfc2ReqBody>
@Serializable
data class Oidb0xfc2RspBody(
@ProtoNumber(1) var msgCmd: Int? = null,
@ProtoNumber(5) var msgBusType: Int? = null,
//@ProtoNumber(110) var msg_apply_upload_rsp: Any? = null,
//@ProtoNumber(210) var msg_upload_completed_rsp: Any? = null,
@ProtoNumber(310) var msgApplyDownloadRsp: Oidb0xfc2MsgApplyDownloadRsp? = null,
//@ProtoNumber(410) var msg_apply_preview_rsp: Any? = null,
//@ProtoNumber(510) var msg_apply_security_strike_rsp: Any? = null,
): Protobuf<Oidb0xfc2RspBody>
@Serializable
data class Oidb0xfc2MsgApplyDownloadRsp(
@ProtoNumber(1) var msgDownloadInfo: Oidb0xfc2MsgDownloadInfo? = null,
//@ProtoNumber(2) var msgFileInfo: Any? = null,
//@ProtoNumber(3) var msgChacha20Param: Any? = null,
//@ProtoNumber(4) var useEncrypt: UInt = UInt.MIN_VALUE,
)
@Serializable
data class Oidb0xfc2MsgDownloadInfo(
@ProtoNumber(1) var downloadKey: ByteArray? = null,
//@ProtoNumber(2) var msg_out_addr: Any? = null,
//@ProtoNumber(3) var msg_inner_addr: Any? = null,
//@ProtoNumber(4) var msg_out_addr_ipv6: Any? = null,
@ProtoNumber(5) var downloadDomain: String? = null,
@ProtoNumber(6) var downloadUrl: String? = null,
//@ProtoNumber(7) var str_cookie: Any? = null,
)
@Serializable
data class Oidb0xfc2MsgApplyDownloadReq(
@ProtoNumber(1) val fieldId: String,
@ProtoNumber(2) val supportEncrypt: Int,
)
@Serializable
data class Oidb0xfc2ChannelInfo(
@ProtoNumber(3) val guildId: ULong,
@ProtoNumber(4) val channelId: ULong,
)

View File

@ -0,0 +1,100 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.oidb.cmx0xf57
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class Oidb0xf57Req(
@ProtoNumber(1) val filter: Oidb0xf57Filter,
@ProtoNumber(2) val guildInfo: Oidb0xf57GuildInfo,
): Protobuf<Oidb0xf57Req>
@Serializable
data class Oidb0xf57Rsp(
@ProtoNumber(1) val metaInfo: Oidb0xf57MetaInfo,
): Protobuf<Oidb0xf57Rsp>
@Serializable
data class Oidb0xf57MetaInfo(
@ProtoNumber(3) val guildId: ULong = ULong.MIN_VALUE,
@ProtoNumber(4) val meta: Oidb0xf57Meta? = null,
)
@Serializable
data class Oidb0xf57Meta(
@ProtoNumber(2) val guildCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(4) val createTime: Long = Long.MIN_VALUE,
@ProtoNumber(5) val maxMemberCount: Long = Long.MIN_VALUE,
@ProtoNumber(6) val memberCount: Long = Long.MIN_VALUE,
@ProtoNumber(8) val name: String? = null,
@ProtoNumber(11) val robotMaxNum: Int = Int.MIN_VALUE,
@ProtoNumber(12) val adminMaxNum: Int = Int.MIN_VALUE,
@ProtoNumber(13) val profile: String? = null,
@ProtoNumber(14) val avatarSeq: Long = Long.MIN_VALUE,
@ProtoNumber(18) val ownerId: ULong = ULong.MIN_VALUE,
@ProtoNumber(19) val coverSeq: Long = Long.MIN_VALUE,
@ProtoNumber(20) val clientId: Int = Int.MIN_VALUE,
@ProtoNumber(27) val displayId: String? = null,
)
@Serializable
data class Oidb0xf57GuildInfo(
@ProtoNumber(1) val guildId: ULong = ULong.MIN_VALUE
)
@Serializable
data class Oidb0xf57Filter(
@ProtoNumber(1) val u1: Oidb0xf57U1,
@ProtoNumber(2) val u2: Oidb0xf57U2,
)
@Serializable
data class Oidb0xf57U1(
@ProtoNumber(2) val u1: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val u2: UInt = UInt.MIN_VALUE,
@ProtoNumber(5) val u3: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val u4: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val u5: UInt = UInt.MIN_VALUE,
@ProtoNumber(8) val u6: UInt = UInt.MIN_VALUE,
@ProtoNumber(11) val u7: UInt = UInt.MIN_VALUE,
@ProtoNumber(12) val u8: UInt = UInt.MIN_VALUE,
@ProtoNumber(13) val u9: UInt = UInt.MIN_VALUE,
@ProtoNumber(14) val u10: UInt = UInt.MIN_VALUE,
@ProtoNumber(45) val u11: UInt = UInt.MIN_VALUE,
@ProtoNumber(18) val u12: UInt = UInt.MIN_VALUE,
@ProtoNumber(19) val u13: UInt = UInt.MIN_VALUE,
@ProtoNumber(20) val u14: UInt = UInt.MIN_VALUE,
@ProtoNumber(22) val u15: UInt = UInt.MIN_VALUE,
@ProtoNumber(23) val u16: UInt = UInt.MIN_VALUE,
@ProtoNumber(5002) val u17: UInt = UInt.MIN_VALUE,
@ProtoNumber(5003) val u18: UInt = UInt.MIN_VALUE,
@ProtoNumber(5004) val u19: UInt = UInt.MIN_VALUE,
@ProtoNumber(5005) val u20: UInt = UInt.MIN_VALUE,
@ProtoNumber(5006) val u23: UInt = UInt.MIN_VALUE,
@ProtoNumber(10007) val u21: UInt = UInt.MIN_VALUE,
@ProtoNumber(15) val u22: UInt = UInt.MIN_VALUE,
@ProtoNumber(30001) val u24: UInt = UInt.MIN_VALUE,
)
@Serializable
data class Oidb0xf57U2(
@ProtoNumber(3) val u1: UInt = UInt.MIN_VALUE,
@ProtoNumber(4) val u2: UInt = UInt.MIN_VALUE,
@ProtoNumber(6) val u3: UInt = UInt.MIN_VALUE,
@ProtoNumber(11) val u4: UInt = UInt.MIN_VALUE,
@ProtoNumber(14) val u5: UInt = UInt.MIN_VALUE,
@ProtoNumber(15) val u6: UInt = UInt.MIN_VALUE,
@ProtoNumber(16) val u7: UInt = UInt.MIN_VALUE,
@ProtoNumber(17) val u8: UInt = UInt.MIN_VALUE,
@ProtoNumber(32) val u9: UInt = UInt.MIN_VALUE,
@ProtoNumber(31) val u10: UInt = UInt.MIN_VALUE,
@ProtoNumber(29) val u11: UInt = UInt.MIN_VALUE,
@ProtoNumber(26) val u12: UInt = UInt.MIN_VALUE,
@ProtoNumber(23) val u13: UInt = UInt.MIN_VALUE,
@ProtoNumber(22) val u14: UInt = UInt.MIN_VALUE,
@ProtoNumber(18) val u15: UInt = UInt.MIN_VALUE,
)

View File

@ -0,0 +1,17 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class C2CCommonTipsEvent(
@ProtoNumber(7) val params: List<PokeParam>? = null,
@ProtoNumber(8) val xmlTips: String? = null,
): Protobuf<C2CCommonTipsEvent>
@Serializable
data class PokeParam(
@ProtoNumber(1) val key: String = "",
@ProtoNumber(2) val value: String = "",
)

View File

@ -0,0 +1,22 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class C2CRecallEvent(
@ProtoNumber(1) val head: C2CRecallHead? = null,
): Protobuf<C2CRecallEvent>
@Serializable
data class C2CRecallHead(
@ProtoNumber(1) val operator: String? = null,
@ProtoNumber(13) val wording: RecallWording? = null,
@ProtoNumber(20) val msgSeq: Long = Long.MIN_VALUE,
)
@Serializable
data class RecallWording(
@ProtoNumber(2) val wording: String? = null
)

View File

@ -0,0 +1,6 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
// by GroupCommonTipsEvent

View File

@ -0,0 +1,20 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class FriendApplyEvent(
@ProtoNumber(1) val head: FriendApplyHead? = null,
): Protobuf<FriendApplyEvent>
@Serializable
data class FriendApplyHead(
@ProtoNumber(2) val applierUid: String = "",
@ProtoNumber(7) val srcId: Int = Int.MIN_VALUE,
@ProtoNumber(8) val subSrc: Int = Int.MIN_VALUE,
@ProtoNumber(10) val applyMsg: String? = null,
@ProtoNumber(11) val source: String? = null,
)

View File

@ -0,0 +1,12 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupAdminChangeEvent(
@ProtoNumber(1) val groupCode: Long,
@ProtoNumber(4) val operation: GroupAdminChangedOperation? = null
): Protobuf<GroupAdminChangeEvent>

View File

@ -0,0 +1,16 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class GroupAdminChangedOperation(
@ProtoNumber(1) val unsetInfo: GroupAdminSetInfo? = null,
@ProtoNumber(2) val setInfo: GroupAdminSetInfo? = null,
)
@Serializable
data class GroupAdminSetInfo(
@ProtoNumber(1) val targetUid: String? = null,
@ProtoNumber(2) val operation: Int? = null,
)

View File

@ -0,0 +1,12 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupApplyEvent(
@ProtoNumber(1) val groupCode: Long = Long.MIN_VALUE,
@ProtoNumber(3) val applierUid: String = "",
@ProtoNumber(5) val applyMsg: String? = null,
): Protobuf<GroupApplyEvent>

View File

@ -0,0 +1,23 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupBanEvent(
@ProtoNumber(1) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(4) val operatorUid: String = "",
@ProtoNumber(5) val target: GroupBanTarget? = null,
): Protobuf<GroupBanEvent>
@Serializable
data class GroupBanTarget(
@ProtoNumber(3) val target: GroupBanInfo? = null,
)
@Serializable
data class GroupBanInfo(
@ProtoNumber(1) val targetUid: String? = null,
@ProtoNumber(2) val rawDuration: UInt = UInt.MIN_VALUE,
)

View File

@ -0,0 +1,28 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupCommonTipsEvent(
@ProtoNumber(4) val groupCode: ULong = ULong.MIN_VALUE,
@ProtoNumber(5) val uniqueTitleChangeDetail: List<GroupUniqueTitleChangeDetail>? = null,
@ProtoNumber(11) val recallDetails: GroupRecallDetails? = null,
@ProtoNumber(26) val baseTips: List<GroupBaseTips>? = null,
@ProtoNumber(33) val essenceMsgInfo: List<EssenceMsgInfo>? = null,
@ProtoNumber(37) val msgSeq: ULong = ULong.MIN_VALUE,
): Protobuf<GroupCommonTipsEvent>
@Serializable
data class EssenceMsgInfo(
@ProtoNumber(4) val type: UInt = UInt.MIN_VALUE,
@ProtoNumber(5) val sender: ULong = ULong.MIN_VALUE,
@ProtoNumber(6) val operator: ULong = ULong.MIN_VALUE,
)
@Serializable
data class GroupBaseTips(
@ProtoNumber(2) val type: UInt = UInt.MIN_VALUE,
@ProtoNumber(7) val params: List<PokeParam>? = null
)

View File

@ -0,0 +1,11 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupInviteEvent(
@ProtoNumber(1) val groupCode: Long,
@ProtoNumber(5) val inviterUid: String,
): Protobuf<GroupInviteEvent>

View File

@ -0,0 +1,17 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupInvitedApplyEvent(
@ProtoNumber(2) val applyInfo: GroupInvitedApplyInfo? = null,
): Protobuf<GroupInvitedApplyEvent>
@Serializable
data class GroupInvitedApplyInfo(
@ProtoNumber(1) val type: Int = Int.MIN_VALUE,
@ProtoNumber(3) val groupCode: Long = Long.MIN_VALUE,
@ProtoNumber(5) val applierUid: String = "",
)

View File

@ -0,0 +1,13 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class GroupListChangeEvent(
@ProtoNumber(1) val groupCode: Long = Long.MIN_VALUE,
@ProtoNumber(3) val memberUid: String = "",
@ProtoNumber(4) val type: Int = Int.MIN_VALUE,
@ProtoNumber(5) val operatorUid: String = "",
): Protobuf<GroupListChangeEvent>

View File

@ -0,0 +1,18 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class GroupRecallDetails(
@ProtoNumber(1) val operatorUid: String = "",
@ProtoNumber(3) val msgInfo: RecalledMessageInfo? = null,
@ProtoNumber(9) val wording: RecallWording? = null
)
@Serializable
data class RecalledMessageInfo(
@ProtoNumber(1) val msgSeq: ULong,
@ProtoNumber(2) val msgTime: ULong,
@ProtoNumber(6) val senderUid: String,
)

View File

@ -0,0 +1,10 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class GroupUniqueTitleChangeDetail(
@ProtoNumber(2) val wording: String = "",
@ProtoNumber(5) val targetUin: ULong = ULong.MIN_VALUE,
)

View File

@ -0,0 +1,27 @@
package protobuf.push
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
import protobuf.message.NtMessage
@Serializable
data class MessagePush(
@ProtoNumber(1) val msgBody: NtMessage? = null,
@ProtoNumber(4) val clientInfo: MessagePushClientInfo? = null,
): Protobuf<MessagePush>
@Serializable
data class MessagePushClientInfo(
@ProtoNumber(1) val clientIp: String? = null,
@ProtoNumber(3) val liteHead: MessagePushLiteHead? = null
)
@Serializable
data class MessagePushLiteHead(
@ProtoNumber(2) val msgType: Int = Int.MIN_VALUE,
@ProtoNumber(3) val msgSeq: ULong = ULong.MIN_VALUE,
@ProtoNumber(4) val msgRandom: ULong = ULong.MIN_VALUE,
@ProtoNumber(6) val msgSubType: Int = Int.MIN_VALUE,
@ProtoNumber(8) val sender: ULong = ULong.MIN_VALUE,
)

View File

@ -0,0 +1,38 @@
@file:OptIn(ExperimentalSerializationApi::class)
package protobuf.qweb
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
import moe.fuqiuluo.symbols.Protobuf
@Serializable
data class QWebReq(
@ProtoNumber(1) val seq: Int = 0,
@ProtoNumber(2) val qua: String = "",
@ProtoNumber(3) val deviceInfo: String = "",
@ProtoNumber(4) val buffer: ByteArray? = null,
@ProtoNumber(5) val traceId: String = "",
@ProtoNumber(6) val module: String = "",
@ProtoNumber(7) var cmdname: String? = null,
//@ProtoNumber(8) var loginSig: Any? = null,
//@ProtoNumber(9) var Crypto: Any? = null,
@ProtoNumber(10) var extinfo: List<QWebExtInfo>? = null,
//@ProtoNumber(11) var contentType: Any? = null,
): Protobuf<QWebReq>
@Serializable
data class QWebExtInfo(
@ProtoNumber(1) val key: String,
@ProtoNumber(2) val value: String,
)
@Serializable
data class QWebRsp(
@ProtoNumber(1) var seq: Int? = null,
//@ProtoNumber(2) var retCode: Int? = null,
//@ProtoNumber(3) var errMsg: String? = null,
@ProtoNumber(4) var buffer: ByteArray? = null,
//@ProtoNumber(5) var Extinfo: List<QWebExtInfo>? = null,
): Protobuf<QWebRsp>

View File

@ -5,10 +5,10 @@ plugins {
android {
namespace = "moe.fuqiuluo.qqinterface"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 24
minSdk = 27
consumerProguardFiles("consumer-rules.pro")
}
@ -32,7 +32,7 @@ android {
}
dependencies {
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
DEPENDENCY_ANDROIDX.forEach {
implementation(it)
}
}

Some files were not shown because too many files have changed in this diff Show More