diff --git a/autogenerated/clientsyncmanager.h b/autogenerated/clientsyncmanager.h index d33f05d..39d5902 100644 --- a/autogenerated/clientsyncmanager.h +++ b/autogenerated/clientsyncmanager.h @@ -4,12 +4,12 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "types/update.h" -#include +#include "../config/telegramconfig.h" #include "tltypes.h" #include "types/updatesstate.h" +#include #include "types/updates.h" -#include "../config/telegramconfig.h" +#include "types/update.h" class ClientSyncManager: public QObject { diff --git a/autogenerated/mtproto/clientdhinnerdata.cpp b/autogenerated/mtproto/clientdhinnerdata.cpp index 082dbd3..0946ccc 100644 --- a/autogenerated/mtproto/clientdhinnerdata.cpp +++ b/autogenerated/mtproto/clientdhinnerdata.cpp @@ -21,7 +21,7 @@ void ClientDHInnerData::read(MTProtoStream* mtstream) this->_nonce = mtstream->readTLInt128(); this->_server_nonce = mtstream->readTLInt128(); this->_retry_id = mtstream->readTLLong(); - this->_g_b = mtstream->readTLString(); + this->_g_b = mtstream->readTLBytes(); } } @@ -37,7 +37,7 @@ void ClientDHInnerData::write(MTProtoStream* mtstream) mtstream->writeTLInt128(this->_nonce); mtstream->writeTLInt128(this->_server_nonce); mtstream->writeTLLong(this->_retry_id); - mtstream->writeTLString(this->_g_b); + mtstream->writeTLBytes(this->_g_b); } } @@ -88,12 +88,12 @@ void ClientDHInnerData::setRetryId(TLLong retry_id) emit retryIdChanged(); } -TLString ClientDHInnerData::gB() const +TLBytes ClientDHInnerData::gB() const { return this->_g_b; } -void ClientDHInnerData::setGB(TLString g_b) +void ClientDHInnerData::setGB(TLBytes g_b) { if(this->_g_b == g_b) return; diff --git a/autogenerated/mtproto/clientdhinnerdata.h b/autogenerated/mtproto/clientdhinnerdata.h index 5087d3e..6ac2b07 100644 --- a/autogenerated/mtproto/clientdhinnerdata.h +++ b/autogenerated/mtproto/clientdhinnerdata.h @@ -14,7 +14,7 @@ class ClientDHInnerData: public TelegramObject Q_PROPERTY(TLInt128 nonce READ nonce WRITE setNonce NOTIFY nonceChanged) Q_PROPERTY(TLInt128 serverNonce READ serverNonce WRITE setServerNonce NOTIFY serverNonceChanged) Q_PROPERTY(TLLong retryId READ retryId WRITE setRetryId NOTIFY retryIdChanged) - Q_PROPERTY(TLString gB READ gB WRITE setGB NOTIFY gBChanged) + Q_PROPERTY(TLBytes gB READ gB WRITE setGB NOTIFY gBChanged) Q_ENUMS(Constructors) @@ -36,8 +36,8 @@ class ClientDHInnerData: public TelegramObject void setServerNonce(TLInt128 server_nonce); TLLong retryId() const; void setRetryId(TLLong retry_id); - TLString gB() const; - void setGB(TLString g_b); + TLBytes gB() const; + void setGB(TLBytes g_b); signals: void nonceChanged(); @@ -49,7 +49,7 @@ class ClientDHInnerData: public TelegramObject TLInt128 _nonce; TLInt128 _server_nonce; TLLong _retry_id; - TLString _g_b; + TLBytes _g_b; }; diff --git a/autogenerated/mtproto/decompiler/decompilertable.cpp b/autogenerated/mtproto/decompiler/decompilertable.cpp index 53bdb3a..2f4af0b 100644 --- a/autogenerated/mtproto/decompiler/decompilertable.cpp +++ b/autogenerated/mtproto/decompiler/decompilertable.cpp @@ -21,6 +21,186 @@ QString DecompilerTable::constructorName(TLConstructor ctor) void DecompilerTable::initConstructors() { + DecompilerTable::_constructors[TLTypes::authCheckPhone] = "authCheckPhone"; + DecompilerTable::_constructors[TLTypes::authSendCode] = "authSendCode"; + DecompilerTable::_constructors[TLTypes::authSignUp] = "authSignUp"; + DecompilerTable::_constructors[TLTypes::authSignIn] = "authSignIn"; + DecompilerTable::_constructors[TLTypes::authLogOut] = "authLogOut"; + DecompilerTable::_constructors[TLTypes::authResetAuthorizations] = "authResetAuthorizations"; + DecompilerTable::_constructors[TLTypes::authSendInvites] = "authSendInvites"; + DecompilerTable::_constructors[TLTypes::authExportAuthorization] = "authExportAuthorization"; + DecompilerTable::_constructors[TLTypes::authImportAuthorization] = "authImportAuthorization"; + DecompilerTable::_constructors[TLTypes::authBindTempAuthKey] = "authBindTempAuthKey"; + DecompilerTable::_constructors[TLTypes::authImportBotAuthorization] = "authImportBotAuthorization"; + DecompilerTable::_constructors[TLTypes::authCheckPassword] = "authCheckPassword"; + DecompilerTable::_constructors[TLTypes::authRequestPasswordRecovery] = "authRequestPasswordRecovery"; + DecompilerTable::_constructors[TLTypes::authRecoverPassword] = "authRecoverPassword"; + DecompilerTable::_constructors[TLTypes::authResendCode] = "authResendCode"; + DecompilerTable::_constructors[TLTypes::authCancelCode] = "authCancelCode"; + DecompilerTable::_constructors[TLTypes::authDropTempAuthKeys] = "authDropTempAuthKeys"; + DecompilerTable::_constructors[TLTypes::accountRegisterDevice] = "accountRegisterDevice"; + DecompilerTable::_constructors[TLTypes::accountUnregisterDevice] = "accountUnregisterDevice"; + DecompilerTable::_constructors[TLTypes::accountUpdateNotifySettings] = "accountUpdateNotifySettings"; + DecompilerTable::_constructors[TLTypes::accountGetNotifySettings] = "accountGetNotifySettings"; + DecompilerTable::_constructors[TLTypes::accountResetNotifySettings] = "accountResetNotifySettings"; + DecompilerTable::_constructors[TLTypes::accountUpdateProfile] = "accountUpdateProfile"; + DecompilerTable::_constructors[TLTypes::accountUpdateStatus] = "accountUpdateStatus"; + DecompilerTable::_constructors[TLTypes::accountGetWallPapers] = "accountGetWallPapers"; + DecompilerTable::_constructors[TLTypes::accountReportPeer] = "accountReportPeer"; + DecompilerTable::_constructors[TLTypes::accountCheckUsername] = "accountCheckUsername"; + DecompilerTable::_constructors[TLTypes::accountUpdateUsername] = "accountUpdateUsername"; + DecompilerTable::_constructors[TLTypes::accountGetPrivacy] = "accountGetPrivacy"; + DecompilerTable::_constructors[TLTypes::accountSetPrivacy] = "accountSetPrivacy"; + DecompilerTable::_constructors[TLTypes::accountDeleteAccount] = "accountDeleteAccount"; + DecompilerTable::_constructors[TLTypes::accountGetAccountTTL] = "accountGetAccountTTL"; + DecompilerTable::_constructors[TLTypes::accountSetAccountTTL] = "accountSetAccountTTL"; + DecompilerTable::_constructors[TLTypes::accountSendChangePhoneCode] = "accountSendChangePhoneCode"; + DecompilerTable::_constructors[TLTypes::accountChangePhone] = "accountChangePhone"; + DecompilerTable::_constructors[TLTypes::accountUpdateDeviceLocked] = "accountUpdateDeviceLocked"; + DecompilerTable::_constructors[TLTypes::accountGetAuthorizations] = "accountGetAuthorizations"; + DecompilerTable::_constructors[TLTypes::accountResetAuthorization] = "accountResetAuthorization"; + DecompilerTable::_constructors[TLTypes::accountGetPassword] = "accountGetPassword"; + DecompilerTable::_constructors[TLTypes::accountGetPasswordSettings] = "accountGetPasswordSettings"; + DecompilerTable::_constructors[TLTypes::accountUpdatePasswordSettings] = "accountUpdatePasswordSettings"; + DecompilerTable::_constructors[TLTypes::accountSendConfirmPhoneCode] = "accountSendConfirmPhoneCode"; + DecompilerTable::_constructors[TLTypes::accountConfirmPhone] = "accountConfirmPhone"; + DecompilerTable::_constructors[TLTypes::usersGetUsers] = "usersGetUsers"; + DecompilerTable::_constructors[TLTypes::usersGetFullUser] = "usersGetFullUser"; + DecompilerTable::_constructors[TLTypes::contactsGetStatuses] = "contactsGetStatuses"; + DecompilerTable::_constructors[TLTypes::contactsGetContacts] = "contactsGetContacts"; + DecompilerTable::_constructors[TLTypes::contactsImportContacts] = "contactsImportContacts"; + DecompilerTable::_constructors[TLTypes::contactsDeleteContact] = "contactsDeleteContact"; + DecompilerTable::_constructors[TLTypes::contactsDeleteContacts] = "contactsDeleteContacts"; + DecompilerTable::_constructors[TLTypes::contactsBlock] = "contactsBlock"; + DecompilerTable::_constructors[TLTypes::contactsUnblock] = "contactsUnblock"; + DecompilerTable::_constructors[TLTypes::contactsGetBlocked] = "contactsGetBlocked"; + DecompilerTable::_constructors[TLTypes::contactsExportCard] = "contactsExportCard"; + DecompilerTable::_constructors[TLTypes::contactsImportCard] = "contactsImportCard"; + DecompilerTable::_constructors[TLTypes::contactsSearch] = "contactsSearch"; + DecompilerTable::_constructors[TLTypes::contactsResolveUsername] = "contactsResolveUsername"; + DecompilerTable::_constructors[TLTypes::contactsGetTopPeers] = "contactsGetTopPeers"; + DecompilerTable::_constructors[TLTypes::contactsResetTopPeerRating] = "contactsResetTopPeerRating"; + DecompilerTable::_constructors[TLTypes::messagesGetMessages] = "messagesGetMessages"; + DecompilerTable::_constructors[TLTypes::messagesGetDialogs] = "messagesGetDialogs"; + DecompilerTable::_constructors[TLTypes::messagesGetHistory] = "messagesGetHistory"; + DecompilerTable::_constructors[TLTypes::messagesSearch] = "messagesSearch"; + DecompilerTable::_constructors[TLTypes::messagesReadHistory] = "messagesReadHistory"; + DecompilerTable::_constructors[TLTypes::messagesDeleteHistory] = "messagesDeleteHistory"; + DecompilerTable::_constructors[TLTypes::messagesDeleteMessages] = "messagesDeleteMessages"; + DecompilerTable::_constructors[TLTypes::messagesReceivedMessages] = "messagesReceivedMessages"; + DecompilerTable::_constructors[TLTypes::messagesSetTyping] = "messagesSetTyping"; + DecompilerTable::_constructors[TLTypes::messagesSendMessage] = "messagesSendMessage"; + DecompilerTable::_constructors[TLTypes::messagesSendMedia] = "messagesSendMedia"; + DecompilerTable::_constructors[TLTypes::messagesForwardMessages] = "messagesForwardMessages"; + DecompilerTable::_constructors[TLTypes::messagesReportSpam] = "messagesReportSpam"; + DecompilerTable::_constructors[TLTypes::messagesHideReportSpam] = "messagesHideReportSpam"; + DecompilerTable::_constructors[TLTypes::messagesGetPeerSettings] = "messagesGetPeerSettings"; + DecompilerTable::_constructors[TLTypes::messagesGetChats] = "messagesGetChats"; + DecompilerTable::_constructors[TLTypes::messagesGetFullChat] = "messagesGetFullChat"; + DecompilerTable::_constructors[TLTypes::messagesEditChatTitle] = "messagesEditChatTitle"; + DecompilerTable::_constructors[TLTypes::messagesEditChatPhoto] = "messagesEditChatPhoto"; + DecompilerTable::_constructors[TLTypes::messagesAddChatUser] = "messagesAddChatUser"; + DecompilerTable::_constructors[TLTypes::messagesDeleteChatUser] = "messagesDeleteChatUser"; + DecompilerTable::_constructors[TLTypes::messagesCreateChat] = "messagesCreateChat"; + DecompilerTable::_constructors[TLTypes::messagesForwardMessage] = "messagesForwardMessage"; + DecompilerTable::_constructors[TLTypes::messagesGetDhConfig] = "messagesGetDhConfig"; + DecompilerTable::_constructors[TLTypes::messagesRequestEncryption] = "messagesRequestEncryption"; + DecompilerTable::_constructors[TLTypes::messagesAcceptEncryption] = "messagesAcceptEncryption"; + DecompilerTable::_constructors[TLTypes::messagesDiscardEncryption] = "messagesDiscardEncryption"; + DecompilerTable::_constructors[TLTypes::messagesSetEncryptedTyping] = "messagesSetEncryptedTyping"; + DecompilerTable::_constructors[TLTypes::messagesReadEncryptedHistory] = "messagesReadEncryptedHistory"; + DecompilerTable::_constructors[TLTypes::messagesSendEncrypted] = "messagesSendEncrypted"; + DecompilerTable::_constructors[TLTypes::messagesSendEncryptedFile] = "messagesSendEncryptedFile"; + DecompilerTable::_constructors[TLTypes::messagesSendEncryptedService] = "messagesSendEncryptedService"; + DecompilerTable::_constructors[TLTypes::messagesReceivedQueue] = "messagesReceivedQueue"; + DecompilerTable::_constructors[TLTypes::messagesReadMessageContents] = "messagesReadMessageContents"; + DecompilerTable::_constructors[TLTypes::messagesGetAllStickers] = "messagesGetAllStickers"; + DecompilerTable::_constructors[TLTypes::messagesGetWebPagePreview] = "messagesGetWebPagePreview"; + DecompilerTable::_constructors[TLTypes::messagesExportChatInvite] = "messagesExportChatInvite"; + DecompilerTable::_constructors[TLTypes::messagesCheckChatInvite] = "messagesCheckChatInvite"; + DecompilerTable::_constructors[TLTypes::messagesImportChatInvite] = "messagesImportChatInvite"; + DecompilerTable::_constructors[TLTypes::messagesGetStickerSet] = "messagesGetStickerSet"; + DecompilerTable::_constructors[TLTypes::messagesInstallStickerSet] = "messagesInstallStickerSet"; + DecompilerTable::_constructors[TLTypes::messagesUninstallStickerSet] = "messagesUninstallStickerSet"; + DecompilerTable::_constructors[TLTypes::messagesStartBot] = "messagesStartBot"; + DecompilerTable::_constructors[TLTypes::messagesGetMessagesViews] = "messagesGetMessagesViews"; + DecompilerTable::_constructors[TLTypes::messagesToggleChatAdmins] = "messagesToggleChatAdmins"; + DecompilerTable::_constructors[TLTypes::messagesEditChatAdmin] = "messagesEditChatAdmin"; + DecompilerTable::_constructors[TLTypes::messagesMigrateChat] = "messagesMigrateChat"; + DecompilerTable::_constructors[TLTypes::messagesSearchGlobal] = "messagesSearchGlobal"; + DecompilerTable::_constructors[TLTypes::messagesReorderStickerSets] = "messagesReorderStickerSets"; + DecompilerTable::_constructors[TLTypes::messagesGetDocumentByHash] = "messagesGetDocumentByHash"; + DecompilerTable::_constructors[TLTypes::messagesSearchGifs] = "messagesSearchGifs"; + DecompilerTable::_constructors[TLTypes::messagesGetSavedGifs] = "messagesGetSavedGifs"; + DecompilerTable::_constructors[TLTypes::messagesSaveGif] = "messagesSaveGif"; + DecompilerTable::_constructors[TLTypes::messagesGetInlineBotResults] = "messagesGetInlineBotResults"; + DecompilerTable::_constructors[TLTypes::messagesSetInlineBotResults] = "messagesSetInlineBotResults"; + DecompilerTable::_constructors[TLTypes::messagesSendInlineBotResult] = "messagesSendInlineBotResult"; + DecompilerTable::_constructors[TLTypes::messagesGetMessageEditData] = "messagesGetMessageEditData"; + DecompilerTable::_constructors[TLTypes::messagesEditMessage] = "messagesEditMessage"; + DecompilerTable::_constructors[TLTypes::messagesEditInlineBotMessage] = "messagesEditInlineBotMessage"; + DecompilerTable::_constructors[TLTypes::messagesGetBotCallbackAnswer] = "messagesGetBotCallbackAnswer"; + DecompilerTable::_constructors[TLTypes::messagesSetBotCallbackAnswer] = "messagesSetBotCallbackAnswer"; + DecompilerTable::_constructors[TLTypes::messagesGetPeerDialogs] = "messagesGetPeerDialogs"; + DecompilerTable::_constructors[TLTypes::messagesSaveDraft] = "messagesSaveDraft"; + DecompilerTable::_constructors[TLTypes::messagesGetAllDrafts] = "messagesGetAllDrafts"; + DecompilerTable::_constructors[TLTypes::messagesGetFeaturedStickers] = "messagesGetFeaturedStickers"; + DecompilerTable::_constructors[TLTypes::messagesReadFeaturedStickers] = "messagesReadFeaturedStickers"; + DecompilerTable::_constructors[TLTypes::messagesGetRecentStickers] = "messagesGetRecentStickers"; + DecompilerTable::_constructors[TLTypes::messagesSaveRecentSticker] = "messagesSaveRecentSticker"; + DecompilerTable::_constructors[TLTypes::messagesClearRecentStickers] = "messagesClearRecentStickers"; + DecompilerTable::_constructors[TLTypes::messagesGetArchivedStickers] = "messagesGetArchivedStickers"; + DecompilerTable::_constructors[TLTypes::messagesGetMaskStickers] = "messagesGetMaskStickers"; + DecompilerTable::_constructors[TLTypes::messagesGetAttachedStickers] = "messagesGetAttachedStickers"; + DecompilerTable::_constructors[TLTypes::messagesSetGameScore] = "messagesSetGameScore"; + DecompilerTable::_constructors[TLTypes::messagesSetInlineGameScore] = "messagesSetInlineGameScore"; + DecompilerTable::_constructors[TLTypes::messagesGetGameHighScores] = "messagesGetGameHighScores"; + DecompilerTable::_constructors[TLTypes::messagesGetInlineGameHighScores] = "messagesGetInlineGameHighScores"; + DecompilerTable::_constructors[TLTypes::updatesGetState] = "updatesGetState"; + DecompilerTable::_constructors[TLTypes::updatesGetDifference] = "updatesGetDifference"; + DecompilerTable::_constructors[TLTypes::updatesGetChannelDifference] = "updatesGetChannelDifference"; + DecompilerTable::_constructors[TLTypes::photosUpdateProfilePhoto] = "photosUpdateProfilePhoto"; + DecompilerTable::_constructors[TLTypes::photosUploadProfilePhoto] = "photosUploadProfilePhoto"; + DecompilerTable::_constructors[TLTypes::photosDeletePhotos] = "photosDeletePhotos"; + DecompilerTable::_constructors[TLTypes::photosGetUserPhotos] = "photosGetUserPhotos"; + DecompilerTable::_constructors[TLTypes::uploadSaveFilePart] = "uploadSaveFilePart"; + DecompilerTable::_constructors[TLTypes::uploadGetFile] = "uploadGetFile"; + DecompilerTable::_constructors[TLTypes::uploadSaveBigFilePart] = "uploadSaveBigFilePart"; + DecompilerTable::_constructors[TLTypes::helpGetConfig] = "helpGetConfig"; + DecompilerTable::_constructors[TLTypes::helpGetNearestDc] = "helpGetNearestDc"; + DecompilerTable::_constructors[TLTypes::helpGetAppUpdate] = "helpGetAppUpdate"; + DecompilerTable::_constructors[TLTypes::helpSaveAppLog] = "helpSaveAppLog"; + DecompilerTable::_constructors[TLTypes::helpGetInviteText] = "helpGetInviteText"; + DecompilerTable::_constructors[TLTypes::helpGetSupport] = "helpGetSupport"; + DecompilerTable::_constructors[TLTypes::helpGetAppChangelog] = "helpGetAppChangelog"; + DecompilerTable::_constructors[TLTypes::helpGetTermsOfService] = "helpGetTermsOfService"; + DecompilerTable::_constructors[TLTypes::channelsReadHistory] = "channelsReadHistory"; + DecompilerTable::_constructors[TLTypes::channelsDeleteMessages] = "channelsDeleteMessages"; + DecompilerTable::_constructors[TLTypes::channelsDeleteUserHistory] = "channelsDeleteUserHistory"; + DecompilerTable::_constructors[TLTypes::channelsReportSpam] = "channelsReportSpam"; + DecompilerTable::_constructors[TLTypes::channelsGetMessages] = "channelsGetMessages"; + DecompilerTable::_constructors[TLTypes::channelsGetParticipants] = "channelsGetParticipants"; + DecompilerTable::_constructors[TLTypes::channelsGetParticipant] = "channelsGetParticipant"; + DecompilerTable::_constructors[TLTypes::channelsGetChannels] = "channelsGetChannels"; + DecompilerTable::_constructors[TLTypes::channelsGetFullChannel] = "channelsGetFullChannel"; + DecompilerTable::_constructors[TLTypes::channelsCreateChannel] = "channelsCreateChannel"; + DecompilerTable::_constructors[TLTypes::channelsEditAbout] = "channelsEditAbout"; + DecompilerTable::_constructors[TLTypes::channelsEditAdmin] = "channelsEditAdmin"; + DecompilerTable::_constructors[TLTypes::channelsEditTitle] = "channelsEditTitle"; + DecompilerTable::_constructors[TLTypes::channelsEditPhoto] = "channelsEditPhoto"; + DecompilerTable::_constructors[TLTypes::channelsCheckUsername] = "channelsCheckUsername"; + DecompilerTable::_constructors[TLTypes::channelsUpdateUsername] = "channelsUpdateUsername"; + DecompilerTable::_constructors[TLTypes::channelsJoinChannel] = "channelsJoinChannel"; + DecompilerTable::_constructors[TLTypes::channelsLeaveChannel] = "channelsLeaveChannel"; + DecompilerTable::_constructors[TLTypes::channelsInviteToChannel] = "channelsInviteToChannel"; + DecompilerTable::_constructors[TLTypes::channelsKickFromChannel] = "channelsKickFromChannel"; + DecompilerTable::_constructors[TLTypes::channelsExportInvite] = "channelsExportInvite"; + DecompilerTable::_constructors[TLTypes::channelsDeleteChannel] = "channelsDeleteChannel"; + DecompilerTable::_constructors[TLTypes::channelsToggleInvites] = "channelsToggleInvites"; + DecompilerTable::_constructors[TLTypes::channelsExportMessageLink] = "channelsExportMessageLink"; + DecompilerTable::_constructors[TLTypes::channelsToggleSignatures] = "channelsToggleSignatures"; + DecompilerTable::_constructors[TLTypes::channelsUpdatePinnedMessage] = "channelsUpdatePinnedMessage"; + DecompilerTable::_constructors[TLTypes::channelsGetAdminedPublicChannels] = "channelsGetAdminedPublicChannels"; DecompilerTable::_constructors[TLTypes::BoolFalse] = "BoolFalse"; DecompilerTable::_constructors[TLTypes::BoolTrue] = "BoolTrue"; DecompilerTable::_constructors[TLTypes::TLTrue] = "TLTrue"; @@ -475,186 +655,15 @@ void DecompilerTable::initConstructors() DecompilerTable::_constructors[TLTypes::InputGameShortName] = "InputGameShortName"; DecompilerTable::_constructors[TLTypes::HighScore] = "HighScore"; DecompilerTable::_constructors[TLTypes::MessagesHighScores] = "MessagesHighScores"; - DecompilerTable::_constructors[TLTypes::authCheckPhone] = "authCheckPhone"; - DecompilerTable::_constructors[TLTypes::authSendCode] = "authSendCode"; - DecompilerTable::_constructors[TLTypes::authSignUp] = "authSignUp"; - DecompilerTable::_constructors[TLTypes::authSignIn] = "authSignIn"; - DecompilerTable::_constructors[TLTypes::authLogOut] = "authLogOut"; - DecompilerTable::_constructors[TLTypes::authResetAuthorizations] = "authResetAuthorizations"; - DecompilerTable::_constructors[TLTypes::authSendInvites] = "authSendInvites"; - DecompilerTable::_constructors[TLTypes::authExportAuthorization] = "authExportAuthorization"; - DecompilerTable::_constructors[TLTypes::authImportAuthorization] = "authImportAuthorization"; - DecompilerTable::_constructors[TLTypes::authBindTempAuthKey] = "authBindTempAuthKey"; - DecompilerTable::_constructors[TLTypes::authImportBotAuthorization] = "authImportBotAuthorization"; - DecompilerTable::_constructors[TLTypes::authCheckPassword] = "authCheckPassword"; - DecompilerTable::_constructors[TLTypes::authRequestPasswordRecovery] = "authRequestPasswordRecovery"; - DecompilerTable::_constructors[TLTypes::authRecoverPassword] = "authRecoverPassword"; - DecompilerTable::_constructors[TLTypes::authResendCode] = "authResendCode"; - DecompilerTable::_constructors[TLTypes::authCancelCode] = "authCancelCode"; - DecompilerTable::_constructors[TLTypes::authDropTempAuthKeys] = "authDropTempAuthKeys"; - DecompilerTable::_constructors[TLTypes::accountRegisterDevice] = "accountRegisterDevice"; - DecompilerTable::_constructors[TLTypes::accountUnregisterDevice] = "accountUnregisterDevice"; - DecompilerTable::_constructors[TLTypes::accountUpdateNotifySettings] = "accountUpdateNotifySettings"; - DecompilerTable::_constructors[TLTypes::accountGetNotifySettings] = "accountGetNotifySettings"; - DecompilerTable::_constructors[TLTypes::accountResetNotifySettings] = "accountResetNotifySettings"; - DecompilerTable::_constructors[TLTypes::accountUpdateProfile] = "accountUpdateProfile"; - DecompilerTable::_constructors[TLTypes::accountUpdateStatus] = "accountUpdateStatus"; - DecompilerTable::_constructors[TLTypes::accountGetWallPapers] = "accountGetWallPapers"; - DecompilerTable::_constructors[TLTypes::accountReportPeer] = "accountReportPeer"; - DecompilerTable::_constructors[TLTypes::accountCheckUsername] = "accountCheckUsername"; - DecompilerTable::_constructors[TLTypes::accountUpdateUsername] = "accountUpdateUsername"; - DecompilerTable::_constructors[TLTypes::accountGetPrivacy] = "accountGetPrivacy"; - DecompilerTable::_constructors[TLTypes::accountSetPrivacy] = "accountSetPrivacy"; - DecompilerTable::_constructors[TLTypes::accountDeleteAccount] = "accountDeleteAccount"; - DecompilerTable::_constructors[TLTypes::accountGetAccountTTL] = "accountGetAccountTTL"; - DecompilerTable::_constructors[TLTypes::accountSetAccountTTL] = "accountSetAccountTTL"; - DecompilerTable::_constructors[TLTypes::accountSendChangePhoneCode] = "accountSendChangePhoneCode"; - DecompilerTable::_constructors[TLTypes::accountChangePhone] = "accountChangePhone"; - DecompilerTable::_constructors[TLTypes::accountUpdateDeviceLocked] = "accountUpdateDeviceLocked"; - DecompilerTable::_constructors[TLTypes::accountGetAuthorizations] = "accountGetAuthorizations"; - DecompilerTable::_constructors[TLTypes::accountResetAuthorization] = "accountResetAuthorization"; - DecompilerTable::_constructors[TLTypes::accountGetPassword] = "accountGetPassword"; - DecompilerTable::_constructors[TLTypes::accountGetPasswordSettings] = "accountGetPasswordSettings"; - DecompilerTable::_constructors[TLTypes::accountUpdatePasswordSettings] = "accountUpdatePasswordSettings"; - DecompilerTable::_constructors[TLTypes::accountSendConfirmPhoneCode] = "accountSendConfirmPhoneCode"; - DecompilerTable::_constructors[TLTypes::accountConfirmPhone] = "accountConfirmPhone"; - DecompilerTable::_constructors[TLTypes::usersGetUsers] = "usersGetUsers"; - DecompilerTable::_constructors[TLTypes::usersGetFullUser] = "usersGetFullUser"; - DecompilerTable::_constructors[TLTypes::contactsGetStatuses] = "contactsGetStatuses"; - DecompilerTable::_constructors[TLTypes::contactsGetContacts] = "contactsGetContacts"; - DecompilerTable::_constructors[TLTypes::contactsImportContacts] = "contactsImportContacts"; - DecompilerTable::_constructors[TLTypes::contactsDeleteContact] = "contactsDeleteContact"; - DecompilerTable::_constructors[TLTypes::contactsDeleteContacts] = "contactsDeleteContacts"; - DecompilerTable::_constructors[TLTypes::contactsBlock] = "contactsBlock"; - DecompilerTable::_constructors[TLTypes::contactsUnblock] = "contactsUnblock"; - DecompilerTable::_constructors[TLTypes::contactsGetBlocked] = "contactsGetBlocked"; - DecompilerTable::_constructors[TLTypes::contactsExportCard] = "contactsExportCard"; - DecompilerTable::_constructors[TLTypes::contactsImportCard] = "contactsImportCard"; - DecompilerTable::_constructors[TLTypes::contactsSearch] = "contactsSearch"; - DecompilerTable::_constructors[TLTypes::contactsResolveUsername] = "contactsResolveUsername"; - DecompilerTable::_constructors[TLTypes::contactsGetTopPeers] = "contactsGetTopPeers"; - DecompilerTable::_constructors[TLTypes::contactsResetTopPeerRating] = "contactsResetTopPeerRating"; - DecompilerTable::_constructors[TLTypes::messagesGetMessages] = "messagesGetMessages"; - DecompilerTable::_constructors[TLTypes::messagesGetDialogs] = "messagesGetDialogs"; - DecompilerTable::_constructors[TLTypes::messagesGetHistory] = "messagesGetHistory"; - DecompilerTable::_constructors[TLTypes::messagesSearch] = "messagesSearch"; - DecompilerTable::_constructors[TLTypes::messagesReadHistory] = "messagesReadHistory"; - DecompilerTable::_constructors[TLTypes::messagesDeleteHistory] = "messagesDeleteHistory"; - DecompilerTable::_constructors[TLTypes::messagesDeleteMessages] = "messagesDeleteMessages"; - DecompilerTable::_constructors[TLTypes::messagesReceivedMessages] = "messagesReceivedMessages"; - DecompilerTable::_constructors[TLTypes::messagesSetTyping] = "messagesSetTyping"; - DecompilerTable::_constructors[TLTypes::messagesSendMessage] = "messagesSendMessage"; - DecompilerTable::_constructors[TLTypes::messagesSendMedia] = "messagesSendMedia"; - DecompilerTable::_constructors[TLTypes::messagesForwardMessages] = "messagesForwardMessages"; - DecompilerTable::_constructors[TLTypes::messagesReportSpam] = "messagesReportSpam"; - DecompilerTable::_constructors[TLTypes::messagesHideReportSpam] = "messagesHideReportSpam"; - DecompilerTable::_constructors[TLTypes::messagesGetPeerSettings] = "messagesGetPeerSettings"; - DecompilerTable::_constructors[TLTypes::messagesGetChats] = "messagesGetChats"; - DecompilerTable::_constructors[TLTypes::messagesGetFullChat] = "messagesGetFullChat"; - DecompilerTable::_constructors[TLTypes::messagesEditChatTitle] = "messagesEditChatTitle"; - DecompilerTable::_constructors[TLTypes::messagesEditChatPhoto] = "messagesEditChatPhoto"; - DecompilerTable::_constructors[TLTypes::messagesAddChatUser] = "messagesAddChatUser"; - DecompilerTable::_constructors[TLTypes::messagesDeleteChatUser] = "messagesDeleteChatUser"; - DecompilerTable::_constructors[TLTypes::messagesCreateChat] = "messagesCreateChat"; - DecompilerTable::_constructors[TLTypes::messagesForwardMessage] = "messagesForwardMessage"; - DecompilerTable::_constructors[TLTypes::messagesGetDhConfig] = "messagesGetDhConfig"; - DecompilerTable::_constructors[TLTypes::messagesRequestEncryption] = "messagesRequestEncryption"; - DecompilerTable::_constructors[TLTypes::messagesAcceptEncryption] = "messagesAcceptEncryption"; - DecompilerTable::_constructors[TLTypes::messagesDiscardEncryption] = "messagesDiscardEncryption"; - DecompilerTable::_constructors[TLTypes::messagesSetEncryptedTyping] = "messagesSetEncryptedTyping"; - DecompilerTable::_constructors[TLTypes::messagesReadEncryptedHistory] = "messagesReadEncryptedHistory"; - DecompilerTable::_constructors[TLTypes::messagesSendEncrypted] = "messagesSendEncrypted"; - DecompilerTable::_constructors[TLTypes::messagesSendEncryptedFile] = "messagesSendEncryptedFile"; - DecompilerTable::_constructors[TLTypes::messagesSendEncryptedService] = "messagesSendEncryptedService"; - DecompilerTable::_constructors[TLTypes::messagesReceivedQueue] = "messagesReceivedQueue"; - DecompilerTable::_constructors[TLTypes::messagesReadMessageContents] = "messagesReadMessageContents"; - DecompilerTable::_constructors[TLTypes::messagesGetAllStickers] = "messagesGetAllStickers"; - DecompilerTable::_constructors[TLTypes::messagesGetWebPagePreview] = "messagesGetWebPagePreview"; - DecompilerTable::_constructors[TLTypes::messagesExportChatInvite] = "messagesExportChatInvite"; - DecompilerTable::_constructors[TLTypes::messagesCheckChatInvite] = "messagesCheckChatInvite"; - DecompilerTable::_constructors[TLTypes::messagesImportChatInvite] = "messagesImportChatInvite"; - DecompilerTable::_constructors[TLTypes::messagesGetStickerSet] = "messagesGetStickerSet"; - DecompilerTable::_constructors[TLTypes::messagesInstallStickerSet] = "messagesInstallStickerSet"; - DecompilerTable::_constructors[TLTypes::messagesUninstallStickerSet] = "messagesUninstallStickerSet"; - DecompilerTable::_constructors[TLTypes::messagesStartBot] = "messagesStartBot"; - DecompilerTable::_constructors[TLTypes::messagesGetMessagesViews] = "messagesGetMessagesViews"; - DecompilerTable::_constructors[TLTypes::messagesToggleChatAdmins] = "messagesToggleChatAdmins"; - DecompilerTable::_constructors[TLTypes::messagesEditChatAdmin] = "messagesEditChatAdmin"; - DecompilerTable::_constructors[TLTypes::messagesMigrateChat] = "messagesMigrateChat"; - DecompilerTable::_constructors[TLTypes::messagesSearchGlobal] = "messagesSearchGlobal"; - DecompilerTable::_constructors[TLTypes::messagesReorderStickerSets] = "messagesReorderStickerSets"; - DecompilerTable::_constructors[TLTypes::messagesGetDocumentByHash] = "messagesGetDocumentByHash"; - DecompilerTable::_constructors[TLTypes::messagesSearchGifs] = "messagesSearchGifs"; - DecompilerTable::_constructors[TLTypes::messagesGetSavedGifs] = "messagesGetSavedGifs"; - DecompilerTable::_constructors[TLTypes::messagesSaveGif] = "messagesSaveGif"; - DecompilerTable::_constructors[TLTypes::messagesGetInlineBotResults] = "messagesGetInlineBotResults"; - DecompilerTable::_constructors[TLTypes::messagesSetInlineBotResults] = "messagesSetInlineBotResults"; - DecompilerTable::_constructors[TLTypes::messagesSendInlineBotResult] = "messagesSendInlineBotResult"; - DecompilerTable::_constructors[TLTypes::messagesGetMessageEditData] = "messagesGetMessageEditData"; - DecompilerTable::_constructors[TLTypes::messagesEditMessage] = "messagesEditMessage"; - DecompilerTable::_constructors[TLTypes::messagesEditInlineBotMessage] = "messagesEditInlineBotMessage"; - DecompilerTable::_constructors[TLTypes::messagesGetBotCallbackAnswer] = "messagesGetBotCallbackAnswer"; - DecompilerTable::_constructors[TLTypes::messagesSetBotCallbackAnswer] = "messagesSetBotCallbackAnswer"; - DecompilerTable::_constructors[TLTypes::messagesGetPeerDialogs] = "messagesGetPeerDialogs"; - DecompilerTable::_constructors[TLTypes::messagesSaveDraft] = "messagesSaveDraft"; - DecompilerTable::_constructors[TLTypes::messagesGetAllDrafts] = "messagesGetAllDrafts"; - DecompilerTable::_constructors[TLTypes::messagesGetFeaturedStickers] = "messagesGetFeaturedStickers"; - DecompilerTable::_constructors[TLTypes::messagesReadFeaturedStickers] = "messagesReadFeaturedStickers"; - DecompilerTable::_constructors[TLTypes::messagesGetRecentStickers] = "messagesGetRecentStickers"; - DecompilerTable::_constructors[TLTypes::messagesSaveRecentSticker] = "messagesSaveRecentSticker"; - DecompilerTable::_constructors[TLTypes::messagesClearRecentStickers] = "messagesClearRecentStickers"; - DecompilerTable::_constructors[TLTypes::messagesGetArchivedStickers] = "messagesGetArchivedStickers"; - DecompilerTable::_constructors[TLTypes::messagesGetMaskStickers] = "messagesGetMaskStickers"; - DecompilerTable::_constructors[TLTypes::messagesGetAttachedStickers] = "messagesGetAttachedStickers"; - DecompilerTable::_constructors[TLTypes::messagesSetGameScore] = "messagesSetGameScore"; - DecompilerTable::_constructors[TLTypes::messagesSetInlineGameScore] = "messagesSetInlineGameScore"; - DecompilerTable::_constructors[TLTypes::messagesGetGameHighScores] = "messagesGetGameHighScores"; - DecompilerTable::_constructors[TLTypes::messagesGetInlineGameHighScores] = "messagesGetInlineGameHighScores"; - DecompilerTable::_constructors[TLTypes::updatesGetState] = "updatesGetState"; - DecompilerTable::_constructors[TLTypes::updatesGetDifference] = "updatesGetDifference"; - DecompilerTable::_constructors[TLTypes::updatesGetChannelDifference] = "updatesGetChannelDifference"; - DecompilerTable::_constructors[TLTypes::photosUpdateProfilePhoto] = "photosUpdateProfilePhoto"; - DecompilerTable::_constructors[TLTypes::photosUploadProfilePhoto] = "photosUploadProfilePhoto"; - DecompilerTable::_constructors[TLTypes::photosDeletePhotos] = "photosDeletePhotos"; - DecompilerTable::_constructors[TLTypes::photosGetUserPhotos] = "photosGetUserPhotos"; - DecompilerTable::_constructors[TLTypes::uploadSaveFilePart] = "uploadSaveFilePart"; - DecompilerTable::_constructors[TLTypes::uploadGetFile] = "uploadGetFile"; - DecompilerTable::_constructors[TLTypes::uploadSaveBigFilePart] = "uploadSaveBigFilePart"; - DecompilerTable::_constructors[TLTypes::helpGetConfig] = "helpGetConfig"; - DecompilerTable::_constructors[TLTypes::helpGetNearestDc] = "helpGetNearestDc"; - DecompilerTable::_constructors[TLTypes::helpGetAppUpdate] = "helpGetAppUpdate"; - DecompilerTable::_constructors[TLTypes::helpSaveAppLog] = "helpSaveAppLog"; - DecompilerTable::_constructors[TLTypes::helpGetInviteText] = "helpGetInviteText"; - DecompilerTable::_constructors[TLTypes::helpGetSupport] = "helpGetSupport"; - DecompilerTable::_constructors[TLTypes::helpGetAppChangelog] = "helpGetAppChangelog"; - DecompilerTable::_constructors[TLTypes::helpGetTermsOfService] = "helpGetTermsOfService"; - DecompilerTable::_constructors[TLTypes::channelsReadHistory] = "channelsReadHistory"; - DecompilerTable::_constructors[TLTypes::channelsDeleteMessages] = "channelsDeleteMessages"; - DecompilerTable::_constructors[TLTypes::channelsDeleteUserHistory] = "channelsDeleteUserHistory"; - DecompilerTable::_constructors[TLTypes::channelsReportSpam] = "channelsReportSpam"; - DecompilerTable::_constructors[TLTypes::channelsGetMessages] = "channelsGetMessages"; - DecompilerTable::_constructors[TLTypes::channelsGetParticipants] = "channelsGetParticipants"; - DecompilerTable::_constructors[TLTypes::channelsGetParticipant] = "channelsGetParticipant"; - DecompilerTable::_constructors[TLTypes::channelsGetChannels] = "channelsGetChannels"; - DecompilerTable::_constructors[TLTypes::channelsGetFullChannel] = "channelsGetFullChannel"; - DecompilerTable::_constructors[TLTypes::channelsCreateChannel] = "channelsCreateChannel"; - DecompilerTable::_constructors[TLTypes::channelsEditAbout] = "channelsEditAbout"; - DecompilerTable::_constructors[TLTypes::channelsEditAdmin] = "channelsEditAdmin"; - DecompilerTable::_constructors[TLTypes::channelsEditTitle] = "channelsEditTitle"; - DecompilerTable::_constructors[TLTypes::channelsEditPhoto] = "channelsEditPhoto"; - DecompilerTable::_constructors[TLTypes::channelsCheckUsername] = "channelsCheckUsername"; - DecompilerTable::_constructors[TLTypes::channelsUpdateUsername] = "channelsUpdateUsername"; - DecompilerTable::_constructors[TLTypes::channelsJoinChannel] = "channelsJoinChannel"; - DecompilerTable::_constructors[TLTypes::channelsLeaveChannel] = "channelsLeaveChannel"; - DecompilerTable::_constructors[TLTypes::channelsInviteToChannel] = "channelsInviteToChannel"; - DecompilerTable::_constructors[TLTypes::channelsKickFromChannel] = "channelsKickFromChannel"; - DecompilerTable::_constructors[TLTypes::channelsExportInvite] = "channelsExportInvite"; - DecompilerTable::_constructors[TLTypes::channelsDeleteChannel] = "channelsDeleteChannel"; - DecompilerTable::_constructors[TLTypes::channelsToggleInvites] = "channelsToggleInvites"; - DecompilerTable::_constructors[TLTypes::channelsExportMessageLink] = "channelsExportMessageLink"; - DecompilerTable::_constructors[TLTypes::channelsToggleSignatures] = "channelsToggleSignatures"; - DecompilerTable::_constructors[TLTypes::channelsUpdatePinnedMessage] = "channelsUpdatePinnedMessage"; - DecompilerTable::_constructors[TLTypes::channelsGetAdminedPublicChannels] = "channelsGetAdminedPublicChannels"; + DecompilerTable::_constructors[TLTypes::reqPq] = "reqPq"; + DecompilerTable::_constructors[TLTypes::reqDHParams] = "reqDHParams"; + DecompilerTable::_constructors[TLTypes::setClientDHParams] = "setClientDHParams"; + DecompilerTable::_constructors[TLTypes::rpcDropAnswer] = "rpcDropAnswer"; + DecompilerTable::_constructors[TLTypes::getFutureSalts] = "getFutureSalts"; + DecompilerTable::_constructors[TLTypes::ping] = "ping"; + DecompilerTable::_constructors[TLTypes::pingDelayDisconnect] = "pingDelayDisconnect"; + DecompilerTable::_constructors[TLTypes::destroySession] = "destroySession"; + DecompilerTable::_constructors[TLTypes::contestSaveDeveloperInfo] = "contestSaveDeveloperInfo"; DecompilerTable::_constructors[TLTypes::ResPQ] = "ResPQ"; DecompilerTable::_constructors[TLTypes::PQInnerData] = "PQInnerData"; DecompilerTable::_constructors[TLTypes::ServerDHParamsFail] = "ServerDHParamsFail"; @@ -684,14 +693,5 @@ void DecompilerTable::initConstructors() DecompilerTable::_constructors[TLTypes::DestroySessionNone] = "DestroySessionNone"; DecompilerTable::_constructors[TLTypes::NewSessionCreated] = "NewSessionCreated"; DecompilerTable::_constructors[TLTypes::HttpWait] = "HttpWait"; - DecompilerTable::_constructors[TLTypes::reqPq] = "reqPq"; - DecompilerTable::_constructors[TLTypes::reqDHParams] = "reqDHParams"; - DecompilerTable::_constructors[TLTypes::setClientDHParams] = "setClientDHParams"; - DecompilerTable::_constructors[TLTypes::rpcDropAnswer] = "rpcDropAnswer"; - DecompilerTable::_constructors[TLTypes::getFutureSalts] = "getFutureSalts"; - DecompilerTable::_constructors[TLTypes::ping] = "ping"; - DecompilerTable::_constructors[TLTypes::pingDelayDisconnect] = "pingDelayDisconnect"; - DecompilerTable::_constructors[TLTypes::destroySession] = "destroySession"; - DecompilerTable::_constructors[TLTypes::contestSaveDeveloperInfo] = "contestSaveDeveloperInfo"; } diff --git a/autogenerated/mtproto/decompiler/decompilertable.h b/autogenerated/mtproto/decompiler/decompilertable.h index 7c92d6d..1041f9e 100644 --- a/autogenerated/mtproto/decompiler/decompilertable.h +++ b/autogenerated/mtproto/decompiler/decompilertable.h @@ -5,9 +5,9 @@ // DO NOT EDIT!!! #include -#include "../../tltypes.h" -#include #include "../../../types/basic.h" +#include +#include "../../tltypes.h" class DecompilerTable: public QObject { diff --git a/autogenerated/mtproto/decompiler/mtprotodecompiler.cpp b/autogenerated/mtproto/decompiler/mtprotodecompiler.cpp index 7cd9073..d4bc9a7 100644 --- a/autogenerated/mtproto/decompiler/mtprotodecompiler.cpp +++ b/autogenerated/mtproto/decompiler/mtprotodecompiler.cpp @@ -968,6 +968,186 @@ void MTProtoDecompiler::decompileTLVectorEx(QString& result, MTProtoStream& mtst void MTProtoDecompiler::initDispatchers() { + MTProtoDecompiler::_ctordispatcher[TLTypes::authCheckPhone] = &MTProtoDecompiler::decompile_authCheckPhone; + MTProtoDecompiler::_ctordispatcher[TLTypes::authSendCode] = &MTProtoDecompiler::decompile_authSendCode; + MTProtoDecompiler::_ctordispatcher[TLTypes::authSignUp] = &MTProtoDecompiler::decompile_authSignUp; + MTProtoDecompiler::_ctordispatcher[TLTypes::authSignIn] = &MTProtoDecompiler::decompile_authSignIn; + MTProtoDecompiler::_ctordispatcher[TLTypes::authLogOut] = &MTProtoDecompiler::decompile_authLogOut; + MTProtoDecompiler::_ctordispatcher[TLTypes::authResetAuthorizations] = &MTProtoDecompiler::decompile_authResetAuthorizations; + MTProtoDecompiler::_ctordispatcher[TLTypes::authSendInvites] = &MTProtoDecompiler::decompile_authSendInvites; + MTProtoDecompiler::_ctordispatcher[TLTypes::authExportAuthorization] = &MTProtoDecompiler::decompile_authExportAuthorization; + MTProtoDecompiler::_ctordispatcher[TLTypes::authImportAuthorization] = &MTProtoDecompiler::decompile_authImportAuthorization; + MTProtoDecompiler::_ctordispatcher[TLTypes::authBindTempAuthKey] = &MTProtoDecompiler::decompile_authBindTempAuthKey; + MTProtoDecompiler::_ctordispatcher[TLTypes::authImportBotAuthorization] = &MTProtoDecompiler::decompile_authImportBotAuthorization; + MTProtoDecompiler::_ctordispatcher[TLTypes::authCheckPassword] = &MTProtoDecompiler::decompile_authCheckPassword; + MTProtoDecompiler::_ctordispatcher[TLTypes::authRequestPasswordRecovery] = &MTProtoDecompiler::decompile_authRequestPasswordRecovery; + MTProtoDecompiler::_ctordispatcher[TLTypes::authRecoverPassword] = &MTProtoDecompiler::decompile_authRecoverPassword; + MTProtoDecompiler::_ctordispatcher[TLTypes::authResendCode] = &MTProtoDecompiler::decompile_authResendCode; + MTProtoDecompiler::_ctordispatcher[TLTypes::authCancelCode] = &MTProtoDecompiler::decompile_authCancelCode; + MTProtoDecompiler::_ctordispatcher[TLTypes::authDropTempAuthKeys] = &MTProtoDecompiler::decompile_authDropTempAuthKeys; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountRegisterDevice] = &MTProtoDecompiler::decompile_accountRegisterDevice; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUnregisterDevice] = &MTProtoDecompiler::decompile_accountUnregisterDevice; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateNotifySettings] = &MTProtoDecompiler::decompile_accountUpdateNotifySettings; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetNotifySettings] = &MTProtoDecompiler::decompile_accountGetNotifySettings; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountResetNotifySettings] = &MTProtoDecompiler::decompile_accountResetNotifySettings; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateProfile] = &MTProtoDecompiler::decompile_accountUpdateProfile; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateStatus] = &MTProtoDecompiler::decompile_accountUpdateStatus; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetWallPapers] = &MTProtoDecompiler::decompile_accountGetWallPapers; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountReportPeer] = &MTProtoDecompiler::decompile_accountReportPeer; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountCheckUsername] = &MTProtoDecompiler::decompile_accountCheckUsername; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateUsername] = &MTProtoDecompiler::decompile_accountUpdateUsername; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetPrivacy] = &MTProtoDecompiler::decompile_accountGetPrivacy; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountSetPrivacy] = &MTProtoDecompiler::decompile_accountSetPrivacy; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountDeleteAccount] = &MTProtoDecompiler::decompile_accountDeleteAccount; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetAccountTTL] = &MTProtoDecompiler::decompile_accountGetAccountTTL; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountSetAccountTTL] = &MTProtoDecompiler::decompile_accountSetAccountTTL; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountSendChangePhoneCode] = &MTProtoDecompiler::decompile_accountSendChangePhoneCode; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountChangePhone] = &MTProtoDecompiler::decompile_accountChangePhone; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateDeviceLocked] = &MTProtoDecompiler::decompile_accountUpdateDeviceLocked; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetAuthorizations] = &MTProtoDecompiler::decompile_accountGetAuthorizations; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountResetAuthorization] = &MTProtoDecompiler::decompile_accountResetAuthorization; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetPassword] = &MTProtoDecompiler::decompile_accountGetPassword; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetPasswordSettings] = &MTProtoDecompiler::decompile_accountGetPasswordSettings; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdatePasswordSettings] = &MTProtoDecompiler::decompile_accountUpdatePasswordSettings; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountSendConfirmPhoneCode] = &MTProtoDecompiler::decompile_accountSendConfirmPhoneCode; + MTProtoDecompiler::_ctordispatcher[TLTypes::accountConfirmPhone] = &MTProtoDecompiler::decompile_accountConfirmPhone; + MTProtoDecompiler::_ctordispatcher[TLTypes::usersGetUsers] = &MTProtoDecompiler::decompile_usersGetUsers; + MTProtoDecompiler::_ctordispatcher[TLTypes::usersGetFullUser] = &MTProtoDecompiler::decompile_usersGetFullUser; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetStatuses] = &MTProtoDecompiler::decompile_contactsGetStatuses; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetContacts] = &MTProtoDecompiler::decompile_contactsGetContacts; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsImportContacts] = &MTProtoDecompiler::decompile_contactsImportContacts; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsDeleteContact] = &MTProtoDecompiler::decompile_contactsDeleteContact; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsDeleteContacts] = &MTProtoDecompiler::decompile_contactsDeleteContacts; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsBlock] = &MTProtoDecompiler::decompile_contactsBlock; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsUnblock] = &MTProtoDecompiler::decompile_contactsUnblock; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetBlocked] = &MTProtoDecompiler::decompile_contactsGetBlocked; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsExportCard] = &MTProtoDecompiler::decompile_contactsExportCard; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsImportCard] = &MTProtoDecompiler::decompile_contactsImportCard; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsSearch] = &MTProtoDecompiler::decompile_contactsSearch; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsResolveUsername] = &MTProtoDecompiler::decompile_contactsResolveUsername; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetTopPeers] = &MTProtoDecompiler::decompile_contactsGetTopPeers; + MTProtoDecompiler::_ctordispatcher[TLTypes::contactsResetTopPeerRating] = &MTProtoDecompiler::decompile_contactsResetTopPeerRating; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMessages] = &MTProtoDecompiler::decompile_messagesGetMessages; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetDialogs] = &MTProtoDecompiler::decompile_messagesGetDialogs; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetHistory] = &MTProtoDecompiler::decompile_messagesGetHistory; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSearch] = &MTProtoDecompiler::decompile_messagesSearch; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadHistory] = &MTProtoDecompiler::decompile_messagesReadHistory; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDeleteHistory] = &MTProtoDecompiler::decompile_messagesDeleteHistory; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDeleteMessages] = &MTProtoDecompiler::decompile_messagesDeleteMessages; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReceivedMessages] = &MTProtoDecompiler::decompile_messagesReceivedMessages; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetTyping] = &MTProtoDecompiler::decompile_messagesSetTyping; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendMessage] = &MTProtoDecompiler::decompile_messagesSendMessage; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendMedia] = &MTProtoDecompiler::decompile_messagesSendMedia; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesForwardMessages] = &MTProtoDecompiler::decompile_messagesForwardMessages; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReportSpam] = &MTProtoDecompiler::decompile_messagesReportSpam; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesHideReportSpam] = &MTProtoDecompiler::decompile_messagesHideReportSpam; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetPeerSettings] = &MTProtoDecompiler::decompile_messagesGetPeerSettings; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetChats] = &MTProtoDecompiler::decompile_messagesGetChats; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetFullChat] = &MTProtoDecompiler::decompile_messagesGetFullChat; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditChatTitle] = &MTProtoDecompiler::decompile_messagesEditChatTitle; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditChatPhoto] = &MTProtoDecompiler::decompile_messagesEditChatPhoto; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesAddChatUser] = &MTProtoDecompiler::decompile_messagesAddChatUser; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDeleteChatUser] = &MTProtoDecompiler::decompile_messagesDeleteChatUser; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesCreateChat] = &MTProtoDecompiler::decompile_messagesCreateChat; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesForwardMessage] = &MTProtoDecompiler::decompile_messagesForwardMessage; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetDhConfig] = &MTProtoDecompiler::decompile_messagesGetDhConfig; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesRequestEncryption] = &MTProtoDecompiler::decompile_messagesRequestEncryption; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesAcceptEncryption] = &MTProtoDecompiler::decompile_messagesAcceptEncryption; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDiscardEncryption] = &MTProtoDecompiler::decompile_messagesDiscardEncryption; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetEncryptedTyping] = &MTProtoDecompiler::decompile_messagesSetEncryptedTyping; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadEncryptedHistory] = &MTProtoDecompiler::decompile_messagesReadEncryptedHistory; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendEncrypted] = &MTProtoDecompiler::decompile_messagesSendEncrypted; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendEncryptedFile] = &MTProtoDecompiler::decompile_messagesSendEncryptedFile; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendEncryptedService] = &MTProtoDecompiler::decompile_messagesSendEncryptedService; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReceivedQueue] = &MTProtoDecompiler::decompile_messagesReceivedQueue; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadMessageContents] = &MTProtoDecompiler::decompile_messagesReadMessageContents; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetAllStickers] = &MTProtoDecompiler::decompile_messagesGetAllStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetWebPagePreview] = &MTProtoDecompiler::decompile_messagesGetWebPagePreview; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesExportChatInvite] = &MTProtoDecompiler::decompile_messagesExportChatInvite; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesCheckChatInvite] = &MTProtoDecompiler::decompile_messagesCheckChatInvite; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesImportChatInvite] = &MTProtoDecompiler::decompile_messagesImportChatInvite; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetStickerSet] = &MTProtoDecompiler::decompile_messagesGetStickerSet; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesInstallStickerSet] = &MTProtoDecompiler::decompile_messagesInstallStickerSet; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesUninstallStickerSet] = &MTProtoDecompiler::decompile_messagesUninstallStickerSet; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesStartBot] = &MTProtoDecompiler::decompile_messagesStartBot; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMessagesViews] = &MTProtoDecompiler::decompile_messagesGetMessagesViews; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesToggleChatAdmins] = &MTProtoDecompiler::decompile_messagesToggleChatAdmins; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditChatAdmin] = &MTProtoDecompiler::decompile_messagesEditChatAdmin; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesMigrateChat] = &MTProtoDecompiler::decompile_messagesMigrateChat; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSearchGlobal] = &MTProtoDecompiler::decompile_messagesSearchGlobal; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReorderStickerSets] = &MTProtoDecompiler::decompile_messagesReorderStickerSets; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetDocumentByHash] = &MTProtoDecompiler::decompile_messagesGetDocumentByHash; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSearchGifs] = &MTProtoDecompiler::decompile_messagesSearchGifs; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetSavedGifs] = &MTProtoDecompiler::decompile_messagesGetSavedGifs; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSaveGif] = &MTProtoDecompiler::decompile_messagesSaveGif; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetInlineBotResults] = &MTProtoDecompiler::decompile_messagesGetInlineBotResults; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetInlineBotResults] = &MTProtoDecompiler::decompile_messagesSetInlineBotResults; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendInlineBotResult] = &MTProtoDecompiler::decompile_messagesSendInlineBotResult; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMessageEditData] = &MTProtoDecompiler::decompile_messagesGetMessageEditData; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditMessage] = &MTProtoDecompiler::decompile_messagesEditMessage; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditInlineBotMessage] = &MTProtoDecompiler::decompile_messagesEditInlineBotMessage; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetBotCallbackAnswer] = &MTProtoDecompiler::decompile_messagesGetBotCallbackAnswer; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetBotCallbackAnswer] = &MTProtoDecompiler::decompile_messagesSetBotCallbackAnswer; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetPeerDialogs] = &MTProtoDecompiler::decompile_messagesGetPeerDialogs; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSaveDraft] = &MTProtoDecompiler::decompile_messagesSaveDraft; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetAllDrafts] = &MTProtoDecompiler::decompile_messagesGetAllDrafts; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetFeaturedStickers] = &MTProtoDecompiler::decompile_messagesGetFeaturedStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadFeaturedStickers] = &MTProtoDecompiler::decompile_messagesReadFeaturedStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetRecentStickers] = &MTProtoDecompiler::decompile_messagesGetRecentStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSaveRecentSticker] = &MTProtoDecompiler::decompile_messagesSaveRecentSticker; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesClearRecentStickers] = &MTProtoDecompiler::decompile_messagesClearRecentStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetArchivedStickers] = &MTProtoDecompiler::decompile_messagesGetArchivedStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMaskStickers] = &MTProtoDecompiler::decompile_messagesGetMaskStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetAttachedStickers] = &MTProtoDecompiler::decompile_messagesGetAttachedStickers; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetGameScore] = &MTProtoDecompiler::decompile_messagesSetGameScore; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetInlineGameScore] = &MTProtoDecompiler::decompile_messagesSetInlineGameScore; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetGameHighScores] = &MTProtoDecompiler::decompile_messagesGetGameHighScores; + MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetInlineGameHighScores] = &MTProtoDecompiler::decompile_messagesGetInlineGameHighScores; + MTProtoDecompiler::_ctordispatcher[TLTypes::updatesGetState] = &MTProtoDecompiler::decompile_updatesGetState; + MTProtoDecompiler::_ctordispatcher[TLTypes::updatesGetDifference] = &MTProtoDecompiler::decompile_updatesGetDifference; + MTProtoDecompiler::_ctordispatcher[TLTypes::updatesGetChannelDifference] = &MTProtoDecompiler::decompile_updatesGetChannelDifference; + MTProtoDecompiler::_ctordispatcher[TLTypes::photosUpdateProfilePhoto] = &MTProtoDecompiler::decompile_photosUpdateProfilePhoto; + MTProtoDecompiler::_ctordispatcher[TLTypes::photosUploadProfilePhoto] = &MTProtoDecompiler::decompile_photosUploadProfilePhoto; + MTProtoDecompiler::_ctordispatcher[TLTypes::photosDeletePhotos] = &MTProtoDecompiler::decompile_photosDeletePhotos; + MTProtoDecompiler::_ctordispatcher[TLTypes::photosGetUserPhotos] = &MTProtoDecompiler::decompile_photosGetUserPhotos; + MTProtoDecompiler::_ctordispatcher[TLTypes::uploadSaveFilePart] = &MTProtoDecompiler::decompile_uploadSaveFilePart; + MTProtoDecompiler::_ctordispatcher[TLTypes::uploadGetFile] = &MTProtoDecompiler::decompile_uploadGetFile; + MTProtoDecompiler::_ctordispatcher[TLTypes::uploadSaveBigFilePart] = &MTProtoDecompiler::decompile_uploadSaveBigFilePart; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetConfig] = &MTProtoDecompiler::decompile_helpGetConfig; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetNearestDc] = &MTProtoDecompiler::decompile_helpGetNearestDc; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetAppUpdate] = &MTProtoDecompiler::decompile_helpGetAppUpdate; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpSaveAppLog] = &MTProtoDecompiler::decompile_helpSaveAppLog; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetInviteText] = &MTProtoDecompiler::decompile_helpGetInviteText; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetSupport] = &MTProtoDecompiler::decompile_helpGetSupport; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetAppChangelog] = &MTProtoDecompiler::decompile_helpGetAppChangelog; + MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetTermsOfService] = &MTProtoDecompiler::decompile_helpGetTermsOfService; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsReadHistory] = &MTProtoDecompiler::decompile_channelsReadHistory; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsDeleteMessages] = &MTProtoDecompiler::decompile_channelsDeleteMessages; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsDeleteUserHistory] = &MTProtoDecompiler::decompile_channelsDeleteUserHistory; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsReportSpam] = &MTProtoDecompiler::decompile_channelsReportSpam; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetMessages] = &MTProtoDecompiler::decompile_channelsGetMessages; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetParticipants] = &MTProtoDecompiler::decompile_channelsGetParticipants; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetParticipant] = &MTProtoDecompiler::decompile_channelsGetParticipant; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetChannels] = &MTProtoDecompiler::decompile_channelsGetChannels; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetFullChannel] = &MTProtoDecompiler::decompile_channelsGetFullChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsCreateChannel] = &MTProtoDecompiler::decompile_channelsCreateChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditAbout] = &MTProtoDecompiler::decompile_channelsEditAbout; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditAdmin] = &MTProtoDecompiler::decompile_channelsEditAdmin; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditTitle] = &MTProtoDecompiler::decompile_channelsEditTitle; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditPhoto] = &MTProtoDecompiler::decompile_channelsEditPhoto; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsCheckUsername] = &MTProtoDecompiler::decompile_channelsCheckUsername; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsUpdateUsername] = &MTProtoDecompiler::decompile_channelsUpdateUsername; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsJoinChannel] = &MTProtoDecompiler::decompile_channelsJoinChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsLeaveChannel] = &MTProtoDecompiler::decompile_channelsLeaveChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsInviteToChannel] = &MTProtoDecompiler::decompile_channelsInviteToChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsKickFromChannel] = &MTProtoDecompiler::decompile_channelsKickFromChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsExportInvite] = &MTProtoDecompiler::decompile_channelsExportInvite; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsDeleteChannel] = &MTProtoDecompiler::decompile_channelsDeleteChannel; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsToggleInvites] = &MTProtoDecompiler::decompile_channelsToggleInvites; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsExportMessageLink] = &MTProtoDecompiler::decompile_channelsExportMessageLink; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsToggleSignatures] = &MTProtoDecompiler::decompile_channelsToggleSignatures; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsUpdatePinnedMessage] = &MTProtoDecompiler::decompile_channelsUpdatePinnedMessage; + MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetAdminedPublicChannels] = &MTProtoDecompiler::decompile_channelsGetAdminedPublicChannels; MTProtoDecompiler::_ctordispatcher[TLTypes::Error] = &MTProtoDecompiler::decompile_Error; MTProtoDecompiler::_ctordispatcher[TLTypes::Null] = &MTProtoDecompiler::decompile_Null; MTProtoDecompiler::_ctordispatcher[TLTypes::InputPeerEmpty] = &MTProtoDecompiler::decompile_InputPeer; @@ -1419,186 +1599,15 @@ void MTProtoDecompiler::initDispatchers() MTProtoDecompiler::_ctordispatcher[TLTypes::InputGameShortName] = &MTProtoDecompiler::decompile_InputGame; MTProtoDecompiler::_ctordispatcher[TLTypes::HighScore] = &MTProtoDecompiler::decompile_HighScore; MTProtoDecompiler::_ctordispatcher[TLTypes::MessagesHighScores] = &MTProtoDecompiler::decompile_MessagesHighScores; - MTProtoDecompiler::_ctordispatcher[TLTypes::authCheckPhone] = &MTProtoDecompiler::decompile_authCheckPhone; - MTProtoDecompiler::_ctordispatcher[TLTypes::authSendCode] = &MTProtoDecompiler::decompile_authSendCode; - MTProtoDecompiler::_ctordispatcher[TLTypes::authSignUp] = &MTProtoDecompiler::decompile_authSignUp; - MTProtoDecompiler::_ctordispatcher[TLTypes::authSignIn] = &MTProtoDecompiler::decompile_authSignIn; - MTProtoDecompiler::_ctordispatcher[TLTypes::authLogOut] = &MTProtoDecompiler::decompile_authLogOut; - MTProtoDecompiler::_ctordispatcher[TLTypes::authResetAuthorizations] = &MTProtoDecompiler::decompile_authResetAuthorizations; - MTProtoDecompiler::_ctordispatcher[TLTypes::authSendInvites] = &MTProtoDecompiler::decompile_authSendInvites; - MTProtoDecompiler::_ctordispatcher[TLTypes::authExportAuthorization] = &MTProtoDecompiler::decompile_authExportAuthorization; - MTProtoDecompiler::_ctordispatcher[TLTypes::authImportAuthorization] = &MTProtoDecompiler::decompile_authImportAuthorization; - MTProtoDecompiler::_ctordispatcher[TLTypes::authBindTempAuthKey] = &MTProtoDecompiler::decompile_authBindTempAuthKey; - MTProtoDecompiler::_ctordispatcher[TLTypes::authImportBotAuthorization] = &MTProtoDecompiler::decompile_authImportBotAuthorization; - MTProtoDecompiler::_ctordispatcher[TLTypes::authCheckPassword] = &MTProtoDecompiler::decompile_authCheckPassword; - MTProtoDecompiler::_ctordispatcher[TLTypes::authRequestPasswordRecovery] = &MTProtoDecompiler::decompile_authRequestPasswordRecovery; - MTProtoDecompiler::_ctordispatcher[TLTypes::authRecoverPassword] = &MTProtoDecompiler::decompile_authRecoverPassword; - MTProtoDecompiler::_ctordispatcher[TLTypes::authResendCode] = &MTProtoDecompiler::decompile_authResendCode; - MTProtoDecompiler::_ctordispatcher[TLTypes::authCancelCode] = &MTProtoDecompiler::decompile_authCancelCode; - MTProtoDecompiler::_ctordispatcher[TLTypes::authDropTempAuthKeys] = &MTProtoDecompiler::decompile_authDropTempAuthKeys; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountRegisterDevice] = &MTProtoDecompiler::decompile_accountRegisterDevice; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUnregisterDevice] = &MTProtoDecompiler::decompile_accountUnregisterDevice; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateNotifySettings] = &MTProtoDecompiler::decompile_accountUpdateNotifySettings; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetNotifySettings] = &MTProtoDecompiler::decompile_accountGetNotifySettings; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountResetNotifySettings] = &MTProtoDecompiler::decompile_accountResetNotifySettings; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateProfile] = &MTProtoDecompiler::decompile_accountUpdateProfile; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateStatus] = &MTProtoDecompiler::decompile_accountUpdateStatus; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetWallPapers] = &MTProtoDecompiler::decompile_accountGetWallPapers; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountReportPeer] = &MTProtoDecompiler::decompile_accountReportPeer; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountCheckUsername] = &MTProtoDecompiler::decompile_accountCheckUsername; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateUsername] = &MTProtoDecompiler::decompile_accountUpdateUsername; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetPrivacy] = &MTProtoDecompiler::decompile_accountGetPrivacy; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountSetPrivacy] = &MTProtoDecompiler::decompile_accountSetPrivacy; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountDeleteAccount] = &MTProtoDecompiler::decompile_accountDeleteAccount; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetAccountTTL] = &MTProtoDecompiler::decompile_accountGetAccountTTL; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountSetAccountTTL] = &MTProtoDecompiler::decompile_accountSetAccountTTL; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountSendChangePhoneCode] = &MTProtoDecompiler::decompile_accountSendChangePhoneCode; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountChangePhone] = &MTProtoDecompiler::decompile_accountChangePhone; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdateDeviceLocked] = &MTProtoDecompiler::decompile_accountUpdateDeviceLocked; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetAuthorizations] = &MTProtoDecompiler::decompile_accountGetAuthorizations; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountResetAuthorization] = &MTProtoDecompiler::decompile_accountResetAuthorization; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetPassword] = &MTProtoDecompiler::decompile_accountGetPassword; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountGetPasswordSettings] = &MTProtoDecompiler::decompile_accountGetPasswordSettings; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountUpdatePasswordSettings] = &MTProtoDecompiler::decompile_accountUpdatePasswordSettings; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountSendConfirmPhoneCode] = &MTProtoDecompiler::decompile_accountSendConfirmPhoneCode; - MTProtoDecompiler::_ctordispatcher[TLTypes::accountConfirmPhone] = &MTProtoDecompiler::decompile_accountConfirmPhone; - MTProtoDecompiler::_ctordispatcher[TLTypes::usersGetUsers] = &MTProtoDecompiler::decompile_usersGetUsers; - MTProtoDecompiler::_ctordispatcher[TLTypes::usersGetFullUser] = &MTProtoDecompiler::decompile_usersGetFullUser; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetStatuses] = &MTProtoDecompiler::decompile_contactsGetStatuses; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetContacts] = &MTProtoDecompiler::decompile_contactsGetContacts; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsImportContacts] = &MTProtoDecompiler::decompile_contactsImportContacts; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsDeleteContact] = &MTProtoDecompiler::decompile_contactsDeleteContact; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsDeleteContacts] = &MTProtoDecompiler::decompile_contactsDeleteContacts; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsBlock] = &MTProtoDecompiler::decompile_contactsBlock; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsUnblock] = &MTProtoDecompiler::decompile_contactsUnblock; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetBlocked] = &MTProtoDecompiler::decompile_contactsGetBlocked; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsExportCard] = &MTProtoDecompiler::decompile_contactsExportCard; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsImportCard] = &MTProtoDecompiler::decompile_contactsImportCard; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsSearch] = &MTProtoDecompiler::decompile_contactsSearch; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsResolveUsername] = &MTProtoDecompiler::decompile_contactsResolveUsername; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsGetTopPeers] = &MTProtoDecompiler::decompile_contactsGetTopPeers; - MTProtoDecompiler::_ctordispatcher[TLTypes::contactsResetTopPeerRating] = &MTProtoDecompiler::decompile_contactsResetTopPeerRating; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMessages] = &MTProtoDecompiler::decompile_messagesGetMessages; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetDialogs] = &MTProtoDecompiler::decompile_messagesGetDialogs; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetHistory] = &MTProtoDecompiler::decompile_messagesGetHistory; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSearch] = &MTProtoDecompiler::decompile_messagesSearch; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadHistory] = &MTProtoDecompiler::decompile_messagesReadHistory; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDeleteHistory] = &MTProtoDecompiler::decompile_messagesDeleteHistory; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDeleteMessages] = &MTProtoDecompiler::decompile_messagesDeleteMessages; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReceivedMessages] = &MTProtoDecompiler::decompile_messagesReceivedMessages; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetTyping] = &MTProtoDecompiler::decompile_messagesSetTyping; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendMessage] = &MTProtoDecompiler::decompile_messagesSendMessage; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendMedia] = &MTProtoDecompiler::decompile_messagesSendMedia; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesForwardMessages] = &MTProtoDecompiler::decompile_messagesForwardMessages; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReportSpam] = &MTProtoDecompiler::decompile_messagesReportSpam; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesHideReportSpam] = &MTProtoDecompiler::decompile_messagesHideReportSpam; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetPeerSettings] = &MTProtoDecompiler::decompile_messagesGetPeerSettings; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetChats] = &MTProtoDecompiler::decompile_messagesGetChats; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetFullChat] = &MTProtoDecompiler::decompile_messagesGetFullChat; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditChatTitle] = &MTProtoDecompiler::decompile_messagesEditChatTitle; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditChatPhoto] = &MTProtoDecompiler::decompile_messagesEditChatPhoto; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesAddChatUser] = &MTProtoDecompiler::decompile_messagesAddChatUser; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDeleteChatUser] = &MTProtoDecompiler::decompile_messagesDeleteChatUser; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesCreateChat] = &MTProtoDecompiler::decompile_messagesCreateChat; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesForwardMessage] = &MTProtoDecompiler::decompile_messagesForwardMessage; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetDhConfig] = &MTProtoDecompiler::decompile_messagesGetDhConfig; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesRequestEncryption] = &MTProtoDecompiler::decompile_messagesRequestEncryption; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesAcceptEncryption] = &MTProtoDecompiler::decompile_messagesAcceptEncryption; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesDiscardEncryption] = &MTProtoDecompiler::decompile_messagesDiscardEncryption; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetEncryptedTyping] = &MTProtoDecompiler::decompile_messagesSetEncryptedTyping; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadEncryptedHistory] = &MTProtoDecompiler::decompile_messagesReadEncryptedHistory; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendEncrypted] = &MTProtoDecompiler::decompile_messagesSendEncrypted; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendEncryptedFile] = &MTProtoDecompiler::decompile_messagesSendEncryptedFile; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendEncryptedService] = &MTProtoDecompiler::decompile_messagesSendEncryptedService; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReceivedQueue] = &MTProtoDecompiler::decompile_messagesReceivedQueue; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadMessageContents] = &MTProtoDecompiler::decompile_messagesReadMessageContents; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetAllStickers] = &MTProtoDecompiler::decompile_messagesGetAllStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetWebPagePreview] = &MTProtoDecompiler::decompile_messagesGetWebPagePreview; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesExportChatInvite] = &MTProtoDecompiler::decompile_messagesExportChatInvite; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesCheckChatInvite] = &MTProtoDecompiler::decompile_messagesCheckChatInvite; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesImportChatInvite] = &MTProtoDecompiler::decompile_messagesImportChatInvite; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetStickerSet] = &MTProtoDecompiler::decompile_messagesGetStickerSet; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesInstallStickerSet] = &MTProtoDecompiler::decompile_messagesInstallStickerSet; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesUninstallStickerSet] = &MTProtoDecompiler::decompile_messagesUninstallStickerSet; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesStartBot] = &MTProtoDecompiler::decompile_messagesStartBot; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMessagesViews] = &MTProtoDecompiler::decompile_messagesGetMessagesViews; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesToggleChatAdmins] = &MTProtoDecompiler::decompile_messagesToggleChatAdmins; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditChatAdmin] = &MTProtoDecompiler::decompile_messagesEditChatAdmin; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesMigrateChat] = &MTProtoDecompiler::decompile_messagesMigrateChat; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSearchGlobal] = &MTProtoDecompiler::decompile_messagesSearchGlobal; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReorderStickerSets] = &MTProtoDecompiler::decompile_messagesReorderStickerSets; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetDocumentByHash] = &MTProtoDecompiler::decompile_messagesGetDocumentByHash; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSearchGifs] = &MTProtoDecompiler::decompile_messagesSearchGifs; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetSavedGifs] = &MTProtoDecompiler::decompile_messagesGetSavedGifs; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSaveGif] = &MTProtoDecompiler::decompile_messagesSaveGif; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetInlineBotResults] = &MTProtoDecompiler::decompile_messagesGetInlineBotResults; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetInlineBotResults] = &MTProtoDecompiler::decompile_messagesSetInlineBotResults; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSendInlineBotResult] = &MTProtoDecompiler::decompile_messagesSendInlineBotResult; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMessageEditData] = &MTProtoDecompiler::decompile_messagesGetMessageEditData; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditMessage] = &MTProtoDecompiler::decompile_messagesEditMessage; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesEditInlineBotMessage] = &MTProtoDecompiler::decompile_messagesEditInlineBotMessage; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetBotCallbackAnswer] = &MTProtoDecompiler::decompile_messagesGetBotCallbackAnswer; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetBotCallbackAnswer] = &MTProtoDecompiler::decompile_messagesSetBotCallbackAnswer; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetPeerDialogs] = &MTProtoDecompiler::decompile_messagesGetPeerDialogs; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSaveDraft] = &MTProtoDecompiler::decompile_messagesSaveDraft; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetAllDrafts] = &MTProtoDecompiler::decompile_messagesGetAllDrafts; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetFeaturedStickers] = &MTProtoDecompiler::decompile_messagesGetFeaturedStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesReadFeaturedStickers] = &MTProtoDecompiler::decompile_messagesReadFeaturedStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetRecentStickers] = &MTProtoDecompiler::decompile_messagesGetRecentStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSaveRecentSticker] = &MTProtoDecompiler::decompile_messagesSaveRecentSticker; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesClearRecentStickers] = &MTProtoDecompiler::decompile_messagesClearRecentStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetArchivedStickers] = &MTProtoDecompiler::decompile_messagesGetArchivedStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetMaskStickers] = &MTProtoDecompiler::decompile_messagesGetMaskStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetAttachedStickers] = &MTProtoDecompiler::decompile_messagesGetAttachedStickers; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetGameScore] = &MTProtoDecompiler::decompile_messagesSetGameScore; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesSetInlineGameScore] = &MTProtoDecompiler::decompile_messagesSetInlineGameScore; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetGameHighScores] = &MTProtoDecompiler::decompile_messagesGetGameHighScores; - MTProtoDecompiler::_ctordispatcher[TLTypes::messagesGetInlineGameHighScores] = &MTProtoDecompiler::decompile_messagesGetInlineGameHighScores; - MTProtoDecompiler::_ctordispatcher[TLTypes::updatesGetState] = &MTProtoDecompiler::decompile_updatesGetState; - MTProtoDecompiler::_ctordispatcher[TLTypes::updatesGetDifference] = &MTProtoDecompiler::decompile_updatesGetDifference; - MTProtoDecompiler::_ctordispatcher[TLTypes::updatesGetChannelDifference] = &MTProtoDecompiler::decompile_updatesGetChannelDifference; - MTProtoDecompiler::_ctordispatcher[TLTypes::photosUpdateProfilePhoto] = &MTProtoDecompiler::decompile_photosUpdateProfilePhoto; - MTProtoDecompiler::_ctordispatcher[TLTypes::photosUploadProfilePhoto] = &MTProtoDecompiler::decompile_photosUploadProfilePhoto; - MTProtoDecompiler::_ctordispatcher[TLTypes::photosDeletePhotos] = &MTProtoDecompiler::decompile_photosDeletePhotos; - MTProtoDecompiler::_ctordispatcher[TLTypes::photosGetUserPhotos] = &MTProtoDecompiler::decompile_photosGetUserPhotos; - MTProtoDecompiler::_ctordispatcher[TLTypes::uploadSaveFilePart] = &MTProtoDecompiler::decompile_uploadSaveFilePart; - MTProtoDecompiler::_ctordispatcher[TLTypes::uploadGetFile] = &MTProtoDecompiler::decompile_uploadGetFile; - MTProtoDecompiler::_ctordispatcher[TLTypes::uploadSaveBigFilePart] = &MTProtoDecompiler::decompile_uploadSaveBigFilePart; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetConfig] = &MTProtoDecompiler::decompile_helpGetConfig; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetNearestDc] = &MTProtoDecompiler::decompile_helpGetNearestDc; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetAppUpdate] = &MTProtoDecompiler::decompile_helpGetAppUpdate; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpSaveAppLog] = &MTProtoDecompiler::decompile_helpSaveAppLog; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetInviteText] = &MTProtoDecompiler::decompile_helpGetInviteText; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetSupport] = &MTProtoDecompiler::decompile_helpGetSupport; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetAppChangelog] = &MTProtoDecompiler::decompile_helpGetAppChangelog; - MTProtoDecompiler::_ctordispatcher[TLTypes::helpGetTermsOfService] = &MTProtoDecompiler::decompile_helpGetTermsOfService; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsReadHistory] = &MTProtoDecompiler::decompile_channelsReadHistory; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsDeleteMessages] = &MTProtoDecompiler::decompile_channelsDeleteMessages; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsDeleteUserHistory] = &MTProtoDecompiler::decompile_channelsDeleteUserHistory; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsReportSpam] = &MTProtoDecompiler::decompile_channelsReportSpam; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetMessages] = &MTProtoDecompiler::decompile_channelsGetMessages; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetParticipants] = &MTProtoDecompiler::decompile_channelsGetParticipants; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetParticipant] = &MTProtoDecompiler::decompile_channelsGetParticipant; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetChannels] = &MTProtoDecompiler::decompile_channelsGetChannels; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetFullChannel] = &MTProtoDecompiler::decompile_channelsGetFullChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsCreateChannel] = &MTProtoDecompiler::decompile_channelsCreateChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditAbout] = &MTProtoDecompiler::decompile_channelsEditAbout; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditAdmin] = &MTProtoDecompiler::decompile_channelsEditAdmin; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditTitle] = &MTProtoDecompiler::decompile_channelsEditTitle; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsEditPhoto] = &MTProtoDecompiler::decompile_channelsEditPhoto; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsCheckUsername] = &MTProtoDecompiler::decompile_channelsCheckUsername; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsUpdateUsername] = &MTProtoDecompiler::decompile_channelsUpdateUsername; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsJoinChannel] = &MTProtoDecompiler::decompile_channelsJoinChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsLeaveChannel] = &MTProtoDecompiler::decompile_channelsLeaveChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsInviteToChannel] = &MTProtoDecompiler::decompile_channelsInviteToChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsKickFromChannel] = &MTProtoDecompiler::decompile_channelsKickFromChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsExportInvite] = &MTProtoDecompiler::decompile_channelsExportInvite; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsDeleteChannel] = &MTProtoDecompiler::decompile_channelsDeleteChannel; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsToggleInvites] = &MTProtoDecompiler::decompile_channelsToggleInvites; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsExportMessageLink] = &MTProtoDecompiler::decompile_channelsExportMessageLink; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsToggleSignatures] = &MTProtoDecompiler::decompile_channelsToggleSignatures; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsUpdatePinnedMessage] = &MTProtoDecompiler::decompile_channelsUpdatePinnedMessage; - MTProtoDecompiler::_ctordispatcher[TLTypes::channelsGetAdminedPublicChannels] = &MTProtoDecompiler::decompile_channelsGetAdminedPublicChannels; + MTProtoDecompiler::_ctordispatcher[TLTypes::reqPq] = &MTProtoDecompiler::decompile_reqPq; + MTProtoDecompiler::_ctordispatcher[TLTypes::reqDHParams] = &MTProtoDecompiler::decompile_reqDHParams; + MTProtoDecompiler::_ctordispatcher[TLTypes::setClientDHParams] = &MTProtoDecompiler::decompile_setClientDHParams; + MTProtoDecompiler::_ctordispatcher[TLTypes::rpcDropAnswer] = &MTProtoDecompiler::decompile_rpcDropAnswer; + MTProtoDecompiler::_ctordispatcher[TLTypes::getFutureSalts] = &MTProtoDecompiler::decompile_getFutureSalts; + MTProtoDecompiler::_ctordispatcher[TLTypes::ping] = &MTProtoDecompiler::decompile_ping; + MTProtoDecompiler::_ctordispatcher[TLTypes::pingDelayDisconnect] = &MTProtoDecompiler::decompile_pingDelayDisconnect; + MTProtoDecompiler::_ctordispatcher[TLTypes::destroySession] = &MTProtoDecompiler::decompile_destroySession; + MTProtoDecompiler::_ctordispatcher[TLTypes::contestSaveDeveloperInfo] = &MTProtoDecompiler::decompile_contestSaveDeveloperInfo; MTProtoDecompiler::_ctordispatcher[TLTypes::ResPQ] = &MTProtoDecompiler::decompile_ResPQ; MTProtoDecompiler::_ctordispatcher[TLTypes::PQInnerData] = &MTProtoDecompiler::decompile_PQInnerData; MTProtoDecompiler::_ctordispatcher[TLTypes::ServerDHParamsFail] = &MTProtoDecompiler::decompile_ServerDHParams; @@ -1628,4889 +1637,2848 @@ void MTProtoDecompiler::initDispatchers() MTProtoDecompiler::_ctordispatcher[TLTypes::DestroySessionNone] = &MTProtoDecompiler::decompile_DestroySessionRes; MTProtoDecompiler::_ctordispatcher[TLTypes::NewSessionCreated] = &MTProtoDecompiler::decompile_NewSession; MTProtoDecompiler::_ctordispatcher[TLTypes::HttpWait] = &MTProtoDecompiler::decompile_HttpWait; - MTProtoDecompiler::_ctordispatcher[TLTypes::reqPq] = &MTProtoDecompiler::decompile_reqPq; - MTProtoDecompiler::_ctordispatcher[TLTypes::reqDHParams] = &MTProtoDecompiler::decompile_reqDHParams; - MTProtoDecompiler::_ctordispatcher[TLTypes::setClientDHParams] = &MTProtoDecompiler::decompile_setClientDHParams; - MTProtoDecompiler::_ctordispatcher[TLTypes::rpcDropAnswer] = &MTProtoDecompiler::decompile_rpcDropAnswer; - MTProtoDecompiler::_ctordispatcher[TLTypes::getFutureSalts] = &MTProtoDecompiler::decompile_getFutureSalts; - MTProtoDecompiler::_ctordispatcher[TLTypes::ping] = &MTProtoDecompiler::decompile_ping; - MTProtoDecompiler::_ctordispatcher[TLTypes::pingDelayDisconnect] = &MTProtoDecompiler::decompile_pingDelayDisconnect; - MTProtoDecompiler::_ctordispatcher[TLTypes::destroySession] = &MTProtoDecompiler::decompile_destroySession; - MTProtoDecompiler::_ctordispatcher[TLTypes::contestSaveDeveloperInfo] = &MTProtoDecompiler::decompile_contestSaveDeveloperInfo; } -void MTProtoDecompiler::decompile_Error(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authCheckPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::authCheckPhone)); + result.append("authCheckPhone("); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authSendCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::authSendCode)); + result.append("authSendCode("); - Q_ASSERT((ctor == Error::CtorError)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == Error::CtorError) + result.append("is_allow_flashcall:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) { - result.append("Error#"); - TLInt code = mtstream.readTLInt(); - result.append("code:" + QString::number(code, 16)); + TLBool is_current_number = mtstream.readTLBool(); + result.append("is_current_number:" + QString::number(is_current_number, 16)); result.append(", "); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); } + TLInt api_id = mtstream.readTLInt(); + result.append("api_id:" + QString::number(api_id, 16)); + result.append(", "); + TLString api_hash = mtstream.readTLString(); + result.append("api_hash:" + thethis->printableString(api_hash)); + result.append(")"); } -void MTProtoDecompiler::decompile_Null(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authSignUp(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Null::CtorNull)); - - if(ctor == Null::CtorNull) - result.append("Null"); + Q_ASSERT((ctor == TLTypes::authSignUp)); + result.append("authSignUp("); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); + result.append(", "); + TLString phone_code = mtstream.readTLString(); + result.append("phone_code:" + thethis->printableString(phone_code)); + result.append(", "); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authSignIn(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputPeer::CtorInputPeerEmpty) || - (ctor == InputPeer::CtorInputPeerSelf) || - (ctor == InputPeer::CtorInputPeerChat) || - (ctor == InputPeer::CtorInputPeerUser) || - (ctor == InputPeer::CtorInputPeerChannel)); - - if(ctor == InputPeer::CtorInputPeerEmpty) - result.append("InputPeerEmpty"); - else if(ctor == InputPeer::CtorInputPeerSelf) - result.append("InputPeerSelf"); - else if(ctor == InputPeer::CtorInputPeerChat) - { - result.append("InputPeerChat#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - } - else if(ctor == InputPeer::CtorInputPeerUser) - { - result.append("InputPeerUser#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } - else if(ctor == InputPeer::CtorInputPeerChannel) - { - result.append("InputPeerChannel#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } + Q_ASSERT((ctor == TLTypes::authSignIn)); + result.append("authSignIn("); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); + result.append(", "); + TLString phone_code = mtstream.readTLString(); + result.append("phone_code:" + thethis->printableString(phone_code)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authLogOut(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::authLogOut)); + result.append("authLogOut()"); +} + +void MTProtoDecompiler::decompile_authResetAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == InputUser::CtorInputUserEmpty) || - (ctor == InputUser::CtorInputUserSelf) || - (ctor == InputUser::CtorInputUser)); + Q_ASSERT((ctor == TLTypes::authResetAuthorizations)); + result.append("authResetAuthorizations()"); +} + +void MTProtoDecompiler::decompile_authSendInvites(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputUser::CtorInputUserEmpty) - result.append("InputUserEmpty"); - else if(ctor == InputUser::CtorInputUserSelf) - result.append("InputUserSelf"); - else if(ctor == InputUser::CtorInputUser) - { - result.append("InputUser#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } + Q_ASSERT((ctor == TLTypes::authSendInvites)); + result.append("authSendInvites("); + result.append("phone_numbers:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authExportAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::authExportAuthorization)); + result.append("authExportAuthorization("); + TLInt dc_id = mtstream.readTLInt(); + result.append("dc_id:" + QString::number(dc_id, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authImportAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::authImportAuthorization)); + result.append("authImportAuthorization("); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authBindTempAuthKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == InputContact::CtorInputPhoneContact)); + Q_ASSERT((ctor == TLTypes::authBindTempAuthKey)); + result.append("authBindTempAuthKey("); + TLLong perm_auth_key_id = mtstream.readTLLong(); + result.append("perm_auth_key_id:" + QString::number(perm_auth_key_id, 16)); + result.append(", "); + TLLong nonce = mtstream.readTLLong(); + result.append("nonce:" + QString::number(nonce, 16)); + result.append(", "); + TLInt expires_at = mtstream.readTLInt(); + result.append("expires_at:" + QString::number(expires_at, 16)); + result.append(", "); + TLBytes encrypted_message = mtstream.readTLBytes(); + result.append("encrypted_message:" + thethis->printableString(encrypted_message)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authImportBotAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputContact::CtorInputPhoneContact) - { - result.append("InputPhoneContact#"); - TLLong client_id = mtstream.readTLLong(); - result.append("client_id:" + QString::number(client_id, 16)); - result.append(", "); - TLString phone = mtstream.readTLString(); - result.append("phone:" + thethis->printableString(phone)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - } + Q_ASSERT((ctor == TLTypes::authImportBotAuthorization)); + result.append("authImportBotAuthorization("); + TLInt flags = mtstream.readTLInt(); + result.append("flags:" + QString::number(flags, 16)); + result.append(", "); + TLInt api_id = mtstream.readTLInt(); + result.append("api_id:" + QString::number(api_id, 16)); + result.append(", "); + TLString api_hash = mtstream.readTLString(); + result.append("api_hash:" + thethis->printableString(api_hash)); + result.append(", "); + TLString bot_auth_token = mtstream.readTLString(); + result.append("bot_auth_token:" + thethis->printableString(bot_auth_token)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authCheckPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::authCheckPassword)); + result.append("authCheckPassword("); + TLBytes password_hash = mtstream.readTLBytes(); + result.append("password_hash:" + thethis->printableString(password_hash)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authRequestPasswordRecovery(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::authRequestPasswordRecovery)); + result.append("authRequestPasswordRecovery()"); +} + +void MTProtoDecompiler::decompile_authRecoverPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == InputFile::CtorInputFile) || - (ctor == InputFile::CtorInputFileBig)); + Q_ASSERT((ctor == TLTypes::authRecoverPassword)); + result.append("authRecoverPassword("); + TLString code = mtstream.readTLString(); + result.append("code:" + thethis->printableString(code)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authResendCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputFile::CtorInputFile) - { - result.append("InputFile#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt parts = mtstream.readTLInt(); - result.append("parts:" + QString::number(parts, 16)); - result.append(", "); - TLString name = mtstream.readTLString(); - result.append("name:" + thethis->printableString(name)); - result.append(", "); - TLString md5_checksum = mtstream.readTLString(); - result.append("md5_checksum:" + thethis->printableString(md5_checksum)); - } - else if(ctor == InputFile::CtorInputFileBig) - { - result.append("InputFileBig#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt parts = mtstream.readTLInt(); - result.append("parts:" + QString::number(parts, 16)); - result.append(", "); - TLString name = mtstream.readTLString(); - result.append("name:" + thethis->printableString(name)); - } + Q_ASSERT((ctor == TLTypes::authResendCode)); + result.append("authResendCode("); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_authCancelCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::authCancelCode)); + result.append("authCancelCode("); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_authDropTempAuthKeys(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::authDropTempAuthKeys)); + result.append("authDropTempAuthKeys("); + result.append("except_auth_keys:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountRegisterDevice(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == InputMedia::CtorInputMediaEmpty) || - (ctor == InputMedia::CtorInputMediaUploadedPhoto) || - (ctor == InputMedia::CtorInputMediaPhoto) || - (ctor == InputMedia::CtorInputMediaGeoPoint) || - (ctor == InputMedia::CtorInputMediaContact) || - (ctor == InputMedia::CtorInputMediaUploadedDocument) || - (ctor == InputMedia::CtorInputMediaUploadedThumbDocument) || - (ctor == InputMedia::CtorInputMediaDocument) || - (ctor == InputMedia::CtorInputMediaVenue) || - (ctor == InputMedia::CtorInputMediaGifExternal) || - (ctor == InputMedia::CtorInputMediaPhotoExternal) || - (ctor == InputMedia::CtorInputMediaDocumentExternal) || - (ctor == InputMedia::CtorInputMediaGame)); + Q_ASSERT((ctor == TLTypes::accountRegisterDevice)); + result.append("accountRegisterDevice("); + TLInt token_type = mtstream.readTLInt(); + result.append("token_type:" + QString::number(token_type, 16)); + result.append(", "); + TLString token = mtstream.readTLString(); + result.append("token:" + thethis->printableString(token)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountUnregisterDevice(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputMedia::CtorInputMediaEmpty) - result.append("InputMediaEmpty"); - else if(ctor == InputMedia::CtorInputMediaUploadedPhoto) - { - result.append("InputMediaUploadedPhoto#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("file:"); - MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("stickers:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - } - else if(ctor == InputMedia::CtorInputMediaPhoto) - { - result.append("InputMediaPhoto#"); - result.append("id_inputmediaphoto:"); - MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - } - else if(ctor == InputMedia::CtorInputMediaGeoPoint) - { - result.append("InputMediaGeoPoint#"); - result.append("geo_point:"); - MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); - } - else if(ctor == InputMedia::CtorInputMediaContact) - { - result.append("InputMediaContact#"); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - } - else if(ctor == InputMedia::CtorInputMediaUploadedDocument) - { - result.append("InputMediaUploadedDocument#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("file:"); - MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); - TLString mime_type = mtstream.readTLString(); - result.append("mime_type:" + thethis->printableString(mime_type)); - result.append(", "); - result.append("attributes:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("stickers:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - } - else if(ctor == InputMedia::CtorInputMediaUploadedThumbDocument) - { - result.append("InputMediaUploadedThumbDocument#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("file:"); - MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); - result.append("thumb:"); - MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); - TLString mime_type = mtstream.readTLString(); - result.append("mime_type:" + thethis->printableString(mime_type)); - result.append(", "); - result.append("attributes:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("stickers:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - } - else if(ctor == InputMedia::CtorInputMediaDocument) - { - result.append("InputMediaDocument#"); - result.append("id_inputmediadocument:"); - MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - } - else if(ctor == InputMedia::CtorInputMediaVenue) - { - result.append("InputMediaVenue#"); - result.append("geo_point:"); - MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString address = mtstream.readTLString(); - result.append("address:" + thethis->printableString(address)); - result.append(", "); - TLString provider = mtstream.readTLString(); - result.append("provider:" + thethis->printableString(provider)); - result.append(", "); - TLString venue_id = mtstream.readTLString(); - result.append("venue_id:" + thethis->printableString(venue_id)); - } - else if(ctor == InputMedia::CtorInputMediaGifExternal) - { - result.append("InputMediaGifExternal#"); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - TLString q = mtstream.readTLString(); - result.append("q:" + thethis->printableString(q)); - } - else if(ctor == InputMedia::CtorInputMediaPhotoExternal) - { - result.append("InputMediaPhotoExternal#"); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - } - else if(ctor == InputMedia::CtorInputMediaDocumentExternal) - { - result.append("InputMediaDocumentExternal#"); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - } - else if(ctor == InputMedia::CtorInputMediaGame) - { - result.append("InputMediaGame#"); - result.append("id_inputmediagame:"); - MTProtoDecompiler::decompile_InputGame(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::accountUnregisterDevice)); + result.append("accountUnregisterDevice("); + TLInt token_type = mtstream.readTLInt(); + result.append("token_type:" + QString::number(token_type, 16)); + result.append(", "); + TLString token = mtstream.readTLString(); + result.append("token:" + thethis->printableString(token)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountUpdateNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputChatPhoto::CtorInputChatPhotoEmpty) || - (ctor == InputChatPhoto::CtorInputChatUploadedPhoto) || - (ctor == InputChatPhoto::CtorInputChatPhoto)); + Q_ASSERT((ctor == TLTypes::accountUpdateNotifySettings)); + result.append("accountUpdateNotifySettings("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputNotifyPeer(thethis, result, mtstream); + result.append("settings:"); + MTProtoDecompiler::decompile_InputPeerNotifySettings(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountGetNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputChatPhoto::CtorInputChatPhotoEmpty) - result.append("InputChatPhotoEmpty"); - else if(ctor == InputChatPhoto::CtorInputChatUploadedPhoto) - { - result.append("InputChatUploadedPhoto#"); - result.append("file:"); - MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); - } - else if(ctor == InputChatPhoto::CtorInputChatPhoto) - { - result.append("InputChatPhoto#"); - result.append("id:"); - MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::accountGetNotifySettings)); + result.append("accountGetNotifySettings("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputNotifyPeer(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_InputGeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountResetNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::accountResetNotifySettings)); + result.append("accountResetNotifySettings()"); +} + +void MTProtoDecompiler::decompile_accountUpdateProfile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::accountUpdateProfile)); + result.append("accountUpdateProfile("); - Q_ASSERT((ctor == InputGeoPoint::CtorInputGeoPointEmpty) || - (ctor == InputGeoPoint::CtorInputGeoPoint)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == InputGeoPoint::CtorInputGeoPointEmpty) - result.append("InputGeoPointEmpty"); - else if(ctor == InputGeoPoint::CtorInputGeoPoint) + if(IS_FLAG_SET(flags, 0)) { - result.append("InputGeoPoint#"); - TLDouble latitude = mtstream.readTLDouble(); - result.append("latitude:" + QString::number(latitude)); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); result.append(", "); - TLDouble longitude = mtstream.readTLDouble(); - result.append("longitude:" + QString::number(longitude)); } + if(IS_FLAG_SET(flags, 1)) + { + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString about = mtstream.readTLString(); + result.append("about:" + thethis->printableString(about)); + } + result.append(")"); } -void MTProtoDecompiler::decompile_InputPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountUpdateStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputPhoto::CtorInputPhotoEmpty) || - (ctor == InputPhoto::CtorInputPhoto)); - - if(ctor == InputPhoto::CtorInputPhotoEmpty) - result.append("InputPhotoEmpty"); - else if(ctor == InputPhoto::CtorInputPhoto) - { - result.append("InputPhoto#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } + Q_ASSERT((ctor == TLTypes::accountUpdateStatus)); + result.append("accountUpdateStatus("); + TLBool is_offline = mtstream.readTLBool(); + result.append("is_offline:" + QString::number(is_offline, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputFileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountGetWallPapers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputFileLocation::CtorInputFileLocation) || - (ctor == InputFileLocation::CtorInputEncryptedFileLocation) || - (ctor == InputFileLocation::CtorInputDocumentFileLocation)); - - if(ctor == InputFileLocation::CtorInputFileLocation) - { - result.append("InputFileLocation#"); - TLLong volume_id = mtstream.readTLLong(); - result.append("volume_id:" + QString::number(volume_id, 16)); - result.append(", "); - TLInt local_id = mtstream.readTLInt(); - result.append("local_id:" + QString::number(local_id, 16)); - result.append(", "); - TLLong secret = mtstream.readTLLong(); - result.append("secret:" + QString::number(secret, 16)); - } - else if(ctor == InputFileLocation::CtorInputEncryptedFileLocation) - { - result.append("InputEncryptedFileLocation#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } - else if(ctor == InputFileLocation::CtorInputDocumentFileLocation) - { - result.append("InputDocumentFileLocation#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - } + Q_ASSERT((ctor == TLTypes::accountGetWallPapers)); + result.append("accountGetWallPapers()"); } -void MTProtoDecompiler::decompile_InputAppEvent(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountReportPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputAppEvent::CtorInputAppEvent)); - - if(ctor == InputAppEvent::CtorInputAppEvent) - { - result.append("InputAppEvent#"); - TLDouble time = mtstream.readTLDouble(); - result.append("time:" + QString::number(time)); - result.append(", "); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - result.append(", "); - TLLong peer = mtstream.readTLLong(); - result.append("peer:" + QString::number(peer, 16)); - result.append(", "); - TLString data = mtstream.readTLString(); - result.append("data:" + thethis->printableString(data)); - } + Q_ASSERT((ctor == TLTypes::accountReportPeer)); + result.append("accountReportPeer("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append("reason:"); + MTProtoDecompiler::decompile_ReportReason(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_Peer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountCheckUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Peer::CtorPeerUser) || - (ctor == Peer::CtorPeerChat) || - (ctor == Peer::CtorPeerChannel)); - - if(ctor == Peer::CtorPeerUser) - { - result.append("PeerUser#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - } - else if(ctor == Peer::CtorPeerChat) - { - result.append("PeerChat#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - } - else if(ctor == Peer::CtorPeerChannel) - { - result.append("PeerChannel#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - } + Q_ASSERT((ctor == TLTypes::accountCheckUsername)); + result.append("accountCheckUsername("); + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(")"); } -void MTProtoDecompiler::decompile_StorageFileType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountUpdateUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == StorageFileType::CtorStorageFileUnknown) || - (ctor == StorageFileType::CtorStorageFileJpeg) || - (ctor == StorageFileType::CtorStorageFileGif) || - (ctor == StorageFileType::CtorStorageFilePng) || - (ctor == StorageFileType::CtorStorageFilePdf) || - (ctor == StorageFileType::CtorStorageFileMp3) || - (ctor == StorageFileType::CtorStorageFileMov) || - (ctor == StorageFileType::CtorStorageFilePartial) || - (ctor == StorageFileType::CtorStorageFileMp4) || - (ctor == StorageFileType::CtorStorageFileWebp)); - - if(ctor == StorageFileType::CtorStorageFileUnknown) - result.append("StorageFileUnknown"); - else if(ctor == StorageFileType::CtorStorageFileJpeg) - result.append("StorageFileJpeg"); - else if(ctor == StorageFileType::CtorStorageFileGif) - result.append("StorageFileGif"); - else if(ctor == StorageFileType::CtorStorageFilePng) - result.append("StorageFilePng"); - else if(ctor == StorageFileType::CtorStorageFilePdf) - result.append("StorageFilePdf"); - else if(ctor == StorageFileType::CtorStorageFileMp3) - result.append("StorageFileMp3"); - else if(ctor == StorageFileType::CtorStorageFileMov) - result.append("StorageFileMov"); - else if(ctor == StorageFileType::CtorStorageFilePartial) - result.append("StorageFilePartial"); - else if(ctor == StorageFileType::CtorStorageFileMp4) - result.append("StorageFileMp4"); - else if(ctor == StorageFileType::CtorStorageFileWebp) - result.append("StorageFileWebp"); + Q_ASSERT((ctor == TLTypes::accountUpdateUsername)); + result.append("accountUpdateUsername("); + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(")"); } -void MTProtoDecompiler::decompile_FileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountGetPrivacy(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::accountGetPrivacy)); + result.append("accountGetPrivacy("); + result.append("key:"); + MTProtoDecompiler::decompile_InputPrivacyKey(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountSetPrivacy(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == FileLocation::CtorFileLocationUnavailable) || - (ctor == FileLocation::CtorFileLocation)); + Q_ASSERT((ctor == TLTypes::accountSetPrivacy)); + result.append("accountSetPrivacy("); + result.append("key:"); + MTProtoDecompiler::decompile_InputPrivacyKey(thethis, result, mtstream); + result.append("rules:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountDeleteAccount(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == FileLocation::CtorFileLocationUnavailable) - { - result.append("FileLocationUnavailable#"); - TLLong volume_id = mtstream.readTLLong(); - result.append("volume_id:" + QString::number(volume_id, 16)); - result.append(", "); - TLInt local_id = mtstream.readTLInt(); - result.append("local_id:" + QString::number(local_id, 16)); - result.append(", "); - TLLong secret = mtstream.readTLLong(); - result.append("secret:" + QString::number(secret, 16)); - } - else if(ctor == FileLocation::CtorFileLocation) - { - result.append("FileLocation#"); - TLInt dc_id = mtstream.readTLInt(); - result.append("dc_id:" + QString::number(dc_id, 16)); - result.append(", "); - TLLong volume_id = mtstream.readTLLong(); - result.append("volume_id:" + QString::number(volume_id, 16)); - result.append(", "); - TLInt local_id = mtstream.readTLInt(); - result.append("local_id:" + QString::number(local_id, 16)); - result.append(", "); - TLLong secret = mtstream.readTLLong(); - result.append("secret:" + QString::number(secret, 16)); - } + Q_ASSERT((ctor == TLTypes::accountDeleteAccount)); + result.append("accountDeleteAccount("); + TLString reason = mtstream.readTLString(); + result.append("reason:" + thethis->printableString(reason)); + result.append(")"); } -void MTProtoDecompiler::decompile_User(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountGetAccountTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == User::CtorUserEmpty) || - (ctor == User::CtorUser)); - - if(ctor == User::CtorUserEmpty) - { - result.append("UserEmpty#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - } - else if(ctor == User::CtorUser) - { - result.append("User#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_self:" + BIT_FIELD_VALUE(flags, 10)); - result.append(", "); - result.append("is_contact:" + BIT_FIELD_VALUE(flags, 11)); - result.append(", "); - result.append("is_mutual_contact:" + BIT_FIELD_VALUE(flags, 12)); - result.append(", "); - result.append("is_deleted:" + BIT_FIELD_VALUE(flags, 13)); - result.append(", "); - result.append("is_bot:" + BIT_FIELD_VALUE(flags, 14)); - result.append(", "); - result.append("is_bot_chat_history:" + BIT_FIELD_VALUE(flags, 15)); - result.append(", "); - result.append("is_bot_nochats:" + BIT_FIELD_VALUE(flags, 16)); - result.append(", "); - result.append("is_verified:" + BIT_FIELD_VALUE(flags, 17)); - result.append(", "); - result.append("is_restricted:" + BIT_FIELD_VALUE(flags, 18)); - result.append(", "); - result.append("is_min:" + BIT_FIELD_VALUE(flags, 20)); - result.append(", "); - result.append("is_bot_inline_geo:" + BIT_FIELD_VALUE(flags, 21)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 4)) - { - TLString phone = mtstream.readTLString(); - result.append("phone:" + thethis->printableString(phone)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - result.append("photo:"); - MTProtoDecompiler::decompile_UserProfilePhoto(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 6)) - { - result.append("status:"); - MTProtoDecompiler::decompile_UserStatus(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 14)) - { - TLInt bot_info_version = mtstream.readTLInt(); - result.append("bot_info_version:" + QString::number(bot_info_version, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 18)) - { - TLString restriction_reason = mtstream.readTLString(); - result.append("restriction_reason:" + thethis->printableString(restriction_reason)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 19)) - { - TLString bot_inline_placeholder = mtstream.readTLString(); - result.append("bot_inline_placeholder:" + thethis->printableString(bot_inline_placeholder)); - } - } + Q_ASSERT((ctor == TLTypes::accountGetAccountTTL)); + result.append("accountGetAccountTTL()"); } -void MTProtoDecompiler::decompile_UserProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountSetAccountTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::accountSetAccountTTL)); + result.append("accountSetAccountTTL("); + result.append("ttl:"); + MTProtoDecompiler::decompile_AccountDaysTTL(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountSendChangePhoneCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::accountSendChangePhoneCode)); + result.append("accountSendChangePhoneCode("); - Q_ASSERT((ctor == UserProfilePhoto::CtorUserProfilePhotoEmpty) || - (ctor == UserProfilePhoto::CtorUserProfilePhoto)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == UserProfilePhoto::CtorUserProfilePhotoEmpty) - result.append("UserProfilePhotoEmpty"); - else if(ctor == UserProfilePhoto::CtorUserProfilePhoto) + result.append("is_allow_flashcall:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) { - result.append("UserProfilePhoto#"); - TLLong photo_id = mtstream.readTLLong(); - result.append("photo_id:" + QString::number(photo_id, 16)); - result.append(", "); - result.append("photo_small:"); - MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); - result.append("photo_big:"); - MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); + TLBool is_current_number = mtstream.readTLBool(); + result.append("is_current_number:" + QString::number(is_current_number, 16)); } + result.append(")"); } -void MTProtoDecompiler::decompile_UserStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountChangePhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::accountChangePhone)); + result.append("accountChangePhone("); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); + result.append(", "); + TLString phone_code = mtstream.readTLString(); + result.append("phone_code:" + thethis->printableString(phone_code)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountUpdateDeviceLocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == UserStatus::CtorUserStatusEmpty) || - (ctor == UserStatus::CtorUserStatusOnline) || - (ctor == UserStatus::CtorUserStatusOffline) || - (ctor == UserStatus::CtorUserStatusRecently) || - (ctor == UserStatus::CtorUserStatusLastWeek) || - (ctor == UserStatus::CtorUserStatusLastMonth)); + Q_ASSERT((ctor == TLTypes::accountUpdateDeviceLocked)); + result.append("accountUpdateDeviceLocked("); + TLInt period = mtstream.readTLInt(); + result.append("period:" + QString::number(period, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountGetAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == UserStatus::CtorUserStatusEmpty) - result.append("UserStatusEmpty"); - else if(ctor == UserStatus::CtorUserStatusOnline) - { - result.append("UserStatusOnline#"); - TLInt expires = mtstream.readTLInt(); - result.append("expires:" + QString::number(expires, 16)); - } - else if(ctor == UserStatus::CtorUserStatusOffline) - { - result.append("UserStatusOffline#"); - TLInt was_online = mtstream.readTLInt(); - result.append("was_online:" + QString::number(was_online, 16)); - } - else if(ctor == UserStatus::CtorUserStatusRecently) - result.append("UserStatusRecently"); - else if(ctor == UserStatus::CtorUserStatusLastWeek) - result.append("UserStatusLastWeek"); - else if(ctor == UserStatus::CtorUserStatusLastMonth) - result.append("UserStatusLastMonth"); + Q_ASSERT((ctor == TLTypes::accountGetAuthorizations)); + result.append("accountGetAuthorizations()"); } -void MTProtoDecompiler::decompile_Chat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountResetAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::accountResetAuthorization)); + result.append("accountResetAuthorization("); + TLLong hash = mtstream.readTLLong(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountGetPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::accountGetPassword)); + result.append("accountGetPassword()"); +} + +void MTProtoDecompiler::decompile_accountGetPasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == Chat::CtorChatEmpty) || - (ctor == Chat::CtorChat) || - (ctor == Chat::CtorChatForbidden) || - (ctor == Chat::CtorChannel) || - (ctor == Chat::CtorChannelForbidden)); + Q_ASSERT((ctor == TLTypes::accountGetPasswordSettings)); + result.append("accountGetPasswordSettings("); + TLBytes current_password_hash = mtstream.readTLBytes(); + result.append("current_password_hash:" + thethis->printableString(current_password_hash)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_accountUpdatePasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == Chat::CtorChatEmpty) - { - result.append("ChatEmpty#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - } - else if(ctor == Chat::CtorChat) - { - result.append("Chat#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_creator:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_kicked:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_left:" + BIT_FIELD_VALUE(flags, 2)); - result.append(", "); - result.append("is_admins_enabled:" + BIT_FIELD_VALUE(flags, 3)); - result.append(", "); - result.append("is_admin:" + BIT_FIELD_VALUE(flags, 4)); - result.append(", "); - result.append("is_deactivated:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_ChatPhoto(thethis, result, mtstream); - TLInt participants_count = mtstream.readTLInt(); - result.append("participants_count:" + QString::number(participants_count, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 6)) - { - result.append("migrated_to:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - } - } - else if(ctor == Chat::CtorChatForbidden) - { - result.append("ChatForbidden#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - } - else if(ctor == Chat::CtorChannel) - { - result.append("Channel#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_creator:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_kicked:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_left:" + BIT_FIELD_VALUE(flags, 2)); - result.append(", "); - result.append("is_editor:" + BIT_FIELD_VALUE(flags, 3)); - result.append(", "); - result.append("is_moderator:" + BIT_FIELD_VALUE(flags, 4)); - result.append(", "); - result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_verified:" + BIT_FIELD_VALUE(flags, 7)); - result.append(", "); - result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 8)); - result.append(", "); - result.append("is_restricted:" + BIT_FIELD_VALUE(flags, 9)); - result.append(", "); - result.append("is_democracy:" + BIT_FIELD_VALUE(flags, 10)); - result.append(", "); - result.append("is_signatures:" + BIT_FIELD_VALUE(flags, 11)); - result.append(", "); - result.append("is_min:" + BIT_FIELD_VALUE(flags, 12)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 13)) - { - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - } - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - if(IS_FLAG_SET(flags, 6)) - { - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(", "); - } - result.append("photo:"); - MTProtoDecompiler::decompile_ChatPhoto(thethis, result, mtstream); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 9)) - { - TLString restriction_reason = mtstream.readTLString(); - result.append("restriction_reason:" + thethis->printableString(restriction_reason)); - } - } - else if(ctor == Chat::CtorChannelForbidden) - { - result.append("ChannelForbidden#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 8)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - } + Q_ASSERT((ctor == TLTypes::accountUpdatePasswordSettings)); + result.append("accountUpdatePasswordSettings("); + TLBytes current_password_hash = mtstream.readTLBytes(); + result.append("current_password_hash:" + thethis->printableString(current_password_hash)); + result.append(", "); + result.append("new_settings:"); + MTProtoDecompiler::decompile_AccountPasswordInputSettings(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_ChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountSendConfirmPhoneCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::accountSendConfirmPhoneCode)); + result.append("accountSendConfirmPhoneCode("); - Q_ASSERT((ctor == ChatFull::CtorChatFull) || - (ctor == ChatFull::CtorChannelFull)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == ChatFull::CtorChatFull) - { - result.append("ChatFull#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - result.append("participants:"); - MTProtoDecompiler::decompile_ChatParticipants(thethis, result, mtstream); - result.append("chat_photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - result.append("notify_settings:"); - MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); - result.append("exported_invite:"); - MTProtoDecompiler::decompile_ExportedChatInvite(thethis, result, mtstream); - result.append("bot_info:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == ChatFull::CtorChannelFull) + result.append("is_allow_flashcall:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLString hash = mtstream.readTLString(); + result.append("hash:" + thethis->printableString(hash)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) { - result.append("ChannelFull#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_can_view_participants:" + BIT_FIELD_VALUE(flags, 3)); - result.append(", "); - result.append("is_can_set_username:" + BIT_FIELD_VALUE(flags, 6)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString about = mtstream.readTLString(); - result.append("about:" + thethis->printableString(about)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLInt participants_count = mtstream.readTLInt(); - result.append("participants_count:" + QString::number(participants_count, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLInt admins_count = mtstream.readTLInt(); - result.append("admins_count:" + QString::number(admins_count, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLInt kicked_count = mtstream.readTLInt(); - result.append("kicked_count:" + QString::number(kicked_count, 16)); - result.append(", "); - } - TLInt read_inbox_max_id = mtstream.readTLInt(); - result.append("read_inbox_max_id:" + QString::number(read_inbox_max_id, 16)); - result.append(", "); - TLInt read_outbox_max_id = mtstream.readTLInt(); - result.append("read_outbox_max_id:" + QString::number(read_outbox_max_id, 16)); - result.append(", "); - TLInt unread_count = mtstream.readTLInt(); - result.append("unread_count:" + QString::number(unread_count, 16)); - result.append(", "); - result.append("chat_photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - result.append("notify_settings:"); - MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); - result.append("exported_invite:"); - MTProtoDecompiler::decompile_ExportedChatInvite(thethis, result, mtstream); - result.append("bot_info:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - if(IS_FLAG_SET(flags, 4)) - { - TLInt migrated_from_chat_id = mtstream.readTLInt(); - result.append("migrated_from_chat_id:" + QString::number(migrated_from_chat_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 4)) - { - TLInt migrated_from_max_id = mtstream.readTLInt(); - result.append("migrated_from_max_id:" + QString::number(migrated_from_max_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - TLInt pinned_msg_id = mtstream.readTLInt(); - result.append("pinned_msg_id:" + QString::number(pinned_msg_id, 16)); - } + TLBool is_current_number = mtstream.readTLBool(); + result.append("is_current_number:" + QString::number(is_current_number, 16)); } + result.append(")"); } -void MTProtoDecompiler::decompile_ChatParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_accountConfirmPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::accountConfirmPhone)); + result.append("accountConfirmPhone("); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); + result.append(", "); + TLString phone_code = mtstream.readTLString(); + result.append("phone_code:" + thethis->printableString(phone_code)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_usersGetUsers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == ChatParticipant::CtorChatParticipant) || - (ctor == ChatParticipant::CtorChatParticipantCreator) || - (ctor == ChatParticipant::CtorChatParticipantAdmin)); + Q_ASSERT((ctor == TLTypes::usersGetUsers)); + result.append("usersGetUsers("); + result.append("id:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_usersGetFullUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == ChatParticipant::CtorChatParticipant) - { - result.append("ChatParticipant#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt inviter_id = mtstream.readTLInt(); - result.append("inviter_id:" + QString::number(inviter_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } - else if(ctor == ChatParticipant::CtorChatParticipantCreator) - { - result.append("ChatParticipantCreator#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - } - else if(ctor == ChatParticipant::CtorChatParticipantAdmin) - { - result.append("ChatParticipantAdmin#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt inviter_id = mtstream.readTLInt(); - result.append("inviter_id:" + QString::number(inviter_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } + Q_ASSERT((ctor == TLTypes::usersGetFullUser)); + result.append("usersGetFullUser("); + result.append("id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_ChatParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_contactsGetStatuses(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::contactsGetStatuses)); + result.append("contactsGetStatuses()"); +} + +void MTProtoDecompiler::decompile_contactsGetContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::contactsGetContacts)); + result.append("contactsGetContacts("); + TLString hash = mtstream.readTLString(); + result.append("hash:" + thethis->printableString(hash)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsImportContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == ChatParticipants::CtorChatParticipantsForbidden) || - (ctor == ChatParticipants::CtorChatParticipants)); + Q_ASSERT((ctor == TLTypes::contactsImportContacts)); + result.append("contactsImportContacts("); + result.append("contacts:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLBool is_replace = mtstream.readTLBool(); + result.append("is_replace:" + QString::number(is_replace, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsDeleteContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == ChatParticipants::CtorChatParticipantsForbidden) - { - result.append("ChatParticipantsForbidden#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("self_participant:"); - MTProtoDecompiler::decompile_ChatParticipant(thethis, result, mtstream); - } - } - else if(ctor == ChatParticipants::CtorChatParticipants) - { - result.append("ChatParticipants#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - result.append("participants:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - } + Q_ASSERT((ctor == TLTypes::contactsDeleteContact)); + result.append("contactsDeleteContact("); + result.append("id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_ChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_contactsDeleteContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::contactsDeleteContacts)); + result.append("contactsDeleteContacts("); + result.append("id:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsBlock(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::contactsBlock)); + result.append("contactsBlock("); + result.append("id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsUnblock(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == ChatPhoto::CtorChatPhotoEmpty) || - (ctor == ChatPhoto::CtorChatPhoto)); + Q_ASSERT((ctor == TLTypes::contactsUnblock)); + result.append("contactsUnblock("); + result.append("id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsGetBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == ChatPhoto::CtorChatPhotoEmpty) - result.append("ChatPhotoEmpty"); - else if(ctor == ChatPhoto::CtorChatPhoto) - { - result.append("ChatPhoto#"); - result.append("photo_small:"); - MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); - result.append("photo_big:"); - MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::contactsGetBlocked)); + result.append("contactsGetBlocked("); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_Message(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_contactsExportCard(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::contactsExportCard)); + result.append("contactsExportCard()"); +} + +void MTProtoDecompiler::decompile_contactsImportCard(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::contactsImportCard)); + result.append("contactsImportCard("); + result.append("export_card:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsSearch(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == Message::CtorMessageEmpty) || - (ctor == Message::CtorMessage) || - (ctor == Message::CtorMessageService)); + Q_ASSERT((ctor == TLTypes::contactsSearch)); + result.append("contactsSearch("); + TLString q = mtstream.readTLString(); + result.append("q:" + thethis->printableString(q)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_contactsResolveUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == Message::CtorMessageEmpty) - { - result.append("MessageEmpty#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - } - else if(ctor == Message::CtorMessage) - { - result.append("Message#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); - result.append(", "); - result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); - result.append(", "); - result.append("is_post:" + BIT_FIELD_VALUE(flags, 14)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 8)) - { - TLInt from_id = mtstream.readTLInt(); - result.append("from_id:" + QString::number(from_id, 16)); - result.append(", "); - } - result.append("to_id:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 2)) - { - result.append("fwd_from:"); - MTProtoDecompiler::decompile_MessageFwdHeader(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 11)) - { - TLInt via_bot_id = mtstream.readTLInt(); - result.append("via_bot_id:" + QString::number(via_bot_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); - result.append(", "); - } - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(", "); - if(IS_FLAG_SET(flags, 9)) - { - result.append("media:"); - MTProtoDecompiler::decompile_MessageMedia(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 6)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 7)) - { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - } - if(IS_FLAG_SET(flags, 10)) - { - TLInt views = mtstream.readTLInt(); - result.append("views:" + QString::number(views, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 15)) - { - TLInt edit_date = mtstream.readTLInt(); - result.append("edit_date:" + QString::number(edit_date, 16)); - } - } - else if(ctor == Message::CtorMessageService) - { - result.append("MessageService#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); - result.append(", "); - result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); - result.append(", "); - result.append("is_post:" + BIT_FIELD_VALUE(flags, 14)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 8)) - { - TLInt from_id = mtstream.readTLInt(); - result.append("from_id:" + QString::number(from_id, 16)); - result.append(", "); - } - result.append("to_id:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 3)) - { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); - result.append(", "); - } - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - result.append("action:"); - MTProtoDecompiler::decompile_MessageAction(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::contactsResolveUsername)); + result.append("contactsResolveUsername("); + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessageMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_contactsGetTopPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::contactsGetTopPeers)); + result.append("contactsGetTopPeers("); - Q_ASSERT((ctor == MessageMedia::CtorMessageMediaEmpty) || - (ctor == MessageMedia::CtorMessageMediaPhoto) || - (ctor == MessageMedia::CtorMessageMediaGeo) || - (ctor == MessageMedia::CtorMessageMediaContact) || - (ctor == MessageMedia::CtorMessageMediaUnsupported) || - (ctor == MessageMedia::CtorMessageMediaDocument) || - (ctor == MessageMedia::CtorMessageMediaWebPage) || - (ctor == MessageMedia::CtorMessageMediaVenue) || - (ctor == MessageMedia::CtorMessageMediaGame)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == MessageMedia::CtorMessageMediaEmpty) - result.append("MessageMediaEmpty"); - else if(ctor == MessageMedia::CtorMessageMediaPhoto) - { - result.append("MessageMediaPhoto#"); - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - } - else if(ctor == MessageMedia::CtorMessageMediaGeo) - { - result.append("MessageMediaGeo#"); - result.append("geo:"); - MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); - } - else if(ctor == MessageMedia::CtorMessageMediaContact) - { - result.append("MessageMediaContact#"); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - } - else if(ctor == MessageMedia::CtorMessageMediaUnsupported) - result.append("MessageMediaUnsupported"); - else if(ctor == MessageMedia::CtorMessageMediaDocument) - { - result.append("MessageMediaDocument#"); - result.append("document:"); - MTProtoDecompiler::decompile_Document(thethis, result, mtstream); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - } - else if(ctor == MessageMedia::CtorMessageMediaWebPage) - { - result.append("MessageMediaWebPage#"); - result.append("webpage:"); - MTProtoDecompiler::decompile_WebPage(thethis, result, mtstream); - } - else if(ctor == MessageMedia::CtorMessageMediaVenue) - { - result.append("MessageMediaVenue#"); - result.append("geo:"); - MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString address = mtstream.readTLString(); - result.append("address:" + thethis->printableString(address)); - result.append(", "); - TLString provider = mtstream.readTLString(); - result.append("provider:" + thethis->printableString(provider)); - result.append(", "); - TLString venue_id = mtstream.readTLString(); - result.append("venue_id:" + thethis->printableString(venue_id)); - } - else if(ctor == MessageMedia::CtorMessageMediaGame) - { - result.append("MessageMediaGame#"); - result.append("game:"); - MTProtoDecompiler::decompile_Game(thethis, result, mtstream); - } + result.append("is_correspondents:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_bots_pm:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_bots_inline:" + BIT_FIELD_VALUE(flags, 2)); + result.append(", "); + result.append("is_groups:" + BIT_FIELD_VALUE(flags, 10)); + result.append(", "); + result.append("is_channels:" + BIT_FIELD_VALUE(flags, 15)); + result.append(", "); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(", "); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_contactsResetTopPeerRating(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::contactsResetTopPeerRating)); + result.append("contactsResetTopPeerRating("); + result.append("category:"); + MTProtoDecompiler::decompile_TopPeerCategory(thethis, result, mtstream); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == MessageAction::CtorMessageActionEmpty) || - (ctor == MessageAction::CtorMessageActionChatCreate) || - (ctor == MessageAction::CtorMessageActionChatEditTitle) || - (ctor == MessageAction::CtorMessageActionChatEditPhoto) || - (ctor == MessageAction::CtorMessageActionChatDeletePhoto) || - (ctor == MessageAction::CtorMessageActionChatAddUser) || - (ctor == MessageAction::CtorMessageActionChatDeleteUser) || - (ctor == MessageAction::CtorMessageActionChatJoinedByLink) || - (ctor == MessageAction::CtorMessageActionChannelCreate) || - (ctor == MessageAction::CtorMessageActionChatMigrateTo) || - (ctor == MessageAction::CtorMessageActionChannelMigrateFrom) || - (ctor == MessageAction::CtorMessageActionPinMessage) || - (ctor == MessageAction::CtorMessageActionHistoryClear) || - (ctor == MessageAction::CtorMessageActionGameScore)); - - if(ctor == MessageAction::CtorMessageActionEmpty) - result.append("MessageActionEmpty"); - else if(ctor == MessageAction::CtorMessageActionChatCreate) - { - result.append("MessageActionChatCreate#"); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - result.append("users:"); - thethis->decompileTLVector(result, mtstream, false); - } - else if(ctor == MessageAction::CtorMessageActionChatEditTitle) - { - result.append("MessageActionChatEditTitle#"); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - } - else if(ctor == MessageAction::CtorMessageActionChatEditPhoto) - { - result.append("MessageActionChatEditPhoto#"); - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - } - else if(ctor == MessageAction::CtorMessageActionChatDeletePhoto) - result.append("MessageActionChatDeletePhoto"); - else if(ctor == MessageAction::CtorMessageActionChatAddUser) - { - result.append("MessageActionChatAddUser#"); - result.append("users:"); - thethis->decompileTLVector(result, mtstream, false); - } - else if(ctor == MessageAction::CtorMessageActionChatDeleteUser) - { - result.append("MessageActionChatDeleteUser#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - } - else if(ctor == MessageAction::CtorMessageActionChatJoinedByLink) - { - result.append("MessageActionChatJoinedByLink#"); - TLInt inviter_id = mtstream.readTLInt(); - result.append("inviter_id:" + QString::number(inviter_id, 16)); - } - else if(ctor == MessageAction::CtorMessageActionChannelCreate) - { - result.append("MessageActionChannelCreate#"); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - } - else if(ctor == MessageAction::CtorMessageActionChatMigrateTo) - { - result.append("MessageActionChatMigrateTo#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - } - else if(ctor == MessageAction::CtorMessageActionChannelMigrateFrom) - { - result.append("MessageActionChannelMigrateFrom#"); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - } - else if(ctor == MessageAction::CtorMessageActionPinMessage) - result.append("MessageActionPinMessage"); - else if(ctor == MessageAction::CtorMessageActionHistoryClear) - result.append("MessageActionHistoryClear"); - else if(ctor == MessageAction::CtorMessageActionGameScore) - { - result.append("MessageActionGameScore#"); - TLLong game_id = mtstream.readTLLong(); - result.append("game_id:" + QString::number(game_id, 16)); - result.append(", "); - TLInt score = mtstream.readTLInt(); - result.append("score:" + QString::number(score, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesGetMessages)); + result.append("messagesGetMessages("); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_Dialog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Dialog::CtorDialog)); - - if(ctor == Dialog::CtorDialog) - { - result.append("Dialog#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - TLInt top_message = mtstream.readTLInt(); - result.append("top_message:" + QString::number(top_message, 16)); - result.append(", "); - TLInt read_inbox_max_id = mtstream.readTLInt(); - result.append("read_inbox_max_id:" + QString::number(read_inbox_max_id, 16)); - result.append(", "); - TLInt read_outbox_max_id = mtstream.readTLInt(); - result.append("read_outbox_max_id:" + QString::number(read_outbox_max_id, 16)); - result.append(", "); - TLInt unread_count = mtstream.readTLInt(); - result.append("unread_count:" + QString::number(unread_count, 16)); - result.append(", "); - result.append("notify_settings:"); - MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 0)) - { - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - result.append("draft:"); - MTProtoDecompiler::decompile_DraftMessage(thethis, result, mtstream); - } - } + Q_ASSERT((ctor == TLTypes::messagesGetDialogs)); + result.append("messagesGetDialogs("); + TLInt offset_date = mtstream.readTLInt(); + result.append("offset_date:" + QString::number(offset_date, 16)); + result.append(", "); + TLInt offset_id = mtstream.readTLInt(); + result.append("offset_id:" + QString::number(offset_id, 16)); + result.append(", "); + result.append("offset_peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_Photo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Photo::CtorPhotoEmpty) || - (ctor == Photo::CtorPhoto)); - - if(ctor == Photo::CtorPhotoEmpty) - { - result.append("PhotoEmpty#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - } - else if(ctor == Photo::CtorPhoto) - { - result.append("Photo#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("has_stickers:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - result.append("sizes:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesGetHistory)); + result.append("messagesGetHistory("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt offset_id = mtstream.readTLInt(); + result.append("offset_id:" + QString::number(offset_id, 16)); + result.append(", "); + TLInt offset_date = mtstream.readTLInt(); + result.append("offset_date:" + QString::number(offset_date, 16)); + result.append(", "); + TLInt add_offset = mtstream.readTLInt(); + result.append("add_offset:" + QString::number(add_offset, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(", "); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(", "); + TLInt min_id = mtstream.readTLInt(); + result.append("min_id:" + QString::number(min_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_PhotoSize(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSearch(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesSearch)); + result.append("messagesSearch("); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - Q_ASSERT((ctor == PhotoSize::CtorPhotoSizeEmpty) || - (ctor == PhotoSize::CtorPhotoSize) || - (ctor == PhotoSize::CtorPhotoCachedSize)); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLString q = mtstream.readTLString(); + result.append("q:" + thethis->printableString(q)); + result.append(", "); + result.append("filter:"); + MTProtoDecompiler::decompile_MessagesFilter(thethis, result, mtstream); + TLInt min_date = mtstream.readTLInt(); + result.append("min_date:" + QString::number(min_date, 16)); + result.append(", "); + TLInt max_date = mtstream.readTLInt(); + result.append("max_date:" + QString::number(max_date, 16)); + result.append(", "); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesReadHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == PhotoSize::CtorPhotoSizeEmpty) - { - result.append("PhotoSizeEmpty#"); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - } - else if(ctor == PhotoSize::CtorPhotoSize) - { - result.append("PhotoSize#"); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - result.append(", "); - result.append("location:"); - MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); - TLInt w = mtstream.readTLInt(); - result.append("w:" + QString::number(w, 16)); - result.append(", "); - TLInt h = mtstream.readTLInt(); - result.append("h:" + QString::number(h, 16)); - result.append(", "); - TLInt size = mtstream.readTLInt(); - result.append("size:" + QString::number(size, 16)); - } - else if(ctor == PhotoSize::CtorPhotoCachedSize) - { - result.append("PhotoCachedSize#"); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - result.append(", "); - result.append("location:"); - MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); - TLInt w = mtstream.readTLInt(); - result.append("w:" + QString::number(w, 16)); - result.append(", "); - TLInt h = mtstream.readTLInt(); - result.append("h:" + QString::number(h, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - } + Q_ASSERT((ctor == TLTypes::messagesReadHistory)); + result.append("messagesReadHistory("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_GeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesDeleteHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesDeleteHistory)); + result.append("messagesDeleteHistory("); - Q_ASSERT((ctor == GeoPoint::CtorGeoPointEmpty) || - (ctor == GeoPoint::CtorGeoPoint)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == GeoPoint::CtorGeoPointEmpty) - result.append("GeoPointEmpty"); - else if(ctor == GeoPoint::CtorGeoPoint) - { - result.append("GeoPoint#"); - TLDouble longitude = mtstream.readTLDouble(); - result.append("longitude:" + QString::number(longitude)); - result.append(", "); - TLDouble latitude = mtstream.readTLDouble(); - result.append("latitude:" + QString::number(latitude)); - } + result.append("is_just_clear:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_AuthCheckedPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesDeleteMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == AuthCheckedPhone::CtorAuthCheckedPhone)); - - if(ctor == AuthCheckedPhone::CtorAuthCheckedPhone) - { - result.append("AuthCheckedPhone#"); - TLBool is_phone_registered = mtstream.readTLBool(); - result.append("is_phone_registered:" + QString::number(is_phone_registered, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesDeleteMessages)); + result.append("messagesDeleteMessages("); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_AuthSentCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesReceivedMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == AuthSentCode::CtorAuthSentCode)); - - if(ctor == AuthSentCode::CtorAuthSentCode) - { - result.append("AuthSentCode#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_phone_registered:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("type:"); - MTProtoDecompiler::decompile_AuthSentCodeType(thethis, result, mtstream); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - result.append("next_type:"); - MTProtoDecompiler::decompile_AuthCodeType(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 2)) - { - TLInt timeout = mtstream.readTLInt(); - result.append("timeout:" + QString::number(timeout, 16)); - } - } + Q_ASSERT((ctor == TLTypes::messagesReceivedMessages)); + result.append("messagesReceivedMessages("); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_AuthAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSetTyping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesSetTyping)); + result.append("messagesSetTyping("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append("action:"); + MTProtoDecompiler::decompile_SendMessageAction(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSendMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::messagesSendMessage)); + result.append("messagesSendMessage("); - Q_ASSERT((ctor == AuthAuthorization::CtorAuthAuthorization)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == AuthAuthorization::CtorAuthAuthorization) + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); + result.append(", "); + result.append("is_clear_draft:" + BIT_FIELD_VALUE(flags, 7)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) { - result.append("AuthAuthorization#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - if(IS_FLAG_SET(flags, 0)) - { - TLInt tmp_sessions = mtstream.readTLInt(); - result.append("tmp_sessions:" + QString::number(tmp_sessions, 16)); - result.append(", "); - } - result.append("user:"); - MTProtoDecompiler::decompile_User(thethis, result, mtstream); + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append(", "); + } + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 3)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); } + result.append(")"); } -void MTProtoDecompiler::decompile_AuthExportedAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSendMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesSendMedia)); + result.append("messagesSendMedia("); - Q_ASSERT((ctor == AuthExportedAuthorization::CtorAuthExportedAuthorization)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == AuthExportedAuthorization::CtorAuthExportedAuthorization) + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); + result.append(", "); + result.append("is_clear_draft:" + BIT_FIELD_VALUE(flags, 7)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) { - result.append("AuthExportedAuthorization#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); } + result.append("media:"); + MTProtoDecompiler::decompile_InputMedia(thethis, result, mtstream); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + result.append(")"); } -void MTProtoDecompiler::decompile_InputNotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesForwardMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesForwardMessages)); + result.append("messagesForwardMessages("); - Q_ASSERT((ctor == InputNotifyPeer::CtorInputNotifyPeer) || - (ctor == InputNotifyPeer::CtorInputNotifyUsers) || - (ctor == InputNotifyPeer::CtorInputNotifyChats) || - (ctor == InputNotifyPeer::CtorInputNotifyAll)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == InputNotifyPeer::CtorInputNotifyPeer) - { - result.append("InputNotifyPeer#"); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - } - else if(ctor == InputNotifyPeer::CtorInputNotifyUsers) - result.append("InputNotifyUsers"); - else if(ctor == InputNotifyPeer::CtorInputNotifyChats) - result.append("InputNotifyChats"); - else if(ctor == InputNotifyPeer::CtorInputNotifyAll) - result.append("InputNotifyAll"); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); + result.append(", "); + result.append("is_with_my_score:" + BIT_FIELD_VALUE(flags, 8)); + result.append(", "); + result.append("from_peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + result.append("random_id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + result.append("to_peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_InputPeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesReportSpam(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsEmpty) || - (ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsAll)); - - if(ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsEmpty) - result.append("InputPeerNotifyEventsEmpty"); - else if(ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsAll) - result.append("InputPeerNotifyEventsAll"); + Q_ASSERT((ctor == TLTypes::messagesReportSpam)); + result.append("messagesReportSpam("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_InputPeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesHideReportSpam(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputPeerNotifySettings::CtorInputPeerNotifySettings)); - - if(ctor == InputPeerNotifySettings::CtorInputPeerNotifySettings) - { - result.append("InputPeerNotifySettings#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_show_previews:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLInt mute_until = mtstream.readTLInt(); - result.append("mute_until:" + QString::number(mute_until, 16)); - result.append(", "); - TLString sound = mtstream.readTLString(); - result.append("sound:" + thethis->printableString(sound)); - } + Q_ASSERT((ctor == TLTypes::messagesHideReportSpam)); + result.append("messagesHideReportSpam("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_PeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetPeerSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == PeerNotifyEvents::CtorPeerNotifyEventsEmpty) || - (ctor == PeerNotifyEvents::CtorPeerNotifyEventsAll)); - - if(ctor == PeerNotifyEvents::CtorPeerNotifyEventsEmpty) - result.append("PeerNotifyEventsEmpty"); - else if(ctor == PeerNotifyEvents::CtorPeerNotifyEventsAll) - result.append("PeerNotifyEventsAll"); + Q_ASSERT((ctor == TLTypes::messagesGetPeerSettings)); + result.append("messagesGetPeerSettings("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_PeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetChats(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == PeerNotifySettings::CtorPeerNotifySettingsEmpty) || - (ctor == PeerNotifySettings::CtorPeerNotifySettings)); - - if(ctor == PeerNotifySettings::CtorPeerNotifySettingsEmpty) - result.append("PeerNotifySettingsEmpty"); - else if(ctor == PeerNotifySettings::CtorPeerNotifySettings) - { - result.append("PeerNotifySettings#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_show_previews:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLInt mute_until = mtstream.readTLInt(); - result.append("mute_until:" + QString::number(mute_until, 16)); - result.append(", "); - TLString sound = mtstream.readTLString(); - result.append("sound:" + thethis->printableString(sound)); - } + Q_ASSERT((ctor == TLTypes::messagesGetChats)); + result.append("messagesGetChats("); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_PeerSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetFullChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == PeerSettings::CtorPeerSettings)); - - if(ctor == PeerSettings::CtorPeerSettings) - { - result.append("PeerSettings#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_report_spam:" + BIT_FIELD_VALUE(flags, 0)); - } + Q_ASSERT((ctor == TLTypes::messagesGetFullChat)); + result.append("messagesGetFullChat("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_WallPaper(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesEditChatTitle(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == WallPaper::CtorWallPaper) || - (ctor == WallPaper::CtorWallPaperSolid)); - - if(ctor == WallPaper::CtorWallPaper) - { - result.append("WallPaper#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - result.append("sizes:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLInt color = mtstream.readTLInt(); - result.append("color:" + QString::number(color, 16)); - } - else if(ctor == WallPaper::CtorWallPaperSolid) - { - result.append("WallPaperSolid#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLInt bg_color = mtstream.readTLInt(); - result.append("bg_color:" + QString::number(bg_color, 16)); - result.append(", "); - TLInt color = mtstream.readTLInt(); - result.append("color:" + QString::number(color, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesEditChatTitle)); + result.append("messagesEditChatTitle("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(")"); } -void MTProtoDecompiler::decompile_ReportReason(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesEditChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ReportReason::CtorInputReportReasonSpam) || - (ctor == ReportReason::CtorInputReportReasonViolence) || - (ctor == ReportReason::CtorInputReportReasonPornography) || - (ctor == ReportReason::CtorInputReportReasonOther)); + Q_ASSERT((ctor == TLTypes::messagesEditChatPhoto)); + result.append("messagesEditChatPhoto("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_InputChatPhoto(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesAddChatUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == ReportReason::CtorInputReportReasonSpam) - result.append("InputReportReasonSpam"); - else if(ctor == ReportReason::CtorInputReportReasonViolence) - result.append("InputReportReasonViolence"); - else if(ctor == ReportReason::CtorInputReportReasonPornography) - result.append("InputReportReasonPornography"); - else if(ctor == ReportReason::CtorInputReportReasonOther) - { - result.append("InputReportReasonOther#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); - } + Q_ASSERT((ctor == TLTypes::messagesAddChatUser)); + result.append("messagesAddChatUser("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLInt fwd_limit = mtstream.readTLInt(); + result.append("fwd_limit:" + QString::number(fwd_limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_UserFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesDeleteChatUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == UserFull::CtorUserFull)); - - if(ctor == UserFull::CtorUserFull) - { - result.append("UserFull#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_blocked:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("user:"); - MTProtoDecompiler::decompile_User(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 1)) - { - TLString about = mtstream.readTLString(); - result.append("about:" + thethis->printableString(about)); - result.append(", "); - } - result.append("link:"); - MTProtoDecompiler::decompile_ContactsLink(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 2)) - { - result.append("profile_photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - } - result.append("notify_settings:"); - MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 3)) - { - result.append("bot_info:"); - MTProtoDecompiler::decompile_BotInfo(thethis, result, mtstream); - } - } + Q_ASSERT((ctor == TLTypes::messagesDeleteChatUser)); + result.append("messagesDeleteChatUser("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_Contact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesCreateChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Contact::CtorContact)); - - if(ctor == Contact::CtorContact) - { - result.append("Contact#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLBool is_mutual = mtstream.readTLBool(); - result.append("is_mutual:" + QString::number(is_mutual, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesCreateChat)); + result.append("messagesCreateChat("); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(")"); } -void MTProtoDecompiler::decompile_ImportedContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesForwardMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ImportedContact::CtorImportedContact)); - - if(ctor == ImportedContact::CtorImportedContact) - { - result.append("ImportedContact#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLLong client_id = mtstream.readTLLong(); - result.append("client_id:" + QString::number(client_id, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesForwardMessage)); + result.append("messagesForwardMessage("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetDhConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactBlocked::CtorContactBlocked)); - - if(ctor == ContactBlocked::CtorContactBlocked) - { - result.append("ContactBlocked#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesGetDhConfig)); + result.append("messagesGetDhConfig("); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); + result.append(", "); + TLInt random_length = mtstream.readTLInt(); + result.append("random_length:" + QString::number(random_length, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesRequestEncryption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactStatus::CtorContactStatus)); - - if(ctor == ContactStatus::CtorContactStatus) - { - result.append("ContactStatus#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("status:"); - MTProtoDecompiler::decompile_UserStatus(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::messagesRequestEncryption)); + result.append("messagesRequestEncryption("); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLInt random_id = mtstream.readTLInt(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLBytes g_a = mtstream.readTLBytes(); + result.append("g_a:" + thethis->printableString(g_a)); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactsLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesAcceptEncryption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactsLink::CtorContactsLink)); - - if(ctor == ContactsLink::CtorContactsLink) - { - result.append("ContactsLink#"); - result.append("my_link:"); - MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); - result.append("foreign_link:"); - MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); - result.append("user:"); - MTProtoDecompiler::decompile_User(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::messagesAcceptEncryption)); + result.append("messagesAcceptEncryption("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); + TLBytes g_b = mtstream.readTLBytes(); + result.append("g_b:" + thethis->printableString(g_b)); + result.append(", "); + TLLong key_fingerprint = mtstream.readTLLong(); + result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactsContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesDiscardEncryption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactsContacts::CtorContactsContactsNotModified) || - (ctor == ContactsContacts::CtorContactsContacts)); - - if(ctor == ContactsContacts::CtorContactsContactsNotModified) - result.append("ContactsContactsNotModified"); - else if(ctor == ContactsContacts::CtorContactsContacts) - { - result.append("ContactsContacts#"); - result.append("contacts:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesDiscardEncryption)); + result.append("messagesDiscardEncryption("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactsImportedContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSetEncryptedTyping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactsImportedContacts::CtorContactsImportedContacts)); - - if(ctor == ContactsImportedContacts::CtorContactsImportedContacts) - { - result.append("ContactsImportedContacts#"); - result.append("imported:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("retry_contacts:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesSetEncryptedTyping)); + result.append("messagesSetEncryptedTyping("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); + TLBool is_typing = mtstream.readTLBool(); + result.append("is_typing:" + QString::number(is_typing, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactsBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesReadEncryptedHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactsBlocked::CtorContactsBlocked) || - (ctor == ContactsBlocked::CtorContactsBlockedSlice)); - - if(ctor == ContactsBlocked::CtorContactsBlocked) - { - result.append("ContactsBlocked#"); - result.append("blocked:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == ContactsBlocked::CtorContactsBlockedSlice) - { - result.append("ContactsBlockedSlice#"); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); - result.append(", "); - result.append("blocked:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesReadEncryptedHistory)); + result.append("messagesReadEncryptedHistory("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); + TLInt max_date = mtstream.readTLInt(); + result.append("max_date:" + QString::number(max_date, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSendEncrypted(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesDialogs::CtorMessagesDialogs) || - (ctor == MessagesDialogs::CtorMessagesDialogsSlice)); - - if(ctor == MessagesDialogs::CtorMessagesDialogs) - { - result.append("MessagesDialogs#"); - result.append("dialogs:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == MessagesDialogs::CtorMessagesDialogsSlice) - { - result.append("MessagesDialogsSlice#"); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); - result.append(", "); - result.append("dialogs:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesSendEncrypted)); + result.append("messagesSendEncrypted("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSendEncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesMessages::CtorMessagesMessages) || - (ctor == MessagesMessages::CtorMessagesMessagesSlice) || - (ctor == MessagesMessages::CtorMessagesChannelMessages)); - - if(ctor == MessagesMessages::CtorMessagesMessages) - { - result.append("MessagesMessages#"); - result.append("messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == MessagesMessages::CtorMessagesMessagesSlice) - { - result.append("MessagesMessagesSlice#"); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); - result.append(", "); - result.append("messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == MessagesMessages::CtorMessagesChannelMessages) - { - result.append("MessagesChannelMessages#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); - result.append(", "); - result.append("messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesSendEncryptedFile)); + result.append("messagesSendEncryptedFile("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); + result.append(", "); + result.append("file:"); + MTProtoDecompiler::decompile_InputEncryptedFile(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesChats(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSendEncryptedService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesChats::CtorMessagesChats)); - - if(ctor == MessagesChats::CtorMessagesChats) - { - result.append("MessagesChats#"); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesSendEncryptedService)); + result.append("messagesSendEncryptedService("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesReceivedQueue(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesChatFull::CtorMessagesChatFull)); - - if(ctor == MessagesChatFull::CtorMessagesChatFull) - { - result.append("MessagesChatFull#"); - result.append("full_chat:"); - MTProtoDecompiler::decompile_ChatFull(thethis, result, mtstream); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::messagesReceivedQueue)); + result.append("messagesReceivedQueue("); + TLInt max_qts = mtstream.readTLInt(); + result.append("max_qts:" + QString::number(max_qts, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesAffectedHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesReadMessageContents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesAffectedHistory::CtorMessagesAffectedHistory)); - - if(ctor == MessagesAffectedHistory::CtorMessagesAffectedHistory) - { - result.append("MessagesAffectedHistory#"); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - result.append(", "); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesReadMessageContents)); + result.append("messagesReadMessageContents("); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetAllStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesGetAllStickers)); + result.append("messagesGetAllStickers("); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetWebPagePreview(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::messagesGetWebPagePreview)); + result.append("messagesGetWebPagePreview("); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesExportChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == MessagesFilter::CtorInputMessagesFilterEmpty) || - (ctor == MessagesFilter::CtorInputMessagesFilterPhotos) || - (ctor == MessagesFilter::CtorInputMessagesFilterVideo) || - (ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideo) || - (ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideoDocuments) || - (ctor == MessagesFilter::CtorInputMessagesFilterDocument) || - (ctor == MessagesFilter::CtorInputMessagesFilterUrl) || - (ctor == MessagesFilter::CtorInputMessagesFilterGif) || - (ctor == MessagesFilter::CtorInputMessagesFilterVoice) || - (ctor == MessagesFilter::CtorInputMessagesFilterMusic) || - (ctor == MessagesFilter::CtorInputMessagesFilterChatPhotos)); + Q_ASSERT((ctor == TLTypes::messagesExportChatInvite)); + result.append("messagesExportChatInvite("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesCheckChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == MessagesFilter::CtorInputMessagesFilterEmpty) - result.append("InputMessagesFilterEmpty"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterPhotos) - result.append("InputMessagesFilterPhotos"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterVideo) - result.append("InputMessagesFilterVideo"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideo) - result.append("InputMessagesFilterPhotoVideo"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideoDocuments) - result.append("InputMessagesFilterPhotoVideoDocuments"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterDocument) - result.append("InputMessagesFilterDocument"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterUrl) - result.append("InputMessagesFilterUrl"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterGif) - result.append("InputMessagesFilterGif"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterVoice) - result.append("InputMessagesFilterVoice"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterMusic) - result.append("InputMessagesFilterMusic"); - else if(ctor == MessagesFilter::CtorInputMessagesFilterChatPhotos) - result.append("InputMessagesFilterChatPhotos"); + Q_ASSERT((ctor == TLTypes::messagesCheckChatInvite)); + result.append("messagesCheckChatInvite("); + TLString hash = mtstream.readTLString(); + result.append("hash:" + thethis->printableString(hash)); + result.append(")"); } -void MTProtoDecompiler::decompile_Update(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesImportChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesImportChatInvite)); + result.append("messagesImportChatInvite("); + TLString hash = mtstream.readTLString(); + result.append("hash:" + thethis->printableString(hash)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::messagesGetStickerSet)); + result.append("messagesGetStickerSet("); + result.append("stickerset:"); + MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesInstallStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == Update::CtorUpdateNewMessage) || - (ctor == Update::CtorUpdateMessageID) || - (ctor == Update::CtorUpdateDeleteMessages) || - (ctor == Update::CtorUpdateUserTyping) || - (ctor == Update::CtorUpdateChatUserTyping) || - (ctor == Update::CtorUpdateChatParticipants) || - (ctor == Update::CtorUpdateUserStatus) || - (ctor == Update::CtorUpdateUserName) || - (ctor == Update::CtorUpdateUserPhoto) || - (ctor == Update::CtorUpdateContactRegistered) || - (ctor == Update::CtorUpdateContactLink) || - (ctor == Update::CtorUpdateNewAuthorization) || - (ctor == Update::CtorUpdateNewEncryptedMessage) || - (ctor == Update::CtorUpdateEncryptedChatTyping) || - (ctor == Update::CtorUpdateEncryption) || - (ctor == Update::CtorUpdateEncryptedMessagesRead) || - (ctor == Update::CtorUpdateChatParticipantAdd) || - (ctor == Update::CtorUpdateChatParticipantDelete) || - (ctor == Update::CtorUpdateDcOptions) || - (ctor == Update::CtorUpdateUserBlocked) || - (ctor == Update::CtorUpdateNotifySettings) || - (ctor == Update::CtorUpdateServiceNotification) || - (ctor == Update::CtorUpdatePrivacy) || - (ctor == Update::CtorUpdateUserPhone) || - (ctor == Update::CtorUpdateReadHistoryInbox) || - (ctor == Update::CtorUpdateReadHistoryOutbox) || - (ctor == Update::CtorUpdateWebPage) || - (ctor == Update::CtorUpdateReadMessagesContents) || - (ctor == Update::CtorUpdateChannelTooLong) || - (ctor == Update::CtorUpdateChannel) || - (ctor == Update::CtorUpdateNewChannelMessage) || - (ctor == Update::CtorUpdateReadChannelInbox) || - (ctor == Update::CtorUpdateDeleteChannelMessages) || - (ctor == Update::CtorUpdateChannelMessageViews) || - (ctor == Update::CtorUpdateChatAdmins) || - (ctor == Update::CtorUpdateChatParticipantAdmin) || - (ctor == Update::CtorUpdateNewStickerSet) || - (ctor == Update::CtorUpdateStickerSetsOrder) || - (ctor == Update::CtorUpdateStickerSets) || - (ctor == Update::CtorUpdateSavedGifs) || - (ctor == Update::CtorUpdateBotInlineQuery) || - (ctor == Update::CtorUpdateBotInlineSend) || - (ctor == Update::CtorUpdateEditChannelMessage) || - (ctor == Update::CtorUpdateChannelPinnedMessage) || - (ctor == Update::CtorUpdateBotCallbackQuery) || - (ctor == Update::CtorUpdateEditMessage) || - (ctor == Update::CtorUpdateInlineBotCallbackQuery) || - (ctor == Update::CtorUpdateReadChannelOutbox) || - (ctor == Update::CtorUpdateDraftMessage) || - (ctor == Update::CtorUpdateReadFeaturedStickers) || - (ctor == Update::CtorUpdateRecentStickers) || - (ctor == Update::CtorUpdateConfig) || - (ctor == Update::CtorUpdatePtsChanged)); + Q_ASSERT((ctor == TLTypes::messagesInstallStickerSet)); + result.append("messagesInstallStickerSet("); + result.append("stickerset:"); + MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); + TLBool is_archived = mtstream.readTLBool(); + result.append("is_archived:" + QString::number(is_archived, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesUninstallStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == Update::CtorUpdateNewMessage) - { - result.append("UpdateNewMessage#"); - result.append("message_updatenewmessage:"); - MTProtoDecompiler::decompile_Message(thethis, result, mtstream); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateMessageID) - { - result.append("UpdateMessageID#"); - TLInt id_updatemessageid = mtstream.readTLInt(); - result.append("id_updatemessageid:" + QString::number(id_updatemessageid, 16)); - result.append(", "); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - } - else if(ctor == Update::CtorUpdateDeleteMessages) - { - result.append("UpdateDeleteMessages#"); - result.append("messages:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateUserTyping) - { - result.append("UpdateUserTyping#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("action:"); - MTProtoDecompiler::decompile_SendMessageAction(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateChatUserTyping) - { - result.append("UpdateChatUserTyping#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("action:"); - MTProtoDecompiler::decompile_SendMessageAction(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateChatParticipants) - { - result.append("UpdateChatParticipants#"); - result.append("participants:"); - MTProtoDecompiler::decompile_ChatParticipants(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateUserStatus) - { - result.append("UpdateUserStatus#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("status:"); - MTProtoDecompiler::decompile_UserStatus(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateUserName) - { - result.append("UpdateUserName#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - result.append(", "); - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - } - else if(ctor == Update::CtorUpdateUserPhoto) - { - result.append("UpdateUserPhoto#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_UserProfilePhoto(thethis, result, mtstream); - TLBool is_previous = mtstream.readTLBool(); - result.append("is_previous:" + QString::number(is_previous, 16)); - } - else if(ctor == Update::CtorUpdateContactRegistered) - { - result.append("UpdateContactRegistered#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } - else if(ctor == Update::CtorUpdateContactLink) - { - result.append("UpdateContactLink#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("my_link:"); - MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); - result.append("foreign_link:"); - MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateNewAuthorization) - { - result.append("UpdateNewAuthorization#"); - TLLong auth_key_id = mtstream.readTLLong(); - result.append("auth_key_id:" + QString::number(auth_key_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLString device = mtstream.readTLString(); - result.append("device:" + thethis->printableString(device)); - result.append(", "); - TLString location = mtstream.readTLString(); - result.append("location:" + thethis->printableString(location)); - } - else if(ctor == Update::CtorUpdateNewEncryptedMessage) - { - result.append("UpdateNewEncryptedMessage#"); - result.append("message_updatenewencryptedmessage:"); - MTProtoDecompiler::decompile_EncryptedMessage(thethis, result, mtstream); - TLInt qts = mtstream.readTLInt(); - result.append("qts:" + QString::number(qts, 16)); - } - else if(ctor == Update::CtorUpdateEncryptedChatTyping) - { - result.append("UpdateEncryptedChatTyping#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - } - else if(ctor == Update::CtorUpdateEncryption) - { - result.append("UpdateEncryption#"); - result.append("chat:"); - MTProtoDecompiler::decompile_EncryptedChat(thethis, result, mtstream); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } - else if(ctor == Update::CtorUpdateEncryptedMessagesRead) - { - result.append("UpdateEncryptedMessagesRead#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt max_date = mtstream.readTLInt(); - result.append("max_date:" + QString::number(max_date, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } - else if(ctor == Update::CtorUpdateChatParticipantAdd) - { - result.append("UpdateChatParticipantAdd#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt inviter_id = mtstream.readTLInt(); - result.append("inviter_id:" + QString::number(inviter_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - } - else if(ctor == Update::CtorUpdateChatParticipantDelete) - { - result.append("UpdateChatParticipantDelete#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - } - else if(ctor == Update::CtorUpdateDcOptions) - { - result.append("UpdateDcOptions#"); - result.append("dc_options:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == Update::CtorUpdateUserBlocked) - { - result.append("UpdateUserBlocked#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLBool is_blocked = mtstream.readTLBool(); - result.append("is_blocked:" + QString::number(is_blocked, 16)); - } - else if(ctor == Update::CtorUpdateNotifySettings) - { - result.append("UpdateNotifySettings#"); - result.append("peer_updatenotifysettings:"); - MTProtoDecompiler::decompile_NotifyPeer(thethis, result, mtstream); - result.append("notify_settings:"); - MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateServiceNotification) - { - result.append("UpdateServiceNotification#"); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - result.append(", "); - TLString message_updateservicenotification = mtstream.readTLString(); - result.append("message_updateservicenotification:" + thethis->printableString(message_updateservicenotification)); - result.append(", "); - result.append("media:"); - MTProtoDecompiler::decompile_MessageMedia(thethis, result, mtstream); - TLBool is_popup = mtstream.readTLBool(); - result.append("is_popup:" + QString::number(is_popup, 16)); - } - else if(ctor == Update::CtorUpdatePrivacy) - { - result.append("UpdatePrivacy#"); - result.append("key:"); - MTProtoDecompiler::decompile_PrivacyKey(thethis, result, mtstream); - result.append("rules:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == Update::CtorUpdateUserPhone) - { - result.append("UpdateUserPhone#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLString phone = mtstream.readTLString(); - result.append("phone:" + thethis->printableString(phone)); - } - else if(ctor == Update::CtorUpdateReadHistoryInbox) - { - result.append("UpdateReadHistoryInbox#"); - result.append("peer_updatereadhistoryinbox:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateReadHistoryOutbox) - { - result.append("UpdateReadHistoryOutbox#"); - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateWebPage) - { - result.append("UpdateWebPage#"); - result.append("webpage:"); - MTProtoDecompiler::decompile_WebPage(thethis, result, mtstream); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateReadMessagesContents) - { - result.append("UpdateReadMessagesContents#"); - result.append("messages:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateChannelTooLong) - { - result.append("UpdateChannelTooLong#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - } - } - else if(ctor == Update::CtorUpdateChannel) - { - result.append("UpdateChannel#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - } - else if(ctor == Update::CtorUpdateNewChannelMessage) - { - result.append("UpdateNewChannelMessage#"); - result.append("message_updatenewchannelmessage:"); - MTProtoDecompiler::decompile_Message(thethis, result, mtstream); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateReadChannelInbox) - { - result.append("UpdateReadChannelInbox#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - } - else if(ctor == Update::CtorUpdateDeleteChannelMessages) - { - result.append("UpdateDeleteChannelMessages#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - result.append("messages:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateChannelMessageViews) - { - result.append("UpdateChannelMessageViews#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt views = mtstream.readTLInt(); - result.append("views:" + QString::number(views, 16)); - } - else if(ctor == Update::CtorUpdateChatAdmins) - { - result.append("UpdateChatAdmins#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLBool is_enabled = mtstream.readTLBool(); - result.append("is_enabled:" + QString::number(is_enabled, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - } - else if(ctor == Update::CtorUpdateChatParticipantAdmin) - { - result.append("UpdateChatParticipantAdmin#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLBool is_admin = mtstream.readTLBool(); - result.append("is_admin:" + QString::number(is_admin, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - } - else if(ctor == Update::CtorUpdateNewStickerSet) - { - result.append("UpdateNewStickerSet#"); - result.append("stickerset:"); - MTProtoDecompiler::decompile_MessagesStickerSet(thethis, result, mtstream); - } - else if(ctor == Update::CtorUpdateStickerSetsOrder) - { - result.append("UpdateStickerSetsOrder#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_masks:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("order:"); - thethis->decompileTLVector(result, mtstream, false); - } - else if(ctor == Update::CtorUpdateStickerSets) - result.append("UpdateStickerSets"); - else if(ctor == Update::CtorUpdateSavedGifs) - result.append("UpdateSavedGifs"); - else if(ctor == Update::CtorUpdateBotInlineQuery) - { - result.append("UpdateBotInlineQuery#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLString query = mtstream.readTLString(); - result.append("query:" + thethis->printableString(query)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("geo:"); - MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); - } - TLString offset = mtstream.readTLString(); - result.append("offset:" + thethis->printableString(offset)); - } - else if(ctor == Update::CtorUpdateBotInlineSend) - { - result.append("UpdateBotInlineSend#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLString query = mtstream.readTLString(); - result.append("query:" + thethis->printableString(query)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("geo:"); - MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); - } - TLString id_updatebotinlinesend = mtstream.readTLString(); - result.append("id_updatebotinlinesend:" + thethis->printableString(id_updatebotinlinesend)); - result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - result.append("msg_id_updatebotinlinesend:"); - MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); - } - } - else if(ctor == Update::CtorUpdateEditChannelMessage) - { - result.append("UpdateEditChannelMessage#"); - result.append("message:"); - MTProtoDecompiler::decompile_Message(thethis, result, mtstream); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateChannelPinnedMessage) - { - result.append("UpdateChannelPinnedMessage#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - TLInt id_updatechannelpinnedmessage = mtstream.readTLInt(); - result.append("id_updatechannelpinnedmessage:" + QString::number(id_updatechannelpinnedmessage, 16)); - } - else if(ctor == Update::CtorUpdateBotCallbackQuery) - { - result.append("UpdateBotCallbackQuery#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - TLInt msg_id_updatebotcallbackquery = mtstream.readTLInt(); - result.append("msg_id_updatebotcallbackquery:" + QString::number(msg_id_updatebotcallbackquery, 16)); - result.append(", "); - TLLong chat_instance = mtstream.readTLLong(); - result.append("chat_instance:" + QString::number(chat_instance, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLString game_short_name = mtstream.readTLString(); - result.append("game_short_name:" + thethis->printableString(game_short_name)); - } - } - else if(ctor == Update::CtorUpdateEditMessage) - { - result.append("UpdateEditMessage#"); - result.append("message:"); - MTProtoDecompiler::decompile_Message(thethis, result, mtstream); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - } - else if(ctor == Update::CtorUpdateInlineBotCallbackQuery) + Q_ASSERT((ctor == TLTypes::messagesUninstallStickerSet)); + result.append("messagesUninstallStickerSet("); + result.append("stickerset:"); + MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesStartBot(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesStartBot)); + result.append("messagesStartBot("); + result.append("bot:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLString start_param = mtstream.readTLString(); + result.append("start_param:" + thethis->printableString(start_param)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetMessagesViews(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetMessagesViews)); + result.append("messagesGetMessagesViews("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + TLBool is_increment = mtstream.readTLBool(); + result.append("is_increment:" + QString::number(is_increment, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesToggleChatAdmins(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesToggleChatAdmins)); + result.append("messagesToggleChatAdmins("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLBool is_enabled = mtstream.readTLBool(); + result.append("is_enabled:" + QString::number(is_enabled, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesEditChatAdmin(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesEditChatAdmin)); + result.append("messagesEditChatAdmin("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLBool is_admin = mtstream.readTLBool(); + result.append("is_admin:" + QString::number(is_admin, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesMigrateChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesMigrateChat)); + result.append("messagesMigrateChat("); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSearchGlobal(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesSearchGlobal)); + result.append("messagesSearchGlobal("); + TLString q = mtstream.readTLString(); + result.append("q:" + thethis->printableString(q)); + result.append(", "); + TLInt offset_date = mtstream.readTLInt(); + result.append("offset_date:" + QString::number(offset_date, 16)); + result.append(", "); + result.append("offset_peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt offset_id = mtstream.readTLInt(); + result.append("offset_id:" + QString::number(offset_id, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesReorderStickerSets(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesReorderStickerSets)); + result.append("messagesReorderStickerSets("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_masks:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("order:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetDocumentByHash(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetDocumentByHash)); + result.append("messagesGetDocumentByHash("); + TLBytes sha256 = mtstream.readTLBytes(); + result.append("sha256:" + thethis->printableString(sha256)); + result.append(", "); + TLInt size = mtstream.readTLInt(); + result.append("size:" + QString::number(size, 16)); + result.append(", "); + TLString mime_type = mtstream.readTLString(); + result.append("mime_type:" + thethis->printableString(mime_type)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSearchGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesSearchGifs)); + result.append("messagesSearchGifs("); + TLString q = mtstream.readTLString(); + result.append("q:" + thethis->printableString(q)); + result.append(", "); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetSavedGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetSavedGifs)); + result.append("messagesGetSavedGifs("); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSaveGif(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesSaveGif)); + result.append("messagesSaveGif("); + result.append("id:"); + MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); + TLBool is_unsave = mtstream.readTLBool(); + result.append("is_unsave:" + QString::number(is_unsave, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetInlineBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetInlineBotResults)); + result.append("messagesGetInlineBotResults("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("bot:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) { - result.append("UpdateInlineBotCallbackQuery#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - result.append("msg_id_updateinlinebotcallbackquery:"); - MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); - TLLong chat_instance = mtstream.readTLLong(); - result.append("chat_instance:" + QString::number(chat_instance, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLString game_short_name = mtstream.readTLString(); - result.append("game_short_name:" + thethis->printableString(game_short_name)); - } + result.append("geo_point:"); + MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); } - else if(ctor == Update::CtorUpdateReadChannelOutbox) + TLString query = mtstream.readTLString(); + result.append("query:" + thethis->printableString(query)); + result.append(", "); + TLString offset = mtstream.readTLString(); + result.append("offset:" + thethis->printableString(offset)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSetInlineBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesSetInlineBotResults)); + result.append("messagesSetInlineBotResults("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_gallery:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_private:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + result.append("results:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLInt cache_time = mtstream.readTLInt(); + result.append("cache_time:" + QString::number(cache_time, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) { - result.append("UpdateReadChannelOutbox#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); + TLString next_offset = mtstream.readTLString(); + result.append("next_offset:" + thethis->printableString(next_offset)); result.append(", "); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); } - else if(ctor == Update::CtorUpdateDraftMessage) + if(IS_FLAG_SET(flags, 3)) { - result.append("UpdateDraftMessage#"); - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - result.append("draft:"); - MTProtoDecompiler::decompile_DraftMessage(thethis, result, mtstream); + result.append("switch_pm:"); + MTProtoDecompiler::decompile_InlineBotSwitchPM(thethis, result, mtstream); } - else if(ctor == Update::CtorUpdateReadFeaturedStickers) - result.append("UpdateReadFeaturedStickers"); - else if(ctor == Update::CtorUpdateRecentStickers) - result.append("UpdateRecentStickers"); - else if(ctor == Update::CtorUpdateConfig) - result.append("UpdateConfig"); - else if(ctor == Update::CtorUpdatePtsChanged) - result.append("UpdatePtsChanged"); + result.append(")"); } -void MTProtoDecompiler::decompile_UpdatesState(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSendInlineBotResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesSendInlineBotResult)); + result.append("messagesSendInlineBotResult("); - Q_ASSERT((ctor == UpdatesState::CtorUpdatesState)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == UpdatesState::CtorUpdatesState) + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); + result.append(", "); + result.append("is_clear_draft:" + BIT_FIELD_VALUE(flags, 7)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) { - result.append("UpdatesState#"); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt qts = mtstream.readTLInt(); - result.append("qts:" + QString::number(qts, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt seq = mtstream.readTLInt(); - result.append("seq:" + QString::number(seq, 16)); + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); result.append(", "); - TLInt unread_count = mtstream.readTLInt(); - result.append("unread_count:" + QString::number(unread_count, 16)); } + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(")"); } -void MTProtoDecompiler::decompile_UpdatesDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetMessageEditData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesGetMessageEditData)); + result.append("messagesGetMessageEditData("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesEditMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::messagesEditMessage)); + result.append("messagesEditMessage("); - Q_ASSERT((ctor == UpdatesDifference::CtorUpdatesDifferenceEmpty) || - (ctor == UpdatesDifference::CtorUpdatesDifference) || - (ctor == UpdatesDifference::CtorUpdatesDifferenceSlice)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == UpdatesDifference::CtorUpdatesDifferenceEmpty) + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 11)) { - result.append("UpdatesDifferenceEmpty#"); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); result.append(", "); - TLInt seq = mtstream.readTLInt(); - result.append("seq:" + QString::number(seq, 16)); } - else if(ctor == UpdatesDifference::CtorUpdatesDifference) + if(IS_FLAG_SET(flags, 2)) { - result.append("UpdatesDifference#"); - result.append("new_messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("new_encrypted_messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("other_updates:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("state:"); - MTProtoDecompiler::decompile_UpdatesState(thethis, result, mtstream); + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); } - else if(ctor == UpdatesDifference::CtorUpdatesDifferenceSlice) + if(IS_FLAG_SET(flags, 3)) { - result.append("UpdatesDifferenceSlice#"); - result.append("new_messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("new_encrypted_messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("other_updates:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); + result.append("entities:"); thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("intermediate_state:"); - MTProtoDecompiler::decompile_UpdatesState(thethis, result, mtstream); } + result.append(")"); } -void MTProtoDecompiler::decompile_Updates(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesEditInlineBotMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesEditInlineBotMessage)); + result.append("messagesEditInlineBotMessage("); - Q_ASSERT((ctor == Updates::CtorUpdatesTooLong) || - (ctor == Updates::CtorUpdateShortMessage) || - (ctor == Updates::CtorUpdateShortChatMessage) || - (ctor == Updates::CtorUpdateShort) || - (ctor == Updates::CtorUpdatesCombined) || - (ctor == Updates::CtorUpdates) || - (ctor == Updates::CtorUpdateShortSentMessage)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == Updates::CtorUpdatesTooLong) - result.append("UpdatesTooLong"); - else if(ctor == Updates::CtorUpdateShortMessage) - { - result.append("UpdateShortMessage#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); - result.append(", "); - result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("fwd_from:"); - MTProtoDecompiler::decompile_MessageFwdHeader(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 11)) - { - TLInt via_bot_id = mtstream.readTLInt(); - result.append("via_bot_id:" + QString::number(via_bot_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 7)) - { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - } - else if(ctor == Updates::CtorUpdateShortChatMessage) - { - result.append("UpdateShortChatMessage#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); - result.append(", "); - result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt from_id = mtstream.readTLInt(); - result.append("from_id:" + QString::number(from_id, 16)); - result.append(", "); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("id:"); + MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 11)) + { TLString message = mtstream.readTLString(); result.append("message:" + thethis->printableString(message)); result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("fwd_from:"); - MTProtoDecompiler::decompile_MessageFwdHeader(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 11)) - { - TLInt via_bot_id = mtstream.readTLInt(); - result.append("via_bot_id:" + QString::number(via_bot_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 7)) - { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } } - else if(ctor == Updates::CtorUpdateShort) + if(IS_FLAG_SET(flags, 2)) { - result.append("UpdateShort#"); - result.append("update:"); - MTProtoDecompiler::decompile_Update(thethis, result, mtstream); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); } - else if(ctor == Updates::CtorUpdatesCombined) + if(IS_FLAG_SET(flags, 3)) { - result.append("UpdatesCombined#"); - result.append("updates:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); + result.append("entities:"); thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt seq_start = mtstream.readTLInt(); - result.append("seq_start:" + QString::number(seq_start, 16)); - result.append(", "); - TLInt seq = mtstream.readTLInt(); - result.append("seq:" + QString::number(seq, 16)); } - else if(ctor == Updates::CtorUpdates) + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetBotCallbackAnswer)); + result.append("messagesGetBotCallbackAnswer("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_game:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt msg_id = mtstream.readTLInt(); + result.append("msg_id:" + QString::number(msg_id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) { - result.append("Updates#"); - result.append("updates:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt seq = mtstream.readTLInt(); - result.append("seq:" + QString::number(seq, 16)); + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); } - else if(ctor == Updates::CtorUpdateShortSentMessage) + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSetBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesSetBotCallbackAnswer)); + result.append("messagesSetBotCallbackAnswer("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_alert:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) { - result.append("UpdateShortSentMessage#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + } + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetPeerDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetPeerDialogs)); + result.append("messagesGetPeerDialogs("); + result.append("peers:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSaveDraft(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesSaveDraft)); + result.append("messagesSaveDraft("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 9)) - { - result.append("media:"); - MTProtoDecompiler::decompile_MessageMedia(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 7)) - { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } } + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + if(IS_FLAG_SET(flags, 3)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + result.append(")"); } -void MTProtoDecompiler::decompile_PhotosPhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetAllDrafts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetAllDrafts)); + result.append("messagesGetAllDrafts()"); +} + +void MTProtoDecompiler::decompile_messagesGetFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetFeaturedStickers)); + result.append("messagesGetFeaturedStickers("); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesReadFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesReadFeaturedStickers)); + result.append("messagesReadFeaturedStickers("); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::messagesGetRecentStickers)); + result.append("messagesGetRecentStickers("); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_attached:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSaveRecentSticker(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesSaveRecentSticker)); + result.append("messagesSaveRecentSticker("); - Q_ASSERT((ctor == PhotosPhotos::CtorPhotosPhotos) || - (ctor == PhotosPhotos::CtorPhotosPhotosSlice)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == PhotosPhotos::CtorPhotosPhotos) - { - result.append("PhotosPhotos#"); - result.append("photos:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == PhotosPhotos::CtorPhotosPhotosSlice) - { - result.append("PhotosPhotosSlice#"); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); - result.append(", "); - result.append("photos:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + result.append("is_attached:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("id:"); + MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); + TLBool is_unsave = mtstream.readTLBool(); + result.append("is_unsave:" + QString::number(is_unsave, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_PhotosPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesClearRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::messagesClearRecentStickers)); + result.append("messagesClearRecentStickers("); - Q_ASSERT((ctor == PhotosPhoto::CtorPhotosPhoto)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == PhotosPhoto::CtorPhotosPhoto) - { - result.append("PhotosPhoto#"); - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + result.append("is_attached:" + BIT_FIELD_VALUE(flags, 0)); + result.append(")"); } -void MTProtoDecompiler::decompile_UploadFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetArchivedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesGetArchivedStickers)); + result.append("messagesGetArchivedStickers("); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - Q_ASSERT((ctor == UploadFile::CtorUploadFile)); + result.append("is_masks:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLLong offset_id = mtstream.readTLLong(); + result.append("offset_id:" + QString::number(offset_id, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesGetMaskStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == UploadFile::CtorUploadFile) - { - result.append("UploadFile#"); - result.append("type:"); - MTProtoDecompiler::decompile_StorageFileType(thethis, result, mtstream); - TLInt mtime = mtstream.readTLInt(); - result.append("mtime:" + QString::number(mtime, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - } + Q_ASSERT((ctor == TLTypes::messagesGetMaskStickers)); + result.append("messagesGetMaskStickers("); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_DcOption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetAttachedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::messagesGetAttachedStickers)); + result.append("messagesGetAttachedStickers("); + result.append("media:"); + MTProtoDecompiler::decompile_InputStickeredMedia(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_messagesSetGameScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::messagesSetGameScore)); + result.append("messagesSetGameScore("); - Q_ASSERT((ctor == DcOption::CtorDcOption)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == DcOption::CtorDcOption) - { - result.append("DcOption#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_ipv6:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_media_only:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_tcpo_only:" + BIT_FIELD_VALUE(flags, 2)); - result.append(", "); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString ip_address = mtstream.readTLString(); - result.append("ip_address:" + thethis->printableString(ip_address)); - result.append(", "); - TLInt port = mtstream.readTLInt(); - result.append("port:" + QString::number(port, 16)); - } + result.append("is_edit_message:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLInt score = mtstream.readTLInt(); + result.append("score:" + QString::number(score, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_Config(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesSetInlineGameScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Config::CtorConfig)); + Q_ASSERT((ctor == TLTypes::messagesSetInlineGameScore)); + result.append("messagesSetInlineGameScore("); - if(ctor == Config::CtorConfig) - { - result.append("Config#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt expires = mtstream.readTLInt(); - result.append("expires:" + QString::number(expires, 16)); - result.append(", "); - TLBool is_test_mode = mtstream.readTLBool(); - result.append("is_test_mode:" + QString::number(is_test_mode, 16)); - result.append(", "); - TLInt this_dc = mtstream.readTLInt(); - result.append("this_dc:" + QString::number(this_dc, 16)); - result.append(", "); - result.append("dc_options:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLInt chat_size_max = mtstream.readTLInt(); - result.append("chat_size_max:" + QString::number(chat_size_max, 16)); - result.append(", "); - TLInt megagroup_size_max = mtstream.readTLInt(); - result.append("megagroup_size_max:" + QString::number(megagroup_size_max, 16)); - result.append(", "); - TLInt forwarded_count_max = mtstream.readTLInt(); - result.append("forwarded_count_max:" + QString::number(forwarded_count_max, 16)); - result.append(", "); - TLInt online_update_period_ms = mtstream.readTLInt(); - result.append("online_update_period_ms:" + QString::number(online_update_period_ms, 16)); - result.append(", "); - TLInt offline_blur_timeout_ms = mtstream.readTLInt(); - result.append("offline_blur_timeout_ms:" + QString::number(offline_blur_timeout_ms, 16)); - result.append(", "); - TLInt offline_idle_timeout_ms = mtstream.readTLInt(); - result.append("offline_idle_timeout_ms:" + QString::number(offline_idle_timeout_ms, 16)); - result.append(", "); - TLInt online_cloud_timeout_ms = mtstream.readTLInt(); - result.append("online_cloud_timeout_ms:" + QString::number(online_cloud_timeout_ms, 16)); - result.append(", "); - TLInt notify_cloud_delay_ms = mtstream.readTLInt(); - result.append("notify_cloud_delay_ms:" + QString::number(notify_cloud_delay_ms, 16)); - result.append(", "); - TLInt notify_default_delay_ms = mtstream.readTLInt(); - result.append("notify_default_delay_ms:" + QString::number(notify_default_delay_ms, 16)); - result.append(", "); - TLInt chat_big_size = mtstream.readTLInt(); - result.append("chat_big_size:" + QString::number(chat_big_size, 16)); - result.append(", "); - TLInt push_chat_period_ms = mtstream.readTLInt(); - result.append("push_chat_period_ms:" + QString::number(push_chat_period_ms, 16)); - result.append(", "); - TLInt push_chat_limit = mtstream.readTLInt(); - result.append("push_chat_limit:" + QString::number(push_chat_limit, 16)); - result.append(", "); - TLInt saved_gifs_limit = mtstream.readTLInt(); - result.append("saved_gifs_limit:" + QString::number(saved_gifs_limit, 16)); - result.append(", "); - TLInt edit_time_limit = mtstream.readTLInt(); - result.append("edit_time_limit:" + QString::number(edit_time_limit, 16)); - result.append(", "); - TLInt rating_e_decay = mtstream.readTLInt(); - result.append("rating_e_decay:" + QString::number(rating_e_decay, 16)); - result.append(", "); - TLInt stickers_recent_limit = mtstream.readTLInt(); - result.append("stickers_recent_limit:" + QString::number(stickers_recent_limit, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLInt tmp_sessions = mtstream.readTLInt(); - result.append("tmp_sessions:" + QString::number(tmp_sessions, 16)); - result.append(", "); - } - result.append("disabled_features:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_edit_message:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("id:"); + MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLInt score = mtstream.readTLInt(); + result.append("score:" + QString::number(score, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_NearestDc(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetGameHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == NearestDc::CtorNearestDc)); - - if(ctor == NearestDc::CtorNearestDc) - { - result.append("NearestDc#"); - TLString country = mtstream.readTLString(); - result.append("country:" + thethis->printableString(country)); - result.append(", "); - TLInt this_dc = mtstream.readTLInt(); - result.append("this_dc:" + QString::number(this_dc, 16)); - result.append(", "); - TLInt nearest_dc = mtstream.readTLInt(); - result.append("nearest_dc:" + QString::number(nearest_dc, 16)); - } + Q_ASSERT((ctor == TLTypes::messagesGetGameHighScores)); + result.append("messagesGetGameHighScores("); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_HelpAppUpdate(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_messagesGetInlineGameHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == HelpAppUpdate::CtorHelpAppUpdate) || - (ctor == HelpAppUpdate::CtorHelpNoAppUpdate)); - - if(ctor == HelpAppUpdate::CtorHelpAppUpdate) - { - result.append("HelpAppUpdate#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLBool is_critical = mtstream.readTLBool(); - result.append("is_critical:" + QString::number(is_critical, 16)); - result.append(", "); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); - } - else if(ctor == HelpAppUpdate::CtorHelpNoAppUpdate) - result.append("HelpNoAppUpdate"); + Q_ASSERT((ctor == TLTypes::messagesGetInlineGameHighScores)); + result.append("messagesGetInlineGameHighScores("); + result.append("id:"); + MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_HelpInviteText(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_updatesGetState(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::updatesGetState)); + result.append("updatesGetState()"); +} + +void MTProtoDecompiler::decompile_updatesGetDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == HelpInviteText::CtorHelpInviteText)); + Q_ASSERT((ctor == TLTypes::updatesGetDifference)); + result.append("updatesGetDifference("); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt qts = mtstream.readTLInt(); + result.append("qts:" + QString::number(qts, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_updatesGetChannelDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == HelpInviteText::CtorHelpInviteText) - { - result.append("HelpInviteText#"); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - } + Q_ASSERT((ctor == TLTypes::updatesGetChannelDifference)); + result.append("updatesGetChannelDifference("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("filter:"); + MTProtoDecompiler::decompile_ChannelMessagesFilter(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_EncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_photosUpdateProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::photosUpdateProfilePhoto)); + result.append("photosUpdateProfilePhoto("); + result.append("id:"); + MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_photosUploadProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::photosUploadProfilePhoto)); + result.append("photosUploadProfilePhoto("); + result.append("file:"); + MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_photosDeletePhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == EncryptedChat::CtorEncryptedChatEmpty) || - (ctor == EncryptedChat::CtorEncryptedChatWaiting) || - (ctor == EncryptedChat::CtorEncryptedChatRequested) || - (ctor == EncryptedChat::CtorEncryptedChat) || - (ctor == EncryptedChat::CtorEncryptedChatDiscarded)); + Q_ASSERT((ctor == TLTypes::photosDeletePhotos)); + result.append("photosDeletePhotos("); + result.append("id:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_photosGetUserPhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == EncryptedChat::CtorEncryptedChatEmpty) - { - result.append("EncryptedChatEmpty#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - } - else if(ctor == EncryptedChat::CtorEncryptedChatWaiting) - { - result.append("EncryptedChatWaiting#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt admin_id = mtstream.readTLInt(); - result.append("admin_id:" + QString::number(admin_id, 16)); - result.append(", "); - TLInt participant_id = mtstream.readTLInt(); - result.append("participant_id:" + QString::number(participant_id, 16)); - } - else if(ctor == EncryptedChat::CtorEncryptedChatRequested) - { - result.append("EncryptedChatRequested#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt admin_id = mtstream.readTLInt(); - result.append("admin_id:" + QString::number(admin_id, 16)); - result.append(", "); - TLInt participant_id = mtstream.readTLInt(); - result.append("participant_id:" + QString::number(participant_id, 16)); - result.append(", "); - TLBytes g_a = mtstream.readTLBytes(); - result.append("g_a:" + thethis->printableString(g_a)); - } - else if(ctor == EncryptedChat::CtorEncryptedChat) - { - result.append("EncryptedChat#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt admin_id = mtstream.readTLInt(); - result.append("admin_id:" + QString::number(admin_id, 16)); - result.append(", "); - TLInt participant_id = mtstream.readTLInt(); - result.append("participant_id:" + QString::number(participant_id, 16)); - result.append(", "); - TLBytes g_a_or_b = mtstream.readTLBytes(); - result.append("g_a_or_b:" + thethis->printableString(g_a_or_b)); - result.append(", "); - TLLong key_fingerprint = mtstream.readTLLong(); - result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); - } - else if(ctor == EncryptedChat::CtorEncryptedChatDiscarded) - { - result.append("EncryptedChatDiscarded#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - } + Q_ASSERT((ctor == TLTypes::photosGetUserPhotos)); + result.append("photosGetUserPhotos("); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLLong max_id = mtstream.readTLLong(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputEncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_uploadSaveFilePart(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputEncryptedChat::CtorInputEncryptedChat)); - - if(ctor == InputEncryptedChat::CtorInputEncryptedChat) - { - result.append("InputEncryptedChat#"); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } + Q_ASSERT((ctor == TLTypes::uploadSaveFilePart)); + result.append("uploadSaveFilePart("); + TLLong file_id = mtstream.readTLLong(); + result.append("file_id:" + QString::number(file_id, 16)); + result.append(", "); + TLInt file_part = mtstream.readTLInt(); + result.append("file_part:" + QString::number(file_part, 16)); + result.append(", "); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); + result.append(")"); } -void MTProtoDecompiler::decompile_EncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_uploadGetFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == EncryptedFile::CtorEncryptedFileEmpty) || - (ctor == EncryptedFile::CtorEncryptedFile)); - - if(ctor == EncryptedFile::CtorEncryptedFileEmpty) - result.append("EncryptedFileEmpty"); - else if(ctor == EncryptedFile::CtorEncryptedFile) - { - result.append("EncryptedFile#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt size = mtstream.readTLInt(); - result.append("size:" + QString::number(size, 16)); - result.append(", "); - TLInt dc_id = mtstream.readTLInt(); - result.append("dc_id:" + QString::number(dc_id, 16)); - result.append(", "); - TLInt key_fingerprint = mtstream.readTLInt(); - result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); - } + Q_ASSERT((ctor == TLTypes::uploadGetFile)); + result.append("uploadGetFile("); + result.append("location:"); + MTProtoDecompiler::decompile_InputFileLocation(thethis, result, mtstream); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputEncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_uploadSaveBigFilePart(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputEncryptedFile::CtorInputEncryptedFileEmpty) || - (ctor == InputEncryptedFile::CtorInputEncryptedFileUploaded) || - (ctor == InputEncryptedFile::CtorInputEncryptedFile) || - (ctor == InputEncryptedFile::CtorInputEncryptedFileBigUploaded)); - - if(ctor == InputEncryptedFile::CtorInputEncryptedFileEmpty) - result.append("InputEncryptedFileEmpty"); - else if(ctor == InputEncryptedFile::CtorInputEncryptedFileUploaded) - { - result.append("InputEncryptedFileUploaded#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt parts = mtstream.readTLInt(); - result.append("parts:" + QString::number(parts, 16)); - result.append(", "); - TLString md5_checksum = mtstream.readTLString(); - result.append("md5_checksum:" + thethis->printableString(md5_checksum)); - result.append(", "); - TLInt key_fingerprint = mtstream.readTLInt(); - result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); - } - else if(ctor == InputEncryptedFile::CtorInputEncryptedFile) - { - result.append("InputEncryptedFile#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } - else if(ctor == InputEncryptedFile::CtorInputEncryptedFileBigUploaded) - { - result.append("InputEncryptedFileBigUploaded#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLInt parts = mtstream.readTLInt(); - result.append("parts:" + QString::number(parts, 16)); - result.append(", "); - TLInt key_fingerprint = mtstream.readTLInt(); - result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); - } + Q_ASSERT((ctor == TLTypes::uploadSaveBigFilePart)); + result.append("uploadSaveBigFilePart("); + TLLong file_id = mtstream.readTLLong(); + result.append("file_id:" + QString::number(file_id, 16)); + result.append(", "); + TLInt file_part = mtstream.readTLInt(); + result.append("file_part:" + QString::number(file_part, 16)); + result.append(", "); + TLInt file_total_parts = mtstream.readTLInt(); + result.append("file_total_parts:" + QString::number(file_total_parts, 16)); + result.append(", "); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); + result.append(")"); } -void MTProtoDecompiler::decompile_EncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_helpGetConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == EncryptedMessage::CtorEncryptedMessage) || - (ctor == EncryptedMessage::CtorEncryptedMessageService)); - - if(ctor == EncryptedMessage::CtorEncryptedMessage) - { - result.append("EncryptedMessage#"); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - result.append(", "); - result.append("file:"); - MTProtoDecompiler::decompile_EncryptedFile(thethis, result, mtstream); - } - else if(ctor == EncryptedMessage::CtorEncryptedMessageService) - { - result.append("EncryptedMessageService#"); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - } + Q_ASSERT((ctor == TLTypes::helpGetConfig)); + result.append("helpGetConfig()"); } -void MTProtoDecompiler::decompile_MessagesDhConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_helpGetNearestDc(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::helpGetNearestDc)); + result.append("helpGetNearestDc()"); +} + +void MTProtoDecompiler::decompile_helpGetAppUpdate(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::helpGetAppUpdate)); + result.append("helpGetAppUpdate()"); +} + +void MTProtoDecompiler::decompile_helpSaveAppLog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == MessagesDhConfig::CtorMessagesDhConfigNotModified) || - (ctor == MessagesDhConfig::CtorMessagesDhConfig)); + Q_ASSERT((ctor == TLTypes::helpSaveAppLog)); + result.append("helpSaveAppLog("); + result.append("events:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_helpGetInviteText(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == MessagesDhConfig::CtorMessagesDhConfigNotModified) - { - result.append("MessagesDhConfigNotModified#"); - TLBytes random = mtstream.readTLBytes(); - result.append("random:" + thethis->printableString(random)); - } - else if(ctor == MessagesDhConfig::CtorMessagesDhConfig) - { - result.append("MessagesDhConfig#"); - TLInt g = mtstream.readTLInt(); - result.append("g:" + QString::number(g, 16)); - result.append(", "); - TLBytes p = mtstream.readTLBytes(); - result.append("p:" + thethis->printableString(p)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - result.append(", "); - TLBytes random = mtstream.readTLBytes(); - result.append("random:" + thethis->printableString(random)); - } + Q_ASSERT((ctor == TLTypes::helpGetInviteText)); + result.append("helpGetInviteText()"); +} + +void MTProtoDecompiler::decompile_helpGetSupport(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::helpGetSupport)); + result.append("helpGetSupport()"); } -void MTProtoDecompiler::decompile_MessagesSentEncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_helpGetAppChangelog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedMessage) || - (ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedFile)); - - if(ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedMessage) - { - result.append("MessagesSentEncryptedMessage#"); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - } - else if(ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedFile) - { - result.append("MessagesSentEncryptedFile#"); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - result.append("file:"); - MTProtoDecompiler::decompile_EncryptedFile(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::helpGetAppChangelog)); + result.append("helpGetAppChangelog()"); } -void MTProtoDecompiler::decompile_InputDocument(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_helpGetTermsOfService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputDocument::CtorInputDocumentEmpty) || - (ctor == InputDocument::CtorInputDocument)); - - if(ctor == InputDocument::CtorInputDocumentEmpty) - result.append("InputDocumentEmpty"); - else if(ctor == InputDocument::CtorInputDocument) - { - result.append("InputDocument#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - } + Q_ASSERT((ctor == TLTypes::helpGetTermsOfService)); + result.append("helpGetTermsOfService()"); } -void MTProtoDecompiler::decompile_Document(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsReadHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == Document::CtorDocumentEmpty) || - (ctor == Document::CtorDocument)); - - if(ctor == Document::CtorDocumentEmpty) - { - result.append("DocumentEmpty#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - } - else if(ctor == Document::CtorDocument) - { - result.append("Document#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLString mime_type = mtstream.readTLString(); - result.append("mime_type:" + thethis->printableString(mime_type)); - result.append(", "); - TLInt size = mtstream.readTLInt(); - result.append("size:" + QString::number(size, 16)); - result.append(", "); - result.append("thumb:"); - MTProtoDecompiler::decompile_PhotoSize(thethis, result, mtstream); - TLInt dc_id = mtstream.readTLInt(); - result.append("dc_id:" + QString::number(dc_id, 16)); - result.append(", "); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - result.append(", "); - result.append("attributes:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsReadHistory)); + result.append("channelsReadHistory("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_HelpSupport(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsDeleteMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == HelpSupport::CtorHelpSupport)); - - if(ctor == HelpSupport::CtorHelpSupport) - { - result.append("HelpSupport#"); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - result.append("user:"); - MTProtoDecompiler::decompile_User(thethis, result, mtstream); - } + Q_ASSERT((ctor == TLTypes::channelsDeleteMessages)); + result.append("channelsDeleteMessages("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_NotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsDeleteUserHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == NotifyPeer::CtorNotifyPeer) || - (ctor == NotifyPeer::CtorNotifyUsers) || - (ctor == NotifyPeer::CtorNotifyChats) || - (ctor == NotifyPeer::CtorNotifyAll)); - - if(ctor == NotifyPeer::CtorNotifyPeer) - { - result.append("NotifyPeer#"); - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - } - else if(ctor == NotifyPeer::CtorNotifyUsers) - result.append("NotifyUsers"); - else if(ctor == NotifyPeer::CtorNotifyChats) - result.append("NotifyChats"); - else if(ctor == NotifyPeer::CtorNotifyAll) - result.append("NotifyAll"); + Q_ASSERT((ctor == TLTypes::channelsDeleteUserHistory)); + result.append("channelsDeleteUserHistory("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_SendMessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsReportSpam(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == SendMessageAction::CtorSendMessageTypingAction) || - (ctor == SendMessageAction::CtorSendMessageCancelAction) || - (ctor == SendMessageAction::CtorSendMessageRecordVideoAction) || - (ctor == SendMessageAction::CtorSendMessageUploadVideoAction) || - (ctor == SendMessageAction::CtorSendMessageRecordAudioAction) || - (ctor == SendMessageAction::CtorSendMessageUploadAudioAction) || - (ctor == SendMessageAction::CtorSendMessageUploadPhotoAction) || - (ctor == SendMessageAction::CtorSendMessageUploadDocumentAction) || - (ctor == SendMessageAction::CtorSendMessageGeoLocationAction) || - (ctor == SendMessageAction::CtorSendMessageChooseContactAction) || - (ctor == SendMessageAction::CtorSendMessageGamePlayAction) || - (ctor == SendMessageAction::CtorSendMessageGameStopAction)); + Q_ASSERT((ctor == TLTypes::channelsReportSpam)); + result.append("channelsReportSpam("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsGetMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == SendMessageAction::CtorSendMessageTypingAction) - result.append("SendMessageTypingAction"); - else if(ctor == SendMessageAction::CtorSendMessageCancelAction) - result.append("SendMessageCancelAction"); - else if(ctor == SendMessageAction::CtorSendMessageRecordVideoAction) - result.append("SendMessageRecordVideoAction"); - else if(ctor == SendMessageAction::CtorSendMessageUploadVideoAction) - { - result.append("SendMessageUploadVideoAction#"); - TLInt progress = mtstream.readTLInt(); - result.append("progress:" + QString::number(progress, 16)); - } - else if(ctor == SendMessageAction::CtorSendMessageRecordAudioAction) - result.append("SendMessageRecordAudioAction"); - else if(ctor == SendMessageAction::CtorSendMessageUploadAudioAction) - { - result.append("SendMessageUploadAudioAction#"); - TLInt progress = mtstream.readTLInt(); - result.append("progress:" + QString::number(progress, 16)); - } - else if(ctor == SendMessageAction::CtorSendMessageUploadPhotoAction) - { - result.append("SendMessageUploadPhotoAction#"); - TLInt progress = mtstream.readTLInt(); - result.append("progress:" + QString::number(progress, 16)); - } - else if(ctor == SendMessageAction::CtorSendMessageUploadDocumentAction) - { - result.append("SendMessageUploadDocumentAction#"); - TLInt progress = mtstream.readTLInt(); - result.append("progress:" + QString::number(progress, 16)); - } - else if(ctor == SendMessageAction::CtorSendMessageGeoLocationAction) - result.append("SendMessageGeoLocationAction"); - else if(ctor == SendMessageAction::CtorSendMessageChooseContactAction) - result.append("SendMessageChooseContactAction"); - else if(ctor == SendMessageAction::CtorSendMessageGamePlayAction) - result.append("SendMessageGamePlayAction"); - else if(ctor == SendMessageAction::CtorSendMessageGameStopAction) - result.append("SendMessageGameStopAction"); + Q_ASSERT((ctor == TLTypes::channelsGetMessages)); + result.append("channelsGetMessages("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("id:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_ContactsFound(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsGetParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == ContactsFound::CtorContactsFound)); - - if(ctor == ContactsFound::CtorContactsFound) - { - result.append("ContactsFound#"); - result.append("results:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsGetParticipants)); + result.append("channelsGetParticipants("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("filter:"); + MTProtoDecompiler::decompile_ChannelParticipantsFilter(thethis, result, mtstream); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt limit = mtstream.readTLInt(); + result.append("limit:" + QString::number(limit, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputPrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsGetParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == InputPrivacyKey::CtorInputPrivacyKeyStatusTimestamp) || - (ctor == InputPrivacyKey::CtorInputPrivacyKeyChatInvite)); + Q_ASSERT((ctor == TLTypes::channelsGetParticipant)); + result.append("channelsGetParticipant("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsGetChannels(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputPrivacyKey::CtorInputPrivacyKeyStatusTimestamp) - result.append("InputPrivacyKeyStatusTimestamp"); - else if(ctor == InputPrivacyKey::CtorInputPrivacyKeyChatInvite) - result.append("InputPrivacyKeyChatInvite"); + Q_ASSERT((ctor == TLTypes::channelsGetChannels)); + result.append("channelsGetChannels("); + result.append("id:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_PrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsGetFullChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::channelsGetFullChannel)); + result.append("channelsGetFullChannel("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsCreateChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::channelsCreateChannel)); + result.append("channelsCreateChannel("); - Q_ASSERT((ctor == PrivacyKey::CtorPrivacyKeyStatusTimestamp) || - (ctor == PrivacyKey::CtorPrivacyKeyChatInvite)); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - if(ctor == PrivacyKey::CtorPrivacyKeyStatusTimestamp) - result.append("PrivacyKeyStatusTimestamp"); - else if(ctor == PrivacyKey::CtorPrivacyKeyChatInvite) - result.append("PrivacyKeyChatInvite"); + result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString about = mtstream.readTLString(); + result.append("about:" + thethis->printableString(about)); + result.append(")"); } -void MTProtoDecompiler::decompile_InputPrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsEditAbout(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - + Q_ASSERT((ctor == TLTypes::channelsEditAbout)); + result.append("channelsEditAbout("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLString about = mtstream.readTLString(); + result.append("about:" + thethis->printableString(about)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsEditAdmin(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == InputPrivacyRule::CtorInputPrivacyValueAllowContacts) || - (ctor == InputPrivacyRule::CtorInputPrivacyValueAllowAll) || - (ctor == InputPrivacyRule::CtorInputPrivacyValueAllowUsers) || - (ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowContacts) || - (ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowAll) || - (ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowUsers)); + Q_ASSERT((ctor == TLTypes::channelsEditAdmin)); + result.append("channelsEditAdmin("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + result.append("role:"); + MTProtoDecompiler::decompile_ChannelParticipantRole(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsEditTitle(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == InputPrivacyRule::CtorInputPrivacyValueAllowContacts) - result.append("InputPrivacyValueAllowContacts"); - else if(ctor == InputPrivacyRule::CtorInputPrivacyValueAllowAll) - result.append("InputPrivacyValueAllowAll"); - else if(ctor == InputPrivacyRule::CtorInputPrivacyValueAllowUsers) - { - result.append("InputPrivacyValueAllowUsers#"); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowContacts) - result.append("InputPrivacyValueDisallowContacts"); - else if(ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowAll) - result.append("InputPrivacyValueDisallowAll"); - else if(ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowUsers) - { - result.append("InputPrivacyValueDisallowUsers#"); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsEditTitle)); + result.append("channelsEditTitle("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(")"); } -void MTProtoDecompiler::decompile_PrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsEditPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::channelsEditPhoto)); + result.append("channelsEditPhoto("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("photo:"); + MTProtoDecompiler::decompile_InputChatPhoto(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsCheckUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == TLTypes::channelsCheckUsername)); + result.append("channelsCheckUsername("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsUpdateUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == PrivacyRule::CtorPrivacyValueAllowContacts) || - (ctor == PrivacyRule::CtorPrivacyValueAllowAll) || - (ctor == PrivacyRule::CtorPrivacyValueAllowUsers) || - (ctor == PrivacyRule::CtorPrivacyValueDisallowContacts) || - (ctor == PrivacyRule::CtorPrivacyValueDisallowAll) || - (ctor == PrivacyRule::CtorPrivacyValueDisallowUsers)); + Q_ASSERT((ctor == TLTypes::channelsUpdateUsername)); + result.append("channelsUpdateUsername("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsJoinChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == PrivacyRule::CtorPrivacyValueAllowContacts) - result.append("PrivacyValueAllowContacts"); - else if(ctor == PrivacyRule::CtorPrivacyValueAllowAll) - result.append("PrivacyValueAllowAll"); - else if(ctor == PrivacyRule::CtorPrivacyValueAllowUsers) - { - result.append("PrivacyValueAllowUsers#"); - result.append("users:"); - thethis->decompileTLVector(result, mtstream, false); - } - else if(ctor == PrivacyRule::CtorPrivacyValueDisallowContacts) - result.append("PrivacyValueDisallowContacts"); - else if(ctor == PrivacyRule::CtorPrivacyValueDisallowAll) - result.append("PrivacyValueDisallowAll"); - else if(ctor == PrivacyRule::CtorPrivacyValueDisallowUsers) - { - result.append("PrivacyValueDisallowUsers#"); - result.append("users:"); - thethis->decompileTLVector(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsJoinChannel)); + result.append("channelsJoinChannel("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsLeaveChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::channelsLeaveChannel)); + result.append("channelsLeaveChannel("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_AccountPrivacyRules(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsInviteToChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == AccountPrivacyRules::CtorAccountPrivacyRules)); - - if(ctor == AccountPrivacyRules::CtorAccountPrivacyRules) - { - result.append("AccountPrivacyRules#"); - result.append("rules:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsInviteToChannel)); + result.append("channelsInviteToChannel("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(")"); } -void MTProtoDecompiler::decompile_AccountDaysTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsKickFromChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == AccountDaysTTL::CtorAccountDaysTTL)); - - if(ctor == AccountDaysTTL::CtorAccountDaysTTL) - { - result.append("AccountDaysTTL#"); - TLInt days = mtstream.readTLInt(); - result.append("days:" + QString::number(days, 16)); - } + Q_ASSERT((ctor == TLTypes::channelsKickFromChannel)); + result.append("channelsKickFromChannel("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append("user_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLBool is_kicked = mtstream.readTLBool(); + result.append("is_kicked:" + QString::number(is_kicked, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_DocumentAttribute(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsExportInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == DocumentAttribute::CtorDocumentAttributeImageSize) || - (ctor == DocumentAttribute::CtorDocumentAttributeAnimated) || - (ctor == DocumentAttribute::CtorDocumentAttributeSticker) || - (ctor == DocumentAttribute::CtorDocumentAttributeVideo) || - (ctor == DocumentAttribute::CtorDocumentAttributeAudio) || - (ctor == DocumentAttribute::CtorDocumentAttributeFilename) || - (ctor == DocumentAttribute::CtorDocumentAttributeHasStickers)); - - if(ctor == DocumentAttribute::CtorDocumentAttributeImageSize) - { - result.append("DocumentAttributeImageSize#"); - TLInt w = mtstream.readTLInt(); - result.append("w:" + QString::number(w, 16)); - result.append(", "); - TLInt h = mtstream.readTLInt(); - result.append("h:" + QString::number(h, 16)); - } - else if(ctor == DocumentAttribute::CtorDocumentAttributeAnimated) - result.append("DocumentAttributeAnimated"); - else if(ctor == DocumentAttribute::CtorDocumentAttributeSticker) - { - result.append("DocumentAttributeSticker#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_mask:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLString alt = mtstream.readTLString(); - result.append("alt:" + thethis->printableString(alt)); - result.append(", "); - result.append("stickerset:"); - MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 0)) - { - result.append("mask_coords:"); - MTProtoDecompiler::decompile_MaskCoords(thethis, result, mtstream); - } - } - else if(ctor == DocumentAttribute::CtorDocumentAttributeVideo) - { - result.append("DocumentAttributeVideo#"); - TLInt duration = mtstream.readTLInt(); - result.append("duration:" + QString::number(duration, 16)); - result.append(", "); - TLInt w = mtstream.readTLInt(); - result.append("w:" + QString::number(w, 16)); - result.append(", "); - TLInt h = mtstream.readTLInt(); - result.append("h:" + QString::number(h, 16)); - } - else if(ctor == DocumentAttribute::CtorDocumentAttributeAudio) - { - result.append("DocumentAttributeAudio#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_voice:" + BIT_FIELD_VALUE(flags, 10)); - result.append(", "); - TLInt duration = mtstream.readTLInt(); - result.append("duration:" + QString::number(duration, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLString performer = mtstream.readTLString(); - result.append("performer:" + thethis->printableString(performer)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLBytes waveform = mtstream.readTLBytes(); - result.append("waveform:" + thethis->printableString(waveform)); - } - } - else if(ctor == DocumentAttribute::CtorDocumentAttributeFilename) - { - result.append("DocumentAttributeFilename#"); - TLString file_name = mtstream.readTLString(); - result.append("file_name:" + thethis->printableString(file_name)); - } - else if(ctor == DocumentAttribute::CtorDocumentAttributeHasStickers) - result.append("DocumentAttributeHasStickers"); + Q_ASSERT((ctor == TLTypes::channelsExportInvite)); + result.append("channelsExportInvite("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsDeleteChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesStickers::CtorMessagesStickersNotModified) || - (ctor == MessagesStickers::CtorMessagesStickers)); - - if(ctor == MessagesStickers::CtorMessagesStickersNotModified) - result.append("MessagesStickersNotModified"); - else if(ctor == MessagesStickers::CtorMessagesStickers) - { - result.append("MessagesStickers#"); - TLString hash = mtstream.readTLString(); - result.append("hash:" + thethis->printableString(hash)); - result.append(", "); - result.append("stickers:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsDeleteChannel)); + result.append("channelsDeleteChannel("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + result.append(")"); } -void MTProtoDecompiler::decompile_StickerPack(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsToggleInvites(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == StickerPack::CtorStickerPack)); - - if(ctor == StickerPack::CtorStickerPack) - { - result.append("StickerPack#"); - TLString emoticon = mtstream.readTLString(); - result.append("emoticon:" + thethis->printableString(emoticon)); - result.append(", "); - result.append("documents:"); - thethis->decompileTLVector(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsToggleInvites)); + result.append("channelsToggleInvites("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLBool is_enabled = mtstream.readTLBool(); + result.append("is_enabled:" + QString::number(is_enabled, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_MessagesAllStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsExportMessageLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } - - - Q_ASSERT((ctor == MessagesAllStickers::CtorMessagesAllStickersNotModified) || - (ctor == MessagesAllStickers::CtorMessagesAllStickers)); - - if(ctor == MessagesAllStickers::CtorMessagesAllStickersNotModified) - result.append("MessagesAllStickersNotModified"); - else if(ctor == MessagesAllStickers::CtorMessagesAllStickers) - { - result.append("MessagesAllStickers#"); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(", "); - result.append("sets:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + Q_ASSERT((ctor == TLTypes::channelsExportMessageLink)); + result.append("channelsExportMessageLink("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsToggleSignatures(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + Q_ASSERT((ctor == TLTypes::channelsToggleSignatures)); + result.append("channelsToggleSignatures("); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLBool is_enabled = mtstream.readTLBool(); + result.append("is_enabled:" + QString::number(is_enabled, 16)); + result.append(")"); } -void MTProtoDecompiler::decompile_DisabledFeature(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_channelsUpdatePinnedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; - } + Q_ASSERT((ctor == TLTypes::channelsUpdatePinnedMessage)); + result.append("channelsUpdatePinnedMessage("); + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); - Q_ASSERT((ctor == DisabledFeature::CtorDisabledFeature)); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("channel:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(")"); +} + +void MTProtoDecompiler::decompile_channelsGetAdminedPublicChannels(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); - if(ctor == DisabledFeature::CtorDisabledFeature) - { - result.append("DisabledFeature#"); - TLString feature = mtstream.readTLString(); - result.append("feature:" + thethis->printableString(feature)); - result.append(", "); - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - } + Q_ASSERT((ctor == TLTypes::channelsGetAdminedPublicChannels)); + result.append("channelsGetAdminedPublicChannels()"); } -void MTProtoDecompiler::decompile_MessagesAffectedMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Error(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6522,20 +4490,20 @@ void MTProtoDecompiler::decompile_MessagesAffectedMessages(MTProtoDecompiler* th } - Q_ASSERT((ctor == MessagesAffectedMessages::CtorMessagesAffectedMessages)); + Q_ASSERT((ctor == Error::CtorError)); - if(ctor == MessagesAffectedMessages::CtorMessagesAffectedMessages) + if(ctor == Error::CtorError) { - result.append("MessagesAffectedMessages#"); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); + result.append("Error#"); + TLInt code = mtstream.readTLInt(); + result.append("code:" + QString::number(code, 16)); result.append(", "); - TLInt pts_count = mtstream.readTLInt(); - result.append("pts_count:" + QString::number(pts_count, 16)); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); } } -void MTProtoDecompiler::decompile_ContactLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Null(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6547,22 +4515,13 @@ void MTProtoDecompiler::decompile_ContactLink(MTProtoDecompiler* thethis, QStrin } - Q_ASSERT((ctor == ContactLink::CtorContactLinkUnknown) || - (ctor == ContactLink::CtorContactLinkNone) || - (ctor == ContactLink::CtorContactLinkHasPhone) || - (ctor == ContactLink::CtorContactLinkContact)); + Q_ASSERT((ctor == Null::CtorNull)); - if(ctor == ContactLink::CtorContactLinkUnknown) - result.append("ContactLinkUnknown"); - else if(ctor == ContactLink::CtorContactLinkNone) - result.append("ContactLinkNone"); - else if(ctor == ContactLink::CtorContactLinkHasPhone) - result.append("ContactLinkHasPhone"); - else if(ctor == ContactLink::CtorContactLinkContact) - result.append("ContactLinkContact"); + if(ctor == Null::CtorNull) + result.append("Null"); } -void MTProtoDecompiler::decompile_WebPage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6574,115 +4533,43 @@ void MTProtoDecompiler::decompile_WebPage(MTProtoDecompiler* thethis, QString& r } - Q_ASSERT((ctor == WebPage::CtorWebPageEmpty) || - (ctor == WebPage::CtorWebPagePending) || - (ctor == WebPage::CtorWebPage)); + Q_ASSERT((ctor == InputPeer::CtorInputPeerEmpty) || + (ctor == InputPeer::CtorInputPeerSelf) || + (ctor == InputPeer::CtorInputPeerChat) || + (ctor == InputPeer::CtorInputPeerUser) || + (ctor == InputPeer::CtorInputPeerChannel)); - if(ctor == WebPage::CtorWebPageEmpty) + if(ctor == InputPeer::CtorInputPeerEmpty) + result.append("InputPeerEmpty"); + else if(ctor == InputPeer::CtorInputPeerSelf) + result.append("InputPeerSelf"); + else if(ctor == InputPeer::CtorInputPeerChat) { - result.append("WebPageEmpty#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); + result.append("InputPeerChat#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); } - else if(ctor == WebPage::CtorWebPagePending) + else if(ctor == InputPeer::CtorInputPeerUser) { - result.append("WebPagePending#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); + result.append("InputPeerUser#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); } - else if(ctor == WebPage::CtorWebPage) + else if(ctor == InputPeer::CtorInputPeerChannel) { - result.append("WebPage#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - TLString display_url = mtstream.readTLString(); - result.append("display_url:" + thethis->printableString(display_url)); + result.append("InputPeerChannel#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLString site_name = mtstream.readTLString(); - result.append("site_name:" + thethis->printableString(site_name)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 4)) - { - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 5)) - { - TLString embed_url = mtstream.readTLString(); - result.append("embed_url:" + thethis->printableString(embed_url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - TLString embed_type = mtstream.readTLString(); - result.append("embed_type:" + thethis->printableString(embed_type)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 6)) - { - TLInt embed_width = mtstream.readTLInt(); - result.append("embed_width:" + QString::number(embed_width, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 6)) - { - TLInt embed_height = mtstream.readTLInt(); - result.append("embed_height:" + QString::number(embed_height, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 7)) - { - TLInt duration = mtstream.readTLInt(); - result.append("duration:" + QString::number(duration, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 8)) - { - TLString author = mtstream.readTLString(); - result.append("author:" + thethis->printableString(author)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 9)) - { - result.append("document:"); - MTProtoDecompiler::decompile_Document(thethis, result, mtstream); - } + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); } } -void MTProtoDecompiler::decompile_Authorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6694,53 +4581,26 @@ void MTProtoDecompiler::decompile_Authorization(MTProtoDecompiler* thethis, QStr } - Q_ASSERT((ctor == Authorization::CtorAuthorization)); + Q_ASSERT((ctor == InputUser::CtorInputUserEmpty) || + (ctor == InputUser::CtorInputUserSelf) || + (ctor == InputUser::CtorInputUser)); - if(ctor == Authorization::CtorAuthorization) + if(ctor == InputUser::CtorInputUserEmpty) + result.append("InputUserEmpty"); + else if(ctor == InputUser::CtorInputUserSelf) + result.append("InputUserSelf"); + else if(ctor == InputUser::CtorInputUser) { - result.append("Authorization#"); - TLLong hash = mtstream.readTLLong(); - result.append("hash:" + QString::number(hash, 16)); - result.append(", "); - TLInt flags = mtstream.readTLInt(); - result.append("flags:" + QString::number(flags, 16)); - result.append(", "); - TLString device_model = mtstream.readTLString(); - result.append("device_model:" + thethis->printableString(device_model)); - result.append(", "); - TLString platform = mtstream.readTLString(); - result.append("platform:" + thethis->printableString(platform)); - result.append(", "); - TLString system_version = mtstream.readTLString(); - result.append("system_version:" + thethis->printableString(system_version)); - result.append(", "); - TLInt api_id = mtstream.readTLInt(); - result.append("api_id:" + QString::number(api_id, 16)); - result.append(", "); - TLString app_name = mtstream.readTLString(); - result.append("app_name:" + thethis->printableString(app_name)); - result.append(", "); - TLString app_version = mtstream.readTLString(); - result.append("app_version:" + thethis->printableString(app_version)); - result.append(", "); - TLInt date_created = mtstream.readTLInt(); - result.append("date_created:" + QString::number(date_created, 16)); - result.append(", "); - TLInt date_active = mtstream.readTLInt(); - result.append("date_active:" + QString::number(date_active, 16)); - result.append(", "); - TLString ip = mtstream.readTLString(); - result.append("ip:" + thethis->printableString(ip)); - result.append(", "); - TLString country = mtstream.readTLString(); - result.append("country:" + thethis->printableString(country)); + result.append("InputUser#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); result.append(", "); - TLString region = mtstream.readTLString(); - result.append("region:" + thethis->printableString(region)); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); } } -void MTProtoDecompiler::decompile_AccountAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6752,17 +4612,26 @@ void MTProtoDecompiler::decompile_AccountAuthorizations(MTProtoDecompiler* theth } - Q_ASSERT((ctor == AccountAuthorizations::CtorAccountAuthorizations)); + Q_ASSERT((ctor == InputContact::CtorInputPhoneContact)); - if(ctor == AccountAuthorizations::CtorAccountAuthorizations) + if(ctor == InputContact::CtorInputPhoneContact) { - result.append("AccountAuthorizations#"); - result.append("authorizations:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("InputPhoneContact#"); + TLLong client_id = mtstream.readTLLong(); + result.append("client_id:" + QString::number(client_id, 16)); + result.append(", "); + TLString phone = mtstream.readTLString(); + result.append("phone:" + thethis->printableString(phone)); + result.append(", "); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); } } -void MTProtoDecompiler::decompile_AccountPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6774,39 +4643,39 @@ void MTProtoDecompiler::decompile_AccountPassword(MTProtoDecompiler* thethis, QS } - Q_ASSERT((ctor == AccountPassword::CtorAccountNoPassword) || - (ctor == AccountPassword::CtorAccountPassword)); + Q_ASSERT((ctor == InputFile::CtorInputFile) || + (ctor == InputFile::CtorInputFileBig)); - if(ctor == AccountPassword::CtorAccountNoPassword) + if(ctor == InputFile::CtorInputFile) { - result.append("AccountNoPassword#"); - TLBytes new_salt = mtstream.readTLBytes(); - result.append("new_salt:" + thethis->printableString(new_salt)); + result.append("InputFile#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLString email_unconfirmed_pattern = mtstream.readTLString(); - result.append("email_unconfirmed_pattern:" + thethis->printableString(email_unconfirmed_pattern)); - } - else if(ctor == AccountPassword::CtorAccountPassword) - { - result.append("AccountPassword#"); - TLBytes current_salt = mtstream.readTLBytes(); - result.append("current_salt:" + thethis->printableString(current_salt)); + TLInt parts = mtstream.readTLInt(); + result.append("parts:" + QString::number(parts, 16)); result.append(", "); - TLBytes new_salt = mtstream.readTLBytes(); - result.append("new_salt:" + thethis->printableString(new_salt)); + TLString name = mtstream.readTLString(); + result.append("name:" + thethis->printableString(name)); result.append(", "); - TLString hint = mtstream.readTLString(); - result.append("hint:" + thethis->printableString(hint)); + TLString md5_checksum = mtstream.readTLString(); + result.append("md5_checksum:" + thethis->printableString(md5_checksum)); + } + else if(ctor == InputFile::CtorInputFileBig) + { + result.append("InputFileBig#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLBool has_recovery = mtstream.readTLBool(); - result.append("has_recovery:" + QString::number(has_recovery, 16)); + TLInt parts = mtstream.readTLInt(); + result.append("parts:" + QString::number(parts, 16)); result.append(", "); - TLString email_unconfirmed_pattern = mtstream.readTLString(); - result.append("email_unconfirmed_pattern:" + thethis->printableString(email_unconfirmed_pattern)); + TLString name = mtstream.readTLString(); + result.append("name:" + thethis->printableString(name)); } } -void MTProtoDecompiler::decompile_AccountPasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6818,111 +4687,177 @@ void MTProtoDecompiler::decompile_AccountPasswordSettings(MTProtoDecompiler* the } - Q_ASSERT((ctor == AccountPasswordSettings::CtorAccountPasswordSettings)); + Q_ASSERT((ctor == InputMedia::CtorInputMediaEmpty) || + (ctor == InputMedia::CtorInputMediaUploadedPhoto) || + (ctor == InputMedia::CtorInputMediaPhoto) || + (ctor == InputMedia::CtorInputMediaGeoPoint) || + (ctor == InputMedia::CtorInputMediaContact) || + (ctor == InputMedia::CtorInputMediaUploadedDocument) || + (ctor == InputMedia::CtorInputMediaUploadedThumbDocument) || + (ctor == InputMedia::CtorInputMediaDocument) || + (ctor == InputMedia::CtorInputMediaVenue) || + (ctor == InputMedia::CtorInputMediaGifExternal) || + (ctor == InputMedia::CtorInputMediaPhotoExternal) || + (ctor == InputMedia::CtorInputMediaDocumentExternal) || + (ctor == InputMedia::CtorInputMediaGame)); - if(ctor == AccountPasswordSettings::CtorAccountPasswordSettings) + if(ctor == InputMedia::CtorInputMediaEmpty) + result.append("InputMediaEmpty"); + else if(ctor == InputMedia::CtorInputMediaUploadedPhoto) { - result.append("AccountPasswordSettings#"); - TLString email = mtstream.readTLString(); - result.append("email:" + thethis->printableString(email)); + result.append("InputMediaUploadedPhoto#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("file:"); + MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + result.append("stickers:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -} - -void MTProtoDecompiler::decompile_AccountPasswordInputSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == InputMedia::CtorInputMediaPhoto) { - result.append("Null"); - return; + result.append("InputMediaPhoto#"); + result.append("id_inputmediaphoto:"); + MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); } - - - Q_ASSERT((ctor == AccountPasswordInputSettings::CtorAccountPasswordInputSettings)); - - if(ctor == AccountPasswordInputSettings::CtorAccountPasswordInputSettings) + else if(ctor == InputMedia::CtorInputMediaGeoPoint) { - result.append("AccountPasswordInputSettings#"); + result.append("InputMediaGeoPoint#"); + result.append("geo_point:"); + MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); + } + else if(ctor == InputMedia::CtorInputMediaContact) + { + result.append("InputMediaContact#"); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + } + else if(ctor == InputMedia::CtorInputMediaUploadedDocument) + { + result.append("InputMediaUploadedDocument#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); + result.append("file:"); + MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); + TLString mime_type = mtstream.readTLString(); + result.append("mime_type:" + thethis->printableString(mime_type)); + result.append(", "); + result.append("attributes:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + result.append(", "); if(IS_FLAG_SET(flags, 0)) { - TLBytes new_salt = mtstream.readTLBytes(); - result.append("new_salt:" + thethis->printableString(new_salt)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 0)) - { - TLBytes new_password_hash = mtstream.readTLBytes(); - result.append("new_password_hash:" + thethis->printableString(new_password_hash)); - result.append(", "); + result.append("stickers:"); + thethis->decompileTLVectorEx(result, mtstream, false); } + } + else if(ctor == InputMedia::CtorInputMediaUploadedThumbDocument) + { + result.append("InputMediaUploadedThumbDocument#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("file:"); + MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); + result.append("thumb:"); + MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); + TLString mime_type = mtstream.readTLString(); + result.append("mime_type:" + thethis->printableString(mime_type)); + result.append(", "); + result.append("attributes:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + result.append(", "); if(IS_FLAG_SET(flags, 0)) { - TLString hint = mtstream.readTLString(); - result.append("hint:" + thethis->printableString(hint)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 1)) - { - TLString email = mtstream.readTLString(); - result.append("email:" + thethis->printableString(email)); + result.append("stickers:"); + thethis->decompileTLVectorEx(result, mtstream, false); } } -} - -void MTProtoDecompiler::decompile_AuthPasswordRecovery(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == InputMedia::CtorInputMediaDocument) { - result.append("Null"); - return; + result.append("InputMediaDocument#"); + result.append("id_inputmediadocument:"); + MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); } - - - Q_ASSERT((ctor == AuthPasswordRecovery::CtorAuthPasswordRecovery)); - - if(ctor == AuthPasswordRecovery::CtorAuthPasswordRecovery) + else if(ctor == InputMedia::CtorInputMediaVenue) { - result.append("AuthPasswordRecovery#"); - TLString email_pattern = mtstream.readTLString(); - result.append("email_pattern:" + thethis->printableString(email_pattern)); + result.append("InputMediaVenue#"); + result.append("geo_point:"); + MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString address = mtstream.readTLString(); + result.append("address:" + thethis->printableString(address)); + result.append(", "); + TLString provider = mtstream.readTLString(); + result.append("provider:" + thethis->printableString(provider)); + result.append(", "); + TLString venue_id = mtstream.readTLString(); + result.append("venue_id:" + thethis->printableString(venue_id)); } -} - -void MTProtoDecompiler::decompile_ReceivedNotifyMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == InputMedia::CtorInputMediaGifExternal) + { + result.append("InputMediaGifExternal#"); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + TLString q = mtstream.readTLString(); + result.append("q:" + thethis->printableString(q)); + } + else if(ctor == InputMedia::CtorInputMediaPhotoExternal) { - result.append("Null"); - return; + result.append("InputMediaPhotoExternal#"); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); } - - - Q_ASSERT((ctor == ReceivedNotifyMessage::CtorReceivedNotifyMessage)); - - if(ctor == ReceivedNotifyMessage::CtorReceivedNotifyMessage) + else if(ctor == InputMedia::CtorInputMediaDocumentExternal) { - result.append("ReceivedNotifyMessage#"); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); + result.append("InputMediaDocumentExternal#"); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); result.append(", "); - TLInt flags = mtstream.readTLInt(); - result.append("flags:" + QString::number(flags, 16)); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + } + else if(ctor == InputMedia::CtorInputMediaGame) + { + result.append("InputMediaGame#"); + result.append("id_inputmediagame:"); + MTProtoDecompiler::decompile_InputGame(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_ExportedChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6934,20 +4869,27 @@ void MTProtoDecompiler::decompile_ExportedChatInvite(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == ExportedChatInvite::CtorChatInviteEmpty) || - (ctor == ExportedChatInvite::CtorChatInviteExported)); + Q_ASSERT((ctor == InputChatPhoto::CtorInputChatPhotoEmpty) || + (ctor == InputChatPhoto::CtorInputChatUploadedPhoto) || + (ctor == InputChatPhoto::CtorInputChatPhoto)); - if(ctor == ExportedChatInvite::CtorChatInviteEmpty) - result.append("ChatInviteEmpty"); - else if(ctor == ExportedChatInvite::CtorChatInviteExported) + if(ctor == InputChatPhoto::CtorInputChatPhotoEmpty) + result.append("InputChatPhotoEmpty"); + else if(ctor == InputChatPhoto::CtorInputChatUploadedPhoto) { - result.append("ChatInviteExported#"); - TLString link = mtstream.readTLString(); - result.append("link:" + thethis->printableString(link)); + result.append("InputChatUploadedPhoto#"); + result.append("file:"); + MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); + } + else if(ctor == InputChatPhoto::CtorInputChatPhoto) + { + result.append("InputChatPhoto#"); + result.append("id:"); + MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_ChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputGeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -6959,47 +4901,23 @@ void MTProtoDecompiler::decompile_ChatInvite(MTProtoDecompiler* thethis, QString } - Q_ASSERT((ctor == ChatInvite::CtorChatInviteAlready) || - (ctor == ChatInvite::CtorChatInvite)); + Q_ASSERT((ctor == InputGeoPoint::CtorInputGeoPointEmpty) || + (ctor == InputGeoPoint::CtorInputGeoPoint)); - if(ctor == ChatInvite::CtorChatInviteAlready) - { - result.append("ChatInviteAlready#"); - result.append("chat:"); - MTProtoDecompiler::decompile_Chat(thethis, result, mtstream); - } - else if(ctor == ChatInvite::CtorChatInvite) + if(ctor == InputGeoPoint::CtorInputGeoPointEmpty) + result.append("InputGeoPointEmpty"); + else if(ctor == InputGeoPoint::CtorInputGeoPoint) { - result.append("ChatInvite#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_channel:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_public:" + BIT_FIELD_VALUE(flags, 2)); - result.append(", "); - result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 3)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_ChatPhoto(thethis, result, mtstream); - TLInt participants_count = mtstream.readTLInt(); - result.append("participants_count:" + QString::number(participants_count, 16)); + result.append("InputGeoPoint#"); + TLDouble latitude = mtstream.readTLDouble(); + result.append("latitude:" + QString::number(latitude)); result.append(", "); - if(IS_FLAG_SET(flags, 4)) - { - result.append("participants:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + TLDouble longitude = mtstream.readTLDouble(); + result.append("longitude:" + QString::number(longitude)); } } -void MTProtoDecompiler::decompile_InputStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7011,30 +4929,23 @@ void MTProtoDecompiler::decompile_InputStickerSet(MTProtoDecompiler* thethis, QS } - Q_ASSERT((ctor == InputStickerSet::CtorInputStickerSetEmpty) || - (ctor == InputStickerSet::CtorInputStickerSetID) || - (ctor == InputStickerSet::CtorInputStickerSetShortName)); + Q_ASSERT((ctor == InputPhoto::CtorInputPhotoEmpty) || + (ctor == InputPhoto::CtorInputPhoto)); - if(ctor == InputStickerSet::CtorInputStickerSetEmpty) - result.append("InputStickerSetEmpty"); - else if(ctor == InputStickerSet::CtorInputStickerSetID) + if(ctor == InputPhoto::CtorInputPhotoEmpty) + result.append("InputPhotoEmpty"); + else if(ctor == InputPhoto::CtorInputPhoto) { - result.append("InputStickerSetID#"); + result.append("InputPhoto#"); TLLong id = mtstream.readTLLong(); result.append("id:" + QString::number(id, 16)); result.append(", "); TLLong access_hash = mtstream.readTLLong(); result.append("access_hash:" + QString::number(access_hash, 16)); } - else if(ctor == InputStickerSet::CtorInputStickerSetShortName) - { - result.append("InputStickerSetShortName#"); - TLString short_name = mtstream.readTLString(); - result.append("short_name:" + thethis->printableString(short_name)); - } } -void MTProtoDecompiler::decompile_StickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputFileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7046,44 +4957,46 @@ void MTProtoDecompiler::decompile_StickerSet(MTProtoDecompiler* thethis, QString } - Q_ASSERT((ctor == StickerSet::CtorStickerSet)); + Q_ASSERT((ctor == InputFileLocation::CtorInputFileLocation) || + (ctor == InputFileLocation::CtorInputEncryptedFileLocation) || + (ctor == InputFileLocation::CtorInputDocumentFileLocation)); - if(ctor == StickerSet::CtorStickerSet) + if(ctor == InputFileLocation::CtorInputFileLocation) { - result.append("StickerSet#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_installed:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_archived:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_official:" + BIT_FIELD_VALUE(flags, 2)); + result.append("InputFileLocation#"); + TLLong volume_id = mtstream.readTLLong(); + result.append("volume_id:" + QString::number(volume_id, 16)); result.append(", "); - result.append("is_masks:" + BIT_FIELD_VALUE(flags, 3)); + TLInt local_id = mtstream.readTLInt(); + result.append("local_id:" + QString::number(local_id, 16)); result.append(", "); + TLLong secret = mtstream.readTLLong(); + result.append("secret:" + QString::number(secret, 16)); + } + else if(ctor == InputFileLocation::CtorInputEncryptedFileLocation) + { + result.append("InputEncryptedFileLocation#"); TLLong id = mtstream.readTLLong(); result.append("id:" + QString::number(id, 16)); result.append(", "); TLLong access_hash = mtstream.readTLLong(); result.append("access_hash:" + QString::number(access_hash, 16)); + } + else if(ctor == InputFileLocation::CtorInputDocumentFileLocation) + { + result.append("InputDocumentFileLocation#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString short_name = mtstream.readTLString(); - result.append("short_name:" + thethis->printableString(short_name)); - result.append(", "); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); result.append(", "); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); } } -void MTProtoDecompiler::decompile_MessagesStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputAppEvent(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7095,22 +5008,26 @@ void MTProtoDecompiler::decompile_MessagesStickerSet(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == MessagesStickerSet::CtorMessagesStickerSet)); + Q_ASSERT((ctor == InputAppEvent::CtorInputAppEvent)); - if(ctor == MessagesStickerSet::CtorMessagesStickerSet) + if(ctor == InputAppEvent::CtorInputAppEvent) { - result.append("MessagesStickerSet#"); - result.append("set:"); - MTProtoDecompiler::decompile_StickerSet(thethis, result, mtstream); - result.append("packs:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("InputAppEvent#"); + TLDouble time = mtstream.readTLDouble(); + result.append("time:" + QString::number(time)); result.append(", "); - result.append("documents:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + TLLong peer = mtstream.readTLLong(); + result.append("peer:" + QString::number(peer, 16)); + result.append(", "); + TLString data = mtstream.readTLString(); + result.append("data:" + thethis->printableString(data)); } } -void MTProtoDecompiler::decompile_BotCommand(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Peer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7122,20 +5039,31 @@ void MTProtoDecompiler::decompile_BotCommand(MTProtoDecompiler* thethis, QString } - Q_ASSERT((ctor == BotCommand::CtorBotCommand)); + Q_ASSERT((ctor == Peer::CtorPeerUser) || + (ctor == Peer::CtorPeerChat) || + (ctor == Peer::CtorPeerChannel)); - if(ctor == BotCommand::CtorBotCommand) + if(ctor == Peer::CtorPeerUser) { - result.append("BotCommand#"); - TLString command = mtstream.readTLString(); - result.append("command:" + thethis->printableString(command)); - result.append(", "); - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); + result.append("PeerUser#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + } + else if(ctor == Peer::CtorPeerChat) + { + result.append("PeerChat#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + } + else if(ctor == Peer::CtorPeerChannel) + { + result.append("PeerChannel#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); } } -void MTProtoDecompiler::decompile_BotInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_StorageFileType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7147,23 +5075,40 @@ void MTProtoDecompiler::decompile_BotInfo(MTProtoDecompiler* thethis, QString& r } - Q_ASSERT((ctor == BotInfo::CtorBotInfo)); + Q_ASSERT((ctor == StorageFileType::CtorStorageFileUnknown) || + (ctor == StorageFileType::CtorStorageFileJpeg) || + (ctor == StorageFileType::CtorStorageFileGif) || + (ctor == StorageFileType::CtorStorageFilePng) || + (ctor == StorageFileType::CtorStorageFilePdf) || + (ctor == StorageFileType::CtorStorageFileMp3) || + (ctor == StorageFileType::CtorStorageFileMov) || + (ctor == StorageFileType::CtorStorageFilePartial) || + (ctor == StorageFileType::CtorStorageFileMp4) || + (ctor == StorageFileType::CtorStorageFileWebp)); - if(ctor == BotInfo::CtorBotInfo) - { - result.append("BotInfo#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - result.append(", "); - result.append("commands:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } + if(ctor == StorageFileType::CtorStorageFileUnknown) + result.append("StorageFileUnknown"); + else if(ctor == StorageFileType::CtorStorageFileJpeg) + result.append("StorageFileJpeg"); + else if(ctor == StorageFileType::CtorStorageFileGif) + result.append("StorageFileGif"); + else if(ctor == StorageFileType::CtorStorageFilePng) + result.append("StorageFilePng"); + else if(ctor == StorageFileType::CtorStorageFilePdf) + result.append("StorageFilePdf"); + else if(ctor == StorageFileType::CtorStorageFileMp3) + result.append("StorageFileMp3"); + else if(ctor == StorageFileType::CtorStorageFileMov) + result.append("StorageFileMov"); + else if(ctor == StorageFileType::CtorStorageFilePartial) + result.append("StorageFilePartial"); + else if(ctor == StorageFileType::CtorStorageFileMp4) + result.append("StorageFileMp4"); + else if(ctor == StorageFileType::CtorStorageFileWebp) + result.append("StorageFileWebp"); } -void MTProtoDecompiler::decompile_KeyboardButton(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_FileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7175,74 +5120,39 @@ void MTProtoDecompiler::decompile_KeyboardButton(MTProtoDecompiler* thethis, QSt } - Q_ASSERT((ctor == KeyboardButton::CtorKeyboardButton) || - (ctor == KeyboardButton::CtorKeyboardButtonUrl) || - (ctor == KeyboardButton::CtorKeyboardButtonCallback) || - (ctor == KeyboardButton::CtorKeyboardButtonRequestPhone) || - (ctor == KeyboardButton::CtorKeyboardButtonRequestGeoLocation) || - (ctor == KeyboardButton::CtorKeyboardButtonSwitchInline) || - (ctor == KeyboardButton::CtorKeyboardButtonGame)); + Q_ASSERT((ctor == FileLocation::CtorFileLocationUnavailable) || + (ctor == FileLocation::CtorFileLocation)); - if(ctor == KeyboardButton::CtorKeyboardButton) - { - result.append("KeyboardButton#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); - } - else if(ctor == KeyboardButton::CtorKeyboardButtonUrl) + if(ctor == FileLocation::CtorFileLocationUnavailable) { - result.append("KeyboardButtonUrl#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + result.append("FileLocationUnavailable#"); + TLLong volume_id = mtstream.readTLLong(); + result.append("volume_id:" + QString::number(volume_id, 16)); result.append(", "); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - } - else if(ctor == KeyboardButton::CtorKeyboardButtonCallback) - { - result.append("KeyboardButtonCallback#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + TLInt local_id = mtstream.readTLInt(); + result.append("local_id:" + QString::number(local_id, 16)); result.append(", "); - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); - } - else if(ctor == KeyboardButton::CtorKeyboardButtonRequestPhone) - { - result.append("KeyboardButtonRequestPhone#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); - } - else if(ctor == KeyboardButton::CtorKeyboardButtonRequestGeoLocation) - { - result.append("KeyboardButtonRequestGeoLocation#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + TLLong secret = mtstream.readTLLong(); + result.append("secret:" + QString::number(secret, 16)); } - else if(ctor == KeyboardButton::CtorKeyboardButtonSwitchInline) + else if(ctor == FileLocation::CtorFileLocation) { - result.append("KeyboardButtonSwitchInline#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_same_peer:" + BIT_FIELD_VALUE(flags, 0)); + result.append("FileLocation#"); + TLInt dc_id = mtstream.readTLInt(); + result.append("dc_id:" + QString::number(dc_id, 16)); result.append(", "); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + TLLong volume_id = mtstream.readTLLong(); + result.append("volume_id:" + QString::number(volume_id, 16)); result.append(", "); - TLString query = mtstream.readTLString(); - result.append("query:" + thethis->printableString(query)); - } - else if(ctor == KeyboardButton::CtorKeyboardButtonGame) - { - result.append("KeyboardButtonGame#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + TLInt local_id = mtstream.readTLInt(); + result.append("local_id:" + QString::number(local_id, 16)); + result.append(", "); + TLLong secret = mtstream.readTLLong(); + result.append("secret:" + QString::number(secret, 16)); } } -void MTProtoDecompiler::decompile_KeyboardButtonRow(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_User(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7254,17 +5164,108 @@ void MTProtoDecompiler::decompile_KeyboardButtonRow(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == KeyboardButtonRow::CtorKeyboardButtonRow)); + Q_ASSERT((ctor == User::CtorUserEmpty) || + (ctor == User::CtorUser)); - if(ctor == KeyboardButtonRow::CtorKeyboardButtonRow) + if(ctor == User::CtorUserEmpty) { - result.append("KeyboardButtonRow#"); - result.append("buttons:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("UserEmpty#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + } + else if(ctor == User::CtorUser) + { + result.append("User#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_self:" + BIT_FIELD_VALUE(flags, 10)); + result.append(", "); + result.append("is_contact:" + BIT_FIELD_VALUE(flags, 11)); + result.append(", "); + result.append("is_mutual_contact:" + BIT_FIELD_VALUE(flags, 12)); + result.append(", "); + result.append("is_deleted:" + BIT_FIELD_VALUE(flags, 13)); + result.append(", "); + result.append("is_bot:" + BIT_FIELD_VALUE(flags, 14)); + result.append(", "); + result.append("is_bot_chat_history:" + BIT_FIELD_VALUE(flags, 15)); + result.append(", "); + result.append("is_bot_nochats:" + BIT_FIELD_VALUE(flags, 16)); + result.append(", "); + result.append("is_verified:" + BIT_FIELD_VALUE(flags, 17)); + result.append(", "); + result.append("is_restricted:" + BIT_FIELD_VALUE(flags, 18)); + result.append(", "); + result.append("is_min:" + BIT_FIELD_VALUE(flags, 20)); + result.append(", "); + result.append("is_bot_inline_geo:" + BIT_FIELD_VALUE(flags, 21)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 4)) + { + TLString phone = mtstream.readTLString(); + result.append("phone:" + thethis->printableString(phone)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + result.append("photo:"); + MTProtoDecompiler::decompile_UserProfilePhoto(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 6)) + { + result.append("status:"); + MTProtoDecompiler::decompile_UserStatus(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 14)) + { + TLInt bot_info_version = mtstream.readTLInt(); + result.append("bot_info_version:" + QString::number(bot_info_version, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 18)) + { + TLString restriction_reason = mtstream.readTLString(); + result.append("restriction_reason:" + thethis->printableString(restriction_reason)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 19)) + { + TLString bot_inline_placeholder = mtstream.readTLString(); + result.append("bot_inline_placeholder:" + thethis->printableString(bot_inline_placeholder)); + } } } -void MTProtoDecompiler::decompile_ReplyMarkup(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_UserProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7276,56 +5277,25 @@ void MTProtoDecompiler::decompile_ReplyMarkup(MTProtoDecompiler* thethis, QStrin } - Q_ASSERT((ctor == ReplyMarkup::CtorReplyKeyboardHide) || - (ctor == ReplyMarkup::CtorReplyKeyboardForceReply) || - (ctor == ReplyMarkup::CtorReplyKeyboardMarkup) || - (ctor == ReplyMarkup::CtorReplyInlineMarkup)); + Q_ASSERT((ctor == UserProfilePhoto::CtorUserProfilePhotoEmpty) || + (ctor == UserProfilePhoto::CtorUserProfilePhoto)); - if(ctor == ReplyMarkup::CtorReplyKeyboardHide) - { - result.append("ReplyKeyboardHide#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_selective:" + BIT_FIELD_VALUE(flags, 2)); - } - else if(ctor == ReplyMarkup::CtorReplyKeyboardForceReply) - { - result.append("ReplyKeyboardForceReply#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_single_use:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_selective:" + BIT_FIELD_VALUE(flags, 2)); - } - else if(ctor == ReplyMarkup::CtorReplyKeyboardMarkup) + if(ctor == UserProfilePhoto::CtorUserProfilePhotoEmpty) + result.append("UserProfilePhotoEmpty"); + else if(ctor == UserProfilePhoto::CtorUserProfilePhoto) { - result.append("ReplyKeyboardMarkup#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_resize:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_single_use:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_selective:" + BIT_FIELD_VALUE(flags, 2)); + result.append("UserProfilePhoto#"); + TLLong photo_id = mtstream.readTLLong(); + result.append("photo_id:" + QString::number(photo_id, 16)); result.append(", "); - result.append("rows:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == ReplyMarkup::CtorReplyInlineMarkup) - { - result.append("ReplyInlineMarkup#"); - result.append("rows:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("photo_small:"); + MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); + result.append("photo_big:"); + MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_HelpAppChangelog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_UserStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7337,20 +5307,36 @@ void MTProtoDecompiler::decompile_HelpAppChangelog(MTProtoDecompiler* thethis, Q } - Q_ASSERT((ctor == HelpAppChangelog::CtorHelpAppChangelogEmpty) || - (ctor == HelpAppChangelog::CtorHelpAppChangelog)); + Q_ASSERT((ctor == UserStatus::CtorUserStatusEmpty) || + (ctor == UserStatus::CtorUserStatusOnline) || + (ctor == UserStatus::CtorUserStatusOffline) || + (ctor == UserStatus::CtorUserStatusRecently) || + (ctor == UserStatus::CtorUserStatusLastWeek) || + (ctor == UserStatus::CtorUserStatusLastMonth)); - if(ctor == HelpAppChangelog::CtorHelpAppChangelogEmpty) - result.append("HelpAppChangelogEmpty"); - else if(ctor == HelpAppChangelog::CtorHelpAppChangelog) + if(ctor == UserStatus::CtorUserStatusEmpty) + result.append("UserStatusEmpty"); + else if(ctor == UserStatus::CtorUserStatusOnline) { - result.append("HelpAppChangelog#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + result.append("UserStatusOnline#"); + TLInt expires = mtstream.readTLInt(); + result.append("expires:" + QString::number(expires, 16)); + } + else if(ctor == UserStatus::CtorUserStatusOffline) + { + result.append("UserStatusOffline#"); + TLInt was_online = mtstream.readTLInt(); + result.append("was_online:" + QString::number(was_online, 16)); } + else if(ctor == UserStatus::CtorUserStatusRecently) + result.append("UserStatusRecently"); + else if(ctor == UserStatus::CtorUserStatusLastWeek) + result.append("UserStatusLastWeek"); + else if(ctor == UserStatus::CtorUserStatusLastMonth) + result.append("UserStatusLastMonth"); } -void MTProtoDecompiler::decompile_MessageEntity(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Chat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7362,152 +5348,260 @@ void MTProtoDecompiler::decompile_MessageEntity(MTProtoDecompiler* thethis, QStr } - Q_ASSERT((ctor == MessageEntity::CtorMessageEntityUnknown) || - (ctor == MessageEntity::CtorMessageEntityMention) || - (ctor == MessageEntity::CtorMessageEntityHashtag) || - (ctor == MessageEntity::CtorMessageEntityBotCommand) || - (ctor == MessageEntity::CtorMessageEntityUrl) || - (ctor == MessageEntity::CtorMessageEntityEmail) || - (ctor == MessageEntity::CtorMessageEntityBold) || - (ctor == MessageEntity::CtorMessageEntityItalic) || - (ctor == MessageEntity::CtorMessageEntityCode) || - (ctor == MessageEntity::CtorMessageEntityPre) || - (ctor == MessageEntity::CtorMessageEntityTextUrl) || - (ctor == MessageEntity::CtorMessageEntityMentionName) || - (ctor == MessageEntity::CtorInputMessageEntityMentionName)); + Q_ASSERT((ctor == Chat::CtorChatEmpty) || + (ctor == Chat::CtorChat) || + (ctor == Chat::CtorChatForbidden) || + (ctor == Chat::CtorChannel) || + (ctor == Chat::CtorChannelForbidden)); - if(ctor == MessageEntity::CtorMessageEntityUnknown) + if(ctor == Chat::CtorChatEmpty) { - result.append("MessageEntityUnknown#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("ChatEmpty#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); } - else if(ctor == MessageEntity::CtorMessageEntityMention) + else if(ctor == Chat::CtorChat) { - result.append("MessageEntityMention#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("Chat#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_creator:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); - } - else if(ctor == MessageEntity::CtorMessageEntityHashtag) - { - result.append("MessageEntityHashtag#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("is_kicked:" + BIT_FIELD_VALUE(flags, 1)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); - } - else if(ctor == MessageEntity::CtorMessageEntityBotCommand) - { - result.append("MessageEntityBotCommand#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("is_left:" + BIT_FIELD_VALUE(flags, 2)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("is_admins_enabled:" + BIT_FIELD_VALUE(flags, 3)); + result.append(", "); + result.append("is_admin:" + BIT_FIELD_VALUE(flags, 4)); + result.append(", "); + result.append("is_deactivated:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_ChatPhoto(thethis, result, mtstream); + TLInt participants_count = mtstream.readTLInt(); + result.append("participants_count:" + QString::number(participants_count, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 6)) + { + result.append("migrated_to:"); + MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + } } - else if(ctor == MessageEntity::CtorMessageEntityUrl) + else if(ctor == Chat::CtorChatForbidden) { - result.append("MessageEntityUrl#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("ChatForbidden#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); } - else if(ctor == MessageEntity::CtorMessageEntityEmail) + else if(ctor == Chat::CtorChannel) { - result.append("MessageEntityEmail#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("Channel#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_creator:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("is_kicked:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_left:" + BIT_FIELD_VALUE(flags, 2)); + result.append(", "); + result.append("is_editor:" + BIT_FIELD_VALUE(flags, 3)); + result.append(", "); + result.append("is_moderator:" + BIT_FIELD_VALUE(flags, 4)); + result.append(", "); + result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_verified:" + BIT_FIELD_VALUE(flags, 7)); + result.append(", "); + result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 8)); + result.append(", "); + result.append("is_restricted:" + BIT_FIELD_VALUE(flags, 9)); + result.append(", "); + result.append("is_democracy:" + BIT_FIELD_VALUE(flags, 10)); + result.append(", "); + result.append("is_signatures:" + BIT_FIELD_VALUE(flags, 11)); + result.append(", "); + result.append("is_min:" + BIT_FIELD_VALUE(flags, 12)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 13)) + { + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + } + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + if(IS_FLAG_SET(flags, 6)) + { + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + result.append(", "); + } + result.append("photo:"); + MTProtoDecompiler::decompile_ChatPhoto(thethis, result, mtstream); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 9)) + { + TLString restriction_reason = mtstream.readTLString(); + result.append("restriction_reason:" + thethis->printableString(restriction_reason)); + } } - else if(ctor == MessageEntity::CtorMessageEntityBold) + else if(ctor == Chat::CtorChannelForbidden) { - result.append("MessageEntityBold#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("ChannelForbidden#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 5)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 8)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); } - else if(ctor == MessageEntity::CtorMessageEntityItalic) +} + +void MTProtoDecompiler::decompile_ChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) { - result.append("MessageEntityItalic#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("Null"); + return; } - else if(ctor == MessageEntity::CtorMessageEntityCode) + + + Q_ASSERT((ctor == ChatFull::CtorChatFull) || + (ctor == ChatFull::CtorChannelFull)); + + if(ctor == ChatFull::CtorChatFull) { - result.append("MessageEntityCode#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("ChatFull#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("participants:"); + MTProtoDecompiler::decompile_ChatParticipants(thethis, result, mtstream); + result.append("chat_photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + result.append("notify_settings:"); + MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); + result.append("exported_invite:"); + MTProtoDecompiler::decompile_ExportedChatInvite(thethis, result, mtstream); + result.append("bot_info:"); + thethis->decompileTLVectorEx(result, mtstream, false); } - else if(ctor == MessageEntity::CtorMessageEntityPre) + else if(ctor == ChatFull::CtorChannelFull) { - result.append("MessageEntityPre#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + result.append("ChannelFull#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_can_view_participants:" + BIT_FIELD_VALUE(flags, 3)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("is_can_set_username:" + BIT_FIELD_VALUE(flags, 6)); result.append(", "); - TLString language = mtstream.readTLString(); - result.append("language:" + thethis->printableString(language)); - } - else if(ctor == MessageEntity::CtorMessageEntityTextUrl) - { - result.append("MessageEntityTextUrl#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + TLString about = mtstream.readTLString(); + result.append("about:" + thethis->printableString(about)); result.append(", "); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - } - else if(ctor == MessageEntity::CtorMessageEntityMentionName) - { - result.append("MessageEntityMentionName#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + if(IS_FLAG_SET(flags, 0)) + { + TLInt participants_count = mtstream.readTLInt(); + result.append("participants_count:" + QString::number(participants_count, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLInt admins_count = mtstream.readTLInt(); + result.append("admins_count:" + QString::number(admins_count, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLInt kicked_count = mtstream.readTLInt(); + result.append("kicked_count:" + QString::number(kicked_count, 16)); + result.append(", "); + } + TLInt read_inbox_max_id = mtstream.readTLInt(); + result.append("read_inbox_max_id:" + QString::number(read_inbox_max_id, 16)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + TLInt read_outbox_max_id = mtstream.readTLInt(); + result.append("read_outbox_max_id:" + QString::number(read_outbox_max_id, 16)); result.append(", "); - TLInt user_id_messageentitymentionname = mtstream.readTLInt(); - result.append("user_id_messageentitymentionname:" + QString::number(user_id_messageentitymentionname, 16)); - } - else if(ctor == MessageEntity::CtorInputMessageEntityMentionName) - { - result.append("InputMessageEntityMentionName#"); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); + TLInt unread_count = mtstream.readTLInt(); + result.append("unread_count:" + QString::number(unread_count, 16)); result.append(", "); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); + result.append("chat_photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + result.append("notify_settings:"); + MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); + result.append("exported_invite:"); + MTProtoDecompiler::decompile_ExportedChatInvite(thethis, result, mtstream); + result.append("bot_info:"); + thethis->decompileTLVectorEx(result, mtstream, false); result.append(", "); - result.append("user_id_inputmessageentitymentionname:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 4)) + { + TLInt migrated_from_chat_id = mtstream.readTLInt(); + result.append("migrated_from_chat_id:" + QString::number(migrated_from_chat_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 4)) + { + TLInt migrated_from_max_id = mtstream.readTLInt(); + result.append("migrated_from_max_id:" + QString::number(migrated_from_max_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + TLInt pinned_msg_id = mtstream.readTLInt(); + result.append("pinned_msg_id:" + QString::number(pinned_msg_id, 16)); + } } } -void MTProtoDecompiler::decompile_InputChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChatParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7519,23 +5613,43 @@ void MTProtoDecompiler::decompile_InputChannel(MTProtoDecompiler* thethis, QStri } - Q_ASSERT((ctor == InputChannel::CtorInputChannelEmpty) || - (ctor == InputChannel::CtorInputChannel)); + Q_ASSERT((ctor == ChatParticipant::CtorChatParticipant) || + (ctor == ChatParticipant::CtorChatParticipantCreator) || + (ctor == ChatParticipant::CtorChatParticipantAdmin)); - if(ctor == InputChannel::CtorInputChannelEmpty) - result.append("InputChannelEmpty"); - else if(ctor == InputChannel::CtorInputChannel) + if(ctor == ChatParticipant::CtorChatParticipant) { - result.append("InputChannel#"); - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); + result.append("ChatParticipant#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); + TLInt inviter_id = mtstream.readTLInt(); + result.append("inviter_id:" + QString::number(inviter_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + } + else if(ctor == ChatParticipant::CtorChatParticipantCreator) + { + result.append("ChatParticipantCreator#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + } + else if(ctor == ChatParticipant::CtorChatParticipantAdmin) + { + result.append("ChatParticipantAdmin#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt inviter_id = mtstream.readTLInt(); + result.append("inviter_id:" + QString::number(inviter_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } } -void MTProtoDecompiler::decompile_ContactsResolvedPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChatParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7547,22 +5661,40 @@ void MTProtoDecompiler::decompile_ContactsResolvedPeer(MTProtoDecompiler* thethi } - Q_ASSERT((ctor == ContactsResolvedPeer::CtorContactsResolvedPeer)); + Q_ASSERT((ctor == ChatParticipants::CtorChatParticipantsForbidden) || + (ctor == ChatParticipants::CtorChatParticipants)); - if(ctor == ContactsResolvedPeer::CtorContactsResolvedPeer) + if(ctor == ChatParticipants::CtorChatParticipantsForbidden) { - result.append("ContactsResolvedPeer#"); - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("ChatParticipantsForbidden#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); result.append(", "); - result.append("users:"); + if(IS_FLAG_SET(flags, 0)) + { + result.append("self_participant:"); + MTProtoDecompiler::decompile_ChatParticipant(thethis, result, mtstream); + } + } + else if(ctor == ChatParticipants::CtorChatParticipants) + { + result.append("ChatParticipants#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + result.append("participants:"); thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); } } -void MTProtoDecompiler::decompile_MessageRange(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7574,20 +5706,22 @@ void MTProtoDecompiler::decompile_MessageRange(MTProtoDecompiler* thethis, QStri } - Q_ASSERT((ctor == MessageRange::CtorMessageRange)); + Q_ASSERT((ctor == ChatPhoto::CtorChatPhotoEmpty) || + (ctor == ChatPhoto::CtorChatPhoto)); - if(ctor == MessageRange::CtorMessageRange) + if(ctor == ChatPhoto::CtorChatPhotoEmpty) + result.append("ChatPhotoEmpty"); + else if(ctor == ChatPhoto::CtorChatPhoto) { - result.append("MessageRange#"); - TLInt min_id = mtstream.readTLInt(); - result.append("min_id:" + QString::number(min_id, 16)); - result.append(", "); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); + result.append("ChatPhoto#"); + result.append("photo_small:"); + MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); + result.append("photo_big:"); + MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_UpdatesChannelDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Message(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7599,100 +5733,138 @@ void MTProtoDecompiler::decompile_UpdatesChannelDifference(MTProtoDecompiler* th } - Q_ASSERT((ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceEmpty) || - (ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceTooLong) || - (ctor == UpdatesChannelDifference::CtorUpdatesChannelDifference)); + Q_ASSERT((ctor == Message::CtorMessageEmpty) || + (ctor == Message::CtorMessage) || + (ctor == Message::CtorMessageService)); - if(ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceEmpty) + if(ctor == Message::CtorMessageEmpty) { - result.append("UpdatesChannelDifferenceEmpty#"); + result.append("MessageEmpty#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + } + else if(ctor == Message::CtorMessage) + { + result.append("Message#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - result.append("is_final:" + BIT_FIELD_VALUE(flags, 0)); + result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); + result.append(", "); + result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); + result.append(", "); + result.append("is_post:" + BIT_FIELD_VALUE(flags, 14)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 8)) + { + TLInt from_id = mtstream.readTLInt(); + result.append("from_id:" + QString::number(from_id, 16)); + result.append(", "); + } + result.append("to_id:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 2)) + { + result.append("fwd_from:"); + MTProtoDecompiler::decompile_MessageFwdHeader(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 11)) + { + TLInt via_bot_id = mtstream.readTLInt(); + result.append("via_bot_id:" + QString::number(via_bot_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append(", "); + } + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); result.append(", "); - if(IS_FLAG_SET(flags, 1)) + if(IS_FLAG_SET(flags, 9)) { - TLInt timeout = mtstream.readTLInt(); - result.append("timeout:" + QString::number(timeout, 16)); + result.append("media:"); + MTProtoDecompiler::decompile_MessageMedia(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 6)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 7)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + } + if(IS_FLAG_SET(flags, 10)) + { + TLInt views = mtstream.readTLInt(); + result.append("views:" + QString::number(views, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 15)) + { + TLInt edit_date = mtstream.readTLInt(); + result.append("edit_date:" + QString::number(edit_date, 16)); } } - else if(ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceTooLong) + else if(ctor == Message::CtorMessageService) { - result.append("UpdatesChannelDifferenceTooLong#"); + result.append("MessageService#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - result.append("is_final:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - TLInt timeout = mtstream.readTLInt(); - result.append("timeout:" + QString::number(timeout, 16)); - result.append(", "); - } - TLInt top_message = mtstream.readTLInt(); - result.append("top_message:" + QString::number(top_message, 16)); - result.append(", "); - TLInt read_inbox_max_id = mtstream.readTLInt(); - result.append("read_inbox_max_id:" + QString::number(read_inbox_max_id, 16)); - result.append(", "); - TLInt read_outbox_max_id = mtstream.readTLInt(); - result.append("read_outbox_max_id:" + QString::number(read_outbox_max_id, 16)); + result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); result.append(", "); - TLInt unread_count = mtstream.readTLInt(); - result.append("unread_count:" + QString::number(unread_count, 16)); + result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); result.append(", "); - result.append("messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - } - else if(ctor == UpdatesChannelDifference::CtorUpdatesChannelDifference) - { - result.append("UpdatesChannelDifference#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_final:" + BIT_FIELD_VALUE(flags, 0)); + result.append("is_post:" + BIT_FIELD_VALUE(flags, 14)); result.append(", "); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 1)) + if(IS_FLAG_SET(flags, 8)) { - TLInt timeout = mtstream.readTLInt(); - result.append("timeout:" + QString::number(timeout, 16)); + TLInt from_id = mtstream.readTLInt(); + result.append("from_id:" + QString::number(from_id, 16)); result.append(", "); } - result.append("new_messages:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("other_updates:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("to_id:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 3)) + { + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append(", "); + } + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("action:"); + MTProtoDecompiler::decompile_MessageAction(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_ChannelMessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessageMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7704,26 +5876,89 @@ void MTProtoDecompiler::decompile_ChannelMessagesFilter(MTProtoDecompiler* theth } - Q_ASSERT((ctor == ChannelMessagesFilter::CtorChannelMessagesFilterEmpty) || - (ctor == ChannelMessagesFilter::CtorChannelMessagesFilter)); + Q_ASSERT((ctor == MessageMedia::CtorMessageMediaEmpty) || + (ctor == MessageMedia::CtorMessageMediaPhoto) || + (ctor == MessageMedia::CtorMessageMediaGeo) || + (ctor == MessageMedia::CtorMessageMediaContact) || + (ctor == MessageMedia::CtorMessageMediaUnsupported) || + (ctor == MessageMedia::CtorMessageMediaDocument) || + (ctor == MessageMedia::CtorMessageMediaWebPage) || + (ctor == MessageMedia::CtorMessageMediaVenue) || + (ctor == MessageMedia::CtorMessageMediaGame)); - if(ctor == ChannelMessagesFilter::CtorChannelMessagesFilterEmpty) - result.append("ChannelMessagesFilterEmpty"); - else if(ctor == ChannelMessagesFilter::CtorChannelMessagesFilter) + if(ctor == MessageMedia::CtorMessageMediaEmpty) + result.append("MessageMediaEmpty"); + else if(ctor == MessageMedia::CtorMessageMediaPhoto) { - result.append("ChannelMessagesFilter#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_exclude_new_messages:" + BIT_FIELD_VALUE(flags, 1)); + result.append("MessageMediaPhoto#"); + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + } + else if(ctor == MessageMedia::CtorMessageMediaGeo) + { + result.append("MessageMediaGeo#"); + result.append("geo:"); + MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); + } + else if(ctor == MessageMedia::CtorMessageMediaContact) + { + result.append("MessageMediaContact#"); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); result.append(", "); - result.append("ranges:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + } + else if(ctor == MessageMedia::CtorMessageMediaUnsupported) + result.append("MessageMediaUnsupported"); + else if(ctor == MessageMedia::CtorMessageMediaDocument) + { + result.append("MessageMediaDocument#"); + result.append("document:"); + MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + } + else if(ctor == MessageMedia::CtorMessageMediaWebPage) + { + result.append("MessageMediaWebPage#"); + result.append("webpage:"); + MTProtoDecompiler::decompile_WebPage(thethis, result, mtstream); + } + else if(ctor == MessageMedia::CtorMessageMediaVenue) + { + result.append("MessageMediaVenue#"); + result.append("geo:"); + MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString address = mtstream.readTLString(); + result.append("address:" + thethis->printableString(address)); + result.append(", "); + TLString provider = mtstream.readTLString(); + result.append("provider:" + thethis->printableString(provider)); + result.append(", "); + TLString venue_id = mtstream.readTLString(); + result.append("venue_id:" + thethis->printableString(venue_id)); + } + else if(ctor == MessageMedia::CtorMessageMediaGame) + { + result.append("MessageMediaGame#"); + result.append("game:"); + MTProtoDecompiler::decompile_Game(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_ChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7735,130 +5970,101 @@ void MTProtoDecompiler::decompile_ChannelParticipant(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == ChannelParticipant::CtorChannelParticipant) || - (ctor == ChannelParticipant::CtorChannelParticipantSelf) || - (ctor == ChannelParticipant::CtorChannelParticipantModerator) || - (ctor == ChannelParticipant::CtorChannelParticipantEditor) || - (ctor == ChannelParticipant::CtorChannelParticipantKicked) || - (ctor == ChannelParticipant::CtorChannelParticipantCreator)); + Q_ASSERT((ctor == MessageAction::CtorMessageActionEmpty) || + (ctor == MessageAction::CtorMessageActionChatCreate) || + (ctor == MessageAction::CtorMessageActionChatEditTitle) || + (ctor == MessageAction::CtorMessageActionChatEditPhoto) || + (ctor == MessageAction::CtorMessageActionChatDeletePhoto) || + (ctor == MessageAction::CtorMessageActionChatAddUser) || + (ctor == MessageAction::CtorMessageActionChatDeleteUser) || + (ctor == MessageAction::CtorMessageActionChatJoinedByLink) || + (ctor == MessageAction::CtorMessageActionChannelCreate) || + (ctor == MessageAction::CtorMessageActionChatMigrateTo) || + (ctor == MessageAction::CtorMessageActionChannelMigrateFrom) || + (ctor == MessageAction::CtorMessageActionPinMessage) || + (ctor == MessageAction::CtorMessageActionHistoryClear) || + (ctor == MessageAction::CtorMessageActionGameScore)); - if(ctor == ChannelParticipant::CtorChannelParticipant) + if(ctor == MessageAction::CtorMessageActionEmpty) + result.append("MessageActionEmpty"); + else if(ctor == MessageAction::CtorMessageActionChatCreate) { - result.append("ChannelParticipant#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); + result.append("MessageActionChatCreate#"); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + result.append("users:"); + thethis->decompileTLVector(result, mtstream, false); + } + else if(ctor == MessageAction::CtorMessageActionChatEditTitle) + { + result.append("MessageActionChatEditTitle#"); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + } + else if(ctor == MessageAction::CtorMessageActionChatEditPhoto) + { + result.append("MessageActionChatEditPhoto#"); + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); } - else if(ctor == ChannelParticipant::CtorChannelParticipantSelf) + else if(ctor == MessageAction::CtorMessageActionChatDeletePhoto) + result.append("MessageActionChatDeletePhoto"); + else if(ctor == MessageAction::CtorMessageActionChatAddUser) { - result.append("ChannelParticipantSelf#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt inviter_id = mtstream.readTLInt(); - result.append("inviter_id:" + QString::number(inviter_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + result.append("MessageActionChatAddUser#"); + result.append("users:"); + thethis->decompileTLVector(result, mtstream, false); } - else if(ctor == ChannelParticipant::CtorChannelParticipantModerator) + else if(ctor == MessageAction::CtorMessageActionChatDeleteUser) { - result.append("ChannelParticipantModerator#"); + result.append("MessageActionChatDeleteUser#"); TLInt user_id = mtstream.readTLInt(); result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt inviter_id = mtstream.readTLInt(); - result.append("inviter_id:" + QString::number(inviter_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); } - else if(ctor == ChannelParticipant::CtorChannelParticipantEditor) + else if(ctor == MessageAction::CtorMessageActionChatJoinedByLink) { - result.append("ChannelParticipantEditor#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); + result.append("MessageActionChatJoinedByLink#"); TLInt inviter_id = mtstream.readTLInt(); result.append("inviter_id:" + QString::number(inviter_id, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); } - else if(ctor == ChannelParticipant::CtorChannelParticipantKicked) + else if(ctor == MessageAction::CtorMessageActionChannelCreate) { - result.append("ChannelParticipantKicked#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); - result.append(", "); - TLInt kicked_by = mtstream.readTLInt(); - result.append("kicked_by:" + QString::number(kicked_by, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); + result.append("MessageActionChannelCreate#"); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); } - else if(ctor == ChannelParticipant::CtorChannelParticipantCreator) + else if(ctor == MessageAction::CtorMessageActionChatMigrateTo) { - result.append("ChannelParticipantCreator#"); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); + result.append("MessageActionChatMigrateTo#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); } -} - -void MTProtoDecompiler::decompile_ChannelParticipantsFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == MessageAction::CtorMessageActionChannelMigrateFrom) { - result.append("Null"); - return; + result.append("MessageActionChannelMigrateFrom#"); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); } - - - Q_ASSERT((ctor == ChannelParticipantsFilter::CtorChannelParticipantsRecent) || - (ctor == ChannelParticipantsFilter::CtorChannelParticipantsAdmins) || - (ctor == ChannelParticipantsFilter::CtorChannelParticipantsKicked) || - (ctor == ChannelParticipantsFilter::CtorChannelParticipantsBots)); - - if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsRecent) - result.append("ChannelParticipantsRecent"); - else if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsAdmins) - result.append("ChannelParticipantsAdmins"); - else if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsKicked) - result.append("ChannelParticipantsKicked"); - else if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsBots) - result.append("ChannelParticipantsBots"); -} - -void MTProtoDecompiler::decompile_ChannelParticipantRole(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == MessageAction::CtorMessageActionPinMessage) + result.append("MessageActionPinMessage"); + else if(ctor == MessageAction::CtorMessageActionHistoryClear) + result.append("MessageActionHistoryClear"); + else if(ctor == MessageAction::CtorMessageActionGameScore) { - result.append("Null"); - return; + result.append("MessageActionGameScore#"); + TLLong game_id = mtstream.readTLLong(); + result.append("game_id:" + QString::number(game_id, 16)); + result.append(", "); + TLInt score = mtstream.readTLInt(); + result.append("score:" + QString::number(score, 16)); } - - - Q_ASSERT((ctor == ChannelParticipantRole::CtorChannelRoleEmpty) || - (ctor == ChannelParticipantRole::CtorChannelRoleModerator) || - (ctor == ChannelParticipantRole::CtorChannelRoleEditor)); - - if(ctor == ChannelParticipantRole::CtorChannelRoleEmpty) - result.append("ChannelRoleEmpty"); - else if(ctor == ChannelParticipantRole::CtorChannelRoleModerator) - result.append("ChannelRoleModerator"); - else if(ctor == ChannelParticipantRole::CtorChannelRoleEditor) - result.append("ChannelRoleEditor"); } -void MTProtoDecompiler::decompile_ChannelsChannelParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Dialog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7870,23 +6076,46 @@ void MTProtoDecompiler::decompile_ChannelsChannelParticipants(MTProtoDecompiler* } - Q_ASSERT((ctor == ChannelsChannelParticipants::CtorChannelsChannelParticipants)); + Q_ASSERT((ctor == Dialog::CtorDialog)); - if(ctor == ChannelsChannelParticipants::CtorChannelsChannelParticipants) + if(ctor == Dialog::CtorDialog) { - result.append("ChannelsChannelParticipants#"); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); + result.append("Dialog#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + TLInt top_message = mtstream.readTLInt(); + result.append("top_message:" + QString::number(top_message, 16)); result.append(", "); - result.append("participants:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt read_inbox_max_id = mtstream.readTLInt(); + result.append("read_inbox_max_id:" + QString::number(read_inbox_max_id, 16)); result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt read_outbox_max_id = mtstream.readTLInt(); + result.append("read_outbox_max_id:" + QString::number(read_outbox_max_id, 16)); + result.append(", "); + TLInt unread_count = mtstream.readTLInt(); + result.append("unread_count:" + QString::number(unread_count, 16)); + result.append(", "); + result.append("notify_settings:"); + MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) + { + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + result.append("draft:"); + MTProtoDecompiler::decompile_DraftMessage(thethis, result, mtstream); + } } } -void MTProtoDecompiler::decompile_ChannelsChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Photo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7898,19 +6127,39 @@ void MTProtoDecompiler::decompile_ChannelsChannelParticipant(MTProtoDecompiler* } - Q_ASSERT((ctor == ChannelsChannelParticipant::CtorChannelsChannelParticipant)); + Q_ASSERT((ctor == Photo::CtorPhotoEmpty) || + (ctor == Photo::CtorPhoto)); - if(ctor == ChannelsChannelParticipant::CtorChannelsChannelParticipant) + if(ctor == Photo::CtorPhotoEmpty) { - result.append("ChannelsChannelParticipant#"); - result.append("participant:"); - MTProtoDecompiler::decompile_ChannelParticipant(thethis, result, mtstream); - result.append("users:"); + result.append("PhotoEmpty#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + } + else if(ctor == Photo::CtorPhoto) + { + result.append("Photo#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("has_stickers:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + result.append("sizes:"); thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_HelpTermsOfService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_PhotoSize(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7922,66 +6171,53 @@ void MTProtoDecompiler::decompile_HelpTermsOfService(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == HelpTermsOfService::CtorHelpTermsOfService)); - - if(ctor == HelpTermsOfService::CtorHelpTermsOfService) - { - result.append("HelpTermsOfService#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); - } -} - -void MTProtoDecompiler::decompile_FoundGif(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == PhotoSize::CtorPhotoSizeEmpty) || + (ctor == PhotoSize::CtorPhotoSize) || + (ctor == PhotoSize::CtorPhotoCachedSize)); - if(ctor == TLTypes::Null) + if(ctor == PhotoSize::CtorPhotoSizeEmpty) { - result.append("Null"); - return; + result.append("PhotoSizeEmpty#"); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); } - - - Q_ASSERT((ctor == FoundGif::CtorFoundGif) || - (ctor == FoundGif::CtorFoundGifCached)); - - if(ctor == FoundGif::CtorFoundGif) + else if(ctor == PhotoSize::CtorPhotoSize) { - result.append("FoundGif#"); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); + result.append("PhotoSize#"); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); result.append(", "); - TLString thumb_url = mtstream.readTLString(); - result.append("thumb_url:" + thethis->printableString(thumb_url)); + result.append("location:"); + MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); + TLInt w = mtstream.readTLInt(); + result.append("w:" + QString::number(w, 16)); result.append(", "); - TLString content_url = mtstream.readTLString(); - result.append("content_url:" + thethis->printableString(content_url)); + TLInt h = mtstream.readTLInt(); + result.append("h:" + QString::number(h, 16)); result.append(", "); - TLString content_type = mtstream.readTLString(); - result.append("content_type:" + thethis->printableString(content_type)); + TLInt size = mtstream.readTLInt(); + result.append("size:" + QString::number(size, 16)); + } + else if(ctor == PhotoSize::CtorPhotoCachedSize) + { + result.append("PhotoCachedSize#"); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); result.append(", "); + result.append("location:"); + MTProtoDecompiler::decompile_FileLocation(thethis, result, mtstream); TLInt w = mtstream.readTLInt(); result.append("w:" + QString::number(w, 16)); result.append(", "); TLInt h = mtstream.readTLInt(); result.append("h:" + QString::number(h, 16)); - } - else if(ctor == FoundGif::CtorFoundGifCached) - { - result.append("FoundGifCached#"); - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - result.append("document:"); - MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); } } -void MTProtoDecompiler::decompile_MessagesFoundGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_GeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -7993,20 +6229,23 @@ void MTProtoDecompiler::decompile_MessagesFoundGifs(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == MessagesFoundGifs::CtorMessagesFoundGifs)); + Q_ASSERT((ctor == GeoPoint::CtorGeoPointEmpty) || + (ctor == GeoPoint::CtorGeoPoint)); - if(ctor == MessagesFoundGifs::CtorMessagesFoundGifs) + if(ctor == GeoPoint::CtorGeoPointEmpty) + result.append("GeoPointEmpty"); + else if(ctor == GeoPoint::CtorGeoPoint) { - result.append("MessagesFoundGifs#"); - TLInt next_offset = mtstream.readTLInt(); - result.append("next_offset:" + QString::number(next_offset, 16)); + result.append("GeoPoint#"); + TLDouble longitude = mtstream.readTLDouble(); + result.append("longitude:" + QString::number(longitude)); result.append(", "); - result.append("results:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLDouble latitude = mtstream.readTLDouble(); + result.append("latitude:" + QString::number(latitude)); } } -void MTProtoDecompiler::decompile_MessagesSavedGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AuthCheckedPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8018,23 +6257,17 @@ void MTProtoDecompiler::decompile_MessagesSavedGifs(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == MessagesSavedGifs::CtorMessagesSavedGifsNotModified) || - (ctor == MessagesSavedGifs::CtorMessagesSavedGifs)); + Q_ASSERT((ctor == AuthCheckedPhone::CtorAuthCheckedPhone)); - if(ctor == MessagesSavedGifs::CtorMessagesSavedGifsNotModified) - result.append("MessagesSavedGifsNotModified"); - else if(ctor == MessagesSavedGifs::CtorMessagesSavedGifs) + if(ctor == AuthCheckedPhone::CtorAuthCheckedPhone) { - result.append("MessagesSavedGifs#"); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(", "); - result.append("gifs:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("AuthCheckedPhone#"); + TLBool is_phone_registered = mtstream.readTLBool(); + result.append("is_phone_registered:" + QString::number(is_phone_registered, 16)); } } -void MTProtoDecompiler::decompile_InputBotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AuthSentCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8046,133 +6279,145 @@ void MTProtoDecompiler::decompile_InputBotInlineMessage(MTProtoDecompiler* theth } - Q_ASSERT((ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaAuto) || - (ctor == InputBotInlineMessage::CtorInputBotInlineMessageText) || - (ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaGeo) || - (ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaVenue) || - (ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaContact) || - (ctor == InputBotInlineMessage::CtorInputBotInlineMessageGame)); + Q_ASSERT((ctor == AuthSentCode::CtorAuthSentCode)); - if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaAuto) - { - result.append("InputBotInlineMessageMediaAuto#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } - } - else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageText) + if(ctor == AuthSentCode::CtorAuthSentCode) { - result.append("InputBotInlineMessageText#"); + result.append("AuthSentCode#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 0)); + result.append("is_phone_registered:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); + result.append("type:"); + MTProtoDecompiler::decompile_AuthSentCodeType(thethis, result, mtstream); + TLString phone_code_hash = mtstream.readTLString(); + result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); result.append(", "); if(IS_FLAG_SET(flags, 1)) { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); + result.append("next_type:"); + MTProtoDecompiler::decompile_AuthCodeType(thethis, result, mtstream); } if(IS_FLAG_SET(flags, 2)) { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + TLInt timeout = mtstream.readTLInt(); + result.append("timeout:" + QString::number(timeout, 16)); } } - else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaGeo) +} + +void MTProtoDecompiler::decompile_AuthAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) { - result.append("InputBotInlineMessageMediaGeo#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("geo_point:"); - MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } + result.append("Null"); + return; } - else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaVenue) + + + Q_ASSERT((ctor == AuthAuthorization::CtorAuthAuthorization)); + + if(ctor == AuthAuthorization::CtorAuthAuthorization) { - result.append("InputBotInlineMessageMediaVenue#"); + result.append("AuthAuthorization#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - result.append("geo_point:"); - MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString address = mtstream.readTLString(); - result.append("address:" + thethis->printableString(address)); - result.append(", "); - TLString provider = mtstream.readTLString(); - result.append("provider:" + thethis->printableString(provider)); - result.append(", "); - TLString venue_id = mtstream.readTLString(); - result.append("venue_id:" + thethis->printableString(venue_id)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) + if(IS_FLAG_SET(flags, 0)) { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + TLInt tmp_sessions = mtstream.readTLInt(); + result.append("tmp_sessions:" + QString::number(tmp_sessions, 16)); + result.append(", "); } + result.append("user:"); + MTProtoDecompiler::decompile_User(thethis, result, mtstream); } - else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaContact) +} + +void MTProtoDecompiler::decompile_AuthExportedAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) { - result.append("InputBotInlineMessageMediaContact#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == AuthExportedAuthorization::CtorAuthExportedAuthorization)); + + if(ctor == AuthExportedAuthorization::CtorAuthExportedAuthorization) + { + result.append("AuthExportedAuthorization#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); } - else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageGame) +} + +void MTProtoDecompiler::decompile_InputNotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) { - result.append("InputBotInlineMessageGame#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputNotifyPeer::CtorInputNotifyPeer) || + (ctor == InputNotifyPeer::CtorInputNotifyUsers) || + (ctor == InputNotifyPeer::CtorInputNotifyChats) || + (ctor == InputNotifyPeer::CtorInputNotifyAll)); + + if(ctor == InputNotifyPeer::CtorInputNotifyPeer) + { + result.append("InputNotifyPeer#"); + result.append("peer:"); + MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); + } + else if(ctor == InputNotifyPeer::CtorInputNotifyUsers) + result.append("InputNotifyUsers"); + else if(ctor == InputNotifyPeer::CtorInputNotifyChats) + result.append("InputNotifyChats"); + else if(ctor == InputNotifyPeer::CtorInputNotifyAll) + result.append("InputNotifyAll"); +} + +void MTProtoDecompiler::decompile_InputPeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; } + + + Q_ASSERT((ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsEmpty) || + (ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsAll)); + + if(ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsEmpty) + result.append("InputPeerNotifyEventsEmpty"); + else if(ctor == InputPeerNotifyEvents::CtorInputPeerNotifyEventsAll) + result.append("InputPeerNotifyEventsAll"); } -void MTProtoDecompiler::decompile_InputBotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputPeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8184,140 +6429,49 @@ void MTProtoDecompiler::decompile_InputBotInlineResult(MTProtoDecompiler* thethi } - Q_ASSERT((ctor == InputBotInlineResult::CtorInputBotInlineResult) || - (ctor == InputBotInlineResult::CtorInputBotInlineResultPhoto) || - (ctor == InputBotInlineResult::CtorInputBotInlineResultDocument) || - (ctor == InputBotInlineResult::CtorInputBotInlineResultGame)); + Q_ASSERT((ctor == InputPeerNotifySettings::CtorInputPeerNotifySettings)); - if(ctor == InputBotInlineResult::CtorInputBotInlineResult) + if(ctor == InputPeerNotifySettings::CtorInputPeerNotifySettings) { - result.append("InputBotInlineResult#"); + result.append("InputPeerNotifySettings#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); - result.append(", "); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); - result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 4)) - { - TLString thumb_url = mtstream.readTLString(); - result.append("thumb_url:" + thethis->printableString(thumb_url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - TLString content_url = mtstream.readTLString(); - result.append("content_url:" + thethis->printableString(content_url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - TLString content_type = mtstream.readTLString(); - result.append("content_type:" + thethis->printableString(content_type)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 6)) - { - TLInt w = mtstream.readTLInt(); - result.append("w:" + QString::number(w, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 6)) - { - TLInt h = mtstream.readTLInt(); - result.append("h:" + QString::number(h, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 7)) - { - TLInt duration = mtstream.readTLInt(); - result.append("duration:" + QString::number(duration, 16)); - result.append(", "); - } - result.append("send_message:"); - MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); - } - else if(ctor == InputBotInlineResult::CtorInputBotInlineResultPhoto) - { - result.append("InputBotInlineResultPhoto#"); - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); - result.append(", "); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); + result.append("is_show_previews:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); - result.append("send_message:"); - MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); - } - else if(ctor == InputBotInlineResult::CtorInputBotInlineResultDocument) - { - result.append("InputBotInlineResultDocument#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 1)); result.append(", "); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); + TLInt mute_until = mtstream.readTLInt(); + result.append("mute_until:" + QString::number(mute_until, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - result.append(", "); - } - result.append("document:"); - MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); - result.append("send_message:"); - MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); + TLString sound = mtstream.readTLString(); + result.append("sound:" + thethis->printableString(sound)); } - else if(ctor == InputBotInlineResult::CtorInputBotInlineResultGame) +} + +void MTProtoDecompiler::decompile_PeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) { - result.append("InputBotInlineResultGame#"); - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); - result.append(", "); - TLString short_name = mtstream.readTLString(); - result.append("short_name:" + thethis->printableString(short_name)); - result.append(", "); - result.append("send_message:"); - MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); + result.append("Null"); + return; } + + + Q_ASSERT((ctor == PeerNotifyEvents::CtorPeerNotifyEventsEmpty) || + (ctor == PeerNotifyEvents::CtorPeerNotifyEventsAll)); + + if(ctor == PeerNotifyEvents::CtorPeerNotifyEventsEmpty) + result.append("PeerNotifyEventsEmpty"); + else if(ctor == PeerNotifyEvents::CtorPeerNotifyEventsAll) + result.append("PeerNotifyEventsAll"); } -void MTProtoDecompiler::decompile_BotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_PeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8329,119 +6483,56 @@ void MTProtoDecompiler::decompile_BotInlineMessage(MTProtoDecompiler* thethis, Q } - Q_ASSERT((ctor == BotInlineMessage::CtorBotInlineMessageMediaAuto) || - (ctor == BotInlineMessage::CtorBotInlineMessageText) || - (ctor == BotInlineMessage::CtorBotInlineMessageMediaGeo) || - (ctor == BotInlineMessage::CtorBotInlineMessageMediaVenue) || - (ctor == BotInlineMessage::CtorBotInlineMessageMediaContact)); + Q_ASSERT((ctor == PeerNotifySettings::CtorPeerNotifySettingsEmpty) || + (ctor == PeerNotifySettings::CtorPeerNotifySettings)); - if(ctor == BotInlineMessage::CtorBotInlineMessageMediaAuto) + if(ctor == PeerNotifySettings::CtorPeerNotifySettingsEmpty) + result.append("PeerNotifySettingsEmpty"); + else if(ctor == PeerNotifySettings::CtorPeerNotifySettings) { - result.append("BotInlineMessageMediaAuto#"); + result.append("PeerNotifySettings#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - TLString caption = mtstream.readTLString(); - result.append("caption:" + thethis->printableString(caption)); + result.append("is_show_previews:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } - } - else if(ctor == BotInlineMessage::CtorBotInlineMessageText) - { - result.append("BotInlineMessageText#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 0)); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 1)); result.append(", "); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); + TLInt mute_until = mtstream.readTLInt(); + result.append("mute_until:" + QString::number(mute_until, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } - } - else if(ctor == BotInlineMessage::CtorBotInlineMessageMediaGeo) - { - result.append("BotInlineMessageMediaGeo#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("geo:"); - MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } + TLString sound = mtstream.readTLString(); + result.append("sound:" + thethis->printableString(sound)); } - else if(ctor == BotInlineMessage::CtorBotInlineMessageMediaVenue) +} + +void MTProtoDecompiler::decompile_PeerSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) { - result.append("BotInlineMessageMediaVenue#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("geo:"); - MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString address = mtstream.readTLString(); - result.append("address:" + thethis->printableString(address)); - result.append(", "); - TLString provider = mtstream.readTLString(); - result.append("provider:" + thethis->printableString(provider)); - result.append(", "); - TLString venue_id = mtstream.readTLString(); - result.append("venue_id:" + thethis->printableString(venue_id)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } + result.append("Null"); + return; } - else if(ctor == BotInlineMessage::CtorBotInlineMessageMediaContact) + + + Q_ASSERT((ctor == PeerSettings::CtorPeerSettings)); + + if(ctor == PeerSettings::CtorPeerSettings) { - result.append("BotInlineMessageMediaContact#"); + result.append("PeerSettings#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) - { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); - } + result.append("is_report_spam:" + BIT_FIELD_VALUE(flags, 0)); } } -void MTProtoDecompiler::decompile_BotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_WallPaper(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8453,120 +6544,42 @@ void MTProtoDecompiler::decompile_BotInlineResult(MTProtoDecompiler* thethis, QS } - Q_ASSERT((ctor == BotInlineResult::CtorBotInlineResult) || - (ctor == BotInlineResult::CtorBotInlineMediaResult)); + Q_ASSERT((ctor == WallPaper::CtorWallPaper) || + (ctor == WallPaper::CtorWallPaperSolid)); - if(ctor == BotInlineResult::CtorBotInlineResult) + if(ctor == WallPaper::CtorWallPaper) { - result.append("BotInlineResult#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); + result.append("WallPaper#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 4)) - { - TLString thumb_url = mtstream.readTLString(); - result.append("thumb_url:" + thethis->printableString(thumb_url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - TLString content_url = mtstream.readTLString(); - result.append("content_url:" + thethis->printableString(content_url)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 5)) - { - TLString content_type = mtstream.readTLString(); - result.append("content_type:" + thethis->printableString(content_type)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 6)) - { - TLInt w = mtstream.readTLInt(); - result.append("w:" + QString::number(w, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 6)) - { - TLInt h = mtstream.readTLInt(); - result.append("h:" + QString::number(h, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 7)) - { - TLInt duration = mtstream.readTLInt(); - result.append("duration:" + QString::number(duration, 16)); - result.append(", "); - } - result.append("send_message:"); - MTProtoDecompiler::decompile_BotInlineMessage(thethis, result, mtstream); + result.append("sizes:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLInt color = mtstream.readTLInt(); + result.append("color:" + QString::number(color, 16)); } - else if(ctor == BotInlineResult::CtorBotInlineMediaResult) + else if(ctor == WallPaper::CtorWallPaperSolid) { - result.append("BotInlineMediaResult#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); + result.append("WallPaperSolid#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLString type = mtstream.readTLString(); - result.append("type:" + thethis->printableString(type)); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 1)) - { - result.append("document:"); - MTProtoDecompiler::decompile_Document(thethis, result, mtstream); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 3)) - { - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); - result.append(", "); - } - result.append("send_message:"); - MTProtoDecompiler::decompile_BotInlineMessage(thethis, result, mtstream); + TLInt bg_color = mtstream.readTLInt(); + result.append("bg_color:" + QString::number(bg_color, 16)); + result.append(", "); + TLInt color = mtstream.readTLInt(); + result.append("color:" + QString::number(color, 16)); } } -void MTProtoDecompiler::decompile_MessagesBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ReportReason(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8578,37 +6591,74 @@ void MTProtoDecompiler::decompile_MessagesBotResults(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == MessagesBotResults::CtorMessagesBotResults)); + Q_ASSERT((ctor == ReportReason::CtorInputReportReasonSpam) || + (ctor == ReportReason::CtorInputReportReasonViolence) || + (ctor == ReportReason::CtorInputReportReasonPornography) || + (ctor == ReportReason::CtorInputReportReasonOther)); - if(ctor == MessagesBotResults::CtorMessagesBotResults) + if(ctor == ReportReason::CtorInputReportReasonSpam) + result.append("InputReportReasonSpam"); + else if(ctor == ReportReason::CtorInputReportReasonViolence) + result.append("InputReportReasonViolence"); + else if(ctor == ReportReason::CtorInputReportReasonPornography) + result.append("InputReportReasonPornography"); + else if(ctor == ReportReason::CtorInputReportReasonOther) { - result.append("MessagesBotResults#"); + result.append("InputReportReasonOther#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } +} + +void MTProtoDecompiler::decompile_UserFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == UserFull::CtorUserFull)); + + if(ctor == UserFull::CtorUserFull) + { + result.append("UserFull#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - result.append("is_gallery:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); + result.append("is_blocked:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); + result.append("user:"); + MTProtoDecompiler::decompile_User(thethis, result, mtstream); if(IS_FLAG_SET(flags, 1)) { - TLString next_offset = mtstream.readTLString(); - result.append("next_offset:" + thethis->printableString(next_offset)); + TLString about = mtstream.readTLString(); + result.append("about:" + thethis->printableString(about)); result.append(", "); } + result.append("link:"); + MTProtoDecompiler::decompile_ContactsLink(thethis, result, mtstream); if(IS_FLAG_SET(flags, 2)) { - result.append("switch_pm:"); - MTProtoDecompiler::decompile_InlineBotSwitchPM(thethis, result, mtstream); + result.append("profile_photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + } + result.append("notify_settings:"); + MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 3)) + { + result.append("bot_info:"); + MTProtoDecompiler::decompile_BotInfo(thethis, result, mtstream); } - result.append("results:"); - thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_ExportedMessageLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Contact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8620,17 +6670,20 @@ void MTProtoDecompiler::decompile_ExportedMessageLink(MTProtoDecompiler* thethis } - Q_ASSERT((ctor == ExportedMessageLink::CtorExportedMessageLink)); + Q_ASSERT((ctor == Contact::CtorContact)); - if(ctor == ExportedMessageLink::CtorExportedMessageLink) + if(ctor == Contact::CtorContact) { - result.append("ExportedMessageLink#"); - TLString link = mtstream.readTLString(); - result.append("link:" + thethis->printableString(link)); + result.append("Contact#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLBool is_mutual = mtstream.readTLBool(); + result.append("is_mutual:" + QString::number(is_mutual, 16)); } } -void MTProtoDecompiler::decompile_MessageFwdHeader(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ImportedContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8642,39 +6695,20 @@ void MTProtoDecompiler::decompile_MessageFwdHeader(MTProtoDecompiler* thethis, Q } - Q_ASSERT((ctor == MessageFwdHeader::CtorMessageFwdHeader)); + Q_ASSERT((ctor == ImportedContact::CtorImportedContact)); - if(ctor == MessageFwdHeader::CtorMessageFwdHeader) - { - result.append("MessageFwdHeader#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - if(IS_FLAG_SET(flags, 0)) - { - TLInt from_id = mtstream.readTLInt(); - result.append("from_id:" + QString::number(from_id, 16)); - result.append(", "); - } - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 1)) - { - TLInt channel_id = mtstream.readTLInt(); - result.append("channel_id:" + QString::number(channel_id, 16)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLInt channel_post = mtstream.readTLInt(); - result.append("channel_post:" + QString::number(channel_post, 16)); - } + if(ctor == ImportedContact::CtorImportedContact) + { + result.append("ImportedContact#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLLong client_id = mtstream.readTLLong(); + result.append("client_id:" + QString::number(client_id, 16)); } } -void MTProtoDecompiler::decompile_AuthCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8686,19 +6720,20 @@ void MTProtoDecompiler::decompile_AuthCodeType(MTProtoDecompiler* thethis, QStri } - Q_ASSERT((ctor == AuthCodeType::CtorAuthCodeTypeSms) || - (ctor == AuthCodeType::CtorAuthCodeTypeCall) || - (ctor == AuthCodeType::CtorAuthCodeTypeFlashCall)); + Q_ASSERT((ctor == ContactBlocked::CtorContactBlocked)); - if(ctor == AuthCodeType::CtorAuthCodeTypeSms) - result.append("AuthCodeTypeSms"); - else if(ctor == AuthCodeType::CtorAuthCodeTypeCall) - result.append("AuthCodeTypeCall"); - else if(ctor == AuthCodeType::CtorAuthCodeTypeFlashCall) - result.append("AuthCodeTypeFlashCall"); + if(ctor == ContactBlocked::CtorContactBlocked) + { + result.append("ContactBlocked#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + } } -void MTProtoDecompiler::decompile_AuthSentCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8710,38 +6745,20 @@ void MTProtoDecompiler::decompile_AuthSentCodeType(MTProtoDecompiler* thethis, Q } - Q_ASSERT((ctor == AuthSentCodeType::CtorAuthSentCodeTypeApp) || - (ctor == AuthSentCodeType::CtorAuthSentCodeTypeSms) || - (ctor == AuthSentCodeType::CtorAuthSentCodeTypeCall) || - (ctor == AuthSentCodeType::CtorAuthSentCodeTypeFlashCall)); + Q_ASSERT((ctor == ContactStatus::CtorContactStatus)); - if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeApp) - { - result.append("AuthSentCodeTypeApp#"); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); - } - else if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeSms) - { - result.append("AuthSentCodeTypeSms#"); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); - } - else if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeCall) - { - result.append("AuthSentCodeTypeCall#"); - TLInt length = mtstream.readTLInt(); - result.append("length:" + QString::number(length, 16)); - } - else if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeFlashCall) + if(ctor == ContactStatus::CtorContactStatus) { - result.append("AuthSentCodeTypeFlashCall#"); - TLString pattern = mtstream.readTLString(); - result.append("pattern:" + thethis->printableString(pattern)); + result.append("ContactStatus#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("status:"); + MTProtoDecompiler::decompile_UserStatus(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_MessagesBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8753,34 +6770,21 @@ void MTProtoDecompiler::decompile_MessagesBotCallbackAnswer(MTProtoDecompiler* t } - Q_ASSERT((ctor == MessagesBotCallbackAnswer::CtorMessagesBotCallbackAnswer)); + Q_ASSERT((ctor == ContactsLink::CtorContactsLink)); - if(ctor == MessagesBotCallbackAnswer::CtorMessagesBotCallbackAnswer) + if(ctor == ContactsLink::CtorContactsLink) { - result.append("MessagesBotCallbackAnswer#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_alert:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("has_url:" + BIT_FIELD_VALUE(flags, 3)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - } + result.append("ContactsLink#"); + result.append("my_link:"); + MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); + result.append("foreign_link:"); + MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); + result.append("user:"); + MTProtoDecompiler::decompile_User(thethis, result, mtstream); } } -void MTProtoDecompiler::decompile_MessagesMessageEditData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8792,20 +6796,23 @@ void MTProtoDecompiler::decompile_MessagesMessageEditData(MTProtoDecompiler* the } - Q_ASSERT((ctor == MessagesMessageEditData::CtorMessagesMessageEditData)); + Q_ASSERT((ctor == ContactsContacts::CtorContactsContactsNotModified) || + (ctor == ContactsContacts::CtorContactsContacts)); - if(ctor == MessagesMessageEditData::CtorMessagesMessageEditData) + if(ctor == ContactsContacts::CtorContactsContactsNotModified) + result.append("ContactsContactsNotModified"); + else if(ctor == ContactsContacts::CtorContactsContacts) { - result.append("MessagesMessageEditData#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_caption:" + BIT_FIELD_VALUE(flags, 0)); + result.append("ContactsContacts#"); + result.append("contacts:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_InputBotInlineMessageID(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsImportedContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8817,23 +6824,23 @@ void MTProtoDecompiler::decompile_InputBotInlineMessageID(MTProtoDecompiler* the } - Q_ASSERT((ctor == InputBotInlineMessageID::CtorInputBotInlineMessageID)); + Q_ASSERT((ctor == ContactsImportedContacts::CtorContactsImportedContacts)); - if(ctor == InputBotInlineMessageID::CtorInputBotInlineMessageID) + if(ctor == ContactsImportedContacts::CtorContactsImportedContacts) { - result.append("InputBotInlineMessageID#"); - TLInt dc_id = mtstream.readTLInt(); - result.append("dc_id:" + QString::number(dc_id, 16)); + result.append("ContactsImportedContacts#"); + result.append("imported:"); + thethis->decompileTLVectorEx(result, mtstream, false); result.append(", "); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); + result.append("retry_contacts:"); + thethis->decompileTLVector(result, mtstream, false); result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_InlineBotSwitchPM(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8845,20 +6852,33 @@ void MTProtoDecompiler::decompile_InlineBotSwitchPM(MTProtoDecompiler* thethis, } - Q_ASSERT((ctor == InlineBotSwitchPM::CtorInlineBotSwitchPM)); + Q_ASSERT((ctor == ContactsBlocked::CtorContactsBlocked) || + (ctor == ContactsBlocked::CtorContactsBlockedSlice)); - if(ctor == InlineBotSwitchPM::CtorInlineBotSwitchPM) + if(ctor == ContactsBlocked::CtorContactsBlocked) { - result.append("InlineBotSwitchPM#"); - TLString text = mtstream.readTLString(); - result.append("text:" + thethis->printableString(text)); + result.append("ContactsBlocked#"); + result.append("blocked:"); + thethis->decompileTLVectorEx(result, mtstream, false); result.append(", "); - TLString start_param = mtstream.readTLString(); - result.append("start_param:" + thethis->printableString(start_param)); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == ContactsBlocked::CtorContactsBlockedSlice) + { + result.append("ContactsBlockedSlice#"); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); + result.append(", "); + result.append("blocked:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_MessagesPeerDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8870,11 +6890,12 @@ void MTProtoDecompiler::decompile_MessagesPeerDialogs(MTProtoDecompiler* thethis } - Q_ASSERT((ctor == MessagesPeerDialogs::CtorMessagesPeerDialogs)); + Q_ASSERT((ctor == MessagesDialogs::CtorMessagesDialogs) || + (ctor == MessagesDialogs::CtorMessagesDialogsSlice)); - if(ctor == MessagesPeerDialogs::CtorMessagesPeerDialogs) + if(ctor == MessagesDialogs::CtorMessagesDialogs) { - result.append("MessagesPeerDialogs#"); + result.append("MessagesDialogs#"); result.append("dialogs:"); thethis->decompileTLVectorEx(result, mtstream, false); result.append(", "); @@ -8886,13 +6907,28 @@ void MTProtoDecompiler::decompile_MessagesPeerDialogs(MTProtoDecompiler* thethis result.append(", "); result.append("users:"); thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == MessagesDialogs::CtorMessagesDialogsSlice) + { + result.append("MessagesDialogsSlice#"); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); result.append(", "); - result.append("state:"); - MTProtoDecompiler::decompile_UpdatesState(thethis, result, mtstream); + result.append("dialogs:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_TopPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8904,19 +6940,62 @@ void MTProtoDecompiler::decompile_TopPeer(MTProtoDecompiler* thethis, QString& r } - Q_ASSERT((ctor == TopPeer::CtorTopPeer)); + Q_ASSERT((ctor == MessagesMessages::CtorMessagesMessages) || + (ctor == MessagesMessages::CtorMessagesMessagesSlice) || + (ctor == MessagesMessages::CtorMessagesChannelMessages)); - if(ctor == TopPeer::CtorTopPeer) + if(ctor == MessagesMessages::CtorMessagesMessages) { - result.append("TopPeer#"); - result.append("peer:"); - MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); - TLDouble rating = mtstream.readTLDouble(); - result.append("rating:" + QString::number(rating)); + result.append("MessagesMessages#"); + result.append("messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == MessagesMessages::CtorMessagesMessagesSlice) + { + result.append("MessagesMessagesSlice#"); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); + result.append(", "); + result.append("messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == MessagesMessages::CtorMessagesChannelMessages) + { + result.append("MessagesChannelMessages#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); + result.append(", "); + result.append("messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_TopPeerCategory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesChats(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8928,25 +7007,17 @@ void MTProtoDecompiler::decompile_TopPeerCategory(MTProtoDecompiler* thethis, QS } - Q_ASSERT((ctor == TopPeerCategory::CtorTopPeerCategoryBotsPM) || - (ctor == TopPeerCategory::CtorTopPeerCategoryBotsInline) || - (ctor == TopPeerCategory::CtorTopPeerCategoryCorrespondents) || - (ctor == TopPeerCategory::CtorTopPeerCategoryGroups) || - (ctor == TopPeerCategory::CtorTopPeerCategoryChannels)); + Q_ASSERT((ctor == MessagesChats::CtorMessagesChats)); - if(ctor == TopPeerCategory::CtorTopPeerCategoryBotsPM) - result.append("TopPeerCategoryBotsPM"); - else if(ctor == TopPeerCategory::CtorTopPeerCategoryBotsInline) - result.append("TopPeerCategoryBotsInline"); - else if(ctor == TopPeerCategory::CtorTopPeerCategoryCorrespondents) - result.append("TopPeerCategoryCorrespondents"); - else if(ctor == TopPeerCategory::CtorTopPeerCategoryGroups) - result.append("TopPeerCategoryGroups"); - else if(ctor == TopPeerCategory::CtorTopPeerCategoryChannels) - result.append("TopPeerCategoryChannels"); + if(ctor == MessagesChats::CtorMessagesChats) + { + result.append("MessagesChats#"); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_TopPeerCategoryPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8958,22 +7029,22 @@ void MTProtoDecompiler::decompile_TopPeerCategoryPeers(MTProtoDecompiler* thethi } - Q_ASSERT((ctor == TopPeerCategoryPeers::CtorTopPeerCategoryPeers)); + Q_ASSERT((ctor == MessagesChatFull::CtorMessagesChatFull)); - if(ctor == TopPeerCategoryPeers::CtorTopPeerCategoryPeers) + if(ctor == MessagesChatFull::CtorMessagesChatFull) { - result.append("TopPeerCategoryPeers#"); - result.append("category:"); - MTProtoDecompiler::decompile_TopPeerCategory(thethis, result, mtstream); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); + result.append("MessagesChatFull#"); + result.append("full_chat:"); + MTProtoDecompiler::decompile_ChatFull(thethis, result, mtstream); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); result.append(", "); - result.append("peers:"); + result.append("users:"); thethis->decompileTLVectorEx(result, mtstream, false); } } -void MTProtoDecompiler::decompile_ContactsTopPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesAffectedHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -8985,26 +7056,23 @@ void MTProtoDecompiler::decompile_ContactsTopPeers(MTProtoDecompiler* thethis, Q } - Q_ASSERT((ctor == ContactsTopPeers::CtorContactsTopPeersNotModified) || - (ctor == ContactsTopPeers::CtorContactsTopPeers)); + Q_ASSERT((ctor == MessagesAffectedHistory::CtorMessagesAffectedHistory)); - if(ctor == ContactsTopPeers::CtorContactsTopPeersNotModified) - result.append("ContactsTopPeersNotModified"); - else if(ctor == ContactsTopPeers::CtorContactsTopPeers) + if(ctor == MessagesAffectedHistory::CtorMessagesAffectedHistory) { - result.append("ContactsTopPeers#"); - result.append("categories:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("MessagesAffectedHistory#"); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); result.append(", "); - result.append("chats:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); } } -void MTProtoDecompiler::decompile_DraftMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); @@ -9016,3212 +7084,5288 @@ void MTProtoDecompiler::decompile_DraftMessage(MTProtoDecompiler* thethis, QStri } - Q_ASSERT((ctor == DraftMessage::CtorDraftMessageEmpty) || - (ctor == DraftMessage::CtorDraftMessage)); + Q_ASSERT((ctor == MessagesFilter::CtorInputMessagesFilterEmpty) || + (ctor == MessagesFilter::CtorInputMessagesFilterPhotos) || + (ctor == MessagesFilter::CtorInputMessagesFilterVideo) || + (ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideo) || + (ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideoDocuments) || + (ctor == MessagesFilter::CtorInputMessagesFilterDocument) || + (ctor == MessagesFilter::CtorInputMessagesFilterUrl) || + (ctor == MessagesFilter::CtorInputMessagesFilterGif) || + (ctor == MessagesFilter::CtorInputMessagesFilterVoice) || + (ctor == MessagesFilter::CtorInputMessagesFilterMusic) || + (ctor == MessagesFilter::CtorInputMessagesFilterChatPhotos)); - if(ctor == DraftMessage::CtorDraftMessageEmpty) - result.append("DraftMessageEmpty"); - else if(ctor == DraftMessage::CtorDraftMessage) + if(ctor == MessagesFilter::CtorInputMessagesFilterEmpty) + result.append("InputMessagesFilterEmpty"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterPhotos) + result.append("InputMessagesFilterPhotos"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterVideo) + result.append("InputMessagesFilterVideo"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideo) + result.append("InputMessagesFilterPhotoVideo"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterPhotoVideoDocuments) + result.append("InputMessagesFilterPhotoVideoDocuments"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterDocument) + result.append("InputMessagesFilterDocument"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterUrl) + result.append("InputMessagesFilterUrl"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterGif) + result.append("InputMessagesFilterGif"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterVoice) + result.append("InputMessagesFilterVoice"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterMusic) + result.append("InputMessagesFilterMusic"); + else if(ctor == MessagesFilter::CtorInputMessagesFilterChatPhotos) + result.append("InputMessagesFilterChatPhotos"); +} + +void MTProtoDecompiler::decompile_Update(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +{ + Q_UNUSED(thethis); + TLConstructor ctor = mtstream.readTLConstructor(); + + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == Update::CtorUpdateNewMessage) || + (ctor == Update::CtorUpdateMessageID) || + (ctor == Update::CtorUpdateDeleteMessages) || + (ctor == Update::CtorUpdateUserTyping) || + (ctor == Update::CtorUpdateChatUserTyping) || + (ctor == Update::CtorUpdateChatParticipants) || + (ctor == Update::CtorUpdateUserStatus) || + (ctor == Update::CtorUpdateUserName) || + (ctor == Update::CtorUpdateUserPhoto) || + (ctor == Update::CtorUpdateContactRegistered) || + (ctor == Update::CtorUpdateContactLink) || + (ctor == Update::CtorUpdateNewAuthorization) || + (ctor == Update::CtorUpdateNewEncryptedMessage) || + (ctor == Update::CtorUpdateEncryptedChatTyping) || + (ctor == Update::CtorUpdateEncryption) || + (ctor == Update::CtorUpdateEncryptedMessagesRead) || + (ctor == Update::CtorUpdateChatParticipantAdd) || + (ctor == Update::CtorUpdateChatParticipantDelete) || + (ctor == Update::CtorUpdateDcOptions) || + (ctor == Update::CtorUpdateUserBlocked) || + (ctor == Update::CtorUpdateNotifySettings) || + (ctor == Update::CtorUpdateServiceNotification) || + (ctor == Update::CtorUpdatePrivacy) || + (ctor == Update::CtorUpdateUserPhone) || + (ctor == Update::CtorUpdateReadHistoryInbox) || + (ctor == Update::CtorUpdateReadHistoryOutbox) || + (ctor == Update::CtorUpdateWebPage) || + (ctor == Update::CtorUpdateReadMessagesContents) || + (ctor == Update::CtorUpdateChannelTooLong) || + (ctor == Update::CtorUpdateChannel) || + (ctor == Update::CtorUpdateNewChannelMessage) || + (ctor == Update::CtorUpdateReadChannelInbox) || + (ctor == Update::CtorUpdateDeleteChannelMessages) || + (ctor == Update::CtorUpdateChannelMessageViews) || + (ctor == Update::CtorUpdateChatAdmins) || + (ctor == Update::CtorUpdateChatParticipantAdmin) || + (ctor == Update::CtorUpdateNewStickerSet) || + (ctor == Update::CtorUpdateStickerSetsOrder) || + (ctor == Update::CtorUpdateStickerSets) || + (ctor == Update::CtorUpdateSavedGifs) || + (ctor == Update::CtorUpdateBotInlineQuery) || + (ctor == Update::CtorUpdateBotInlineSend) || + (ctor == Update::CtorUpdateEditChannelMessage) || + (ctor == Update::CtorUpdateChannelPinnedMessage) || + (ctor == Update::CtorUpdateBotCallbackQuery) || + (ctor == Update::CtorUpdateEditMessage) || + (ctor == Update::CtorUpdateInlineBotCallbackQuery) || + (ctor == Update::CtorUpdateReadChannelOutbox) || + (ctor == Update::CtorUpdateDraftMessage) || + (ctor == Update::CtorUpdateReadFeaturedStickers) || + (ctor == Update::CtorUpdateRecentStickers) || + (ctor == Update::CtorUpdateConfig) || + (ctor == Update::CtorUpdatePtsChanged)); + + if(ctor == Update::CtorUpdateNewMessage) + { + result.append("UpdateNewMessage#"); + result.append("message_updatenewmessage:"); + MTProtoDecompiler::decompile_Message(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + } + else if(ctor == Update::CtorUpdateMessageID) + { + result.append("UpdateMessageID#"); + TLInt id_updatemessageid = mtstream.readTLInt(); + result.append("id_updatemessageid:" + QString::number(id_updatemessageid, 16)); + result.append(", "); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + } + else if(ctor == Update::CtorUpdateDeleteMessages) + { + result.append("UpdateDeleteMessages#"); + result.append("messages:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + } + else if(ctor == Update::CtorUpdateUserTyping) + { + result.append("UpdateUserTyping#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("action:"); + MTProtoDecompiler::decompile_SendMessageAction(thethis, result, mtstream); + } + else if(ctor == Update::CtorUpdateChatUserTyping) + { + result.append("UpdateChatUserTyping#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("action:"); + MTProtoDecompiler::decompile_SendMessageAction(thethis, result, mtstream); + } + else if(ctor == Update::CtorUpdateChatParticipants) + { + result.append("UpdateChatParticipants#"); + result.append("participants:"); + MTProtoDecompiler::decompile_ChatParticipants(thethis, result, mtstream); + } + else if(ctor == Update::CtorUpdateUserStatus) + { + result.append("UpdateUserStatus#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("status:"); + MTProtoDecompiler::decompile_UserStatus(thethis, result, mtstream); + } + else if(ctor == Update::CtorUpdateUserName) + { + result.append("UpdateUserName#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(", "); + TLString username = mtstream.readTLString(); + result.append("username:" + thethis->printableString(username)); + } + else if(ctor == Update::CtorUpdateUserPhoto) { - result.append("DraftMessage#"); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); + result.append("UpdateUserPhoto#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); - result.append(", "); - } - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_UserProfilePhoto(thethis, result, mtstream); + TLBool is_previous = mtstream.readTLBool(); + result.append("is_previous:" + QString::number(is_previous, 16)); + } + else if(ctor == Update::CtorUpdateContactRegistered) + { + result.append("UpdateContactRegistered#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); result.append(", "); - if(IS_FLAG_SET(flags, 3)) - { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - } TLInt date = mtstream.readTLInt(); result.append("date:" + QString::number(date, 16)); } -} - -void MTProtoDecompiler::decompile_MessagesFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateContactLink) { - result.append("Null"); - return; + result.append("UpdateContactLink#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("my_link:"); + MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); + result.append("foreign_link:"); + MTProtoDecompiler::decompile_ContactLink(thethis, result, mtstream); } - - - Q_ASSERT((ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickersNotModified) || - (ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickers)); - - if(ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickersNotModified) - result.append("MessagesFeaturedStickersNotModified"); - else if(ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickers) + else if(ctor == Update::CtorUpdateNewAuthorization) { - result.append("MessagesFeaturedStickers#"); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); + result.append("UpdateNewAuthorization#"); + TLLong auth_key_id = mtstream.readTLLong(); + result.append("auth_key_id:" + QString::number(auth_key_id, 16)); result.append(", "); - result.append("sets:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); result.append(", "); - result.append("unread:"); - thethis->decompileTLVector(result, mtstream, false); + TLString device = mtstream.readTLString(); + result.append("device:" + thethis->printableString(device)); + result.append(", "); + TLString location = mtstream.readTLString(); + result.append("location:" + thethis->printableString(location)); } -} - -void MTProtoDecompiler::decompile_MessagesRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateNewEncryptedMessage) { - result.append("Null"); - return; + result.append("UpdateNewEncryptedMessage#"); + result.append("message_updatenewencryptedmessage:"); + MTProtoDecompiler::decompile_EncryptedMessage(thethis, result, mtstream); + TLInt qts = mtstream.readTLInt(); + result.append("qts:" + QString::number(qts, 16)); } - - - Q_ASSERT((ctor == MessagesRecentStickers::CtorMessagesRecentStickersNotModified) || - (ctor == MessagesRecentStickers::CtorMessagesRecentStickers)); - - if(ctor == MessagesRecentStickers::CtorMessagesRecentStickersNotModified) - result.append("MessagesRecentStickersNotModified"); - else if(ctor == MessagesRecentStickers::CtorMessagesRecentStickers) + else if(ctor == Update::CtorUpdateEncryptedChatTyping) { - result.append("MessagesRecentStickers#"); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(", "); - result.append("stickers:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("UpdateEncryptedChatTyping#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); } -} - -void MTProtoDecompiler::decompile_MessagesArchivedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateEncryption) { - result.append("Null"); - return; + result.append("UpdateEncryption#"); + result.append("chat:"); + MTProtoDecompiler::decompile_EncryptedChat(thethis, result, mtstream); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } - - - Q_ASSERT((ctor == MessagesArchivedStickers::CtorMessagesArchivedStickers)); - - if(ctor == MessagesArchivedStickers::CtorMessagesArchivedStickers) + else if(ctor == Update::CtorUpdateEncryptedMessagesRead) { - result.append("MessagesArchivedStickers#"); - TLInt count = mtstream.readTLInt(); - result.append("count:" + QString::number(count, 16)); + result.append("UpdateEncryptedMessagesRead#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); result.append(", "); - result.append("sets:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt max_date = mtstream.readTLInt(); + result.append("max_date:" + QString::number(max_date, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } -} - -void MTProtoDecompiler::decompile_MessagesStickerSetInstallResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateChatParticipantAdd) { - result.append("Null"); - return; + result.append("UpdateChatParticipantAdd#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt inviter_id = mtstream.readTLInt(); + result.append("inviter_id:" + QString::number(inviter_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); } - - - Q_ASSERT((ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultSuccess) || - (ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultArchive)); - - if(ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultSuccess) - result.append("MessagesStickerSetInstallResultSuccess"); - else if(ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultArchive) + else if(ctor == Update::CtorUpdateChatParticipantDelete) { - result.append("MessagesStickerSetInstallResultArchive#"); - result.append("sets:"); + result.append("UpdateChatParticipantDelete#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); + } + else if(ctor == Update::CtorUpdateDcOptions) + { + result.append("UpdateDcOptions#"); + result.append("dc_options:"); thethis->decompileTLVectorEx(result, mtstream, false); } -} - -void MTProtoDecompiler::decompile_StickerSetCovered(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateUserBlocked) { - result.append("Null"); - return; + result.append("UpdateUserBlocked#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLBool is_blocked = mtstream.readTLBool(); + result.append("is_blocked:" + QString::number(is_blocked, 16)); } - - - Q_ASSERT((ctor == StickerSetCovered::CtorStickerSetCovered) || - (ctor == StickerSetCovered::CtorStickerSetMultiCovered)); - - if(ctor == StickerSetCovered::CtorStickerSetCovered) + else if(ctor == Update::CtorUpdateNotifySettings) { - result.append("StickerSetCovered#"); - result.append("set:"); - MTProtoDecompiler::decompile_StickerSet(thethis, result, mtstream); - result.append("cover:"); - MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + result.append("UpdateNotifySettings#"); + result.append("peer_updatenotifysettings:"); + MTProtoDecompiler::decompile_NotifyPeer(thethis, result, mtstream); + result.append("notify_settings:"); + MTProtoDecompiler::decompile_PeerNotifySettings(thethis, result, mtstream); } - else if(ctor == StickerSetCovered::CtorStickerSetMultiCovered) + else if(ctor == Update::CtorUpdateServiceNotification) { - result.append("StickerSetMultiCovered#"); - result.append("set:"); - MTProtoDecompiler::decompile_StickerSet(thethis, result, mtstream); - result.append("covers:"); + result.append("UpdateServiceNotification#"); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + TLString message_updateservicenotification = mtstream.readTLString(); + result.append("message_updateservicenotification:" + thethis->printableString(message_updateservicenotification)); + result.append(", "); + result.append("media:"); + MTProtoDecompiler::decompile_MessageMedia(thethis, result, mtstream); + TLBool is_popup = mtstream.readTLBool(); + result.append("is_popup:" + QString::number(is_popup, 16)); + } + else if(ctor == Update::CtorUpdatePrivacy) + { + result.append("UpdatePrivacy#"); + result.append("key:"); + MTProtoDecompiler::decompile_PrivacyKey(thethis, result, mtstream); + result.append("rules:"); thethis->decompileTLVectorEx(result, mtstream, false); } -} - -void MTProtoDecompiler::decompile_MaskCoords(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateUserPhone) { - result.append("Null"); - return; + result.append("UpdateUserPhone#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLString phone = mtstream.readTLString(); + result.append("phone:" + thethis->printableString(phone)); } - - - Q_ASSERT((ctor == MaskCoords::CtorMaskCoords)); - - if(ctor == MaskCoords::CtorMaskCoords) + else if(ctor == Update::CtorUpdateReadHistoryInbox) { - result.append("MaskCoords#"); - TLInt n = mtstream.readTLInt(); - result.append("n:" + QString::number(n, 16)); - result.append(", "); - TLDouble x = mtstream.readTLDouble(); - result.append("x:" + QString::number(x)); + result.append("UpdateReadHistoryInbox#"); + result.append("peer_updatereadhistoryinbox:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); result.append(", "); - TLDouble y = mtstream.readTLDouble(); - result.append("y:" + QString::number(y)); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); result.append(", "); - TLDouble zoom = mtstream.readTLDouble(); - result.append("zoom:" + QString::number(zoom)); - } -} - -void MTProtoDecompiler::decompile_InputStickeredMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) - { - result.append("Null"); - return; + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); } - - - Q_ASSERT((ctor == InputStickeredMedia::CtorInputStickeredMediaPhoto) || - (ctor == InputStickeredMedia::CtorInputStickeredMediaDocument)); - - if(ctor == InputStickeredMedia::CtorInputStickeredMediaPhoto) + else if(ctor == Update::CtorUpdateReadHistoryOutbox) { - result.append("InputStickeredMediaPhoto#"); - result.append("id_inputstickeredmediaphoto:"); - MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); + result.append("UpdateReadHistoryOutbox#"); + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); } - else if(ctor == InputStickeredMedia::CtorInputStickeredMediaDocument) + else if(ctor == Update::CtorUpdateWebPage) { - result.append("InputStickeredMediaDocument#"); - result.append("id_inputstickeredmediadocument:"); - MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); + result.append("UpdateWebPage#"); + result.append("webpage:"); + MTProtoDecompiler::decompile_WebPage(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); } -} - -void MTProtoDecompiler::decompile_Game(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateReadMessagesContents) { - result.append("Null"); - return; + result.append("UpdateReadMessagesContents#"); + result.append("messages:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); } - - - Q_ASSERT((ctor == Game::CtorGame)); - - if(ctor == Game::CtorGame) + else if(ctor == Update::CtorUpdateChannelTooLong) { - result.append("Game#"); + result.append("UpdateChannelTooLong#"); TLInt flags = mtstream.readTLInt(); Q_UNUSED(flags); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); - result.append(", "); - TLString short_name = mtstream.readTLString(); - result.append("short_name:" + thethis->printableString(short_name)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString description = mtstream.readTLString(); - result.append("description:" + thethis->printableString(description)); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); if(IS_FLAG_SET(flags, 0)) { - result.append("document:"); - MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); } } -} - -void MTProtoDecompiler::decompile_InputGame(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateChannel) { - result.append("Null"); - return; + result.append("UpdateChannel#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); } - - - Q_ASSERT((ctor == InputGame::CtorInputGameID) || - (ctor == InputGame::CtorInputGameShortName)); - - if(ctor == InputGame::CtorInputGameID) + else if(ctor == Update::CtorUpdateNewChannelMessage) { - result.append("InputGameID#"); - TLLong id = mtstream.readTLLong(); - result.append("id:" + QString::number(id, 16)); + result.append("UpdateNewChannelMessage#"); + result.append("message_updatenewchannelmessage:"); + MTProtoDecompiler::decompile_Message(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); result.append(", "); - TLLong access_hash = mtstream.readTLLong(); - result.append("access_hash:" + QString::number(access_hash, 16)); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); } - else if(ctor == InputGame::CtorInputGameShortName) + else if(ctor == Update::CtorUpdateReadChannelInbox) { - result.append("InputGameShortName#"); - result.append("bot_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLString short_name = mtstream.readTLString(); - result.append("short_name:" + thethis->printableString(short_name)); + result.append("UpdateReadChannelInbox#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); + result.append(", "); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); } -} - -void MTProtoDecompiler::decompile_HighScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateDeleteChannelMessages) { - result.append("Null"); - return; + result.append("UpdateDeleteChannelMessages#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); + result.append(", "); + result.append("messages:"); + thethis->decompileTLVector(result, mtstream, false); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); } - - - Q_ASSERT((ctor == HighScore::CtorHighScore)); - - if(ctor == HighScore::CtorHighScore) + else if(ctor == Update::CtorUpdateChannelMessageViews) { - result.append("HighScore#"); - TLInt pos = mtstream.readTLInt(); - result.append("pos:" + QString::number(pos, 16)); + result.append("UpdateChannelMessageViews#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); result.append(", "); - TLInt user_id = mtstream.readTLInt(); - result.append("user_id:" + QString::number(user_id, 16)); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); result.append(", "); - TLInt score = mtstream.readTLInt(); - result.append("score:" + QString::number(score, 16)); + TLInt views = mtstream.readTLInt(); + result.append("views:" + QString::number(views, 16)); } -} - -void MTProtoDecompiler::decompile_MessagesHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - if(ctor == TLTypes::Null) + else if(ctor == Update::CtorUpdateChatAdmins) { - result.append("Null"); - return; + result.append("UpdateChatAdmins#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLBool is_enabled = mtstream.readTLBool(); + result.append("is_enabled:" + QString::number(is_enabled, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); } - - - Q_ASSERT((ctor == MessagesHighScores::CtorMessagesHighScores)); - - if(ctor == MessagesHighScores::CtorMessagesHighScores) + else if(ctor == Update::CtorUpdateChatParticipantAdmin) { - result.append("MessagesHighScores#"); - result.append("scores:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("UpdateChatParticipantAdmin#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); result.append(", "); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLBool is_admin = mtstream.readTLBool(); + result.append("is_admin:" + QString::number(is_admin, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); } -} - -void MTProtoDecompiler::decompile_authCheckPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authCheckPhone)); - result.append("authCheckPhone("); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authSendCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authSendCode)); - result.append("authSendCode("); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_allow_flashcall:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) + else if(ctor == Update::CtorUpdateNewStickerSet) { - TLBool is_current_number = mtstream.readTLBool(); - result.append("is_current_number:" + QString::number(is_current_number, 16)); - result.append(", "); + result.append("UpdateNewStickerSet#"); + result.append("stickerset:"); + MTProtoDecompiler::decompile_MessagesStickerSet(thethis, result, mtstream); } - TLInt api_id = mtstream.readTLInt(); - result.append("api_id:" + QString::number(api_id, 16)); - result.append(", "); - TLString api_hash = mtstream.readTLString(); - result.append("api_hash:" + thethis->printableString(api_hash)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authSignUp(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authSignUp)); - result.append("authSignUp("); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(", "); - TLString phone_code = mtstream.readTLString(); - result.append("phone_code:" + thethis->printableString(phone_code)); - result.append(", "); - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); - result.append(", "); - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authSignIn(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authSignIn)); - result.append("authSignIn("); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(", "); - TLString phone_code = mtstream.readTLString(); - result.append("phone_code:" + thethis->printableString(phone_code)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authLogOut(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authLogOut)); - result.append("authLogOut()"); -} - -void MTProtoDecompiler::decompile_authResetAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authResetAuthorizations)); - result.append("authResetAuthorizations()"); -} - -void MTProtoDecompiler::decompile_authSendInvites(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authSendInvites)); - result.append("authSendInvites("); - result.append("phone_numbers:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authExportAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authExportAuthorization)); - result.append("authExportAuthorization("); - TLInt dc_id = mtstream.readTLInt(); - result.append("dc_id:" + QString::number(dc_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authImportAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authImportAuthorization)); - result.append("authImportAuthorization("); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authBindTempAuthKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authBindTempAuthKey)); - result.append("authBindTempAuthKey("); - TLLong perm_auth_key_id = mtstream.readTLLong(); - result.append("perm_auth_key_id:" + QString::number(perm_auth_key_id, 16)); - result.append(", "); - TLLong nonce = mtstream.readTLLong(); - result.append("nonce:" + QString::number(nonce, 16)); - result.append(", "); - TLInt expires_at = mtstream.readTLInt(); - result.append("expires_at:" + QString::number(expires_at, 16)); - result.append(", "); - TLBytes encrypted_message = mtstream.readTLBytes(); - result.append("encrypted_message:" + thethis->printableString(encrypted_message)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authImportBotAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authImportBotAuthorization)); - result.append("authImportBotAuthorization("); - TLInt flags = mtstream.readTLInt(); - result.append("flags:" + QString::number(flags, 16)); - result.append(", "); - TLInt api_id = mtstream.readTLInt(); - result.append("api_id:" + QString::number(api_id, 16)); - result.append(", "); - TLString api_hash = mtstream.readTLString(); - result.append("api_hash:" + thethis->printableString(api_hash)); - result.append(", "); - TLString bot_auth_token = mtstream.readTLString(); - result.append("bot_auth_token:" + thethis->printableString(bot_auth_token)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authCheckPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authCheckPassword)); - result.append("authCheckPassword("); - TLBytes password_hash = mtstream.readTLBytes(); - result.append("password_hash:" + thethis->printableString(password_hash)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authRequestPasswordRecovery(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authRequestPasswordRecovery)); - result.append("authRequestPasswordRecovery()"); -} - -void MTProtoDecompiler::decompile_authRecoverPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authRecoverPassword)); - result.append("authRecoverPassword("); - TLString code = mtstream.readTLString(); - result.append("code:" + thethis->printableString(code)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authResendCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::authResendCode)); - result.append("authResendCode("); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(")"); + else if(ctor == Update::CtorUpdateStickerSetsOrder) + { + result.append("UpdateStickerSetsOrder#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_masks:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("order:"); + thethis->decompileTLVector(result, mtstream, false); + } + else if(ctor == Update::CtorUpdateStickerSets) + result.append("UpdateStickerSets"); + else if(ctor == Update::CtorUpdateSavedGifs) + result.append("UpdateSavedGifs"); + else if(ctor == Update::CtorUpdateBotInlineQuery) + { + result.append("UpdateBotInlineQuery#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLString query = mtstream.readTLString(); + result.append("query:" + thethis->printableString(query)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + result.append("geo:"); + MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); + } + TLString offset = mtstream.readTLString(); + result.append("offset:" + thethis->printableString(offset)); + } + else if(ctor == Update::CtorUpdateBotInlineSend) + { + result.append("UpdateBotInlineSend#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLString query = mtstream.readTLString(); + result.append("query:" + thethis->printableString(query)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + result.append("geo:"); + MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); + } + TLString id_updatebotinlinesend = mtstream.readTLString(); + result.append("id_updatebotinlinesend:" + thethis->printableString(id_updatebotinlinesend)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + result.append("msg_id_updatebotinlinesend:"); + MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); + } + } + else if(ctor == Update::CtorUpdateEditChannelMessage) + { + result.append("UpdateEditChannelMessage#"); + result.append("message:"); + MTProtoDecompiler::decompile_Message(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + } + else if(ctor == Update::CtorUpdateChannelPinnedMessage) + { + result.append("UpdateChannelPinnedMessage#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); + result.append(", "); + TLInt id_updatechannelpinnedmessage = mtstream.readTLInt(); + result.append("id_updatechannelpinnedmessage:" + QString::number(id_updatechannelpinnedmessage, 16)); + } + else if(ctor == Update::CtorUpdateBotCallbackQuery) + { + result.append("UpdateBotCallbackQuery#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + TLInt msg_id_updatebotcallbackquery = mtstream.readTLInt(); + result.append("msg_id_updatebotcallbackquery:" + QString::number(msg_id_updatebotcallbackquery, 16)); + result.append(", "); + TLLong chat_instance = mtstream.readTLLong(); + result.append("chat_instance:" + QString::number(chat_instance, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLString game_short_name = mtstream.readTLString(); + result.append("game_short_name:" + thethis->printableString(game_short_name)); + } + } + else if(ctor == Update::CtorUpdateEditMessage) + { + result.append("UpdateEditMessage#"); + result.append("message:"); + MTProtoDecompiler::decompile_Message(thethis, result, mtstream); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + } + else if(ctor == Update::CtorUpdateInlineBotCallbackQuery) + { + result.append("UpdateInlineBotCallbackQuery#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + result.append("msg_id_updateinlinebotcallbackquery:"); + MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); + TLLong chat_instance = mtstream.readTLLong(); + result.append("chat_instance:" + QString::number(chat_instance, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLString game_short_name = mtstream.readTLString(); + result.append("game_short_name:" + thethis->printableString(game_short_name)); + } + } + else if(ctor == Update::CtorUpdateReadChannelOutbox) + { + result.append("UpdateReadChannelOutbox#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); + result.append(", "); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); + } + else if(ctor == Update::CtorUpdateDraftMessage) + { + result.append("UpdateDraftMessage#"); + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + result.append("draft:"); + MTProtoDecompiler::decompile_DraftMessage(thethis, result, mtstream); + } + else if(ctor == Update::CtorUpdateReadFeaturedStickers) + result.append("UpdateReadFeaturedStickers"); + else if(ctor == Update::CtorUpdateRecentStickers) + result.append("UpdateRecentStickers"); + else if(ctor == Update::CtorUpdateConfig) + result.append("UpdateConfig"); + else if(ctor == Update::CtorUpdatePtsChanged) + result.append("UpdatePtsChanged"); } -void MTProtoDecompiler::decompile_authCancelCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_UpdatesState(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::authCancelCode)); - result.append("authCancelCode("); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_authDropTempAuthKeys(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::authDropTempAuthKeys)); - result.append("authDropTempAuthKeys("); - result.append("except_auth_keys:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountRegisterDevice(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountRegisterDevice)); - result.append("accountRegisterDevice("); - TLInt token_type = mtstream.readTLInt(); - result.append("token_type:" + QString::number(token_type, 16)); - result.append(", "); - TLString token = mtstream.readTLString(); - result.append("token:" + thethis->printableString(token)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountUnregisterDevice(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == UpdatesState::CtorUpdatesState)); - Q_ASSERT((ctor == TLTypes::accountUnregisterDevice)); - result.append("accountUnregisterDevice("); - TLInt token_type = mtstream.readTLInt(); - result.append("token_type:" + QString::number(token_type, 16)); - result.append(", "); - TLString token = mtstream.readTLString(); - result.append("token:" + thethis->printableString(token)); - result.append(")"); + if(ctor == UpdatesState::CtorUpdatesState) + { + result.append("UpdatesState#"); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt qts = mtstream.readTLInt(); + result.append("qts:" + QString::number(qts, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt seq = mtstream.readTLInt(); + result.append("seq:" + QString::number(seq, 16)); + result.append(", "); + TLInt unread_count = mtstream.readTLInt(); + result.append("unread_count:" + QString::number(unread_count, 16)); + } } -void MTProtoDecompiler::decompile_accountUpdateNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_UpdatesDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountUpdateNotifySettings)); - result.append("accountUpdateNotifySettings("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputNotifyPeer(thethis, result, mtstream); - result.append("settings:"); - MTProtoDecompiler::decompile_InputPeerNotifySettings(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == UpdatesDifference::CtorUpdatesDifferenceEmpty) || + (ctor == UpdatesDifference::CtorUpdatesDifference) || + (ctor == UpdatesDifference::CtorUpdatesDifferenceSlice)); + + if(ctor == UpdatesDifference::CtorUpdatesDifferenceEmpty) + { + result.append("UpdatesDifferenceEmpty#"); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt seq = mtstream.readTLInt(); + result.append("seq:" + QString::number(seq, 16)); + } + else if(ctor == UpdatesDifference::CtorUpdatesDifference) + { + result.append("UpdatesDifference#"); + result.append("new_messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("new_encrypted_messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("other_updates:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("state:"); + MTProtoDecompiler::decompile_UpdatesState(thethis, result, mtstream); + } + else if(ctor == UpdatesDifference::CtorUpdatesDifferenceSlice) + { + result.append("UpdatesDifferenceSlice#"); + result.append("new_messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("new_encrypted_messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("other_updates:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("intermediate_state:"); + MTProtoDecompiler::decompile_UpdatesState(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_accountGetNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Updates(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountGetNotifySettings)); - result.append("accountGetNotifySettings("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputNotifyPeer(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == Updates::CtorUpdatesTooLong) || + (ctor == Updates::CtorUpdateShortMessage) || + (ctor == Updates::CtorUpdateShortChatMessage) || + (ctor == Updates::CtorUpdateShort) || + (ctor == Updates::CtorUpdatesCombined) || + (ctor == Updates::CtorUpdates) || + (ctor == Updates::CtorUpdateShortSentMessage)); + + if(ctor == Updates::CtorUpdatesTooLong) + result.append("UpdatesTooLong"); + else if(ctor == Updates::CtorUpdateShortMessage) + { + result.append("UpdateShortMessage#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); + result.append(", "); + result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("fwd_from:"); + MTProtoDecompiler::decompile_MessageFwdHeader(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 11)) + { + TLInt via_bot_id = mtstream.readTLInt(); + result.append("via_bot_id:" + QString::number(via_bot_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 7)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + } + else if(ctor == Updates::CtorUpdateShortChatMessage) + { + result.append("UpdateShortChatMessage#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_mentioned:" + BIT_FIELD_VALUE(flags, 4)); + result.append(", "); + result.append("is_media_unread:" + BIT_FIELD_VALUE(flags, 5)); + result.append(", "); + result.append("is_silent:" + BIT_FIELD_VALUE(flags, 13)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt from_id = mtstream.readTLInt(); + result.append("from_id:" + QString::number(from_id, 16)); + result.append(", "); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("fwd_from:"); + MTProtoDecompiler::decompile_MessageFwdHeader(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 11)) + { + TLInt via_bot_id = mtstream.readTLInt(); + result.append("via_bot_id:" + QString::number(via_bot_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 7)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + } + else if(ctor == Updates::CtorUpdateShort) + { + result.append("UpdateShort#"); + result.append("update:"); + MTProtoDecompiler::decompile_Update(thethis, result, mtstream); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + } + else if(ctor == Updates::CtorUpdatesCombined) + { + result.append("UpdatesCombined#"); + result.append("updates:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt seq_start = mtstream.readTLInt(); + result.append("seq_start:" + QString::number(seq_start, 16)); + result.append(", "); + TLInt seq = mtstream.readTLInt(); + result.append("seq:" + QString::number(seq, 16)); + } + else if(ctor == Updates::CtorUpdates) + { + result.append("Updates#"); + result.append("updates:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt seq = mtstream.readTLInt(); + result.append("seq:" + QString::number(seq, 16)); + } + else if(ctor == Updates::CtorUpdateShortSentMessage) + { + result.append("UpdateShortSentMessage#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_out:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 9)) + { + result.append("media:"); + MTProtoDecompiler::decompile_MessageMedia(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 7)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + } } -void MTProtoDecompiler::decompile_accountResetNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_PhotosPhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountResetNotifySettings)); - result.append("accountResetNotifySettings()"); -} - -void MTProtoDecompiler::decompile_accountUpdateProfile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::accountUpdateProfile)); - result.append("accountUpdateProfile("); - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); + Q_ASSERT((ctor == PhotosPhotos::CtorPhotosPhotos) || + (ctor == PhotosPhotos::CtorPhotosPhotosSlice)); - if(IS_FLAG_SET(flags, 0)) + if(ctor == PhotosPhotos::CtorPhotosPhotos) { - TLString first_name = mtstream.readTLString(); - result.append("first_name:" + thethis->printableString(first_name)); + result.append("PhotosPhotos#"); + result.append("photos:"); + thethis->decompileTLVectorEx(result, mtstream, false); result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } - if(IS_FLAG_SET(flags, 1)) + else if(ctor == PhotosPhotos::CtorPhotosPhotosSlice) { - TLString last_name = mtstream.readTLString(); - result.append("last_name:" + thethis->printableString(last_name)); + result.append("PhotosPhotosSlice#"); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); result.append(", "); + result.append("photos:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } - if(IS_FLAG_SET(flags, 2)) - { - TLString about = mtstream.readTLString(); - result.append("about:" + thethis->printableString(about)); - } - result.append(")"); } -void MTProtoDecompiler::decompile_accountUpdateStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_PhotosPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountUpdateStatus)); - result.append("accountUpdateStatus("); - TLBool is_offline = mtstream.readTLBool(); - result.append("is_offline:" + QString::number(is_offline, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == PhotosPhoto::CtorPhotosPhoto)); + + if(ctor == PhotosPhoto::CtorPhotosPhoto) + { + result.append("PhotosPhoto#"); + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_accountGetWallPapers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_UploadFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountGetWallPapers)); - result.append("accountGetWallPapers()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == UploadFile::CtorUploadFile)); + + if(ctor == UploadFile::CtorUploadFile) + { + result.append("UploadFile#"); + result.append("type:"); + MTProtoDecompiler::decompile_StorageFileType(thethis, result, mtstream); + TLInt mtime = mtstream.readTLInt(); + result.append("mtime:" + QString::number(mtime, 16)); + result.append(", "); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); + } } -void MTProtoDecompiler::decompile_accountReportPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_DcOption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountReportPeer)); - result.append("accountReportPeer("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append("reason:"); - MTProtoDecompiler::decompile_ReportReason(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == DcOption::CtorDcOption)); + + if(ctor == DcOption::CtorDcOption) + { + result.append("DcOption#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_ipv6:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_media_only:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_tcpo_only:" + BIT_FIELD_VALUE(flags, 2)); + result.append(", "); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLString ip_address = mtstream.readTLString(); + result.append("ip_address:" + thethis->printableString(ip_address)); + result.append(", "); + TLInt port = mtstream.readTLInt(); + result.append("port:" + QString::number(port, 16)); + } } -void MTProtoDecompiler::decompile_accountCheckUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Config(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountCheckUsername)); - result.append("accountCheckUsername("); - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == Config::CtorConfig)); + + if(ctor == Config::CtorConfig) + { + result.append("Config#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt expires = mtstream.readTLInt(); + result.append("expires:" + QString::number(expires, 16)); + result.append(", "); + TLBool is_test_mode = mtstream.readTLBool(); + result.append("is_test_mode:" + QString::number(is_test_mode, 16)); + result.append(", "); + TLInt this_dc = mtstream.readTLInt(); + result.append("this_dc:" + QString::number(this_dc, 16)); + result.append(", "); + result.append("dc_options:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + TLInt chat_size_max = mtstream.readTLInt(); + result.append("chat_size_max:" + QString::number(chat_size_max, 16)); + result.append(", "); + TLInt megagroup_size_max = mtstream.readTLInt(); + result.append("megagroup_size_max:" + QString::number(megagroup_size_max, 16)); + result.append(", "); + TLInt forwarded_count_max = mtstream.readTLInt(); + result.append("forwarded_count_max:" + QString::number(forwarded_count_max, 16)); + result.append(", "); + TLInt online_update_period_ms = mtstream.readTLInt(); + result.append("online_update_period_ms:" + QString::number(online_update_period_ms, 16)); + result.append(", "); + TLInt offline_blur_timeout_ms = mtstream.readTLInt(); + result.append("offline_blur_timeout_ms:" + QString::number(offline_blur_timeout_ms, 16)); + result.append(", "); + TLInt offline_idle_timeout_ms = mtstream.readTLInt(); + result.append("offline_idle_timeout_ms:" + QString::number(offline_idle_timeout_ms, 16)); + result.append(", "); + TLInt online_cloud_timeout_ms = mtstream.readTLInt(); + result.append("online_cloud_timeout_ms:" + QString::number(online_cloud_timeout_ms, 16)); + result.append(", "); + TLInt notify_cloud_delay_ms = mtstream.readTLInt(); + result.append("notify_cloud_delay_ms:" + QString::number(notify_cloud_delay_ms, 16)); + result.append(", "); + TLInt notify_default_delay_ms = mtstream.readTLInt(); + result.append("notify_default_delay_ms:" + QString::number(notify_default_delay_ms, 16)); + result.append(", "); + TLInt chat_big_size = mtstream.readTLInt(); + result.append("chat_big_size:" + QString::number(chat_big_size, 16)); + result.append(", "); + TLInt push_chat_period_ms = mtstream.readTLInt(); + result.append("push_chat_period_ms:" + QString::number(push_chat_period_ms, 16)); + result.append(", "); + TLInt push_chat_limit = mtstream.readTLInt(); + result.append("push_chat_limit:" + QString::number(push_chat_limit, 16)); + result.append(", "); + TLInt saved_gifs_limit = mtstream.readTLInt(); + result.append("saved_gifs_limit:" + QString::number(saved_gifs_limit, 16)); + result.append(", "); + TLInt edit_time_limit = mtstream.readTLInt(); + result.append("edit_time_limit:" + QString::number(edit_time_limit, 16)); + result.append(", "); + TLInt rating_e_decay = mtstream.readTLInt(); + result.append("rating_e_decay:" + QString::number(rating_e_decay, 16)); + result.append(", "); + TLInt stickers_recent_limit = mtstream.readTLInt(); + result.append("stickers_recent_limit:" + QString::number(stickers_recent_limit, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLInt tmp_sessions = mtstream.readTLInt(); + result.append("tmp_sessions:" + QString::number(tmp_sessions, 16)); + result.append(", "); + } + result.append("disabled_features:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_accountUpdateUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_NearestDc(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountUpdateUsername)); - result.append("accountUpdateUsername("); - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountGetPrivacy(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::accountGetPrivacy)); - result.append("accountGetPrivacy("); - result.append("key:"); - MTProtoDecompiler::decompile_InputPrivacyKey(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountSetPrivacy(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountSetPrivacy)); - result.append("accountSetPrivacy("); - result.append("key:"); - MTProtoDecompiler::decompile_InputPrivacyKey(thethis, result, mtstream); - result.append("rules:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountDeleteAccount(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == NearestDc::CtorNearestDc)); - Q_ASSERT((ctor == TLTypes::accountDeleteAccount)); - result.append("accountDeleteAccount("); - TLString reason = mtstream.readTLString(); - result.append("reason:" + thethis->printableString(reason)); - result.append(")"); + if(ctor == NearestDc::CtorNearestDc) + { + result.append("NearestDc#"); + TLString country = mtstream.readTLString(); + result.append("country:" + thethis->printableString(country)); + result.append(", "); + TLInt this_dc = mtstream.readTLInt(); + result.append("this_dc:" + QString::number(this_dc, 16)); + result.append(", "); + TLInt nearest_dc = mtstream.readTLInt(); + result.append("nearest_dc:" + QString::number(nearest_dc, 16)); + } } -void MTProtoDecompiler::decompile_accountGetAccountTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_HelpAppUpdate(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountGetAccountTTL)); - result.append("accountGetAccountTTL()"); -} - -void MTProtoDecompiler::decompile_accountSetAccountTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::accountSetAccountTTL)); - result.append("accountSetAccountTTL("); - result.append("ttl:"); - MTProtoDecompiler::decompile_AccountDaysTTL(thethis, result, mtstream); - result.append(")"); + + Q_ASSERT((ctor == HelpAppUpdate::CtorHelpAppUpdate) || + (ctor == HelpAppUpdate::CtorHelpNoAppUpdate)); + + if(ctor == HelpAppUpdate::CtorHelpAppUpdate) + { + result.append("HelpAppUpdate#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLBool is_critical = mtstream.readTLBool(); + result.append("is_critical:" + QString::number(is_critical, 16)); + result.append(", "); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } + else if(ctor == HelpAppUpdate::CtorHelpNoAppUpdate) + result.append("HelpNoAppUpdate"); } -void MTProtoDecompiler::decompile_accountSendChangePhoneCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_HelpInviteText(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountSendChangePhoneCode)); - result.append("accountSendChangePhoneCode("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_allow_flashcall:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) + Q_ASSERT((ctor == HelpInviteText::CtorHelpInviteText)); + + if(ctor == HelpInviteText::CtorHelpInviteText) { - TLBool is_current_number = mtstream.readTLBool(); - result.append("is_current_number:" + QString::number(is_current_number, 16)); + result.append("HelpInviteText#"); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); } - result.append(")"); } -void MTProtoDecompiler::decompile_accountChangePhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_EncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountChangePhone)); - result.append("accountChangePhone("); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(", "); - TLString phone_code = mtstream.readTLString(); - result.append("phone_code:" + thethis->printableString(phone_code)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountUpdateDeviceLocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::accountUpdateDeviceLocked)); - result.append("accountUpdateDeviceLocked("); - TLInt period = mtstream.readTLInt(); - result.append("period:" + QString::number(period, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountGetAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountGetAuthorizations)); - result.append("accountGetAuthorizations()"); -} - -void MTProtoDecompiler::decompile_accountResetAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == EncryptedChat::CtorEncryptedChatEmpty) || + (ctor == EncryptedChat::CtorEncryptedChatWaiting) || + (ctor == EncryptedChat::CtorEncryptedChatRequested) || + (ctor == EncryptedChat::CtorEncryptedChat) || + (ctor == EncryptedChat::CtorEncryptedChatDiscarded)); - Q_ASSERT((ctor == TLTypes::accountResetAuthorization)); - result.append("accountResetAuthorization("); - TLLong hash = mtstream.readTLLong(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); + if(ctor == EncryptedChat::CtorEncryptedChatEmpty) + { + result.append("EncryptedChatEmpty#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + } + else if(ctor == EncryptedChat::CtorEncryptedChatWaiting) + { + result.append("EncryptedChatWaiting#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt admin_id = mtstream.readTLInt(); + result.append("admin_id:" + QString::number(admin_id, 16)); + result.append(", "); + TLInt participant_id = mtstream.readTLInt(); + result.append("participant_id:" + QString::number(participant_id, 16)); + } + else if(ctor == EncryptedChat::CtorEncryptedChatRequested) + { + result.append("EncryptedChatRequested#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt admin_id = mtstream.readTLInt(); + result.append("admin_id:" + QString::number(admin_id, 16)); + result.append(", "); + TLInt participant_id = mtstream.readTLInt(); + result.append("participant_id:" + QString::number(participant_id, 16)); + result.append(", "); + TLBytes g_a = mtstream.readTLBytes(); + result.append("g_a:" + thethis->printableString(g_a)); + } + else if(ctor == EncryptedChat::CtorEncryptedChat) + { + result.append("EncryptedChat#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLInt admin_id = mtstream.readTLInt(); + result.append("admin_id:" + QString::number(admin_id, 16)); + result.append(", "); + TLInt participant_id = mtstream.readTLInt(); + result.append("participant_id:" + QString::number(participant_id, 16)); + result.append(", "); + TLBytes g_a_or_b = mtstream.readTLBytes(); + result.append("g_a_or_b:" + thethis->printableString(g_a_or_b)); + result.append(", "); + TLLong key_fingerprint = mtstream.readTLLong(); + result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); + } + else if(ctor == EncryptedChat::CtorEncryptedChatDiscarded) + { + result.append("EncryptedChatDiscarded#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + } } -void MTProtoDecompiler::decompile_accountGetPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputEncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountGetPassword)); - result.append("accountGetPassword()"); -} - -void MTProtoDecompiler::decompile_accountGetPasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::accountGetPasswordSettings)); - result.append("accountGetPasswordSettings("); - TLBytes current_password_hash = mtstream.readTLBytes(); - result.append("current_password_hash:" + thethis->printableString(current_password_hash)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_accountUpdatePasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountUpdatePasswordSettings)); - result.append("accountUpdatePasswordSettings("); - TLBytes current_password_hash = mtstream.readTLBytes(); - result.append("current_password_hash:" + thethis->printableString(current_password_hash)); - result.append(", "); - result.append("new_settings:"); - MTProtoDecompiler::decompile_AccountPasswordInputSettings(thethis, result, mtstream); - result.append(")"); + Q_ASSERT((ctor == InputEncryptedChat::CtorInputEncryptedChat)); + + if(ctor == InputEncryptedChat::CtorInputEncryptedChat) + { + result.append("InputEncryptedChat#"); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } } -void MTProtoDecompiler::decompile_accountSendConfirmPhoneCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_EncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountSendConfirmPhoneCode)); - result.append("accountSendConfirmPhoneCode("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_allow_flashcall:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLString hash = mtstream.readTLString(); - result.append("hash:" + thethis->printableString(hash)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) + Q_ASSERT((ctor == EncryptedFile::CtorEncryptedFileEmpty) || + (ctor == EncryptedFile::CtorEncryptedFile)); + + if(ctor == EncryptedFile::CtorEncryptedFileEmpty) + result.append("EncryptedFileEmpty"); + else if(ctor == EncryptedFile::CtorEncryptedFile) { - TLBool is_current_number = mtstream.readTLBool(); - result.append("is_current_number:" + QString::number(is_current_number, 16)); + result.append("EncryptedFile#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLInt size = mtstream.readTLInt(); + result.append("size:" + QString::number(size, 16)); + result.append(", "); + TLInt dc_id = mtstream.readTLInt(); + result.append("dc_id:" + QString::number(dc_id, 16)); + result.append(", "); + TLInt key_fingerprint = mtstream.readTLInt(); + result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); } - result.append(")"); } -void MTProtoDecompiler::decompile_accountConfirmPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputEncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::accountConfirmPhone)); - result.append("accountConfirmPhone("); - TLString phone_code_hash = mtstream.readTLString(); - result.append("phone_code_hash:" + thethis->printableString(phone_code_hash)); - result.append(", "); - TLString phone_code = mtstream.readTLString(); - result.append("phone_code:" + thethis->printableString(phone_code)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_usersGetUsers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::usersGetUsers)); - result.append("usersGetUsers("); - result.append("id:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); -} - -void MTProtoDecompiler::decompile_usersGetFullUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::usersGetFullUser)); - result.append("usersGetFullUser("); - result.append("id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); + Q_ASSERT((ctor == InputEncryptedFile::CtorInputEncryptedFileEmpty) || + (ctor == InputEncryptedFile::CtorInputEncryptedFileUploaded) || + (ctor == InputEncryptedFile::CtorInputEncryptedFile) || + (ctor == InputEncryptedFile::CtorInputEncryptedFileBigUploaded)); + + if(ctor == InputEncryptedFile::CtorInputEncryptedFileEmpty) + result.append("InputEncryptedFileEmpty"); + else if(ctor == InputEncryptedFile::CtorInputEncryptedFileUploaded) + { + result.append("InputEncryptedFileUploaded#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt parts = mtstream.readTLInt(); + result.append("parts:" + QString::number(parts, 16)); + result.append(", "); + TLString md5_checksum = mtstream.readTLString(); + result.append("md5_checksum:" + thethis->printableString(md5_checksum)); + result.append(", "); + TLInt key_fingerprint = mtstream.readTLInt(); + result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); + } + else if(ctor == InputEncryptedFile::CtorInputEncryptedFile) + { + result.append("InputEncryptedFile#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } + else if(ctor == InputEncryptedFile::CtorInputEncryptedFileBigUploaded) + { + result.append("InputEncryptedFileBigUploaded#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt parts = mtstream.readTLInt(); + result.append("parts:" + QString::number(parts, 16)); + result.append(", "); + TLInt key_fingerprint = mtstream.readTLInt(); + result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); + } } -void MTProtoDecompiler::decompile_contactsGetStatuses(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_EncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsGetStatuses)); - result.append("contactsGetStatuses()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == EncryptedMessage::CtorEncryptedMessage) || + (ctor == EncryptedMessage::CtorEncryptedMessageService)); + + if(ctor == EncryptedMessage::CtorEncryptedMessage) + { + result.append("EncryptedMessage#"); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); + result.append(", "); + result.append("file:"); + MTProtoDecompiler::decompile_EncryptedFile(thethis, result, mtstream); + } + else if(ctor == EncryptedMessage::CtorEncryptedMessageService) + { + result.append("EncryptedMessageService#"); + TLLong random_id = mtstream.readTLLong(); + result.append("random_id:" + QString::number(random_id, 16)); + result.append(", "); + TLInt chat_id = mtstream.readTLInt(); + result.append("chat_id:" + QString::number(chat_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLBytes bytes = mtstream.readTLBytes(); + result.append("bytes:" + thethis->printableString(bytes)); + } } -void MTProtoDecompiler::decompile_contactsGetContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesDhConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsGetContacts)); - result.append("contactsGetContacts("); - TLString hash = mtstream.readTLString(); - result.append("hash:" + thethis->printableString(hash)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesDhConfig::CtorMessagesDhConfigNotModified) || + (ctor == MessagesDhConfig::CtorMessagesDhConfig)); + + if(ctor == MessagesDhConfig::CtorMessagesDhConfigNotModified) + { + result.append("MessagesDhConfigNotModified#"); + TLBytes random = mtstream.readTLBytes(); + result.append("random:" + thethis->printableString(random)); + } + else if(ctor == MessagesDhConfig::CtorMessagesDhConfig) + { + result.append("MessagesDhConfig#"); + TLInt g = mtstream.readTLInt(); + result.append("g:" + QString::number(g, 16)); + result.append(", "); + TLBytes p = mtstream.readTLBytes(); + result.append("p:" + thethis->printableString(p)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); + result.append(", "); + TLBytes random = mtstream.readTLBytes(); + result.append("random:" + thethis->printableString(random)); + } } -void MTProtoDecompiler::decompile_contactsImportContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesSentEncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsImportContacts)); - result.append("contactsImportContacts("); - result.append("contacts:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLBool is_replace = mtstream.readTLBool(); - result.append("is_replace:" + QString::number(is_replace, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_contactsDeleteContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::contactsDeleteContact)); - result.append("contactsDeleteContact("); - result.append("id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_contactsDeleteContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsDeleteContacts)); - result.append("contactsDeleteContacts("); - result.append("id:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); + Q_ASSERT((ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedMessage) || + (ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedFile)); + + if(ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedMessage) + { + result.append("MessagesSentEncryptedMessage#"); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + } + else if(ctor == MessagesSentEncryptedMessage::CtorMessagesSentEncryptedFile) + { + result.append("MessagesSentEncryptedFile#"); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + result.append("file:"); + MTProtoDecompiler::decompile_EncryptedFile(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_contactsBlock(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputDocument(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsBlock)); - result.append("contactsBlock("); - result.append("id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputDocument::CtorInputDocumentEmpty) || + (ctor == InputDocument::CtorInputDocument)); + + if(ctor == InputDocument::CtorInputDocumentEmpty) + result.append("InputDocumentEmpty"); + else if(ctor == InputDocument::CtorInputDocument) + { + result.append("InputDocument#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } } -void MTProtoDecompiler::decompile_contactsUnblock(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Document(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsUnblock)); - result.append("contactsUnblock("); - result.append("id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == Document::CtorDocumentEmpty) || + (ctor == Document::CtorDocument)); + + if(ctor == Document::CtorDocumentEmpty) + { + result.append("DocumentEmpty#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + } + else if(ctor == Document::CtorDocument) + { + result.append("Document#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + TLString mime_type = mtstream.readTLString(); + result.append("mime_type:" + thethis->printableString(mime_type)); + result.append(", "); + TLInt size = mtstream.readTLInt(); + result.append("size:" + QString::number(size, 16)); + result.append(", "); + result.append("thumb:"); + MTProtoDecompiler::decompile_PhotoSize(thethis, result, mtstream); + TLInt dc_id = mtstream.readTLInt(); + result.append("dc_id:" + QString::number(dc_id, 16)); + result.append(", "); + TLInt version = mtstream.readTLInt(); + result.append("version:" + QString::number(version, 16)); + result.append(", "); + result.append("attributes:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_contactsGetBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_HelpSupport(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsGetBlocked)); - result.append("contactsGetBlocked("); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == HelpSupport::CtorHelpSupport)); + + if(ctor == HelpSupport::CtorHelpSupport) + { + result.append("HelpSupport#"); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + result.append("user:"); + MTProtoDecompiler::decompile_User(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_contactsExportCard(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_NotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsExportCard)); - result.append("contactsExportCard()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == NotifyPeer::CtorNotifyPeer) || + (ctor == NotifyPeer::CtorNotifyUsers) || + (ctor == NotifyPeer::CtorNotifyChats) || + (ctor == NotifyPeer::CtorNotifyAll)); + + if(ctor == NotifyPeer::CtorNotifyPeer) + { + result.append("NotifyPeer#"); + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + } + else if(ctor == NotifyPeer::CtorNotifyUsers) + result.append("NotifyUsers"); + else if(ctor == NotifyPeer::CtorNotifyChats) + result.append("NotifyChats"); + else if(ctor == NotifyPeer::CtorNotifyAll) + result.append("NotifyAll"); } -void MTProtoDecompiler::decompile_contactsImportCard(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_SendMessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsImportCard)); - result.append("contactsImportCard("); - result.append("export_card:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == SendMessageAction::CtorSendMessageTypingAction) || + (ctor == SendMessageAction::CtorSendMessageCancelAction) || + (ctor == SendMessageAction::CtorSendMessageRecordVideoAction) || + (ctor == SendMessageAction::CtorSendMessageUploadVideoAction) || + (ctor == SendMessageAction::CtorSendMessageRecordAudioAction) || + (ctor == SendMessageAction::CtorSendMessageUploadAudioAction) || + (ctor == SendMessageAction::CtorSendMessageUploadPhotoAction) || + (ctor == SendMessageAction::CtorSendMessageUploadDocumentAction) || + (ctor == SendMessageAction::CtorSendMessageGeoLocationAction) || + (ctor == SendMessageAction::CtorSendMessageChooseContactAction) || + (ctor == SendMessageAction::CtorSendMessageGamePlayAction) || + (ctor == SendMessageAction::CtorSendMessageGameStopAction)); + + if(ctor == SendMessageAction::CtorSendMessageTypingAction) + result.append("SendMessageTypingAction"); + else if(ctor == SendMessageAction::CtorSendMessageCancelAction) + result.append("SendMessageCancelAction"); + else if(ctor == SendMessageAction::CtorSendMessageRecordVideoAction) + result.append("SendMessageRecordVideoAction"); + else if(ctor == SendMessageAction::CtorSendMessageUploadVideoAction) + { + result.append("SendMessageUploadVideoAction#"); + TLInt progress = mtstream.readTLInt(); + result.append("progress:" + QString::number(progress, 16)); + } + else if(ctor == SendMessageAction::CtorSendMessageRecordAudioAction) + result.append("SendMessageRecordAudioAction"); + else if(ctor == SendMessageAction::CtorSendMessageUploadAudioAction) + { + result.append("SendMessageUploadAudioAction#"); + TLInt progress = mtstream.readTLInt(); + result.append("progress:" + QString::number(progress, 16)); + } + else if(ctor == SendMessageAction::CtorSendMessageUploadPhotoAction) + { + result.append("SendMessageUploadPhotoAction#"); + TLInt progress = mtstream.readTLInt(); + result.append("progress:" + QString::number(progress, 16)); + } + else if(ctor == SendMessageAction::CtorSendMessageUploadDocumentAction) + { + result.append("SendMessageUploadDocumentAction#"); + TLInt progress = mtstream.readTLInt(); + result.append("progress:" + QString::number(progress, 16)); + } + else if(ctor == SendMessageAction::CtorSendMessageGeoLocationAction) + result.append("SendMessageGeoLocationAction"); + else if(ctor == SendMessageAction::CtorSendMessageChooseContactAction) + result.append("SendMessageChooseContactAction"); + else if(ctor == SendMessageAction::CtorSendMessageGamePlayAction) + result.append("SendMessageGamePlayAction"); + else if(ctor == SendMessageAction::CtorSendMessageGameStopAction) + result.append("SendMessageGameStopAction"); } -void MTProtoDecompiler::decompile_contactsSearch(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsFound(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsSearch)); - result.append("contactsSearch("); - TLString q = mtstream.readTLString(); - result.append("q:" + thethis->printableString(q)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_contactsResolveUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::contactsResolveUsername)); - result.append("contactsResolveUsername("); - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(")"); + + Q_ASSERT((ctor == ContactsFound::CtorContactsFound)); + + if(ctor == ContactsFound::CtorContactsFound) + { + result.append("ContactsFound#"); + result.append("results:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_contactsGetTopPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputPrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::contactsGetTopPeers)); - result.append("contactsGetTopPeers("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_correspondents:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_bots_pm:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_bots_inline:" + BIT_FIELD_VALUE(flags, 2)); - result.append(", "); - result.append("is_groups:" + BIT_FIELD_VALUE(flags, 10)); - result.append(", "); - result.append("is_channels:" + BIT_FIELD_VALUE(flags, 15)); - result.append(", "); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(", "); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_contactsResetTopPeerRating(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == InputPrivacyKey::CtorInputPrivacyKeyStatusTimestamp) || + (ctor == InputPrivacyKey::CtorInputPrivacyKeyChatInvite)); - Q_ASSERT((ctor == TLTypes::contactsResetTopPeerRating)); - result.append("contactsResetTopPeerRating("); - result.append("category:"); - MTProtoDecompiler::decompile_TopPeerCategory(thethis, result, mtstream); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append(")"); + if(ctor == InputPrivacyKey::CtorInputPrivacyKeyStatusTimestamp) + result.append("InputPrivacyKeyStatusTimestamp"); + else if(ctor == InputPrivacyKey::CtorInputPrivacyKeyChatInvite) + result.append("InputPrivacyKeyChatInvite"); } -void MTProtoDecompiler::decompile_messagesGetMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_PrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetMessages)); - result.append("messagesGetMessages("); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesGetDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesGetDialogs)); - result.append("messagesGetDialogs("); - TLInt offset_date = mtstream.readTLInt(); - result.append("offset_date:" + QString::number(offset_date, 16)); - result.append(", "); - TLInt offset_id = mtstream.readTLInt(); - result.append("offset_id:" + QString::number(offset_id, 16)); - result.append(", "); - result.append("offset_peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesGetHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetHistory)); - result.append("messagesGetHistory("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt offset_id = mtstream.readTLInt(); - result.append("offset_id:" + QString::number(offset_id, 16)); - result.append(", "); - TLInt offset_date = mtstream.readTLInt(); - result.append("offset_date:" + QString::number(offset_date, 16)); - result.append(", "); - TLInt add_offset = mtstream.readTLInt(); - result.append("add_offset:" + QString::number(add_offset, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(", "); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(", "); - TLInt min_id = mtstream.readTLInt(); - result.append("min_id:" + QString::number(min_id, 16)); - result.append(")"); + Q_ASSERT((ctor == PrivacyKey::CtorPrivacyKeyStatusTimestamp) || + (ctor == PrivacyKey::CtorPrivacyKeyChatInvite)); + + if(ctor == PrivacyKey::CtorPrivacyKeyStatusTimestamp) + result.append("PrivacyKeyStatusTimestamp"); + else if(ctor == PrivacyKey::CtorPrivacyKeyChatInvite) + result.append("PrivacyKeyChatInvite"); } -void MTProtoDecompiler::decompile_messagesSearch(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputPrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSearch)); - result.append("messagesSearch("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLString q = mtstream.readTLString(); - result.append("q:" + thethis->printableString(q)); - result.append(", "); - result.append("filter:"); - MTProtoDecompiler::decompile_MessagesFilter(thethis, result, mtstream); - TLInt min_date = mtstream.readTLInt(); - result.append("min_date:" + QString::number(min_date, 16)); - result.append(", "); - TLInt max_date = mtstream.readTLInt(); - result.append("max_date:" + QString::number(max_date, 16)); - result.append(", "); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + Q_ASSERT((ctor == InputPrivacyRule::CtorInputPrivacyValueAllowContacts) || + (ctor == InputPrivacyRule::CtorInputPrivacyValueAllowAll) || + (ctor == InputPrivacyRule::CtorInputPrivacyValueAllowUsers) || + (ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowContacts) || + (ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowAll) || + (ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowUsers)); + + if(ctor == InputPrivacyRule::CtorInputPrivacyValueAllowContacts) + result.append("InputPrivacyValueAllowContacts"); + else if(ctor == InputPrivacyRule::CtorInputPrivacyValueAllowAll) + result.append("InputPrivacyValueAllowAll"); + else if(ctor == InputPrivacyRule::CtorInputPrivacyValueAllowUsers) + { + result.append("InputPrivacyValueAllowUsers#"); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowContacts) + result.append("InputPrivacyValueDisallowContacts"); + else if(ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowAll) + result.append("InputPrivacyValueDisallowAll"); + else if(ctor == InputPrivacyRule::CtorInputPrivacyValueDisallowUsers) + { + result.append("InputPrivacyValueDisallowUsers#"); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesReadHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_PrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReadHistory)); - result.append("messagesReadHistory("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == PrivacyRule::CtorPrivacyValueAllowContacts) || + (ctor == PrivacyRule::CtorPrivacyValueAllowAll) || + (ctor == PrivacyRule::CtorPrivacyValueAllowUsers) || + (ctor == PrivacyRule::CtorPrivacyValueDisallowContacts) || + (ctor == PrivacyRule::CtorPrivacyValueDisallowAll) || + (ctor == PrivacyRule::CtorPrivacyValueDisallowUsers)); + + if(ctor == PrivacyRule::CtorPrivacyValueAllowContacts) + result.append("PrivacyValueAllowContacts"); + else if(ctor == PrivacyRule::CtorPrivacyValueAllowAll) + result.append("PrivacyValueAllowAll"); + else if(ctor == PrivacyRule::CtorPrivacyValueAllowUsers) + { + result.append("PrivacyValueAllowUsers#"); + result.append("users:"); + thethis->decompileTLVector(result, mtstream, false); + } + else if(ctor == PrivacyRule::CtorPrivacyValueDisallowContacts) + result.append("PrivacyValueDisallowContacts"); + else if(ctor == PrivacyRule::CtorPrivacyValueDisallowAll) + result.append("PrivacyValueDisallowAll"); + else if(ctor == PrivacyRule::CtorPrivacyValueDisallowUsers) + { + result.append("PrivacyValueDisallowUsers#"); + result.append("users:"); + thethis->decompileTLVector(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesDeleteHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AccountPrivacyRules(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesDeleteHistory)); - result.append("messagesDeleteHistory("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_just_clear:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesDeleteMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == AccountPrivacyRules::CtorAccountPrivacyRules)); - Q_ASSERT((ctor == TLTypes::messagesDeleteMessages)); - result.append("messagesDeleteMessages("); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + if(ctor == AccountPrivacyRules::CtorAccountPrivacyRules) + { + result.append("AccountPrivacyRules#"); + result.append("rules:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesReceivedMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AccountDaysTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReceivedMessages)); - result.append("messagesReceivedMessages("); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSetTyping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesSetTyping)); - result.append("messagesSetTyping("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append("action:"); - MTProtoDecompiler::decompile_SendMessageAction(thethis, result, mtstream); - result.append(")"); + + Q_ASSERT((ctor == AccountDaysTTL::CtorAccountDaysTTL)); + + if(ctor == AccountDaysTTL::CtorAccountDaysTTL) + { + result.append("AccountDaysTTL#"); + TLInt days = mtstream.readTLInt(); + result.append("days:" + QString::number(days, 16)); + } } -void MTProtoDecompiler::decompile_messagesSendMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_DocumentAttribute(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSendMessage)); - result.append("messagesSendMessage("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); - result.append(", "); - result.append("is_clear_draft:" + BIT_FIELD_VALUE(flags, 7)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 0)) + Q_ASSERT((ctor == DocumentAttribute::CtorDocumentAttributeImageSize) || + (ctor == DocumentAttribute::CtorDocumentAttributeAnimated) || + (ctor == DocumentAttribute::CtorDocumentAttributeSticker) || + (ctor == DocumentAttribute::CtorDocumentAttributeVideo) || + (ctor == DocumentAttribute::CtorDocumentAttributeAudio) || + (ctor == DocumentAttribute::CtorDocumentAttributeFilename) || + (ctor == DocumentAttribute::CtorDocumentAttributeHasStickers)); + + if(ctor == DocumentAttribute::CtorDocumentAttributeImageSize) { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append("DocumentAttributeImageSize#"); + TLInt w = mtstream.readTLInt(); + result.append("w:" + QString::number(w, 16)); result.append(", "); + TLInt h = mtstream.readTLInt(); + result.append("h:" + QString::number(h, 16)); } - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(", "); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) + else if(ctor == DocumentAttribute::CtorDocumentAttributeAnimated) + result.append("DocumentAttributeAnimated"); + else if(ctor == DocumentAttribute::CtorDocumentAttributeSticker) { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + result.append("DocumentAttributeSticker#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_mask:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + TLString alt = mtstream.readTLString(); + result.append("alt:" + thethis->printableString(alt)); + result.append(", "); + result.append("stickerset:"); + MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) + { + result.append("mask_coords:"); + MTProtoDecompiler::decompile_MaskCoords(thethis, result, mtstream); + } } - if(IS_FLAG_SET(flags, 3)) + else if(ctor == DocumentAttribute::CtorDocumentAttributeVideo) { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("DocumentAttributeVideo#"); + TLInt duration = mtstream.readTLInt(); + result.append("duration:" + QString::number(duration, 16)); + result.append(", "); + TLInt w = mtstream.readTLInt(); + result.append("w:" + QString::number(w, 16)); + result.append(", "); + TLInt h = mtstream.readTLInt(); + result.append("h:" + QString::number(h, 16)); } - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSendMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::messagesSendMedia)); - result.append("messagesSendMedia("); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); - result.append(", "); - result.append("is_clear_draft:" + BIT_FIELD_VALUE(flags, 7)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 0)) + else if(ctor == DocumentAttribute::CtorDocumentAttributeAudio) { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append("DocumentAttributeAudio#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_voice:" + BIT_FIELD_VALUE(flags, 10)); + result.append(", "); + TLInt duration = mtstream.readTLInt(); + result.append("duration:" + QString::number(duration, 16)); result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLString performer = mtstream.readTLString(); + result.append("performer:" + thethis->printableString(performer)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLBytes waveform = mtstream.readTLBytes(); + result.append("waveform:" + thethis->printableString(waveform)); + } } - result.append("media:"); - MTProtoDecompiler::decompile_InputMedia(thethis, result, mtstream); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) + else if(ctor == DocumentAttribute::CtorDocumentAttributeFilename) { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + result.append("DocumentAttributeFilename#"); + TLString file_name = mtstream.readTLString(); + result.append("file_name:" + thethis->printableString(file_name)); } - result.append(")"); + else if(ctor == DocumentAttribute::CtorDocumentAttributeHasStickers) + result.append("DocumentAttributeHasStickers"); } -void MTProtoDecompiler::decompile_messagesForwardMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesForwardMessages)); - result.append("messagesForwardMessages("); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); - result.append(", "); - result.append("is_with_my_score:" + BIT_FIELD_VALUE(flags, 8)); - result.append(", "); - result.append("from_peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - result.append("random_id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - result.append("to_peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesStickers::CtorMessagesStickersNotModified) || + (ctor == MessagesStickers::CtorMessagesStickers)); + + if(ctor == MessagesStickers::CtorMessagesStickersNotModified) + result.append("MessagesStickersNotModified"); + else if(ctor == MessagesStickers::CtorMessagesStickers) + { + result.append("MessagesStickers#"); + TLString hash = mtstream.readTLString(); + result.append("hash:" + thethis->printableString(hash)); + result.append(", "); + result.append("stickers:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesReportSpam(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_StickerPack(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReportSpam)); - result.append("messagesReportSpam("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == StickerPack::CtorStickerPack)); + + if(ctor == StickerPack::CtorStickerPack) + { + result.append("StickerPack#"); + TLString emoticon = mtstream.readTLString(); + result.append("emoticon:" + thethis->printableString(emoticon)); + result.append(", "); + result.append("documents:"); + thethis->decompileTLVector(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesHideReportSpam(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesAllStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesHideReportSpam)); - result.append("messagesHideReportSpam("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesAllStickers::CtorMessagesAllStickersNotModified) || + (ctor == MessagesAllStickers::CtorMessagesAllStickers)); + + if(ctor == MessagesAllStickers::CtorMessagesAllStickersNotModified) + result.append("MessagesAllStickersNotModified"); + else if(ctor == MessagesAllStickers::CtorMessagesAllStickers) + { + result.append("MessagesAllStickers#"); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(", "); + result.append("sets:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesGetPeerSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_DisabledFeature(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetPeerSettings)); - result.append("messagesGetPeerSettings("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == DisabledFeature::CtorDisabledFeature)); + + if(ctor == DisabledFeature::CtorDisabledFeature) + { + result.append("DisabledFeature#"); + TLString feature = mtstream.readTLString(); + result.append("feature:" + thethis->printableString(feature)); + result.append(", "); + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + } } -void MTProtoDecompiler::decompile_messagesGetChats(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesAffectedMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetChats)); - result.append("messagesGetChats("); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesAffectedMessages::CtorMessagesAffectedMessages)); + + if(ctor == MessagesAffectedMessages::CtorMessagesAffectedMessages) + { + result.append("MessagesAffectedMessages#"); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + TLInt pts_count = mtstream.readTLInt(); + result.append("pts_count:" + QString::number(pts_count, 16)); + } } -void MTProtoDecompiler::decompile_messagesGetFullChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetFullChat)); - result.append("messagesGetFullChat("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == ContactLink::CtorContactLinkUnknown) || + (ctor == ContactLink::CtorContactLinkNone) || + (ctor == ContactLink::CtorContactLinkHasPhone) || + (ctor == ContactLink::CtorContactLinkContact)); + + if(ctor == ContactLink::CtorContactLinkUnknown) + result.append("ContactLinkUnknown"); + else if(ctor == ContactLink::CtorContactLinkNone) + result.append("ContactLinkNone"); + else if(ctor == ContactLink::CtorContactLinkHasPhone) + result.append("ContactLinkHasPhone"); + else if(ctor == ContactLink::CtorContactLinkContact) + result.append("ContactLinkContact"); } -void MTProtoDecompiler::decompile_messagesEditChatTitle(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_WebPage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesEditChatTitle)); - result.append("messagesEditChatTitle("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == WebPage::CtorWebPageEmpty) || + (ctor == WebPage::CtorWebPagePending) || + (ctor == WebPage::CtorWebPage)); + + if(ctor == WebPage::CtorWebPageEmpty) + { + result.append("WebPageEmpty#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + } + else if(ctor == WebPage::CtorWebPagePending) + { + result.append("WebPagePending#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + } + else if(ctor == WebPage::CtorWebPage) + { + result.append("WebPage#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + TLString display_url = mtstream.readTLString(); + result.append("display_url:" + thethis->printableString(display_url)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLString site_name = mtstream.readTLString(); + result.append("site_name:" + thethis->printableString(site_name)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 4)) + { + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 5)) + { + TLString embed_url = mtstream.readTLString(); + result.append("embed_url:" + thethis->printableString(embed_url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + TLString embed_type = mtstream.readTLString(); + result.append("embed_type:" + thethis->printableString(embed_type)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 6)) + { + TLInt embed_width = mtstream.readTLInt(); + result.append("embed_width:" + QString::number(embed_width, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 6)) + { + TLInt embed_height = mtstream.readTLInt(); + result.append("embed_height:" + QString::number(embed_height, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 7)) + { + TLInt duration = mtstream.readTLInt(); + result.append("duration:" + QString::number(duration, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 8)) + { + TLString author = mtstream.readTLString(); + result.append("author:" + thethis->printableString(author)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 9)) + { + result.append("document:"); + MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + } + } } -void MTProtoDecompiler::decompile_messagesEditChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Authorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesEditChatPhoto)); - result.append("messagesEditChatPhoto("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - result.append("photo:"); - MTProtoDecompiler::decompile_InputChatPhoto(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesAddChatUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesAddChatUser)); - result.append("messagesAddChatUser("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLInt fwd_limit = mtstream.readTLInt(); - result.append("fwd_limit:" + QString::number(fwd_limit, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesDeleteChatUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesDeleteChatUser)); - result.append("messagesDeleteChatUser("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesCreateChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == Authorization::CtorAuthorization)); - Q_ASSERT((ctor == TLTypes::messagesCreateChat)); - result.append("messagesCreateChat("); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(")"); + if(ctor == Authorization::CtorAuthorization) + { + result.append("Authorization#"); + TLLong hash = mtstream.readTLLong(); + result.append("hash:" + QString::number(hash, 16)); + result.append(", "); + TLInt flags = mtstream.readTLInt(); + result.append("flags:" + QString::number(flags, 16)); + result.append(", "); + TLString device_model = mtstream.readTLString(); + result.append("device_model:" + thethis->printableString(device_model)); + result.append(", "); + TLString platform = mtstream.readTLString(); + result.append("platform:" + thethis->printableString(platform)); + result.append(", "); + TLString system_version = mtstream.readTLString(); + result.append("system_version:" + thethis->printableString(system_version)); + result.append(", "); + TLInt api_id = mtstream.readTLInt(); + result.append("api_id:" + QString::number(api_id, 16)); + result.append(", "); + TLString app_name = mtstream.readTLString(); + result.append("app_name:" + thethis->printableString(app_name)); + result.append(", "); + TLString app_version = mtstream.readTLString(); + result.append("app_version:" + thethis->printableString(app_version)); + result.append(", "); + TLInt date_created = mtstream.readTLInt(); + result.append("date_created:" + QString::number(date_created, 16)); + result.append(", "); + TLInt date_active = mtstream.readTLInt(); + result.append("date_active:" + QString::number(date_active, 16)); + result.append(", "); + TLString ip = mtstream.readTLString(); + result.append("ip:" + thethis->printableString(ip)); + result.append(", "); + TLString country = mtstream.readTLString(); + result.append("country:" + thethis->printableString(country)); + result.append(", "); + TLString region = mtstream.readTLString(); + result.append("region:" + thethis->printableString(region)); + } } -void MTProtoDecompiler::decompile_messagesForwardMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AccountAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesForwardMessage)); - result.append("messagesForwardMessage("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesGetDhConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesGetDhConfig)); - result.append("messagesGetDhConfig("); - TLInt version = mtstream.readTLInt(); - result.append("version:" + QString::number(version, 16)); - result.append(", "); - TLInt random_length = mtstream.readTLInt(); - result.append("random_length:" + QString::number(random_length, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesRequestEncryption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesRequestEncryption)); - result.append("messagesRequestEncryption("); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLInt random_id = mtstream.readTLInt(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLBytes g_a = mtstream.readTLBytes(); - result.append("g_a:" + thethis->printableString(g_a)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesAcceptEncryption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == AccountAuthorizations::CtorAccountAuthorizations)); - Q_ASSERT((ctor == TLTypes::messagesAcceptEncryption)); - result.append("messagesAcceptEncryption("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); - TLBytes g_b = mtstream.readTLBytes(); - result.append("g_b:" + thethis->printableString(g_b)); - result.append(", "); - TLLong key_fingerprint = mtstream.readTLLong(); - result.append("key_fingerprint:" + QString::number(key_fingerprint, 16)); - result.append(")"); + if(ctor == AccountAuthorizations::CtorAccountAuthorizations) + { + result.append("AccountAuthorizations#"); + result.append("authorizations:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesDiscardEncryption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AccountPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesDiscardEncryption)); - result.append("messagesDiscardEncryption("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSetEncryptedTyping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesSetEncryptedTyping)); - result.append("messagesSetEncryptedTyping("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); - TLBool is_typing = mtstream.readTLBool(); - result.append("is_typing:" + QString::number(is_typing, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesReadEncryptedHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReadEncryptedHistory)); - result.append("messagesReadEncryptedHistory("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); - TLInt max_date = mtstream.readTLInt(); - result.append("max_date:" + QString::number(max_date, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSendEncrypted(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == AccountPassword::CtorAccountNoPassword) || + (ctor == AccountPassword::CtorAccountPassword)); - Q_ASSERT((ctor == TLTypes::messagesSendEncrypted)); - result.append("messagesSendEncrypted("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); - result.append(")"); + if(ctor == AccountPassword::CtorAccountNoPassword) + { + result.append("AccountNoPassword#"); + TLBytes new_salt = mtstream.readTLBytes(); + result.append("new_salt:" + thethis->printableString(new_salt)); + result.append(", "); + TLString email_unconfirmed_pattern = mtstream.readTLString(); + result.append("email_unconfirmed_pattern:" + thethis->printableString(email_unconfirmed_pattern)); + } + else if(ctor == AccountPassword::CtorAccountPassword) + { + result.append("AccountPassword#"); + TLBytes current_salt = mtstream.readTLBytes(); + result.append("current_salt:" + thethis->printableString(current_salt)); + result.append(", "); + TLBytes new_salt = mtstream.readTLBytes(); + result.append("new_salt:" + thethis->printableString(new_salt)); + result.append(", "); + TLString hint = mtstream.readTLString(); + result.append("hint:" + thethis->printableString(hint)); + result.append(", "); + TLBool has_recovery = mtstream.readTLBool(); + result.append("has_recovery:" + QString::number(has_recovery, 16)); + result.append(", "); + TLString email_unconfirmed_pattern = mtstream.readTLString(); + result.append("email_unconfirmed_pattern:" + thethis->printableString(email_unconfirmed_pattern)); + } } -void MTProtoDecompiler::decompile_messagesSendEncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AccountPasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSendEncryptedFile)); - result.append("messagesSendEncryptedFile("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); - result.append(", "); - result.append("file:"); - MTProtoDecompiler::decompile_InputEncryptedFile(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSendEncryptedService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesSendEncryptedService)); - result.append("messagesSendEncryptedService("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputEncryptedChat(thethis, result, mtstream); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); - result.append(")"); + + Q_ASSERT((ctor == AccountPasswordSettings::CtorAccountPasswordSettings)); + + if(ctor == AccountPasswordSettings::CtorAccountPasswordSettings) + { + result.append("AccountPasswordSettings#"); + TLString email = mtstream.readTLString(); + result.append("email:" + thethis->printableString(email)); + } } -void MTProtoDecompiler::decompile_messagesReceivedQueue(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AccountPasswordInputSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReceivedQueue)); - result.append("messagesReceivedQueue("); - TLInt max_qts = mtstream.readTLInt(); - result.append("max_qts:" + QString::number(max_qts, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == AccountPasswordInputSettings::CtorAccountPasswordInputSettings)); + + if(ctor == AccountPasswordInputSettings::CtorAccountPasswordInputSettings) + { + result.append("AccountPasswordInputSettings#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + if(IS_FLAG_SET(flags, 0)) + { + TLBytes new_salt = mtstream.readTLBytes(); + result.append("new_salt:" + thethis->printableString(new_salt)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 0)) + { + TLBytes new_password_hash = mtstream.readTLBytes(); + result.append("new_password_hash:" + thethis->printableString(new_password_hash)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 0)) + { + TLString hint = mtstream.readTLString(); + result.append("hint:" + thethis->printableString(hint)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 1)) + { + TLString email = mtstream.readTLString(); + result.append("email:" + thethis->printableString(email)); + } + } } -void MTProtoDecompiler::decompile_messagesReadMessageContents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AuthPasswordRecovery(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReadMessageContents)); - result.append("messagesReadMessageContents("); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == AuthPasswordRecovery::CtorAuthPasswordRecovery)); + + if(ctor == AuthPasswordRecovery::CtorAuthPasswordRecovery) + { + result.append("AuthPasswordRecovery#"); + TLString email_pattern = mtstream.readTLString(); + result.append("email_pattern:" + thethis->printableString(email_pattern)); + } } -void MTProtoDecompiler::decompile_messagesGetAllStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ReceivedNotifyMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetAllStickers)); - result.append("messagesGetAllStickers("); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == ReceivedNotifyMessage::CtorReceivedNotifyMessage)); + + if(ctor == ReceivedNotifyMessage::CtorReceivedNotifyMessage) + { + result.append("ReceivedNotifyMessage#"); + TLInt id = mtstream.readTLInt(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLInt flags = mtstream.readTLInt(); + result.append("flags:" + QString::number(flags, 16)); + } } -void MTProtoDecompiler::decompile_messagesGetWebPagePreview(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ExportedChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetWebPagePreview)); - result.append("messagesGetWebPagePreview("); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == ExportedChatInvite::CtorChatInviteEmpty) || + (ctor == ExportedChatInvite::CtorChatInviteExported)); + + if(ctor == ExportedChatInvite::CtorChatInviteEmpty) + result.append("ChatInviteEmpty"); + else if(ctor == ExportedChatInvite::CtorChatInviteExported) + { + result.append("ChatInviteExported#"); + TLString link = mtstream.readTLString(); + result.append("link:" + thethis->printableString(link)); + } } -void MTProtoDecompiler::decompile_messagesExportChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesExportChatInvite)); - result.append("messagesExportChatInvite("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == ChatInvite::CtorChatInviteAlready) || + (ctor == ChatInvite::CtorChatInvite)); + + if(ctor == ChatInvite::CtorChatInviteAlready) + { + result.append("ChatInviteAlready#"); + result.append("chat:"); + MTProtoDecompiler::decompile_Chat(thethis, result, mtstream); + } + else if(ctor == ChatInvite::CtorChatInvite) + { + result.append("ChatInvite#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_channel:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_public:" + BIT_FIELD_VALUE(flags, 2)); + result.append(", "); + result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 3)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_ChatPhoto(thethis, result, mtstream); + TLInt participants_count = mtstream.readTLInt(); + result.append("participants_count:" + QString::number(participants_count, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 4)) + { + result.append("participants:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + } } -void MTProtoDecompiler::decompile_messagesCheckChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesCheckChatInvite)); - result.append("messagesCheckChatInvite("); - TLString hash = mtstream.readTLString(); - result.append("hash:" + thethis->printableString(hash)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputStickerSet::CtorInputStickerSetEmpty) || + (ctor == InputStickerSet::CtorInputStickerSetID) || + (ctor == InputStickerSet::CtorInputStickerSetShortName)); + + if(ctor == InputStickerSet::CtorInputStickerSetEmpty) + result.append("InputStickerSetEmpty"); + else if(ctor == InputStickerSet::CtorInputStickerSetID) + { + result.append("InputStickerSetID#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } + else if(ctor == InputStickerSet::CtorInputStickerSetShortName) + { + result.append("InputStickerSetShortName#"); + TLString short_name = mtstream.readTLString(); + result.append("short_name:" + thethis->printableString(short_name)); + } } -void MTProtoDecompiler::decompile_messagesImportChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_StickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesImportChatInvite)); - result.append("messagesImportChatInvite("); - TLString hash = mtstream.readTLString(); - result.append("hash:" + thethis->printableString(hash)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesGetStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesGetStickerSet)); - result.append("messagesGetStickerSet("); - result.append("stickerset:"); - MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); - result.append(")"); + + Q_ASSERT((ctor == StickerSet::CtorStickerSet)); + + if(ctor == StickerSet::CtorStickerSet) + { + result.append("StickerSet#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_installed:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_archived:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_official:" + BIT_FIELD_VALUE(flags, 2)); + result.append(", "); + result.append("is_masks:" + BIT_FIELD_VALUE(flags, 3)); + result.append(", "); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString short_name = mtstream.readTLString(); + result.append("short_name:" + thethis->printableString(short_name)); + result.append(", "); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); + result.append(", "); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + } } -void MTProtoDecompiler::decompile_messagesInstallStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesInstallStickerSet)); - result.append("messagesInstallStickerSet("); - result.append("stickerset:"); - MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); - TLBool is_archived = mtstream.readTLBool(); - result.append("is_archived:" + QString::number(is_archived, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesStickerSet::CtorMessagesStickerSet)); + + if(ctor == MessagesStickerSet::CtorMessagesStickerSet) + { + result.append("MessagesStickerSet#"); + result.append("set:"); + MTProtoDecompiler::decompile_StickerSet(thethis, result, mtstream); + result.append("packs:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("documents:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesUninstallStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_BotCommand(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesUninstallStickerSet)); - result.append("messagesUninstallStickerSet("); - result.append("stickerset:"); - MTProtoDecompiler::decompile_InputStickerSet(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == BotCommand::CtorBotCommand)); + + if(ctor == BotCommand::CtorBotCommand) + { + result.append("BotCommand#"); + TLString command = mtstream.readTLString(); + result.append("command:" + thethis->printableString(command)); + result.append(", "); + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + } } -void MTProtoDecompiler::decompile_messagesStartBot(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_BotInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesStartBot)); - result.append("messagesStartBot("); - result.append("bot:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLString start_param = mtstream.readTLString(); - result.append("start_param:" + thethis->printableString(start_param)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == BotInfo::CtorBotInfo)); + + if(ctor == BotInfo::CtorBotInfo) + { + result.append("BotInfo#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + result.append("commands:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesGetMessagesViews(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_KeyboardButton(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetMessagesViews)); - result.append("messagesGetMessagesViews("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(", "); - TLBool is_increment = mtstream.readTLBool(); - result.append("is_increment:" + QString::number(is_increment, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == KeyboardButton::CtorKeyboardButton) || + (ctor == KeyboardButton::CtorKeyboardButtonUrl) || + (ctor == KeyboardButton::CtorKeyboardButtonCallback) || + (ctor == KeyboardButton::CtorKeyboardButtonRequestPhone) || + (ctor == KeyboardButton::CtorKeyboardButtonRequestGeoLocation) || + (ctor == KeyboardButton::CtorKeyboardButtonSwitchInline) || + (ctor == KeyboardButton::CtorKeyboardButtonGame)); + + if(ctor == KeyboardButton::CtorKeyboardButton) + { + result.append("KeyboardButton#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } + else if(ctor == KeyboardButton::CtorKeyboardButtonUrl) + { + result.append("KeyboardButtonUrl#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + result.append(", "); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + } + else if(ctor == KeyboardButton::CtorKeyboardButtonCallback) + { + result.append("KeyboardButtonCallback#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + result.append(", "); + TLBytes data = mtstream.readTLBytes(); + result.append("data:" + thethis->printableString(data)); + } + else if(ctor == KeyboardButton::CtorKeyboardButtonRequestPhone) + { + result.append("KeyboardButtonRequestPhone#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } + else if(ctor == KeyboardButton::CtorKeyboardButtonRequestGeoLocation) + { + result.append("KeyboardButtonRequestGeoLocation#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } + else if(ctor == KeyboardButton::CtorKeyboardButtonSwitchInline) + { + result.append("KeyboardButtonSwitchInline#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_same_peer:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + result.append(", "); + TLString query = mtstream.readTLString(); + result.append("query:" + thethis->printableString(query)); + } + else if(ctor == KeyboardButton::CtorKeyboardButtonGame) + { + result.append("KeyboardButtonGame#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } } -void MTProtoDecompiler::decompile_messagesToggleChatAdmins(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_KeyboardButtonRow(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesToggleChatAdmins)); - result.append("messagesToggleChatAdmins("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - TLBool is_enabled = mtstream.readTLBool(); - result.append("is_enabled:" + QString::number(is_enabled, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == KeyboardButtonRow::CtorKeyboardButtonRow)); + + if(ctor == KeyboardButtonRow::CtorKeyboardButtonRow) + { + result.append("KeyboardButtonRow#"); + result.append("buttons:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesEditChatAdmin(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ReplyMarkup(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesEditChatAdmin)); - result.append("messagesEditChatAdmin("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(", "); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLBool is_admin = mtstream.readTLBool(); - result.append("is_admin:" + QString::number(is_admin, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == ReplyMarkup::CtorReplyKeyboardHide) || + (ctor == ReplyMarkup::CtorReplyKeyboardForceReply) || + (ctor == ReplyMarkup::CtorReplyKeyboardMarkup) || + (ctor == ReplyMarkup::CtorReplyInlineMarkup)); + + if(ctor == ReplyMarkup::CtorReplyKeyboardHide) + { + result.append("ReplyKeyboardHide#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_selective:" + BIT_FIELD_VALUE(flags, 2)); + } + else if(ctor == ReplyMarkup::CtorReplyKeyboardForceReply) + { + result.append("ReplyKeyboardForceReply#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_single_use:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_selective:" + BIT_FIELD_VALUE(flags, 2)); + } + else if(ctor == ReplyMarkup::CtorReplyKeyboardMarkup) + { + result.append("ReplyKeyboardMarkup#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_resize:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + result.append("is_single_use:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("is_selective:" + BIT_FIELD_VALUE(flags, 2)); + result.append(", "); + result.append("rows:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == ReplyMarkup::CtorReplyInlineMarkup) + { + result.append("ReplyInlineMarkup#"); + result.append("rows:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesMigrateChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_HelpAppChangelog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesMigrateChat)); - result.append("messagesMigrateChat("); - TLInt chat_id = mtstream.readTLInt(); - result.append("chat_id:" + QString::number(chat_id, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == HelpAppChangelog::CtorHelpAppChangelogEmpty) || + (ctor == HelpAppChangelog::CtorHelpAppChangelog)); + + if(ctor == HelpAppChangelog::CtorHelpAppChangelogEmpty) + result.append("HelpAppChangelogEmpty"); + else if(ctor == HelpAppChangelog::CtorHelpAppChangelog) + { + result.append("HelpAppChangelog#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } } -void MTProtoDecompiler::decompile_messagesSearchGlobal(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessageEntity(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSearchGlobal)); - result.append("messagesSearchGlobal("); - TLString q = mtstream.readTLString(); - result.append("q:" + thethis->printableString(q)); - result.append(", "); - TLInt offset_date = mtstream.readTLInt(); - result.append("offset_date:" + QString::number(offset_date, 16)); - result.append(", "); - result.append("offset_peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt offset_id = mtstream.readTLInt(); - result.append("offset_id:" + QString::number(offset_id, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessageEntity::CtorMessageEntityUnknown) || + (ctor == MessageEntity::CtorMessageEntityMention) || + (ctor == MessageEntity::CtorMessageEntityHashtag) || + (ctor == MessageEntity::CtorMessageEntityBotCommand) || + (ctor == MessageEntity::CtorMessageEntityUrl) || + (ctor == MessageEntity::CtorMessageEntityEmail) || + (ctor == MessageEntity::CtorMessageEntityBold) || + (ctor == MessageEntity::CtorMessageEntityItalic) || + (ctor == MessageEntity::CtorMessageEntityCode) || + (ctor == MessageEntity::CtorMessageEntityPre) || + (ctor == MessageEntity::CtorMessageEntityTextUrl) || + (ctor == MessageEntity::CtorMessageEntityMentionName) || + (ctor == MessageEntity::CtorInputMessageEntityMentionName)); + + if(ctor == MessageEntity::CtorMessageEntityUnknown) + { + result.append("MessageEntityUnknown#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityMention) + { + result.append("MessageEntityMention#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityHashtag) + { + result.append("MessageEntityHashtag#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityBotCommand) + { + result.append("MessageEntityBotCommand#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityUrl) + { + result.append("MessageEntityUrl#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityEmail) + { + result.append("MessageEntityEmail#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityBold) + { + result.append("MessageEntityBold#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityItalic) + { + result.append("MessageEntityItalic#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityCode) + { + result.append("MessageEntityCode#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == MessageEntity::CtorMessageEntityPre) + { + result.append("MessageEntityPre#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + result.append(", "); + TLString language = mtstream.readTLString(); + result.append("language:" + thethis->printableString(language)); + } + else if(ctor == MessageEntity::CtorMessageEntityTextUrl) + { + result.append("MessageEntityTextUrl#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + result.append(", "); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + } + else if(ctor == MessageEntity::CtorMessageEntityMentionName) + { + result.append("MessageEntityMentionName#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + result.append(", "); + TLInt user_id_messageentitymentionname = mtstream.readTLInt(); + result.append("user_id_messageentitymentionname:" + QString::number(user_id_messageentitymentionname, 16)); + } + else if(ctor == MessageEntity::CtorInputMessageEntityMentionName) + { + result.append("InputMessageEntityMentionName#"); + TLInt offset = mtstream.readTLInt(); + result.append("offset:" + QString::number(offset, 16)); + result.append(", "); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + result.append(", "); + result.append("user_id_inputmessageentitymentionname:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_messagesReorderStickerSets(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReorderStickerSets)); - result.append("messagesReorderStickerSets("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_masks:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("order:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesGetDocumentByHash(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == InputChannel::CtorInputChannelEmpty) || + (ctor == InputChannel::CtorInputChannel)); - Q_ASSERT((ctor == TLTypes::messagesGetDocumentByHash)); - result.append("messagesGetDocumentByHash("); - TLBytes sha256 = mtstream.readTLBytes(); - result.append("sha256:" + thethis->printableString(sha256)); - result.append(", "); - TLInt size = mtstream.readTLInt(); - result.append("size:" + QString::number(size, 16)); - result.append(", "); - TLString mime_type = mtstream.readTLString(); - result.append("mime_type:" + thethis->printableString(mime_type)); - result.append(")"); + if(ctor == InputChannel::CtorInputChannelEmpty) + result.append("InputChannelEmpty"); + else if(ctor == InputChannel::CtorInputChannel) + { + result.append("InputChannel#"); + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } } -void MTProtoDecompiler::decompile_messagesSearchGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsResolvedPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSearchGifs)); - result.append("messagesSearchGifs("); - TLString q = mtstream.readTLString(); - result.append("q:" + thethis->printableString(q)); - result.append(", "); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesGetSavedGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesGetSavedGifs)); - result.append("messagesGetSavedGifs("); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSaveGif(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSaveGif)); - result.append("messagesSaveGif("); - result.append("id:"); - MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); - TLBool is_unsave = mtstream.readTLBool(); - result.append("is_unsave:" + QString::number(is_unsave, 16)); - result.append(")"); + Q_ASSERT((ctor == ContactsResolvedPeer::CtorContactsResolvedPeer)); + + if(ctor == ContactsResolvedPeer::CtorContactsResolvedPeer) + { + result.append("ContactsResolvedPeer#"); + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesGetInlineBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessageRange(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetInlineBotResults)); - result.append("messagesGetInlineBotResults("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("bot:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 0)) + Q_ASSERT((ctor == MessageRange::CtorMessageRange)); + + if(ctor == MessageRange::CtorMessageRange) { - result.append("geo_point:"); - MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); + result.append("MessageRange#"); + TLInt min_id = mtstream.readTLInt(); + result.append("min_id:" + QString::number(min_id, 16)); + result.append(", "); + TLInt max_id = mtstream.readTLInt(); + result.append("max_id:" + QString::number(max_id, 16)); } - TLString query = mtstream.readTLString(); - result.append("query:" + thethis->printableString(query)); - result.append(", "); - TLString offset = mtstream.readTLString(); - result.append("offset:" + thethis->printableString(offset)); - result.append(")"); } -void MTProtoDecompiler::decompile_messagesSetInlineBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_UpdatesChannelDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSetInlineBotResults)); - result.append("messagesSetInlineBotResults("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_gallery:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_private:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); - result.append(", "); - result.append("results:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(", "); - TLInt cache_time = mtstream.readTLInt(); - result.append("cache_time:" + QString::number(cache_time, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 2)) + Q_ASSERT((ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceEmpty) || + (ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceTooLong) || + (ctor == UpdatesChannelDifference::CtorUpdatesChannelDifference)); + + if(ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceEmpty) { - TLString next_offset = mtstream.readTLString(); - result.append("next_offset:" + thethis->printableString(next_offset)); + result.append("UpdatesChannelDifferenceEmpty#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_final:" + BIT_FIELD_VALUE(flags, 0)); result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLInt timeout = mtstream.readTLInt(); + result.append("timeout:" + QString::number(timeout, 16)); + } } - if(IS_FLAG_SET(flags, 3)) + else if(ctor == UpdatesChannelDifference::CtorUpdatesChannelDifferenceTooLong) { - result.append("switch_pm:"); - MTProtoDecompiler::decompile_InlineBotSwitchPM(thethis, result, mtstream); + result.append("UpdatesChannelDifferenceTooLong#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_final:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLInt timeout = mtstream.readTLInt(); + result.append("timeout:" + QString::number(timeout, 16)); + result.append(", "); + } + TLInt top_message = mtstream.readTLInt(); + result.append("top_message:" + QString::number(top_message, 16)); + result.append(", "); + TLInt read_inbox_max_id = mtstream.readTLInt(); + result.append("read_inbox_max_id:" + QString::number(read_inbox_max_id, 16)); + result.append(", "); + TLInt read_outbox_max_id = mtstream.readTLInt(); + result.append("read_outbox_max_id:" + QString::number(read_outbox_max_id, 16)); + result.append(", "); + TLInt unread_count = mtstream.readTLInt(); + result.append("unread_count:" + QString::number(unread_count, 16)); + result.append(", "); + result.append("messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } + else if(ctor == UpdatesChannelDifference::CtorUpdatesChannelDifference) + { + result.append("UpdatesChannelDifference#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_final:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLInt pts = mtstream.readTLInt(); + result.append("pts:" + QString::number(pts, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLInt timeout = mtstream.readTLInt(); + result.append("timeout:" + QString::number(timeout, 16)); + result.append(", "); + } + result.append("new_messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("other_updates:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); } - result.append(")"); } -void MTProtoDecompiler::decompile_messagesSendInlineBotResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChannelMessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSendInlineBotResult)); - result.append("messagesSendInlineBotResult("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 5)); - result.append(", "); - result.append("is_background:" + BIT_FIELD_VALUE(flags, 6)); - result.append(", "); - result.append("is_clear_draft:" + BIT_FIELD_VALUE(flags, 7)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 0)) + Q_ASSERT((ctor == ChannelMessagesFilter::CtorChannelMessagesFilterEmpty) || + (ctor == ChannelMessagesFilter::CtorChannelMessagesFilter)); + + if(ctor == ChannelMessagesFilter::CtorChannelMessagesFilterEmpty) + result.append("ChannelMessagesFilterEmpty"); + else if(ctor == ChannelMessagesFilter::CtorChannelMessagesFilter) { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append("ChannelMessagesFilter#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_exclude_new_messages:" + BIT_FIELD_VALUE(flags, 1)); result.append(", "); + result.append("ranges:"); + thethis->decompileTLVectorEx(result, mtstream, false); } - TLLong random_id = mtstream.readTLLong(); - result.append("random_id:" + QString::number(random_id, 16)); - result.append(", "); - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); - result.append(", "); - TLString id = mtstream.readTLString(); - result.append("id:" + thethis->printableString(id)); - result.append(")"); } -void MTProtoDecompiler::decompile_messagesGetMessageEditData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetMessageEditData)); - result.append("messagesGetMessageEditData("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesEditMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesEditMessage)); - result.append("messagesEditMessage("); - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); + Q_ASSERT((ctor == ChannelParticipant::CtorChannelParticipant) || + (ctor == ChannelParticipant::CtorChannelParticipantSelf) || + (ctor == ChannelParticipant::CtorChannelParticipantModerator) || + (ctor == ChannelParticipant::CtorChannelParticipantEditor) || + (ctor == ChannelParticipant::CtorChannelParticipantKicked) || + (ctor == ChannelParticipant::CtorChannelParticipantCreator)); - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 11)) + if(ctor == ChannelParticipant::CtorChannelParticipant) { - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); + result.append("ChannelParticipant#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } - if(IS_FLAG_SET(flags, 2)) + else if(ctor == ChannelParticipant::CtorChannelParticipantSelf) { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + result.append("ChannelParticipantSelf#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt inviter_id = mtstream.readTLInt(); + result.append("inviter_id:" + QString::number(inviter_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } - if(IS_FLAG_SET(flags, 3)) + else if(ctor == ChannelParticipant::CtorChannelParticipantModerator) { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("ChannelParticipantModerator#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt inviter_id = mtstream.readTLInt(); + result.append("inviter_id:" + QString::number(inviter_id, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesEditInlineBotMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::messagesEditInlineBotMessage)); - result.append("messagesEditInlineBotMessage("); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("id:"); - MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); - if(IS_FLAG_SET(flags, 11)) + else if(ctor == ChannelParticipant::CtorChannelParticipantEditor) { - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); + result.append("ChannelParticipantEditor#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt inviter_id = mtstream.readTLInt(); + result.append("inviter_id:" + QString::number(inviter_id, 16)); result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } - if(IS_FLAG_SET(flags, 2)) + else if(ctor == ChannelParticipant::CtorChannelParticipantKicked) { - result.append("reply_markup:"); - MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + result.append("ChannelParticipantKicked#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt kicked_by = mtstream.readTLInt(); + result.append("kicked_by:" + QString::number(kicked_by, 16)); + result.append(", "); + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); } - if(IS_FLAG_SET(flags, 3)) + else if(ctor == ChannelParticipant::CtorChannelParticipantCreator) { - result.append("entities:"); - thethis->decompileTLVectorEx(result, mtstream, false); + result.append("ChannelParticipantCreator#"); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); } - result.append(")"); } -void MTProtoDecompiler::decompile_messagesGetBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChannelParticipantsFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetBotCallbackAnswer)); - result.append("messagesGetBotCallbackAnswer("); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_game:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt msg_id = mtstream.readTLInt(); - result.append("msg_id:" + QString::number(msg_id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) + if(ctor == TLTypes::Null) { - TLBytes data = mtstream.readTLBytes(); - result.append("data:" + thethis->printableString(data)); + result.append("Null"); + return; } - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSetBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSetBotCallbackAnswer)); - result.append("messagesSetBotCallbackAnswer("); - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); + Q_ASSERT((ctor == ChannelParticipantsFilter::CtorChannelParticipantsRecent) || + (ctor == ChannelParticipantsFilter::CtorChannelParticipantsAdmins) || + (ctor == ChannelParticipantsFilter::CtorChannelParticipantsKicked) || + (ctor == ChannelParticipantsFilter::CtorChannelParticipantsBots)); - result.append("is_alert:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLLong query_id = mtstream.readTLLong(); - result.append("query_id:" + QString::number(query_id, 16)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) - { - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(", "); - } - if(IS_FLAG_SET(flags, 2)) - { - TLString url = mtstream.readTLString(); - result.append("url:" + thethis->printableString(url)); - } - result.append(")"); + if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsRecent) + result.append("ChannelParticipantsRecent"); + else if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsAdmins) + result.append("ChannelParticipantsAdmins"); + else if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsKicked) + result.append("ChannelParticipantsKicked"); + else if(ctor == ChannelParticipantsFilter::CtorChannelParticipantsBots) + result.append("ChannelParticipantsBots"); } -void MTProtoDecompiler::decompile_messagesGetPeerDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChannelParticipantRole(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetPeerDialogs)); - result.append("messagesGetPeerDialogs("); - result.append("peers:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == ChannelParticipantRole::CtorChannelRoleEmpty) || + (ctor == ChannelParticipantRole::CtorChannelRoleModerator) || + (ctor == ChannelParticipantRole::CtorChannelRoleEditor)); + + if(ctor == ChannelParticipantRole::CtorChannelRoleEmpty) + result.append("ChannelRoleEmpty"); + else if(ctor == ChannelParticipantRole::CtorChannelRoleModerator) + result.append("ChannelRoleModerator"); + else if(ctor == ChannelParticipantRole::CtorChannelRoleEditor) + result.append("ChannelRoleEditor"); } -void MTProtoDecompiler::decompile_messagesSaveDraft(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChannelsChannelParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSaveDraft)); - result.append("messagesSaveDraft("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - if(IS_FLAG_SET(flags, 0)) + Q_ASSERT((ctor == ChannelsChannelParticipants::CtorChannelsChannelParticipants)); + + if(ctor == ChannelsChannelParticipants::CtorChannelsChannelParticipants) { - TLInt reply_to_msg_id = mtstream.readTLInt(); - result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append("ChannelsChannelParticipants#"); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); result.append(", "); - } - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLString message = mtstream.readTLString(); - result.append("message:" + thethis->printableString(message)); - result.append(", "); - if(IS_FLAG_SET(flags, 3)) - { - result.append("entities:"); + result.append("participants:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); thethis->decompileTLVectorEx(result, mtstream, false); } - result.append(")"); } -void MTProtoDecompiler::decompile_messagesGetAllDrafts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ChannelsChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetAllDrafts)); - result.append("messagesGetAllDrafts()"); -} - -void MTProtoDecompiler::decompile_messagesGetFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesGetFeaturedStickers)); - result.append("messagesGetFeaturedStickers("); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesReadFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesReadFeaturedStickers)); - result.append("messagesReadFeaturedStickers("); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + Q_ASSERT((ctor == ChannelsChannelParticipant::CtorChannelsChannelParticipant)); + + if(ctor == ChannelsChannelParticipant::CtorChannelsChannelParticipant) + { + result.append("ChannelsChannelParticipant#"); + result.append("participant:"); + MTProtoDecompiler::decompile_ChannelParticipant(thethis, result, mtstream); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesGetRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_HelpTermsOfService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetRecentStickers)); - result.append("messagesGetRecentStickers("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_attached:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); + Q_ASSERT((ctor == HelpTermsOfService::CtorHelpTermsOfService)); + + if(ctor == HelpTermsOfService::CtorHelpTermsOfService) + { + result.append("HelpTermsOfService#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + } } -void MTProtoDecompiler::decompile_messagesSaveRecentSticker(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_FoundGif(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSaveRecentSticker)); - result.append("messagesSaveRecentSticker("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_attached:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("id:"); - MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); - TLBool is_unsave = mtstream.readTLBool(); - result.append("is_unsave:" + QString::number(is_unsave, 16)); - result.append(")"); + Q_ASSERT((ctor == FoundGif::CtorFoundGif) || + (ctor == FoundGif::CtorFoundGifCached)); + + if(ctor == FoundGif::CtorFoundGif) + { + result.append("FoundGif#"); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + TLString thumb_url = mtstream.readTLString(); + result.append("thumb_url:" + thethis->printableString(thumb_url)); + result.append(", "); + TLString content_url = mtstream.readTLString(); + result.append("content_url:" + thethis->printableString(content_url)); + result.append(", "); + TLString content_type = mtstream.readTLString(); + result.append("content_type:" + thethis->printableString(content_type)); + result.append(", "); + TLInt w = mtstream.readTLInt(); + result.append("w:" + QString::number(w, 16)); + result.append(", "); + TLInt h = mtstream.readTLInt(); + result.append("h:" + QString::number(h, 16)); + } + else if(ctor == FoundGif::CtorFoundGifCached) + { + result.append("FoundGifCached#"); + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + result.append("document:"); + MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_messagesClearRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesFoundGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesClearRecentStickers)); - result.append("messagesClearRecentStickers("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_attached:" + BIT_FIELD_VALUE(flags, 0)); - result.append(")"); + Q_ASSERT((ctor == MessagesFoundGifs::CtorMessagesFoundGifs)); + + if(ctor == MessagesFoundGifs::CtorMessagesFoundGifs) + { + result.append("MessagesFoundGifs#"); + TLInt next_offset = mtstream.readTLInt(); + result.append("next_offset:" + QString::number(next_offset, 16)); + result.append(", "); + result.append("results:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesGetArchivedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesSavedGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetArchivedStickers)); - result.append("messagesGetArchivedStickers("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_masks:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - TLLong offset_id = mtstream.readTLLong(); - result.append("offset_id:" + QString::number(offset_id, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + Q_ASSERT((ctor == MessagesSavedGifs::CtorMessagesSavedGifsNotModified) || + (ctor == MessagesSavedGifs::CtorMessagesSavedGifs)); + + if(ctor == MessagesSavedGifs::CtorMessagesSavedGifsNotModified) + result.append("MessagesSavedGifsNotModified"); + else if(ctor == MessagesSavedGifs::CtorMessagesSavedGifs) + { + result.append("MessagesSavedGifs#"); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(", "); + result.append("gifs:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_messagesGetMaskStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputBotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetMaskStickers)); - result.append("messagesGetMaskStickers("); - TLInt hash = mtstream.readTLInt(); - result.append("hash:" + QString::number(hash, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaAuto) || + (ctor == InputBotInlineMessage::CtorInputBotInlineMessageText) || + (ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaGeo) || + (ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaVenue) || + (ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaContact) || + (ctor == InputBotInlineMessage::CtorInputBotInlineMessageGame)); + + if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaAuto) + { + result.append("InputBotInlineMessageMediaAuto#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageText) + { + result.append("InputBotInlineMessageText#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaGeo) + { + result.append("InputBotInlineMessageMediaGeo#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("geo_point:"); + MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaVenue) + { + result.append("InputBotInlineMessageMediaVenue#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("geo_point:"); + MTProtoDecompiler::decompile_InputGeoPoint(thethis, result, mtstream); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString address = mtstream.readTLString(); + result.append("address:" + thethis->printableString(address)); + result.append(", "); + TLString provider = mtstream.readTLString(); + result.append("provider:" + thethis->printableString(provider)); + result.append(", "); + TLString venue_id = mtstream.readTLString(); + result.append("venue_id:" + thethis->printableString(venue_id)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageMediaContact) + { + result.append("InputBotInlineMessageMediaContact#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == InputBotInlineMessage::CtorInputBotInlineMessageGame) + { + result.append("InputBotInlineMessageGame#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } } -void MTProtoDecompiler::decompile_messagesGetAttachedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputBotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetAttachedStickers)); - result.append("messagesGetAttachedStickers("); - result.append("media:"); - MTProtoDecompiler::decompile_InputStickeredMedia(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_messagesSetGameScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::messagesSetGameScore)); - result.append("messagesSetGameScore("); - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); + Q_ASSERT((ctor == InputBotInlineResult::CtorInputBotInlineResult) || + (ctor == InputBotInlineResult::CtorInputBotInlineResultPhoto) || + (ctor == InputBotInlineResult::CtorInputBotInlineResultDocument) || + (ctor == InputBotInlineResult::CtorInputBotInlineResultGame)); - result.append("is_edit_message:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLInt score = mtstream.readTLInt(); - result.append("score:" + QString::number(score, 16)); - result.append(")"); + if(ctor == InputBotInlineResult::CtorInputBotInlineResult) + { + result.append("InputBotInlineResult#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(", "); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 4)) + { + TLString thumb_url = mtstream.readTLString(); + result.append("thumb_url:" + thethis->printableString(thumb_url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + TLString content_url = mtstream.readTLString(); + result.append("content_url:" + thethis->printableString(content_url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + TLString content_type = mtstream.readTLString(); + result.append("content_type:" + thethis->printableString(content_type)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 6)) + { + TLInt w = mtstream.readTLInt(); + result.append("w:" + QString::number(w, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 6)) + { + TLInt h = mtstream.readTLInt(); + result.append("h:" + QString::number(h, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 7)) + { + TLInt duration = mtstream.readTLInt(); + result.append("duration:" + QString::number(duration, 16)); + result.append(", "); + } + result.append("send_message:"); + MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); + } + else if(ctor == InputBotInlineResult::CtorInputBotInlineResultPhoto) + { + result.append("InputBotInlineResultPhoto#"); + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(", "); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); + result.append("send_message:"); + MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); + } + else if(ctor == InputBotInlineResult::CtorInputBotInlineResultDocument) + { + result.append("InputBotInlineResultDocument#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(", "); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + } + result.append("document:"); + MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); + result.append("send_message:"); + MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); + } + else if(ctor == InputBotInlineResult::CtorInputBotInlineResultGame) + { + result.append("InputBotInlineResultGame#"); + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(", "); + TLString short_name = mtstream.readTLString(); + result.append("short_name:" + thethis->printableString(short_name)); + result.append(", "); + result.append("send_message:"); + MTProtoDecompiler::decompile_InputBotInlineMessage(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_messagesSetInlineGameScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_BotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesSetInlineGameScore)); - result.append("messagesSetInlineGameScore("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_edit_message:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("id:"); - MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLInt score = mtstream.readTLInt(); - result.append("score:" + QString::number(score, 16)); - result.append(")"); + Q_ASSERT((ctor == BotInlineMessage::CtorBotInlineMessageMediaAuto) || + (ctor == BotInlineMessage::CtorBotInlineMessageText) || + (ctor == BotInlineMessage::CtorBotInlineMessageMediaGeo) || + (ctor == BotInlineMessage::CtorBotInlineMessageMediaVenue) || + (ctor == BotInlineMessage::CtorBotInlineMessageMediaContact)); + + if(ctor == BotInlineMessage::CtorBotInlineMessageMediaAuto) + { + result.append("BotInlineMessageMediaAuto#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString caption = mtstream.readTLString(); + result.append("caption:" + thethis->printableString(caption)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == BotInlineMessage::CtorBotInlineMessageText) + { + result.append("BotInlineMessageText#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == BotInlineMessage::CtorBotInlineMessageMediaGeo) + { + result.append("BotInlineMessageMediaGeo#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("geo:"); + MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == BotInlineMessage::CtorBotInlineMessageMediaVenue) + { + result.append("BotInlineMessageMediaVenue#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("geo:"); + MTProtoDecompiler::decompile_GeoPoint(thethis, result, mtstream); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString address = mtstream.readTLString(); + result.append("address:" + thethis->printableString(address)); + result.append(", "); + TLString provider = mtstream.readTLString(); + result.append("provider:" + thethis->printableString(provider)); + result.append(", "); + TLString venue_id = mtstream.readTLString(); + result.append("venue_id:" + thethis->printableString(venue_id)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } + else if(ctor == BotInlineMessage::CtorBotInlineMessageMediaContact) + { + result.append("BotInlineMessageMediaContact#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLString first_name = mtstream.readTLString(); + result.append("first_name:" + thethis->printableString(first_name)); + result.append(", "); + TLString last_name = mtstream.readTLString(); + result.append("last_name:" + thethis->printableString(last_name)); + result.append(", "); + if(IS_FLAG_SET(flags, 2)) + { + result.append("reply_markup:"); + MTProtoDecompiler::decompile_ReplyMarkup(thethis, result, mtstream); + } + } } -void MTProtoDecompiler::decompile_messagesGetGameHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_BotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetGameHighScores)); - result.append("messagesGetGameHighScores("); - result.append("peer:"); - MTProtoDecompiler::decompile_InputPeer(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); - result.append(", "); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == BotInlineResult::CtorBotInlineResult) || + (ctor == BotInlineResult::CtorBotInlineMediaResult)); + + if(ctor == BotInlineResult::CtorBotInlineResult) + { + result.append("BotInlineResult#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(", "); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 4)) + { + TLString thumb_url = mtstream.readTLString(); + result.append("thumb_url:" + thethis->printableString(thumb_url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + TLString content_url = mtstream.readTLString(); + result.append("content_url:" + thethis->printableString(content_url)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 5)) + { + TLString content_type = mtstream.readTLString(); + result.append("content_type:" + thethis->printableString(content_type)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 6)) + { + TLInt w = mtstream.readTLInt(); + result.append("w:" + QString::number(w, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 6)) + { + TLInt h = mtstream.readTLInt(); + result.append("h:" + QString::number(h, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 7)) + { + TLInt duration = mtstream.readTLInt(); + result.append("duration:" + QString::number(duration, 16)); + result.append(", "); + } + result.append("send_message:"); + MTProtoDecompiler::decompile_BotInlineMessage(thethis, result, mtstream); + } + else if(ctor == BotInlineResult::CtorBotInlineMediaResult) + { + result.append("BotInlineMediaResult#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLString id = mtstream.readTLString(); + result.append("id:" + thethis->printableString(id)); + result.append(", "); + TLString type = mtstream.readTLString(); + result.append("type:" + thethis->printableString(type)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 1)) + { + result.append("document:"); + MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 3)) + { + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + } + result.append("send_message:"); + MTProtoDecompiler::decompile_BotInlineMessage(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_messagesGetInlineGameHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::messagesGetInlineGameHighScores)); - result.append("messagesGetInlineGameHighScores("); - result.append("id:"); - MTProtoDecompiler::decompile_InputBotInlineMessageID(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_updatesGetState(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::updatesGetState)); - result.append("updatesGetState()"); -} - -void MTProtoDecompiler::decompile_updatesGetDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::updatesGetDifference)); - result.append("updatesGetDifference("); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt date = mtstream.readTLInt(); - result.append("date:" + QString::number(date, 16)); - result.append(", "); - TLInt qts = mtstream.readTLInt(); - result.append("qts:" + QString::number(qts, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_updatesGetChannelDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == MessagesBotResults::CtorMessagesBotResults)); - Q_ASSERT((ctor == TLTypes::updatesGetChannelDifference)); - result.append("updatesGetChannelDifference("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("filter:"); - MTProtoDecompiler::decompile_ChannelMessagesFilter(thethis, result, mtstream); - TLInt pts = mtstream.readTLInt(); - result.append("pts:" + QString::number(pts, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + if(ctor == MessagesBotResults::CtorMessagesBotResults) + { + result.append("MessagesBotResults#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_gallery:" + BIT_FIELD_VALUE(flags, 0)); + result.append(", "); + TLLong query_id = mtstream.readTLLong(); + result.append("query_id:" + QString::number(query_id, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLString next_offset = mtstream.readTLString(); + result.append("next_offset:" + thethis->printableString(next_offset)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + result.append("switch_pm:"); + MTProtoDecompiler::decompile_InlineBotSwitchPM(thethis, result, mtstream); + } + result.append("results:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_photosUpdateProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ExportedMessageLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::photosUpdateProfilePhoto)); - result.append("photosUpdateProfilePhoto("); - result.append("id:"); - MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_photosUploadProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::photosUploadProfilePhoto)); - result.append("photosUploadProfilePhoto("); - result.append("file:"); - MTProtoDecompiler::decompile_InputFile(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_photosDeletePhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::photosDeletePhotos)); - result.append("photosDeletePhotos("); - result.append("id:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); -} - -void MTProtoDecompiler::decompile_photosGetUserPhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + Q_ASSERT((ctor == ExportedMessageLink::CtorExportedMessageLink)); - Q_ASSERT((ctor == TLTypes::photosGetUserPhotos)); - result.append("photosGetUserPhotos("); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLLong max_id = mtstream.readTLLong(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + if(ctor == ExportedMessageLink::CtorExportedMessageLink) + { + result.append("ExportedMessageLink#"); + TLString link = mtstream.readTLString(); + result.append("link:" + thethis->printableString(link)); + } } -void MTProtoDecompiler::decompile_uploadSaveFilePart(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessageFwdHeader(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::uploadSaveFilePart)); - result.append("uploadSaveFilePart("); - TLLong file_id = mtstream.readTLLong(); - result.append("file_id:" + QString::number(file_id, 16)); - result.append(", "); - TLInt file_part = mtstream.readTLInt(); - result.append("file_part:" + QString::number(file_part, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_uploadGetFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::uploadGetFile)); - result.append("uploadGetFile("); - result.append("location:"); - MTProtoDecompiler::decompile_InputFileLocation(thethis, result, mtstream); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_uploadSaveBigFilePart(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::uploadSaveBigFilePart)); - result.append("uploadSaveBigFilePart("); - TLLong file_id = mtstream.readTLLong(); - result.append("file_id:" + QString::number(file_id, 16)); - result.append(", "); - TLInt file_part = mtstream.readTLInt(); - result.append("file_part:" + QString::number(file_part, 16)); - result.append(", "); - TLInt file_total_parts = mtstream.readTLInt(); - result.append("file_total_parts:" + QString::number(file_total_parts, 16)); - result.append(", "); - TLBytes bytes = mtstream.readTLBytes(); - result.append("bytes:" + thethis->printableString(bytes)); - result.append(")"); + Q_ASSERT((ctor == MessageFwdHeader::CtorMessageFwdHeader)); + + if(ctor == MessageFwdHeader::CtorMessageFwdHeader) + { + result.append("MessageFwdHeader#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + if(IS_FLAG_SET(flags, 0)) + { + TLInt from_id = mtstream.readTLInt(); + result.append("from_id:" + QString::number(from_id, 16)); + result.append(", "); + } + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + result.append(", "); + if(IS_FLAG_SET(flags, 1)) + { + TLInt channel_id = mtstream.readTLInt(); + result.append("channel_id:" + QString::number(channel_id, 16)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLInt channel_post = mtstream.readTLInt(); + result.append("channel_post:" + QString::number(channel_post, 16)); + } + } } -void MTProtoDecompiler::decompile_helpGetConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AuthCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetConfig)); - result.append("helpGetConfig()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == AuthCodeType::CtorAuthCodeTypeSms) || + (ctor == AuthCodeType::CtorAuthCodeTypeCall) || + (ctor == AuthCodeType::CtorAuthCodeTypeFlashCall)); + + if(ctor == AuthCodeType::CtorAuthCodeTypeSms) + result.append("AuthCodeTypeSms"); + else if(ctor == AuthCodeType::CtorAuthCodeTypeCall) + result.append("AuthCodeTypeCall"); + else if(ctor == AuthCodeType::CtorAuthCodeTypeFlashCall) + result.append("AuthCodeTypeFlashCall"); } -void MTProtoDecompiler::decompile_helpGetNearestDc(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_AuthSentCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetNearestDc)); - result.append("helpGetNearestDc()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == AuthSentCodeType::CtorAuthSentCodeTypeApp) || + (ctor == AuthSentCodeType::CtorAuthSentCodeTypeSms) || + (ctor == AuthSentCodeType::CtorAuthSentCodeTypeCall) || + (ctor == AuthSentCodeType::CtorAuthSentCodeTypeFlashCall)); + + if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeApp) + { + result.append("AuthSentCodeTypeApp#"); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeSms) + { + result.append("AuthSentCodeTypeSms#"); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeCall) + { + result.append("AuthSentCodeTypeCall#"); + TLInt length = mtstream.readTLInt(); + result.append("length:" + QString::number(length, 16)); + } + else if(ctor == AuthSentCodeType::CtorAuthSentCodeTypeFlashCall) + { + result.append("AuthSentCodeTypeFlashCall#"); + TLString pattern = mtstream.readTLString(); + result.append("pattern:" + thethis->printableString(pattern)); + } } -void MTProtoDecompiler::decompile_helpGetAppUpdate(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetAppUpdate)); - result.append("helpGetAppUpdate()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesBotCallbackAnswer::CtorMessagesBotCallbackAnswer)); + + if(ctor == MessagesBotCallbackAnswer::CtorMessagesBotCallbackAnswer) + { + result.append("MessagesBotCallbackAnswer#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_alert:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + result.append("has_url:" + BIT_FIELD_VALUE(flags, 3)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + } + if(IS_FLAG_SET(flags, 2)) + { + TLString url = mtstream.readTLString(); + result.append("url:" + thethis->printableString(url)); + } + } } -void MTProtoDecompiler::decompile_helpSaveAppLog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesMessageEditData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpSaveAppLog)); - result.append("helpSaveAppLog("); - result.append("events:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesMessageEditData::CtorMessagesMessageEditData)); + + if(ctor == MessagesMessageEditData::CtorMessagesMessageEditData) + { + result.append("MessagesMessageEditData#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_caption:" + BIT_FIELD_VALUE(flags, 0)); + } } -void MTProtoDecompiler::decompile_helpGetInviteText(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputBotInlineMessageID(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetInviteText)); - result.append("helpGetInviteText()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputBotInlineMessageID::CtorInputBotInlineMessageID)); + + if(ctor == InputBotInlineMessageID::CtorInputBotInlineMessageID) + { + result.append("InputBotInlineMessageID#"); + TLInt dc_id = mtstream.readTLInt(); + result.append("dc_id:" + QString::number(dc_id, 16)); + result.append(", "); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } } -void MTProtoDecompiler::decompile_helpGetSupport(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InlineBotSwitchPM(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetSupport)); - result.append("helpGetSupport()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InlineBotSwitchPM::CtorInlineBotSwitchPM)); + + if(ctor == InlineBotSwitchPM::CtorInlineBotSwitchPM) + { + result.append("InlineBotSwitchPM#"); + TLString text = mtstream.readTLString(); + result.append("text:" + thethis->printableString(text)); + result.append(", "); + TLString start_param = mtstream.readTLString(); + result.append("start_param:" + thethis->printableString(start_param)); + } } -void MTProtoDecompiler::decompile_helpGetAppChangelog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesPeerDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetAppChangelog)); - result.append("helpGetAppChangelog()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesPeerDialogs::CtorMessagesPeerDialogs)); + + if(ctor == MessagesPeerDialogs::CtorMessagesPeerDialogs) + { + result.append("MessagesPeerDialogs#"); + result.append("dialogs:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("messages:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("state:"); + MTProtoDecompiler::decompile_UpdatesState(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_helpGetTermsOfService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_TopPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::helpGetTermsOfService)); - result.append("helpGetTermsOfService()"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == TopPeer::CtorTopPeer)); + + if(ctor == TopPeer::CtorTopPeer) + { + result.append("TopPeer#"); + result.append("peer:"); + MTProtoDecompiler::decompile_Peer(thethis, result, mtstream); + TLDouble rating = mtstream.readTLDouble(); + result.append("rating:" + QString::number(rating)); + } } -void MTProtoDecompiler::decompile_channelsReadHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_TopPeerCategory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsReadHistory)); - result.append("channelsReadHistory("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLInt max_id = mtstream.readTLInt(); - result.append("max_id:" + QString::number(max_id, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == TopPeerCategory::CtorTopPeerCategoryBotsPM) || + (ctor == TopPeerCategory::CtorTopPeerCategoryBotsInline) || + (ctor == TopPeerCategory::CtorTopPeerCategoryCorrespondents) || + (ctor == TopPeerCategory::CtorTopPeerCategoryGroups) || + (ctor == TopPeerCategory::CtorTopPeerCategoryChannels)); + + if(ctor == TopPeerCategory::CtorTopPeerCategoryBotsPM) + result.append("TopPeerCategoryBotsPM"); + else if(ctor == TopPeerCategory::CtorTopPeerCategoryBotsInline) + result.append("TopPeerCategoryBotsInline"); + else if(ctor == TopPeerCategory::CtorTopPeerCategoryCorrespondents) + result.append("TopPeerCategoryCorrespondents"); + else if(ctor == TopPeerCategory::CtorTopPeerCategoryGroups) + result.append("TopPeerCategoryGroups"); + else if(ctor == TopPeerCategory::CtorTopPeerCategoryChannels) + result.append("TopPeerCategoryChannels"); } -void MTProtoDecompiler::decompile_channelsDeleteMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_TopPeerCategoryPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsDeleteMessages)); - result.append("channelsDeleteMessages("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == TopPeerCategoryPeers::CtorTopPeerCategoryPeers)); + + if(ctor == TopPeerCategoryPeers::CtorTopPeerCategoryPeers) + { + result.append("TopPeerCategoryPeers#"); + result.append("category:"); + MTProtoDecompiler::decompile_TopPeerCategory(thethis, result, mtstream); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); + result.append(", "); + result.append("peers:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsDeleteUserHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ContactsTopPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsDeleteUserHistory)); - result.append("channelsDeleteUserHistory("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_channelsReportSpam(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::channelsReportSpam)); - result.append("channelsReportSpam("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + + Q_ASSERT((ctor == ContactsTopPeers::CtorContactsTopPeersNotModified) || + (ctor == ContactsTopPeers::CtorContactsTopPeers)); + + if(ctor == ContactsTopPeers::CtorContactsTopPeersNotModified) + result.append("ContactsTopPeersNotModified"); + else if(ctor == ContactsTopPeers::CtorContactsTopPeers) + { + result.append("ContactsTopPeers#"); + result.append("categories:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("chats:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsGetMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_DraftMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsGetMessages)); - result.append("channelsGetMessages("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("id:"); - thethis->decompileTLVector(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == DraftMessage::CtorDraftMessageEmpty) || + (ctor == DraftMessage::CtorDraftMessage)); + + if(ctor == DraftMessage::CtorDraftMessageEmpty) + result.append("DraftMessageEmpty"); + else if(ctor == DraftMessage::CtorDraftMessage) + { + result.append("DraftMessage#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + result.append("is_no_webpage:" + BIT_FIELD_VALUE(flags, 1)); + result.append(", "); + if(IS_FLAG_SET(flags, 0)) + { + TLInt reply_to_msg_id = mtstream.readTLInt(); + result.append("reply_to_msg_id:" + QString::number(reply_to_msg_id, 16)); + result.append(", "); + } + TLString message = mtstream.readTLString(); + result.append("message:" + thethis->printableString(message)); + result.append(", "); + if(IS_FLAG_SET(flags, 3)) + { + result.append("entities:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + } + TLInt date = mtstream.readTLInt(); + result.append("date:" + QString::number(date, 16)); + } } -void MTProtoDecompiler::decompile_channelsGetParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsGetParticipants)); - result.append("channelsGetParticipants("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("filter:"); - MTProtoDecompiler::decompile_ChannelParticipantsFilter(thethis, result, mtstream); - TLInt offset = mtstream.readTLInt(); - result.append("offset:" + QString::number(offset, 16)); - result.append(", "); - TLInt limit = mtstream.readTLInt(); - result.append("limit:" + QString::number(limit, 16)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickersNotModified) || + (ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickers)); + + if(ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickersNotModified) + result.append("MessagesFeaturedStickersNotModified"); + else if(ctor == MessagesFeaturedStickers::CtorMessagesFeaturedStickers) + { + result.append("MessagesFeaturedStickers#"); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(", "); + result.append("sets:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("unread:"); + thethis->decompileTLVector(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsGetParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsGetParticipant)); - result.append("channelsGetParticipant("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesRecentStickers::CtorMessagesRecentStickersNotModified) || + (ctor == MessagesRecentStickers::CtorMessagesRecentStickers)); + + if(ctor == MessagesRecentStickers::CtorMessagesRecentStickersNotModified) + result.append("MessagesRecentStickersNotModified"); + else if(ctor == MessagesRecentStickers::CtorMessagesRecentStickers) + { + result.append("MessagesRecentStickers#"); + TLInt hash = mtstream.readTLInt(); + result.append("hash:" + QString::number(hash, 16)); + result.append(", "); + result.append("stickers:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsGetChannels(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesArchivedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsGetChannels)); - result.append("channelsGetChannels("); - result.append("id:"); - thethis->decompileTLVectorEx(result, mtstream, false); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesArchivedStickers::CtorMessagesArchivedStickers)); + + if(ctor == MessagesArchivedStickers::CtorMessagesArchivedStickers) + { + result.append("MessagesArchivedStickers#"); + TLInt count = mtstream.readTLInt(); + result.append("count:" + QString::number(count, 16)); + result.append(", "); + result.append("sets:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsGetFullChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesStickerSetInstallResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsGetFullChannel)); - result.append("channelsGetFullChannel("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultSuccess) || + (ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultArchive)); + + if(ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultSuccess) + result.append("MessagesStickerSetInstallResultSuccess"); + else if(ctor == MessagesStickerSetInstallResult::CtorMessagesStickerSetInstallResultArchive) + { + result.append("MessagesStickerSetInstallResultArchive#"); + result.append("sets:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsCreateChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_StickerSetCovered(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsCreateChannel)); - result.append("channelsCreateChannel("); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - result.append("is_broadcast:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("is_megagroup:" + BIT_FIELD_VALUE(flags, 1)); - result.append(", "); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(", "); - TLString about = mtstream.readTLString(); - result.append("about:" + thethis->printableString(about)); - result.append(")"); + Q_ASSERT((ctor == StickerSetCovered::CtorStickerSetCovered) || + (ctor == StickerSetCovered::CtorStickerSetMultiCovered)); + + if(ctor == StickerSetCovered::CtorStickerSetCovered) + { + result.append("StickerSetCovered#"); + result.append("set:"); + MTProtoDecompiler::decompile_StickerSet(thethis, result, mtstream); + result.append("cover:"); + MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + } + else if(ctor == StickerSetCovered::CtorStickerSetMultiCovered) + { + result.append("StickerSetMultiCovered#"); + result.append("set:"); + MTProtoDecompiler::decompile_StickerSet(thethis, result, mtstream); + result.append("covers:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsEditAbout(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MaskCoords(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsEditAbout)); - result.append("channelsEditAbout("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLString about = mtstream.readTLString(); - result.append("about:" + thethis->printableString(about)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_channelsEditAdmin(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } - Q_ASSERT((ctor == TLTypes::channelsEditAdmin)); - result.append("channelsEditAdmin("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - result.append("role:"); - MTProtoDecompiler::decompile_ChannelParticipantRole(thethis, result, mtstream); - result.append(")"); -} - -void MTProtoDecompiler::decompile_channelsEditTitle(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsEditTitle)); - result.append("channelsEditTitle("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLString title = mtstream.readTLString(); - result.append("title:" + thethis->printableString(title)); - result.append(")"); + Q_ASSERT((ctor == MaskCoords::CtorMaskCoords)); + + if(ctor == MaskCoords::CtorMaskCoords) + { + result.append("MaskCoords#"); + TLInt n = mtstream.readTLInt(); + result.append("n:" + QString::number(n, 16)); + result.append(", "); + TLDouble x = mtstream.readTLDouble(); + result.append("x:" + QString::number(x)); + result.append(", "); + TLDouble y = mtstream.readTLDouble(); + result.append("y:" + QString::number(y)); + result.append(", "); + TLDouble zoom = mtstream.readTLDouble(); + result.append("zoom:" + QString::number(zoom)); + } } -void MTProtoDecompiler::decompile_channelsEditPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputStickeredMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsEditPhoto)); - result.append("channelsEditPhoto("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("photo:"); - MTProtoDecompiler::decompile_InputChatPhoto(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputStickeredMedia::CtorInputStickeredMediaPhoto) || + (ctor == InputStickeredMedia::CtorInputStickeredMediaDocument)); + + if(ctor == InputStickeredMedia::CtorInputStickeredMediaPhoto) + { + result.append("InputStickeredMediaPhoto#"); + result.append("id_inputstickeredmediaphoto:"); + MTProtoDecompiler::decompile_InputPhoto(thethis, result, mtstream); + } + else if(ctor == InputStickeredMedia::CtorInputStickeredMediaDocument) + { + result.append("InputStickeredMediaDocument#"); + result.append("id_inputstickeredmediadocument:"); + MTProtoDecompiler::decompile_InputDocument(thethis, result, mtstream); + } } -void MTProtoDecompiler::decompile_channelsCheckUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_Game(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsCheckUsername)); - result.append("channelsCheckUsername("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == Game::CtorGame)); + + if(ctor == Game::CtorGame) + { + result.append("Game#"); + + TLInt flags = mtstream.readTLInt(); + Q_UNUSED(flags); + + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + result.append(", "); + TLString short_name = mtstream.readTLString(); + result.append("short_name:" + thethis->printableString(short_name)); + result.append(", "); + TLString title = mtstream.readTLString(); + result.append("title:" + thethis->printableString(title)); + result.append(", "); + TLString description = mtstream.readTLString(); + result.append("description:" + thethis->printableString(description)); + result.append(", "); + result.append("photo:"); + MTProtoDecompiler::decompile_Photo(thethis, result, mtstream); + if(IS_FLAG_SET(flags, 0)) + { + result.append("document:"); + MTProtoDecompiler::decompile_Document(thethis, result, mtstream); + } + } } -void MTProtoDecompiler::decompile_channelsUpdateUsername(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_InputGame(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsUpdateUsername)); - result.append("channelsUpdateUsername("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLString username = mtstream.readTLString(); - result.append("username:" + thethis->printableString(username)); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == InputGame::CtorInputGameID) || + (ctor == InputGame::CtorInputGameShortName)); + + if(ctor == InputGame::CtorInputGameID) + { + result.append("InputGameID#"); + TLLong id = mtstream.readTLLong(); + result.append("id:" + QString::number(id, 16)); + result.append(", "); + TLLong access_hash = mtstream.readTLLong(); + result.append("access_hash:" + QString::number(access_hash, 16)); + } + else if(ctor == InputGame::CtorInputGameShortName) + { + result.append("InputGameShortName#"); + result.append("bot_id:"); + MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); + TLString short_name = mtstream.readTLString(); + result.append("short_name:" + thethis->printableString(short_name)); + } } -void MTProtoDecompiler::decompile_channelsJoinChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_HighScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsJoinChannel)); - result.append("channelsJoinChannel("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == HighScore::CtorHighScore)); + + if(ctor == HighScore::CtorHighScore) + { + result.append("HighScore#"); + TLInt pos = mtstream.readTLInt(); + result.append("pos:" + QString::number(pos, 16)); + result.append(", "); + TLInt user_id = mtstream.readTLInt(); + result.append("user_id:" + QString::number(user_id, 16)); + result.append(", "); + TLInt score = mtstream.readTLInt(); + result.append("score:" + QString::number(score, 16)); + } } -void MTProtoDecompiler::decompile_channelsLeaveChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_MessagesHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsLeaveChannel)); - result.append("channelsLeaveChannel("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append(")"); + if(ctor == TLTypes::Null) + { + result.append("Null"); + return; + } + + + Q_ASSERT((ctor == MessagesHighScores::CtorMessagesHighScores)); + + if(ctor == MessagesHighScores::CtorMessagesHighScores) + { + result.append("MessagesHighScores#"); + result.append("scores:"); + thethis->decompileTLVectorEx(result, mtstream, false); + result.append(", "); + result.append("users:"); + thethis->decompileTLVectorEx(result, mtstream, false); + } } -void MTProtoDecompiler::decompile_channelsInviteToChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_reqPq(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsInviteToChannel)); - result.append("channelsInviteToChannel("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("users:"); - thethis->decompileTLVectorEx(result, mtstream, false); + Q_ASSERT((ctor == TLTypes::reqPq)); + result.append("reqPq("); + TLInt128 nonce = mtstream.readTLInt128(); + result.append("nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&nonce), sizeof(TLInt128)).toHex())); result.append(")"); } -void MTProtoDecompiler::decompile_channelsKickFromChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_reqDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsKickFromChannel)); - result.append("channelsKickFromChannel("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - result.append("user_id:"); - MTProtoDecompiler::decompile_InputUser(thethis, result, mtstream); - TLBool is_kicked = mtstream.readTLBool(); - result.append("is_kicked:" + QString::number(is_kicked, 16)); + Q_ASSERT((ctor == TLTypes::reqDHParams)); + result.append("reqDHParams("); + TLInt128 nonce = mtstream.readTLInt128(); + result.append("nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&nonce), sizeof(TLInt128)).toHex())); + result.append(", "); + TLInt128 server_nonce = mtstream.readTLInt128(); + result.append("server_nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&server_nonce), sizeof(TLInt128)).toHex())); + result.append(", "); + TLBytes p = mtstream.readTLBytes(); + result.append("p:" + thethis->printableString(p)); + result.append(", "); + TLBytes q = mtstream.readTLBytes(); + result.append("q:" + thethis->printableString(q)); + result.append(", "); + TLLong public_key_fingerprint = mtstream.readTLLong(); + result.append("public_key_fingerprint:" + QString::number(public_key_fingerprint, 16)); + result.append(", "); + TLBytes encrypted_data = mtstream.readTLBytes(); + result.append("encrypted_data:" + thethis->printableString(encrypted_data)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsExportInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_setClientDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsExportInvite)); - result.append("channelsExportInvite("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + Q_ASSERT((ctor == TLTypes::setClientDHParams)); + result.append("setClientDHParams("); + TLInt128 nonce = mtstream.readTLInt128(); + result.append("nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&nonce), sizeof(TLInt128)).toHex())); + result.append(", "); + TLInt128 server_nonce = mtstream.readTLInt128(); + result.append("server_nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&server_nonce), sizeof(TLInt128)).toHex())); + result.append(", "); + TLBytes encrypted_data = mtstream.readTLBytes(); + result.append("encrypted_data:" + thethis->printableString(encrypted_data)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsDeleteChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_rpcDropAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsDeleteChannel)); - result.append("channelsDeleteChannel("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); + Q_ASSERT((ctor == TLTypes::rpcDropAnswer)); + result.append("rpcDropAnswer("); + TLLong req_msg_id = mtstream.readTLLong(); + result.append("req_msg_id:" + QString::number(req_msg_id, 16)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsToggleInvites(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_getFutureSalts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsToggleInvites)); - result.append("channelsToggleInvites("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLBool is_enabled = mtstream.readTLBool(); - result.append("is_enabled:" + QString::number(is_enabled, 16)); + Q_ASSERT((ctor == TLTypes::getFutureSalts)); + result.append("getFutureSalts("); + TLInt num = mtstream.readTLInt(); + result.append("num:" + QString::number(num, 16)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsExportMessageLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_ping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsExportMessageLink)); - result.append("channelsExportMessageLink("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); + Q_ASSERT((ctor == TLTypes::ping)); + result.append("ping("); + TLLong ping_id = mtstream.readTLLong(); + result.append("ping_id:" + QString::number(ping_id, 16)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsToggleSignatures(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_pingDelayDisconnect(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsToggleSignatures)); - result.append("channelsToggleSignatures("); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLBool is_enabled = mtstream.readTLBool(); - result.append("is_enabled:" + QString::number(is_enabled, 16)); + Q_ASSERT((ctor == TLTypes::pingDelayDisconnect)); + result.append("pingDelayDisconnect("); + TLLong ping_id = mtstream.readTLLong(); + result.append("ping_id:" + QString::number(ping_id, 16)); + result.append(", "); + TLInt disconnect_delay = mtstream.readTLInt(); + result.append("disconnect_delay:" + QString::number(disconnect_delay, 16)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsUpdatePinnedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_destroySession(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsUpdatePinnedMessage)); - result.append("channelsUpdatePinnedMessage("); - - TLInt flags = mtstream.readTLInt(); - Q_UNUSED(flags); - - result.append("is_silent:" + BIT_FIELD_VALUE(flags, 0)); - result.append(", "); - result.append("channel:"); - MTProtoDecompiler::decompile_InputChannel(thethis, result, mtstream); - TLInt id = mtstream.readTLInt(); - result.append("id:" + QString::number(id, 16)); + Q_ASSERT((ctor == TLTypes::destroySession)); + result.append("destroySession("); + TLLong session_id = mtstream.readTLLong(); + result.append("session_id:" + QString::number(session_id, 16)); result.append(")"); } -void MTProtoDecompiler::decompile_channelsGetAdminedPublicChannels(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) +void MTProtoDecompiler::decompile_contestSaveDeveloperInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) { Q_UNUSED(thethis); TLConstructor ctor = mtstream.readTLConstructor(); - Q_ASSERT((ctor == TLTypes::channelsGetAdminedPublicChannels)); - result.append("channelsGetAdminedPublicChannels()"); + Q_ASSERT((ctor == TLTypes::contestSaveDeveloperInfo)); + result.append("contestSaveDeveloperInfo("); + TLInt vk_id = mtstream.readTLInt(); + result.append("vk_id:" + QString::number(vk_id, 16)); + result.append(", "); + TLString name = mtstream.readTLString(); + result.append("name:" + thethis->printableString(name)); + result.append(", "); + TLString phone_number = mtstream.readTLString(); + result.append("phone_number:" + thethis->printableString(phone_number)); + result.append(", "); + TLInt age = mtstream.readTLInt(); + result.append("age:" + QString::number(age, 16)); + result.append(", "); + TLString city = mtstream.readTLString(); + result.append("city:" + thethis->printableString(city)); + result.append(")"); } void MTProtoDecompiler::decompile_ResPQ(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) @@ -12247,7 +12391,7 @@ void MTProtoDecompiler::decompile_ResPQ(MTProtoDecompiler* thethis, QString& res TLInt128 server_nonce = mtstream.readTLInt128(); result.append("server_nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&server_nonce), sizeof(TLInt128)).toHex())); result.append(", "); - TLString pq = mtstream.readTLString(); + TLBytes pq = mtstream.readTLBytes(); result.append("pq:" + thethis->printableString(pq)); result.append(", "); result.append("server_public_key_fingerprints:"); @@ -12272,13 +12416,13 @@ void MTProtoDecompiler::decompile_PQInnerData(MTProtoDecompiler* thethis, QStrin if(ctor == PQInnerData::CtorPQInnerData) { result.append("PQInnerData#"); - TLString pq = mtstream.readTLString(); + TLBytes pq = mtstream.readTLBytes(); result.append("pq:" + thethis->printableString(pq)); result.append(", "); - TLString p = mtstream.readTLString(); + TLBytes p = mtstream.readTLBytes(); result.append("p:" + thethis->printableString(p)); result.append(", "); - TLString q = mtstream.readTLString(); + TLBytes q = mtstream.readTLBytes(); result.append("q:" + thethis->printableString(q)); result.append(", "); TLInt128 nonce = mtstream.readTLInt128(); @@ -12328,7 +12472,7 @@ void MTProtoDecompiler::decompile_ServerDHParams(MTProtoDecompiler* thethis, QSt TLInt128 server_nonce = mtstream.readTLInt128(); result.append("server_nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&server_nonce), sizeof(TLInt128)).toHex())); result.append(", "); - TLString encrypted_answer = mtstream.readTLString(); + TLBytes encrypted_answer = mtstream.readTLBytes(); result.append("encrypted_answer:" + thethis->printableString(encrypted_answer)); } } @@ -12359,10 +12503,10 @@ void MTProtoDecompiler::decompile_ServerDHInnerData(MTProtoDecompiler* thethis, TLInt g = mtstream.readTLInt(); result.append("g:" + QString::number(g, 16)); result.append(", "); - TLString dh_prime = mtstream.readTLString(); + TLBytes dh_prime = mtstream.readTLBytes(); result.append("dh_prime:" + thethis->printableString(dh_prime)); result.append(", "); - TLString g_a = mtstream.readTLString(); + TLBytes g_a = mtstream.readTLBytes(); result.append("g_a:" + thethis->printableString(g_a)); result.append(", "); TLInt server_time = mtstream.readTLInt(); @@ -12396,7 +12540,7 @@ void MTProtoDecompiler::decompile_ClientDHInnerData(MTProtoDecompiler* thethis, TLLong retry_id = mtstream.readTLLong(); result.append("retry_id:" + QString::number(retry_id, 16)); result.append(", "); - TLString g_b = mtstream.readTLString(); + TLBytes g_b = mtstream.readTLBytes(); result.append("g_b:" + thethis->printableString(g_b)); } } @@ -12884,147 +13028,3 @@ void MTProtoDecompiler::decompile_HttpWait(MTProtoDecompiler* thethis, QString& } } -void MTProtoDecompiler::decompile_reqPq(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::reqPq)); - result.append("reqPq("); - TLInt128 nonce = mtstream.readTLInt128(); - result.append("nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&nonce), sizeof(TLInt128)).toHex())); - result.append(")"); -} - -void MTProtoDecompiler::decompile_reqDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::reqDHParams)); - result.append("reqDHParams("); - TLInt128 nonce = mtstream.readTLInt128(); - result.append("nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&nonce), sizeof(TLInt128)).toHex())); - result.append(", "); - TLInt128 server_nonce = mtstream.readTLInt128(); - result.append("server_nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&server_nonce), sizeof(TLInt128)).toHex())); - result.append(", "); - TLString p = mtstream.readTLString(); - result.append("p:" + thethis->printableString(p)); - result.append(", "); - TLString q = mtstream.readTLString(); - result.append("q:" + thethis->printableString(q)); - result.append(", "); - TLLong public_key_fingerprint = mtstream.readTLLong(); - result.append("public_key_fingerprint:" + QString::number(public_key_fingerprint, 16)); - result.append(", "); - TLString encrypted_data = mtstream.readTLString(); - result.append("encrypted_data:" + thethis->printableString(encrypted_data)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_setClientDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::setClientDHParams)); - result.append("setClientDHParams("); - TLInt128 nonce = mtstream.readTLInt128(); - result.append("nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&nonce), sizeof(TLInt128)).toHex())); - result.append(", "); - TLInt128 server_nonce = mtstream.readTLInt128(); - result.append("server_nonce:" + QString::fromUtf8(QByteArray::fromRawData(reinterpret_cast(&server_nonce), sizeof(TLInt128)).toHex())); - result.append(", "); - TLString encrypted_data = mtstream.readTLString(); - result.append("encrypted_data:" + thethis->printableString(encrypted_data)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_rpcDropAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::rpcDropAnswer)); - result.append("rpcDropAnswer("); - TLLong req_msg_id = mtstream.readTLLong(); - result.append("req_msg_id:" + QString::number(req_msg_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_getFutureSalts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::getFutureSalts)); - result.append("getFutureSalts("); - TLInt num = mtstream.readTLInt(); - result.append("num:" + QString::number(num, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_ping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::ping)); - result.append("ping("); - TLLong ping_id = mtstream.readTLLong(); - result.append("ping_id:" + QString::number(ping_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_pingDelayDisconnect(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::pingDelayDisconnect)); - result.append("pingDelayDisconnect("); - TLLong ping_id = mtstream.readTLLong(); - result.append("ping_id:" + QString::number(ping_id, 16)); - result.append(", "); - TLInt disconnect_delay = mtstream.readTLInt(); - result.append("disconnect_delay:" + QString::number(disconnect_delay, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_destroySession(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::destroySession)); - result.append("destroySession("); - TLLong session_id = mtstream.readTLLong(); - result.append("session_id:" + QString::number(session_id, 16)); - result.append(")"); -} - -void MTProtoDecompiler::decompile_contestSaveDeveloperInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream) -{ - Q_UNUSED(thethis); - TLConstructor ctor = mtstream.readTLConstructor(); - - Q_ASSERT((ctor == TLTypes::contestSaveDeveloperInfo)); - result.append("contestSaveDeveloperInfo("); - TLInt vk_id = mtstream.readTLInt(); - result.append("vk_id:" + QString::number(vk_id, 16)); - result.append(", "); - TLString name = mtstream.readTLString(); - result.append("name:" + thethis->printableString(name)); - result.append(", "); - TLString phone_number = mtstream.readTLString(); - result.append("phone_number:" + thethis->printableString(phone_number)); - result.append(", "); - TLInt age = mtstream.readTLInt(); - result.append("age:" + QString::number(age, 16)); - result.append(", "); - TLString city = mtstream.readTLString(); - result.append("city:" + thethis->printableString(city)); - result.append(")"); -} - diff --git a/autogenerated/mtproto/decompiler/mtprotodecompiler.h b/autogenerated/mtproto/decompiler/mtprotodecompiler.h index 8a30c86..813ed8c 100644 --- a/autogenerated/mtproto/decompiler/mtprotodecompiler.h +++ b/autogenerated/mtproto/decompiler/mtprotodecompiler.h @@ -5,11 +5,11 @@ // DO NOT EDIT!!! #include -#include #include "../../../autogenerated/mtproto/mtproto.h" +#include #include "../../../mtproto/decompiler/mtprotodecompilerbase.h" #include "decompilertable.h" -#include +#include #include "../../../autogenerated/types/types.h" class MTProtoDecompiler: public MTProtoDecompilerBase @@ -22,165 +22,6 @@ class MTProtoDecompiler: public MTProtoDecompilerBase void doDecompile(QString& result, MTProtoStream& mtstream, TLLong messageid); void decompileTLVectorEx(QString& result, MTProtoStream& mtstream, bool isbaretype); static void initDispatchers(); - static void decompile_Error(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Null(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputGeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputFileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputAppEvent(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Peer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_StorageFileType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_FileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_User(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UserProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UserStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Chat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChatParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChatParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Message(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessageMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Dialog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Photo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PhotoSize(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_GeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthCheckedPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthSentCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthExportedAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputNotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputPeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputPeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PeerSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_WallPaper(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ReportReason(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UserFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Contact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ImportedContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsImportedContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesChats(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesAffectedHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Update(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UpdatesState(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UpdatesDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Updates(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PhotosPhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PhotosPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UploadFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_DcOption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Config(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_NearestDc(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_HelpAppUpdate(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_HelpInviteText(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_EncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputEncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_EncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputEncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_EncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesDhConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesSentEncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputDocument(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Document(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_HelpSupport(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_NotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_SendMessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsFound(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputPrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputPrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_PrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AccountPrivacyRules(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AccountDaysTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_DocumentAttribute(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_StickerPack(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesAllStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_DisabledFeature(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesAffectedMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_WebPage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Authorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AccountAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AccountPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AccountPasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AccountPasswordInputSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthPasswordRecovery(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ReceivedNotifyMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ExportedChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_StickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_BotCommand(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_BotInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_KeyboardButton(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_KeyboardButtonRow(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ReplyMarkup(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_HelpAppChangelog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessageEntity(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsResolvedPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessageRange(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_UpdatesChannelDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChannelMessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChannelParticipantsFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChannelParticipantRole(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChannelsChannelParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ChannelsChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_HelpTermsOfService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_FoundGif(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesFoundGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesSavedGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputBotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputBotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_BotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_BotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ExportedMessageLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessageFwdHeader(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_AuthSentCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesMessageEditData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputBotInlineMessageID(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InlineBotSwitchPM(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesPeerDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_TopPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_TopPeerCategory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_TopPeerCategoryPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ContactsTopPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_DraftMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesArchivedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesStickerSetInstallResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_StickerSetCovered(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MaskCoords(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputStickeredMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_Game(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_InputGame(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_HighScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_MessagesHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_authCheckPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_authSendCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_authSignUp(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); @@ -361,6 +202,174 @@ class MTProtoDecompiler: public MTProtoDecompilerBase static void decompile_channelsToggleSignatures(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_channelsUpdatePinnedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_channelsGetAdminedPublicChannels(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Error(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Null(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputUser(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputGeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputFileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputAppEvent(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Peer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_StorageFileType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_FileLocation(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_User(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UserProfilePhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UserStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Chat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChatParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChatParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChatPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Message(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessageMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Dialog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Photo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PhotoSize(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_GeoPoint(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthCheckedPhone(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthSentCode(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthExportedAuthorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputNotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputPeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputPeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PeerNotifyEvents(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PeerNotifySettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PeerSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_WallPaper(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ReportReason(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UserFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Contact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ImportedContact(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactStatus(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsImportedContacts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsBlocked(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesChats(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesChatFull(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesAffectedHistory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Update(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UpdatesState(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UpdatesDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Updates(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PhotosPhotos(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PhotosPhoto(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UploadFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_DcOption(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Config(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_NearestDc(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_HelpAppUpdate(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_HelpInviteText(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_EncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputEncryptedChat(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_EncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputEncryptedFile(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_EncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesDhConfig(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesSentEncryptedMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputDocument(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Document(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_HelpSupport(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_NotifyPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_SendMessageAction(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsFound(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputPrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PrivacyKey(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputPrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_PrivacyRule(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AccountPrivacyRules(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AccountDaysTTL(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_DocumentAttribute(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_StickerPack(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesAllStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_DisabledFeature(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesAffectedMessages(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_WebPage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Authorization(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AccountAuthorizations(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AccountPassword(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AccountPasswordSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AccountPasswordInputSettings(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthPasswordRecovery(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ReceivedNotifyMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ExportedChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChatInvite(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_StickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesStickerSet(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_BotCommand(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_BotInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_KeyboardButton(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_KeyboardButtonRow(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ReplyMarkup(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_HelpAppChangelog(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessageEntity(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputChannel(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsResolvedPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessageRange(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_UpdatesChannelDifference(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChannelMessagesFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChannelParticipantsFilter(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChannelParticipantRole(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChannelsChannelParticipants(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ChannelsChannelParticipant(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_HelpTermsOfService(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_FoundGif(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesFoundGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesSavedGifs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputBotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputBotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_BotInlineMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_BotInlineResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesBotResults(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ExportedMessageLink(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessageFwdHeader(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_AuthSentCodeType(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesBotCallbackAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesMessageEditData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputBotInlineMessageID(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InlineBotSwitchPM(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesPeerDialogs(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_TopPeer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_TopPeerCategory(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_TopPeerCategoryPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ContactsTopPeers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_DraftMessage(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesFeaturedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesRecentStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesArchivedStickers(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesStickerSetInstallResult(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_StickerSetCovered(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MaskCoords(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputStickeredMedia(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_Game(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_InputGame(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_HighScore(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_MessagesHighScores(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_reqPq(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_reqDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_setClientDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_rpcDropAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_getFutureSalts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_ping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_pingDelayDisconnect(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_destroySession(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); + static void decompile_contestSaveDeveloperInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_ResPQ(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_PQInnerData(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_ServerDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); @@ -382,15 +391,6 @@ class MTProtoDecompiler: public MTProtoDecompilerBase static void decompile_DestroySessionRes(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_NewSession(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); static void decompile_HttpWait(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_reqPq(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_reqDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_setClientDHParams(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_rpcDropAnswer(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_getFutureSalts(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_ping(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_pingDelayDisconnect(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_destroySession(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); - static void decompile_contestSaveDeveloperInfo(MTProtoDecompiler* thethis, QString& result, MTProtoStream& mtstream); private: static QHash< TLConstructor, std::function > _ctordispatcher; diff --git a/autogenerated/mtproto/futuresalts.h b/autogenerated/mtproto/futuresalts.h index 4fd9847..b1df18a 100644 --- a/autogenerated/mtproto/futuresalts.h +++ b/autogenerated/mtproto/futuresalts.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "futuresalt.h" +#include "../../types/telegramobject.h" class FutureSalts: public TelegramObject { diff --git a/autogenerated/mtproto/mtproto.h b/autogenerated/mtproto/mtproto.h index 7f339a7..e48fd24 100644 --- a/autogenerated/mtproto/mtproto.h +++ b/autogenerated/mtproto/mtproto.h @@ -25,10 +25,10 @@ #include "destroysessionres.h" #include "newsession.h" #include "httpwait.h" -#include "../../types/mtproto/mtprotomessage.h" -#include "../../types/mtproto/rpcresult.h" #include "../../types/mtproto/mtprotoobject.h" -#include "../../types/mtproto/messagecontainer.h" #include "../../types/mtproto/messagecopy.h" +#include "../../types/mtproto/rpcresult.h" +#include "../../types/mtproto/mtprotomessage.h" +#include "../../types/mtproto/messagecontainer.h" #endif // MTPROTO_H diff --git a/autogenerated/mtproto/pqinnerdata.cpp b/autogenerated/mtproto/pqinnerdata.cpp index 865ddb0..6f1f46f 100644 --- a/autogenerated/mtproto/pqinnerdata.cpp +++ b/autogenerated/mtproto/pqinnerdata.cpp @@ -17,9 +17,9 @@ void PQInnerData::read(MTProtoStream* mtstream) if(this->_constructorid == PQInnerData::CtorPQInnerData) { - this->_pq = mtstream->readTLString(); - this->_p = mtstream->readTLString(); - this->_q = mtstream->readTLString(); + this->_pq = mtstream->readTLBytes(); + this->_p = mtstream->readTLBytes(); + this->_q = mtstream->readTLBytes(); this->_nonce = mtstream->readTLInt128(); this->_server_nonce = mtstream->readTLInt128(); this->_new_nonce = mtstream->readTLInt256(); @@ -35,9 +35,9 @@ void PQInnerData::write(MTProtoStream* mtstream) if(this->_constructorid == PQInnerData::CtorPQInnerData) { - mtstream->writeTLString(this->_pq); - mtstream->writeTLString(this->_p); - mtstream->writeTLString(this->_q); + mtstream->writeTLBytes(this->_pq); + mtstream->writeTLBytes(this->_p); + mtstream->writeTLBytes(this->_q); mtstream->writeTLInt128(this->_nonce); mtstream->writeTLInt128(this->_server_nonce); mtstream->writeTLInt256(this->_new_nonce); @@ -49,12 +49,12 @@ void PQInnerData::compileFlags() } -TLString PQInnerData::pq() const +TLBytes PQInnerData::pq() const { return this->_pq; } -void PQInnerData::setPq(TLString pq) +void PQInnerData::setPq(TLBytes pq) { if(this->_pq == pq) return; @@ -63,12 +63,12 @@ void PQInnerData::setPq(TLString pq) emit pqChanged(); } -TLString PQInnerData::p() const +TLBytes PQInnerData::p() const { return this->_p; } -void PQInnerData::setP(TLString p) +void PQInnerData::setP(TLBytes p) { if(this->_p == p) return; @@ -77,12 +77,12 @@ void PQInnerData::setP(TLString p) emit pChanged(); } -TLString PQInnerData::q() const +TLBytes PQInnerData::q() const { return this->_q; } -void PQInnerData::setQ(TLString q) +void PQInnerData::setQ(TLBytes q) { if(this->_q == q) return; diff --git a/autogenerated/mtproto/pqinnerdata.h b/autogenerated/mtproto/pqinnerdata.h index 12fb6f0..8910907 100644 --- a/autogenerated/mtproto/pqinnerdata.h +++ b/autogenerated/mtproto/pqinnerdata.h @@ -11,9 +11,9 @@ class PQInnerData: public TelegramObject { Q_OBJECT - Q_PROPERTY(TLString pq READ pq WRITE setPq NOTIFY pqChanged) - Q_PROPERTY(TLString p READ p WRITE setP NOTIFY pChanged) - Q_PROPERTY(TLString q READ q WRITE setQ NOTIFY qChanged) + Q_PROPERTY(TLBytes pq READ pq WRITE setPq NOTIFY pqChanged) + Q_PROPERTY(TLBytes p READ p WRITE setP NOTIFY pChanged) + Q_PROPERTY(TLBytes q READ q WRITE setQ NOTIFY qChanged) Q_PROPERTY(TLInt128 nonce READ nonce WRITE setNonce NOTIFY nonceChanged) Q_PROPERTY(TLInt128 serverNonce READ serverNonce WRITE setServerNonce NOTIFY serverNonceChanged) Q_PROPERTY(TLInt256 newNonce READ newNonce WRITE setNewNonce NOTIFY newNonceChanged) @@ -32,12 +32,12 @@ class PQInnerData: public TelegramObject protected: virtual void compileFlags(); public: - TLString pq() const; - void setPq(TLString pq); - TLString p() const; - void setP(TLString p); - TLString q() const; - void setQ(TLString q); + TLBytes pq() const; + void setPq(TLBytes pq); + TLBytes p() const; + void setP(TLBytes p); + TLBytes q() const; + void setQ(TLBytes q); TLInt128 nonce() const; void setNonce(TLInt128 nonce); TLInt128 serverNonce() const; @@ -54,9 +54,9 @@ class PQInnerData: public TelegramObject void newNonceChanged(); private: - TLString _pq; - TLString _p; - TLString _q; + TLBytes _pq; + TLBytes _p; + TLBytes _q; TLInt128 _nonce; TLInt128 _server_nonce; TLInt256 _new_nonce; diff --git a/autogenerated/mtproto/respq.cpp b/autogenerated/mtproto/respq.cpp index 17f6109..0070237 100644 --- a/autogenerated/mtproto/respq.cpp +++ b/autogenerated/mtproto/respq.cpp @@ -19,7 +19,7 @@ void ResPQ::read(MTProtoStream* mtstream) { this->_nonce = mtstream->readTLInt128(); this->_server_nonce = mtstream->readTLInt128(); - this->_pq = mtstream->readTLString(); + this->_pq = mtstream->readTLBytes(); mtstream->readTLVector(this->_server_public_key_fingerprints, false); } } @@ -35,7 +35,7 @@ void ResPQ::write(MTProtoStream* mtstream) { mtstream->writeTLInt128(this->_nonce); mtstream->writeTLInt128(this->_server_nonce); - mtstream->writeTLString(this->_pq); + mtstream->writeTLBytes(this->_pq); mtstream->writeTLVector(this->_server_public_key_fingerprints, false); } } @@ -73,12 +73,12 @@ void ResPQ::setServerNonce(TLInt128 server_nonce) emit serverNonceChanged(); } -TLString ResPQ::pq() const +TLBytes ResPQ::pq() const { return this->_pq; } -void ResPQ::setPq(TLString pq) +void ResPQ::setPq(TLBytes pq) { if(this->_pq == pq) return; diff --git a/autogenerated/mtproto/respq.h b/autogenerated/mtproto/respq.h index cdb1183..bb25f51 100644 --- a/autogenerated/mtproto/respq.h +++ b/autogenerated/mtproto/respq.h @@ -13,7 +13,7 @@ class ResPQ: public TelegramObject Q_PROPERTY(TLInt128 nonce READ nonce WRITE setNonce NOTIFY nonceChanged) Q_PROPERTY(TLInt128 serverNonce READ serverNonce WRITE setServerNonce NOTIFY serverNonceChanged) - Q_PROPERTY(TLString pq READ pq WRITE setPq NOTIFY pqChanged) + Q_PROPERTY(TLBytes pq READ pq WRITE setPq NOTIFY pqChanged) Q_PROPERTY(TLVector serverPublicKeyFingerprints READ serverPublicKeyFingerprints WRITE setServerPublicKeyFingerprints NOTIFY serverPublicKeyFingerprintsChanged) Q_ENUMS(Constructors) @@ -34,8 +34,8 @@ class ResPQ: public TelegramObject void setNonce(TLInt128 nonce); TLInt128 serverNonce() const; void setServerNonce(TLInt128 server_nonce); - TLString pq() const; - void setPq(TLString pq); + TLBytes pq() const; + void setPq(TLBytes pq); const TLVector& serverPublicKeyFingerprints() const; void setServerPublicKeyFingerprints(const TLVector& server_public_key_fingerprints); @@ -48,7 +48,7 @@ class ResPQ: public TelegramObject private: TLInt128 _nonce; TLInt128 _server_nonce; - TLString _pq; + TLBytes _pq; TLVector _server_public_key_fingerprints; }; diff --git a/autogenerated/mtproto/serverdhinnerdata.cpp b/autogenerated/mtproto/serverdhinnerdata.cpp index 47edfae..6d380ef 100644 --- a/autogenerated/mtproto/serverdhinnerdata.cpp +++ b/autogenerated/mtproto/serverdhinnerdata.cpp @@ -22,8 +22,8 @@ void ServerDHInnerData::read(MTProtoStream* mtstream) this->_nonce = mtstream->readTLInt128(); this->_server_nonce = mtstream->readTLInt128(); this->_g = mtstream->readTLInt(); - this->_dh_prime = mtstream->readTLString(); - this->_g_a = mtstream->readTLString(); + this->_dh_prime = mtstream->readTLBytes(); + this->_g_a = mtstream->readTLBytes(); this->_server_time = mtstream->readTLInt(); } } @@ -40,8 +40,8 @@ void ServerDHInnerData::write(MTProtoStream* mtstream) mtstream->writeTLInt128(this->_nonce); mtstream->writeTLInt128(this->_server_nonce); mtstream->writeTLInt(this->_g); - mtstream->writeTLString(this->_dh_prime); - mtstream->writeTLString(this->_g_a); + mtstream->writeTLBytes(this->_dh_prime); + mtstream->writeTLBytes(this->_g_a); mtstream->writeTLInt(this->_server_time); } } @@ -93,12 +93,12 @@ void ServerDHInnerData::setG(TLInt g) emit gChanged(); } -TLString ServerDHInnerData::dhPrime() const +TLBytes ServerDHInnerData::dhPrime() const { return this->_dh_prime; } -void ServerDHInnerData::setDhPrime(TLString dh_prime) +void ServerDHInnerData::setDhPrime(TLBytes dh_prime) { if(this->_dh_prime == dh_prime) return; @@ -107,12 +107,12 @@ void ServerDHInnerData::setDhPrime(TLString dh_prime) emit dhPrimeChanged(); } -TLString ServerDHInnerData::gA() const +TLBytes ServerDHInnerData::gA() const { return this->_g_a; } -void ServerDHInnerData::setGA(TLString g_a) +void ServerDHInnerData::setGA(TLBytes g_a) { if(this->_g_a == g_a) return; diff --git a/autogenerated/mtproto/serverdhinnerdata.h b/autogenerated/mtproto/serverdhinnerdata.h index 58b8a2f..ad4899d 100644 --- a/autogenerated/mtproto/serverdhinnerdata.h +++ b/autogenerated/mtproto/serverdhinnerdata.h @@ -14,8 +14,8 @@ class ServerDHInnerData: public TelegramObject Q_PROPERTY(TLInt128 nonce READ nonce WRITE setNonce NOTIFY nonceChanged) Q_PROPERTY(TLInt128 serverNonce READ serverNonce WRITE setServerNonce NOTIFY serverNonceChanged) Q_PROPERTY(TLInt g READ g WRITE setG NOTIFY gChanged) - Q_PROPERTY(TLString dhPrime READ dhPrime WRITE setDhPrime NOTIFY dhPrimeChanged) - Q_PROPERTY(TLString gA READ gA WRITE setGA NOTIFY gAChanged) + Q_PROPERTY(TLBytes dhPrime READ dhPrime WRITE setDhPrime NOTIFY dhPrimeChanged) + Q_PROPERTY(TLBytes gA READ gA WRITE setGA NOTIFY gAChanged) Q_PROPERTY(TLInt serverTime READ serverTime WRITE setServerTime NOTIFY serverTimeChanged) Q_ENUMS(Constructors) @@ -38,10 +38,10 @@ class ServerDHInnerData: public TelegramObject void setServerNonce(TLInt128 server_nonce); TLInt g() const; void setG(TLInt g); - TLString dhPrime() const; - void setDhPrime(TLString dh_prime); - TLString gA() const; - void setGA(TLString g_a); + TLBytes dhPrime() const; + void setDhPrime(TLBytes dh_prime); + TLBytes gA() const; + void setGA(TLBytes g_a); TLInt serverTime() const; void setServerTime(TLInt server_time); @@ -57,8 +57,8 @@ class ServerDHInnerData: public TelegramObject TLInt128 _nonce; TLInt128 _server_nonce; TLInt _g; - TLString _dh_prime; - TLString _g_a; + TLBytes _dh_prime; + TLBytes _g_a; TLInt _server_time; }; diff --git a/autogenerated/mtproto/serverdhparams.cpp b/autogenerated/mtproto/serverdhparams.cpp index 03e8b72..62a3819 100644 --- a/autogenerated/mtproto/serverdhparams.cpp +++ b/autogenerated/mtproto/serverdhparams.cpp @@ -26,7 +26,7 @@ void ServerDHParams::read(MTProtoStream* mtstream) { this->_nonce = mtstream->readTLInt128(); this->_server_nonce = mtstream->readTLInt128(); - this->_encrypted_answer = mtstream->readTLString(); + this->_encrypted_answer = mtstream->readTLBytes(); } } @@ -48,7 +48,7 @@ void ServerDHParams::write(MTProtoStream* mtstream) { mtstream->writeTLInt128(this->_nonce); mtstream->writeTLInt128(this->_server_nonce); - mtstream->writeTLString(this->_encrypted_answer); + mtstream->writeTLBytes(this->_encrypted_answer); } } @@ -99,12 +99,12 @@ void ServerDHParams::setNewNonceHash(TLInt128 new_nonce_hash) emit newNonceHashChanged(); } -TLString ServerDHParams::encryptedAnswer() const +TLBytes ServerDHParams::encryptedAnswer() const { return this->_encrypted_answer; } -void ServerDHParams::setEncryptedAnswer(TLString encrypted_answer) +void ServerDHParams::setEncryptedAnswer(TLBytes encrypted_answer) { if(this->_encrypted_answer == encrypted_answer) return; diff --git a/autogenerated/mtproto/serverdhparams.h b/autogenerated/mtproto/serverdhparams.h index 688a7aa..9e70996 100644 --- a/autogenerated/mtproto/serverdhparams.h +++ b/autogenerated/mtproto/serverdhparams.h @@ -14,7 +14,7 @@ class ServerDHParams: public TelegramObject Q_PROPERTY(TLInt128 nonce READ nonce WRITE setNonce NOTIFY nonceChanged) Q_PROPERTY(TLInt128 serverNonce READ serverNonce WRITE setServerNonce NOTIFY serverNonceChanged) Q_PROPERTY(TLInt128 newNonceHash READ newNonceHash WRITE setNewNonceHash NOTIFY newNonceHashChanged) - Q_PROPERTY(TLString encryptedAnswer READ encryptedAnswer WRITE setEncryptedAnswer NOTIFY encryptedAnswerChanged) + Q_PROPERTY(TLBytes encryptedAnswer READ encryptedAnswer WRITE setEncryptedAnswer NOTIFY encryptedAnswerChanged) Q_ENUMS(Constructors) @@ -37,8 +37,8 @@ class ServerDHParams: public TelegramObject void setServerNonce(TLInt128 server_nonce); TLInt128 newNonceHash() const; void setNewNonceHash(TLInt128 new_nonce_hash); - TLString encryptedAnswer() const; - void setEncryptedAnswer(TLString encrypted_answer); + TLBytes encryptedAnswer() const; + void setEncryptedAnswer(TLBytes encrypted_answer); signals: void nonceChanged(); @@ -50,7 +50,7 @@ class ServerDHParams: public TelegramObject TLInt128 _nonce; TLInt128 _server_nonce; TLInt128 _new_nonce_hash; - TLString _encrypted_answer; + TLBytes _encrypted_answer; }; diff --git a/autogenerated/mtprotoapi.cpp b/autogenerated/mtprotoapi.cpp index 09a0dd2..e6ae467 100644 --- a/autogenerated/mtprotoapi.cpp +++ b/autogenerated/mtprotoapi.cpp @@ -17,29 +17,29 @@ void MTProtoAPI::reqPq(DC* dc, TLInt128 nonce) dc->sendPlain(mtstream); } -void MTProtoAPI::reqDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLString p, TLString q, TLLong public_key_fingerprint, TLString encrypted_data) +void MTProtoAPI::reqDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLBytes p, TLBytes q, TLLong public_key_fingerprint, TLBytes encrypted_data) { MTProtoStream* mtstream = new MTProtoStream(); mtstream->writeTLConstructor(TLTypes::reqDHParams); mtstream->writeTLInt128(nonce); mtstream->writeTLInt128(server_nonce); - mtstream->writeTLString(p); - mtstream->writeTLString(q); + mtstream->writeTLBytes(p); + mtstream->writeTLBytes(q); mtstream->writeTLLong(public_key_fingerprint); - mtstream->writeTLString(encrypted_data); + mtstream->writeTLBytes(encrypted_data); dc->sendPlain(mtstream); } -void MTProtoAPI::setClientDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLString encrypted_data) +void MTProtoAPI::setClientDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLBytes encrypted_data) { MTProtoStream* mtstream = new MTProtoStream(); mtstream->writeTLConstructor(TLTypes::setClientDHParams); mtstream->writeTLInt128(nonce); mtstream->writeTLInt128(server_nonce); - mtstream->writeTLString(encrypted_data); + mtstream->writeTLBytes(encrypted_data); dc->sendPlain(mtstream); } diff --git a/autogenerated/mtprotoapi.h b/autogenerated/mtprotoapi.h index 798bad9..1f9e488 100644 --- a/autogenerated/mtprotoapi.h +++ b/autogenerated/mtprotoapi.h @@ -4,12 +4,12 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "../types/basic.h" #include "../mtproto/dc/dc.h" -#include "../autogenerated/types/types.h" #include "../mtproto/mtprotorequest.h" -#include "../autogenerated/mtproto/mtproto.h" #include +#include "../types/basic.h" +#include "../autogenerated/types/types.h" +#include "../autogenerated/mtproto/mtproto.h" class MTProtoAPI: public QObject { @@ -18,8 +18,8 @@ class MTProtoAPI: public QObject public: explicit MTProtoAPI(QObject* parent = 0); static void reqPq(DC* dc, TLInt128 nonce); - static void reqDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLString p, TLString q, TLLong public_key_fingerprint, TLString encrypted_data); - static void setClientDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLString encrypted_data); + static void reqDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLBytes p, TLBytes q, TLLong public_key_fingerprint, TLBytes encrypted_data); + static void setClientDHParams(DC* dc, TLInt128 nonce, TLInt128 server_nonce, TLBytes encrypted_data); static void rpcDropAnswer(DC* dc, TLLong req_msg_id); static void getFutureSalts(DC* dc, TLInt num); static void ping(DC* dc, TLLong ping_id); diff --git a/autogenerated/telegramapi.h b/autogenerated/telegramapi.h index d79bf77..4856135 100644 --- a/autogenerated/telegramapi.h +++ b/autogenerated/telegramapi.h @@ -4,12 +4,12 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "../types/basic.h" #include "../mtproto/mtprotorequest.h" #include "../mtproto/dc/dcsession.h" -#include "../autogenerated/mtproto/mtproto.h" -#include "../autogenerated/types/types.h" #include +#include "../types/basic.h" +#include "../autogenerated/types/types.h" +#include "../autogenerated/mtproto/mtproto.h" class TelegramAPI: public QObject { diff --git a/autogenerated/types/accountprivacyrules.h b/autogenerated/types/accountprivacyrules.h index 00c0ded..2e460b8 100644 --- a/autogenerated/types/accountprivacyrules.h +++ b/autogenerated/types/accountprivacyrules.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "privacyrule.h" +#include "../../types/telegramobject.h" #include "user.h" class AccountPrivacyRules: public TelegramObject diff --git a/autogenerated/types/botinlinemessage.h b/autogenerated/types/botinlinemessage.h index 70352da..6e73029 100644 --- a/autogenerated/types/botinlinemessage.h +++ b/autogenerated/types/botinlinemessage.h @@ -4,10 +4,10 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "replymarkup.h" -#include "geopoint.h" #include "../../types/basic.h" +#include "replymarkup.h" #include "../../types/telegramobject.h" +#include "geopoint.h" #include "messageentity.h" class BotInlineMessage: public TelegramObject diff --git a/autogenerated/types/botinlineresult.h b/autogenerated/types/botinlineresult.h index 3596033..c4895d8 100644 --- a/autogenerated/types/botinlineresult.h +++ b/autogenerated/types/botinlineresult.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" #include "photo.h" #include "botinlinemessage.h" diff --git a/autogenerated/types/channelmessagesfilter.h b/autogenerated/types/channelmessagesfilter.h index 4adaa58..affa35b 100644 --- a/autogenerated/types/channelmessagesfilter.h +++ b/autogenerated/types/channelmessagesfilter.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "messagerange.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "messagerange.h" class ChannelMessagesFilter: public TelegramObject { diff --git a/autogenerated/types/channelschannelparticipant.h b/autogenerated/types/channelschannelparticipant.h index dad76f9..07eaa7f 100644 --- a/autogenerated/types/channelschannelparticipant.h +++ b/autogenerated/types/channelschannelparticipant.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "channelparticipant.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "channelparticipant.h" #include "user.h" class ChannelsChannelParticipant: public TelegramObject diff --git a/autogenerated/types/channelschannelparticipants.h b/autogenerated/types/channelschannelparticipants.h index d0902a2..c71a13a 100644 --- a/autogenerated/types/channelschannelparticipants.h +++ b/autogenerated/types/channelschannelparticipants.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "channelparticipant.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "channelparticipant.h" #include "user.h" class ChannelsChannelParticipants: public TelegramObject diff --git a/autogenerated/types/chat.h b/autogenerated/types/chat.h index 8c2910d..b049edc 100644 --- a/autogenerated/types/chat.h +++ b/autogenerated/types/chat.h @@ -4,10 +4,10 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chatphoto.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" #include "inputchannel.h" +#include "chatphoto.h" class Chat: public TelegramObject { diff --git a/autogenerated/types/chatfull.h b/autogenerated/types/chatfull.h index 20780ae..0ced7c8 100644 --- a/autogenerated/types/chatfull.h +++ b/autogenerated/types/chatfull.h @@ -4,13 +4,13 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "exportedchatinvite.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "chatparticipants.h" #include "botinfo.h" #include "photo.h" -#include "chatparticipants.h" #include "peernotifysettings.h" +#include "exportedchatinvite.h" class ChatFull: public TelegramObject { diff --git a/autogenerated/types/chatinvite.h b/autogenerated/types/chatinvite.h index 1095a31..2867d6f 100644 --- a/autogenerated/types/chatinvite.h +++ b/autogenerated/types/chatinvite.h @@ -4,11 +4,11 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chatphoto.h" -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "chat.h" #include "user.h" +#include "chatphoto.h" class ChatInvite: public TelegramObject { diff --git a/autogenerated/types/chatparticipants.h b/autogenerated/types/chatparticipants.h index 8cb8e20..2151552 100644 --- a/autogenerated/types/chatparticipants.h +++ b/autogenerated/types/chatparticipants.h @@ -4,8 +4,8 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chatparticipant.h" #include "../../types/basic.h" +#include "chatparticipant.h" #include "../../types/telegramobject.h" class ChatParticipants: public TelegramObject diff --git a/autogenerated/types/config.h b/autogenerated/types/config.h index c301b1d..690b881 100644 --- a/autogenerated/types/config.h +++ b/autogenerated/types/config.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "disabledfeature.h" +#include "../../types/telegramobject.h" #include "dcoption.h" class Config: public TelegramObject diff --git a/autogenerated/types/contactsblocked.h b/autogenerated/types/contactsblocked.h index 0ee252e..4a75cd5 100644 --- a/autogenerated/types/contactsblocked.h +++ b/autogenerated/types/contactsblocked.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "contactblocked.h" +#include "user.h" class ContactsBlocked: public TelegramObject { diff --git a/autogenerated/types/contactscontacts.h b/autogenerated/types/contactscontacts.h index 92b559d..e967e7c 100644 --- a/autogenerated/types/contactscontacts.h +++ b/autogenerated/types/contactscontacts.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "contact.h" +#include "user.h" class ContactsContacts: public TelegramObject { diff --git a/autogenerated/types/contactsfound.h b/autogenerated/types/contactsfound.h index 5bdc0b9..9b943f5 100644 --- a/autogenerated/types/contactsfound.h +++ b/autogenerated/types/contactsfound.h @@ -4,11 +4,11 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "peer.h" +#include "chat.h" +#include "user.h" class ContactsFound: public TelegramObject { diff --git a/autogenerated/types/contactslink.h b/autogenerated/types/contactslink.h index cec5a43..f1255a7 100644 --- a/autogenerated/types/contactslink.h +++ b/autogenerated/types/contactslink.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "contactlink.h" +#include "user.h" class ContactsLink: public TelegramObject { diff --git a/autogenerated/types/contactsresolvedpeer.h b/autogenerated/types/contactsresolvedpeer.h index 4698879..6831007 100644 --- a/autogenerated/types/contactsresolvedpeer.h +++ b/autogenerated/types/contactsresolvedpeer.h @@ -4,11 +4,11 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "peer.h" +#include "chat.h" +#include "user.h" class ContactsResolvedPeer: public TelegramObject { diff --git a/autogenerated/types/contactstoppeers.h b/autogenerated/types/contactstoppeers.h index 85c7f2c..c401b15 100644 --- a/autogenerated/types/contactstoppeers.h +++ b/autogenerated/types/contactstoppeers.h @@ -4,11 +4,11 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "toppeercategorypeers.h" +#include "chat.h" +#include "user.h" class ContactsTopPeers: public TelegramObject { diff --git a/autogenerated/types/dialog.h b/autogenerated/types/dialog.h index b062b59..d16da5b 100644 --- a/autogenerated/types/dialog.h +++ b/autogenerated/types/dialog.h @@ -6,9 +6,9 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "peernotifysettings.h" #include "draftmessage.h" #include "peer.h" -#include "peernotifysettings.h" class Dialog: public TelegramObject { diff --git a/autogenerated/types/document.h b/autogenerated/types/document.h index ba650da..7fa0870 100644 --- a/autogenerated/types/document.h +++ b/autogenerated/types/document.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "documentattribute.h" #include "photosize.h" +#include "documentattribute.h" class Document: public TelegramObject { diff --git a/autogenerated/types/documentattribute.h b/autogenerated/types/documentattribute.h index a747397..968a51d 100644 --- a/autogenerated/types/documentattribute.h +++ b/autogenerated/types/documentattribute.h @@ -5,9 +5,9 @@ // DO NOT EDIT!!! #include "../../types/basic.h" +#include "inputstickerset.h" #include "../../types/telegramobject.h" #include "maskcoords.h" -#include "inputstickerset.h" class DocumentAttribute: public TelegramObject { diff --git a/autogenerated/types/foundgif.h b/autogenerated/types/foundgif.h index 464730f..99e494c 100644 --- a/autogenerated/types/foundgif.h +++ b/autogenerated/types/foundgif.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" #include "photo.h" class FoundGif: public TelegramObject diff --git a/autogenerated/types/game.h b/autogenerated/types/game.h index 3433686..7666e7f 100644 --- a/autogenerated/types/game.h +++ b/autogenerated/types/game.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" #include "photo.h" class Game: public TelegramObject diff --git a/autogenerated/types/inputbotinlinemessage.h b/autogenerated/types/inputbotinlinemessage.h index e8a99bf..df53109 100644 --- a/autogenerated/types/inputbotinlinemessage.h +++ b/autogenerated/types/inputbotinlinemessage.h @@ -4,8 +4,8 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "replymarkup.h" #include "../../types/basic.h" +#include "replymarkup.h" #include "../../types/telegramobject.h" #include "messageentity.h" #include "inputgeopoint.h" diff --git a/autogenerated/types/inputgame.h b/autogenerated/types/inputgame.h index 2115f7f..7803e3b 100644 --- a/autogenerated/types/inputgame.h +++ b/autogenerated/types/inputgame.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "inputuser.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "inputuser.h" class InputGame: public TelegramObject { diff --git a/autogenerated/types/inputmedia.h b/autogenerated/types/inputmedia.h index 2714744..00477d6 100644 --- a/autogenerated/types/inputmedia.h +++ b/autogenerated/types/inputmedia.h @@ -6,12 +6,12 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "inputgame.h" #include "documentattribute.h" #include "inputphoto.h" #include "inputgeopoint.h" #include "inputfile.h" #include "inputdocument.h" -#include "inputgame.h" class InputMedia: public TelegramObject { diff --git a/autogenerated/types/inputnotifypeer.h b/autogenerated/types/inputnotifypeer.h index 1f39f14..023a10f 100644 --- a/autogenerated/types/inputnotifypeer.h +++ b/autogenerated/types/inputnotifypeer.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "inputpeer.h" +#include "../../types/telegramobject.h" class InputNotifyPeer: public TelegramObject { diff --git a/autogenerated/types/inputprivacyrule.h b/autogenerated/types/inputprivacyrule.h index 014a435..8dce43a 100644 --- a/autogenerated/types/inputprivacyrule.h +++ b/autogenerated/types/inputprivacyrule.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "inputuser.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "inputuser.h" class InputPrivacyRule: public TelegramObject { diff --git a/autogenerated/types/message.h b/autogenerated/types/message.h index 07af4ab..f2bc00f 100644 --- a/autogenerated/types/message.h +++ b/autogenerated/types/message.h @@ -4,14 +4,14 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "replymarkup.h" #include "../../types/basic.h" +#include "replymarkup.h" #include "../../types/telegramobject.h" -#include "messageentity.h" #include "peer.h" -#include "messagefwdheader.h" -#include "messageaction.h" #include "messagemedia.h" +#include "messageaction.h" +#include "messageentity.h" +#include "messagefwdheader.h" class Message: public TelegramObject { diff --git a/autogenerated/types/messageentity.h b/autogenerated/types/messageentity.h index 6a11cfc..e339b25 100644 --- a/autogenerated/types/messageentity.h +++ b/autogenerated/types/messageentity.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "inputuser.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "inputuser.h" class MessageEntity: public TelegramObject { diff --git a/autogenerated/types/messagemedia.h b/autogenerated/types/messagemedia.h index 2dd7960..68a84c6 100644 --- a/autogenerated/types/messagemedia.h +++ b/autogenerated/types/messagemedia.h @@ -4,13 +4,13 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "game.h" -#include "geopoint.h" #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" -#include "webpage.h" +#include "../../types/telegramobject.h" #include "photo.h" +#include "geopoint.h" +#include "webpage.h" +#include "game.h" class MessageMedia: public TelegramObject { diff --git a/autogenerated/types/messagesarchivedstickers.h b/autogenerated/types/messagesarchivedstickers.h index b4893ad..4d1901e 100644 --- a/autogenerated/types/messagesarchivedstickers.h +++ b/autogenerated/types/messagesarchivedstickers.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "stickersetcovered.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "stickersetcovered.h" class MessagesArchivedStickers: public TelegramObject { diff --git a/autogenerated/types/messagesbotresults.h b/autogenerated/types/messagesbotresults.h index fc3e55b..0f022f0 100644 --- a/autogenerated/types/messagesbotresults.h +++ b/autogenerated/types/messagesbotresults.h @@ -4,10 +4,10 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "botinlineresult.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" #include "inlinebotswitchpm.h" +#include "botinlineresult.h" class MessagesBotResults: public TelegramObject { diff --git a/autogenerated/types/messageschatfull.h b/autogenerated/types/messageschatfull.h index 33a681a..dcbcaea 100644 --- a/autogenerated/types/messageschatfull.h +++ b/autogenerated/types/messageschatfull.h @@ -4,11 +4,11 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" +#include "chat.h" #include "chatfull.h" +#include "user.h" class MessagesChatFull: public TelegramObject { diff --git a/autogenerated/types/messageschats.h b/autogenerated/types/messageschats.h index e8965b6..f745d1c 100644 --- a/autogenerated/types/messageschats.h +++ b/autogenerated/types/messageschats.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "chat.h" class MessagesChats: public TelegramObject { diff --git a/autogenerated/types/messagesdialogs.h b/autogenerated/types/messagesdialogs.h index c0dad60..b81b932 100644 --- a/autogenerated/types/messagesdialogs.h +++ b/autogenerated/types/messagesdialogs.h @@ -4,12 +4,12 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "message.h" +#include "chat.h" #include "user.h" #include "dialog.h" -#include "message.h" class MessagesDialogs: public TelegramObject { diff --git a/autogenerated/types/messagesfeaturedstickers.h b/autogenerated/types/messagesfeaturedstickers.h index fdb7cb0..b6a279d 100644 --- a/autogenerated/types/messagesfeaturedstickers.h +++ b/autogenerated/types/messagesfeaturedstickers.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "stickersetcovered.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "stickersetcovered.h" class MessagesFeaturedStickers: public TelegramObject { diff --git a/autogenerated/types/messagesmessages.h b/autogenerated/types/messagesmessages.h index 986e8bd..5d028e7 100644 --- a/autogenerated/types/messagesmessages.h +++ b/autogenerated/types/messagesmessages.h @@ -4,11 +4,11 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "message.h" +#include "chat.h" +#include "user.h" class MessagesMessages: public TelegramObject { diff --git a/autogenerated/types/messagespeerdialogs.h b/autogenerated/types/messagespeerdialogs.h index 258efee..6222ea7 100644 --- a/autogenerated/types/messagespeerdialogs.h +++ b/autogenerated/types/messagespeerdialogs.h @@ -4,12 +4,12 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "message.h" +#include "chat.h" #include "user.h" #include "dialog.h" -#include "message.h" #include "updatesstate.h" class MessagesPeerDialogs: public TelegramObject diff --git a/autogenerated/types/messagesrecentstickers.h b/autogenerated/types/messagesrecentstickers.h index 073c6f6..abb2422 100644 --- a/autogenerated/types/messagesrecentstickers.h +++ b/autogenerated/types/messagesrecentstickers.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" class MessagesRecentStickers: public TelegramObject { diff --git a/autogenerated/types/messagessavedgifs.h b/autogenerated/types/messagessavedgifs.h index f2d8324..1abf801 100644 --- a/autogenerated/types/messagessavedgifs.h +++ b/autogenerated/types/messagessavedgifs.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" class MessagesSavedGifs: public TelegramObject { diff --git a/autogenerated/types/messagesstickers.h b/autogenerated/types/messagesstickers.h index fa40ea3..44de766 100644 --- a/autogenerated/types/messagesstickers.h +++ b/autogenerated/types/messagesstickers.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" class MessagesStickers: public TelegramObject { diff --git a/autogenerated/types/messagesstickerset.h b/autogenerated/types/messagesstickerset.h index 02cb940..bb48978 100644 --- a/autogenerated/types/messagesstickerset.h +++ b/autogenerated/types/messagesstickerset.h @@ -5,9 +5,9 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "stickerpack.h" #include "document.h" +#include "../../types/telegramobject.h" #include "stickerset.h" class MessagesStickerSet: public TelegramObject diff --git a/autogenerated/types/messagesstickersetinstallresult.h b/autogenerated/types/messagesstickersetinstallresult.h index 9929928..c3972a7 100644 --- a/autogenerated/types/messagesstickersetinstallresult.h +++ b/autogenerated/types/messagesstickersetinstallresult.h @@ -4,9 +4,9 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "stickersetcovered.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "stickersetcovered.h" class MessagesStickerSetInstallResult: public TelegramObject { diff --git a/autogenerated/types/photosphoto.h b/autogenerated/types/photosphoto.h index cfe4b47..0503a82 100644 --- a/autogenerated/types/photosphoto.h +++ b/autogenerated/types/photosphoto.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "photo.h" +#include "user.h" class PhotosPhoto: public TelegramObject { diff --git a/autogenerated/types/photosphotos.h b/autogenerated/types/photosphotos.h index 45b4a2d..23c1324 100644 --- a/autogenerated/types/photosphotos.h +++ b/autogenerated/types/photosphotos.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" #include "photo.h" +#include "user.h" class PhotosPhotos: public TelegramObject { diff --git a/autogenerated/types/stickersetcovered.h b/autogenerated/types/stickersetcovered.h index f7ae1ba..35d9ce1 100644 --- a/autogenerated/types/stickersetcovered.h +++ b/autogenerated/types/stickersetcovered.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" #include "stickerset.h" class StickerSetCovered: public TelegramObject diff --git a/autogenerated/types/types.h b/autogenerated/types/types.h index b18df5e..cd87638 100644 --- a/autogenerated/types/types.h +++ b/autogenerated/types/types.h @@ -163,10 +163,10 @@ #include "inputgame.h" #include "highscore.h" #include "messageshighscores.h" -#include "../../types/mtproto/mtprotomessage.h" -#include "../../types/mtproto/rpcresult.h" #include "../../types/mtproto/mtprotoobject.h" -#include "../../types/mtproto/messagecontainer.h" #include "../../types/mtproto/messagecopy.h" +#include "../../types/mtproto/rpcresult.h" +#include "../../types/mtproto/mtprotomessage.h" +#include "../../types/mtproto/messagecontainer.h" #endif // TYPES_H diff --git a/autogenerated/types/update.h b/autogenerated/types/update.h index 44e1728..a639c9f 100644 --- a/autogenerated/types/update.h +++ b/autogenerated/types/update.h @@ -4,28 +4,28 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "../../types/basic.h" -#include "geopoint.h" #include "../../types/telegramobject.h" -#include "userstatus.h" -#include "userprofilephoto.h" -#include "dcoption.h" -#include "draftmessage.h" +#include "peernotifysettings.h" +#include "privacyrule.h" #include "peer.h" -#include "encryptedchat.h" -#include "notifypeer.h" -#include "chatparticipants.h" -#include "messagesstickerset.h" #include "messagemedia.h" -#include "message.h" +#include "contactlink.h" +#include "geopoint.h" +#include "chatparticipants.h" +#include "dcoption.h" +#include "notifypeer.h" #include "privacykey.h" +#include "../../types/basic.h" +#include "userstatus.h" +#include "message.h" +#include "inputbotinlinemessageid.h" #include "webpage.h" -#include "privacyrule.h" +#include "messagesstickerset.h" +#include "draftmessage.h" #include "sendmessageaction.h" #include "encryptedmessage.h" -#include "peernotifysettings.h" -#include "contactlink.h" -#include "inputbotinlinemessageid.h" +#include "encryptedchat.h" +#include "userprofilephoto.h" class Update: public TelegramObject { diff --git a/autogenerated/types/updates.h b/autogenerated/types/updates.h index 93fd0d9..b673141 100644 --- a/autogenerated/types/updates.h +++ b/autogenerated/types/updates.h @@ -4,14 +4,14 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "update.h" +#include "messagemedia.h" #include "messageentity.h" +#include "chat.h" #include "user.h" #include "messagefwdheader.h" -#include "update.h" -#include "messagemedia.h" class Updates: public TelegramObject { diff --git a/autogenerated/types/updateschanneldifference.h b/autogenerated/types/updateschanneldifference.h index 1e19741..c61368e 100644 --- a/autogenerated/types/updateschanneldifference.h +++ b/autogenerated/types/updateschanneldifference.h @@ -4,12 +4,12 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "user.h" -#include "update.h" #include "message.h" +#include "update.h" +#include "chat.h" +#include "user.h" class UpdatesChannelDifference: public TelegramObject { diff --git a/autogenerated/types/updatesdifference.h b/autogenerated/types/updatesdifference.h index b66039c..50e06ca 100644 --- a/autogenerated/types/updatesdifference.h +++ b/autogenerated/types/updatesdifference.h @@ -4,13 +4,13 @@ // Generated by APIGenerator 1.0 // DO NOT EDIT!!! -#include "chat.h" #include "../../types/basic.h" #include "../../types/telegramobject.h" +#include "message.h" +#include "update.h" +#include "chat.h" #include "user.h" #include "encryptedmessage.h" -#include "update.h" -#include "message.h" #include "updatesstate.h" class UpdatesDifference: public TelegramObject diff --git a/autogenerated/types/uploadfile.h b/autogenerated/types/uploadfile.h index 11a3c68..fa807d2 100644 --- a/autogenerated/types/uploadfile.h +++ b/autogenerated/types/uploadfile.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "storagefiletype.h" +#include "../../types/telegramobject.h" class UploadFile: public TelegramObject { diff --git a/autogenerated/types/user.h b/autogenerated/types/user.h index b504760..857e53f 100644 --- a/autogenerated/types/user.h +++ b/autogenerated/types/user.h @@ -6,8 +6,8 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" -#include "userprofilephoto.h" #include "userstatus.h" +#include "userprofilephoto.h" class User: public TelegramObject { diff --git a/autogenerated/types/userfull.h b/autogenerated/types/userfull.h index 106af21..b72f635 100644 --- a/autogenerated/types/userfull.h +++ b/autogenerated/types/userfull.h @@ -7,10 +7,10 @@ #include "../../types/basic.h" #include "../../types/telegramobject.h" #include "botinfo.h" -#include "user.h" #include "photo.h" -#include "contactslink.h" #include "peernotifysettings.h" +#include "contactslink.h" +#include "user.h" class UserFull: public TelegramObject { diff --git a/autogenerated/types/webpage.h b/autogenerated/types/webpage.h index cbf5e06..0572a7d 100644 --- a/autogenerated/types/webpage.h +++ b/autogenerated/types/webpage.h @@ -5,8 +5,8 @@ // DO NOT EDIT!!! #include "../../types/basic.h" -#include "../../types/telegramobject.h" #include "document.h" +#include "../../types/telegramobject.h" #include "photo.h" class WebPage: public TelegramObject diff --git a/cache/database/tables/chatstable.cpp b/cache/database/tables/chatstable.cpp index 9c830ac..cb64a6a 100644 --- a/cache/database/tables/chatstable.cpp +++ b/cache/database/tables/chatstable.cpp @@ -18,7 +18,7 @@ void ChatsTable::insertQuery(QSqlQuery &queryobj, TelegramObject *telegramobject Chat* chat = qobject_cast(telegramobject); queryobj.bindValue(":id", TelegramHelper::identifier(chat)); - queryobj.bindValue(":title", chat->title().toString()); + queryobj.bindValue(":title", chat->title()); queryobj.bindValue(":chat", data); this->execute(queryobj); diff --git a/cache/database/tables/stickersetstable.cpp b/cache/database/tables/stickersetstable.cpp index 16f5b2c..358266f 100644 --- a/cache/database/tables/stickersetstable.cpp +++ b/cache/database/tables/stickersetstable.cpp @@ -21,8 +21,8 @@ void StickerSetsTable::insertQuery(QSqlQuery &queryobj, TelegramObject *telegram queryobj.bindValue(":id", stickerset->id()); queryobj.bindValue(":position", -1); - queryobj.bindValue(":title", stickerset->title().toString()); - queryobj.bindValue(":shortname", stickerset->shortName().toString()); + queryobj.bindValue(":title", stickerset->title()); + queryobj.bindValue(":shortname", stickerset->shortName()); queryobj.bindValue(":stickerset", data); this->execute(queryobj); diff --git a/cache/database/tables/userstable.cpp b/cache/database/tables/userstable.cpp index 38c1b8b..92e1cf3 100644 --- a/cache/database/tables/userstable.cpp +++ b/cache/database/tables/userstable.cpp @@ -19,7 +19,7 @@ void UsersTable::insertQuery(QSqlQuery &queryobj, TelegramObject *telegramobject queryobj.bindValue(":id", TelegramHelper::identifier(user)); queryobj.bindValue(":name", TelegramHelper::fullName(user)); - queryobj.bindValue(":username", user->username().toString()); + queryobj.bindValue(":username", user->username()); queryobj.bindValue(":iscontact", user->isContact()); queryobj.bindValue(":user", data); diff --git a/cache/file/fileuploader.cpp b/cache/file/fileuploader.cpp index 59f0530..43db099 100644 --- a/cache/file/fileuploader.cpp +++ b/cache/file/fileuploader.cpp @@ -110,12 +110,12 @@ InputFile *FileUploader::createInputFile() const InputFile* inputfile = new InputFile(); inputfile->setId(this->_localfileid); inputfile->setParts(this->_partscount); - inputfile->setName(ToTLString(this->_filename)); + inputfile->setName(this->_filename); if(!this->_isbigfile) { inputfile->setConstructorId(TLTypes::InputFile); - inputfile->setMd5Checksum(ToTLString(this->_md5hash)); + inputfile->setMd5Checksum(this->_md5hash); } else inputfile->setConstructorId(TLTypes::InputFileBig); @@ -127,7 +127,7 @@ InputMedia *FileUploader::createInputMediaPhoto() const { InputMedia* inputmedia = new InputMedia(); inputmedia->setConstructorId(TLTypes::InputMediaUploadedPhoto); - inputmedia->setCaption(ToTLString(this->_caption)); + inputmedia->setCaption(this->_caption); inputmedia->setFile(this->createInputFile()); return inputmedia; @@ -138,8 +138,8 @@ InputMedia *FileUploader::createInputMediaDocument() const InputMedia* inputmedia = new InputMedia(); inputmedia->setConstructorId(TLTypes::InputMediaUploadedDocument); inputmedia->setFile(this->createInputFile()); - inputmedia->setMimeType(ToTLString(this->_mimetype)); - inputmedia->setCaption(ToTLString(this->_caption)); + inputmedia->setMimeType(this->_mimetype); + inputmedia->setCaption(this->_caption); TLVector attributes; this->createDocumentAttributes(attributes, inputmedia); diff --git a/config/dcconfig.cpp b/config/dcconfig.cpp index 7fd41ad..d3d0ee8 100644 --- a/config/dcconfig.cpp +++ b/config/dcconfig.cpp @@ -14,7 +14,7 @@ DCConfig::DCConfig(const QString &host, TLInt port, TLInt dcid, bool isipv6, QOb this->_dcoption = new DcOption(this); this->_dcoption->setId(dcid); this->_dcoption->setIsIpv6(isipv6); - this->_dcoption->setIpAddress(ToTLString(host)); + this->_dcoption->setIpAddress(host); this->_dcoption->setPort(port); this->_id = MakeDCConfigId(this->_dcoption->isIpv6(), this->_dcoption->isMediaOnly(), this->_dcoption->id()); diff --git a/models/contactsmodel.cpp b/models/contactsmodel.cpp index c1418dc..484e445 100644 --- a/models/contactsmodel.cpp +++ b/models/contactsmodel.cpp @@ -26,14 +26,14 @@ void ContactsModel::createChat(const QString& title, const QVariantList& users) foreach(QVariant user, users) inputusers << TelegramHelper::inputUser(user.value(), this); - MTProtoRequest* req = TelegramAPI::messagesCreateChat(DC_MainSession, inputusers, ToTLString(title)); + MTProtoRequest* req = TelegramAPI::messagesCreateChat(DC_MainSession, inputusers, title); connect(req, &MTProtoRequest::replied, this, &ContactsModel::onCreateChannelOrChatReplied); qDeleteAll(inputusers); } void ContactsModel::createChannel(const QString &title, const QString& description) { - MTProtoRequest* req = TelegramAPI::channelsCreateChannel(DC_MainSession, ToTLString(title), ToTLString(description)); + MTProtoRequest* req = TelegramAPI::channelsCreateChannel(DC_MainSession, title, description); connect(req, &MTProtoRequest::replied, this, &ContactsModel::onCreateChannelOrChatReplied); } diff --git a/models/messagesmodel.cpp b/models/messagesmodel.cpp index 9a73e7f..6a077b0 100644 --- a/models/messagesmodel.cpp +++ b/models/messagesmodel.cpp @@ -205,7 +205,7 @@ QVariant MessagesModel::data(const QModelIndex &index, int role) const if(!message->media()) return QString(); - return message->media()->caption().toString(); + return message->media()->caption(); } if(role == MessagesModel::ReplyItemRole) @@ -329,7 +329,7 @@ QVariant MessagesModel::data(const QModelIndex &index, int role) const Chat* chat = TelegramCache_chat(message->fwdFrom()->channelId()); if(chat) - return chat->title().toString(); + return chat->title(); } } @@ -480,7 +480,7 @@ void MessagesModel::editMessage(const QString& text, Message* editmessage) return; this->createInput(); - TelegramAPI::messagesEditMessage(DC_MainSession, this->_inputpeer, editmessage->id(), ToTLString(text), NULL, TLVector()); + TelegramAPI::messagesEditMessage(DC_MainSession, this->_inputpeer, editmessage->id(), text, NULL, TLVector()); } void MessagesModel::sendFile(const QUrl &filepath, const QString& caption) diff --git a/models/stickerpackmodel.cpp b/models/stickerpackmodel.cpp index 3aa6bbf..23d1a6f 100644 --- a/models/stickerpackmodel.cpp +++ b/models/stickerpackmodel.cpp @@ -26,7 +26,7 @@ QString StickerPackModel::title() const if(!this->_stickerset) return QString(); - return this->_stickerset->title().toString(); + return this->_stickerset->title(); } QVariant StickerPackModel::data(const QModelIndex &index, int role) const diff --git a/models/stickersetsmodel.cpp b/models/stickersetsmodel.cpp index a6c6f80..f7bc7a2 100644 --- a/models/stickersetsmodel.cpp +++ b/models/stickersetsmodel.cpp @@ -17,10 +17,10 @@ QVariant StickerSetsModel::data(const QModelIndex &index, int role) const return QVariant::fromValue(stickerset); if(role == StickerSetsModel::TitleRole) - return stickerset->title().toString(); + return stickerset->title(); if(role == StickerSetsModel::ShortNameRole) - return stickerset->shortName().toString(); + return stickerset->shortName(); if(role == StickerSetsModel::StickerPreviewRole) return QVariant::fromValue(StickerCache_stickerPreview(stickerset)); diff --git a/mtproto/decompiler/mtprotodecompilerbase.cpp b/mtproto/decompiler/mtprotodecompilerbase.cpp index 3a6430d..819361a 100644 --- a/mtproto/decompiler/mtprotodecompilerbase.cpp +++ b/mtproto/decompiler/mtprotodecompilerbase.cpp @@ -5,31 +5,31 @@ MTProtoDecompilerBase::MTProtoDecompilerBase(QObject *parent) : QObject(parent) } -bool MTProtoDecompilerBase::isPrintable(const QByteArray &ba) +bool MTProtoDecompilerBase::isPrintable(const TLString &ba) { for(int i = 0; i < ba.length(); i++) { - char ch = ba.at(i); + QChar ch = ba.at(i); - if((ch < 0x20) || (ch > 0x7E)) + if((ch.cell() < 0x20) || (ch.cell() > 0x7E)) return false; } return true; } -QString MTProtoDecompilerBase::printableString(const QByteArray &ba) +TLString MTProtoDecompilerBase::printableString(const TLString &ba) { if(this->isPrintable(ba)) { if(ba.length() > ELIDE_LENGTH) - return QString::fromUtf8(ba.left(ELIDE_LENGTH)).simplified().append("..."); + return ba.left(ELIDE_LENGTH).simplified().append("..."); - return QString::fromUtf8(ba); + return ba; } if(ba.length() > ELIDE_LENGTH) - return QString(ba.left(ELIDE_LENGTH).toHex()).append("..."); + return ba.left(ELIDE_LENGTH).toUtf8().toHex().append("..."); - return QString(ba.toHex()); + return ba.toUtf8().toHex(); } diff --git a/mtproto/decompiler/mtprotodecompilerbase.h b/mtproto/decompiler/mtprotodecompilerbase.h index 2f9c9fe..0a3847f 100644 --- a/mtproto/decompiler/mtprotodecompilerbase.h +++ b/mtproto/decompiler/mtprotodecompilerbase.h @@ -6,7 +6,7 @@ #include "../../types/basic.h" #define BIT_FIELD_VALUE(flag, bitno) QString((flag & bitno) ? "true" : "false") -#define ELIDE_LENGTH 50 +#define ELIDE_LENGTH 20 class MTProtoDecompilerBase : public QObject { @@ -20,10 +20,10 @@ class MTProtoDecompilerBase : public QObject virtual void decompile(int dcid, int direction, TLLong messageid, const QByteArray& data) = 0; private: - bool isPrintable(const QByteArray& ba); + bool isPrintable(const TLString &ba); protected: - QString printableString(const QByteArray& ba); + TLString printableString(const TLString &ba); template void decompileTLVector(QString& result, MTProtoStream& mtstream, bool isbaretype = false); private: diff --git a/mtproto/mtprotostream.cpp b/mtproto/mtprotostream.cpp index 692d4d6..838e505 100644 --- a/mtproto/mtprotostream.cpp +++ b/mtproto/mtprotostream.cpp @@ -291,7 +291,7 @@ void MTProtoStream::writeTLBytes(const TLBytes &val) void MTProtoStream::writeTLString(const TLString &val) { - this->writeTLBytes(val); + this->writeTLBytes(val.toUtf8()); } void MTProtoStream::writeRaw(const QByteArray &data, bool prependlength) diff --git a/objects/sendstatus/sendstatusobject.cpp b/objects/sendstatus/sendstatusobject.cpp index 02652c3..99e8356 100644 --- a/objects/sendstatus/sendstatusobject.cpp +++ b/objects/sendstatus/sendstatusobject.cpp @@ -125,12 +125,12 @@ QString SendStatusObject::createUserPrefix() const if(this->_users.count() == 1) { QList users = this->_users.toList(); - return tr("%1 is %2").arg(users.first()->firstName().toString()); + return tr("%1 is %2").arg(users.first()->firstName()); } else if(this->_users.count() == 2) { QList users = this->_users.toList(); - return tr("%1 and %2 are %3").arg(users.first()->firstName().toString(), users.last()->firstName().toString()); + return tr("%1 and %2 are %3").arg(users.first()->firstName(), users.last()->firstName()); } return tr("%1 users are %2").arg(this->_users.count()); diff --git a/objects/telegraminitializer.cpp b/objects/telegraminitializer.cpp index 33bca15..0d35011 100644 --- a/objects/telegraminitializer.cpp +++ b/objects/telegraminitializer.cpp @@ -289,7 +289,7 @@ void TelegramInitializer::onAccountGetPasswordReplied(MTProtoReply *mtreply) return; } - emit sessionPasswordNeeded(this->_accountpassword->hint().toString()); + emit sessionPasswordNeeded(this->_accountpassword->hint()); } void TelegramInitializer::onFloodLock(int seconds) diff --git a/telegram.cpp b/telegram.cpp index daf37c1..527df62 100644 --- a/telegram.cpp +++ b/telegram.cpp @@ -210,7 +210,7 @@ QString Telegram::messageMediaText(MessageMedia *messagemedia) const return tr("GIF"); if((attribute = TelegramHelper::documentHas(document, TLTypes::DocumentAttributeSticker))) - return tr("%1 Sticker").arg(attribute->alt().toString()); + return tr("%1 Sticker").arg(attribute->alt()); if(TelegramHelper::documentHas(document, TLTypes::DocumentAttributeVideo)) return tr("Video file"); @@ -280,17 +280,17 @@ QString Telegram::messageActionText(Message* message) const Chat* chat = TelegramCache_chat(TelegramHelper::identifier(message->toId())); if(messageaction->channelId()) - return tr("%1 created channel «%2»").arg(fromfullname, (chat ? chat->title().toString() : QString())); + return tr("%1 created channel «%2»").arg(fromfullname, (chat ? chat->title() : QString())); - return tr("%1 created group «%2»").arg(fromfullname, (chat ? chat->title().toString() : QString())); + return tr("%1 created group «%2»").arg(fromfullname, (chat ? chat->title() : QString())); } if(ctorid == TLTypes::MessageActionChatEditTitle) { if(message->isPost()) - return tr("Channel name changed to «%1»").arg(messageaction->title().toString()); + return tr("Channel name changed to «%1»").arg(messageaction->title()); - return tr("«%1» changed group name to «%2»").arg(fromfullname, messageaction->title().toString()); + return tr("«%1» changed group name to «%2»").arg(fromfullname, messageaction->title()); } if(ctorid == TLTypes::MessageActionChatEditPhoto) @@ -329,7 +329,7 @@ QString Telegram::messageActionText(Message* message) const return tr("«%1» has joined the group via invite link").arg(fromfullname); if(ctorid == TLTypes::MessageActionChannelCreate) - return tr("Channel «%1» created").arg(messageaction->title().toString()); + return tr("Channel «%1» created").arg(messageaction->title()); if(ctorid == TLTypes::MessageActionChatMigrateTo) { diff --git a/types/basic.h b/types/basic.h index db5031f..06183f8 100644 --- a/types/basic.h +++ b/types/basic.h @@ -16,8 +16,6 @@ #define UNSET_FLAG_BIT(flags, bitno) flags & ~(1 << bitno) #define SET_FLAG_BIT_VALUE(flags, bitno, v) flags |= ((v ? 1 : 0) << bitno) -#define ToTLString(s) s.toUtf8() - typedef quint32 TLConstructor; typedef bool TLTrue; typedef bool TLBool; @@ -25,7 +23,7 @@ typedef qint32 TLInt; typedef qint64 TLLong; typedef double TLDouble; typedef QByteArray TLBytes; -typedef QByteArray TLObject; +typedef QString TLString; // Internal types typedef quint64 MessageId; @@ -43,18 +41,6 @@ typedef quint64 MessageId; * MessageActionChannelMigrateFrom -> supergroup side, contains old chat_id, id: 1 */ -class TLString: public QByteArray -{ - public: - TLString(): QByteArray() { } - TLString(const QByteArray& rhs): QByteArray(rhs) { } - TLString(const QString& rhs): QByteArray(rhs.toUtf8()) { } - QString toString() const { return QString::fromUtf8(*this); } -}; - - -Q_DECLARE_METATYPE(TLString) - template using TLVector = QList; struct TLInt128 diff --git a/types/mtproto/mtprotoobject.cpp b/types/mtproto/mtprotoobject.cpp index 2b42bab..c1d965f 100644 --- a/types/mtproto/mtprotoobject.cpp +++ b/types/mtproto/mtprotoobject.cpp @@ -12,7 +12,7 @@ void MTProtoObject::read(MTProtoStream *mtstream) Q_ASSERT((this->_constructorid == MTProtoObject::ctorGzipPacked)); if(this->_constructorid == MTProtoObject::ctorGzipPacked) - this->_packeddata = mtstream->readTLString(); + this->_packeddata = mtstream->readTLBytes(); } void MTProtoObject::write(MTProtoStream *mtstream) @@ -25,12 +25,12 @@ void MTProtoObject::write(MTProtoStream *mtstream) mtstream->writeTLString(this->_packeddata); } -const TLString &MTProtoObject::packedData() +const TLBytes &MTProtoObject::packedData() { return this->_packeddata; } -void MTProtoObject::setPackedData(const TLString &packeddata) +void MTProtoObject::setPackedData(const TLBytes &packeddata) { if(this->_packeddata == packeddata) return; diff --git a/types/mtproto/mtprotoobject.h b/types/mtproto/mtprotoobject.h index ff8a70b..f4cbef3 100644 --- a/types/mtproto/mtprotoobject.h +++ b/types/mtproto/mtprotoobject.h @@ -8,7 +8,7 @@ class MTProtoObject : public TelegramObject { Q_OBJECT - Q_PROPERTY(TLString packedData READ packedData WRITE setPackedData NOTIFY packedDataChanged) + Q_PROPERTY(TLBytes packedData READ packedData WRITE setPackedData NOTIFY packedDataChanged) public: enum Constructors { @@ -19,14 +19,14 @@ class MTProtoObject : public TelegramObject explicit MTProtoObject(QObject *parent = 0); virtual void read(MTProtoStream* mtstream); virtual void write(MTProtoStream* mtstream); - const TLString& packedData(); - void setPackedData(const TLString& packeddata); + const TLBytes& packedData(); + void setPackedData(const TLBytes& packeddata); signals: void packedDataChanged(); private: - TLString _packeddata; + TLBytes _packeddata; }; #endif // MTPROTOOBJECT_H