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
4d0ac137
Commit
4d0ac137
authored
Nov 16, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unresolved functions
parent
5983ba4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
24 deletions
+19
-24
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/protocol/tim/packet/event/MessagePacket.kt
.../mirai/network/protocol/tim/packet/event/MessagePacket.kt
+19
-24
No files found.
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/protocol/tim/packet/event/MessagePacket.kt
View file @
4d0ac137
package
net.mamoe.mirai.network.protocol.tim.packet.event
package
net.mamoe.mirai.network.protocol.tim.packet.event
import
kotlinx.io.core.Input
import
net.mamoe.mirai.contact.Contact
import
net.mamoe.mirai.contact.Contact
import
net.mamoe.mirai.message.*
import
net.mamoe.mirai.utils.InternalAPI
import
net.mamoe.mirai.utils.InternalAPI
import
java.io.File
import
java.io.InputStream
import
java.net.URL
/**
/**
* 平台相关扩展
* 平台相关扩展
...
@@ -14,26 +9,26 @@ import java.net.URL
...
@@ -14,26 +9,26 @@ import java.net.URL
@UseExperimental
(
InternalAPI
::
class
)
@UseExperimental
(
InternalAPI
::
class
)
actual
abstract
class
MessagePacket
<
TSubject
:
Contact
>
:
MessagePacketBase
<
TSubject
>()
{
actual
abstract
class
MessagePacket
<
TSubject
:
Contact
>
:
MessagePacketBase
<
TSubject
>()
{
// suspend inline fun uploadImage(image: Bitmap): Image = subject.uploadImage(image)
// suspend inline fun uploadImage(image: Bitmap): Image = subject.uploadImage(image)
suspend
inline
fun
uploadImage
(
image
:
URL
):
Image
=
subject
.
uploadImage
(
image
)
//
suspend inline fun uploadImage(image: URL): Image = subject.uploadImage(image)
suspend
inline
fun
uploadImage
(
image
:
Input
):
Image
=
subject
.
uploadImage
(
image
)
//
suspend inline fun uploadImage(image: Input): Image = subject.uploadImage(image)
suspend
inline
fun
uploadImage
(
image
:
InputStream
):
Image
=
subject
.
uploadImage
(
image
)
//
suspend inline fun uploadImage(image: InputStream): Image = subject.uploadImage(image)
suspend
inline
fun
uploadImage
(
image
:
File
):
Image
=
subject
.
uploadImage
(
image
)
//
suspend inline fun uploadImage(image: File): Image = subject.uploadImage(image)
// suspend inline fun sendImage(image: Bitmap) = subject.sendImage(image)
//
//
suspend inline fun sendImage(image: Bitmap) = subject.sendImage(image)
suspend
inline
fun
sendImage
(
image
:
URL
)
=
subject
.
sendImage
(
image
)
//
suspend inline fun sendImage(image: URL) = subject.sendImage(image)
suspend
inline
fun
sendImage
(
image
:
Input
)
=
subject
.
sendImage
(
image
)
//
suspend inline fun sendImage(image: Input) = subject.sendImage(image)
suspend
inline
fun
sendImage
(
image
:
InputStream
)
=
subject
.
sendImage
(
image
)
//
suspend inline fun sendImage(image: InputStream) = subject.sendImage(image)
suspend
inline
fun
sendImage
(
image
:
File
)
=
subject
.
sendImage
(
image
)
//
suspend inline fun sendImage(image: File) = subject.sendImage(image)
// suspend inline fun Bitmap.upload(): Image = upload(subject)
//
//
suspend inline fun Bitmap.upload(): Image = upload(subject)
suspend
inline
fun
URL
.
uploadAsImage
():
Image
=
uploadAsImage
(
subject
)
//
suspend inline fun URL.uploadAsImage(): Image = uploadAsImage(subject)
suspend
inline
fun
Input
.
uploadAsImage
():
Image
=
uploadAsImage
(
subject
)
//
suspend inline fun Input.uploadAsImage(): Image = uploadAsImage(subject)
suspend
inline
fun
InputStream
.
uploadAsImage
():
Image
=
uploadAsImage
(
subject
)
//
suspend inline fun InputStream.uploadAsImage(): Image = uploadAsImage(subject)
suspend
inline
fun
File
.
uploadAsImage
():
Image
=
uploadAsImage
(
subject
)
//
suspend inline fun File.uploadAsImage(): Image = uploadAsImage(subject)
// suspend inline fun Bitmap.send() = sendTo(subject)
//
//
suspend inline fun Bitmap.send() = sendTo(subject)
suspend
inline
fun
URL
.
sendAsImage
()
=
sendAsImageTo
(
subject
)
//
suspend inline fun URL.sendAsImage() = sendAsImageTo(subject)
suspend
inline
fun
Input
.
sendAsImage
()
=
sendAsImageTo
(
subject
)
//
suspend inline fun Input.sendAsImage() = sendAsImageTo(subject)
suspend
inline
fun
InputStream
.
sendAsImage
()
=
sendAsImageTo
(
subject
)
//
suspend inline fun InputStream.sendAsImage() = sendAsImageTo(subject)
suspend
inline
fun
File
.
sendAsImage
()
=
sendAsImageTo
(
subject
)
//
suspend inline fun File.sendAsImage() = sendAsImageTo(subject)
}
}
\ No newline at end of file
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