Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
9b1f17b0
Commit
9b1f17b0
authored
Mar 03, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Specify JvmNames
parent
dc7d73f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
mirai-core-qqandroid/src/androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroid.kt
...androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroid.kt
+3
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/BotFactory.kt
...commonMain/kotlin/net/mamoe/mirai/qqandroid/BotFactory.kt
+4
-0
mirai-core-qqandroid/src/jvmMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroid.kt
...src/jvmMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroid.kt
+5
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt
...-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt
+4
-0
No files found.
mirai-core-qqandroid/src/androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroid.kt
View file @
9b1f17b0
...
@@ -19,8 +19,10 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
...
@@ -19,8 +19,10 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
/**
/**
* QQ for Android
* QQ for Android
*/
*/
@Suppress
(
"INAPPLICABLE_JVM_NAME"
)
actual
object
QQAndroid
:
BotFactory
{
actual
object
QQAndroid
:
BotFactory
{
@UseExperimental
(
MiraiInternalAPI
::
class
)
@UseExperimental
(
MiraiInternalAPI
::
class
)
@JvmName
(
"newBot"
)
actual
override
fun
Bot
(
context
:
Context
,
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
):
Bot
{
actual
override
fun
Bot
(
context
:
Context
,
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
):
Bot
{
return
QQAndroidBot
(
context
,
BotAccount
(
qq
,
password
),
configuration
)
return
QQAndroidBot
(
context
,
BotAccount
(
qq
,
password
),
configuration
)
}
}
...
@@ -29,6 +31,7 @@ actual object QQAndroid : BotFactory {
...
@@ -29,6 +31,7 @@ actual object QQAndroid : BotFactory {
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@UseExperimental
(
MiraiInternalAPI
::
class
)
@UseExperimental
(
MiraiInternalAPI
::
class
)
@JvmName
(
"newBot"
)
actual
override
fun
Bot
(
actual
override
fun
Bot
(
context
:
Context
,
context
:
Context
,
qq
:
Long
,
qq
:
Long
,
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/BotFactory.kt
View file @
9b1f17b0
...
@@ -14,20 +14,24 @@ import net.mamoe.mirai.BotFactory
...
@@ -14,20 +14,24 @@ import net.mamoe.mirai.BotFactory
import
net.mamoe.mirai.qqandroid.QQAndroid.Bot
import
net.mamoe.mirai.qqandroid.QQAndroid.Bot
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.Context
import
net.mamoe.mirai.utils.Context
import
kotlin.jvm.JvmName
/**
/**
* QQ for Android
* QQ for Android
*/
*/
@Suppress
(
"INAPPLICABLE_JVM_NAME"
)
expect
object
QQAndroid
:
BotFactory
{
expect
object
QQAndroid
:
BotFactory
{
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
override
fun
Bot
(
context
:
Context
,
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
):
Bot
override
fun
Bot
(
context
:
Context
,
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
):
Bot
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
override
fun
Bot
(
override
fun
Bot
(
context
:
Context
,
context
:
Context
,
qq
:
Long
,
qq
:
Long
,
...
...
mirai-core-qqandroid/src/jvmMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroid.kt
View file @
9b1f17b0
...
@@ -22,12 +22,14 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
...
@@ -22,12 +22,14 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
/**
/**
* QQ for Android
* QQ for Android
*/
*/
@Suppress
(
"INAPPLICABLE_JVM_NAME"
)
@UseExperimental
(
MiraiInternalAPI
::
class
)
@UseExperimental
(
MiraiInternalAPI
::
class
)
actual
object
QQAndroid
:
BotFactory
{
actual
object
QQAndroid
:
BotFactory
{
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
actual
override
fun
Bot
(
context
:
Context
,
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
):
Bot
{
actual
override
fun
Bot
(
context
:
Context
,
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
):
Bot
{
return
QQAndroidBot
(
context
,
BotAccount
(
qq
,
password
),
configuration
)
return
QQAndroidBot
(
context
,
BotAccount
(
qq
,
password
),
configuration
)
}
}
...
@@ -35,12 +37,14 @@ actual object QQAndroid : BotFactory {
...
@@ -35,12 +37,14 @@ actual object QQAndroid : BotFactory {
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
fun
Bot
(
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
=
BotConfiguration
.
Default
):
Bot
=
fun
Bot
(
qq
:
Long
,
password
:
String
,
configuration
:
BotConfiguration
=
BotConfiguration
.
Default
):
Bot
=
QQAndroidBot
(
BotAccount
(
qq
,
password
),
configuration
)
QQAndroidBot
(
BotAccount
(
qq
,
password
),
configuration
)
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
actual
override
fun
Bot
(
actual
override
fun
Bot
(
context
:
Context
,
context
:
Context
,
qq
:
Long
,
qq
:
Long
,
...
@@ -51,6 +55,7 @@ actual object QQAndroid : BotFactory {
...
@@ -51,6 +55,7 @@ actual object QQAndroid : BotFactory {
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
fun
Bot
(
fun
Bot
(
qq
:
Long
,
qq
:
Long
,
passwordMd5
:
ByteArray
,
passwordMd5
:
ByteArray
,
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotFactory.kt
View file @
9b1f17b0
...
@@ -13,6 +13,7 @@ package net.mamoe.mirai
...
@@ -13,6 +13,7 @@ package net.mamoe.mirai
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.Context
import
net.mamoe.mirai.utils.Context
import
kotlin.jvm.JvmName
/**
/**
* 构造 [Bot] 的工厂.
* 构造 [Bot] 的工厂.
...
@@ -21,10 +22,12 @@ import net.mamoe.mirai.utils.Context
...
@@ -21,10 +22,12 @@ import net.mamoe.mirai.utils.Context
* - `mirai-core-timpc`: `TIMPC`
* - `mirai-core-timpc`: `TIMPC`
* - `mirai-core-qqandroid`: `QQAndroid`
* - `mirai-core-qqandroid`: `QQAndroid`
*/
*/
@Suppress
(
"INAPPLICABLE_JVM_NAME"
)
interface
BotFactory
{
interface
BotFactory
{
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
fun
Bot
(
fun
Bot
(
context
:
Context
,
context
:
Context
,
qq
:
Long
,
qq
:
Long
,
...
@@ -35,6 +38,7 @@ interface BotFactory {
...
@@ -35,6 +38,7 @@ interface BotFactory {
/**
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
*/
@JvmName
(
"newBot"
)
fun
Bot
(
fun
Bot
(
context
:
Context
,
context
:
Context
,
qq
:
Long
,
qq
:
Long
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment