init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
This commit is contained in:
99
Telegram/SourceFiles/codegen/scheme/codegen_scheme.py
Normal file
99
Telegram/SourceFiles/codegen/scheme/codegen_scheme.py
Normal file
@@ -0,0 +1,99 @@
|
||||
'''
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
'''
|
||||
import glob, re, binascii, os, sys
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
scriptPath = os.path.dirname(os.path.realpath(__file__))
|
||||
sys.path.append(scriptPath + '/../../../lib_tl/tl')
|
||||
from generate_tl import generate
|
||||
|
||||
generate({
|
||||
'namespaces': {
|
||||
'creator': 'MTP::details',
|
||||
},
|
||||
'prefixes': {
|
||||
'type': 'MTP',
|
||||
'data': 'MTPD',
|
||||
'id': 'mtpc',
|
||||
'construct': 'MTP_',
|
||||
},
|
||||
'types': {
|
||||
'prime': 'mtpPrime',
|
||||
'typeId': 'mtpTypeId',
|
||||
'buffer': 'mtpBuffer',
|
||||
},
|
||||
'sections': [
|
||||
'read-write',
|
||||
],
|
||||
|
||||
# define some checked flag conversions
|
||||
# the key flag type should be a subset of the value flag type
|
||||
# with exact the same names, then the key flag can be implicitly
|
||||
# casted to the value flag type
|
||||
'flagInheritance': {
|
||||
'messageService': 'message',
|
||||
'updateShortMessage': 'message',
|
||||
'updateShortChatMessage': 'message',
|
||||
'updateShortSentMessage': 'message',
|
||||
'replyKeyboardHide': 'replyKeyboardMarkup',
|
||||
'replyKeyboardForceReply': 'replyKeyboardMarkup',
|
||||
'inputPeerNotifySettings': 'peerNotifySettings',
|
||||
'peerNotifySettings': 'inputPeerNotifySettings',
|
||||
'channelForbidden': 'channel',
|
||||
'dialogFolder': 'dialog',
|
||||
},
|
||||
|
||||
'typeIdExceptions': [
|
||||
'channel#c88974ac',
|
||||
'ipPortSecret#37982646',
|
||||
'accessPointRule#4679b65f',
|
||||
'help.configSimple#5a592a6c',
|
||||
'messageReplies#81834865',
|
||||
],
|
||||
|
||||
'renamedTypes': {
|
||||
'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow': 'passwordKdfAlgoModPow',
|
||||
},
|
||||
|
||||
'skip': [
|
||||
'int ? = Int;',
|
||||
'long ? = Long;',
|
||||
'double ? = Double;',
|
||||
'string ? = String;',
|
||||
|
||||
'vector {t:Type} # [ t ] = Vector t;',
|
||||
|
||||
'int128 4*[ int ] = Int128;',
|
||||
'int256 8*[ int ] = Int256;',
|
||||
|
||||
'vector#1cb5c415 {t:Type} # [ t ] = Vector t;',
|
||||
],
|
||||
'builtin': [
|
||||
'int',
|
||||
'long',
|
||||
'double',
|
||||
'string',
|
||||
'bytes',
|
||||
'int128',
|
||||
'int256',
|
||||
],
|
||||
'builtinTemplates': [
|
||||
'vector',
|
||||
'flags',
|
||||
],
|
||||
'synonyms': {
|
||||
'bytes': 'string',
|
||||
},
|
||||
'builtinInclude': 'mtproto/core_types.h',
|
||||
'optimizeSingleData': True,
|
||||
|
||||
'dumpToText': {
|
||||
'include': 'mtproto/details/mtproto_dump_to_text.h',
|
||||
},
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user