-
-
Notifications
You must be signed in to change notification settings - Fork 13
Serialization of Complex Types
This document discusses how complex objects are translated to and from VariantMaps.
Complex Structs are (de-)serialized to and from VariantMaps. If the Complex Struct is sent/received during handshake, an additional key/value pair "MsgType" is added, which contains the name of the complexStruct’s type – for example "ClientInitAck" as String16
Field | Type | Description |
---|---|---|
Configured | bool |
Is set, if the core has at least one account and a storage backend is selected |
LoginEnabled | bool |
Specifies if clients can authenticate against the core |
CoreFeatures | uint8 |
An int specifying the features the core supports |
StorageBackends | VariantList<StorageBackend> |
A VariantList of StorageBackends, see below |
Field | Type | Description |
---|---|---|
DisplayName | string16 |
The name of the storage backend |
Description | string16 |
A user-readable description |
SetupKeys | StringList |
A list of keys that need to be set to configure the backend |
SetupDefaults | VariantMap |
The default values for each key |
Field | Type | Description |
---|---|---|
SetupData | SetupData |
The setup data |
Field | Type | Description |
---|---|---|
AdminUser | string16 |
The username of the new user |
AdminPasswd | string16 |
The password of the new user |
Backend | string16 |
The DisplayName of the selected backend. |
ConnectionProperties | VariantMap |
The connection settings for the selected backend. The types of each value have to match the type of the default value |
Field | Type | Description |
---|---|---|
Error | string16 |
The error message that will be displayed to the user as reason why configuring was not possible |
This type contains no fields.
Warning: This type has, when serialized, QVariantType "Network::Server" (which is a usertype), but actually is just a variantmap for the following complex type:
Field | Type | Description |
---|---|---|
UseSSL | bool |
-- |
sslVersion | int32 |
-- |
Host | string16 |
-- |
Port | int32 |
-- |
Password | string16 |
-- |
UseProxy | bool |
-- |
ProxyType | int32 |
-- |
ProxyHost | string16 |
-- |
ProxyPort | int32 |
-- |
ProxyUser | string16 |
-- |
ProxyPass | string16 |
-- |
Field | Type | Description |
---|---|---|
Identities | VariantList<Identity> |
-- |
BufferInfos | VariantList<BufferInfo> |
-- |
NetworkIds | VariantList<NetworkId> |
-- |
Warning: This type has, when serialized, QVariantType "Network::Server" (which is a usertype), but actually is just a variantmap for the following complex type:
Field | Type | Description |
---|---|---|
identityId | IdentityId |
-- |
identityName | string16 |
-- |
realName | string16 |
-- |
nicks | StringList |
-- |
awayNick | string16 |
-- |
awayNickEnabled | bool |
-- |
awayReason | string16 |
-- |
awayReasonEnabled | bool |
-- |
autoAwayEnabled | bool |
-- |
autoAwayTime | int32 |
-- |
autoAwayReason | string16 |
-- |
autoAwayReasonEnabled | bool |
-- |
detachAwayEnabled | bool |
-- |
detachAwayReason | string16 |
-- |
detachAwayReasonEnabled | bool |
-- |
ident | string16 |
-- |
kickReason | string16 |
-- |
partReason | string16 |
-- |
quitReason | string16 |
-- |
Field | Type | Description |
---|---|---|
names | StringList |
-- |
expansions | StringList |
-- |
Field | Type | Description |
---|---|---|
LastSeenMsg | VariantList<Integer> |
-- |
MarkerLines | VariantList<Integer> |
-- |
Field | Type | Description |
---|---|---|
bufferViewName | string16 |
-- |
TemporarilyRemovedBuffers | List<Integer> |
-- |
hideInactiveNetworks | bool |
-- |
BufferList | List<Integer> |
-- |
allowedBufferTypes | int32 |
-- |
sortAlphabetically | bool |
-- |
disableDecoration | bool |
-- |
addNewBuffersAutomatically | bool |
-- |
networkId | int32 |
-- |
minimumActivity | int32 |
-- |
hideInactiveBuffers | bool |
-- |
RemovedBuffers | VariantList<Integer> |
-- |
Field | Type | Description |
---|---|---|
BufferViewIds | VariantList<Integer> |
-- |
Field | Type | Description |
---|---|---|
scope | VariantList<Integer> |
-- |
ignoreType | VariantList<Integer> |
-- |
isActive | VariantList<Boolean> |
-- |
scopeRule | StringList |
-- |
isRegEx | VariantList<Boolean> |
-- |
strictness | VariantList<Integer> |
-- |
ignoreRule | StringList |
-- |
Field | Type | Description |
---|---|---|
name | string16 |
-- |
topic | string16 |
-- |
password | string16 |
-- |
UserModes | VariantMap |
-- |
ChanModes | VariantMap |
-- |
encrypted | bool |
-- |
Field | Type | Description |
---|---|---|
server | string16 |
-- |
ircOperator | string16 |
-- |
away | bool |
-- |
lastAwayMessage | int32 |
-- |
idleTime | DateTime |
-- |
whoisServiceReply | string16 |
-- |
suserHost | string16 |
-- |
nick | string16 |
-- |
realName | string16 |
-- |
awayMessage | string16 |
-- |
loginTime | DateTime |
-- |
encrypted | bool |
-- |
channels | StringList |
-- |
host | string16 |
-- |
userModes | string16 |
-- |
user | string16 |
-- |
Field | Type | Description |
---|---|---|
standardCtcp | bool |
-- |
autoWhoEnabled | bool |
-- |
autoWhoDelay | int32 |
-- |
autoWhoNickLimit | int32 |
-- |
autoWhoInterval | int32 |
-- |
pingTimeoutEnabled | bool |
-- |
pingInterval | int32 |
-- |
maxPingCount | int32 |
-- |
Field | Type | Description |
---|---|---|
networkName | string16 |
-- |
identityId | int32 |
-- |
codecForServer | string16 |
-- |
codecForEncoding | string16 |
-- |
codecForDecoding | string16 |
-- |
ServerList | VariantList<NetworkServer> |
-- |
useRandomServer | bool |
-- |
perform | StringList |
-- |
useAutoIdentify | bool |
-- |
autoIdentifyService | string16 |
-- |
autoIdentifyPassword | string16 |
-- |
useSasl | bool |
-- |
saslAccount | string16 |
-- |
saslPassword | string16 |
-- |
useAutoReconnect | bool |
-- |
autoReconnectInterval | int32 |
-- |
autoReconnectRetries | int16 |
-- |
unlimitedReconnectRetries | bool |
-- |
rejoinChannels | bool |
-- |
Field | Type | Description |
---|---|---|
IrcUsersAndChannels | IrcUsersAndChannels |
-- |
Supports | VariantMap |
-- |
connectionState | int32 |
-- |
currentServer | string16 |
-- |
isConnected | bool |
-- |
latency | int32 |
-- |
myNick | string16 |
-- |
-- | NetworkInfo |
More about this below |
The NetworkInfo data here isn’t an actual field – it’s serialized into the same map as the network itself. Therefore we have to apply the NetworkInfoSerializer to the same map to which we applied the NetworkSerializer before.