mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 05:12:17 +00:00
Compare commits
282 Commits
1.0.7
...
976526ab79
Author | SHA1 | Date | |
---|---|---|---|
976526ab79 | |||
cdc9ca1a72 | |||
609e87d0ec | |||
cf01a25ea6 | |||
f090ef1937 | |||
1cc033498c | |||
7eaa470dd2 | |||
c49861d982 | |||
36ed55d220 | |||
e2f27cb36a | |||
65ddca2ea4 | |||
a6f570e4f0 | |||
29dfc1590b | |||
ffeda0a472 | |||
0e5add2146 | |||
be9ff46134 | |||
1d6ac3e022 | |||
2db187e3d5 | |||
18ec586b12 | |||
7782feb6ac | |||
824f280b3a | |||
6936262d62 | |||
0955267ee5 | |||
f3da62fa74 | |||
abbac6315c | |||
0cf10eabd6 | |||
8c33267887 | |||
f030104ff2 | |||
5e819179b4 | |||
ea206faf4f | |||
5adfc544a2 | |||
bdb75841cf | |||
a3dc0d06b2 | |||
3664352f23 | |||
2770979fee | |||
be58c368e9 | |||
1d035fa378 | |||
7d0b60271e | |||
d38777d06a | |||
93c49953cf | |||
883e949cc1 | |||
2ac0003166 | |||
d92d1daffb | |||
27f837adbe | |||
661680e60b | |||
54b7eb95a8 | |||
265fff3cd2 | |||
8ca0a3815a | |||
da6d34c53e | |||
61ffb37951 | |||
593f461ffe | |||
12d594697d | |||
352aa5f737 | |||
9546e90bec | |||
26b4d95ad8 | |||
4a6109fbe6 | |||
d6142173c9 | |||
38cf806b40 | |||
82269bb171 | |||
fc0d7a62af | |||
60fdfd9071 | |||
1f620bcc06 | |||
737acfa41b | |||
3619cba33c | |||
52ec43abf8 | |||
e96c356de4 | |||
bbdb0a65fb | |||
ec56e32be1 | |||
4dc83fdeba | |||
541422a43e | |||
cb7bf00e17 | |||
a3171b3111 | |||
02626489eb | |||
a9a2e9a3dd | |||
964c55de31 | |||
befb4a2bef | |||
210609bd7b | |||
3e03d4782d | |||
675a7a5321 | |||
a78b5cab23 | |||
252a3527a8 | |||
ea4cf06edf | |||
1424efd7f8 | |||
eb807a0332 | |||
e9a3a82b68 | |||
fca66f3259 | |||
92ebe0c6a8 | |||
6b1147d065 | |||
720313124c | |||
68ea62ea0b | |||
5584a41af0 | |||
0bca46bba3 | |||
4f1d19fcbd | |||
9a85e4d537 | |||
fac92d8094 | |||
605f58da47 | |||
d22f3ad1cb | |||
46ed966c18 | |||
623dc5da07 | |||
bd6d4f046c | |||
9ad66f2f92 | |||
b4c40e236a | |||
9bbcc2f160 | |||
00b355b877 | |||
071ddbb69a | |||
4d5c054bc4 | |||
87629666f2 | |||
75633f78c4 | |||
c940aea153 | |||
18126b1fda | |||
e9884a5fa8 | |||
aa7b241dba | |||
c70f3eabfe | |||
1c65aab673 | |||
a5cdd64686 | |||
b07ca5bd03 | |||
8f8580d542 | |||
0ed4480878 | |||
c3e0031aa4 | |||
388c963e88 | |||
4283651b1e | |||
50d7dfa06d | |||
b3a2e605fb | |||
14bf5fc0a2 | |||
2c8b57a7dc | |||
8e6c167987 | |||
2c8094c8c8 | |||
62385d6f62 | |||
3b210d7ed0 | |||
63ce2d40bd | |||
36f8b6e54b | |||
58413044e9 | |||
3395cd9d95 | |||
494b1f1fd0 | |||
cf943fd13a | |||
9608b46799 | |||
502956e3ec | |||
27b4c26da7 | |||
65f54360f8 | |||
9a9fad975f | |||
7153b21cd4 | |||
fdb2486090 | |||
d60b2a25d1 | |||
2d8dde6951 | |||
78fd60dade | |||
80dbf6af28 | |||
1e53753b5a | |||
e727877268 | |||
63b69df3ea | |||
b03e02675b | |||
e68a1ffd37 | |||
fb00e5c1ff | |||
7bfb9b7b61 | |||
c43689822b | |||
7952453137 | |||
2f61f6da00 | |||
db252b6b6c | |||
137c354acc | |||
1c7f6bd034 | |||
649d8771ca | |||
af7b0f732e | |||
12738fd52c | |||
b165e1c0c2 | |||
29c1ad8bc9 | |||
262af4108b | |||
a22dc50f14 | |||
e629981218 | |||
103381c17a | |||
7540ef04bb | |||
30b48c6677 | |||
48e4648110 | |||
b10b10d4a2 | |||
036f8a49ac | |||
67f52b8df0 | |||
dd1b909bb0 | |||
72c3c7bdf7 | |||
e0e7a9fc2e | |||
b3d853dec3 | |||
e0a4aad3cd | |||
328e656859 | |||
c97f79335a | |||
e07e75747a | |||
9482641c38 | |||
a485e72ddf | |||
c7265ba628 | |||
c39c2a172f | |||
64b7b00253 | |||
ec132d224e | |||
9c9fbfa753 | |||
4b5932b319 | |||
0c91028469 | |||
48b720bdd7 | |||
2038d81ce8 | |||
81be383b5f | |||
0fb88e3e44 | |||
e92b04ad0f | |||
160d1a11ac | |||
b9cfe73eae | |||
8d6d984849 | |||
25fe9fab37 | |||
ba7058a838 | |||
0858395e60 | |||
fdd769d9ff | |||
f47ae69653 | |||
f311ae3797 | |||
5a941f889f | |||
69e50c6f93 | |||
f7ac3a5d23 | |||
b6b54a805e | |||
131f56a468 | |||
e45e9e7fa0 | |||
cac0aad1f2 | |||
2c1bd9e726 | |||
2645e8f451 | |||
e92c227bba | |||
a31fe92c0b | |||
70cb876439 | |||
9aa4c37354 | |||
d44150ea1a | |||
0360c81bee | |||
cb904c1f1c | |||
bc754db959 | |||
8df799a6e4 | |||
71dd9469ca | |||
79788d2cdc | |||
c28c9981c4 | |||
8fadd0016a | |||
77504d68fd | |||
1490450178 | |||
88beaf8b6f | |||
df25b0bc76 | |||
d07eea7766 | |||
5000453002 | |||
35c82fcc51 | |||
89a4912ed7 | |||
aeabc66067 | |||
ccbfc9a1e1 | |||
31936feb98 | |||
538db69754 | |||
25ea5bd6a8 | |||
460cd84258 | |||
3f9613c43c | |||
34eccda233 | |||
741d2c7a84 | |||
6ee5ceb321 | |||
6107ec6ffb | |||
4ef014a8ac | |||
135a7c2f56 | |||
420f11784d | |||
951e7462c4 | |||
1b0550b5e1 | |||
919c4a7d80 | |||
dcb2b0a26f | |||
d388e5df0c | |||
5776524579 | |||
1d0a0731fb | |||
4dafa75944 | |||
85cdc86b07 | |||
cd19426d1b | |||
48b1b40e1c | |||
50d469cc45 | |||
37f74d5284 | |||
adb7b12c16 | |||
27791cc848 | |||
bd45523e25 | |||
c0f2242679 | |||
c309a2b3ed | |||
48c9048a00 | |||
4d2f7a794b | |||
ab6e431872 | |||
9423df2670 | |||
a2b3e42eee | |||
d9a045bbf0 | |||
42ca17339e | |||
003c4d4456 | |||
ec39aa7bc3 | |||
4e3870a512 | |||
97534b01a6 | |||
61bed61bfb | |||
a0ff4782db | |||
41dd1de8f8 | |||
fa6634d6af |
BIN
.github/jetbrains-variant-3.png
vendored
Normal file
BIN
.github/jetbrains-variant-3.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 178 KiB |
73
.github/workflows/build-apk.yml
vendored
73
.github/workflows/build-apk.yml
vendored
@ -3,7 +3,7 @@ name: Build Shamrock APK
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ v1.0.9 ]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- '**.txt'
|
- '**.txt'
|
||||||
@ -13,24 +13,38 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build APK
|
name: Build Shamrock
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup JDK 17
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
cache: 'gradle'
|
distribution: "adopt"
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Cache Gradle Dependencies
|
||||||
run: |
|
uses: actions/cache@v4
|
||||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmake;3.22.1" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
with:
|
||||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
!~/.gradle/caches/build-cache-*
|
||||||
|
key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
|
||||||
|
restore-keys: gradle-deps
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Cache Gradle Build
|
||||||
uses: gradle/gradle-build-action@v2.9.0
|
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
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
@ -46,42 +60,41 @@ jobs:
|
|||||||
KEY_ALIAS: ${{ secrets.SIGN_ALIAS }}
|
KEY_ALIAS: ${{ secrets.SIGN_ALIAS }}
|
||||||
KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
|
KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Install aapt
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y aapt
|
|
||||||
|
|
||||||
- name: Set Shamrock Version
|
- name: Set Shamrock Version
|
||||||
run: |
|
run: |
|
||||||
apk_file=${{ env.APK_FILE_ALL }}
|
version_name_all=$(basename -s .apk "${{ env.APK_FILE_ALL }}")
|
||||||
apk_dump=$(aapt dump badging "$apk_file")
|
version_name_arm64=$(basename -s .apk "${{ env.APK_FILE_ARM64 }}")
|
||||||
version_name=$(sed -n "s/.*versionName='\([^']*\)'.*/\1/p" <<< "$apk_dump")
|
version_name_x86_64=$(basename -s .apk "${{ env.APK_FILE_X86_64 }}")
|
||||||
echo "SHAMROCK_VERSION=$version_name" >> $GITHUB_ENV
|
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
|
- name: Show Artifacts SHA256
|
||||||
run: |
|
run: |
|
||||||
echo "### Build Success :rocket:" >> $GITHUB_STEP_SUMMARY
|
echo "### Build Success :rocket:" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "|ABI|SHA256|" >> $GITHUB_STEP_SUMMARY
|
echo "|ABI|SHA256|" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "|:--------:|:----------|" >> $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
|
echo "|all|$all" >> $GITHUB_STEP_SUMMARY
|
||||||
arm64=($(sha256sum ${{ env.APK_FILE_ARM64 }}))
|
arm64=($(sha256sum "${{ env.APK_FILE_ARM64 }}"))
|
||||||
echo "|arm64|$arm64" >> $GITHUB_STEP_SUMMARY
|
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
|
echo "|x86_64|$x86_64" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
- name: Upload ALL APK RELEASE
|
- name: Upload ALL APK RELEASE
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Shamrock-v${{ env.SHAMROCK_VERSION }}-all
|
name: "${{ env.SHAMROCK_VERSION_ALL }}"
|
||||||
path: ${{ env.APK_FILE_ALL }}
|
path: "${{ env.APK_FILE_ALL }}"
|
||||||
|
|
||||||
- name: Upload ARM64 APK RELEASE
|
- name: Upload ARM64 APK RELEASE
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Shamrock-v${{ env.SHAMROCK_VERSION }}-arm64
|
name: "${{ env.SHAMROCK_VERSION_ARM64 }}"
|
||||||
path: ${{ env.APK_FILE_ARM64 }}
|
path: "${{ env.APK_FILE_ARM64 }}"
|
||||||
|
|
||||||
- name: Upload X86_64 APK RELEASE
|
- name: Upload X86_64 APK RELEASE
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Shamrock-v${{ env.SHAMROCK_VERSION }}-x86_64
|
name: "${{ env.SHAMROCK_VERSION_x86_64 }}"
|
||||||
path: ${{ env.APK_FILE_X86_64 }}
|
path: "${{ env.APK_FILE_X86_64 }}"
|
||||||
|
57
.github/workflows/codeql.yml
vendored
57
.github/workflows/codeql.yml
vendored
@ -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}}"
|
|
73
.github/workflows/release.yml
vendored
73
.github/workflows/release.yml
vendored
@ -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 }}
|
|
35
README.md
35
README.md
@ -16,18 +16,38 @@
|
|||||||
|
|
||||||
## 简介
|
## 简介
|
||||||
|
|
||||||
☘ 基于 Xposed 实现 OneBot 标准的 QQ 机器人框架,原作者[**fuqiuluo**](https://github.com/fuqiuluo)已脱离开发,接下来由白池接手哦!本项目为OpenShamrock,不会有任何收费行为,欢迎大家的加入!
|
☘ 基于 Lsposed(**Non**-Riru) 实现 OneBot 标准的 QQ 机器人框架!
|
||||||
|
|
||||||
> 本项目仅提供学习与交流用途,请在24小时内删除。
|
> 本项目仅提供学习与交流用途,请在24小时内删除。
|
||||||
> 本项目目的是研究 Xposed 和 LSPosed 框架的使用。 Epic 框架开发相关知识。
|
> 本项目目的是研究 Xposed 和 LSPosed 框架的使用。 Epic 框架开发相关知识。
|
||||||
|
> Riru可能导致封禁,请减少使用。
|
||||||
> 如有违反法律,请联系删除。
|
> 如有违反法律,请联系删除。
|
||||||
> 请勿在任何平台宣传,宣扬,转发本项目,请勿恶意修改企业安装包造成相关企业产生损失,如有违背,必将追责到底。
|
> 请勿在任何平台宣传,宣扬,转发本项目,请勿恶意修改企业安装包造成相关企业产生损失,如有违背,必将追责到底。
|
||||||
> 官方论坛,[点我直达](https://forum.libfekit.so/)!
|
> 官方论坛,[点我直达](https://forum.libfekit.so/)!
|
||||||
|
|
||||||
## 兼容|迁移|替代 说明
|
## 兼容|迁移|替代 说明
|
||||||
|
|
||||||
|
仅支持QQ9.0.70以上的版本,低版本问题将不再修复与处理。
|
||||||
|
|
||||||
- 一键移植:本项目基于 go-cqhttp 的文档进行开发实现。
|
- 一键移植:本项目基于 go-cqhttp 的文档进行开发实现。
|
||||||
- 平行部署:可多平台部署,未来将会支持 Docker 部署的教程。
|
- 平行部署:可多平台部署,未来将会支持 Docker 部署的教程。
|
||||||
|
|
||||||
|
## 相关项目
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/LagrangeDev/Lagrange.Core">Lagrange.Core</a></td>
|
||||||
|
<td>NTQQ 的协议实现</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/whitechi73/OpenShamrock">OpenShamrock</a></td>
|
||||||
|
<td>基于 Xposed 实现 OneBot 标准的机器人框架(👈你在这里</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/chrononeko/chronocat">Chronocat</a></td>
|
||||||
|
<td>基于 Electron 的、模块化的 Satori 框架</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
## 权限声明
|
## 权限声明
|
||||||
|
|
||||||
@ -45,13 +65,19 @@
|
|||||||
|
|
||||||
<img src="https://github.com/whitechi73/OpenShamrock/assets/98259561/f04d60bc-ec40-41fc-bc15-62c146f1a1f1" width="160px" alt="Shamrock"> **我可爱吗?欢迎你的到来,这里是一个很大的地方,有着无限可能,主要是有你啦!**
|
<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) 协议开放源代码
|
本项目使用 [GPL-3.0](LICENSE) 协议开放源代码
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Shamrock - OneBot standard QQ robot framework based on Xposed implementation
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
@ -94,10 +120,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
[docs-link]: https://whitechi73.github.io/OpenShamrock/
|
[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
|
[voice-support]: https://whitechi73.github.io/OpenShamrock/advanced/voice.html
|
||||||
|
|
||||||
[contrib-image]: https://contrib.rocks/image?repo=whitechi73/OpenShamrock
|
[contrib-image]: https://contrib.rocks/image?repo=whitechi73/OpenShamrock
|
||||||
|
|
||||||
[contrib-link]: https://github.com/whitechi73/OpenShamrock/graphs/contributors
|
[contrib-link]: https://github.com/whitechi73/OpenShamrock/graphs/contributors
|
||||||
|
|
||||||
|
12
SECURITY.md
12
SECURITY.md
@ -1,11 +1,19 @@
|
|||||||
# Security Policy
|
# Security Policy
|
||||||
|
|
||||||
## Support Version
|
## 支持的版本
|
||||||
|
|
||||||
| Version | Supported |
|
| 版本 | 支持状态 |
|
||||||
| ------- | ------------------ |
|
| ------- | ------------------ |
|
||||||
|
| 9.0.15 | :white_check_mark: |
|
||||||
| 8.9.75 | :white_check_mark: |
|
| 8.9.75 | :white_check_mark: |
|
||||||
| 8.9.73 | :white_check_mark: |
|
| 8.9.73 | :white_check_mark: |
|
||||||
| 8.9.98 | :white_check_mark: |
|
| 8.9.98 | :white_check_mark: |
|
||||||
| < 8.9.68| :x: |
|
| < 8.9.68| :x: |
|
||||||
|
|
||||||
|
## 频道支持性说明
|
||||||
|
|
||||||
|
如果需要使用`频道`相关功能,请升级QQ到9.0.8版本!
|
||||||
|
|
||||||
|
## Riru检测问题
|
||||||
|
|
||||||
|
QQ自`9.0.8`开始将会检测riru,可能作为封号因素。
|
||||||
|
1
annotations/.gitignore
vendored
Normal file
1
annotations/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
14
annotations/build.gradle.kts
Normal file
14
annotations/build.gradle.kts
Normal 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"))
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package moe.fuqiuluo.symbols
|
||||||
|
|
||||||
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
annotation class OneBotHandler(
|
||||||
|
val actionName: String,
|
||||||
|
val alias: Array<String> = []
|
||||||
|
)
|
12
annotations/src/main/java/moe/fuqiuluo/symbols/Protobuf.kt
Normal file
12
annotations/src/main/java/moe/fuqiuluo/symbols/Protobuf.kt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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>> ByteArray.decodeProtobuf(to: KClass<T>? = null): T {
|
||||||
|
return ProtoBuf.decodeFromByteArray(this)
|
||||||
|
}
|
13
annotations/src/main/java/moe/fuqiuluo/symbols/XposedHook.kt
Normal file
13
annotations/src/main/java/moe/fuqiuluo/symbols/XposedHook.kt
Normal 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
|
||||||
|
)
|
@ -1,35 +1,29 @@
|
|||||||
import com.android.build.api.dsl.ApplicationExtension
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import java.io.ByteArrayOutputStream
|
||||||
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 ""
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("org.jetbrains.kotlin.android")
|
id("org.jetbrains.kotlin.android")
|
||||||
kotlin("plugin.serialization") version "1.8.10"
|
kotlin("plugin.serialization") version "1.9.22"
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "moe.fuqiuluo.shamrock"
|
namespace = "moe.fuqiuluo.shamrock"
|
||||||
ndkVersion = "25.1.8937393"
|
ndkVersion = "25.1.8937393"
|
||||||
compileSdk = 33
|
compileSdk = 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "moe.fuqiuluo.shamrock"
|
applicationId = "moe.fuqiuluo.shamrock"
|
||||||
minSdk = 24
|
minSdk = 27
|
||||||
targetSdk = 33
|
targetSdk = 34
|
||||||
versionCode = (System.currentTimeMillis() / 1000).toInt()
|
versionCode = getVersionCode()
|
||||||
versionName = "1.0.7-dev" + gitCommitHash()
|
versionName = "1.1.1.onebot" + ".r${getGitCommitCount()}." + getVersionName()
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables {
|
vectorDrawables {
|
||||||
useSupportLibrary = true
|
useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
@Suppress("UnstableApiUsage")
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
cppFlags += ""
|
cppFlags += ""
|
||||||
@ -50,8 +44,7 @@ android {
|
|||||||
android.applicationVariants.all {
|
android.applicationVariants.all {
|
||||||
outputs.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
|
outputs.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
|
||||||
.forEach {
|
.forEach {
|
||||||
val abi = it.outputFileName.split("-")[1].split(".apk")[0]
|
val abiName = when (val abi = it.outputFileName.split("-")[1].split(".apk")[0]) {
|
||||||
val abiName = when (abi) {
|
|
||||||
"app" -> "all"
|
"app" -> "all"
|
||||||
"x64" -> "x86_64"
|
"x64" -> "x86_64"
|
||||||
else -> abi
|
else -> abi
|
||||||
@ -69,6 +62,7 @@ android {
|
|||||||
println("Full architecture and full compilation.")
|
println("Full architecture and full compilation.")
|
||||||
abiFilters.add("arm64-v8a")
|
abiFilters.add("arm64-v8a")
|
||||||
abiFilters.add("x86_64")
|
abiFilters.add("x86_64")
|
||||||
|
abiFilters.add("x86")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
create("arm64") {
|
create("arm64") {
|
||||||
@ -98,7 +92,7 @@ android {
|
|||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion = "1.4.3"
|
kotlinCompilerExtensionVersion = "1.5.10"
|
||||||
}
|
}
|
||||||
packaging {
|
packaging {
|
||||||
jniLibs {
|
jniLibs {
|
||||||
@ -154,15 +148,47 @@ fun configureAppSigningConfigsForRelease(project: Project) {
|
|||||||
release {
|
release {
|
||||||
signingConfig = signingConfigs.findByName("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 {
|
dependencies {
|
||||||
implementation("androidx.core:core-ktx:1.9.0")
|
val composeBom = platform("androidx.compose:compose-bom:2023.10.01")
|
||||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
|
implementation(composeBom)
|
||||||
implementation("androidx.activity:activity-compose:1.7.2")
|
|
||||||
implementation(platform("androidx.compose:compose-bom:2023.06.01"))
|
DEPENDENCY_ANDROIDX.forEach {
|
||||||
|
implementation(it)
|
||||||
|
}
|
||||||
|
|
||||||
implementation("androidx.compose.ui:ui")
|
implementation("androidx.compose.ui:ui")
|
||||||
implementation("androidx.compose.ui:ui-graphics")
|
implementation("androidx.compose.ui:ui-graphics")
|
||||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||||
@ -171,31 +197,26 @@ dependencies {
|
|||||||
implementation("com.google.accompanist:accompanist-pager:0.31.5+")
|
implementation("com.google.accompanist:accompanist-pager:0.31.5+")
|
||||||
//noinspection GradleDynamicVersion
|
//noinspection GradleDynamicVersion
|
||||||
implementation("com.google.accompanist:accompanist-systemuicontroller:0.31.5+")
|
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:2.4.0")
|
||||||
implementation("io.coil-kt:coil-compose:2.4.0")
|
implementation("io.coil-kt:coil-compose:2.4.0")
|
||||||
|
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-io-jvm:0.1.16")
|
implementation(kotlinx("io-jvm", "0.1.16"))
|
||||||
|
implementation(ktor("server", "core"))
|
||||||
val ktorVersion = "2.3.3"
|
implementation(ktor("server", "host-common"))
|
||||||
implementation("io.ktor:ktor-server-core:$ktorVersion")
|
implementation(ktor("server", "status-pages"))
|
||||||
implementation("io.ktor:ktor-server-host-common:$ktorVersion")
|
implementation(ktor("server", "netty"))
|
||||||
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
|
implementation(ktor("server", "content-negotiation"))
|
||||||
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
implementation(ktor("client", "core"))
|
||||||
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
|
implementation(ktor("client", "content-negotiation"))
|
||||||
implementation("io.ktor:ktor-client-core:$ktorVersion")
|
implementation(ktor("client", "cio"))
|
||||||
implementation("io.ktor:ktor-client-cio:$ktorVersion")
|
implementation(ktor("serialization", "kotlinx-json"))
|
||||||
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(project(":xposed"))
|
implementation(project(":xposed"))
|
||||||
|
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
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")
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
||||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||||
|
21
app/proguard-rules.pro
vendored
21
app/proguard-rules.pro
vendored
@ -199,17 +199,36 @@
|
|||||||
|
|
||||||
-keep class com.arthenica.ffmpegkit.NativeLoader { *; }
|
-keep class com.arthenica.ffmpegkit.NativeLoader { *; }
|
||||||
|
|
||||||
-keep class moe.fuqiuluo.** { *; }
|
-keep class moe.fuqiuluo.shamrock.app.** { *; }
|
||||||
|
-keep class moe.fuqiuluo.shamrock.ui.** { *; }
|
||||||
|
-keep class moe.fuqiuluo.shamrock.MainActivity { *; }
|
||||||
|
-keep class moe.fuqiuluo.shamrock.MainActivityKt { *; }
|
||||||
|
-keep class moe.fuqiuluo.shamrock.Manifest { *; }
|
||||||
|
|
||||||
|
-keep class moe.fuqiuluo.shamrock.xposed.** { *; }
|
||||||
|
-keep class moe.fuqiuluo.shamrock.helper.** { *; }
|
||||||
|
|
||||||
|
# tencent interfaces rules
|
||||||
-keep class com.tencent.** { *; }
|
-keep class com.tencent.** { *; }
|
||||||
-keep class com.qq.** { *; }
|
-keep class com.qq.** { *; }
|
||||||
-keep class com.google.gson.** { *; }
|
-keep class com.google.gson.** { *; }
|
||||||
-keep class de.** { *; }
|
-keep class de.** { *; }
|
||||||
|
-keep class epic.** { *; }
|
||||||
|
-keep class friendlist.** { *; }
|
||||||
|
-keep class KQQ.** { *; }
|
||||||
-keep class mqq.** { *; }
|
-keep class mqq.** { *; }
|
||||||
|
-keep class msf.** { *; }
|
||||||
|
-keep class oicq.** { *; }
|
||||||
-keep class QQService.** { *; }
|
-keep class QQService.** { *; }
|
||||||
-keep class SummaryCard.** { *; }
|
-keep class SummaryCard.** { *; }
|
||||||
-keep class tencent.** { *; }
|
-keep class tencent.** { *; }
|
||||||
|
-keep class VIP.** { *; }
|
||||||
|
|
||||||
-keepclassmembers class * {
|
-keepclassmembers class * {
|
||||||
native <methods>;
|
native <methods>;
|
||||||
}
|
}
|
||||||
-keep class io.netty.** { *; }
|
-keep class io.netty.** { *; }
|
||||||
|
|
||||||
|
-keepclasseswithmembernames class * {
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<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
|
<application
|
||||||
android:name=".app.MyApplication"
|
android:name=".app.MyApplication"
|
||||||
@ -19,7 +15,6 @@
|
|||||||
android:theme="@style/Theme.Shamrock"
|
android:theme="@style/Theme.Shamrock"
|
||||||
android:zygotePreloadName="@string/app_name"
|
android:zygotePreloadName="@string/app_name"
|
||||||
android:multiArch="true"
|
android:multiArch="true"
|
||||||
android:extractNativeLibs="true"
|
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@ -36,7 +31,7 @@
|
|||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name=".ui.service.internal.MultifunctionalProvider"
|
android:name=".ui.service.internal.MultifunctionalProvider"
|
||||||
android:authorities="moe.fuqiuluo.xqbot.provider"
|
android:authorities="moe.fuqiuluo.108.provider"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:grantUriPermissions="true"
|
android:grantUriPermissions="true"
|
||||||
tools:ignore="ExportedContentProvider" />
|
tools:ignore="ExportedContentProvider" />
|
||||||
|
@ -39,7 +39,6 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
|
|||||||
md5.cpp
|
md5.cpp
|
||||||
cqcode.cpp
|
cqcode.cpp
|
||||||
silk.cpp
|
silk.cpp
|
||||||
group_honor.cpp
|
|
||||||
message.cpp
|
message.cpp
|
||||||
shamrock.cpp)
|
shamrock.cpp)
|
||||||
|
|
||||||
|
@ -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) {
|
void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::string, std::string>>& dest) {
|
||||||
std::string cache;
|
std::string cache;
|
||||||
bool is_start = false;
|
bool is_start = false;
|
||||||
std::string key_tmp;
|
std::string key_tmp;
|
||||||
std::unordered_map<std::string, std::string> kv;
|
std::unordered_map<std::string, std::string> kv;
|
||||||
for(int i = 0; i < code.size(); i++) {
|
for(size_t i = 0; i < code.size(); i++) {
|
||||||
auto c = code[i];
|
int utf8_char_len = utf8_next_len(code, i);
|
||||||
if (c == '[') {
|
if(utf8_char_len == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
std::string_view c(&code[i],utf8_char_len);
|
||||||
|
if (c == "[") {
|
||||||
if (is_start) {
|
if (is_start) {
|
||||||
throw illegal_code();
|
throw illegal_code();
|
||||||
} else {
|
} else {
|
||||||
if (!cache.empty()) {
|
if (!cache.empty()) {
|
||||||
std::unordered_map<std::string, std::string> kv;
|
std::unordered_map<std::string, std::string> kv;
|
||||||
|
replace_string(cache, "[", "[");
|
||||||
|
replace_string(cache, "]", "]");
|
||||||
|
replace_string(cache, "&", "&");
|
||||||
kv.emplace("_type", "text");
|
kv.emplace("_type", "text");
|
||||||
kv.emplace("text", cache);
|
kv.emplace("text", cache);
|
||||||
dest.push_back(kv);
|
dest.push_back(kv);
|
||||||
cache.clear();
|
cache.clear();
|
||||||
}
|
}
|
||||||
auto c1 = code[i + 1];
|
std::string_view cq_flag(&code[i],4);
|
||||||
if (c1 == 'C') {
|
if(cq_flag == "[CQ:"){
|
||||||
i++;
|
is_start = true;
|
||||||
auto c2 = code[i + 1];
|
i += 3;
|
||||||
if(c2 == 'Q') {
|
}else{
|
||||||
i++;
|
|
||||||
auto c3 = code[i + 1];
|
|
||||||
if (c3 == ':') {
|
|
||||||
i++;
|
|
||||||
is_start = true;
|
|
||||||
} else {
|
|
||||||
cache += c;
|
|
||||||
cache += c1;
|
|
||||||
cache += c2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cache += c;
|
|
||||||
cache += c1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cache += c;
|
cache += c;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == '=') {
|
else if (c == "=") {
|
||||||
if (is_start) {
|
if (is_start) {
|
||||||
if (cache.empty()) {
|
if (cache.empty()) {
|
||||||
throw illegal_code();
|
throw illegal_code();
|
||||||
@ -70,17 +79,17 @@ void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::
|
|||||||
cache += c;
|
cache += c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == ',') {
|
else if (c == ",") {
|
||||||
if (is_start) {
|
if (is_start) {
|
||||||
if (kv.count("_type") == 0 && !cache.empty()) {
|
if (kv.count("_type") == 0 && !cache.empty()) {
|
||||||
kv.emplace("_type", cache);
|
kv.emplace("_type", cache);
|
||||||
cache.clear();
|
cache.clear();
|
||||||
} else {
|
} else {
|
||||||
if (!key_tmp.empty()) {
|
if (!key_tmp.empty()) {
|
||||||
replace_string(cache, "&", "&");
|
|
||||||
replace_string(cache, "[", "[");
|
replace_string(cache, "[", "[");
|
||||||
replace_string(cache, "]", "]");
|
replace_string(cache, "]", "]");
|
||||||
replace_string(cache, ",", ",");
|
replace_string(cache, ",", ",");
|
||||||
|
replace_string(cache, "&", "&");
|
||||||
kv.emplace(key_tmp, cache);
|
kv.emplace(key_tmp, cache);
|
||||||
cache.clear();
|
cache.clear();
|
||||||
key_tmp.clear();
|
key_tmp.clear();
|
||||||
@ -90,14 +99,14 @@ void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::
|
|||||||
cache += c;
|
cache += c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == ']') {
|
else if (c == "]") {
|
||||||
if (is_start) {
|
if (is_start) {
|
||||||
if (!cache.empty()) {
|
if (!cache.empty()) {
|
||||||
if (!key_tmp.empty()) {
|
if (!key_tmp.empty()) {
|
||||||
replace_string(cache, "&", "&");
|
|
||||||
replace_string(cache, "[", "[");
|
replace_string(cache, "[", "[");
|
||||||
replace_string(cache, "]", "]");
|
replace_string(cache, "]", "]");
|
||||||
replace_string(cache, ",", ",");
|
replace_string(cache, ",", ",");
|
||||||
|
replace_string(cache, "&", "&");
|
||||||
kv.emplace(key_tmp, cache);
|
kv.emplace(key_tmp, cache);
|
||||||
} else {
|
} else {
|
||||||
kv.emplace("_type", cache);
|
kv.emplace("_type", cache);
|
||||||
@ -114,10 +123,14 @@ void decode_cqcode(const std::string& code, std::vector<std::unordered_map<std::
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cache += c;
|
cache += c;
|
||||||
|
i += (utf8_char_len - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!cache.empty()) {
|
if (!cache.empty()) {
|
||||||
std::unordered_map<std::string, std::string> kv;
|
std::unordered_map<std::string, std::string> kv;
|
||||||
|
replace_string(cache, "[", "[");
|
||||||
|
replace_string(cache, "]", "]");
|
||||||
|
replace_string(cache, "&", "&");
|
||||||
kv.emplace("_type", "text");
|
kv.emplace("_type", "text");
|
||||||
kv.emplace("text", cache);
|
kv.emplace("text", cache);
|
||||||
dest.push_back(kv);
|
dest.push_back(kv);
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
JNIEXPORT jstring JNICALL
|
JNIEXPORT jstring JNICALL
|
||||||
Java_moe_fuqiuluo_shamrock_xposed_actions_PullConfig_testNativeLibrary(JNIEnv *env, jobject thiz) {
|
Java_moe_fuqiuluo_shamrock_xposed_hooks_PullConfig_00024Companion_testNativeLibrary(JNIEnv *env,
|
||||||
|
jobject thiz) {
|
||||||
return env->NewStringUTF("加载Shamrock库成功~");
|
return env->NewStringUTF("加载Shamrock库成功~");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,6 +38,26 @@ Java_moe_fuqiuluo_shamrock_utils_MD5_genFileMd5Hex(JNIEnv *env, jobject thiz, js
|
|||||||
return env->NewStringUTF(md5Hex.c_str());
|
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"
|
extern "C"
|
||||||
JNIEXPORT jstring JNICALL
|
JNIEXPORT jstring JNICALL
|
||||||
Java_moe_fuqiuluo_shamrock_utils_MD5_getMd5Hex(JNIEnv *env, jobject thiz, jbyteArray bytes) {
|
Java_moe_fuqiuluo_shamrock_utils_MD5_getMd5Hex(JNIEnv *env, jobject thiz, jbyteArray bytes) {
|
||||||
|
@ -63,6 +63,7 @@ import androidx.compose.ui.unit.sp
|
|||||||
import androidx.core.view.WindowCompat
|
import androidx.core.view.WindowCompat
|
||||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import moe.fuqiuluo.shamrock.ui.app.AppRuntime
|
import moe.fuqiuluo.shamrock.ui.app.AppRuntime
|
||||||
import moe.fuqiuluo.shamrock.ui.app.Logger
|
import moe.fuqiuluo.shamrock.ui.app.Logger
|
||||||
@ -78,13 +79,23 @@ import moe.fuqiuluo.shamrock.ui.theme.RANDOM_SUB_TITLE
|
|||||||
import moe.fuqiuluo.shamrock.ui.theme.RANDOM_TITLE
|
import moe.fuqiuluo.shamrock.ui.theme.RANDOM_TITLE
|
||||||
import moe.fuqiuluo.shamrock.ui.theme.ShamrockTheme
|
import moe.fuqiuluo.shamrock.ui.theme.ShamrockTheme
|
||||||
import moe.fuqiuluo.shamrock.ui.tools.NoIndication
|
import moe.fuqiuluo.shamrock.ui.tools.NoIndication
|
||||||
import moe.fuqiuluo.shamrock.ui.tools.ShamrockTab
|
import moe.fuqiuluo.shamrock.ui.tools.ShamrockTabV2
|
||||||
import moe.fuqiuluo.shamrock.ui.tools.getShamrockVersion
|
import moe.fuqiuluo.shamrock.ui.tools.getShamrockVersion
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
setContent {
|
setContent {
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
while (true) {
|
||||||
|
delay(5_000) // Delay in milliseconds
|
||||||
|
broadcastToModule {
|
||||||
|
putExtra("__cmd", "switch_status")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalIndication provides NoIndication
|
LocalIndication provides NoIndication
|
||||||
) {
|
) {
|
||||||
@ -120,7 +131,7 @@ private fun AppMainView() {
|
|||||||
val coreVersion = remember { mutableStateOf(getShamrockVersion(context)) }
|
val coreVersion = remember { mutableStateOf(getShamrockVersion(context)) }
|
||||||
val coreName = remember { mutableStateOf("Xposed") }
|
val coreName = remember { mutableStateOf("Xposed") }
|
||||||
val voiceSwitch = remember { mutableStateOf(false) }
|
val voiceSwitch = remember { mutableStateOf(false) }
|
||||||
@Suppress("LocalVariableName") val LocalString = LocalString
|
@Suppress("LocalVariableName") val LocalString = LocalString.init()
|
||||||
|
|
||||||
if (!AppRuntime.isInit) {
|
if (!AppRuntime.isInit) {
|
||||||
AppRuntime.state = remember {
|
AppRuntime.state = remember {
|
||||||
@ -147,7 +158,7 @@ private fun AppMainView() {
|
|||||||
|
|
||||||
AppRuntime.requestCount = remember { mutableIntStateOf(0) }
|
AppRuntime.requestCount = remember { mutableIntStateOf(0) }
|
||||||
|
|
||||||
AppRuntime.isInit = false
|
AppRuntime.isInit = true
|
||||||
}
|
}
|
||||||
|
|
||||||
val ctx = LocalContext.current
|
val ctx = LocalContext.current
|
||||||
@ -334,7 +345,7 @@ private fun AnimatedTab(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShamrockTab(
|
ShamrockTabV2(
|
||||||
selected = curSelected,
|
selected = curSelected,
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
|
@ -162,6 +162,17 @@ object ShamrockConfig {
|
|||||||
pushUpdate(ctx)
|
pushUpdate(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getUploadResourceGroup(ctx: Context): String {
|
||||||
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
|
return preferences.getString("up_res_group", "100000000")!!
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setUploadResourceGroup(ctx: Context, v: String) {
|
||||||
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
|
preferences.edit().putString("up_res_group", v).apply()
|
||||||
|
pushUpdate(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
fun getHttpPort(ctx: Context): Int {
|
fun getHttpPort(ctx: Context): Int {
|
||||||
val preferences = ctx.getSharedPreferences("config", 0)
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
return preferences.getInt("port", 5700)
|
return preferences.getInt("port", 5700)
|
||||||
@ -229,6 +240,16 @@ object ShamrockConfig {
|
|||||||
return preferences.getBoolean("anti_qq_trace", true)
|
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) {
|
fun setAntiTrace(ctx: Context, v: Boolean) {
|
||||||
val preferences = ctx.getSharedPreferences("config", 0)
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
preferences.edit().putBoolean("anti_qq_trace", v).apply()
|
preferences.edit().putBoolean("anti_qq_trace", v).apply()
|
||||||
@ -249,6 +270,11 @@ object ShamrockConfig {
|
|||||||
return preferences.getBoolean("enable_auto_start", false)
|
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 {
|
fun enableAliveReply(ctx: Context): Boolean {
|
||||||
val preferences = ctx.getSharedPreferences("config", 0)
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
return preferences.getBoolean("alive_reply", false)
|
return preferences.getBoolean("alive_reply", false)
|
||||||
@ -264,6 +290,11 @@ object ShamrockConfig {
|
|||||||
preferences.edit().putBoolean("enable_auto_start", v).apply()
|
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) {
|
fun setAliveReply(ctx: Context, v: Boolean) {
|
||||||
val preferences = ctx.getSharedPreferences("config", 0)
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
preferences.edit().putBoolean("alive_reply", v).apply()
|
preferences.edit().putBoolean("alive_reply", v).apply()
|
||||||
@ -279,19 +310,29 @@ object ShamrockConfig {
|
|||||||
return preferences.getBoolean("enable_self_msg", false)
|
return preferences.getBoolean("enable_self_msg", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun enableOldBDH(ctx: Context): Boolean {
|
||||||
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
|
return preferences.getBoolean("enable_old_bdh", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setEnableOldBDH(ctx: Context, v: Boolean) {
|
||||||
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
|
preferences.edit().putBoolean("enable_old_bdh", v).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
fun setEnableSelfMsg(ctx: Context, v: Boolean) {
|
||||||
val preferences = ctx.getSharedPreferences("config", 0)
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
preferences.edit().putBoolean("enable_self_msg", v).apply()
|
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)
|
val preferences = ctx.getSharedPreferences("config", 0)
|
||||||
return preferences.getBoolean("echo_number", false)
|
preferences.edit().putBoolean("enable_sync_msg_as_sent_msg", v).apply()
|
||||||
}
|
|
||||||
|
|
||||||
fun setEchoNumber(ctx: Context, v: Boolean) {
|
|
||||||
val preferences = ctx.getSharedPreferences("config", 0)
|
|
||||||
preferences.edit().putBoolean("echo_number", v).apply()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getConfigMap(ctx: Context): Map<String, Any?> {
|
fun getConfigMap(ctx: Context): Map<String, Any?> {
|
||||||
@ -314,13 +355,17 @@ object ShamrockConfig {
|
|||||||
"inject_packet" to preferences.getBoolean("inject_packet", false),
|
"inject_packet" to preferences.getBoolean("inject_packet", false),
|
||||||
"debug" to preferences.getBoolean("debug", false),
|
"debug" to preferences.getBoolean("debug", false),
|
||||||
"anti_qq_trace" to preferences.getBoolean("anti_qq_trace", true),
|
"anti_qq_trace" to preferences.getBoolean("anti_qq_trace", true),
|
||||||
//"auto_clear" to preferences.getBoolean("auto_clear", false),
|
|
||||||
"ssl_private_pwd" to preferences.getString("ssl_private_pwd", ""),
|
"ssl_private_pwd" to preferences.getString("ssl_private_pwd", ""),
|
||||||
"key_store" to preferences.getString("key_store", ""),
|
"key_store" to preferences.getString("key_store", ""),
|
||||||
"enable_self_msg" to preferences.getBoolean("enable_self_msg", false),
|
"enable_self_msg" to preferences.getBoolean("enable_self_msg", false),
|
||||||
"echo_number" to preferences.getBoolean("echo_number", false),
|
"echo_number" to preferences.getBoolean("echo_number", false),
|
||||||
"shell" to preferences.getBoolean("shell", false),
|
"shell" to preferences.getBoolean("shell", false),
|
||||||
"alive_reply" to preferences.getBoolean("alive_reply", 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),
|
||||||
|
"enable_old_bdh" to preferences.getBoolean("enable_old_bdh", false),
|
||||||
|
"up_res_group" to preferences.getString("up_res_group", ""),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,9 +278,7 @@ private fun APIInfoCard(
|
|||||||
text = authToken,
|
text = authToken,
|
||||||
hint = "请填写鉴权token",
|
hint = "请填写鉴权token",
|
||||||
error = "输入的参数不合法",
|
error = "输入的参数不合法",
|
||||||
checker = {
|
checker = { true },
|
||||||
it.length in 0 .. 36
|
|
||||||
},
|
|
||||||
confirm = {
|
confirm = {
|
||||||
ShamrockConfig.setToken(ctx, authToken.value)
|
ShamrockConfig.setToken(ctx, authToken.value)
|
||||||
AppRuntime.log("设置鉴权Token为[${authToken.value}]。")
|
AppRuntime.log("设置鉴权Token为[${authToken.value}]。")
|
||||||
@ -358,6 +356,36 @@ private fun FunctionCard(
|
|||||||
return@Function true
|
return@Function true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run {
|
||||||
|
val uploadResourceGroup = remember { mutableStateOf(ShamrockConfig.getUploadResourceGroup(ctx)) }
|
||||||
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.absolutePadding(left = 8.dp, right = 8.dp, top = 12.dp, bottom = 0.dp)
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
modifier = Modifier.padding(2.dp),
|
||||||
|
text = "用来上传资源的群聊,错误的资源上传终点可能导致封禁,请自建一个群聊并填写在下方。",
|
||||||
|
color = Color.Red,
|
||||||
|
fontSize = 11.sp
|
||||||
|
)
|
||||||
|
}
|
||||||
|
TextItem(
|
||||||
|
title = "接受资源群聊",
|
||||||
|
desc = "用来上传资源的群聊,请自建一个群聊并填写在下方。",
|
||||||
|
text = uploadResourceGroup,
|
||||||
|
hint = "请输入群号",
|
||||||
|
error = "群号不合法",
|
||||||
|
checker = {
|
||||||
|
it.isNotBlank() && it.toULongOrNull() != null
|
||||||
|
},
|
||||||
|
confirm = {
|
||||||
|
val groupId = uploadResourceGroup.value
|
||||||
|
ShamrockConfig.setUploadResourceGroup(ctx, groupId)
|
||||||
|
AppRuntime.log("设置接受资源群聊为[$groupId]。")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Function(
|
Function(
|
||||||
title = "专业级接口",
|
title = "专业级接口",
|
||||||
@ -447,9 +475,7 @@ private fun InfoItem(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.combinedClickable(onDoubleClick = {
|
.combinedClickable(onDoubleClick = {
|
||||||
doubleClick?.invoke(content)
|
doubleClick?.invoke(content)
|
||||||
}) {
|
}) { true }
|
||||||
true
|
|
||||||
}
|
|
||||||
,
|
,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
|
@ -91,7 +91,7 @@ fun LabFragment() {
|
|||||||
ActionBox(
|
ActionBox(
|
||||||
modifier = Modifier.padding(top = 12.dp),
|
modifier = Modifier.padding(top = 12.dp),
|
||||||
painter = painterResource(id = R.drawable.round_logo_dev_24),
|
painter = painterResource(id = R.drawable.round_logo_dev_24),
|
||||||
title = "实验功能"
|
title = "基础设置"
|
||||||
) { color ->
|
) { color ->
|
||||||
Column {
|
Column {
|
||||||
Divider(
|
Divider(
|
||||||
@ -100,17 +100,16 @@ fun LabFragment() {
|
|||||||
thickness = 0.2.dp
|
thickness = 0.2.dp
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
|
||||||
Function(
|
Function(
|
||||||
title = "自动清理QQ垃圾",
|
title = "禁止无用进程",
|
||||||
desc = "也许会导致奇怪的问题(无效)。",
|
desc = "禁止QQ生成无用进程浪费内存,可能造成部分功能闪退。",
|
||||||
descColor = color,
|
descColor = color,
|
||||||
isSwitch = ShamrockConfig.isAutoClean(ctx)
|
isSwitch = ShamrockConfig.isForbidUselessProcess(ctx)
|
||||||
) {
|
) {
|
||||||
ShamrockConfig.setAutoClean(ctx, it)
|
ShamrockConfig.setForbidUselessProcess(ctx, it)
|
||||||
ShamrockConfig.pushUpdate(ctx)
|
ShamrockConfig.pushUpdate(ctx)
|
||||||
return@Function false
|
return@Function true
|
||||||
}*/
|
}
|
||||||
|
|
||||||
Function(
|
Function(
|
||||||
title = "自回复测试",
|
title = "自回复测试",
|
||||||
@ -142,6 +141,16 @@ fun LabFragment() {
|
|||||||
return@Function true
|
return@Function true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Function(
|
||||||
|
title = "禁止Shamrock同步设置",
|
||||||
|
desc = "禁止Shamrock同步设置,防止恢复手动修改后的配置文件。",
|
||||||
|
descColor = color,
|
||||||
|
isSwitch = ShamrockConfig.disableAutoSyncSetting(ctx)
|
||||||
|
) {
|
||||||
|
ShamrockConfig.setDisableAutoSyncSetting(ctx, it)
|
||||||
|
return@Function true
|
||||||
|
}
|
||||||
|
|
||||||
kotlin.runCatching {
|
kotlin.runCatching {
|
||||||
ctx.getSharedPreferences("shared_config", Context.MODE_WORLD_READABLE)
|
ctx.getSharedPreferences("shared_config", Context.MODE_WORLD_READABLE)
|
||||||
}.onSuccess {
|
}.onSuccess {
|
||||||
@ -212,7 +221,7 @@ fun LabFragment() {
|
|||||||
}.onSuccess {
|
}.onSuccess {
|
||||||
Function(
|
Function(
|
||||||
title = "反检测加强",
|
title = "反检测加强",
|
||||||
desc = "可能导致某些设备频繁闪退",
|
desc = "可能导致某些设备频繁闪退,将拦截环境包上报。",
|
||||||
descColor = color,
|
descColor = color,
|
||||||
isSwitch = it.getBoolean("super_anti", false)
|
isSwitch = it.getBoolean("super_anti", false)
|
||||||
) { v ->
|
) { v ->
|
||||||
@ -275,17 +284,27 @@ fun LabFragment() {
|
|||||||
return@Function true
|
return@Function true
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Function(
|
Function(
|
||||||
title = "使用纯数字ECHO",
|
title = "同步消息推送类型异换",
|
||||||
desc = "在部分强类型语言框架,需要打开此开关。",
|
desc = "推送来自同号异设备消息,将同步消息作为自发消息推送。",
|
||||||
descColor = it,
|
descColor = it,
|
||||||
isSwitch = ShamrockConfig.isEchoNumber(ctx)
|
isSwitch = ShamrockConfig.enableSyncMsgAsSentMsg(ctx)
|
||||||
) {
|
) {
|
||||||
ShamrockConfig.setEchoNumber(ctx, it)
|
ShamrockConfig.setEnableSyncMsgAsSentMsg(ctx, it)
|
||||||
ShamrockConfig.pushUpdate(ctx)
|
ShamrockConfig.pushUpdate(ctx)
|
||||||
return@Function true
|
return@Function true
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
Function(
|
||||||
|
title = "启用旧版资源上传系统",
|
||||||
|
desc = "如果NT内核无法上传资源,请打开本开关。",
|
||||||
|
descColor = it,
|
||||||
|
isSwitch = ShamrockConfig.enableOldBDH(ctx)
|
||||||
|
) {
|
||||||
|
ShamrockConfig.setEnableOldBDH(ctx, it)
|
||||||
|
ShamrockConfig.pushUpdate(ctx)
|
||||||
|
return@Function true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import android.content.Intent
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.core.content.ContextCompat.startActivity
|
import androidx.core.content.ContextCompat.startActivity
|
||||||
import io.ktor.client.request.get
|
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.request.url
|
||||||
import io.ktor.client.statement.bodyAsText
|
import io.ktor.client.statement.bodyAsText
|
||||||
import io.ktor.http.HttpStatusCode
|
import io.ktor.http.HttpStatusCode
|
||||||
@ -16,9 +16,9 @@ import kotlinx.coroutines.Dispatchers
|
|||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import moe.fuqiuluo.shamrock.remote.entries.CommonResult
|
import moe.fuqiuluo.shamrock.remote.structures.CommonResult
|
||||||
import moe.fuqiuluo.shamrock.remote.entries.CurrentAccount
|
import moe.fuqiuluo.shamrock.remote.structures.CurrentAccount
|
||||||
import moe.fuqiuluo.shamrock.remote.entries.Status
|
import moe.fuqiuluo.shamrock.remote.structures.Status
|
||||||
import moe.fuqiuluo.shamrock.tools.GlobalClient
|
import moe.fuqiuluo.shamrock.tools.GlobalClient
|
||||||
import moe.fuqiuluo.shamrock.ui.app.AppRuntime.AccountInfo
|
import moe.fuqiuluo.shamrock.ui.app.AppRuntime.AccountInfo
|
||||||
import moe.fuqiuluo.shamrock.ui.app.AppRuntime.log
|
import moe.fuqiuluo.shamrock.ui.app.AppRuntime.log
|
||||||
@ -58,7 +58,8 @@ object DashboardInitializer {
|
|||||||
url("http://127.0.0.1:$servicePort/get_account_info")
|
url("http://127.0.0.1:$servicePort/get_account_info")
|
||||||
val token = ShamrockConfig.getToken(context)
|
val token = ShamrockConfig.getToken(context)
|
||||||
if (token.isNotBlank()) {
|
if (token.isNotBlank()) {
|
||||||
header("Authorization", "Bearer $token")
|
//header("Authorization", "Bearer $token")
|
||||||
|
parameter("access_token", token)
|
||||||
}
|
}
|
||||||
}.let {
|
}.let {
|
||||||
if (it.status == HttpStatusCode.OK) {
|
if (it.status == HttpStatusCode.OK) {
|
||||||
|
@ -30,6 +30,7 @@ abstract class ModuleHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
putExtra("__hash", callbackId)
|
putExtra("__hash", callbackId)
|
||||||
|
putExtra("__cmd", cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -58,7 +58,7 @@ class MultifunctionalProvider: ContentProvider() {
|
|||||||
|
|
||||||
inline fun Context.broadcastToModule(intentBuilder: Intent.() -> Unit) {
|
inline fun Context.broadcastToModule(intentBuilder: Intent.() -> Unit) {
|
||||||
val intent = Intent()
|
val intent = Intent()
|
||||||
intent.action = "moe.fuqiuluo.xqbot.dynamic"
|
intent.action = "moe.fuqiuluo.onebot.dynamic"
|
||||||
intent.intentBuilder()
|
intent.intentBuilder()
|
||||||
sendBroadcast(intent)
|
sendBroadcast(intent)
|
||||||
}
|
}
|
@ -6,7 +6,9 @@ package moe.fuqiuluo.shamrock.ui.theme
|
|||||||
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.ReadOnlyComposable
|
import androidx.compose.runtime.ReadOnlyComposable
|
||||||
|
import androidx.compose.ui.graphics.painter.Painter
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.res.painterResource
|
||||||
import moe.fuqiuluo.shamrock.R
|
import moe.fuqiuluo.shamrock.R
|
||||||
|
|
||||||
private val LocalStringDefault = Default()
|
private val LocalStringDefault = Default()
|
||||||
@ -164,4 +166,14 @@ open class VarString(
|
|||||||
|
|
||||||
var persistentText: String,
|
var persistentText: String,
|
||||||
var persistentTextDesc: String
|
var persistentTextDesc: String
|
||||||
)
|
) {
|
||||||
|
private var inited = false
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun init(): VarString {
|
||||||
|
if (inited) return this
|
||||||
|
|
||||||
|
inited = true
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -242,13 +242,13 @@ private fun Placeable.PlacementScope.placeTextAndIcon(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ShamrockTab(
|
fun ShamrockTabV2(
|
||||||
selected: Boolean,
|
selected: Boolean,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
enabled: Boolean = true,
|
enabled: Boolean = true,
|
||||||
text: @Composable (() -> Unit)? = null,
|
text: (@Composable (() -> Unit))? = null,
|
||||||
icon: @Composable (() -> Unit)? = null,
|
icon: (@Composable (() -> Unit))? = null,
|
||||||
selectedContentColor: Color = GlobalColor.TabSelected,
|
selectedContentColor: Color = GlobalColor.TabSelected,
|
||||||
unselectedContentColor: Color = selectedContentColor,
|
unselectedContentColor: Color = selectedContentColor,
|
||||||
indication: Indication? = rememberRipple(bounded = true, color = selectedContentColor),
|
indication: Indication? = rememberRipple(bounded = true, color = selectedContentColor),
|
||||||
@ -262,7 +262,7 @@ fun ShamrockTab(
|
|||||||
ProvideTextStyle(style, content = text)
|
ProvideTextStyle(style, content = text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ShamrockTab(
|
ShamrockTabV2(
|
||||||
selected,
|
selected,
|
||||||
onClick,
|
onClick,
|
||||||
modifier,
|
modifier,
|
||||||
@ -277,7 +277,7 @@ fun ShamrockTab(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ShamrockTab(
|
fun ShamrockTabV2(
|
||||||
selected: Boolean,
|
selected: Boolean,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
@ -2,16 +2,14 @@ package moe.fuqiuluo.shamrock
|
|||||||
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example local unit test, which will execute on the development machine (host).
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
*
|
*
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
*/
|
*/
|
||||||
class ExampleUnitTest {
|
class ExampleUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun addition_isCorrect() {
|
fun test() {
|
||||||
assertEquals(4, 2 + 2)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.1.2" apply false
|
id("com.android.application") version "8.2.1" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.8.10" apply false
|
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
||||||
id("com.android.library") version "8.1.2" apply false
|
id("com.android.library") version "8.2.1" apply false
|
||||||
//id("io.realm.kotlin") version "1.11.0" apply false
|
}
|
||||||
}
|
|
||||||
|
10
buildSrc/build.gradle.kts
Normal file
10
buildSrc/build.gradle.kts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm") version "1.9.21"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
}
|
26
buildSrc/src/main/kotlin/Dependencies.kt
Normal file
26
buildSrc/src/main/kotlin/Dependencies.kt
Normal 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"
|
||||||
|
}
|
@ -21,4 +21,6 @@ kotlin.code.style=official
|
|||||||
# resources declared in the library itself and none from the library's dependencies,
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
android.default.buildFeatures.aidl=true
|
android.default.buildFeatures.aidl=true
|
||||||
|
kotlin.experimental.tryK2=true
|
||||||
|
ksp.incremental=false
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
3
gradlew
vendored
3
gradlew
vendored
@ -83,7 +83,8 @@ done
|
|||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
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.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
1
processor/.gitignore
vendored
Normal file
1
processor/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
22
processor/build.gradle.kts
Normal file
22
processor/build.gradle.kts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
id("com.google.devtools.ksp") version "1.9.22-1.0.17"
|
||||||
|
kotlin("plugin.serialization") version "1.9.22"
|
||||||
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
|
}
|
0
processor/consumer-rules.pro
Normal file
0
processor/consumer-rules.pro
Normal file
21
processor/proguard-rules.pro
vendored
Normal file
21
processor/proguard-rules.pro
vendored
Normal 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
|
4
processor/src/main/AndroidManifest.xml
Normal file
4
processor/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
</manifest>
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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()
|
||||||
|
}
|
@ -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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -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
1
protobuf/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
51
protobuf/build.gradle.kts
Normal file
51
protobuf/build.gradle.kts
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
kotlin("plugin.serialization") version "1.9.22"
|
||||||
|
id("com.google.devtools.ksp") version "1.9.22-1.0.17"
|
||||||
|
}
|
||||||
|
|
||||||
|
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"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
|
||||||
|
}
|
0
protobuf/consumer-rules.pro
Normal file
0
protobuf/consumer-rules.pro
Normal file
21
protobuf/proguard-rules.pro
vendored
Normal file
21
protobuf/proguard-rules.pro
vendored
Normal 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
|
4
protobuf/src/main/AndroidManifest.xml
Normal file
4
protobuf/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
</manifest>
|
128
protobuf/src/main/java/protobuf/fav/WeiyunAddRichMediaReq.kt
Normal file
128
protobuf/src/main/java/protobuf/fav/WeiyunAddRichMediaReq.kt
Normal 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 = "",
|
||||||
|
)
|
@ -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 = "",
|
||||||
|
)
|
11
protobuf/src/main/java/protobuf/fav/WeiyunComm.kt
Normal file
11
protobuf/src/main/java/protobuf/fav/WeiyunComm.kt
Normal 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>
|
15
protobuf/src/main/java/protobuf/fav/WeiyunCommonReq.kt
Normal file
15
protobuf/src/main/java/protobuf/fav/WeiyunCommonReq.kt
Normal 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,
|
||||||
|
|
||||||
|
)
|
14
protobuf/src/main/java/protobuf/fav/WeiyunCommonResp.kt
Normal file
14
protobuf/src/main/java/protobuf/fav/WeiyunCommonResp.kt
Normal 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,
|
||||||
|
)
|
@ -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,
|
||||||
|
)
|
@ -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,
|
||||||
|
)
|
@ -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(),
|
||||||
|
)
|
@ -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
|
||||||
|
|
19
protobuf/src/main/java/protobuf/fav/WeiyunGetFavListReq.kt
Normal file
19
protobuf/src/main/java/protobuf/fav/WeiyunGetFavListReq.kt
Normal 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,
|
||||||
|
)
|
41
protobuf/src/main/java/protobuf/fav/WeiyunGetFavListResp.kt
Normal file
41
protobuf/src/main/java/protobuf/fav/WeiyunGetFavListResp.kt
Normal 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 = "",
|
||||||
|
)
|
||||||
|
|
32
protobuf/src/main/java/protobuf/fav/WeiyunMsgHead.kt
Normal file
32
protobuf/src/main/java/protobuf/fav/WeiyunMsgHead.kt
Normal 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>
|
||||||
|
|
@ -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,
|
||||||
|
)
|
406
protobuf/src/main/java/protobuf/guild/GetGuildFeeds.kt
Normal file
406
protobuf/src/main/java/protobuf/guild/GetGuildFeeds.kt
Normal 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,
|
||||||
|
)
|
42
protobuf/src/main/java/protobuf/lightapp/AdaptShareInfo.kt
Normal file
42
protobuf/src/main/java/protobuf/lightapp/AdaptShareInfo.kt
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
@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: ULong? = null,
|
||||||
|
@ProtoNumber(2) var templateData: ByteArray? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class AdaptShareInfoResp(
|
||||||
|
@ProtoNumber(2) var json: String? = null,
|
||||||
|
): Protobuf<AdaptShareInfoResp>
|
26
protobuf/src/main/java/protobuf/message/AppShareInfo.kt
Normal file
26
protobuf/src/main/java/protobuf/message/AppShareInfo.kt
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class AppShareInfo(
|
||||||
|
@ProtoNumber(1) var appshareId: UInt? = null,
|
||||||
|
@ProtoNumber(2) var appshareCookie: ByteArray? = null,
|
||||||
|
@ProtoNumber(3) var appshareResource: PluginInfo? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class PluginInfo(
|
||||||
|
@ProtoNumber(1) var resId: UInt = 0u,
|
||||||
|
@ProtoNumber(2) var pkgName: String = "",
|
||||||
|
@ProtoNumber(3) var newVer: UInt = 0u,
|
||||||
|
@ProtoNumber(4) var resType: UInt = 0u,
|
||||||
|
@ProtoNumber(5) var lanType: UInt = 0u,
|
||||||
|
@ProtoNumber(6) var priority: UInt = 0u,
|
||||||
|
@ProtoNumber(7) var resName: String = "",
|
||||||
|
@ProtoNumber(8) var resDesc: String = "",
|
||||||
|
@ProtoNumber(9) var resUrlBig: String = "",
|
||||||
|
@ProtoNumber(10) var resUrlSmall: String = "",
|
||||||
|
@ProtoNumber(11) var resConf: String = "",
|
||||||
|
)
|
31
protobuf/src/main/java/protobuf/message/ContentHead.kt
Normal file
31
protobuf/src/main/java/protobuf/message/ContentHead.kt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ContentHead(
|
||||||
|
@ProtoNumber(1) val msgType: Int = Int.MIN_VALUE,
|
||||||
|
@ProtoNumber(2) val msgSubType: Int? = null,
|
||||||
|
@ProtoNumber(3) val divSeq: Int? = null,
|
||||||
|
@ProtoNumber(4) val msgViaRandom: Long = Long.MIN_VALUE,
|
||||||
|
@ProtoNumber(5) val sequence: 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, // 0x0100000000000000L xor msgViaRandom
|
||||||
|
@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
|
||||||
|
)
|
64
protobuf/src/main/java/protobuf/message/Elem.kt
Normal file
64
protobuf/src/main/java/protobuf/message/Elem.kt
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import protobuf.message.element.*
|
||||||
|
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@Serializable
|
||||||
|
data class Elem(
|
||||||
|
@ProtoNumber(1) val text: TextMsg? = null,
|
||||||
|
@ProtoNumber(2) val face: FaceMsg? = null,
|
||||||
|
// @ProtoNumber(3) val onlineImage: OnlineImage? = null,
|
||||||
|
@ProtoNumber(4) val notOnlineImage: NotOnlineImage? = null,
|
||||||
|
// @ProtoNumber(5) var transElemInfo: TransElem? = null,
|
||||||
|
@ProtoNumber(6) val marketFace: MarketFace? = null,
|
||||||
|
// @ProtoNumber(7) var elemFlags: ElemFlags? = null,
|
||||||
|
@ProtoNumber(8) val customFace: CustomFace? = null,
|
||||||
|
@ProtoNumber(9) var elemFlags2: ElemFlags2? = null,
|
||||||
|
// @ProtoNumber(10) var funFace: FunFace? = null,
|
||||||
|
// @ProtoNumber(11) var secretFile: SecretFileMsg? = null,
|
||||||
|
// @ProtoNumber(12) var richMsg: RichMsg? = null,
|
||||||
|
// @ProtoNumber(13) var groupFile: GroupFile? = null,
|
||||||
|
// @ProtoNumber(14) var pubGroup: PubGroup? = null,
|
||||||
|
// @ProtoNumber(15) var marketTrans: MarketTrans? = null,
|
||||||
|
// @ProtoNumber(16) var extraInfo: ExtraInfo? = null,
|
||||||
|
// @ProtoNumber(17) var shakeWindow: ShakeWindow? = null,
|
||||||
|
// @ProtoNumber(18) var pubAccount: PubAccount? = null,
|
||||||
|
// @ProtoNumber(19) var videoFile: VideoFile? = null,
|
||||||
|
// @ProtoNumber(20) var tipsInfo: TipsInfo? = null,
|
||||||
|
// @ProtoNumber(21) var anonGroupMsg: AnonymousGroupMsg? = null,
|
||||||
|
// @ProtoNumber(22) var qqLiveOld: QQLiveOld? = null,
|
||||||
|
// @ProtoNumber(23) var lifeOnline: LifeOnlineAccount? = null,
|
||||||
|
// @ProtoNumber(24) var qqwalletMsg: QQWalletMsg? = null,
|
||||||
|
// @ProtoNumber(25) var crmElem: CrmElem? = null,
|
||||||
|
// @ProtoNumber(26) var conferenceTipsInfo: ConferenceTipsInfo? = null,
|
||||||
|
// @ProtoNumber(27) var redbagInfo: RedBagInfo? = null,
|
||||||
|
// @ProtoNumber(28) var lowVersionTips: LowVersionTips? = null,
|
||||||
|
// @ProtoNumber(29) var bankcodeCtrlInfo: ByteArray? = null,
|
||||||
|
// @ProtoNumber(30) var nearByMsg: NearByMessageType? = null,
|
||||||
|
// @ProtoNumber(31) var customElem: CustomElem? = null,
|
||||||
|
// @ProtoNumber(32) var locationInfo: LocationInfo? = null,
|
||||||
|
// @ProtoNumber(33) var pubAccInfo: PubAccInfo? = null,
|
||||||
|
// @ProtoNumber(34) var smallEmoji: SmallEmoji? = null,
|
||||||
|
// @ProtoNumber(35) var fsjMsgElem: FSJMessageElem? = null,
|
||||||
|
// @ProtoNumber(36) var arkApp: ArkAppElem? = null,
|
||||||
|
@ProtoNumber(37) val generalFlags: GeneralFlags? = null,
|
||||||
|
// @ProtoNumber(38) var hcFlashPic: CustomFace? = null,
|
||||||
|
// @ProtoNumber(39) var deliverGiftMsg: DeliverGiftMsg? = null,
|
||||||
|
// @ProtoNumber(40) var bitapp_msg: BitAppMsg? = null,
|
||||||
|
// @ProtoNumber(41) var openQqData: OpenQQData? = null,
|
||||||
|
// @ProtoNumber(42) var apolloMsg: ApolloActMsg? = null,
|
||||||
|
// @ProtoNumber(43) var groupPubAccInfo: GroupPubAccountInfo? = null,
|
||||||
|
// @ProtoNumber(44) var blessMsg: BlessingMessage? = null,
|
||||||
|
@ProtoNumber(45) var srcMsg: SourceMsg? = null,
|
||||||
|
// @ProtoNumber(46) var lolaMsg: LolaMsg? = null,
|
||||||
|
// @ProtoNumber(47) var groupBusinessMsg: GroupBusinessMsg? = null,
|
||||||
|
// @ProtoNumber(48) var msgWorkflowNotify: WorkflowNotifyMsg? = null,
|
||||||
|
// @ProtoNumber(49) var patElem: PatsElem? = null,
|
||||||
|
// @ProtoNumber(50) var groupPostElem: GroupPostElem? = null,
|
||||||
|
@ProtoNumber(51) val lightApp: LightAppElem? = null,
|
||||||
|
// @ProtoNumber(52) var eimInfo: EIMInfo? = null,
|
||||||
|
@ProtoNumber(53) val commonElem: CommonElem? = null,
|
||||||
|
)
|
11
protobuf/src/main/java/protobuf/message/MsgBody.kt
Normal file
11
protobuf/src/main/java/protobuf/message/MsgBody.kt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class MsgBody(
|
||||||
|
@ProtoNumber(1) val richText: RichText? = null,
|
||||||
|
@ProtoNumber(2) val msgContent: ByteArray? = null,
|
||||||
|
@ProtoNumber(3) val msgEncryptContent: ByteArray? = null
|
||||||
|
)
|
9
protobuf/src/main/java/protobuf/message/MsgControl.kt
Normal file
9
protobuf/src/main/java/protobuf/message/MsgControl.kt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class MsgControl(
|
||||||
|
@ProtoNumber(1) val msgFlag: Int? = null,
|
||||||
|
)
|
28
protobuf/src/main/java/protobuf/message/NotOnlineFile.kt
Normal file
28
protobuf/src/main/java/protobuf/message/NotOnlineFile.kt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class NotOnlineFile(
|
||||||
|
@ProtoNumber(1) var fileType: UInt? = null,
|
||||||
|
@ProtoNumber(2) var sig: ByteArray? = null,
|
||||||
|
@ProtoNumber(3) var fileUuid: ByteArray? = null,
|
||||||
|
@ProtoNumber(4) var fileMd5: ByteArray? = null,
|
||||||
|
@ProtoNumber(5) var fileName: ByteArray? = null,
|
||||||
|
@ProtoNumber(6) var fileSize: ULong? = null,
|
||||||
|
@ProtoNumber(7) var note: ByteArray? = null,
|
||||||
|
@ProtoNumber(8) var reserved: UInt? = null,
|
||||||
|
@ProtoNumber(9) var subcmd: UInt? = null,
|
||||||
|
@ProtoNumber(10) var microCloud: UInt? = null,
|
||||||
|
@ProtoNumber(11) var rptFileUrls: List<String>? = null,
|
||||||
|
@ProtoNumber(12) var downloadFlag: UInt? = null,
|
||||||
|
@ProtoNumber(50) var dangerEvel: UInt? = null,
|
||||||
|
@ProtoNumber(51) var lifeTime: UInt? = null,
|
||||||
|
@ProtoNumber(52) var uploadTime: UInt? = null,
|
||||||
|
@ProtoNumber(53) var absFileType: UInt? = null,
|
||||||
|
@ProtoNumber(54) var clientType: UInt? = null,
|
||||||
|
@ProtoNumber(55) var expireTime: UInt? = null,
|
||||||
|
@ProtoNumber(56) var pbReserve: ByteArray? = null,
|
||||||
|
@ProtoNumber(57) var fileidcrcMedia: String? = null,
|
||||||
|
)
|
23
protobuf/src/main/java/protobuf/message/PbSendMsgReq.kt
Normal file
23
protobuf/src/main/java/protobuf/message/PbSendMsgReq.kt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import moe.fuqiuluo.symbols.Protobuf
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class PbSendMsgReq(
|
||||||
|
@ProtoNumber(1) val routingHead: RoutingHead? = null,
|
||||||
|
@ProtoNumber(2) val contentHead: ContentHead? = null,
|
||||||
|
@ProtoNumber(3) val msgBody: MsgBody? = null,
|
||||||
|
@ProtoNumber(4) val msgSeq: UInt? = null,
|
||||||
|
@ProtoNumber(5) val msgRand: UInt? = null,
|
||||||
|
@ProtoNumber(6) val syncCookie: ByteArray? = null,
|
||||||
|
@ProtoNumber(7) val appShare: AppShareInfo? = null,
|
||||||
|
@ProtoNumber(8) val msgVia: UInt? = null,
|
||||||
|
@ProtoNumber(9) val dataStatist: UInt? = null,
|
||||||
|
// @ProtoNumber(10) val multiMsgAssist: MultiMsgAssist? = null,
|
||||||
|
// @ProtoNumber(11) val inputNotifyInfo: InputNotifyInfo? = null,
|
||||||
|
@ProtoNumber(12) val ctrl: MsgControl? = null,
|
||||||
|
// @ProtoNumber(13) val receiptReq: ReceiptReq? = null,
|
||||||
|
@ProtoNumber(14) val multiSendSeq: UInt? = null
|
||||||
|
) : Protobuf<PbSendMsgReq>
|
40
protobuf/src/main/java/protobuf/message/Ptt.kt
Normal file
40
protobuf/src/main/java/protobuf/message/Ptt.kt
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Ptt(
|
||||||
|
@ProtoNumber(1) var fileType: UInt?=null,
|
||||||
|
@ProtoNumber(2) var srcUin: ULong?=null,
|
||||||
|
@ProtoNumber(3) var fileUuid: String?=null,
|
||||||
|
@ProtoNumber(4) var fileMd5: ByteArray?=null,
|
||||||
|
@ProtoNumber(5) var fileName: String?=null,
|
||||||
|
@ProtoNumber(6) var fileSize: UInt?=null,
|
||||||
|
@ProtoNumber(7) var reserve: ByteArray?=null,
|
||||||
|
@ProtoNumber(8) var fileId: UInt?=null,
|
||||||
|
@ProtoNumber(9) var serverIp: UInt?=null,
|
||||||
|
@ProtoNumber(10) var serverPort: UInt?=null,
|
||||||
|
@ProtoNumber(11) var boolValid: Boolean = false,
|
||||||
|
@ProtoNumber(12) var signature: ByteArray?=null,
|
||||||
|
@ProtoNumber(13) var shortcut: ByteArray?=null,
|
||||||
|
@ProtoNumber(14) var fileKey: ByteArray?=null,
|
||||||
|
@ProtoNumber(15) var magicPttIndex: UInt?=null,
|
||||||
|
@ProtoNumber(16) var voiceSwitch: UInt?=null,
|
||||||
|
@ProtoNumber(17) var pttUrl: ByteArray?=null,
|
||||||
|
@ProtoNumber(18) var groupFileKey: String?=null,
|
||||||
|
@ProtoNumber(19) var time: UInt?=null,
|
||||||
|
@ProtoNumber(20) var downPara: ByteArray?=null,
|
||||||
|
@ProtoNumber(29) var format: UInt?=null,
|
||||||
|
@ProtoNumber(30) var pbReserve: PbReserve?=null,
|
||||||
|
@ProtoNumber(31) var rptPttUrls: List<String>? = null,
|
||||||
|
@ProtoNumber(32) var downloadFlag: UInt?=null,
|
||||||
|
){
|
||||||
|
companion object{
|
||||||
|
@Serializable
|
||||||
|
data class PbReserve(
|
||||||
|
@ProtoNumber(2) var magic: Int?=null,
|
||||||
|
@ProtoNumber(7) var reserve: Int?=null,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
11
protobuf/src/main/java/protobuf/message/PushMsgBody.kt
Normal file
11
protobuf/src/main/java/protobuf/message/PushMsgBody.kt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class PushMsgBody(
|
||||||
|
@ProtoNumber(1) val msgHead: ResponseHead? = null,
|
||||||
|
@ProtoNumber(2) val contentHead: ContentHead? = null,
|
||||||
|
@ProtoNumber(3) val body: MsgBody? = null,
|
||||||
|
)
|
33
protobuf/src/main/java/protobuf/message/ResponseHead.kt
Normal file
33
protobuf/src/main/java/protobuf/message/ResponseHead.kt
Normal 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 ResponseHead(
|
||||||
|
@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: ResponseForward? = null,
|
||||||
|
@ProtoNumber(8) val responseGrp: ResponseGrp? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ResponseForward(
|
||||||
|
@ProtoNumber(6) val friendName: String? = null,
|
||||||
|
@ProtoNumber(11) val u1: Int? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ResponseGrp(
|
||||||
|
@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,
|
||||||
|
)
|
31
protobuf/src/main/java/protobuf/message/RichText.kt
Normal file
31
protobuf/src/main/java/protobuf/message/RichText.kt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
@file:OptIn(ExperimentalSerializationApi::class)
|
||||||
|
|
||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class RichText(
|
||||||
|
@ProtoNumber(1) val attr: Attr? = null,
|
||||||
|
@ProtoNumber(2) var elements: List<Elem>? = null,
|
||||||
|
@ProtoNumber(3) var not_online_file: NotOnlineFile? = null,
|
||||||
|
@ProtoNumber(4) var ptt: Ptt? = null,
|
||||||
|
@ProtoNumber(5) val tmp_ptt: TmpPtt? = null,
|
||||||
|
@ProtoNumber(6) val trans_211_tmp_msg: Trans211TmpMsg? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Attr(
|
||||||
|
@ProtoNumber(1) val codePage: Int? = null,
|
||||||
|
@ProtoNumber(2) val time: UInt? = null,
|
||||||
|
@ProtoNumber(3) val random: UInt? = null,
|
||||||
|
@ProtoNumber(4) val color: UInt? = null,
|
||||||
|
@ProtoNumber(5) val size: UInt? = null,
|
||||||
|
@ProtoNumber(6) val effect: UInt? = null,
|
||||||
|
@ProtoNumber(7) val charSet: UInt? = null,
|
||||||
|
@ProtoNumber(8) val pitchAndFamily: UInt? = null,
|
||||||
|
@ProtoNumber(9) val fontName: String? = null,
|
||||||
|
@ProtoNumber(10) val reserve_data: ByteArray? = null,
|
||||||
|
)
|
14
protobuf/src/main/java/protobuf/message/RoutingHead.kt
Normal file
14
protobuf/src/main/java/protobuf/message/RoutingHead.kt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import protobuf.message.routing.*
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class RoutingHead(
|
||||||
|
@ProtoNumber(1) val c2c: C2C? = null,
|
||||||
|
@ProtoNumber(2) val grp: Grp? = null,
|
||||||
|
@ProtoNumber(3) val grpTmp: GrpTmp? = null,
|
||||||
|
@ProtoNumber(6) val wpaTmp: WPATmp? = null,
|
||||||
|
@ProtoNumber(15) val trans0X211: Trans0X211? = null
|
||||||
|
)
|
20
protobuf/src/main/java/protobuf/message/TmpPtt.kt
Normal file
20
protobuf/src/main/java/protobuf/message/TmpPtt.kt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class TmpPtt(
|
||||||
|
@ProtoNumber(1) var fileType: UInt? = null,
|
||||||
|
@ProtoNumber(2) var fileUuid: ByteArray? = null,
|
||||||
|
@ProtoNumber(3) var fileMd5: ByteArray? = null,
|
||||||
|
@ProtoNumber(4) var fileName: ByteArray? = null,
|
||||||
|
@ProtoNumber(5) var fileSize: UInt? = null,
|
||||||
|
@ProtoNumber(6) var pttTimes: UInt? = null,
|
||||||
|
@ProtoNumber(7) var userType: UInt? = null,
|
||||||
|
@ProtoNumber(8) var ptttransFlag: UInt? = null,
|
||||||
|
@ProtoNumber(9) var busiType: UInt? = null,
|
||||||
|
@ProtoNumber(10) var msgId: ULong? = null,
|
||||||
|
@ProtoNumber(30) var pbReserve: ByteArray? = null,
|
||||||
|
@ProtoNumber(31) var pttEncodeData: ByteArray? = null,
|
||||||
|
)
|
10
protobuf/src/main/java/protobuf/message/Trans211TmpMsg.kt
Normal file
10
protobuf/src/main/java/protobuf/message/Trans211TmpMsg.kt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package protobuf.message
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Trans211TmpMsg(
|
||||||
|
@ProtoNumber(1) var msgBody: ByteArray? = null,
|
||||||
|
@ProtoNumber(2) var c2cCmd: UInt? = null,
|
||||||
|
)
|
@ -0,0 +1,11 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class CommonElem(
|
||||||
|
@ProtoNumber(1) val serviceType: Int? = null,
|
||||||
|
@ProtoNumber(2) val elem: ByteArray? = null,
|
||||||
|
@ProtoNumber(3) val businessType: Int? = null,
|
||||||
|
)
|
@ -0,0 +1,64 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class CustomFace(
|
||||||
|
@ProtoNumber(1) var guid: ByteArray? = null,
|
||||||
|
@ProtoNumber(2) var filePath: String? = null,
|
||||||
|
@ProtoNumber(3) var shortcut: String? = null,
|
||||||
|
@ProtoNumber(4) var buffer: ByteArray? = null,
|
||||||
|
@ProtoNumber(5) var flag: ByteArray? = null,
|
||||||
|
@ProtoNumber(6) var oldData: ByteArray? = null,
|
||||||
|
@ProtoNumber(7) var fileId: UInt? = null,
|
||||||
|
@ProtoNumber(8) var serverIp: UInt? = null,
|
||||||
|
@ProtoNumber(9) var serverPort: UInt? = null,
|
||||||
|
@ProtoNumber(10) var fileType: UInt? = null, // 66
|
||||||
|
@ProtoNumber(11) var signature: ByteArray? = null,
|
||||||
|
@ProtoNumber(12) var useful: UInt? = null,
|
||||||
|
@ProtoNumber(13) var md5: ByteArray? = null,
|
||||||
|
@ProtoNumber(14) var thumbUrl: String? = null,
|
||||||
|
@ProtoNumber(15) var bigUrl: String? = null,
|
||||||
|
@ProtoNumber(16) var origUrl: String? = null,
|
||||||
|
@ProtoNumber(17) var bizType: UInt? = null,
|
||||||
|
@ProtoNumber(18) var repeatIndex: UInt? = null,
|
||||||
|
@ProtoNumber(19) var repeatImage: UInt? = null,
|
||||||
|
@ProtoNumber(20) var imageType: UInt? = null,
|
||||||
|
@ProtoNumber(21) var index: UInt? = null,
|
||||||
|
@ProtoNumber(22) var width: UInt? = null,
|
||||||
|
@ProtoNumber(23) var height: UInt? = null,
|
||||||
|
@ProtoNumber(24) var source: UInt? = null,
|
||||||
|
@ProtoNumber(25) var size: UInt? = null,
|
||||||
|
@ProtoNumber(26) var origin: Boolean? = null,
|
||||||
|
@ProtoNumber(27) var thumbWidth: UInt? = null,
|
||||||
|
@ProtoNumber(28) var thumbHeight: UInt? = null,
|
||||||
|
@ProtoNumber(29) var showLen: UInt? = null,
|
||||||
|
@ProtoNumber(30) var downloadLen: UInt? = null,
|
||||||
|
@ProtoNumber(31) var url400: String? = null,
|
||||||
|
@ProtoNumber(32) var width400: UInt? = null,
|
||||||
|
@ProtoNumber(33) var height400: UInt? = null,
|
||||||
|
@ProtoNumber(34) var pbReserve: PbReserve? = null,
|
||||||
|
) {
|
||||||
|
companion object {
|
||||||
|
@Serializable
|
||||||
|
data class PbReserve(
|
||||||
|
@ProtoNumber(1) var field1: Int? = null,
|
||||||
|
@ProtoNumber(3) var field3: Int? = null,
|
||||||
|
@ProtoNumber(4) var field4: Int? = null,
|
||||||
|
@ProtoNumber(10) var field10: Int? = null,
|
||||||
|
@ProtoNumber(21) var field21: Object1? = null,
|
||||||
|
@ProtoNumber(31) var field31: String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Object1(
|
||||||
|
@ProtoNumber(1) var field1: Int? = null,
|
||||||
|
@ProtoNumber(2) var field2: String? = null,
|
||||||
|
@ProtoNumber(3) var field3: Int? = null,
|
||||||
|
@ProtoNumber(4) var field4: Int? = null,
|
||||||
|
@ProtoNumber(5) var field5: Int? = null,
|
||||||
|
@ProtoNumber(7) var md5Str: String? = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ElemFlags2(
|
||||||
|
@ProtoNumber(1) var color_text_id: UInt? = null,
|
||||||
|
@ProtoNumber(2) var msg_id: ULong? = null,
|
||||||
|
@ProtoNumber(3) var whisper_session_id: UInt? = null,
|
||||||
|
@ProtoNumber(4) var ptt_change_bit: UInt? = null,
|
||||||
|
@ProtoNumber(5) var vip_status: UInt? = null,
|
||||||
|
@ProtoNumber(6) var compatible_id: UInt? = null,
|
||||||
|
@ProtoNumber(7) var rpt_insts: List<Inst>? = null,
|
||||||
|
@ProtoNumber(8) var msg_rpt_cnt: UInt? = null,
|
||||||
|
@ProtoNumber(9) var src_inst: Inst? = null,
|
||||||
|
@ProtoNumber(10) var longtitude: UInt? = null,
|
||||||
|
@ProtoNumber(11) var latitude: UInt? = null,
|
||||||
|
@ProtoNumber(12) var custom_font: UInt? = null,
|
||||||
|
@ProtoNumber(13) var pc_support_def: PcSupportDef? = null,
|
||||||
|
@ProtoNumber(14) var crm_flags: UInt? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Inst(
|
||||||
|
@ProtoNumber(1) var app_id: UInt? = null,
|
||||||
|
@ProtoNumber(2) var inst_id: UInt? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class PcSupportDef(
|
||||||
|
@ProtoNumber(1) var pc_ptl_begin: UInt? = null,
|
||||||
|
@ProtoNumber(2) var pc_ptl_end: UInt? = null,
|
||||||
|
@ProtoNumber(3) var mac_ptl_begin: UInt? = null,
|
||||||
|
@ProtoNumber(4) var mac_ptl_end: UInt? = null,
|
||||||
|
@ProtoNumber(5) var rpt_ptls_support: List<Int>? = null,
|
||||||
|
@ProtoNumber(6) var rpt_ptls_not_support: List<Int>? = null,
|
||||||
|
)
|
12
protobuf/src/main/java/protobuf/message/element/FaceMsg.kt
Normal file
12
protobuf/src/main/java/protobuf/message/element/FaceMsg.kt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class FaceMsg(
|
||||||
|
@ProtoNumber(1) val index: Int? = null,
|
||||||
|
@ProtoNumber(2) var old: ByteArray? = null,
|
||||||
|
@ProtoNumber(11) var buf: ByteArray? = null,
|
||||||
|
|
||||||
|
)
|
@ -0,0 +1,28 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class GeneralFlags(
|
||||||
|
@ProtoNumber(1) val bubbleDiyTextId: UInt? = null,
|
||||||
|
@ProtoNumber(2) val groupFlagNew: UInt? = null,
|
||||||
|
@ProtoNumber(3) val uin: ULong? = null,
|
||||||
|
@ProtoNumber(4) val rpId: ByteArray? = null,
|
||||||
|
@ProtoNumber(5) val prpFold: UInt? = null,
|
||||||
|
@ProtoNumber(6) val longTextFlag: UInt? = null,
|
||||||
|
@ProtoNumber(7) val longTextResid: String? = null,
|
||||||
|
@ProtoNumber(8) val groupType: UInt? = null,
|
||||||
|
@ProtoNumber(9) val toUinFlag: UInt? = null,
|
||||||
|
@ProtoNumber(10) val glamourLevel: UInt? = null,
|
||||||
|
@ProtoNumber(11) val memberLevel: UInt? = null,
|
||||||
|
@ProtoNumber(12) val groupRankSeq: ULong? = null,
|
||||||
|
@ProtoNumber(13) val olympicTorch: UInt? = null,
|
||||||
|
@ProtoNumber(14) val babyqGuideMsgCookie: ByteArray? = null,
|
||||||
|
@ProtoNumber(15) val expertFlag: UInt? = null,
|
||||||
|
@ProtoNumber(16) val bubbleSubId: UInt? = null,
|
||||||
|
@ProtoNumber(17) val pendantId: ULong? = null,
|
||||||
|
@ProtoNumber(18) val rpIndex: ByteArray? = null,
|
||||||
|
@ProtoNumber(19) val reserve: ByteArray? = null,
|
||||||
|
)
|
@ -0,0 +1,9 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class LightAppElem(
|
||||||
|
@ProtoNumber(1) val data: ByteArray? = null,
|
||||||
|
)
|
@ -0,0 +1,21 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class MarketFace(
|
||||||
|
@ProtoNumber(1) var faceName: String? = null,
|
||||||
|
@ProtoNumber(2) var itemType: Int? = null,
|
||||||
|
@ProtoNumber(3) var faceInfo: Int? = null,
|
||||||
|
@ProtoNumber(4) var faceId: String? = null,
|
||||||
|
@ProtoNumber(5) var tabId: Int? = null,
|
||||||
|
@ProtoNumber(6) var subType: Int? = null,
|
||||||
|
@ProtoNumber(7) var key: ByteArray? = null,
|
||||||
|
@ProtoNumber(8) var param: ByteArray? = null,
|
||||||
|
@ProtoNumber(9) var mediaType: Int? = null,
|
||||||
|
@ProtoNumber(10) var imageWidth: Int? = null,
|
||||||
|
@ProtoNumber(11) var imageHeight: Int? = null,
|
||||||
|
@ProtoNumber(12) var mobileparam: ByteArray? = null,
|
||||||
|
@ProtoNumber(13) var pbReserve: ByteArray? = null,
|
||||||
|
)
|
@ -0,0 +1,61 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class NotOnlineImage(
|
||||||
|
@ProtoNumber(1) val filePath: String? = null,
|
||||||
|
@ProtoNumber(2) val fileLen: UInt? = null,
|
||||||
|
@ProtoNumber(3) val downloadPath: String? = null,
|
||||||
|
@ProtoNumber(4) val oldVerSendFile: ByteArray? = null,
|
||||||
|
@ProtoNumber(5) val imgType: UInt? = null,
|
||||||
|
@ProtoNumber(6) val previewsImage: ByteArray? = null,
|
||||||
|
@ProtoNumber(7) val picMd5: ByteArray? = null,
|
||||||
|
@ProtoNumber(8) val picHeight: UInt? = null,
|
||||||
|
@ProtoNumber(9) val picWidth: UInt? = null,
|
||||||
|
@ProtoNumber(10) val resId: String? = null, // md5 + ".jpg"
|
||||||
|
@ProtoNumber(11) val flag: ByteArray? = null,
|
||||||
|
@ProtoNumber(12) val thumbUrl: String? = null,
|
||||||
|
@ProtoNumber(13) val original: Boolean? = null,
|
||||||
|
@ProtoNumber(14) val bigUrl: String? = null,
|
||||||
|
@ProtoNumber(15) val origUrl: String? = null,
|
||||||
|
@ProtoNumber(16) val bizType: UInt? = null,
|
||||||
|
@ProtoNumber(17) val result: UInt? = null,
|
||||||
|
@ProtoNumber(18) val index: UInt? = null,
|
||||||
|
@ProtoNumber(19) val opFaceBuf: ByteArray? = null,
|
||||||
|
@ProtoNumber(20) val oldPicMd5: Boolean = false,
|
||||||
|
@ProtoNumber(21) val thumbWidth: UInt? = null,
|
||||||
|
@ProtoNumber(22) val thumbHeight: UInt? = null,
|
||||||
|
@ProtoNumber(23) val fileId: UInt? = null,
|
||||||
|
@ProtoNumber(24) val showLen: UInt? = null,
|
||||||
|
@ProtoNumber(25) val downloadLen: UInt? = null,
|
||||||
|
@ProtoNumber(26) val url400: String? = null,
|
||||||
|
@ProtoNumber(27) val width400: UInt? = null,
|
||||||
|
@ProtoNumber(28) val height400: UInt? = null,
|
||||||
|
@ProtoNumber(29) val pbReserve: PbReserve? = null,
|
||||||
|
) {
|
||||||
|
companion object {
|
||||||
|
@Serializable
|
||||||
|
data class PbReserve(
|
||||||
|
@ProtoNumber(1) var field1: Int? = null,
|
||||||
|
@ProtoNumber(3) var field3: Int? = null,
|
||||||
|
@ProtoNumber(4) var field4: Int? = null,
|
||||||
|
@ProtoNumber(8) var field8: String? = null,
|
||||||
|
@ProtoNumber(10) var field10: Int? = null,
|
||||||
|
@ProtoNumber(20) var field20: Object1? = null,
|
||||||
|
@ProtoNumber(30) var url: String? = null,
|
||||||
|
@ProtoNumber(31) var md5Str: String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Object1(
|
||||||
|
@ProtoNumber(1) var field1: Int? = null,
|
||||||
|
@ProtoNumber(2) var field2: String? = null,
|
||||||
|
@ProtoNumber(3) var field3: Int? = null,
|
||||||
|
@ProtoNumber(4) var field4: Int? = null,
|
||||||
|
@ProtoNumber(5) var field5: Int? = null,
|
||||||
|
@ProtoNumber(7) var field7: String? = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
30
protobuf/src/main/java/protobuf/message/element/SourceMsg.kt
Normal file
30
protobuf/src/main/java/protobuf/message/element/SourceMsg.kt
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import protobuf.message.Elem
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class SourceMsg(
|
||||||
|
@ProtoNumber(1) var origSeqs: List<Int>? = null,
|
||||||
|
@ProtoNumber(2) var senderUin: ULong? = null,
|
||||||
|
@ProtoNumber(3) var time: ULong? = null,
|
||||||
|
@ProtoNumber(4) var flag: UInt? = null,
|
||||||
|
@ProtoNumber(5) var elems: List<Elem>? = null,
|
||||||
|
@ProtoNumber(6) var type: UInt? = null,
|
||||||
|
@ProtoNumber(7) var richMsg: ByteArray? = null,
|
||||||
|
@ProtoNumber(8) var pbReserve: PbReserve? = null,
|
||||||
|
@ProtoNumber(9) var srcMsg: ByteArray? = null,
|
||||||
|
@ProtoNumber(10) var toUin: ULong? = null,
|
||||||
|
@ProtoNumber(11) var troopName: String? = null,
|
||||||
|
) {
|
||||||
|
companion object {
|
||||||
|
@Serializable
|
||||||
|
data class PbReserve(
|
||||||
|
@ProtoNumber(3) var msgRand: ULong? = null,
|
||||||
|
@ProtoNumber(6) var senderUid: String? = null,
|
||||||
|
@ProtoNumber(7) var receiverUid: String? = null,
|
||||||
|
@ProtoNumber(8) var field8: Int? = null,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
21
protobuf/src/main/java/protobuf/message/element/TextMsg.kt
Normal file
21
protobuf/src/main/java/protobuf/message/element/TextMsg.kt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package protobuf.message.element
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class TextMsg(
|
||||||
|
@ProtoNumber(1) val str: 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: PbReserve? = null,
|
||||||
|
){
|
||||||
|
companion object {
|
||||||
|
@Serializable
|
||||||
|
data class PbReserve(
|
||||||
|
@ProtoNumber(1) val field1: String? = null, // [打 call]] 请使用最新版手机 QQ 体验新功能
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package protobuf.message.element.commelem
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import moe.fuqiuluo.symbols.Protobuf
|
||||||
|
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ButtonExtra(
|
||||||
|
@ProtoNumber(1) val field1: Object1? = null,
|
||||||
|
) : Protobuf<ButtonExtra>
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Object1(
|
||||||
|
@ProtoNumber(1) val rows: List<Row>? = null,
|
||||||
|
@ProtoNumber(2) val appid: Int? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Row(
|
||||||
|
@ProtoNumber(1) val buttons: List<Button>? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Button(
|
||||||
|
@ProtoNumber(1) val id: String? = null,
|
||||||
|
@ProtoNumber(2) val renderData: RenderData? = null,
|
||||||
|
@ProtoNumber(3) val action: Action? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class RenderData(
|
||||||
|
@ProtoNumber(1) val label: String? = null,
|
||||||
|
@ProtoNumber(2) val visitedLabel: String? = null,
|
||||||
|
@ProtoNumber(3) val style: Int? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Action(
|
||||||
|
@ProtoNumber(1) val type: Int? = null,
|
||||||
|
@ProtoNumber(2) val permission: Permission? = null,
|
||||||
|
@ProtoNumber(4) val unsupportTips: String? = null,
|
||||||
|
@ProtoNumber(5) val data: String? = null,
|
||||||
|
@ProtoNumber(7) val reply: Boolean? = null,
|
||||||
|
@ProtoNumber(8) val enter: Boolean? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Permission(
|
||||||
|
@ProtoNumber(1) val type: Int? = null,
|
||||||
|
@ProtoNumber(2) val specifyRoleIds: List<String>? = null,
|
||||||
|
@ProtoNumber(3) val specifyUserIds: List<String>? = null,
|
||||||
|
)
|
@ -0,0 +1,10 @@
|
|||||||
|
package protobuf.message.element.commelem
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import moe.fuqiuluo.symbols.Protobuf
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class MarkdownExtra(
|
||||||
|
@ProtoNumber(1) val content: String? = null,
|
||||||
|
) : Protobuf<MarkdownExtra>
|
@ -0,0 +1,12 @@
|
|||||||
|
package protobuf.message.element.commelem
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import moe.fuqiuluo.symbols.Protobuf
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class PokeExtra(
|
||||||
|
@ProtoNumber(1) val type: Int? = null,
|
||||||
|
@ProtoNumber(7) val field7: Int? = null,
|
||||||
|
@ProtoNumber(8) val field8: Int? = null
|
||||||
|
) : Protobuf<PokeExtra>
|
@ -0,0 +1,17 @@
|
|||||||
|
package protobuf.message.element.commelem
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
import moe.fuqiuluo.symbols.Protobuf
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class QFaceExtra(
|
||||||
|
@ProtoNumber(1) val packId: String? = null,
|
||||||
|
@ProtoNumber(2) val stickerId: String? = null,
|
||||||
|
@ProtoNumber(3) val faceId: Int? = null,
|
||||||
|
@ProtoNumber(4) val field4: Int? = null,
|
||||||
|
@ProtoNumber(5) val field5: Int? = null,
|
||||||
|
@ProtoNumber(6) val result: String? = null,
|
||||||
|
@ProtoNumber(7) val faceText: String? = null,
|
||||||
|
@ProtoNumber(9) val field9: Int? = null
|
||||||
|
) : Protobuf<QFaceExtra>
|
63
protobuf/src/main/java/protobuf/message/longmsg/LongMsg.kt
Normal file
63
protobuf/src/main/java/protobuf/message/longmsg/LongMsg.kt
Normal 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: ULong? = 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,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
@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.PushMsgBody
|
||||||
|
|
||||||
|
@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>
|
@ -0,0 +1 @@
|
|||||||
|
package protobuf.message.multimedia
|
14
protobuf/src/main/java/protobuf/message/routing/C2C.kt
Normal file
14
protobuf/src/main/java/protobuf/message/routing/C2C.kt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package protobuf.message.routing
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class C2C(
|
||||||
|
@ProtoNumber(1) val uin: UInt? = null,
|
||||||
|
@ProtoNumber(2) val uid: String? = null,
|
||||||
|
@ProtoNumber(3) val field3: UInt? = null,
|
||||||
|
@ProtoNumber(4) val sig: UInt? = null,
|
||||||
|
@ProtoNumber(5) val receiverUin: UInt? = null,
|
||||||
|
@ProtoNumber(6) val receiverUid: String? = null
|
||||||
|
)
|
9
protobuf/src/main/java/protobuf/message/routing/Grp.kt
Normal file
9
protobuf/src/main/java/protobuf/message/routing/Grp.kt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package protobuf.message.routing
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Grp (
|
||||||
|
@ProtoNumber(1) var groupCode: UInt? = null,
|
||||||
|
)
|
10
protobuf/src/main/java/protobuf/message/routing/GrpTmp.kt
Normal file
10
protobuf/src/main/java/protobuf/message/routing/GrpTmp.kt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package protobuf.message.routing
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class GrpTmp (
|
||||||
|
@ProtoNumber(1) var groupCode: UInt? = null,
|
||||||
|
@ProtoNumber(2) var ToUin: UInt? = null,
|
||||||
|
)
|
@ -0,0 +1,11 @@
|
|||||||
|
package protobuf.message.routing
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Trans0X211(
|
||||||
|
@ProtoNumber(1) val toUin: ULong? = null,
|
||||||
|
@ProtoNumber(2) val ccCmd: UInt? = null,
|
||||||
|
@ProtoNumber(8) val uid: String? = null
|
||||||
|
)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user