mtp/example-type-maps.yaml

94 lines
2.3 KiB
YAML

#################################################################################
# This is an example, overwrite it for your project to register your own types. #
#################################################################################
# The version a Client should use
protocol_version: "0.0"
# Note that markers 0 to 31 are reserved for default use, manually working with them is not recommended
# Fixed CommunicationType markers are:
# Identification: 0
# IdentificationResponse: 1
# Register: 2
# RegisterResponse: 3
# Challenge: 4
# ChallengeResponse: 5
# Ping: 6
# Pong: 7
# Disconnect: 8
# Redirect: 9
# Shutdown: 10
# Error: 11
# ErrorParsing: 12
# ErrorBadVersion: 13
# BadRequest: 14
# Unauthorized: 15
# Forbidden: 16
# NotFound: 17
# TooManyRequests: 18
# InternalServerError: 19
# BadGateway: 20
# ServiceUnavailable: 21
# GatewayTimeout: 22
# Relay: 26
# PipeRequest: 23
# PipeResponse: 24
# PipeAbort: 25
#
# Fixed Data Type markers are:
# Version: 0
# id: 1
# ClientNonce: 2
# ServerNonce: 3
# PublicKeys: 4
# Signature: 5
# PqSignature: 6
# Description: 7
# Connected: 8
# Timestamp: 9
# Error: 10
# ErrorParsing: 11
# ErrorMessage: 12
# Accepted: 13,
# RequirePq: 14
# MessageId: 15
# FinalRecipientId: 18
# CreatedAt: 21
# MessageType: 22
# Content: 23
# Metadata: 24
# RelayVersion: 25
# ProtectedVersion: 26
#
# Types absent from a protocol version cannot be encoded for that version.
type_maps:
"0.0": # Protocol version 0.0
CommunicationTypes:
ProtectedMessage: 32
AlternateMessage: 33
DataTypes:
ExampleType: 32
"1.0":
CommunicationTypes:
ProtectedMessage: 32
AlternateMessage: 33
DataTypes:
# If a v0.0 client connects
# - the server can't use "AnotherType"
# - the server maps "ExampleType" to 32
AnotherType: 32
ExampleType: 33
SomeType: 34
"2.0":
CommunicationTypes:
ProtectedMessage: 32
AlternateMessage: 33
DataTypes:
# If a v0.0 client connects
# - the server can't use "AnotherType"
# If a v1.0 client connects
# - the server can't use "ExampleType"
# - the server maps "SomeType" to 33, and "AnotherType" to 32
SomeType: 32
AnotherType: 33