Commit c4b42a31 authored by Him188's avatar Him188

Rearrange class memebrs

parent 146615e6
...@@ -54,37 +54,7 @@ interface Bot : CoroutineScope { ...@@ -54,37 +54,7 @@ interface Bot : CoroutineScope {
override val coroutineContext: CoroutineContext override val coroutineContext: CoroutineContext
/** // region contacts
* 网络模块
*/
val network: BotNetworkHandler<*>
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
fun tryReinitializeNetworkHandler(
configuration: BotConfiguration,
cause: Throwable? = null
): Job
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
suspend fun reinitializeNetworkHandler(
configuration: BotConfiguration,
cause: Throwable? = null
): LoginResult
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
fun reinitializeNetworkHandlerAsync(
configuration: BotConfiguration,
cause: Throwable? = null
): Deferred<LoginResult>
/** /**
* 与这个机器人相关的 QQ 列表. 机器人与 QQ 不一定是好友 * 与这个机器人相关的 QQ 列表. 机器人与 QQ 不一定是好友
...@@ -124,5 +94,43 @@ interface Bot : CoroutineScope { ...@@ -124,5 +94,43 @@ interface Bot : CoroutineScope {
*/ */
suspend fun getGroup(id: Long): Group suspend fun getGroup(id: Long): Group
// endregion
// region network
/**
* 网络模块
*/
val network: BotNetworkHandler<*>
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
fun tryReinitializeNetworkHandler(
configuration: BotConfiguration,
cause: Throwable? = null
): Job
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
suspend fun reinitializeNetworkHandler(
configuration: BotConfiguration,
cause: Throwable? = null
): LoginResult
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
fun reinitializeNetworkHandlerAsync(
configuration: BotConfiguration,
cause: Throwable? = null
): Deferred<LoginResult>
// endregion
fun close() fun close()
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment