mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-31 11:30:16 +08:00
Fix return types
This commit is contained in:
parent
b7fa7adf99
commit
e479da9898
@ -58,13 +58,13 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(EventCancelledException::class, IllegalStateException::class)
|
||||
@JvmName("sendMessage")
|
||||
open fun __sendMessageBlockingForJava__(message: Message) {
|
||||
runBlocking { sendMessage(message) }
|
||||
open fun __sendMessageBlockingForJava__(message: Message): MessageReceipt<Contact> {
|
||||
return runBlocking { sendMessage(message) }
|
||||
}
|
||||
|
||||
@JvmName("sendMessage")
|
||||
open fun __sendMessageBlockingForJava__(message: String) {
|
||||
runBlocking { sendMessage(message) }
|
||||
open fun __sendMessageBlockingForJava__(message: String): MessageReceipt<Contact> {
|
||||
return runBlocking { sendMessage(message) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,8 +78,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: ExternalImage) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: ExternalImage): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,8 +88,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: URL) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: URL): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,8 +98,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: InputStream) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: InputStream): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,8 +108,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: Input) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: Input): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,8 +118,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: File) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: File): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,8 +128,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: Bitmap) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: Bitmap): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,8 +236,8 @@ actual abstract class MemberJavaHappyAPI : QQ() {
|
||||
* @throws PermissionDeniedException 无权限修改时
|
||||
*/
|
||||
@JvmName("mute")
|
||||
open fun __muteBlockingForJava__(durationSeconds: Int) {
|
||||
runBlocking { mute(durationSeconds) }
|
||||
open fun __muteBlockingForJava__(seconds: Int) {
|
||||
return runBlocking { mute(seconds) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -250,7 +250,7 @@ actual abstract class MemberJavaHappyAPI : QQ() {
|
||||
*/
|
||||
@JvmName("unmute")
|
||||
open fun __unmuteBlockingForJava__() {
|
||||
runBlocking { unmute() }
|
||||
return runBlocking { unmute() }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -263,7 +263,7 @@ actual abstract class MemberJavaHappyAPI : QQ() {
|
||||
*/
|
||||
@JvmName("kick")
|
||||
open fun __kickBlockingForJava__(message: String) {
|
||||
runBlocking { kick() }
|
||||
return runBlocking { kick() }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -297,8 +297,8 @@ actual abstract class MemberJavaHappyAPI : QQ() {
|
||||
* @throws PermissionDeniedException 无权限修改时
|
||||
*/
|
||||
@JvmName("muteAsync")
|
||||
open fun __muteAsyncForJava__(durationSeconds: Int): Future<Unit> {
|
||||
return future { mute(durationSeconds) }
|
||||
open fun __muteAsyncForJava__(seconds: Int): Future<Unit> {
|
||||
return future { mute(seconds) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,13 +58,13 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(EventCancelledException::class, IllegalStateException::class)
|
||||
@JvmName("sendMessage")
|
||||
open fun __sendMessageBlockingForJava__(message: Message) {
|
||||
runBlocking { sendMessage(message) }
|
||||
open fun __sendMessageBlockingForJava__(message: Message): MessageReceipt<Contact> {
|
||||
return runBlocking { sendMessage(message) }
|
||||
}
|
||||
|
||||
@JvmName("sendMessage")
|
||||
open fun __sendMessageBlockingForJava__(message: String) {
|
||||
runBlocking { sendMessage(message) }
|
||||
open fun __sendMessageBlockingForJava__(message: String): MessageReceipt<Contact> {
|
||||
return runBlocking { sendMessage(message) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,8 +78,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: ExternalImage) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: ExternalImage): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,8 +88,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: URL) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: URL): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,8 +98,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: InputStream) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: InputStream): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,8 +108,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: Input) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: Input): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,8 +118,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: File) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: File): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,8 +128,8 @@ actual abstract class ContactJavaHappyAPI {
|
||||
*/
|
||||
@Throws(OverFileSizeMaxException::class)
|
||||
@JvmName("uploadImage")
|
||||
open fun __uploadImageBlockingForJava__(image: BufferedImage) {
|
||||
runBlocking { uploadImage(image) }
|
||||
open fun __uploadImageBlockingForJava__(image: BufferedImage): Image {
|
||||
return runBlocking { uploadImage(image) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user