Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • justJanne/libquassel
1 result
Show changes
Showing
with 1043 additions and 7 deletions
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.protocol.models.ids.BufferId
import de.justjanne.libquassel.protocol.models.ids.MsgId
import de.justjanne.libquassel.protocol.variant.QVariantList
@RpcApi("BacklogManager", side = ProtocolSide.CORE)
interface BacklogManagerClientApi {
/**
* Response to the corresponding [requestBacklog] call.
* [messages] contains the messages as `QVariant<Message>`
*/
@RpcCall("receiveBacklog")
fun receiveBacklog(
@RpcParam.UserType.BufferId bufferId: BufferId,
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1,
@RpcParam.Int additional: Int = 0,
@RpcParam.QVariantList messages: QVariantList
)
/**
* Response to the corresponding [requestBacklogFiltered] call.
* [messages] contains the messages as `QVariant<Message>`
*/
@RpcCall("receiveBacklogFiltered")
fun receiveBacklogFiltered(
@RpcParam.UserType.BufferId bufferId: BufferId,
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1,
@RpcParam.Int additional: Int = 0,
@RpcParam.Int type: Int = -1,
@RpcParam.Int flags: Int = -1,
@RpcParam.QVariantList messages: QVariantList
)
/**
* Response to the corresponding [requestBacklogForward] call.
* [messages] contains the messages as `QVariant<Message>`
*/
@RpcCall("receiveBacklogForward")
fun receiveBacklogForward(
@RpcParam.UserType.BufferId bufferId: BufferId,
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1,
@RpcParam.Int type: Int = -1,
@RpcParam.Int flags: Int = -1,
@RpcParam.QVariantList messages: QVariantList
)
/**
* Response to the corresponding [requestBacklogAll] call.
* [messages] contains the messages as `QVariant<Message>`
*/
@RpcCall("receiveBacklogAll")
fun receiveBacklogAll(
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1,
@RpcParam.Int additional: Int = 0,
@RpcParam.QVariantList messages: QVariantList
)
/**
* Response to the corresponding [requestBacklogAllFiltered] call.
* [messages] contains the messages as `QVariant<Message>`
*/
@RpcCall("receiveBacklogAllFiltered")
fun receiveBacklogAllFiltered(
@RpcParam.UserType.MsgId first: MsgId = MsgId(-1),
@RpcParam.UserType.MsgId last: MsgId = MsgId(-1),
@RpcParam.Int limit: Int = -1,
@RpcParam.Int additional: Int = 0,
@RpcParam.Int type: Int = -1,
@RpcParam.Int flags: Int = -1,
@RpcParam.QVariantList messages: QVariantList
)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
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.MsgId
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("BufferSyncer", side = ProtocolSide.CORE)
interface BufferSyncerClientApi {
@RpcCall("markBufferAsRead")
fun markBufferAsRead( @RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("mergeBuffersPermanently")
fun mergeBuffersPermanently(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.BufferId buffer2: BufferId)
@RpcCall("removeBuffer")
fun removeBuffer(@RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("renameBuffer")
fun renameBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.QString newName: String)
@RpcCall("setMarkerLine")
fun setMarkerLine(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.MsgId msgId: MsgId)
@RpcCall("setLastSeenMsg")
fun setLastSeenMsg(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.UserType.MsgId msgId: MsgId)
@RpcCall("setBufferActivity")
fun setBufferActivity(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int types: Int)
@RpcCall("setHighlightCount")
fun setHighlightCount(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int count: Int)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
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.NetworkId
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("BufferViewConfig", side = ProtocolSide.CORE)
interface BufferViewConfigClientApi {
@RpcCall("addBuffer")
fun addBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int pos: Int)
@RpcCall("moveBuffer")
fun moveBuffer(@RpcParam.UserType.BufferId buffer: BufferId, @RpcParam.Int pos: Int)
@RpcCall("removeBuffer")
fun removeBuffer(@RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("removeBufferPermanently")
fun removeBufferPermanently(@RpcParam.UserType.BufferId buffer: BufferId)
@RpcCall("setBufferViewName")
fun setBufferViewName(@RpcParam.QString value: String)
@RpcCall("setAddNewBuffersAutomatically")
fun setAddNewBuffersAutomatically(@RpcParam.Bool value: Boolean)
@RpcCall("setAllowedBufferTypes")
fun setAllowedBufferTypes(@RpcParam.Int value: Int)
@RpcCall("setDisableDecoration")
fun setDisableDecoration(@RpcParam.Bool value: Boolean)
@RpcCall("setHideInactiveBuffers")
fun setHideInactiveBuffers(@RpcParam.Bool value: Boolean)
@RpcCall("setHideInactiveNetworks")
fun setHideInactiveNetworks(@RpcParam.Bool value: Boolean)
@RpcCall("setMinimumActivity")
fun setMinimumActivity(@RpcParam.Int value: Int)
@RpcCall("setNetworkId")
fun setNetworkId(@RpcParam.UserType.NetworkId value: NetworkId)
@RpcCall("setShowSearch")
fun setShowSearch(@RpcParam.Bool value: Boolean)
@RpcCall("setSortAlphabetically")
fun setSortAlphabetically(@RpcParam.Bool value: Boolean)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("BufferViewManager", side = ProtocolSide.CORE)
interface BufferViewManagerClientApi {
@RpcCall("addBufferViewConfig")
fun addBufferViewConfig(@RpcParam.Int bufferViewConfigId: Int)
@RpcCall("deleteBufferViewConfig")
fun deleteBufferViewConfig(@RpcParam.Int bufferViewConfigId: Int)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.variant.QVariantMap
import java.nio.ByteBuffer
@RpcApi("CertManager", side = ProtocolSide.CORE)
interface CertManagerClientApi {
@RpcCall("setSslCert")
fun setSslCert(objectName: ObjectName, @RpcParam.QByteArray encoded: ByteBuffer)
@RpcCall("setSslKey")
fun setSslKey(objectName: ObjectName, @RpcParam.QByteArray encoded: ByteBuffer)
@RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("CoreInfo", side = ProtocolSide.CORE)
interface CoreInfoClientApi {
@RpcCall("setCoreData")
fun setCoreData(@RpcParam.QVariantMap data: QVariantMap)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("HighlightRuleManager", side = ProtocolSide.CORE)
interface HighlightRuleManagerClientApi {
@RpcCall("removeHighlightRule")
fun removeHighlightRule(@RpcParam.Int highlightRule: Int)
@RpcCall("toggleHighlightRule")
fun toggleHighlightRule(@RpcParam.Int highlightRule: Int)
@RpcCall("addHighlightRule")
fun addHighlightRule(
@RpcParam.Int id: Int,
@RpcParam.QString content: String?,
@RpcParam.Bool isRegEx: Boolean,
@RpcParam.Bool isCaseSensitive: Boolean,
@RpcParam.Bool isEnabled: Boolean,
@RpcParam.Bool isInverse: Boolean,
@RpcParam.QString sender: String?,
@RpcParam.QString channel: String?
)
@RpcCall("setHighlightNick")
fun setHighlightNick(@RpcParam.Int highlightNick: Int)
@RpcCall("setNicksCaseSensitive")
fun setNicksCaseSensitive(@RpcParam.Bool nicksCaseSensitive: Boolean)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.models.QStringList
import de.justjanne.libquassel.protocol.models.ids.IdentityId
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("Identity", side = ProtocolSide.CORE)
interface IdentityClientApi {
@RpcCall("setAutoAwayEnabled")
fun setAutoAwayEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setAutoAwayReason")
fun setAutoAwayReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setAutoAwayReasonEnabled")
fun setAutoAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setAutoAwayTime")
fun setAutoAwayTime(objectName: ObjectName, @RpcParam.Int time: Int)
@RpcCall("setAwayNick")
fun setAwayNick(objectName: ObjectName, @RpcParam.QString awayNick: String?)
@RpcCall("setAwayNickEnabled")
fun setAwayNickEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setAwayReason")
fun setAwayReason(objectName: ObjectName, @RpcParam.QString awayReason: String?)
@RpcCall("setAwayReasonEnabled")
fun setAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setDetachAwayEnabled")
fun setDetachAwayEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setDetachAwayReason")
fun setDetachAwayReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setDetachAwayReasonEnabled")
fun setDetachAwayReasonEnabled(objectName: ObjectName, @RpcParam.Bool enabled: Boolean)
@RpcCall("setId")
fun setId(objectName: ObjectName, @RpcParam.UserType.IdentityId id: IdentityId)
@RpcCall("setIdent")
fun setIdent(objectName: ObjectName, @RpcParam.QString ident: String?)
@RpcCall("setIdentityName")
fun setIdentityName(objectName: ObjectName, @RpcParam.QString name: String?)
@RpcCall("setKickReason")
fun setKickReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setNicks")
fun setNicks(objectName: ObjectName, @RpcParam.QStringList nicks: QStringList)
@RpcCall("setPartReason")
fun setPartReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setQuitReason")
fun setQuitReason(objectName: ObjectName, @RpcParam.QString reason: String?)
@RpcCall("setRealName")
fun setRealName(objectName: ObjectName, @RpcParam.QString realName: String?)
@RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("IgnoreListManager", side = ProtocolSide.CORE)
interface IgnoreListManagerClientApi {
@RpcCall("addIgnoreListItem")
fun addIgnoreListItem(
@RpcParam.Int type: Int,
@RpcParam.QString ignoreRule: String?,
@RpcParam.Bool isRegEx: Boolean,
@RpcParam.Int strictness: Int,
@RpcParam.Int scope: Int,
@RpcParam.QString scopeRule: String?,
@RpcParam.Bool isActive: Boolean
)
@RpcCall("removeIgnoreListItem")
fun removeIgnoreListItem(@RpcParam.QString ignoreRule: String?)
@RpcCall("requestToggleIgnoreRule")
fun toggleIgnoreRule(@RpcParam.QString ignoreRule: String?)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.models.QStringList
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("IrcChannel", side = ProtocolSide.CORE)
interface IrcChannelClientApi {
@RpcCall("addChannelMode")
fun addChannelMode( objectName: ObjectName, @RpcParam.QChar mode: Char, @RpcParam.QString value: String? = null)
@RpcCall("addUserMode")
fun addUserMode(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString mode: String? = null)
@RpcCall("joinIrcUsers")
fun joinIrcUsers(objectName: ObjectName, @RpcParam.QStringList nicks: QStringList, @RpcParam.QStringList modes: QStringList)
@RpcCall("part")
fun part(objectName: ObjectName, @RpcParam.QString nick: String)
@RpcCall("removeChannelMode")
fun removeChannelMode(objectName: ObjectName, @RpcParam.QChar mode: Char, @RpcParam.QString value: String? = null)
@RpcCall("removeUserMode")
fun removeUserMode(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString mode: String? = null)
@RpcCall("setEncrypted")
fun setEncrypted(objectName: ObjectName, @RpcParam.Bool encrypted: Boolean)
@RpcCall("setPassword")
fun setPassword(objectName: ObjectName, @RpcParam.QString password: String)
@RpcCall("setTopic")
fun setTopic(objectName: ObjectName, @RpcParam.QString topic: String)
@RpcCall("setUserModes")
fun setUserModes(objectName: ObjectName, @RpcParam.QString nick: String, @RpcParam.QString modes: String? = null)
@RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.models.QStringList
import de.justjanne.libquassel.protocol.models.ids.NetworkId
import de.justjanne.libquassel.protocol.variant.QVariantList
@RpcApi("IrcListHelper", side = ProtocolSide.CORE)
interface IrcListHelperClientApi {
@RpcCall("receiveChannelList")
fun receiveChannelList(@RpcParam.UserType.NetworkId netId: NetworkId, @RpcParam.QStringList channelFilters: QStringList, @RpcParam.QVariantList channels: QVariantList)
@RpcCall("reportError")
fun reportError(@RpcParam.QString error: String?)
@RpcCall("reportFinishedList")
fun reportFinishedList(@RpcParam.UserType.NetworkId netId: NetworkId)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.variant.QVariantMap
import org.threeten.bp.temporal.Temporal
@RpcApi("IrcUser", side = ProtocolSide.CORE)
interface IrcUserClientApi {
@RpcCall("addUserModes")
fun addUserModes(objectName: ObjectName, @RpcParam.QString modes: String)
@RpcCall("joinChannel")
fun joinChannel(objectName: ObjectName, @RpcParam.QString channelname: String)
@RpcCall("partChannel")
fun partChannel(objectName: ObjectName, @RpcParam.QString channelname: String)
@RpcCall("quit")
fun quit(objectName: ObjectName)
@RpcCall("removeUserModes")
fun removeUserModes(objectName: ObjectName, @RpcParam.QString modes: String)
@RpcCall("setAccount")
fun setAccount(objectName: ObjectName, @RpcParam.QString account: String)
@RpcCall("setAway")
fun setAway(objectName: ObjectName, @RpcParam.Bool away: Boolean)
@RpcCall("setAwayMessage")
fun setAwayMessage(objectName: ObjectName, @RpcParam.QString awayMessage: String)
@RpcCall("setEncrypted")
fun setEncrypted(objectName: ObjectName, @RpcParam.Bool encrypted: Boolean)
@RpcCall("setHost")
fun setHost(objectName: ObjectName, @RpcParam.QString host: String)
@RpcCall("setIdleTime")
fun setIdleTime(objectName: ObjectName, @RpcParam.QDateTime idleTime: Temporal)
@RpcCall("setIrcOperator")
fun setIrcOperator(objectName: ObjectName, @RpcParam.QString ircOperator: String)
@RpcCall("setLastAwayMessage")
fun setLastAwayMessage(objectName: ObjectName, @RpcParam.Int lastAwayMessage: Int)
@RpcCall("setLastAwayMessageTime")
fun setLastAwayMessageTime(objectName: ObjectName, @RpcParam.QDateTime lastAwayMessageTime: Temporal)
@RpcCall("setLoginTime")
fun setLoginTime(objectName: ObjectName, @RpcParam.QDateTime loginTime: Temporal)
@RpcCall("setNick")
fun setNick(objectName: ObjectName, @RpcParam.QString newNick: String)
@RpcCall("setRealName")
fun setRealName(objectName: ObjectName, @RpcParam.QString realName: String)
@RpcCall("setServer")
fun setServer(objectName: ObjectName, @RpcParam.QString server: String)
@RpcCall("setSuserHost")
fun setSuserHost(objectName: ObjectName, @RpcParam.QString suserHost: String)
@RpcCall("setUser")
fun setUser(objectName: ObjectName, @RpcParam.QString user: String)
@RpcCall("setUserModes")
fun setUserModes(objectName: ObjectName, @RpcParam.QString modes: String)
@RpcCall("setWhoisServiceReply")
fun setWhoisServiceReply(objectName: ObjectName, @RpcParam.QString whoisServiceReply: String)
@RpcCall("updateHostmask")
fun updateHostmask(objectName: ObjectName, @RpcParam.QString mask: String)
@RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.models.QStringList
import de.justjanne.libquassel.protocol.models.ids.IdentityId
import de.justjanne.libquassel.protocol.variant.QVariantList
import de.justjanne.libquassel.protocol.variant.QVariantMap
import java.nio.ByteBuffer
@RpcApi("Network", side = ProtocolSide.CORE)
interface NetworkClientApi {
@RpcCall("setNetworkName")
fun setNetworkName(objectName: ObjectName, @RpcParam.QString networkName: String)
@RpcCall("setCurrentServer")
fun setCurrentServer(objectName: ObjectName, @RpcParam.QString currentServer: String?)
@RpcCall("setMyNick")
fun setMyNick(objectName: ObjectName, @RpcParam.QString myNick: String?)
@RpcCall("setLatency")
fun setLatency(objectName: ObjectName, @RpcParam.Int latency: Int)
@RpcCall("setCodecForServer")
fun setCodecForServer(objectName: ObjectName, @RpcParam.QByteArray codecForServer: ByteBuffer)
@RpcCall("setCodecForEncoding")
fun setCodecForEncoding(objectName: ObjectName, @RpcParam.QByteArray codecForEncoding: ByteBuffer)
@RpcCall("setCodecForDecoding")
fun setCodecForDecoding(objectName: ObjectName, @RpcParam.QByteArray codecForDecoding: ByteBuffer)
@RpcCall("setIdentity")
fun setIdentity(objectName: ObjectName, @RpcParam.UserType.IdentityId identityId: IdentityId)
@RpcCall("setConnected")
fun setConnected(objectName: ObjectName, @RpcParam.Bool isConnected: Boolean)
@RpcCall("setConnectionState")
fun setConnectionState(objectName: ObjectName, @RpcParam.Int connectionState: Int)
@RpcCall("setUseRandomServer")
fun setUseRandomServer(objectName: ObjectName, @RpcParam.Bool useRandomServer: Boolean)
@RpcCall("setPerform")
fun setPerform(objectName: ObjectName, @RpcParam.QStringList perform: QStringList)
@RpcCall("setSkipCaps")
fun setSkipCaps(objectName: ObjectName, @RpcParam.QStringList skipCaps: QStringList)
@RpcCall("setUseAutoIdentify")
fun setUseAutoIdentify(objectName: ObjectName, @RpcParam.Bool useAutoIdentify: Boolean)
@RpcCall("setAutoIdentifyService")
fun setAutoIdentifyService(objectName: ObjectName, @RpcParam.QString autoIdentifyService: String)
@RpcCall("setAutoIdentifyPassword")
fun setAutoIdentifyPassword(objectName: ObjectName, @RpcParam.QString autoIdentifyPassword: String)
@RpcCall("setUseSasl")
fun setUseSasl(objectName: ObjectName, @RpcParam.Bool useSasl: Boolean)
@RpcCall("setSaslAccount")
fun setSaslAccount(objectName: ObjectName, @RpcParam.QString saslAccount: String)
@RpcCall("setSaslPassword")
fun setSaslPassword(objectName: ObjectName, @RpcParam.QString saslPassword: String)
@RpcCall("setUseAutoReconnect")
fun setUseAutoReconnect(objectName: ObjectName, @RpcParam.Bool useAutoReconnect: Boolean)
@RpcCall("setAutoReconnectInterval")
fun setAutoReconnectInterval(objectName: ObjectName, @RpcParam.UInt autoReconnectInterval: UInt)
@RpcCall("setAutoReconnectRetries")
fun setAutoReconnectRetries(objectName: ObjectName, @RpcParam.UShort autoReconnectRetries: UShort)
@RpcCall("setUnlimitedReconnectRetries")
fun setUnlimitedReconnectRetries(objectName: ObjectName, @RpcParam.Bool unlimitedReconnectRetries: Boolean)
@RpcCall("setRejoinChannels")
fun setRejoinChannels(objectName: ObjectName, @RpcParam.Bool rejoinChannels: Boolean)
@RpcCall("setUseCustomMessageRate")
fun setUseCustomMessageRate(objectName: ObjectName, @RpcParam.Bool useCustomMessageRate: Boolean)
@RpcCall("setMessageRateBurstSize")
fun setMessageRateBurstSize(objectName: ObjectName, @RpcParam.UInt messageRateBurstSize: UInt)
@RpcCall("setMessageRateDelay")
fun setMessageRateDelay(objectName: ObjectName, @RpcParam.UInt messageRateDelay: UInt)
@RpcCall("setUnlimitedMessageRate")
fun setUnlimitedMessageRate(objectName: ObjectName, @RpcParam.Bool unlimitedMessageRate: Boolean)
@RpcCall("setServerList")
fun setServerList(objectName: ObjectName, @RpcParam.QVariantList serverList: QVariantList)
@RpcCall("addSupport")
fun addSupport(objectName: ObjectName, @RpcParam.QString param: String, @RpcParam.QString value: String = "")
@RpcCall("removeSupport")
fun removeSupport(objectName: ObjectName, @RpcParam.QString param: String)
@RpcCall("addCap")
fun addCap(objectName: ObjectName, @RpcParam.QString capability: String, @RpcParam.QString value: String = "")
@RpcCall("acknowledgeCap")
fun acknowledgeCap(objectName: ObjectName, @RpcParam.QString capability: String)
@RpcCall("removeCap")
fun removeCap(objectName: ObjectName, @RpcParam.QString capability: String)
@RpcCall("clearCaps")
fun clearCaps(objectName: ObjectName)
@RpcCall("addIrcUser")
fun addIrcUser(objectName: ObjectName, @RpcParam.QString hostmask: String)
@RpcCall("addIrcChannel")
fun addIrcChannel(objectName: ObjectName, @RpcParam.QString channel: String)
@RpcCall("update")
fun update(objectName: ObjectName, @RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("NetworkConfig", side = ProtocolSide.CORE)
interface NetworkConfigClientApi {
@RpcCall("setAutoWhoDelay")
fun setAutoWhoDelay(@RpcParam.Int delay: Int)
@RpcCall("setAutoWhoEnabled")
fun setAutoWhoEnabled(@RpcParam.Bool enabled: Boolean)
@RpcCall("setAutoWhoInterval")
fun setAutoWhoInterval(@RpcParam.Int interval: Int)
@RpcCall("setAutoWhoNickLimit")
fun setAutoWhoNickLimit(@RpcParam.Int limit: Int)
@RpcCall("setMaxPingCount")
fun setMaxPingCount(@RpcParam.Int count: Int)
@RpcCall("setPingInterval")
fun setPingInterval(@RpcParam.Int interval: Int)
@RpcCall("setPingTimeoutEnabled")
fun setPingTimeoutEnabled(@RpcParam.Bool enabled: Boolean)
@RpcCall("setStandardCtcp")
fun setStandardCtcp(@RpcParam.Bool enabled: Boolean)
@RpcCall("update")
fun update(@RpcParam.QVariantMap properties: QVariantMap)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.client
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.protocol.models.BufferInfo
import de.justjanne.libquassel.protocol.models.Message
import de.justjanne.libquassel.protocol.models.ids.IdentityId
import de.justjanne.libquassel.protocol.models.ids.NetworkId
import de.justjanne.libquassel.protocol.variant.QVariantMap
import java.nio.ByteBuffer
@RpcApi(side = ProtocolSide.CORE)
interface RpcClientApi {
@RpcCall("__objectRenamed__")
fun objectRenamed(@RpcParam.QByteArray classname: ByteBuffer, @RpcParam.QString newName: String?, @RpcParam.QString oldName: String?)
@RpcCall("2displayMsg(Message)")
fun displayMsg(@RpcParam.UserType.Message message: Message)
@RpcCall("2displayStatusMsg(QString,QString)")
fun displayStatusMsg(@RpcParam.QString net: String?, @RpcParam.QString msg: String?)
@RpcCall("2bufferInfoUpdated(BufferInfo)")
fun bufferInfoUpdated(@RpcParam.UserType.BufferInfo bufferInfo: BufferInfo)
@RpcCall("2identityCreated(Identity)")
fun identityCreated(@RpcParam.QVariantMap identity: QVariantMap)
@RpcCall("2identityRemoved(IdentityId)")
fun identityRemoved(@RpcParam.UserType.IdentityId identityId: IdentityId)
@RpcCall("2networkCreated(NetworkId)")
fun networkCreated(@RpcParam.UserType.NetworkId networkId: NetworkId)
@RpcCall("2networkRemoved(NetworkId)")
fun networkRemoved(@RpcParam.UserType.NetworkId networkId: NetworkId)
@RpcCall("2passwordChanged(PeerPtr,bool)")
fun passwordChanged(@RpcParam.UserType.PeerPtr peer: ULong, @RpcParam.Bool success: Boolean)
@RpcCall("2disconnectFromCore()")
fun disconnectFromCore()
}
/*
* libquassel
* Copyright (c) 2021 Janne Mareike Koschinski
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.syncables.invoker
package de.justjanne.libquassel.protocol.api.dispatcher
import de.justjanne.libquassel.protocol.exceptions.RpcInvocationFailedException
import de.justjanne.libquassel.protocol.syncables.SyncableStub
import de.justjanne.libquassel.protocol.variant.QVariantList
interface Invoker {
val className: String
interface RpcDispatcher {
@Throws(RpcInvocationFailedException::class)
fun invoke(on: SyncableStub, method: String, params: QVariantList)
fun invoke(method: String, params: QVariantList)
}
/*
* libquassel
* Copyright (c) 2021 Janne Mareike Koschinski
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.session
package de.justjanne.libquassel.protocol.api.dispatcher
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.protocol.syncables.SyncableStub
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.exceptions.RpcInvocationFailedException
import de.justjanne.libquassel.protocol.variant.QVariantList
interface SyncProxy {
fun synchronize(syncable: SyncableStub)
fun stopSynchronize(syncable: SyncableStub)
fun sync(
target: ProtocolSide,
className: String,
objectName: String,
function: String,
arguments: QVariantList
)
fun rpc(
target: ProtocolSide,
function: String,
arguments: QVariantList
)
interface SyncDispatcher {
@Throws(RpcInvocationFailedException::class)
fun invoke(objectName: ObjectName, method: String, params: QVariantList)
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.dispatcher
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.exceptions.RpcInvocationFailedException
import de.justjanne.libquassel.protocol.variant.QVariantList
import javax.inject.Inject
class SyncHandler @Inject constructor(
private val dispatchers: Map<String, @JvmSuppressWildcards SyncDispatcher>,
) {
@Throws(RpcInvocationFailedException::class)
fun invoke(className: String, objectName: ObjectName, method: String, params: QVariantList) {
dispatchers[className]?.invoke(objectName, method, params)
?: throw RpcInvocationFailedException.InvokerNotFoundException(className)
}
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.proxy
import de.justjanne.libquassel.protocol.api.ObjectName
import de.justjanne.libquassel.protocol.variant.QVariantList
import de.justjanne.libquassel.protocol.variant.QVariant_
interface Proxy {
fun sync(className: String, objectName: ObjectName, function: String, params: QVariantList)
fun sync(className: String, objectName: ObjectName, function: String, vararg arg: QVariant_) =
sync(className, objectName, function, arg.toList())
fun rpc(function: String, params: QVariantList)
fun rpc(function: String, vararg arg: QVariant_) =
rpc(function, arg.toList())
}
/*
* libquassel
* Copyright (c) 2024 Janne Mareike Koschinski
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
package de.justjanne.libquassel.protocol.api.server
import de.justjanne.libquassel.annotations.ProtocolSide
import de.justjanne.libquassel.annotations.RpcApi
import de.justjanne.libquassel.annotations.RpcParam
import de.justjanne.libquassel.annotations.RpcCall
import de.justjanne.libquassel.protocol.variant.QVariantMap
@RpcApi("AliasManager", side = ProtocolSide.CLIENT)
interface AliasManagerServerApi {
@RpcCall("addAlias")
fun addAlias(
@RpcParam.QString name: String,
@RpcParam.QString expansion: String
)
@RpcCall("requestUpdate")
fun requestUpdate(
@RpcParam.QVariantMap properties: QVariantMap
)
}