Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasseldroid-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
quasseldroid-docs
Commits
e9d2b3fb
Verified
Commit
e9d2b3fb
authored
5 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Add conditional serialization information
parent
a2980edd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/protocol/serialization/primitive_objects.md
+32
-10
32 additions, 10 deletions
docs/protocol/serialization/primitive_objects.md
with
32 additions
and
10 deletions
docs/protocol/serialization/primitive_objects.md
+
32
−
10
View file @
e9d2b3fb
...
...
@@ -18,7 +18,7 @@ type whose network representation they borrow here:
|BufferId |
`Int`
|
|IdentityId |
`Int`
|
|NetworkId |
`Int`
|
|MsgId |
`
Long`
|
|MsgId |
`
Int`
|
|PeerPtr |
`Long`
|
|IrcUser |
`QVariantMap`
|
|IrcChannel |
`QVariantMap`
|
...
...
@@ -26,6 +26,10 @@ type whose network representation they borrow here:
|NetworkInfo |
`QVariantMap`
|
|Network::Server|
`QVariantMap`
|
MsgId’s serialization changes depending on which features are available on both
client and server. Specifically, if "LongMessageId" is available, it is
serialized as long, and its values can go above INT_MAX.
## String
Strings are serialized as a signed int of the length in bytes plus their content
...
...
@@ -113,15 +117,33 @@ for each key a `QString` for the key and a `Variant` for each element.
## Message
|Type |Field |Description |
|------------|---------
|
--------------------------------------------------------------------------------------------|
|
`
Int`
|messageId|The unique, sequential id for the message |
|------------|---------
-----|--------
--------------------------------------------------------------------------------------------|
|
`
MsgId`
|messageId
|The unique, sequential id for the message
|
|
`Int`
|timestamp |The timestamp of the message in UNIX time (32-bit, seconds) |
|
`Long`
| |
**CONDITIONAL**
: Different Type (Long) if LongTime feature is enabled |
|
`Int`
|type |See below |
|
`UChar`
|flags |See below |
|
`BufferInfo`
|buffer |The buffer the message belongs to, usually everything but BufferId is set to
`NULL`
|
|
`QByteArray`
|sender |(UTF-8) The sender as
`nick!ident@host`
|
|
`QByteArray`
|senderPrefixes|(UTF-8) The prefix modes of the sender |
| | |
**CONDITIONAL**
: Only serialized if SenderPrefixes feature is enabled |
|
`QByteArray`
|realName |(UTF-8) The realName of the sender |
| | |
**CONDITIONAL**
: Only serialized if RichMessages feature is enabled |
|
`QByteArray`
|avatarUrl |(UTF-8) The avatarUrl of the sender, if available |
| | |
**CONDITIONAL**
: Only serialized if RichMessages feature is enabled |
|
`QByteArray`
|content |(UTF-8) The message content, already stripped from CTCP formatting, but containing mIRC format codes|
This type's serialization format depends heavily on the available features — if
both client and server support a certain feature, additional fields are added or
changed.
|Field |Feature |Effect |
|--------------|--------------|-----------------------------------------------------------------------|
|timestamp |LongTime |Type is Long instead of Int, content is milliseconds instead of seconds|
|senderPrefixes|SenderPrefixes|Field is serialized only with feature present |
|realName |RichMessages |Field is serialized only with feature present |
|avatarUrl |RichMessages |Field is serialized only with feature present |
### Type
|Enum |Value |
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment