2014-05-30 08:53:19 +00:00
|
|
|
'''
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-05-30 08:53:19 +00:00
|
|
|
'''
|
2017-03-16 09:37:56 +00:00
|
|
|
import glob, re, binascii, os, sys
|
|
|
|
|
2019-09-26 14:26:36 +00:00
|
|
|
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': {
|
2019-12-02 13:10:19 +00:00
|
|
|
'creator': 'MTP::details',
|
2019-09-26 14:26:36 +00:00
|
|
|
},
|
|
|
|
'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',
|
2020-09-01 06:44:18 +00:00
|
|
|
'messageReplies#81834865',
|
2019-09-26 14:26:36 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'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',
|
|
|
|
|
2019-11-14 15:29:45 +00:00
|
|
|
'dumpToText': {
|
|
|
|
'include': 'mtproto/details/mtproto_dump_to_text.h',
|
|
|
|
},
|
|
|
|
|
2019-09-26 14:26:36 +00:00
|
|
|
})
|