Skip to content
Snippets Groups Projects
Unverified Commit e47220b5 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

wip: TODO IN README

parent 63dd4625
Branches
No related tags found
No related merge requests found
Showing
with 185 additions and 171 deletions
...@@ -3,3 +3,11 @@ ...@@ -3,3 +3,11 @@
[![pipeline status](https://git.kuschku.de/justJanne/libquassel/badges/main/pipeline.svg)](https://git.kuschku.de/justJanne/libquassel/-/commits/main) [![coverage report](https://git.kuschku.de/justJanne/libquassel/badges/main/coverage.svg)](https://git.kuschku.de/justJanne/libquassel/-/commits/main) [![pipeline status](https://git.kuschku.de/justJanne/libquassel/badges/main/pipeline.svg)](https://git.kuschku.de/justJanne/libquassel/-/commits/main) [![coverage report](https://git.kuschku.de/justJanne/libquassel/badges/main/coverage.svg)](https://git.kuschku.de/justJanne/libquassel/-/commits/main)
libquassel is a pure kotlin implementation of the Quassel protocol. libquassel is a pure kotlin implementation of the Quassel protocol.
# TODO
- idea: separate db per account, no multi-tenancy or weird compound ids
- got alias persistence working. sync in transaction is awesome
- using dtos to convert from/to variantmap for update/requestUpdate seems like a good idea
- should be only busywork from here, right? :D
- good luck future janne ^^
...@@ -13,7 +13,9 @@ kotlinx-coroutines = "1.9.0" ...@@ -13,7 +13,9 @@ kotlinx-coroutines = "1.9.0"
kotlinx-serialization = "2.0.21" kotlinx-serialization = "2.0.21"
ktlint = "12.1.1" ktlint = "12.1.1"
nexus-publish = "2.0.0" nexus-publish = "2.0.0"
room = "2.7.0-alpha07"
slf4j = "1.7.30" slf4j = "1.7.30"
sqlite = "2.5.0-alpha07"
threetenbp = "1.7.0" threetenbp = "1.7.0"
[libraries] [libraries]
...@@ -36,6 +38,10 @@ junit-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref ...@@ -36,6 +38,10 @@ junit-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit"} junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit"}
junit-kotlin = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "kotlin"} junit-kotlin = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "kotlin"}
room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
sqlite = { module = "androidx.sqlite:sqlite-bundled", version.ref = "sqlite" }
nexus-publish-gradlePlugin = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexus-publish" } nexus-publish-gradlePlugin = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexus-publish" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
dokka-gradlePlugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" } dokka-gradlePlugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
......
...@@ -18,5 +18,5 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -18,5 +18,5 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("AliasManager", side = ProtocolSide.CORE) @RpcApi("AliasManager", side = ProtocolSide.CORE)
interface AliasManagerClientApi { interface AliasManagerClientApi {
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -11,8 +11,8 @@ package de.justjanne.libquassel.protocol.api.client ...@@ -11,8 +11,8 @@ package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.annotations.RpcCall import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.models.ids.BufferId import de.justjanne.libquassel.protocol.models.ids.BufferId
import de.justjanne.libquassel.protocol.models.ids.MsgId import de.justjanne.libquassel.protocol.models.ids.MsgId
import de.justjanne.libquassel.protocol.variant.QVariantList import de.justjanne.libquassel.protocol.variant.QVariantList
...@@ -24,7 +24,7 @@ interface BacklogManagerClientApi { ...@@ -24,7 +24,7 @@ interface BacklogManagerClientApi {
* [messages] contains the messages as `QVariant<Message>` * [messages] contains the messages as `QVariant<Message>`
*/ */
@RpcCall("receiveBacklog") @RpcCall("receiveBacklog")
fun receiveBacklog( suspend fun receiveBacklog(
@RpcParam.UserType.BufferId bufferId: BufferId, @RpcParam.UserType.BufferId bufferId: BufferId,
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1), @RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1), @RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
...@@ -38,7 +38,7 @@ interface BacklogManagerClientApi { ...@@ -38,7 +38,7 @@ interface BacklogManagerClientApi {
* [messages] contains the messages as `QVariant<Message>` * [messages] contains the messages as `QVariant<Message>`
*/ */
@RpcCall("receiveBacklogFiltered") @RpcCall("receiveBacklogFiltered")
fun receiveBacklogFiltered( suspend fun receiveBacklogFiltered(
@RpcParam.UserType.BufferId bufferId: BufferId, @RpcParam.UserType.BufferId bufferId: BufferId,
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1), @RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1), @RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
...@@ -54,7 +54,7 @@ interface BacklogManagerClientApi { ...@@ -54,7 +54,7 @@ interface BacklogManagerClientApi {
* [messages] contains the messages as `QVariant<Message>` * [messages] contains the messages as `QVariant<Message>`
*/ */
@RpcCall("receiveBacklogForward") @RpcCall("receiveBacklogForward")
fun receiveBacklogForward( suspend fun receiveBacklogForward(
@RpcParam.UserType.BufferId bufferId: BufferId, @RpcParam.UserType.BufferId bufferId: BufferId,
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1), @RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1), @RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
...@@ -69,7 +69,7 @@ interface BacklogManagerClientApi { ...@@ -69,7 +69,7 @@ interface BacklogManagerClientApi {
* [messages] contains the messages as `QVariant<Message>` * [messages] contains the messages as `QVariant<Message>`
*/ */
@RpcCall("receiveBacklogAll") @RpcCall("receiveBacklogAll")
fun receiveBacklogAll( suspend fun receiveBacklogAll(
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1), @RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1), @RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1, @RpcParam.Int limit: Int = -1,
...@@ -82,7 +82,7 @@ interface BacklogManagerClientApi { ...@@ -82,7 +82,7 @@ interface BacklogManagerClientApi {
* [messages] contains the messages as `QVariant<Message>` * [messages] contains the messages as `QVariant<Message>`
*/ */
@RpcCall("receiveBacklogAllFiltered") @RpcCall("receiveBacklogAllFiltered")
fun receiveBacklogAllFiltered( suspend fun receiveBacklogAllFiltered(
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1), @RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1), @RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1, @RpcParam.Int limit: Int = -1,
......
...@@ -20,29 +20,29 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -20,29 +20,29 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("BufferSyncer", side = ProtocolSide.CORE) @RpcApi("BufferSyncer", side = ProtocolSide.CORE)
interface BufferSyncerClientApi { interface BufferSyncerClientApi {
@RpcCall("markBufferAsRead") @RpcCall("markBufferAsRead")
fun markBufferAsRead( @RpcParam.UserType.BufferId buffer: BufferId) suspend fun markBufferAsRead( @RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("mergeBuffersPermanently") @RpcCall("mergeBuffersPermanently")
fun mergeBuffersPermanently(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.BufferId buffer2: BufferId) suspend fun mergeBuffersPermanently(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.BufferId buffer2: BufferId)
@RpcCall("removeBuffer") @RpcCall("removeBuffer")
fun removeBuffer(@RpcParam.UserType.BufferId buffer: BufferId) suspend fun removeBuffer(@RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("renameBuffer") @RpcCall("renameBuffer")
fun renameBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.QString newName: String) suspend fun renameBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.QString newName: String)
@RpcCall("setMarkerLine") @RpcCall("setMarkerLine")
fun setMarkerLine(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.MsgId msgId: MsgId) suspend fun setMarkerLine(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.MsgId msgId: MsgId)
@RpcCall("setLastSeenMsg") @RpcCall("setLastSeenMsg")
fun setLastSeenMsg(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.MsgId msgId: MsgId) suspend fun setLastSeenMsg(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.MsgId msgId: MsgId)
@RpcCall("setBufferActivity") @RpcCall("setBufferActivity")
fun setBufferActivity(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int types: Int) suspend fun setBufferActivity(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int types: Int)
@RpcCall("setHighlightCount") @RpcCall("setHighlightCount")
fun setHighlightCount(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int count: Int) suspend fun setHighlightCount(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int count: Int)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -21,47 +21,47 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -21,47 +21,47 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("BufferViewConfig", side = ProtocolSide.CORE) @RpcApi("BufferViewConfig", side = ProtocolSide.CORE)
interface BufferViewConfigClientApi { interface BufferViewConfigClientApi {
@RpcCall("addBuffer") @RpcCall("addBuffer")
fun addBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int pos: Int) suspend fun addBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int pos: Int)
@RpcCall("moveBuffer") @RpcCall("moveBuffer")
fun moveBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int pos: Int) suspend fun moveBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int pos: Int)
@RpcCall("removeBuffer") @RpcCall("removeBuffer")
fun removeBuffer(@RpcParam.UserType.BufferId buffer: BufferId) suspend fun removeBuffer(@RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("removeBufferPermanently") @RpcCall("removeBufferPermanently")
fun removeBufferPermanently(@RpcParam.UserType.BufferId buffer: BufferId) suspend fun removeBufferPermanently(@RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("setBufferViewName") @RpcCall("setBufferViewName")
fun setBufferViewName(@RpcParam.QString value: String) suspend fun setBufferViewName(@RpcParam.QString value: String)
@RpcCall("setAddNewBuffersAutomatically") @RpcCall("setAddNewBuffersAutomatically")
fun setAddNewBuffersAutomatically(@RpcParam.Bool value: Boolean) suspend fun setAddNewBuffersAutomatically(@RpcParam.Bool value: Boolean)
@RpcCall("setAllowedBufferTypes") @RpcCall("setAllowedBufferTypes")
fun setAllowedBufferTypes(@RpcParam.Int value: Int) suspend fun setAllowedBufferTypes(@RpcParam.Int value: Int)
@RpcCall("setDisableDecoration") @RpcCall("setDisableDecoration")
fun setDisableDecoration(@RpcParam.Bool value: Boolean) suspend fun setDisableDecoration(@RpcParam.Bool value: Boolean)
@RpcCall("setHideInactiveBuffers") @RpcCall("setHideInactiveBuffers")
fun setHideInactiveBuffers(@RpcParam.Bool value: Boolean) suspend fun setHideInactiveBuffers(@RpcParam.Bool value: Boolean)
@RpcCall("setHideInactiveNetworks") @RpcCall("setHideInactiveNetworks")
fun setHideInactiveNetworks(@RpcParam.Bool value: Boolean) suspend fun setHideInactiveNetworks(@RpcParam.Bool value: Boolean)
@RpcCall("setMinimumActivity") @RpcCall("setMinimumActivity")
fun setMinimumActivity(@RpcParam.Int value: Int) suspend fun setMinimumActivity(@RpcParam.Int value: Int)
@RpcCall("setNetworkId") @RpcCall("setNetworkId")
fun setNetworkId(@RpcParam.UserType.NetworkId value: NetworkId) suspend fun setNetworkId(@RpcParam.UserType.NetworkId value: NetworkId)
@RpcCall("setShowSearch") @RpcCall("setShowSearch")
fun setShowSearch(@RpcParam.Bool value: Boolean) suspend fun setShowSearch(@RpcParam.Bool value: Boolean)
@RpcCall("setSortAlphabetically") @RpcCall("setSortAlphabetically")
fun setSortAlphabetically(@RpcParam.Bool value: Boolean) suspend fun setSortAlphabetically(@RpcParam.Bool value: Boolean)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -18,11 +18,11 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -18,11 +18,11 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("BufferViewManager", side = ProtocolSide.CORE) @RpcApi("BufferViewManager", side = ProtocolSide.CORE)
interface BufferViewManagerClientApi { interface BufferViewManagerClientApi {
@RpcCall("addBufferViewConfig") @RpcCall("addBufferViewConfig")
fun addBufferViewConfig(@RpcParam.Int bufferViewConfigId: Int) suspend fun addBufferViewConfig(@RpcParam.Int bufferViewConfigId: Int)
@RpcCall("deleteBufferViewConfig") @RpcCall("deleteBufferViewConfig")
fun deleteBufferViewConfig(@RpcParam.Int bufferViewConfigId: Int) suspend fun deleteBufferViewConfig(@RpcParam.Int bufferViewConfigId: Int)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -20,11 +20,11 @@ import java.nio.ByteBuffer ...@@ -20,11 +20,11 @@ import java.nio.ByteBuffer
@RpcApi("CertManager", side = ProtocolSide.CORE) @RpcApi("CertManager", side = ProtocolSide.CORE)
interface CertManagerClientApi { interface CertManagerClientApi {
@RpcCall("setSslCert") @RpcCall("setSslCert")
fun setSslCert(objectName: ObjectName, @RpcParam.QByteArray encoded: ByteBuffer) suspend fun setSslCert(objectName: ObjectName, @RpcParam.QByteArray encoded: ByteBuffer)
@RpcCall("setSslKey") @RpcCall("setSslKey")
fun setSslKey(objectName: ObjectName, @RpcParam.QByteArray encoded: ByteBuffer) suspend fun setSslKey(objectName: ObjectName, @RpcParam.QByteArray encoded: ByteBuffer)
@RpcCall("update") @RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap) suspend fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -18,8 +18,8 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -18,8 +18,8 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("CoreInfo", side = ProtocolSide.CORE) @RpcApi("CoreInfo", side = ProtocolSide.CORE)
interface CoreInfoClientApi { interface CoreInfoClientApi {
@RpcCall("setCoreData") @RpcCall("setCoreData")
fun setCoreData(@RpcParam.QVariantMap data: QVariantMap) suspend fun setCoreData(@RpcParam.QVariantMap data: QVariantMap)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -19,13 +19,13 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -19,13 +19,13 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
interface HighlightRuleManagerClientApi { interface HighlightRuleManagerClientApi {
@RpcCall("removeHighlightRule") @RpcCall("removeHighlightRule")
fun removeHighlightRule(@RpcParam.Int highlightRule: Int) suspend fun removeHighlightRule(@RpcParam.Int highlightRule: Int)
@RpcCall("toggleHighlightRule") @RpcCall("toggleHighlightRule")
fun toggleHighlightRule(@RpcParam.Int highlightRule: Int) suspend fun toggleHighlightRule(@RpcParam.Int highlightRule: Int)
@RpcCall("addHighlightRule") @RpcCall("addHighlightRule")
fun addHighlightRule( suspend fun addHighlightRule(
@RpcParam.Int id: Int, @RpcParam.Int id: Int,
@RpcParam.QString content: String?, @RpcParam.QString content: String?,
@RpcParam.Bool isRegEx: Boolean, @RpcParam.Bool isRegEx: Boolean,
...@@ -37,11 +37,11 @@ interface HighlightRuleManagerClientApi { ...@@ -37,11 +37,11 @@ interface HighlightRuleManagerClientApi {
) )
@RpcCall("setHighlightNick") @RpcCall("setHighlightNick")
fun setHighlightNick(@RpcParam.Int highlightNick: Int) suspend fun setHighlightNick(@RpcParam.Int highlightNick: Int)
@RpcCall("setNicksCaseSensitive") @RpcCall("setNicksCaseSensitive")
fun setNicksCaseSensitive(@RpcParam.Bool nicksCaseSensitive: Boolean) suspend fun setNicksCaseSensitive(@RpcParam.Bool nicksCaseSensitive: Boolean)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -21,81 +21,81 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -21,81 +21,81 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("Identity", side = ProtocolSide.CORE) @RpcApi("Identity", side = ProtocolSide.CORE)
interface IdentityClientApi { interface IdentityClientApi {
@RpcCall("setAutoAwayEnabled") @RpcCall("setAutoAwayEnabled")
fun setAutoAwayEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean) suspend fun setAutoAwayEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setAutoAwayReason") @RpcCall("setAutoAwayReason")
fun setAutoAwayReason(objectName: ObjectName, @RpcParam.QString reason: String?) suspend fun setAutoAwayReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setAutoAwayReasonEnabled") @RpcCall("setAutoAwayReasonEnabled")
fun setAutoAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean) suspend fun setAutoAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setAutoAwayTime") @RpcCall("setAutoAwayTime")
fun setAutoAwayTime(objectName: ObjectName, @RpcParam.Int time: Int) suspend fun setAutoAwayTime(objectName: ObjectName, @RpcParam.Int time: Int)
@RpcCall("setAwayNick") @RpcCall("setAwayNick")
fun setAwayNick(objectName: ObjectName, @RpcParam.QString awayNick: String?) suspend fun setAwayNick(objectName: ObjectName, @RpcParam.QString awayNick: String?)
@RpcCall("setAwayNickEnabled") @RpcCall("setAwayNickEnabled")
fun setAwayNickEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean) suspend fun setAwayNickEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setAwayReason") @RpcCall("setAwayReason")
fun setAwayReason(objectName: ObjectName, @RpcParam.QString awayReason: String?) suspend fun setAwayReason(objectName: ObjectName, @RpcParam.QString awayReason: String?)
@RpcCall("setAwayReasonEnabled") @RpcCall("setAwayReasonEnabled")
fun setAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean) suspend fun setAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setDetachAwayEnabled") @RpcCall("setDetachAwayEnabled")
fun setDetachAwayEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean) suspend fun setDetachAwayEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setDetachAwayReason") @RpcCall("setDetachAwayReason")
fun setDetachAwayReason(objectName: ObjectName, @RpcParam.QString reason: String?) suspend fun setDetachAwayReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setDetachAwayReasonEnabled") @RpcCall("setDetachAwayReasonEnabled")
fun setDetachAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean) suspend fun setDetachAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setId") @RpcCall("setId")
fun setId(objectName: ObjectName, @RpcParam.UserType.IdentityId id: IdentityId) suspend fun setId(objectName: ObjectName, @RpcParam.UserType.IdentityId id: IdentityId)
@RpcCall("setIdent") @RpcCall("setIdent")
fun setIdent(objectName: ObjectName, @RpcParam.QString ident: String?) suspend fun setIdent(objectName: ObjectName, @RpcParam.QString ident: String?)
@RpcCall("setIdentityName") @RpcCall("setIdentityName")
fun setIdentityName(objectName: ObjectName, @RpcParam.QString name: String?) suspend fun setIdentityName(objectName: ObjectName, @RpcParam.QString name: String?)
@RpcCall("setKickReason") @RpcCall("setKickReason")
fun setKickReason(objectName: ObjectName, @RpcParam.QString reason: String?) suspend fun setKickReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setNicks") @RpcCall("setNicks")
fun setNicks(objectName: ObjectName, @RpcParam.QStringList nicks: QStringList) suspend fun setNicks(objectName: ObjectName, @RpcParam.QStringList nicks: QStringList)
@RpcCall("setPartReason") @RpcCall("setPartReason")
fun setPartReason(objectName: ObjectName, @RpcParam.QString reason: String?) suspend fun setPartReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setQuitReason") @RpcCall("setQuitReason")
fun setQuitReason(objectName: ObjectName, @RpcParam.QString reason: String?) suspend fun setQuitReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setRealName") @RpcCall("setRealName")
fun setRealName(objectName: ObjectName, @RpcParam.QString realName: String?) suspend fun setRealName(objectName: ObjectName, @RpcParam.QString realName: String?)
@RpcCall("update") @RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap) suspend fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -18,7 +18,7 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -18,7 +18,7 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("IgnoreListManager", side = ProtocolSide.CORE) @RpcApi("IgnoreListManager", side = ProtocolSide.CORE)
interface IgnoreListManagerClientApi { interface IgnoreListManagerClientApi {
@RpcCall("addIgnoreListItem") @RpcCall("addIgnoreListItem")
fun addIgnoreListItem( suspend fun addIgnoreListItem(
@RpcParam.Int type: Int, @RpcParam.Int type: Int,
@RpcParam.QString ignoreRule: String?, @RpcParam.QString ignoreRule: String?,
@RpcParam.Bool isRegEx: Boolean, @RpcParam.Bool isRegEx: Boolean,
...@@ -29,11 +29,11 @@ interface IgnoreListManagerClientApi { ...@@ -29,11 +29,11 @@ interface IgnoreListManagerClientApi {
) )
@RpcCall("removeIgnoreListItem") @RpcCall("removeIgnoreListItem")
fun removeIgnoreListItem(@RpcParam.QString ignoreRule: String?) suspend fun removeIgnoreListItem(@RpcParam.QString ignoreRule: String?)
@RpcCall("requestToggleIgnoreRule") @RpcCall("requestToggleIgnoreRule")
fun toggleIgnoreRule(@RpcParam.QString ignoreRule: String?) suspend fun toggleIgnoreRule(@RpcParam.QString ignoreRule: String?)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -20,45 +20,45 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -20,45 +20,45 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("IrcChannel", side = ProtocolSide.CORE) @RpcApi("IrcChannel", side = ProtocolSide.CORE)
interface IrcChannelClientApi { interface IrcChannelClientApi {
@RpcCall("addChannelMode") @RpcCall("addChannelMode")
fun addChannelMode( objectName: ObjectName, @RpcParam.QChar mode: Char, @RpcParam.QString value: String? = null) suspend fun addChannelMode( objectName: ObjectName, @RpcParam.QChar mode: Char, @RpcParam.QString value: String? = null)
@RpcCall("addUserMode") @RpcCall("addUserMode")
fun addUserMode(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString mode: String? = null) suspend fun addUserMode(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString mode: String? = null)
@RpcCall("joinIrcUsers") @RpcCall("joinIrcUsers")
fun joinIrcUsers(objectName: ObjectName, @RpcParam.QStringList nicks: QStringList, @RpcParam.QStringList modes: QStringList) suspend fun joinIrcUsers(objectName: ObjectName, @RpcParam.QStringList nicks: QStringList, @RpcParam.QStringList modes: QStringList)
@RpcCall("part") @RpcCall("part")
fun part(objectName: ObjectName, @RpcParam.QString nick: String) suspend fun part(objectName: ObjectName, @RpcParam.QString nick: String)
@RpcCall("removeChannelMode") @RpcCall("removeChannelMode")
fun removeChannelMode(objectName: ObjectName, @RpcParam.QChar mode: Char, @RpcParam.QString value: String? = null) suspend fun removeChannelMode(objectName: ObjectName, @RpcParam.QChar mode: Char, @RpcParam.QString value: String? = null)
@RpcCall("removeUserMode") @RpcCall("removeUserMode")
fun removeUserMode(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString mode: String? = null) suspend fun removeUserMode(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString mode: String? = null)
@RpcCall("setEncrypted") @RpcCall("setEncrypted")
fun setEncrypted(objectName: ObjectName, @RpcParam.Bool encrypted: Boolean) suspend fun setEncrypted(objectName: ObjectName, @RpcParam.Bool encrypted: Boolean)
@RpcCall("setPassword") @RpcCall("setPassword")
fun setPassword(objectName: ObjectName, @RpcParam.QString password: String) suspend fun setPassword(objectName: ObjectName, @RpcParam.QString password: String)
@RpcCall("setTopic") @RpcCall("setTopic")
fun setTopic(objectName: ObjectName, @RpcParam.QString topic: String) suspend fun setTopic(objectName: ObjectName, @RpcParam.QString topic: String)
@RpcCall("setUserModes") @RpcCall("setUserModes")
fun setUserModes(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString modes: String? = null) suspend fun setUserModes(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString modes: String? = null)
@RpcCall("update") @RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap) suspend fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -20,11 +20,11 @@ import de.justjanne.libquassel.protocol.variant.QVariantList ...@@ -20,11 +20,11 @@ import de.justjanne.libquassel.protocol.variant.QVariantList
@RpcApi("IrcListHelper", side = ProtocolSide.CORE) @RpcApi("IrcListHelper", side = ProtocolSide.CORE)
interface IrcListHelperClientApi { interface IrcListHelperClientApi {
@RpcCall("receiveChannelList") @RpcCall("receiveChannelList")
fun receiveChannelList(@RpcParam.UserType.NetworkId netId: NetworkId, @RpcParam.QStringList channelFilters: QStringList, @RpcParam.QVariantList channels: QVariantList) suspend fun receiveChannelList(@RpcParam.UserType.NetworkId netId: NetworkId, @RpcParam.QStringList channelFilters: QStringList, @RpcParam.QVariantList channels: QVariantList)
@RpcCall("reportError") @RpcCall("reportError")
fun reportError(@RpcParam.QString error: String?) suspend fun reportError(@RpcParam.QString error: String?)
@RpcCall("reportFinishedList") @RpcCall("reportFinishedList")
fun reportFinishedList(@RpcParam.UserType.NetworkId netId: NetworkId) suspend fun reportFinishedList(@RpcParam.UserType.NetworkId netId: NetworkId)
} }
...@@ -20,75 +20,75 @@ import org.threeten.bp.temporal.Temporal ...@@ -20,75 +20,75 @@ import org.threeten.bp.temporal.Temporal
@RpcApi("IrcUser", side = ProtocolSide.CORE) @RpcApi("IrcUser", side = ProtocolSide.CORE)
interface IrcUserClientApi { interface IrcUserClientApi {
@RpcCall("addUserModes") @RpcCall("addUserModes")
fun addUserModes(objectName: ObjectName, @RpcParam.QString modes: String) suspend fun addUserModes(objectName: ObjectName, @RpcParam.QString modes: String)
@RpcCall("joinChannel") @RpcCall("joinChannel")
fun joinChannel(objectName: ObjectName, @RpcParam.QString channelname: String) suspend fun joinChannel(objectName: ObjectName, @RpcParam.QString channelname: String)
@RpcCall("partChannel") @RpcCall("partChannel")
fun partChannel(objectName: ObjectName, @RpcParam.QString channelname: String) suspend fun partChannel(objectName: ObjectName, @RpcParam.QString channelname: String)
@RpcCall("quit") @RpcCall("quit")
fun quit(objectName: ObjectName) suspend fun quit(objectName: ObjectName)
@RpcCall("removeUserModes") @RpcCall("removeUserModes")
fun removeUserModes(objectName: ObjectName, @RpcParam.QString modes: String) suspend fun removeUserModes(objectName: ObjectName, @RpcParam.QString modes: String)
@RpcCall("setAccount") @RpcCall("setAccount")
fun setAccount(objectName: ObjectName, @RpcParam.QString account: String) suspend fun setAccount(objectName: ObjectName, @RpcParam.QString account: String)
@RpcCall("setAway") @RpcCall("setAway")
fun setAway(objectName: ObjectName, @RpcParam.Bool away: Boolean) suspend fun setAway(objectName: ObjectName, @RpcParam.Bool away: Boolean)
@RpcCall("setAwayMessage") @RpcCall("setAwayMessage")
fun setAwayMessage(objectName: ObjectName, @RpcParam.QString awayMessage: String) suspend fun setAwayMessage(objectName: ObjectName, @RpcParam.QString awayMessage: String)
@RpcCall("setEncrypted") @RpcCall("setEncrypted")
fun setEncrypted(objectName: ObjectName, @RpcParam.Bool encrypted: Boolean) suspend fun setEncrypted(objectName: ObjectName, @RpcParam.Bool encrypted: Boolean)
@RpcCall("setHost") @RpcCall("setHost")
fun setHost(objectName: ObjectName, @RpcParam.QString host: String) suspend fun setHost(objectName: ObjectName, @RpcParam.QString host: String)
@RpcCall("setIdleTime") @RpcCall("setIdleTime")
fun setIdleTime(objectName: ObjectName, @RpcParam.QDateTime idleTime: Temporal) suspend fun setIdleTime(objectName: ObjectName, @RpcParam.QDateTime idleTime: Temporal)
@RpcCall("setIrcOperator") @RpcCall("setIrcOperator")
fun setIrcOperator(objectName: ObjectName, @RpcParam.QString ircOperator: String) suspend fun setIrcOperator(objectName: ObjectName, @RpcParam.QString ircOperator: String)
@RpcCall("setLastAwayMessage") @RpcCall("setLastAwayMessage")
fun setLastAwayMessage(objectName: ObjectName, @RpcParam.Int lastAwayMessage: Int) suspend fun setLastAwayMessage(objectName: ObjectName, @RpcParam.Int lastAwayMessage: Int)
@RpcCall("setLastAwayMessageTime") @RpcCall("setLastAwayMessageTime")
fun setLastAwayMessageTime(objectName: ObjectName, @RpcParam.QDateTime lastAwayMessageTime: Temporal) suspend fun setLastAwayMessageTime(objectName: ObjectName, @RpcParam.QDateTime lastAwayMessageTime: Temporal)
@RpcCall("setLoginTime") @RpcCall("setLoginTime")
fun setLoginTime(objectName: ObjectName, @RpcParam.QDateTime loginTime: Temporal) suspend fun setLoginTime(objectName: ObjectName, @RpcParam.QDateTime loginTime: Temporal)
@RpcCall("setNick") @RpcCall("setNick")
fun setNick(objectName: ObjectName, @RpcParam.QString newNick: String) suspend fun setNick(objectName: ObjectName, @RpcParam.QString newNick: String)
@RpcCall("setRealName") @RpcCall("setRealName")
fun setRealName(objectName: ObjectName, @RpcParam.QString realName: String) suspend fun setRealName(objectName: ObjectName, @RpcParam.QString realName: String)
@RpcCall("setServer") @RpcCall("setServer")
fun setServer(objectName: ObjectName, @RpcParam.QString server: String) suspend fun setServer(objectName: ObjectName, @RpcParam.QString server: String)
@RpcCall("setSuserHost") @RpcCall("setSuserHost")
fun setSuserHost(objectName: ObjectName, @RpcParam.QString suserHost: String) suspend fun setSuserHost(objectName: ObjectName, @RpcParam.QString suserHost: String)
@RpcCall("setUser") @RpcCall("setUser")
fun setUser(objectName: ObjectName, @RpcParam.QString user: String) suspend fun setUser(objectName: ObjectName, @RpcParam.QString user: String)
@RpcCall("setUserModes") @RpcCall("setUserModes")
fun setUserModes(objectName: ObjectName, @RpcParam.QString modes: String) suspend fun setUserModes(objectName: ObjectName, @RpcParam.QString modes: String)
@RpcCall("setWhoisServiceReply") @RpcCall("setWhoisServiceReply")
fun setWhoisServiceReply(objectName: ObjectName, @RpcParam.QString whoisServiceReply: String) suspend fun setWhoisServiceReply(objectName: ObjectName, @RpcParam.QString whoisServiceReply: String)
@RpcCall("updateHostmask") @RpcCall("updateHostmask")
fun updateHostmask(objectName: ObjectName, @RpcParam.QString mask: String) suspend fun updateHostmask(objectName: ObjectName, @RpcParam.QString mask: String)
@RpcCall("update") @RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap) suspend fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -23,152 +23,152 @@ import java.nio.ByteBuffer ...@@ -23,152 +23,152 @@ import java.nio.ByteBuffer
@RpcApi("Network", side = ProtocolSide.CORE) @RpcApi("Network", side = ProtocolSide.CORE)
interface NetworkClientApi { interface NetworkClientApi {
@RpcCall("setNetworkName") @RpcCall("setNetworkName")
fun setNetworkName(objectName: ObjectName, @RpcParam.QString networkName: String) suspend fun setNetworkName(objectName: ObjectName, @RpcParam.QString networkName: String)
@RpcCall("setCurrentServer") @RpcCall("setCurrentServer")
fun setCurrentServer(objectName: ObjectName, @RpcParam.QString currentServer: String?) suspend fun setCurrentServer(objectName: ObjectName, @RpcParam.QString currentServer: String?)
@RpcCall("setMyNick") @RpcCall("setMyNick")
fun setMyNick(objectName: ObjectName, @RpcParam.QString myNick: String?) suspend fun setMyNick(objectName: ObjectName, @RpcParam.QString myNick: String?)
@RpcCall("setLatency") @RpcCall("setLatency")
fun setLatency(objectName: ObjectName, @RpcParam.Int latency: Int) suspend fun setLatency(objectName: ObjectName, @RpcParam.Int latency: Int)
@RpcCall("setCodecForServer") @RpcCall("setCodecForServer")
fun setCodecForServer(objectName: ObjectName, @RpcParam.QByteArray codecForServer: ByteBuffer) suspend fun setCodecForServer(objectName: ObjectName, @RpcParam.QByteArray codecForServer: ByteBuffer)
@RpcCall("setCodecForEncoding") @RpcCall("setCodecForEncoding")
fun setCodecForEncoding(objectName: ObjectName, @RpcParam.QByteArray codecForEncoding: ByteBuffer) suspend fun setCodecForEncoding(objectName: ObjectName, @RpcParam.QByteArray codecForEncoding: ByteBuffer)
@RpcCall("setCodecForDecoding") @RpcCall("setCodecForDecoding")
fun setCodecForDecoding(objectName: ObjectName, @RpcParam.QByteArray codecForDecoding: ByteBuffer) suspend fun setCodecForDecoding(objectName: ObjectName, @RpcParam.QByteArray codecForDecoding: ByteBuffer)
@RpcCall("setIdentity") @RpcCall("setIdentity")
fun setIdentity(objectName: ObjectName, @RpcParam.UserType.IdentityId identityId: IdentityId) suspend fun setIdentity(objectName: ObjectName, @RpcParam.UserType.IdentityId identityId: IdentityId)
@RpcCall("setConnected") @RpcCall("setConnected")
fun setConnected(objectName: ObjectName, @RpcParam.Bool isConnected: Boolean) suspend fun setConnected(objectName: ObjectName, @RpcParam.Bool isConnected: Boolean)
@RpcCall("setConnectionState") @RpcCall("setConnectionState")
fun setConnectionState(objectName: ObjectName, @RpcParam.Int connectionState: Int) suspend fun setConnectionState(objectName: ObjectName, @RpcParam.Int connectionState: Int)
@RpcCall("setUseRandomServer") @RpcCall("setUseRandomServer")
fun setUseRandomServer(objectName: ObjectName, @RpcParam.Bool useRandomServer: Boolean) suspend fun setUseRandomServer(objectName: ObjectName, @RpcParam.Bool useRandomServer: Boolean)
@RpcCall("setPerform") @RpcCall("setPerform")
fun setPerform(objectName: ObjectName, @RpcParam.QStringList perform: QStringList) suspend fun setPerform(objectName: ObjectName, @RpcParam.QStringList perform: QStringList)
@RpcCall("setSkipCaps") @RpcCall("setSkipCaps")
fun setSkipCaps(objectName: ObjectName, @RpcParam.QStringList skipCaps: QStringList) suspend fun setSkipCaps(objectName: ObjectName, @RpcParam.QStringList skipCaps: QStringList)
@RpcCall("setUseAutoIdentify") @RpcCall("setUseAutoIdentify")
fun setUseAutoIdentify(objectName: ObjectName, @RpcParam.Bool useAutoIdentify: Boolean) suspend fun setUseAutoIdentify(objectName: ObjectName, @RpcParam.Bool useAutoIdentify: Boolean)
@RpcCall("setAutoIdentifyService") @RpcCall("setAutoIdentifyService")
fun setAutoIdentifyService(objectName: ObjectName, @RpcParam.QString autoIdentifyService: String) suspend fun setAutoIdentifyService(objectName: ObjectName, @RpcParam.QString autoIdentifyService: String)
@RpcCall("setAutoIdentifyPassword") @RpcCall("setAutoIdentifyPassword")
fun setAutoIdentifyPassword(objectName: ObjectName, @RpcParam.QString autoIdentifyPassword: String) suspend fun setAutoIdentifyPassword(objectName: ObjectName, @RpcParam.QString autoIdentifyPassword: String)
@RpcCall("setUseSasl") @RpcCall("setUseSasl")
fun setUseSasl(objectName: ObjectName, @RpcParam.Bool useSasl: Boolean) suspend fun setUseSasl(objectName: ObjectName, @RpcParam.Bool useSasl: Boolean)
@RpcCall("setSaslAccount") @RpcCall("setSaslAccount")
fun setSaslAccount(objectName: ObjectName, @RpcParam.QString saslAccount: String) suspend fun setSaslAccount(objectName: ObjectName, @RpcParam.QString saslAccount: String)
@RpcCall("setSaslPassword") @RpcCall("setSaslPassword")
fun setSaslPassword(objectName: ObjectName, @RpcParam.QString saslPassword: String) suspend fun setSaslPassword(objectName: ObjectName, @RpcParam.QString saslPassword: String)
@RpcCall("setUseAutoReconnect") @RpcCall("setUseAutoReconnect")
fun setUseAutoReconnect(objectName: ObjectName, @RpcParam.Bool useAutoReconnect: Boolean) suspend fun setUseAutoReconnect(objectName: ObjectName, @RpcParam.Bool useAutoReconnect: Boolean)
@RpcCall("setAutoReconnectInterval") @RpcCall("setAutoReconnectInterval")
fun setAutoReconnectInterval(objectName: ObjectName, @RpcParam.UInt autoReconnectInterval: UInt) suspend fun setAutoReconnectInterval(objectName: ObjectName, @RpcParam.UInt autoReconnectInterval: UInt)
@RpcCall("setAutoReconnectRetries") @RpcCall("setAutoReconnectRetries")
fun setAutoReconnectRetries(objectName: ObjectName, @RpcParam.UShort autoReconnectRetries: UShort) suspend fun setAutoReconnectRetries(objectName: ObjectName, @RpcParam.UShort autoReconnectRetries: UShort)
@RpcCall("setUnlimitedReconnectRetries") @RpcCall("setUnlimitedReconnectRetries")
fun setUnlimitedReconnectRetries(objectName: ObjectName, @RpcParam.Bool unlimitedReconnectRetries: Boolean) suspend fun setUnlimitedReconnectRetries(objectName: ObjectName, @RpcParam.Bool unlimitedReconnectRetries: Boolean)
@RpcCall("setRejoinChannels") @RpcCall("setRejoinChannels")
fun setRejoinChannels(objectName: ObjectName, @RpcParam.Bool rejoinChannels: Boolean) suspend fun setRejoinChannels(objectName: ObjectName, @RpcParam.Bool rejoinChannels: Boolean)
@RpcCall("setUseCustomMessageRate") @RpcCall("setUseCustomMessageRate")
fun setUseCustomMessageRate(objectName: ObjectName, @RpcParam.Bool useCustomMessageRate: Boolean) suspend fun setUseCustomMessageRate(objectName: ObjectName, @RpcParam.Bool useCustomMessageRate: Boolean)
@RpcCall("setMessageRateBurstSize") @RpcCall("setMessageRateBurstSize")
fun setMessageRateBurstSize(objectName: ObjectName, @RpcParam.UInt messageRateBurstSize: UInt) suspend fun setMessageRateBurstSize(objectName: ObjectName, @RpcParam.UInt messageRateBurstSize: UInt)
@RpcCall("setMessageRateDelay") @RpcCall("setMessageRateDelay")
fun setMessageRateDelay(objectName: ObjectName, @RpcParam.UInt messageRateDelay: UInt) suspend fun setMessageRateDelay(objectName: ObjectName, @RpcParam.UInt messageRateDelay: UInt)
@RpcCall("setUnlimitedMessageRate") @RpcCall("setUnlimitedMessageRate")
fun setUnlimitedMessageRate(objectName: ObjectName, @RpcParam.Bool unlimitedMessageRate: Boolean) suspend fun setUnlimitedMessageRate(objectName: ObjectName, @RpcParam.Bool unlimitedMessageRate: Boolean)
@RpcCall("setServerList") @RpcCall("setServerList")
fun setServerList(objectName: ObjectName, @RpcParam.QVariantList serverList: QVariantList) suspend fun setServerList(objectName: ObjectName, @RpcParam.QVariantList serverList: QVariantList)
@RpcCall("addSupport") @RpcCall("addSupport")
fun addSupport(objectName: ObjectName, @RpcParam.QString param: String, @RpcParam.QString value: String = "") suspend fun addSupport(objectName: ObjectName, @RpcParam.QString param: String, @RpcParam.QString value: String = "")
@RpcCall("removeSupport") @RpcCall("removeSupport")
fun removeSupport(objectName: ObjectName, @RpcParam.QString param: String) suspend fun removeSupport(objectName: ObjectName, @RpcParam.QString param: String)
@RpcCall("addCap") @RpcCall("addCap")
fun addCap(objectName: ObjectName, @RpcParam.QString capability: String, @RpcParam.QString value: String = "") suspend fun addCap(objectName: ObjectName, @RpcParam.QString capability: String, @RpcParam.QString value: String = "")
@RpcCall("acknowledgeCap") @RpcCall("acknowledgeCap")
fun acknowledgeCap(objectName: ObjectName, @RpcParam.QString capability: String) suspend fun acknowledgeCap(objectName: ObjectName, @RpcParam.QString capability: String)
@RpcCall("removeCap") @RpcCall("removeCap")
fun removeCap(objectName: ObjectName, @RpcParam.QString capability: String) suspend fun removeCap(objectName: ObjectName, @RpcParam.QString capability: String)
@RpcCall("clearCaps") @RpcCall("clearCaps")
fun clearCaps(objectName: ObjectName) suspend fun clearCaps(objectName: ObjectName)
@RpcCall("addIrcUser") @RpcCall("addIrcUser")
fun addIrcUser(objectName: ObjectName, @RpcParam.QString hostmask: String) suspend fun addIrcUser(objectName: ObjectName, @RpcParam.QString hostmask: String)
@RpcCall("addIrcChannel") @RpcCall("addIrcChannel")
fun addIrcChannel(objectName: ObjectName, @RpcParam.QString channel: String) suspend fun addIrcChannel(objectName: ObjectName, @RpcParam.QString channel: String)
@RpcCall("update") @RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap) suspend fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -18,29 +18,29 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap ...@@ -18,29 +18,29 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("NetworkConfig", side = ProtocolSide.CORE) @RpcApi("NetworkConfig", side = ProtocolSide.CORE)
interface NetworkConfigClientApi { interface NetworkConfigClientApi {
@RpcCall("setAutoWhoDelay") @RpcCall("setAutoWhoDelay")
fun setAutoWhoDelay(@RpcParam.Int delay: Int) suspend fun setAutoWhoDelay(@RpcParam.Int delay: Int)
@RpcCall("setAutoWhoEnabled") @RpcCall("setAutoWhoEnabled")
fun setAutoWhoEnabled(@RpcParam.Bool enabled: Boolean) suspend fun setAutoWhoEnabled(@RpcParam.Bool enabled: Boolean)
@RpcCall("setAutoWhoInterval") @RpcCall("setAutoWhoInterval")
fun setAutoWhoInterval(@RpcParam.Int interval: Int) suspend fun setAutoWhoInterval(@RpcParam.Int interval: Int)
@RpcCall("setAutoWhoNickLimit") @RpcCall("setAutoWhoNickLimit")
fun setAutoWhoNickLimit(@RpcParam.Int limit: Int) suspend fun setAutoWhoNickLimit(@RpcParam.Int limit: Int)
@RpcCall("setMaxPingCount") @RpcCall("setMaxPingCount")
fun setMaxPingCount(@RpcParam.Int count: Int) suspend fun setMaxPingCount(@RpcParam.Int count: Int)
@RpcCall("setPingInterval") @RpcCall("setPingInterval")
fun setPingInterval(@RpcParam.Int interval: Int) suspend fun setPingInterval(@RpcParam.Int interval: Int)
@RpcCall("setPingTimeoutEnabled") @RpcCall("setPingTimeoutEnabled")
fun setPingTimeoutEnabled(@RpcParam.Bool enabled: Boolean) suspend fun setPingTimeoutEnabled(@RpcParam.Bool enabled: Boolean)
@RpcCall("setStandardCtcp") @RpcCall("setStandardCtcp")
fun setStandardCtcp(@RpcParam.Bool enabled: Boolean) suspend fun setStandardCtcp(@RpcParam.Bool enabled: Boolean)
@RpcCall("update") @RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap) suspend fun update(@RpcParam.QVariantMap properties: QVariantMap)
} }
...@@ -23,32 +23,32 @@ import java.nio.ByteBuffer ...@@ -23,32 +23,32 @@ import java.nio.ByteBuffer
@RpcApi(side = ProtocolSide.CORE) @RpcApi(side = ProtocolSide.CORE)
interface RpcClientApi { interface RpcClientApi {
@RpcCall("__objectRenamed__") @RpcCall("__objectRenamed__")
fun objectRenamed(@RpcParam.QByteArray classname: ByteBuffer, @RpcParam.QString newName: String?, @RpcParam.QString oldName: String?) suspend fun objectRenamed(@RpcParam.QByteArray classname: ByteBuffer, @RpcParam.QString newName: String?, @RpcParam.QString oldName: String?)
@RpcCall("2displayMsg(Message)") @RpcCall("2displayMsg(Message)")
fun displayMsg(@RpcParam.UserType.Message message: Message) suspend fun displayMsg(@RpcParam.UserType.Message message: Message)
@RpcCall("2displayStatusMsg(QString,QString)") @RpcCall("2displayStatusMsg(QString,QString)")
fun displayStatusMsg(@RpcParam.QString net: String?, @RpcParam.QString msg: String?) suspend fun displayStatusMsg(@RpcParam.QString net: String?, @RpcParam.QString msg: String?)
@RpcCall("2bufferInfoUpdated(BufferInfo)") @RpcCall("2bufferInfoUpdated(BufferInfo)")
fun bufferInfoUpdated(@RpcParam.UserType.BufferInfo bufferInfo: BufferInfo) suspend fun bufferInfoUpdated(@RpcParam.UserType.BufferInfo bufferInfo: BufferInfo)
@RpcCall("2identityCreated(Identity)") @RpcCall("2identityCreated(Identity)")
fun identityCreated(@RpcParam.QVariantMap identity: QVariantMap) suspend fun identityCreated(@RpcParam.QVariantMap identity: QVariantMap)
@RpcCall("2identityRemoved(IdentityId)") @RpcCall("2identityRemoved(IdentityId)")
fun identityRemoved(@RpcParam.UserType.IdentityId identityId: IdentityId) suspend fun identityRemoved(@RpcParam.UserType.IdentityId identityId: IdentityId)
@RpcCall("2networkCreated(NetworkId)") @RpcCall("2networkCreated(NetworkId)")
fun networkCreated(@RpcParam.UserType.NetworkId networkId: NetworkId) suspend fun networkCreated(@RpcParam.UserType.NetworkId networkId: NetworkId)
@RpcCall("2networkRemoved(NetworkId)") @RpcCall("2networkRemoved(NetworkId)")
fun networkRemoved(@RpcParam.UserType.NetworkId networkId: NetworkId) suspend fun networkRemoved(@RpcParam.UserType.NetworkId networkId: NetworkId)
@RpcCall("2passwordChanged(PeerPtr,bool)") @RpcCall("2passwordChanged(PeerPtr,bool)")
fun passwordChanged(@RpcParam.UserType.PeerPtr peer: ULong, @RpcParam.Bool success: Boolean) suspend fun passwordChanged(@RpcParam.UserType.PeerPtr peer: ULong, @RpcParam.Bool success: Boolean)
@RpcCall("2disconnectFromCore()") @RpcCall("2disconnectFromCore()")
fun disconnectFromCore() suspend fun disconnectFromCore()
} }
...@@ -14,5 +14,5 @@ import de.justjanne.libquassel.protocol.variant.QVariantList ...@@ -14,5 +14,5 @@ import de.justjanne.libquassel.protocol.variant.QVariantList
interface RpcDispatcher { interface RpcDispatcher {
@Throws(RpcInvocationFailedException::class) @Throws(RpcInvocationFailedException::class)
fun invoke(method: String, params: QVariantList) suspend fun invoke(method: String, params: QVariantList)
} }
...@@ -15,5 +15,5 @@ import de.justjanne.libquassel.protocol.variant.QVariantList ...@@ -15,5 +15,5 @@ import de.justjanne.libquassel.protocol.variant.QVariantList
interface SyncDispatcher { interface SyncDispatcher {
@Throws(RpcInvocationFailedException::class) @Throws(RpcInvocationFailedException::class)
fun invoke(objectName: ObjectName, method: String, params: QVariantList) suspend fun invoke(objectName: ObjectName, method: String, params: QVariantList)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment