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

Add more protocol documentation

parent ce3a2791
Branches
No related tags found
No related merge requests found
docs/assets/images/message_init.png

77.2 KiB

docs/assets/images/message_setup.png

122 KiB

# Framing Layer
## State Machine
The framing layer has two possible states: `HANDSHAKE` and `CONNECTED`.
It starts off in `HANDSHAKE` state.
## Handshake State
First, the client sends `0x42b33f00` with certain flags set depending on
available features:
|Flag |Meaning |
|------|-----------|
|`0x01`|TLS |
|`0x02`|Compression|
Afterwards, the client sends a list of all protocols it supports:
|Version |Protocol |
|------------|--------------------------------------------------|
|`0x00000001`|Old legacy protocol, which won’t be described here|
|`0x00000002`|Datastream protocol, as described in this document|
To mark the end of the list, the client sets the flag `0x80000000` on the last
protocol in the list.
The server responds with the following data:
|Type |Field |Description |
|-------|-------|---------------------------------------------------|
|`UChar`|flags |As described above |
|`Short`|extra |Extra data, depends on the protocol, so far ignored|
|`Char` |version|Protocol Version |
Afterwards, the server expects the client to first enable TLS (if supported) and
afterwards compression (if supported).
Compression is handled as Deflate applied to the socket.
This negotiation ends with the protocol advancing into the `CONNECTED` state.
## Connected State
### Receiving
The client reads an uint32_t of the size of the following message frame in
bytes, followed by that message frame.
### Sending
The client sends an uint32_t of the size of the message frame in bytes, followed
by that message frame. Afterwards, if compression is enabled, the compressor is
flushed.
\ No newline at end of file
# Message Layer
## State Machine
The framing layer has two possible states: `HANDSHAKE` and `CONNECTED`.
It starts off in `HANDSHAKE` state.
## Handshake State
In this state, messages are encoded/decoded according to the [Handshake](../serialization/handshake.html)
specification.
[![Init Diagram](../../assets/images/message_init.png)]((../../assets/images/message_init.png))
Client and core exchange messages according to the diagram described above, when
a ClientLoginAck and SessionInit have been received, the state advances into
`CONNECTED`.
### Core Setup
[![Core Setup Diagram](../../assets/images/message_setup.png)](../../assets/images/message_setup.png)
When the client receives a CoreInitAck message, with "Configured" set to "False", it will display to the user a list, allowing them to choose a StorageBackend from the ones present in CoreInitAck’s "StorageBackends" attribute.
If the user chooses one such backend, and the backend has a SetupKeys attribute which is not-empty, the user will be presented with input fields for each of the keys, pre-populated with the values of the SetupDefaults map. Each field allows only inputs of the same type as the default value, so, for example, a field named "Port" which has the default value QVariant(Int, 4242) would only allow integers to be input.
As soon as the user has properly filled out and configured these settings, they will choose the username and password of the new account that is to be set up on the core.
The first account set up is a so-called "Admin Account", although this does not yet provide any special abilities.
The client will then send a new CoreSetupData message containing a SetupData attribute with all the previously specified settings.
If the client receives a CoreSetupReject, it will display the specified error to the user, and, if wished, allow them to try configuring again.
If the client receives a CoreSetupAck, the client will proceed normally in the init procedure, by sending the ClientLogin message.
## Connected State
In this state,
\ No newline at end of file
# Compound Types # Compound Types
This document discusses how complex objects are translated to and from This document discusses how complex objects are translated to and from
VariantMaps. QVariantMaps.
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
## ClientInitAck
| 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 |
### StorageBackend
| 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 |
## CoreSetupData
| Field | Type | Description |
|-----------|-------------|----------------|
| SetupData | `SetupData` | The setup data |
### SetupData
| 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 |
## CoreSetupReject
| Field | Type | Description |
|-------|------------|-------------------------------------------------------------------------------------------------|
| Error | `string16` | The error message that will be displayed to the user as reason why configuring was not possible |
## CoreSetupAck
This type contains no fields.
## Network::Server ## Network::Server
Warning: This type has, when serialized, QVariantType "Network::Server" (which Warning: This type has, when serialized, QVariantType "Network::Server" (which
is a usertype), but actually is just a variantmap for the following complex is a usertype), but actually is just a QVariantMap for the following complex
type: type:
| Field | Type | Description | | Field | Type | Description |
|------------|------------|-------------| |------------|------------|-------------|
| UseSSL | `bool` | -- | | UseSSL | `Bool` | -- |
| sslVersion | `int32` | -- | | sslVersion | `Int` | -- |
| Host | `string16` | -- | | Host | `QString` | -- |
| Port | `int32` | -- | | Port | `Int` | -- |
| Password | `string16` | -- | | Password | `QString` | -- |
| UseProxy | `bool` | -- | | UseProxy | `Bool` | -- |
| ProxyType | `int32` | -- | | ProxyType | `Int` | -- |
| ProxyHost | `string16` | -- | | ProxyHost | `QString` | -- |
| ProxyPort | `int32` | -- | | ProxyPort | `Int` | -- |
| ProxyUser | `string16` | -- | | ProxyUser | `QString` | -- |
| ProxyPass | `string16` | -- | | ProxyPass | `QString` | -- |
## SessionState ## SessionState
| Field | Type | Description | | Field | Type | Description |
|-------------|---------------------------|-------------| |-------------|----------------------------|-------------|
| Identities | `VariantList<Identity>` | -- | | Identities | `QVariantList<Identity>` | -- |
| BufferInfos | `VariantList<BufferInfo>` | -- | | BufferInfos | `QVariantList<BufferInfo>` | -- |
| NetworkIds | `VariantList<NetworkId>` | -- | | NetworkIds | `QVariantList<NetworkId>` | -- |
## Identity ## Identity
Warning: This type has, when serialized, QVariantType "Network::Server" (which Warning: This type has, when serialized, QVariantType "Network::Server" (which
is a usertype), but actually is just a variantmap for the following complex is a usertype), but actually is just a QVariantMap for the following complex
type: type:
| Field | Type | Description | | Field | Type | Description |
|-------------------------|--------------|-------------| |-------------------------|---------------|-------------|
| identityId | `IdentityId` | -- | | identityId | `IdentityId` | -- |
| identityName | `string16` | -- | | identityName | `QString` | -- |
| realName | `string16` | -- | | realName | `QString` | -- |
| nicks | `StringList` | -- | | nicks | `QStringList` | -- |
| awayNick | `string16` | -- | | awayNick | `QString` | -- |
| awayNickEnabled | `bool` | -- | | awayNickEnabled | `Bool` | -- |
| awayReason | `string16` | -- | | awayReason | `QString` | -- |
| awayReasonEnabled | `bool` | -- | | awayReasonEnabled | `Bool` | -- |
| autoAwayEnabled | `bool` | -- | | autoAwayEnabled | `Bool` | -- |
| autoAwayTime | `int32` | -- | | autoAwayTime | `Int` | -- |
| autoAwayReason | `string16` | -- | | autoAwayReason | `QString` | -- |
| autoAwayReasonEnabled | `bool` | -- | | autoAwayReasonEnabled | `Bool` | -- |
| detachAwayEnabled | `bool` | -- | | detachAwayEnabled | `Bool` | -- |
| detachAwayReason | `string16` | -- | | detachAwayReason | `QString` | -- |
| detachAwayReasonEnabled | `bool` | -- | | detachAwayReasonEnabled | `Bool` | -- |
| ident | `string16` | -- | | ident | `QString` | -- |
| kickReason | `string16` | -- | | kickReason | `QString` | -- |
| partReason | `string16` | -- | | partReason | `QString` | -- |
| quitReason | `string16` | -- | | quitReason | `QString` | -- |
## AliasManager ## AliasManager
| Field | Type | Description | | Field | Type | Description |
|------------|--------------|-------------| |------------|---------------|-------------|
| names | `StringList` | -- | | names | `QStringList` | -- |
| expansions | `StringList` | -- | | expansions | `QStringList` | -- |
## BufferSyncer ## BufferSyncer
| Field | Type | Description | | Field | Type | Description |
|-------------|------------------------|-------------| |-------------|-------------------------|-------------|
| LastSeenMsg | `VariantList<Integer>` | -- | | LastSeenMsg | `QVariantList<Integer>` | -- |
| MarkerLines | `VariantList<Integer>` | -- | | MarkerLines | `QVariantList<Integer>` | -- |
## BufferViewConfig ## BufferViewConfig
| Field | Type | Description | | Field | Type | Description |
|----------------------------|------------------------|-------------| |----------------------------|-------------------------|-------------|
| bufferViewName | `string16` | -- | | bufferViewName | `QString` | -- |
| TemporarilyRemovedBuffers | `List<Integer>` | -- | | TemporarilyRemovedBuffers | `List<Integer>` | -- |
| hideInactiveNetworks | `bool` | -- | | hideInactiveNetworks | `Bool` | -- |
| BufferList | `List<Integer>` | -- | | BufferList | `List<Integer>` | -- |
| allowedBufferTypes | `int32` | -- | | allowedBufferTypes | `Int` | -- |
| sortAlphabetically | `bool` | -- | | sortAlphabetically | `Bool` | -- |
| disableDecoration | `bool` | -- | | disableDecoration | `Bool` | -- |
| addNewBuffersAutomatically | `bool` | -- | | addNewBuffersAutomatically | `Bool` | -- |
| networkId | `int32` | -- | | networkId | `Int` | -- |
| minimumActivity | `int32` | -- | | minimumActivity | `Int` | -- |
| hideInactiveBuffers | `bool` | -- | | hideInactiveBuffers | `Bool` | -- |
| RemovedBuffers | `VariantList<Integer>` | -- | | RemovedBuffers | `QVariantList<Integer>` | -- |
## BufferViewManager ## BufferViewManager
| Field | Type | Description | | Field | Type | Description |
|---------------|------------------------|-------------| |---------------|-------------------------|-------------|
| BufferViewIds | `VariantList<Integer>` | -- | | BufferViewIds | `QVariantList<Integer>` | -- |
## IgnoreListManager ## IgnoreListManager
| Field | Type | Description | | Field | Type | Description |
|------------|------------------------|-------------| |------------|-------------------------|-------------|
| scope | `VariantList<Integer>` | -- | | scope | `QVariantList<Integer>` | -- |
| ignoreType | `VariantList<Integer>` | -- | | ignoreType | `QVariantList<Integer>` | -- |
| isActive | `VariantList<Boolean>` | -- | | isActive | `QVariantList<Boolean>` | -- |
| scopeRule | `StringList` | -- | | scopeRule | `QStringList` | -- |
| isRegEx | `VariantList<Boolean>` | -- | | isRegEx | `QVariantList<Boolean>` | -- |
| strictness | `VariantList<Integer>` | -- | | strictness | `QVariantList<Integer>` | -- |
| ignoreRule | `StringList` | -- | | ignoreRule | `QStringList` | -- |
## IrcChannel ## IrcChannel
| Field | Type | Description | | Field | Type | Description |
|-----------|--------------|-------------| |-----------|---------------|-------------|
| name | `string16` | -- | | name | `QString` | -- |
| topic | `string16` | -- | | topic | `QString` | -- |
| password | `string16` | -- | | password | `QString` | -- |
| UserModes | `VariantMap` | -- | | UserModes | `QVariantMap` | -- |
| ChanModes | `VariantMap` | -- | | ChanModes | `QVariantMap` | -- |
| encrypted | `bool` | -- | | encrypted | `Bool` | -- |
## IrcUser ## IrcUser
| Field | Type | Description | | Field | Type | Description |
|-------------------|--------------|-------------| |-------------------|---------------|-------------|
| server | `string16` | -- | | server | `QString` | -- |
| ircOperator | `string16` | -- | | ircOperator | `QString` | -- |
| away | `bool` | -- | | away | `Bool` | -- |
| lastAwayMessage | `int32` | -- | | lastAwayMessage | `Int` | -- |
| idleTime | `DateTime` | -- | | idleTime | `DateTime` | -- |
| whoisServiceReply | `string16` | -- | | whoisServiceReply | `QString` | -- |
| suserHost | `string16` | -- | | suserHost | `QString` | -- |
| nick | `string16` | -- | | nick | `QString` | -- |
| realName | `string16` | -- | | realName | `QString` | -- |
| awayMessage | `string16` | -- | | awayMessage | `QString` | -- |
| loginTime | `DateTime` | -- | | loginTime | `DateTime` | -- |
| encrypted | `bool` | -- | | encrypted | `Bool` | -- |
| channels | `StringList` | -- | | channels | `QStringList` | -- |
| host | `string16` | -- | | host | `QString` | -- |
| userModes | `string16` | -- | | userModes | `QString` | -- |
| user | `string16` | -- | | user | `QString` | -- |
## NetworkConfig ## NetworkConfig
| Field | Type | Description | | Field | Type | Description |
|--------------------|---------|-------------| |--------------------|---------|-------------|
| standardCtcp | `bool` | -- | | standardCtcp | `Bool` | -- |
| autoWhoEnabled | `bool` | -- | | autoWhoEnabled | `Bool` | -- |
| autoWhoDelay | `int32` | -- | | autoWhoDelay | `Int` | -- |
| autoWhoNickLimit | `int32` | -- | | autoWhoNickLimit | `Int` | -- |
| autoWhoInterval | `int32` | -- | | autoWhoInterval | `Int` | -- |
| pingTimeoutEnabled | `bool` | -- | | pingTimeoutEnabled | `Bool` | -- |
| pingInterval | `int32` | -- | | pingInterval | `Int` | -- |
| maxPingCount | `int32` | -- | | maxPingCount | `Int` | -- |
## NetworkInfo ## NetworkInfo
| Field | Type | Description | | Field | Type | Description |
|---------------------------|------------------------------|-------------| |---------------------------|-------------------------------|-------------|
| networkName | `string16` | -- | | networkName | `QString` | -- |
| identityId | `int32` | -- | | identityId | `Int` | -- |
| codecForServer | `string16` | -- | | codecForServer | `QString` | -- |
| codecForEncoding | `string16` | -- | | codecForEncoding | `QString` | -- |
| codecForDecoding | `string16` | -- | | codecForDecoding | `QString` | -- |
| ServerList | `VariantList<NetworkServer>` | -- | | ServerList | `QVariantList<NetworkServer>` | -- |
| useRandomServer | `bool` | -- | | useRandomServer | `Bool` | -- |
| perform | `StringList` | -- | | perform | `QStringList` | -- |
| useAutoIdentify | `bool` | -- | | useAutoIdentify | `Bool` | -- |
| autoIdentifyService | `string16` | -- | | autoIdentifyService | `QString` | -- |
| autoIdentifyPassword | `string16` | -- | | autoIdentifyPassword | `QString` | -- |
| useSasl | `bool` | -- | | useSasl | `Bool` | -- |
| saslAccount | `string16` | -- | | saslAccount | `QString` | -- |
| saslPassword | `string16` | -- | | saslPassword | `QString` | -- |
| useAutoReconnect | `bool` | -- | | useAutoReconnect | `Bool` | -- |
| autoReconnectInterval | `int32` | -- | | autoReconnectInterval | `Int` | -- |
| autoReconnectRetries | `int16` | -- | | autoReconnectRetries | `short` | -- |
| unlimitedReconnectRetries | `bool` | -- | | unlimitedReconnectRetries | `Bool` | -- |
| rejoinChannels | `bool` | -- | | rejoinChannels | `Bool` | -- |
## Network ## Network
| Field | Type | Description | | Field | Type | Description |
|---------------------|------------------------------|-----------------------| |---------------------|-----------------------|-----------------------|
| IrcUsersAndChannels | `IrcUsersAndChannels` | -- | | IrcUsersAndChannels | `IrcUsersAndChannels` | -- |
| Supports | `VariantMap` | -- | | Supports | `QVariantMap` | -- |
| connectionState | `int32` | -- | | connectionState | `Int` | -- |
| currentServer | `string16` | -- | | currentServer | `QString` | -- |
| isConnected | `bool` | -- | | isConnected | `Bool` | -- |
| latency | `int32` | -- | | latency | `Int` | -- |
| myNick | `string16` | -- | | myNick | `QString` | -- |
| -- | `NetworkInfo` | More about this below | | -- | `NetworkInfo` | More about this below |
The NetworkInfo data here isn’t an actual field – it’s serialized into the same The NetworkInfo data here isn’t an actual field – it’s serialized into the same
......
# Features
Legacy features encode the flags of each supported feature, extended features
encodes a QStringList of the names of all supported features.
| Flag | Name | Description |
|------------|------------------------|----------------------------------------------------------------------|
|`0x00000001`| SynchronizedMarkerLine | -- |
|`0x00000002`| SaslAuthentication | -- |
|`0x00000004`| SaslExternal | -- |
|`0x00000008`| HideInactiveNetworks | -- |
|`0x00000010`| PasswordChange | -- |
|`0x00000020`| CapNegotiation | IRCv3 capability negotiation, account tracking |
|`0x00000040`| VerifyServerSSL | IRC server SSL validation |
|`0x00000080`| CustomRateLimits | IRC server custom message rate limits |
|`0x00000100`| DccFileTransfer | Currently not supported |
|`0x00000200`| AwayFormatTimestamp | Timestamp formatting in away (e.g. %%hh:mm%%) |
|`0x00000400`| Authenticators | Support for exchangeable auth backends |
|`0x00000800`| BufferActivitySync | Sync buffer activity status |
|`0x00001000`| CoreSideHighlights | Core-Side highlight configuration and matching |
|`0x00002000`| SenderPrefixes | Show prefixes for senders in backlog |
|`0x00004000`| RemoteDisconnect | Supports RPC call disconnectFromCore to remotely disconnect a client |
|`0x00008000`| ExtendedFeatures | Transmit features as list of strings |
| -- | LongTime | Serialize message time as 64-bit |
| -- | RichMessages | Real Name and Avatar URL in backlog |
| -- | BacklogFilterType | Backlogmanager supports filtering backlog by messagetype |
| -- | EcdsaCertfpKeys | ECDSA keys for CertFP in identities |
| -- | LongMessageId | 64-bit IDs for messages |
| -- | SyncedCoreInfo | CoreInfo dynamically updated using signals |
\ No newline at end of file
# Handshake Types
This document discusses how complex objects are translated to and from
QVariantMaps.
Handshake Types are (de-)serialized to and from QVariantMaps. An additional
key/value pair "MsgType" is added, which contains the name of the
complexStruct’s type – for example `ClientInitAck` – as QString.
## ClientInit
| Field | Type | Description |
|----------------|---------------|-------------------------------------|
| ClientVersion | `QString` | Version of the client |
| BuildDate | `QString` | Build date of the client |
| ClientFeatures | `UInt` | Flags of supported legacy features |
| FeatureList | `QStringList` | List of supported extended features |
## ClientInitReject
| Field | Type | Description |
|-------------|---------|-------------------------------------------------|
| ErrorString | QString | String with an error message of what went wrong |
## ClientInitAck
| Field | Type | Description |
|-------------------|----------------|----------------------------------------------------------|
| CoreFeatures | `UInt` | Flags of supported legacy features |
| CoreConfigured | `Bool` | If the core has already been configured |
| BackendInfo | `QVariantList` | List of QVariantMaps of info on available backends |
| AuthenticatorInfo | `QVariantList` | List of QVariantMaps of info on available authenticators |
| FeatureList | `QStringList` | List of supported extended features |
The BackendInfo/AuthenticatorInfo lists contain a list of available
backends/authenticators, and for each one a list of all parameters with types
and default values.
## CoreSetupData
| Field | Type | Description |
|---------------|---------------|--------------------------------|
| AdminUser | `QString` | Username for the first user |
| AdminPassword | `QString` | Password for the first user |
| Backend | `QString` | Name of selected backend |
| SetupData | `QVariantMap` | Backend setup parameters |
| Authenticator | `QString` | Name of selected authenticator |
| AuthSetupData | `QVariantMap` | Authenticator setup parameters |
## CoreSetupReject
| Field | Type | Description |
|-------------|---------|-------------------------------------------------|
| ErrorString | QString | String with an error message of what went wrong |
## CoreSetupAck
This message has no fields
## ClientLogin
| Field | Type | Description |
|----------|-----------|------------------------|
| User | `QString` | Username for login |
| Password | `QString` | Corresponding password |
## ClientLoginReject
| Field | Type | Description |
|-------------|---------|-------------------------------------------------|
| ErrorString | QString | String with an error message of what went wrong |
## ClientLoginAck
This message has no fields
## SessionInit
| Field | Type | Description |
|-------------|----------------|-----------------------------------|
| Identities | `QVariantList` | List of all configured identities |
| BufferInfos | `QVariantList` | List of all existing buffers |
| NetworkIds | `QVariantList` | Ids of all networks |
\ No newline at end of file
...@@ -4,108 +4,83 @@ All serialization is done in network format big-endian. ...@@ -4,108 +4,83 @@ All serialization is done in network format big-endian.
Serialization of basic types is trivial and will not be discussed here. Serialization of basic types is trivial and will not be discussed here.
`string8` is used to refer to UTF-8 encoded Strings, `string16` is used to
refer to UTF-16BE encoded strings, `string8-null` is used to refer to UTF-8
encoded strings with trailing null byte
Primitive types are serialized by serializing each of their fields Primitive types are serialized by serializing each of their fields
sequentially. sequentially.
## String ## String
Strings are serialized as a signed int of the length in bytes (plus 1 for Strings are serialized as a signed int of the length in bytes plus their content
`string8-null`) plus their content in the specified encoding (plus one in UTF-16BE. If the length is -1, the String is to be considered equivalent to
null-byte for `string8-null`). `NULL`.
If the length is -1, the String is to be considered equivalent to `NULL`.
## StringList ## StringList
StringLists are serialized as an `int32` of the amount of elements, and a StringLists are serialized as an `Int` of the amount of elements, and a
`string16` for each element. `string` for each element.
## Variant ## Variant
First, an `int32` for the type, then an `uint8` for an unknown value, then, First, an `Int` for the type, then an `UChar` for an unknown value, then,
if the type is a usertype, the typename as `string8-null`, and then the if the type is a usertype, the typename as `bytearray` (C-string with null byte
value in its own format. at the end), and then the value in its own format.
### List ### List
VariantLists are serialized as an `int32` of the length, and a `Variant` for VariantLists are serialized as an `Int` of the length, and a `Variant` for
each element. each element.
### Map ### Map
VariantMaps are serialized as an `int32` of the amount of keys, and then VariantMaps are serialized as an `Int` of the amount of keys, and then
for each key a `string16` for the key and a `Variant` for each element. for each key a `QString` for the key and a `Variant` for each element.
### Type ### Type
Warning: `string8` uses the id of QByteArray in the serialization. |Enum |Value | Additional Info |
|-------------|------------|-----------------|
|Enum |Value | |Void |`0x00000000`| |
|-------------|------------| |Bool |`0x00000001`| |
|Void |`0x00000000`| |Int |`0x00000002`|`int32_t` |
|Bool |`0x00000001`| |UInt |`0x00000003`|`uint32_t` |
|Int |`0x00000002`| |QChar |`0x00000007`| |
|UInt |`0x00000003`| |QVariantMap |`0x00000008`| |
|QVariantMap |`0x00000008`| |QVariantList |`0x00000009`| |
|QVariantList |`0x00000009`| |QString |`0x0000000a`| |
|QString |`0x0000000a`| |QStringList |`0x0000000b`| |
|QStringList |`0x0000000b`| |QByteArray |`0x0000000c`| |
|QByteArray |`0x0000000c`| |QTime |`0x0000000f`| |
|QDate |`0x0000000e`| |QDateTime |`0x00000010`| |
|QTime |`0x0000000f`| |UserType |`0x0000007f`| |
|QDateTime |`0x00000010`| |Long |`0x00000081`|`int64_t` |
|QRegExp |`0x0000002b`| |Short |`0x00000082`|`int16_t` |
|UserType |`0x0000007f`| |Char |`0x00000083`|`int8_t` |
|Long |`0x00000081`| |ULong |`0x00000084`|`uint64_t` |
|Short |`0x00000082`| |UShort |`0x00000085`|`uint16_t` |
|Char |`0x00000083`| |UChar |`0x00000086`|`uint8_t` |
|ULong |`0x00000084`| |QVariant |`0x00000090`| |
|UShort |`0x00000085`|
|UChar |`0x00000086`|
|QVariant |`0x00000090`|
|User |`0x00000100`|
|LastType |`0xffffffff`|
## DateTime ## DateTime
|Type |Field |Description | |Type |Field |Description |
|-------|-----------|-----------------------------------------------------| |-------|-----------|-----------------------------------------------------|
|`int32`|julianDay |Day in Julian calendar, unknown if signed or unsigned| |`Int` |julianDay |Day in Julian calendar, unknown if signed or unsigned|
|`int32`|millisOfDay|Milliseconds since start of day | |`Int` |millisOfDay|Milliseconds since start of day |
|`uint8`|zone |Timezone of DateTime, `0x00` is local, `0x01` is UTC | |`UChar`|zone |Timezone of DateTime, `0x00` is local, `0x01` is UTC |
## Time ## Time
|Type |Field |Description | |Type |Field |Description |
|-------|-----------|-------------------------------| |-----|-----------|-------------------------------|
|`int32`|millisOfDay|Milliseconds since start of day| |`Int`|millisOfDay|Milliseconds since start of day|
## Protocol
|Type |Field |Description |
|-------|-------|-----------------------------------|
|`uint8`|flags |See below |
|`int16`|extra |Extra data, depends on the protocol|
|`int8` |version|Protocol Version |
### Flags
|Type |Value |
|-----------|------|
|ssl |`0x01`|
|compression|`0x02`|
## BufferInfo ## BufferInfo
|Type |Field |Description | |Type |Field |Description |
|---------|---------|------------------------------------------------| |------------|---------|------------------------------------------------|
|`int32` |id |BufferId, a unique, sequential id for the buffer| |`Int` |id |BufferId, a unique, sequential id for the buffer|
|`int32` |networkId|NetworkId of the network the buffer belongs to | |`Int` |networkId|NetworkId of the network the buffer belongs to |
|`int16` |type |See below | |`Short` |type |See below |
|`string8`|name |BufferName as displayed to the user | |`QByteArray`|name |(UTF-8) BufferName as displayed to the user |
### Type ### Type
...@@ -120,13 +95,13 @@ Warning: `string8` uses the id of QByteArray in the serialization. ...@@ -120,13 +95,13 @@ Warning: `string8` uses the id of QByteArray in the serialization.
|Type |Field |Description | |Type |Field |Description |
|------------|---------|--------------------------------------------------------------------------------------------| |------------|---------|--------------------------------------------------------------------------------------------|
|`int32` |messageId|The unique, sequential id for the message | |`Int` |messageId|The unique, sequential id for the message |
|`ìnt32` |timestamp|The timestamp of the message in UNIX time (32-bit, seconds) | |`Int` |timestamp|The timestamp of the message in UNIX time (32-bit, seconds) |
|`int32` |type |See below | |`Int` |type |See below |
|`uint8` |flags |See below | |`UChar` |flags |See below |
|`BufferInfo`|buffer |The buffer the message belongs to, usually everything but BufferId is set to `NULL` | |`BufferInfo`|buffer |The buffer the message belongs to, usually everything but BufferId is set to `NULL` |
|`string8` |sender |The sender as `nick!ident@host` | |`QByteArray`|sender |(UTF-8) The sender as `nick!ident@host` |
|`string8` |content |The message content, already stripped from CTCP formatting, but containing mIRC format codes| |`QByteArray`|content |(UTF-8) The message content, already stripped from CTCP formatting, but containing mIRC format codes|
### Type ### Type
......
...@@ -12,9 +12,14 @@ nav: ...@@ -12,9 +12,14 @@ nav:
- "Usage": - "Usage":
- "Upgrade Guide": usage/upgrade_guide.md - "Upgrade Guide": usage/upgrade_guide.md
- "Protocol": - "Protocol":
- "Layers":
- "Framing": protocol/layers/framing.md
- "Message": protocol/layers/message.md
- "Serialization": - "Serialization":
- "Primitive Types": protocol/serialization/primitive.md - "Primitive Types": protocol/serialization/primitive.md
- "Compound Types": protocol/serialization/compound.md - "Compound Types": protocol/serialization/compound.md
- "Features": protocol/serialization/features.md
- "Handshake": protocol/serialization/handshake.md
extra: extra:
social: social:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment