/* Created from '/SourceFiles/mtproto/scheme.tl' by '/SourceFiles/mtproto/generate.py' script WARNING! All changes made in this file will be lost! This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once #include "mtproto/core_types.h" // Creator current layer and proxy class declaration namespace MTP { namespace internal { static constexpr mtpPrime CurrentLayer = 62; class TypeCreator; } // namespace internal } // namespace MTP // Type id constants enum { mtpc_resPQ = 0x5162463, mtpc_p_q_inner_data = 0x83c95aec, mtpc_server_DH_params_fail = 0x79cb045d, mtpc_server_DH_params_ok = 0xd0e8075c, mtpc_server_DH_inner_data = 0xb5890dba, mtpc_client_DH_inner_data = 0x6643b654, mtpc_dh_gen_ok = 0x3bcbf734, mtpc_dh_gen_retry = 0x46dc1fb9, mtpc_dh_gen_fail = 0xa69dae02, mtpc_destroy_auth_key_ok = 0xf660e1d4, mtpc_destroy_auth_key_none = 0xa9f2259, mtpc_destroy_auth_key_fail = 0xea109b13, mtpc_req_pq = 0x60469778, mtpc_req_DH_params = 0xd712e4be, mtpc_set_client_DH_params = 0xf5045f1f, mtpc_destroy_auth_key = 0xd1435160, mtpc_msgs_ack = 0x62d6b459, mtpc_bad_msg_notification = 0xa7eff811, mtpc_bad_server_salt = 0xedab447b, mtpc_msgs_state_req = 0xda69fb52, mtpc_msgs_state_info = 0x4deb57d, mtpc_msgs_all_info = 0x8cc0d131, mtpc_msg_detailed_info = 0x276d3ec6, mtpc_msg_new_detailed_info = 0x809db6df, mtpc_msg_resend_req = 0x7d861a08, mtpc_rpc_error = 0x2144ca19, mtpc_rpc_answer_unknown = 0x5e2ad36e, mtpc_rpc_answer_dropped_running = 0xcd78e586, mtpc_rpc_answer_dropped = 0xa43ad8b7, mtpc_future_salt = 0x949d9dc, mtpc_future_salts = 0xae500895, mtpc_pong = 0x347773c5, mtpc_destroy_session_ok = 0xe22045fc, mtpc_destroy_session_none = 0x62d350c9, mtpc_new_session_created = 0x9ec20908, mtpc_http_wait = 0x9299359f, mtpc_rpc_drop_answer = 0x58e4a740, mtpc_get_future_salts = 0xb921bd04, mtpc_ping = 0x7abe77ec, mtpc_ping_delay_disconnect = 0xf3427b8c, mtpc_destroy_session = 0xe7512126, mtpc_contest_saveDeveloperInfo = 0x9a5f6e95, mtpc_boolFalse = 0xbc799737, mtpc_boolTrue = 0x997275b5, mtpc_true = 0x3fedd339, mtpc_error = 0xc4b9f9bb, mtpc_null = 0x56730bcc, mtpc_inputPeerEmpty = 0x7f3b18ea, mtpc_inputPeerSelf = 0x7da07ec9, mtpc_inputPeerChat = 0x179be863, mtpc_inputPeerUser = 0x7b8e7de6, mtpc_inputPeerChannel = 0x20adaef8, mtpc_inputUserEmpty = 0xb98886cf, mtpc_inputUserSelf = 0xf7c1b13f, mtpc_inputUser = 0xd8292816, mtpc_inputPhoneContact = 0xf392b7f4, mtpc_inputFile = 0xf52ff27f, mtpc_inputFileBig = 0xfa4f0bb5, mtpc_inputMediaEmpty = 0x9664f57f, mtpc_inputMediaUploadedPhoto = 0x630c9af1, mtpc_inputMediaPhoto = 0xe9bfb4f3, mtpc_inputMediaGeoPoint = 0xf9c44144, mtpc_inputMediaContact = 0xa6e45987, mtpc_inputMediaUploadedDocument = 0xd070f1e9, mtpc_inputMediaUploadedThumbDocument = 0x50d88cae, mtpc_inputMediaDocument = 0x1a77f29c, mtpc_inputMediaVenue = 0x2827a81a, mtpc_inputMediaGifExternal = 0x4843b0fd, mtpc_inputMediaPhotoExternal = 0xb55f4f18, mtpc_inputMediaDocumentExternal = 0xe5e9607c, mtpc_inputMediaGame = 0xd33f43f3, mtpc_inputChatPhotoEmpty = 0x1ca48f57, mtpc_inputChatUploadedPhoto = 0x927c55b4, mtpc_inputChatPhoto = 0x8953ad37, mtpc_inputGeoPointEmpty = 0xe4c123d6, mtpc_inputGeoPoint = 0xf3b7acc9, mtpc_inputPhotoEmpty = 0x1cd7bf0d, mtpc_inputPhoto = 0xfb95c6c4, mtpc_inputFileLocation = 0x14637196, mtpc_inputEncryptedFileLocation = 0xf5235d55, mtpc_inputDocumentFileLocation = 0x430f0724, mtpc_inputAppEvent = 0x770656a8, mtpc_peerUser = 0x9db1bc6d, mtpc_peerChat = 0xbad0e5bb, mtpc_peerChannel = 0xbddde532, mtpc_storage_fileUnknown = 0xaa963b05, mtpc_storage_fileJpeg = 0x7efe0e, mtpc_storage_fileGif = 0xcae1aadf, mtpc_storage_filePng = 0xa4f63c0, mtpc_storage_filePdf = 0xae1e508d, mtpc_storage_fileMp3 = 0x528a0677, mtpc_storage_fileMov = 0x4b09ebbc, mtpc_storage_filePartial = 0x40bc6f52, mtpc_storage_fileMp4 = 0xb3cea0e4, mtpc_storage_fileWebp = 0x1081464c, mtpc_fileLocationUnavailable = 0x7c596b46, mtpc_fileLocation = 0x53d69076, mtpc_userEmpty = 0x200250ba, mtpc_user = 0xd10d979a, mtpc_userProfilePhotoEmpty = 0x4f11bae1, mtpc_userProfilePhoto = 0xd559d8c8, mtpc_userStatusEmpty = 0x9d05049, mtpc_userStatusOnline = 0xedb93949, mtpc_userStatusOffline = 0x8c703f, mtpc_userStatusRecently = 0xe26f42f1, mtpc_userStatusLastWeek = 0x7bf09fc, mtpc_userStatusLastMonth = 0x77ebc742, mtpc_chatEmpty = 0x9ba2d800, mtpc_chat = 0xd91cdd54, mtpc_chatForbidden = 0x7328bdb, mtpc_channel = 0xa14dca52, mtpc_channelForbidden = 0x8537784f, mtpc_chatFull = 0x2e02a614, mtpc_channelFull = 0xc3d5512f, mtpc_chatParticipant = 0xc8d7493e, mtpc_chatParticipantCreator = 0xda13538a, mtpc_chatParticipantAdmin = 0xe2d6e436, mtpc_chatParticipantsForbidden = 0xfc900c2b, mtpc_chatParticipants = 0x3f460fed, mtpc_chatPhotoEmpty = 0x37c1011c, mtpc_chatPhoto = 0x6153276a, mtpc_messageEmpty = 0x83e5de54, mtpc_message = 0xc09be45f, mtpc_messageService = 0x9e19a1f6, mtpc_messageMediaEmpty = 0x3ded6320, mtpc_messageMediaPhoto = 0x3d8ce53d, mtpc_messageMediaGeo = 0x56e0d474, mtpc_messageMediaContact = 0x5e7d2f39, mtpc_messageMediaUnsupported = 0x9f84f49e, mtpc_messageMediaDocument = 0xf3e02ea8, mtpc_messageMediaWebPage = 0xa32dd600, mtpc_messageMediaVenue = 0x7912b71f, mtpc_messageMediaGame = 0xfdb19008, mtpc_messageActionEmpty = 0xb6aef7b0, mtpc_messageActionChatCreate = 0xa6638b9a, mtpc_messageActionChatEditTitle = 0xb5a1ce5a, mtpc_messageActionChatEditPhoto = 0x7fcb13a8, mtpc_messageActionChatDeletePhoto = 0x95e3fbef, mtpc_messageActionChatAddUser = 0x488a7337, mtpc_messageActionChatDeleteUser = 0xb2ae9b0c, mtpc_messageActionChatJoinedByLink = 0xf89cf5e8, mtpc_messageActionChannelCreate = 0x95d2ac92, mtpc_messageActionChatMigrateTo = 0x51bdb021, mtpc_messageActionChannelMigrateFrom = 0xb055eaee, mtpc_messageActionPinMessage = 0x94bd38ed, mtpc_messageActionHistoryClear = 0x9fbab604, mtpc_messageActionGameScore = 0x92a72876, mtpc_messageActionPhoneCall = 0x80e11a7f, mtpc_dialog = 0x66ffba14, mtpc_photoEmpty = 0x2331b22d, mtpc_photo = 0x9288dd29, mtpc_photoSizeEmpty = 0xe17e23c, mtpc_photoSize = 0x77bfb61b, mtpc_photoCachedSize = 0xe9a734fa, mtpc_geoPointEmpty = 0x1117dd5f, mtpc_geoPoint = 0x2049d70c, mtpc_auth_checkedPhone = 0x811ea28e, mtpc_auth_sentCode = 0x5e002502, mtpc_auth_authorization = 0xcd050916, mtpc_auth_exportedAuthorization = 0xdf969c2d, mtpc_inputNotifyPeer = 0xb8bc5b0c, mtpc_inputNotifyUsers = 0x193b4417, mtpc_inputNotifyChats = 0x4a95e84e, mtpc_inputNotifyAll = 0xa429b886, mtpc_inputPeerNotifyEventsEmpty = 0xf03064d8, mtpc_inputPeerNotifyEventsAll = 0xe86a2c74, mtpc_inputPeerNotifySettings = 0x38935eb2, mtpc_peerNotifyEventsEmpty = 0xadd53cb3, mtpc_peerNotifyEventsAll = 0x6d1ded88, mtpc_peerNotifySettingsEmpty = 0x70a68512, mtpc_peerNotifySettings = 0x9acda4c0, mtpc_peerSettings = 0x818426cd, mtpc_wallPaper = 0xccb03657, mtpc_wallPaperSolid = 0x63117f24, mtpc_inputReportReasonSpam = 0x58dbcab8, mtpc_inputReportReasonViolence = 0x1e22c78d, mtpc_inputReportReasonPornography = 0x2e59d922, mtpc_inputReportReasonOther = 0xe1746d0a, mtpc_userFull = 0xf220f3f, mtpc_contact = 0xf911c994, mtpc_importedContact = 0xd0028438, mtpc_contactBlocked = 0x561bc879, mtpc_contactStatus = 0xd3680c61, mtpc_contacts_link = 0x3ace484c, mtpc_contacts_contactsNotModified = 0xb74ba9d2, mtpc_contacts_contacts = 0x6f8b8cb2, mtpc_contacts_importedContacts = 0xad524315, mtpc_contacts_blocked = 0x1c138d15, mtpc_contacts_blockedSlice = 0x900802a1, mtpc_messages_dialogs = 0x15ba6c40, mtpc_messages_dialogsSlice = 0x71e094f3, mtpc_messages_messages = 0x8c718e87, mtpc_messages_messagesSlice = 0xb446ae3, mtpc_messages_channelMessages = 0x99262e37, mtpc_messages_chats = 0x64ff9fd5, mtpc_messages_chatsSlice = 0x9cd81144, mtpc_messages_chatFull = 0xe5d7d19c, mtpc_messages_affectedHistory = 0xb45c69d1, mtpc_inputMessagesFilterEmpty = 0x57e2f66c, mtpc_inputMessagesFilterPhotos = 0x9609a51c, mtpc_inputMessagesFilterVideo = 0x9fc00e65, mtpc_inputMessagesFilterPhotoVideo = 0x56e9f0e4, mtpc_inputMessagesFilterPhotoVideoDocuments = 0xd95e73bb, mtpc_inputMessagesFilterDocument = 0x9eddf188, mtpc_inputMessagesFilterUrl = 0x7ef0dd87, mtpc_inputMessagesFilterGif = 0xffc86587, mtpc_inputMessagesFilterVoice = 0x50f5c392, mtpc_inputMessagesFilterMusic = 0x3751b49e, mtpc_inputMessagesFilterChatPhotos = 0x3a20ecb8, mtpc_inputMessagesFilterPhoneCalls = 0x80c99768, mtpc_updateNewMessage = 0x1f2b0afd, mtpc_updateMessageID = 0x4e90bfd6, mtpc_updateDeleteMessages = 0xa20db0e5, mtpc_updateUserTyping = 0x5c486927, mtpc_updateChatUserTyping = 0x9a65ea1f, mtpc_updateChatParticipants = 0x7761198, mtpc_updateUserStatus = 0x1bfbd823, mtpc_updateUserName = 0xa7332b73, mtpc_updateUserPhoto = 0x95313b0c, mtpc_updateContactRegistered = 0x2575bbb9, mtpc_updateContactLink = 0x9d2e67c5, mtpc_updateNewEncryptedMessage = 0x12bcbd9a, mtpc_updateEncryptedChatTyping = 0x1710f156, mtpc_updateEncryption = 0xb4a2e88d, mtpc_updateEncryptedMessagesRead = 0x38fe25b7, mtpc_updateChatParticipantAdd = 0xea4b0e5c, mtpc_updateChatParticipantDelete = 0x6e5f8c22, mtpc_updateDcOptions = 0x8e5e9873, mtpc_updateUserBlocked = 0x80ece81a, mtpc_updateNotifySettings = 0xbec268ef, mtpc_updateServiceNotification = 0xebe46819, mtpc_updatePrivacy = 0xee3b272a, mtpc_updateUserPhone = 0x12b9417b, mtpc_updateReadHistoryInbox = 0x9961fd5c, mtpc_updateReadHistoryOutbox = 0x2f2f21bf, mtpc_updateWebPage = 0x7f891213, mtpc_updateReadMessagesContents = 0x68c13933, mtpc_updateChannelTooLong = 0xeb0467fb, mtpc_updateChannel = 0xb6d45656, mtpc_updateNewChannelMessage = 0x62ba04d9, mtpc_updateReadChannelInbox = 0x4214f37f, mtpc_updateDeleteChannelMessages = 0xc37521c9, mtpc_updateChannelMessageViews = 0x98a12b4b, mtpc_updateChatAdmins = 0x6e947941, mtpc_updateChatParticipantAdmin = 0xb6901959, mtpc_updateNewStickerSet = 0x688a30aa, mtpc_updateStickerSetsOrder = 0xbb2d201, mtpc_updateStickerSets = 0x43ae3dec, mtpc_updateSavedGifs = 0x9375341e, mtpc_updateBotInlineQuery = 0x54826690, mtpc_updateBotInlineSend = 0xe48f964, mtpc_updateEditChannelMessage = 0x1b3f4df7, mtpc_updateChannelPinnedMessage = 0x98592475, mtpc_updateBotCallbackQuery = 0xe73547e1, mtpc_updateEditMessage = 0xe40370a3, mtpc_updateInlineBotCallbackQuery = 0xf9d27a5a, mtpc_updateReadChannelOutbox = 0x25d6c9c7, mtpc_updateDraftMessage = 0xee2bb969, mtpc_updateReadFeaturedStickers = 0x571d2742, mtpc_updateRecentStickers = 0x9a422c20, mtpc_updateConfig = 0xa229dd06, mtpc_updatePtsChanged = 0x3354678f, mtpc_updateChannelWebPage = 0x40771900, mtpc_updatePhoneCall = 0xab0f6b1e, mtpc_updateDialogPinned = 0xd711a2cc, mtpc_updatePinnedDialogs = 0xd8caf68d, mtpc_updates_state = 0xa56c2a3e, mtpc_updates_differenceEmpty = 0x5d75a138, mtpc_updates_difference = 0xf49ca0, mtpc_updates_differenceSlice = 0xa8fb1981, mtpc_updates_differenceTooLong = 0x4afe8f6d, mtpc_updatesTooLong = 0xe317af7e, mtpc_updateShortMessage = 0x914fbf11, mtpc_updateShortChatMessage = 0x16812688, mtpc_updateShort = 0x78d4dec1, mtpc_updatesCombined = 0x725b04c3, mtpc_updates = 0x74ae4240, mtpc_updateShortSentMessage = 0x11f1331c, mtpc_photos_photos = 0x8dca6aa5, mtpc_photos_photosSlice = 0x15051f54, mtpc_photos_photo = 0x20212ca8, mtpc_upload_file = 0x96a18d5, mtpc_dcOption = 0x5d8c6cc, mtpc_config = 0x3af6fb5f, mtpc_nearestDc = 0x8e1a1775, mtpc_help_appUpdate = 0x8987f311, mtpc_help_noAppUpdate = 0xc45a6536, mtpc_help_inviteText = 0x18cb9f78, mtpc_encryptedChatEmpty = 0xab7ec0a0, mtpc_encryptedChatWaiting = 0x3bf703dc, mtpc_encryptedChatRequested = 0xc878527e, mtpc_encryptedChat = 0xfa56ce36, mtpc_encryptedChatDiscarded = 0x13d6dd27, mtpc_inputEncryptedChat = 0xf141b5e1, mtpc_encryptedFileEmpty = 0xc21f497e, mtpc_encryptedFile = 0x4a70994c, mtpc_inputEncryptedFileEmpty = 0x1837c364, mtpc_inputEncryptedFileUploaded = 0x64bd0306, mtpc_inputEncryptedFile = 0x5a17b5e5, mtpc_inputEncryptedFileBigUploaded = 0x2dc173c8, mtpc_encryptedMessage = 0xed18c118, mtpc_encryptedMessageService = 0x23734b06, mtpc_messages_dhConfigNotModified = 0xc0e24635, mtpc_messages_dhConfig = 0x2c221edd, mtpc_messages_sentEncryptedMessage = 0x560f8935, mtpc_messages_sentEncryptedFile = 0x9493ff32, mtpc_inputDocumentEmpty = 0x72f0eaae, mtpc_inputDocument = 0x18798952, mtpc_documentEmpty = 0x36f8c871, mtpc_document = 0x87232bc7, mtpc_help_support = 0x17c6b5f6, mtpc_notifyPeer = 0x9fd40bd8, mtpc_notifyUsers = 0xb4c83b4c, mtpc_notifyChats = 0xc007cec3, mtpc_notifyAll = 0x74d07c60, mtpc_sendMessageTypingAction = 0x16bf744e, mtpc_sendMessageCancelAction = 0xfd5ec8f5, mtpc_sendMessageRecordVideoAction = 0xa187d66f, mtpc_sendMessageUploadVideoAction = 0xe9763aec, mtpc_sendMessageRecordAudioAction = 0xd52f73f7, mtpc_sendMessageUploadAudioAction = 0xf351d7ab, mtpc_sendMessageUploadPhotoAction = 0xd1d34a26, mtpc_sendMessageUploadDocumentAction = 0xaa0cd9e4, mtpc_sendMessageGeoLocationAction = 0x176f8ba1, mtpc_sendMessageChooseContactAction = 0x628cbc6f, mtpc_sendMessageGamePlayAction = 0xdd6a8f48, mtpc_contacts_found = 0x1aa1f784, mtpc_inputPrivacyKeyStatusTimestamp = 0x4f96cb18, mtpc_inputPrivacyKeyChatInvite = 0xbdfb0426, mtpc_inputPrivacyKeyPhoneCall = 0xfabadc5f, mtpc_privacyKeyStatusTimestamp = 0xbc2eab30, mtpc_privacyKeyChatInvite = 0x500e6dfa, mtpc_privacyKeyPhoneCall = 0x3d662b7b, mtpc_inputPrivacyValueAllowContacts = 0xd09e07b, mtpc_inputPrivacyValueAllowAll = 0x184b35ce, mtpc_inputPrivacyValueAllowUsers = 0x131cc67f, mtpc_inputPrivacyValueDisallowContacts = 0xba52007, mtpc_inputPrivacyValueDisallowAll = 0xd66b66c9, mtpc_inputPrivacyValueDisallowUsers = 0x90110467, mtpc_privacyValueAllowContacts = 0xfffe1bac, mtpc_privacyValueAllowAll = 0x65427b82, mtpc_privacyValueAllowUsers = 0x4d5bbe0c, mtpc_privacyValueDisallowContacts = 0xf888fa1a, mtpc_privacyValueDisallowAll = 0x8b73e763, mtpc_privacyValueDisallowUsers = 0xc7f49b7, mtpc_account_privacyRules = 0x554abb6f, mtpc_accountDaysTTL = 0xb8d0afdf, mtpc_documentAttributeImageSize = 0x6c37c15c, mtpc_documentAttributeAnimated = 0x11b58939, mtpc_documentAttributeSticker = 0x6319d612, mtpc_documentAttributeVideo = 0x5910cccb, mtpc_documentAttributeAudio = 0x9852f9c6, mtpc_documentAttributeFilename = 0x15590068, mtpc_documentAttributeHasStickers = 0x9801d2f7, mtpc_messages_stickersNotModified = 0xf1749a22, mtpc_messages_stickers = 0x8a8ecd32, mtpc_stickerPack = 0x12b299d4, mtpc_messages_allStickersNotModified = 0xe86602c3, mtpc_messages_allStickers = 0xedfd405f, mtpc_disabledFeature = 0xae636f24, mtpc_messages_affectedMessages = 0x84d19185, mtpc_contactLinkUnknown = 0x5f4f9247, mtpc_contactLinkNone = 0xfeedd3ad, mtpc_contactLinkHasPhone = 0x268f3f59, mtpc_contactLinkContact = 0xd502c2d0, mtpc_webPageEmpty = 0xeb1477e8, mtpc_webPagePending = 0xc586da1c, mtpc_webPage = 0x5f07b4bc, mtpc_webPageNotModified = 0x85849473, mtpc_authorization = 0x7bf2e6f6, mtpc_account_authorizations = 0x1250abde, mtpc_account_noPassword = 0x96dabc18, mtpc_account_password = 0x7c18141c, mtpc_account_passwordSettings = 0xb7b72ab3, mtpc_account_passwordInputSettings = 0x86916deb, mtpc_auth_passwordRecovery = 0x137948a5, mtpc_receivedNotifyMessage = 0xa384b779, mtpc_chatInviteEmpty = 0x69df3769, mtpc_chatInviteExported = 0xfc2e05bc, mtpc_chatInviteAlready = 0x5a686d7c, mtpc_chatInvite = 0xdb74f558, mtpc_inputStickerSetEmpty = 0xffb62b95, mtpc_inputStickerSetID = 0x9de7a269, mtpc_inputStickerSetShortName = 0x861cc8a0, mtpc_stickerSet = 0xcd303b41, mtpc_messages_stickerSet = 0xb60a24a6, mtpc_botCommand = 0xc27ac8c7, mtpc_botInfo = 0x98e81d3a, mtpc_keyboardButton = 0xa2fa4880, mtpc_keyboardButtonUrl = 0x258aff05, mtpc_keyboardButtonCallback = 0x683a5e46, mtpc_keyboardButtonRequestPhone = 0xb16a6c29, mtpc_keyboardButtonRequestGeoLocation = 0xfc796b3f, mtpc_keyboardButtonSwitchInline = 0x568a748, mtpc_keyboardButtonGame = 0x50f41ccf, mtpc_keyboardButtonRow = 0x77608b83, mtpc_replyKeyboardHide = 0xa03e5b85, mtpc_replyKeyboardForceReply = 0xf4108aa0, mtpc_replyKeyboardMarkup = 0x3502758c, mtpc_replyInlineMarkup = 0x48a30254, mtpc_help_appChangelogEmpty = 0xaf7e0394, mtpc_help_appChangelog = 0x2a137e7c, mtpc_messageEntityUnknown = 0xbb92ba95, mtpc_messageEntityMention = 0xfa04579d, mtpc_messageEntityHashtag = 0x6f635b0d, mtpc_messageEntityBotCommand = 0x6cef8ac7, mtpc_messageEntityUrl = 0x6ed02538, mtpc_messageEntityEmail = 0x64e475c2, mtpc_messageEntityBold = 0xbd610bc9, mtpc_messageEntityItalic = 0x826f8b60, mtpc_messageEntityCode = 0x28a20571, mtpc_messageEntityPre = 0x73924be0, mtpc_messageEntityTextUrl = 0x76a6d327, mtpc_messageEntityMentionName = 0x352dca58, mtpc_inputMessageEntityMentionName = 0x208e68c9, mtpc_inputChannelEmpty = 0xee8c1e86, mtpc_inputChannel = 0xafeb712e, mtpc_contacts_resolvedPeer = 0x7f077ad9, mtpc_messageRange = 0xae30253, mtpc_updates_channelDifferenceEmpty = 0x3e11affb, mtpc_updates_channelDifferenceTooLong = 0x410dee07, mtpc_updates_channelDifference = 0x2064674e, mtpc_channelMessagesFilterEmpty = 0x94d42ee7, mtpc_channelMessagesFilter = 0xcd77d957, mtpc_channelParticipant = 0x15ebac1d, mtpc_channelParticipantSelf = 0xa3289a6d, mtpc_channelParticipantModerator = 0x91057fef, mtpc_channelParticipantEditor = 0x98192d61, mtpc_channelParticipantKicked = 0x8cc5e69a, mtpc_channelParticipantCreator = 0xe3e2e1f9, mtpc_channelParticipantsRecent = 0xde3f3c79, mtpc_channelParticipantsAdmins = 0xb4608969, mtpc_channelParticipantsKicked = 0x3c37bb7a, mtpc_channelParticipantsBots = 0xb0d1865b, mtpc_channelRoleEmpty = 0xb285a0c6, mtpc_channelRoleModerator = 0x9618d975, mtpc_channelRoleEditor = 0x820bfe8c, mtpc_channels_channelParticipants = 0xf56ee2a8, mtpc_channels_channelParticipant = 0xd0d9b163, mtpc_help_termsOfService = 0xf1ee3e90, mtpc_foundGif = 0x162ecc1f, mtpc_foundGifCached = 0x9c750409, mtpc_messages_foundGifs = 0x450a1c0a, mtpc_messages_savedGifsNotModified = 0xe8025ca2, mtpc_messages_savedGifs = 0x2e0709a5, mtpc_inputBotInlineMessageMediaAuto = 0x292fed13, mtpc_inputBotInlineMessageText = 0x3dcd7a87, mtpc_inputBotInlineMessageMediaGeo = 0xf4a59de1, mtpc_inputBotInlineMessageMediaVenue = 0xaaafadc8, mtpc_inputBotInlineMessageMediaContact = 0x2daf01a7, mtpc_inputBotInlineMessageGame = 0x4b425864, mtpc_inputBotInlineResult = 0x2cbbe15a, mtpc_inputBotInlineResultPhoto = 0xa8d864a7, mtpc_inputBotInlineResultDocument = 0xfff8fdc4, mtpc_inputBotInlineResultGame = 0x4fa417f2, mtpc_botInlineMessageMediaAuto = 0xa74b15b, mtpc_botInlineMessageText = 0x8c7f65e2, mtpc_botInlineMessageMediaGeo = 0x3a8fd8b8, mtpc_botInlineMessageMediaVenue = 0x4366232e, mtpc_botInlineMessageMediaContact = 0x35edb4d4, mtpc_botInlineResult = 0x9bebaeb9, mtpc_botInlineMediaResult = 0x17db940b, mtpc_messages_botResults = 0xccd3563d, mtpc_exportedMessageLink = 0x1f486803, mtpc_messageFwdHeader = 0xc786ddcb, mtpc_auth_codeTypeSms = 0x72a3158c, mtpc_auth_codeTypeCall = 0x741cd3e3, mtpc_auth_codeTypeFlashCall = 0x226ccefb, mtpc_auth_sentCodeTypeApp = 0x3dbb5986, mtpc_auth_sentCodeTypeSms = 0xc000bba2, mtpc_auth_sentCodeTypeCall = 0x5353e5a7, mtpc_auth_sentCodeTypeFlashCall = 0xab03c6d9, mtpc_messages_botCallbackAnswer = 0x36585ea4, mtpc_messages_messageEditData = 0x26b5dde6, mtpc_inputBotInlineMessageID = 0x890c3d89, mtpc_inlineBotSwitchPM = 0x3c20629f, mtpc_messages_peerDialogs = 0x3371c354, mtpc_topPeer = 0xedcdc05b, mtpc_topPeerCategoryBotsPM = 0xab661b5b, mtpc_topPeerCategoryBotsInline = 0x148677e2, mtpc_topPeerCategoryCorrespondents = 0x637b7ed, mtpc_topPeerCategoryGroups = 0xbd17a14a, mtpc_topPeerCategoryChannels = 0x161d9628, mtpc_topPeerCategoryPeers = 0xfb834291, mtpc_contacts_topPeersNotModified = 0xde266ef5, mtpc_contacts_topPeers = 0x70b772a8, mtpc_draftMessageEmpty = 0xba4baec5, mtpc_draftMessage = 0xfd8e711f, mtpc_messages_featuredStickersNotModified = 0x4ede3cf, mtpc_messages_featuredStickers = 0xf89d88e5, mtpc_messages_recentStickersNotModified = 0xb17f890, mtpc_messages_recentStickers = 0x5ce20970, mtpc_messages_archivedStickers = 0x4fcba9c8, mtpc_messages_stickerSetInstallResultSuccess = 0x38641628, mtpc_messages_stickerSetInstallResultArchive = 0x35e410a8, mtpc_stickerSetCovered = 0x6410a5d2, mtpc_stickerSetMultiCovered = 0x3407e51b, mtpc_maskCoords = 0xaed6dbb2, mtpc_inputStickeredMediaPhoto = 0x4a992157, mtpc_inputStickeredMediaDocument = 0x438865b, mtpc_game = 0xbdf9653b, mtpc_inputGameID = 0x32c3e77, mtpc_inputGameShortName = 0xc331e80a, mtpc_highScore = 0x58fffcd0, mtpc_messages_highScores = 0x9a3bfd99, mtpc_textEmpty = 0xdc3d824f, mtpc_textPlain = 0x744694e0, mtpc_textBold = 0x6724abc4, mtpc_textItalic = 0xd912a59c, mtpc_textUnderline = 0xc12622c4, mtpc_textStrike = 0x9bf8bb95, mtpc_textFixed = 0x6c3f19b9, mtpc_textUrl = 0x3c2884c1, mtpc_textEmail = 0xde5a0dd6, mtpc_textConcat = 0x7e6260d7, mtpc_pageBlockUnsupported = 0x13567e8a, mtpc_pageBlockTitle = 0x70abc3fd, mtpc_pageBlockSubtitle = 0x8ffa9a1f, mtpc_pageBlockAuthorDate = 0xbaafe5e0, mtpc_pageBlockHeader = 0xbfd064ec, mtpc_pageBlockSubheader = 0xf12bb6e1, mtpc_pageBlockParagraph = 0x467a0766, mtpc_pageBlockPreformatted = 0xc070d93e, mtpc_pageBlockFooter = 0x48870999, mtpc_pageBlockDivider = 0xdb20b188, mtpc_pageBlockAnchor = 0xce0d37b0, mtpc_pageBlockList = 0x3a58c7f4, mtpc_pageBlockBlockquote = 0x263d7c26, mtpc_pageBlockPullquote = 0x4f4456d3, mtpc_pageBlockPhoto = 0xe9c69982, mtpc_pageBlockVideo = 0xd9d71866, mtpc_pageBlockCover = 0x39f23300, mtpc_pageBlockEmbed = 0xcde200d1, mtpc_pageBlockEmbedPost = 0x292c7be9, mtpc_pageBlockCollage = 0x8b31c4f, mtpc_pageBlockSlideshow = 0x130c8963, mtpc_pagePart = 0x8dee6c44, mtpc_pageFull = 0xd7a19d69, mtpc_inputPhoneCall = 0x1e36fded, mtpc_phoneCallEmpty = 0x5366c915, mtpc_phoneCallWaiting = 0x1b8f4ad1, mtpc_phoneCallRequested = 0x6c448ae8, mtpc_phoneCall = 0xffe6ab67, mtpc_phoneCallDiscarded = 0x50ca4de1, mtpc_phoneConnection = 0x9d4c17c0, mtpc_phoneCallProtocol = 0xa2bb35cb, mtpc_phone_phoneCall = 0xec82e140, mtpc_phoneCallDiscardReasonMissed = 0x85e42301, mtpc_phoneCallDiscardReasonDisconnect = 0xe095c1a0, mtpc_phoneCallDiscardReasonHangup = 0x57adc690, mtpc_phoneCallDiscardReasonBusy = 0xfaf7e8c9, mtpc_invokeAfterMsg = 0xcb9f372d, mtpc_invokeAfterMsgs = 0x3dc4b4f0, mtpc_initConnection = 0x69796de9, mtpc_invokeWithLayer = 0xda9b0d0d, mtpc_invokeWithoutUpdates = 0xbf9459b7, mtpc_auth_checkPhone = 0x6fe51dfb, mtpc_auth_sendCode = 0x86aef0ec, mtpc_auth_signUp = 0x1b067634, mtpc_auth_signIn = 0xbcd51581, mtpc_auth_logOut = 0x5717da40, mtpc_auth_resetAuthorizations = 0x9fab0d1a, mtpc_auth_sendInvites = 0x771c1d97, mtpc_auth_exportAuthorization = 0xe5bfffcd, mtpc_auth_importAuthorization = 0xe3ef9613, mtpc_auth_bindTempAuthKey = 0xcdd42a05, mtpc_auth_importBotAuthorization = 0x67a3ff2c, mtpc_auth_checkPassword = 0xa63011e, mtpc_auth_requestPasswordRecovery = 0xd897bc66, mtpc_auth_recoverPassword = 0x4ea56e92, mtpc_auth_resendCode = 0x3ef1a9bf, mtpc_auth_cancelCode = 0x1f040578, mtpc_auth_dropTempAuthKeys = 0x8e48a188, mtpc_account_registerDevice = 0x637ea878, mtpc_account_unregisterDevice = 0x65c55b40, mtpc_account_updateNotifySettings = 0x84be5b93, mtpc_account_getNotifySettings = 0x12b3ad31, mtpc_account_resetNotifySettings = 0xdb7e1747, mtpc_account_updateProfile = 0x78515775, mtpc_account_updateStatus = 0x6628562c, mtpc_account_getWallPapers = 0xc04cfac2, mtpc_account_reportPeer = 0xae189d5f, mtpc_account_checkUsername = 0x2714d86c, mtpc_account_updateUsername = 0x3e0bdd7c, mtpc_account_getPrivacy = 0xdadbc950, mtpc_account_setPrivacy = 0xc9f81ce8, mtpc_account_deleteAccount = 0x418d4e0b, mtpc_account_getAccountTTL = 0x8fc711d, mtpc_account_setAccountTTL = 0x2442485e, mtpc_account_sendChangePhoneCode = 0x8e57deb, mtpc_account_changePhone = 0x70c32edb, mtpc_account_updateDeviceLocked = 0x38df3532, mtpc_account_getAuthorizations = 0xe320c158, mtpc_account_resetAuthorization = 0xdf77f3bc, mtpc_account_getPassword = 0x548a30f5, mtpc_account_getPasswordSettings = 0xbc8d11bb, mtpc_account_updatePasswordSettings = 0xfa7c4b86, mtpc_account_sendConfirmPhoneCode = 0x1516d7bd, mtpc_account_confirmPhone = 0x5f2178c3, mtpc_users_getUsers = 0xd91a548, mtpc_users_getFullUser = 0xca30a5b1, mtpc_contacts_getStatuses = 0xc4a353ee, mtpc_contacts_getContacts = 0x22c6aa08, mtpc_contacts_importContacts = 0xda30b32d, mtpc_contacts_deleteContact = 0x8e953744, mtpc_contacts_deleteContacts = 0x59ab389e, mtpc_contacts_block = 0x332b49fc, mtpc_contacts_unblock = 0xe54100bd, mtpc_contacts_getBlocked = 0xf57c350f, mtpc_contacts_exportCard = 0x84e53737, mtpc_contacts_importCard = 0x4fe196fe, mtpc_contacts_search = 0x11f812d8, mtpc_contacts_resolveUsername = 0xf93ccba3, mtpc_contacts_getTopPeers = 0xd4982db5, mtpc_contacts_resetTopPeerRating = 0x1ae373ac, mtpc_messages_getMessages = 0x4222fa74, mtpc_messages_getDialogs = 0x191ba9c5, mtpc_messages_getHistory = 0xafa92846, mtpc_messages_search = 0xd4569248, mtpc_messages_readHistory = 0xe306d3a, mtpc_messages_deleteHistory = 0x1c015b09, mtpc_messages_deleteMessages = 0xe58e95d2, mtpc_messages_receivedMessages = 0x5a954c0, mtpc_messages_setTyping = 0xa3825e50, mtpc_messages_sendMessage = 0xfa88427a, mtpc_messages_sendMedia = 0xc8f16791, mtpc_messages_forwardMessages = 0x708e0195, mtpc_messages_reportSpam = 0xcf1592db, mtpc_messages_hideReportSpam = 0xa8f1709b, mtpc_messages_getPeerSettings = 0x3672e09c, mtpc_messages_getChats = 0x3c6aa187, mtpc_messages_getFullChat = 0x3b831c66, mtpc_messages_editChatTitle = 0xdc452855, mtpc_messages_editChatPhoto = 0xca4c79d8, mtpc_messages_addChatUser = 0xf9a0aa09, mtpc_messages_deleteChatUser = 0xe0611f16, mtpc_messages_createChat = 0x9cb126e, mtpc_messages_forwardMessage = 0x33963bf9, mtpc_messages_getDhConfig = 0x26cf8950, mtpc_messages_requestEncryption = 0xf64daf43, mtpc_messages_acceptEncryption = 0x3dbc0415, mtpc_messages_discardEncryption = 0xedd923c5, mtpc_messages_setEncryptedTyping = 0x791451ed, mtpc_messages_readEncryptedHistory = 0x7f4b690a, mtpc_messages_sendEncrypted = 0xa9776773, mtpc_messages_sendEncryptedFile = 0x9a901b66, mtpc_messages_sendEncryptedService = 0x32d439a4, mtpc_messages_receivedQueue = 0x55a5bb66, mtpc_messages_reportEncryptedSpam = 0x4b0c8c0f, mtpc_messages_readMessageContents = 0x36a73f77, mtpc_messages_getAllStickers = 0x1c9618b1, mtpc_messages_getWebPagePreview = 0x25223e24, mtpc_messages_exportChatInvite = 0x7d885289, mtpc_messages_checkChatInvite = 0x3eadb1bb, mtpc_messages_importChatInvite = 0x6c50051c, mtpc_messages_getStickerSet = 0x2619a90e, mtpc_messages_installStickerSet = 0xc78fe460, mtpc_messages_uninstallStickerSet = 0xf96e55de, mtpc_messages_startBot = 0xe6df7378, mtpc_messages_getMessagesViews = 0xc4c8a55d, mtpc_messages_toggleChatAdmins = 0xec8bd9e1, mtpc_messages_editChatAdmin = 0xa9e69f2e, mtpc_messages_migrateChat = 0x15a3b8e3, mtpc_messages_searchGlobal = 0x9e3cacb0, mtpc_messages_reorderStickerSets = 0x78337739, mtpc_messages_getDocumentByHash = 0x338e2464, mtpc_messages_searchGifs = 0xbf9a776b, mtpc_messages_getSavedGifs = 0x83bf3d52, mtpc_messages_saveGif = 0x327a30cb, mtpc_messages_getInlineBotResults = 0x514e999d, mtpc_messages_setInlineBotResults = 0xeb5ea206, mtpc_messages_sendInlineBotResult = 0xb16e06fe, mtpc_messages_getMessageEditData = 0xfda68d36, mtpc_messages_editMessage = 0xce91e4ca, mtpc_messages_editInlineBotMessage = 0x130c2c85, mtpc_messages_getBotCallbackAnswer = 0x810a9fec, mtpc_messages_setBotCallbackAnswer = 0xd58f130a, mtpc_messages_getPeerDialogs = 0x2d9776b9, mtpc_messages_saveDraft = 0xbc39e14b, mtpc_messages_getAllDrafts = 0x6a3f8d65, mtpc_messages_getFeaturedStickers = 0x2dacca4f, mtpc_messages_readFeaturedStickers = 0x5b118126, mtpc_messages_getRecentStickers = 0x5ea192c9, mtpc_messages_saveRecentSticker = 0x392718f8, mtpc_messages_clearRecentStickers = 0x8999602d, mtpc_messages_getArchivedStickers = 0x57f17692, mtpc_messages_getMaskStickers = 0x65b8c79f, mtpc_messages_getAttachedStickers = 0xcc5b67cc, mtpc_messages_setGameScore = 0x8ef8ecc0, mtpc_messages_setInlineGameScore = 0x15ad9f64, mtpc_messages_getGameHighScores = 0xe822649d, mtpc_messages_getInlineGameHighScores = 0xf635e1b, mtpc_messages_getCommonChats = 0xd0a48c4, mtpc_messages_getAllChats = 0xeba80ff0, mtpc_messages_getWebPage = 0x32ca8f91, mtpc_messages_toggleDialogPin = 0x3289be6a, mtpc_messages_reorderPinnedDialogs = 0x959ff644, mtpc_messages_getPinnedDialogs = 0xe254d64e, mtpc_updates_getState = 0xedd4882a, mtpc_updates_getDifference = 0x25939651, mtpc_updates_getChannelDifference = 0x3173d78, mtpc_photos_updateProfilePhoto = 0xf0bb5152, mtpc_photos_uploadProfilePhoto = 0x4f32c098, mtpc_photos_deletePhotos = 0x87cf7f2f, mtpc_photos_getUserPhotos = 0x91cd32a8, mtpc_upload_saveFilePart = 0xb304a621, mtpc_upload_getFile = 0xe3a6cfb5, mtpc_upload_saveBigFilePart = 0xde7b673d, mtpc_help_getConfig = 0xc4f9186b, mtpc_help_getNearestDc = 0x1fb33026, mtpc_help_getAppUpdate = 0xae2de196, mtpc_help_saveAppLog = 0x6f02f748, mtpc_help_getInviteText = 0x4d392343, mtpc_help_getSupport = 0x9cdf08cd, mtpc_help_getAppChangelog = 0xb921197a, mtpc_help_getTermsOfService = 0x350170f3, mtpc_help_setBotUpdatesStatus = 0xec22cfcd, mtpc_channels_readHistory = 0xcc104937, mtpc_channels_deleteMessages = 0x84c1fd4e, mtpc_channels_deleteUserHistory = 0xd10dd71b, mtpc_channels_reportSpam = 0xfe087810, mtpc_channels_getMessages = 0x93d7b347, mtpc_channels_getParticipants = 0x24d98f92, mtpc_channels_getParticipant = 0x546dd7a6, mtpc_channels_getChannels = 0xa7f6bbb, mtpc_channels_getFullChannel = 0x8736a09, mtpc_channels_createChannel = 0xf4893d7f, mtpc_channels_editAbout = 0x13e27f1e, mtpc_channels_editAdmin = 0xeb7611d0, mtpc_channels_editTitle = 0x566decd0, mtpc_channels_editPhoto = 0xf12e57c9, mtpc_channels_checkUsername = 0x10e6bd2c, mtpc_channels_updateUsername = 0x3514b3de, mtpc_channels_joinChannel = 0x24b524c5, mtpc_channels_leaveChannel = 0xf836aa95, mtpc_channels_inviteToChannel = 0x199f3a6c, mtpc_channels_kickFromChannel = 0xa672de14, mtpc_channels_exportInvite = 0xc7560885, mtpc_channels_deleteChannel = 0xc0111fe3, mtpc_channels_toggleInvites = 0x49609307, mtpc_channels_exportMessageLink = 0xc846d22d, mtpc_channels_toggleSignatures = 0x1f69b606, mtpc_channels_updatePinnedMessage = 0xa72ded52, mtpc_channels_getAdminedPublicChannels = 0x8d8d82d7, mtpc_phone_requestCall = 0xa41aa5e4, mtpc_phone_acceptCall = 0x220f0b20, mtpc_phone_discardCall = 0x5dfbcddc, mtpc_phone_receivedCall = 0x17d54f61 }; // Type forward declarations class MTPresPQ; class MTPDresPQ; class MTPp_Q_inner_data; class MTPDp_q_inner_data; class MTPserver_DH_Params; class MTPDserver_DH_params_fail; class MTPDserver_DH_params_ok; class MTPserver_DH_inner_data; class MTPDserver_DH_inner_data; class MTPclient_DH_Inner_Data; class MTPDclient_DH_inner_data; class MTPset_client_DH_params_answer; class MTPDdh_gen_ok; class MTPDdh_gen_retry; class MTPDdh_gen_fail; class MTPdestroyAuthKeyRes; class MTPmsgsAck; class MTPDmsgs_ack; class MTPbadMsgNotification; class MTPDbad_msg_notification; class MTPDbad_server_salt; class MTPmsgsStateReq; class MTPDmsgs_state_req; class MTPmsgsStateInfo; class MTPDmsgs_state_info; class MTPmsgsAllInfo; class MTPDmsgs_all_info; class MTPmsgDetailedInfo; class MTPDmsg_detailed_info; class MTPDmsg_new_detailed_info; class MTPmsgResendReq; class MTPDmsg_resend_req; class MTPrpcError; class MTPDrpc_error; class MTPrpcDropAnswer; class MTPDrpc_answer_dropped; class MTPfutureSalt; class MTPDfuture_salt; class MTPfutureSalts; class MTPDfuture_salts; class MTPpong; class MTPDpong; class MTPdestroySessionRes; class MTPDdestroy_session_ok; class MTPDdestroy_session_none; class MTPnewSession; class MTPDnew_session_created; class MTPhttpWait; class MTPDhttp_wait; class MTPbool; class MTPtrue; class MTPerror; class MTPDerror; class MTPnull; class MTPinputPeer; class MTPDinputPeerChat; class MTPDinputPeerUser; class MTPDinputPeerChannel; class MTPinputUser; class MTPDinputUser; class MTPinputContact; class MTPDinputPhoneContact; class MTPinputFile; class MTPDinputFile; class MTPDinputFileBig; class MTPinputMedia; class MTPDinputMediaUploadedPhoto; class MTPDinputMediaPhoto; class MTPDinputMediaGeoPoint; class MTPDinputMediaContact; class MTPDinputMediaUploadedDocument; class MTPDinputMediaUploadedThumbDocument; class MTPDinputMediaDocument; class MTPDinputMediaVenue; class MTPDinputMediaGifExternal; class MTPDinputMediaPhotoExternal; class MTPDinputMediaDocumentExternal; class MTPDinputMediaGame; class MTPinputChatPhoto; class MTPDinputChatUploadedPhoto; class MTPDinputChatPhoto; class MTPinputGeoPoint; class MTPDinputGeoPoint; class MTPinputPhoto; class MTPDinputPhoto; class MTPinputFileLocation; class MTPDinputFileLocation; class MTPDinputEncryptedFileLocation; class MTPDinputDocumentFileLocation; class MTPinputAppEvent; class MTPDinputAppEvent; class MTPpeer; class MTPDpeerUser; class MTPDpeerChat; class MTPDpeerChannel; class MTPstorage_fileType; class MTPfileLocation; class MTPDfileLocationUnavailable; class MTPDfileLocation; class MTPuser; class MTPDuserEmpty; class MTPDuser; class MTPuserProfilePhoto; class MTPDuserProfilePhoto; class MTPuserStatus; class MTPDuserStatusOnline; class MTPDuserStatusOffline; class MTPchat; class MTPDchatEmpty; class MTPDchat; class MTPDchatForbidden; class MTPDchannel; class MTPDchannelForbidden; class MTPchatFull; class MTPDchatFull; class MTPDchannelFull; class MTPchatParticipant; class MTPDchatParticipant; class MTPDchatParticipantCreator; class MTPDchatParticipantAdmin; class MTPchatParticipants; class MTPDchatParticipantsForbidden; class MTPDchatParticipants; class MTPchatPhoto; class MTPDchatPhoto; class MTPmessage; class MTPDmessageEmpty; class MTPDmessage; class MTPDmessageService; class MTPmessageMedia; class MTPDmessageMediaPhoto; class MTPDmessageMediaGeo; class MTPDmessageMediaContact; class MTPDmessageMediaDocument; class MTPDmessageMediaWebPage; class MTPDmessageMediaVenue; class MTPDmessageMediaGame; class MTPmessageAction; class MTPDmessageActionChatCreate; class MTPDmessageActionChatEditTitle; class MTPDmessageActionChatEditPhoto; class MTPDmessageActionChatAddUser; class MTPDmessageActionChatDeleteUser; class MTPDmessageActionChatJoinedByLink; class MTPDmessageActionChannelCreate; class MTPDmessageActionChatMigrateTo; class MTPDmessageActionChannelMigrateFrom; class MTPDmessageActionGameScore; class MTPDmessageActionPhoneCall; class MTPdialog; class MTPDdialog; class MTPphoto; class MTPDphotoEmpty; class MTPDphoto; class MTPphotoSize; class MTPDphotoSizeEmpty; class MTPDphotoSize; class MTPDphotoCachedSize; class MTPgeoPoint; class MTPDgeoPoint; class MTPauth_checkedPhone; class MTPDauth_checkedPhone; class MTPauth_sentCode; class MTPDauth_sentCode; class MTPauth_authorization; class MTPDauth_authorization; class MTPauth_exportedAuthorization; class MTPDauth_exportedAuthorization; class MTPinputNotifyPeer; class MTPDinputNotifyPeer; class MTPinputPeerNotifyEvents; class MTPinputPeerNotifySettings; class MTPDinputPeerNotifySettings; class MTPpeerNotifyEvents; class MTPpeerNotifySettings; class MTPDpeerNotifySettings; class MTPpeerSettings; class MTPDpeerSettings; class MTPwallPaper; class MTPDwallPaper; class MTPDwallPaperSolid; class MTPreportReason; class MTPDinputReportReasonOther; class MTPuserFull; class MTPDuserFull; class MTPcontact; class MTPDcontact; class MTPimportedContact; class MTPDimportedContact; class MTPcontactBlocked; class MTPDcontactBlocked; class MTPcontactStatus; class MTPDcontactStatus; class MTPcontacts_link; class MTPDcontacts_link; class MTPcontacts_contacts; class MTPDcontacts_contacts; class MTPcontacts_importedContacts; class MTPDcontacts_importedContacts; class MTPcontacts_blocked; class MTPDcontacts_blocked; class MTPDcontacts_blockedSlice; class MTPmessages_dialogs; class MTPDmessages_dialogs; class MTPDmessages_dialogsSlice; class MTPmessages_messages; class MTPDmessages_messages; class MTPDmessages_messagesSlice; class MTPDmessages_channelMessages; class MTPmessages_chats; class MTPDmessages_chats; class MTPDmessages_chatsSlice; class MTPmessages_chatFull; class MTPDmessages_chatFull; class MTPmessages_affectedHistory; class MTPDmessages_affectedHistory; class MTPmessagesFilter; class MTPDinputMessagesFilterPhoneCalls; class MTPupdate; class MTPDupdateNewMessage; class MTPDupdateMessageID; class MTPDupdateDeleteMessages; class MTPDupdateUserTyping; class MTPDupdateChatUserTyping; class MTPDupdateChatParticipants; class MTPDupdateUserStatus; class MTPDupdateUserName; class MTPDupdateUserPhoto; class MTPDupdateContactRegistered; class MTPDupdateContactLink; class MTPDupdateNewEncryptedMessage; class MTPDupdateEncryptedChatTyping; class MTPDupdateEncryption; class MTPDupdateEncryptedMessagesRead; class MTPDupdateChatParticipantAdd; class MTPDupdateChatParticipantDelete; class MTPDupdateDcOptions; class MTPDupdateUserBlocked; class MTPDupdateNotifySettings; class MTPDupdateServiceNotification; class MTPDupdatePrivacy; class MTPDupdateUserPhone; class MTPDupdateReadHistoryInbox; class MTPDupdateReadHistoryOutbox; class MTPDupdateWebPage; class MTPDupdateReadMessagesContents; class MTPDupdateChannelTooLong; class MTPDupdateChannel; class MTPDupdateNewChannelMessage; class MTPDupdateReadChannelInbox; class MTPDupdateDeleteChannelMessages; class MTPDupdateChannelMessageViews; class MTPDupdateChatAdmins; class MTPDupdateChatParticipantAdmin; class MTPDupdateNewStickerSet; class MTPDupdateStickerSetsOrder; class MTPDupdateBotInlineQuery; class MTPDupdateBotInlineSend; class MTPDupdateEditChannelMessage; class MTPDupdateChannelPinnedMessage; class MTPDupdateBotCallbackQuery; class MTPDupdateEditMessage; class MTPDupdateInlineBotCallbackQuery; class MTPDupdateReadChannelOutbox; class MTPDupdateDraftMessage; class MTPDupdateChannelWebPage; class MTPDupdatePhoneCall; class MTPDupdateDialogPinned; class MTPDupdatePinnedDialogs; class MTPupdates_state; class MTPDupdates_state; class MTPupdates_difference; class MTPDupdates_differenceEmpty; class MTPDupdates_difference; class MTPDupdates_differenceSlice; class MTPDupdates_differenceTooLong; class MTPupdates; class MTPDupdateShortMessage; class MTPDupdateShortChatMessage; class MTPDupdateShort; class MTPDupdatesCombined; class MTPDupdates; class MTPDupdateShortSentMessage; class MTPphotos_photos; class MTPDphotos_photos; class MTPDphotos_photosSlice; class MTPphotos_photo; class MTPDphotos_photo; class MTPupload_file; class MTPDupload_file; class MTPdcOption; class MTPDdcOption; class MTPconfig; class MTPDconfig; class MTPnearestDc; class MTPDnearestDc; class MTPhelp_appUpdate; class MTPDhelp_appUpdate; class MTPhelp_inviteText; class MTPDhelp_inviteText; class MTPencryptedChat; class MTPDencryptedChatEmpty; class MTPDencryptedChatWaiting; class MTPDencryptedChatRequested; class MTPDencryptedChat; class MTPDencryptedChatDiscarded; class MTPinputEncryptedChat; class MTPDinputEncryptedChat; class MTPencryptedFile; class MTPDencryptedFile; class MTPinputEncryptedFile; class MTPDinputEncryptedFileUploaded; class MTPDinputEncryptedFile; class MTPDinputEncryptedFileBigUploaded; class MTPencryptedMessage; class MTPDencryptedMessage; class MTPDencryptedMessageService; class MTPmessages_dhConfig; class MTPDmessages_dhConfigNotModified; class MTPDmessages_dhConfig; class MTPmessages_sentEncryptedMessage; class MTPDmessages_sentEncryptedMessage; class MTPDmessages_sentEncryptedFile; class MTPinputDocument; class MTPDinputDocument; class MTPdocument; class MTPDdocumentEmpty; class MTPDdocument; class MTPhelp_support; class MTPDhelp_support; class MTPnotifyPeer; class MTPDnotifyPeer; class MTPsendMessageAction; class MTPDsendMessageUploadVideoAction; class MTPDsendMessageUploadAudioAction; class MTPDsendMessageUploadPhotoAction; class MTPDsendMessageUploadDocumentAction; class MTPcontacts_found; class MTPDcontacts_found; class MTPinputPrivacyKey; class MTPprivacyKey; class MTPinputPrivacyRule; class MTPDinputPrivacyValueAllowUsers; class MTPDinputPrivacyValueDisallowUsers; class MTPprivacyRule; class MTPDprivacyValueAllowUsers; class MTPDprivacyValueDisallowUsers; class MTPaccount_privacyRules; class MTPDaccount_privacyRules; class MTPaccountDaysTTL; class MTPDaccountDaysTTL; class MTPdocumentAttribute; class MTPDdocumentAttributeImageSize; class MTPDdocumentAttributeSticker; class MTPDdocumentAttributeVideo; class MTPDdocumentAttributeAudio; class MTPDdocumentAttributeFilename; class MTPmessages_stickers; class MTPDmessages_stickers; class MTPstickerPack; class MTPDstickerPack; class MTPmessages_allStickers; class MTPDmessages_allStickers; class MTPdisabledFeature; class MTPDdisabledFeature; class MTPmessages_affectedMessages; class MTPDmessages_affectedMessages; class MTPcontactLink; class MTPwebPage; class MTPDwebPageEmpty; class MTPDwebPagePending; class MTPDwebPage; class MTPauthorization; class MTPDauthorization; class MTPaccount_authorizations; class MTPDaccount_authorizations; class MTPaccount_password; class MTPDaccount_noPassword; class MTPDaccount_password; class MTPaccount_passwordSettings; class MTPDaccount_passwordSettings; class MTPaccount_passwordInputSettings; class MTPDaccount_passwordInputSettings; class MTPauth_passwordRecovery; class MTPDauth_passwordRecovery; class MTPreceivedNotifyMessage; class MTPDreceivedNotifyMessage; class MTPexportedChatInvite; class MTPDchatInviteExported; class MTPchatInvite; class MTPDchatInviteAlready; class MTPDchatInvite; class MTPinputStickerSet; class MTPDinputStickerSetID; class MTPDinputStickerSetShortName; class MTPstickerSet; class MTPDstickerSet; class MTPmessages_stickerSet; class MTPDmessages_stickerSet; class MTPbotCommand; class MTPDbotCommand; class MTPbotInfo; class MTPDbotInfo; class MTPkeyboardButton; class MTPDkeyboardButton; class MTPDkeyboardButtonUrl; class MTPDkeyboardButtonCallback; class MTPDkeyboardButtonRequestPhone; class MTPDkeyboardButtonRequestGeoLocation; class MTPDkeyboardButtonSwitchInline; class MTPDkeyboardButtonGame; class MTPkeyboardButtonRow; class MTPDkeyboardButtonRow; class MTPreplyMarkup; class MTPDreplyKeyboardHide; class MTPDreplyKeyboardForceReply; class MTPDreplyKeyboardMarkup; class MTPDreplyInlineMarkup; class MTPhelp_appChangelog; class MTPDhelp_appChangelog; class MTPmessageEntity; class MTPDmessageEntityUnknown; class MTPDmessageEntityMention; class MTPDmessageEntityHashtag; class MTPDmessageEntityBotCommand; class MTPDmessageEntityUrl; class MTPDmessageEntityEmail; class MTPDmessageEntityBold; class MTPDmessageEntityItalic; class MTPDmessageEntityCode; class MTPDmessageEntityPre; class MTPDmessageEntityTextUrl; class MTPDmessageEntityMentionName; class MTPDinputMessageEntityMentionName; class MTPinputChannel; class MTPDinputChannel; class MTPcontacts_resolvedPeer; class MTPDcontacts_resolvedPeer; class MTPmessageRange; class MTPDmessageRange; class MTPupdates_channelDifference; class MTPDupdates_channelDifferenceEmpty; class MTPDupdates_channelDifferenceTooLong; class MTPDupdates_channelDifference; class MTPchannelMessagesFilter; class MTPDchannelMessagesFilter; class MTPchannelParticipant; class MTPDchannelParticipant; class MTPDchannelParticipantSelf; class MTPDchannelParticipantModerator; class MTPDchannelParticipantEditor; class MTPDchannelParticipantKicked; class MTPDchannelParticipantCreator; class MTPchannelParticipantsFilter; class MTPchannelParticipantRole; class MTPchannels_channelParticipants; class MTPDchannels_channelParticipants; class MTPchannels_channelParticipant; class MTPDchannels_channelParticipant; class MTPhelp_termsOfService; class MTPDhelp_termsOfService; class MTPfoundGif; class MTPDfoundGif; class MTPDfoundGifCached; class MTPmessages_foundGifs; class MTPDmessages_foundGifs; class MTPmessages_savedGifs; class MTPDmessages_savedGifs; class MTPinputBotInlineMessage; class MTPDinputBotInlineMessageMediaAuto; class MTPDinputBotInlineMessageText; class MTPDinputBotInlineMessageMediaGeo; class MTPDinputBotInlineMessageMediaVenue; class MTPDinputBotInlineMessageMediaContact; class MTPDinputBotInlineMessageGame; class MTPinputBotInlineResult; class MTPDinputBotInlineResult; class MTPDinputBotInlineResultPhoto; class MTPDinputBotInlineResultDocument; class MTPDinputBotInlineResultGame; class MTPbotInlineMessage; class MTPDbotInlineMessageMediaAuto; class MTPDbotInlineMessageText; class MTPDbotInlineMessageMediaGeo; class MTPDbotInlineMessageMediaVenue; class MTPDbotInlineMessageMediaContact; class MTPbotInlineResult; class MTPDbotInlineResult; class MTPDbotInlineMediaResult; class MTPmessages_botResults; class MTPDmessages_botResults; class MTPexportedMessageLink; class MTPDexportedMessageLink; class MTPmessageFwdHeader; class MTPDmessageFwdHeader; class MTPauth_codeType; class MTPauth_sentCodeType; class MTPDauth_sentCodeTypeApp; class MTPDauth_sentCodeTypeSms; class MTPDauth_sentCodeTypeCall; class MTPDauth_sentCodeTypeFlashCall; class MTPmessages_botCallbackAnswer; class MTPDmessages_botCallbackAnswer; class MTPmessages_messageEditData; class MTPDmessages_messageEditData; class MTPinputBotInlineMessageID; class MTPDinputBotInlineMessageID; class MTPinlineBotSwitchPM; class MTPDinlineBotSwitchPM; class MTPmessages_peerDialogs; class MTPDmessages_peerDialogs; class MTPtopPeer; class MTPDtopPeer; class MTPtopPeerCategory; class MTPtopPeerCategoryPeers; class MTPDtopPeerCategoryPeers; class MTPcontacts_topPeers; class MTPDcontacts_topPeers; class MTPdraftMessage; class MTPDdraftMessage; class MTPmessages_featuredStickers; class MTPDmessages_featuredStickers; class MTPmessages_recentStickers; class MTPDmessages_recentStickers; class MTPmessages_archivedStickers; class MTPDmessages_archivedStickers; class MTPmessages_stickerSetInstallResult; class MTPDmessages_stickerSetInstallResultArchive; class MTPstickerSetCovered; class MTPDstickerSetCovered; class MTPDstickerSetMultiCovered; class MTPmaskCoords; class MTPDmaskCoords; class MTPinputStickeredMedia; class MTPDinputStickeredMediaPhoto; class MTPDinputStickeredMediaDocument; class MTPgame; class MTPDgame; class MTPinputGame; class MTPDinputGameID; class MTPDinputGameShortName; class MTPhighScore; class MTPDhighScore; class MTPmessages_highScores; class MTPDmessages_highScores; class MTPrichText; class MTPDtextPlain; class MTPDtextBold; class MTPDtextItalic; class MTPDtextUnderline; class MTPDtextStrike; class MTPDtextFixed; class MTPDtextUrl; class MTPDtextEmail; class MTPDtextConcat; class MTPpageBlock; class MTPDpageBlockTitle; class MTPDpageBlockSubtitle; class MTPDpageBlockAuthorDate; class MTPDpageBlockHeader; class MTPDpageBlockSubheader; class MTPDpageBlockParagraph; class MTPDpageBlockPreformatted; class MTPDpageBlockFooter; class MTPDpageBlockAnchor; class MTPDpageBlockList; class MTPDpageBlockBlockquote; class MTPDpageBlockPullquote; class MTPDpageBlockPhoto; class MTPDpageBlockVideo; class MTPDpageBlockCover; class MTPDpageBlockEmbed; class MTPDpageBlockEmbedPost; class MTPDpageBlockCollage; class MTPDpageBlockSlideshow; class MTPpage; class MTPDpagePart; class MTPDpageFull; class MTPinputPhoneCall; class MTPDinputPhoneCall; class MTPphoneCall; class MTPDphoneCallEmpty; class MTPDphoneCallWaiting; class MTPDphoneCallRequested; class MTPDphoneCall; class MTPDphoneCallDiscarded; class MTPphoneConnection; class MTPDphoneConnection; class MTPphoneCallProtocol; class MTPDphoneCallProtocol; class MTPphone_phoneCall; class MTPDphone_phoneCall; class MTPphoneCallDiscardReason; // Boxed types definitions typedef MTPBoxed MTPResPQ; typedef MTPBoxed MTPP_Q_inner_data; typedef MTPBoxed MTPServer_DH_Params; typedef MTPBoxed MTPServer_DH_inner_data; typedef MTPBoxed MTPClient_DH_Inner_Data; typedef MTPBoxed MTPSet_client_DH_params_answer; typedef MTPBoxed MTPDestroyAuthKeyRes; typedef MTPBoxed MTPMsgsAck; typedef MTPBoxed MTPBadMsgNotification; typedef MTPBoxed MTPMsgsStateReq; typedef MTPBoxed MTPMsgsStateInfo; typedef MTPBoxed MTPMsgsAllInfo; typedef MTPBoxed MTPMsgDetailedInfo; typedef MTPBoxed MTPMsgResendReq; typedef MTPBoxed MTPRpcError; typedef MTPBoxed MTPRpcDropAnswer; typedef MTPBoxed MTPFutureSalt; typedef MTPBoxed MTPFutureSalts; typedef MTPBoxed MTPPong; typedef MTPBoxed MTPDestroySessionRes; typedef MTPBoxed MTPNewSession; typedef MTPBoxed MTPHttpWait; typedef MTPBoxed MTPBool; typedef MTPBoxed MTPTrue; typedef MTPBoxed MTPError; typedef MTPBoxed MTPNull; typedef MTPBoxed MTPInputPeer; typedef MTPBoxed MTPInputUser; typedef MTPBoxed MTPInputContact; typedef MTPBoxed MTPInputFile; typedef MTPBoxed MTPInputMedia; typedef MTPBoxed MTPInputChatPhoto; typedef MTPBoxed MTPInputGeoPoint; typedef MTPBoxed MTPInputPhoto; typedef MTPBoxed MTPInputFileLocation; typedef MTPBoxed MTPInputAppEvent; typedef MTPBoxed MTPPeer; typedef MTPBoxed MTPstorage_FileType; typedef MTPBoxed MTPFileLocation; typedef MTPBoxed MTPUser; typedef MTPBoxed MTPUserProfilePhoto; typedef MTPBoxed MTPUserStatus; typedef MTPBoxed MTPChat; typedef MTPBoxed MTPChatFull; typedef MTPBoxed MTPChatParticipant; typedef MTPBoxed MTPChatParticipants; typedef MTPBoxed MTPChatPhoto; typedef MTPBoxed MTPMessage; typedef MTPBoxed MTPMessageMedia; typedef MTPBoxed MTPMessageAction; typedef MTPBoxed MTPDialog; typedef MTPBoxed MTPPhoto; typedef MTPBoxed MTPPhotoSize; typedef MTPBoxed MTPGeoPoint; typedef MTPBoxed MTPauth_CheckedPhone; typedef MTPBoxed MTPauth_SentCode; typedef MTPBoxed MTPauth_Authorization; typedef MTPBoxed MTPauth_ExportedAuthorization; typedef MTPBoxed MTPInputNotifyPeer; typedef MTPBoxed MTPInputPeerNotifyEvents; typedef MTPBoxed MTPInputPeerNotifySettings; typedef MTPBoxed MTPPeerNotifyEvents; typedef MTPBoxed MTPPeerNotifySettings; typedef MTPBoxed MTPPeerSettings; typedef MTPBoxed MTPWallPaper; typedef MTPBoxed MTPReportReason; typedef MTPBoxed MTPUserFull; typedef MTPBoxed MTPContact; typedef MTPBoxed MTPImportedContact; typedef MTPBoxed MTPContactBlocked; typedef MTPBoxed MTPContactStatus; typedef MTPBoxed MTPcontacts_Link; typedef MTPBoxed MTPcontacts_Contacts; typedef MTPBoxed MTPcontacts_ImportedContacts; typedef MTPBoxed MTPcontacts_Blocked; typedef MTPBoxed MTPmessages_Dialogs; typedef MTPBoxed MTPmessages_Messages; typedef MTPBoxed MTPmessages_Chats; typedef MTPBoxed MTPmessages_ChatFull; typedef MTPBoxed MTPmessages_AffectedHistory; typedef MTPBoxed MTPMessagesFilter; typedef MTPBoxed MTPUpdate; typedef MTPBoxed MTPupdates_State; typedef MTPBoxed MTPupdates_Difference; typedef MTPBoxed MTPUpdates; typedef MTPBoxed MTPphotos_Photos; typedef MTPBoxed MTPphotos_Photo; typedef MTPBoxed MTPupload_File; typedef MTPBoxed MTPDcOption; typedef MTPBoxed MTPConfig; typedef MTPBoxed MTPNearestDc; typedef MTPBoxed MTPhelp_AppUpdate; typedef MTPBoxed MTPhelp_InviteText; typedef MTPBoxed MTPEncryptedChat; typedef MTPBoxed MTPInputEncryptedChat; typedef MTPBoxed MTPEncryptedFile; typedef MTPBoxed MTPInputEncryptedFile; typedef MTPBoxed MTPEncryptedMessage; typedef MTPBoxed MTPmessages_DhConfig; typedef MTPBoxed MTPmessages_SentEncryptedMessage; typedef MTPBoxed MTPInputDocument; typedef MTPBoxed MTPDocument; typedef MTPBoxed MTPhelp_Support; typedef MTPBoxed MTPNotifyPeer; typedef MTPBoxed MTPSendMessageAction; typedef MTPBoxed MTPcontacts_Found; typedef MTPBoxed MTPInputPrivacyKey; typedef MTPBoxed MTPPrivacyKey; typedef MTPBoxed MTPInputPrivacyRule; typedef MTPBoxed MTPPrivacyRule; typedef MTPBoxed MTPaccount_PrivacyRules; typedef MTPBoxed MTPAccountDaysTTL; typedef MTPBoxed MTPDocumentAttribute; typedef MTPBoxed MTPmessages_Stickers; typedef MTPBoxed MTPStickerPack; typedef MTPBoxed MTPmessages_AllStickers; typedef MTPBoxed MTPDisabledFeature; typedef MTPBoxed MTPmessages_AffectedMessages; typedef MTPBoxed MTPContactLink; typedef MTPBoxed MTPWebPage; typedef MTPBoxed MTPAuthorization; typedef MTPBoxed MTPaccount_Authorizations; typedef MTPBoxed MTPaccount_Password; typedef MTPBoxed MTPaccount_PasswordSettings; typedef MTPBoxed MTPaccount_PasswordInputSettings; typedef MTPBoxed MTPauth_PasswordRecovery; typedef MTPBoxed MTPReceivedNotifyMessage; typedef MTPBoxed MTPExportedChatInvite; typedef MTPBoxed MTPChatInvite; typedef MTPBoxed MTPInputStickerSet; typedef MTPBoxed MTPStickerSet; typedef MTPBoxed MTPmessages_StickerSet; typedef MTPBoxed MTPBotCommand; typedef MTPBoxed MTPBotInfo; typedef MTPBoxed MTPKeyboardButton; typedef MTPBoxed MTPKeyboardButtonRow; typedef MTPBoxed MTPReplyMarkup; typedef MTPBoxed MTPhelp_AppChangelog; typedef MTPBoxed MTPMessageEntity; typedef MTPBoxed MTPInputChannel; typedef MTPBoxed MTPcontacts_ResolvedPeer; typedef MTPBoxed MTPMessageRange; typedef MTPBoxed MTPupdates_ChannelDifference; typedef MTPBoxed MTPChannelMessagesFilter; typedef MTPBoxed MTPChannelParticipant; typedef MTPBoxed MTPChannelParticipantsFilter; typedef MTPBoxed MTPChannelParticipantRole; typedef MTPBoxed MTPchannels_ChannelParticipants; typedef MTPBoxed MTPchannels_ChannelParticipant; typedef MTPBoxed MTPhelp_TermsOfService; typedef MTPBoxed MTPFoundGif; typedef MTPBoxed MTPmessages_FoundGifs; typedef MTPBoxed MTPmessages_SavedGifs; typedef MTPBoxed MTPInputBotInlineMessage; typedef MTPBoxed MTPInputBotInlineResult; typedef MTPBoxed MTPBotInlineMessage; typedef MTPBoxed MTPBotInlineResult; typedef MTPBoxed MTPmessages_BotResults; typedef MTPBoxed MTPExportedMessageLink; typedef MTPBoxed MTPMessageFwdHeader; typedef MTPBoxed MTPauth_CodeType; typedef MTPBoxed MTPauth_SentCodeType; typedef MTPBoxed MTPmessages_BotCallbackAnswer; typedef MTPBoxed MTPmessages_MessageEditData; typedef MTPBoxed MTPInputBotInlineMessageID; typedef MTPBoxed MTPInlineBotSwitchPM; typedef MTPBoxed MTPmessages_PeerDialogs; typedef MTPBoxed MTPTopPeer; typedef MTPBoxed MTPTopPeerCategory; typedef MTPBoxed MTPTopPeerCategoryPeers; typedef MTPBoxed MTPcontacts_TopPeers; typedef MTPBoxed MTPDraftMessage; typedef MTPBoxed MTPmessages_FeaturedStickers; typedef MTPBoxed MTPmessages_RecentStickers; typedef MTPBoxed MTPmessages_ArchivedStickers; typedef MTPBoxed MTPmessages_StickerSetInstallResult; typedef MTPBoxed MTPStickerSetCovered; typedef MTPBoxed MTPMaskCoords; typedef MTPBoxed MTPInputStickeredMedia; typedef MTPBoxed MTPGame; typedef MTPBoxed MTPInputGame; typedef MTPBoxed MTPHighScore; typedef MTPBoxed MTPmessages_HighScores; typedef MTPBoxed MTPRichText; typedef MTPBoxed MTPPageBlock; typedef MTPBoxed MTPPage; typedef MTPBoxed MTPInputPhoneCall; typedef MTPBoxed MTPPhoneCall; typedef MTPBoxed MTPPhoneConnection; typedef MTPBoxed MTPPhoneCallProtocol; typedef MTPBoxed MTPphone_PhoneCall; typedef MTPBoxed MTPPhoneCallDiscardReason; // Type classes definitions class MTPresPQ : private MTP::internal::TypeDataOwner { public: MTPresPQ(); const MTPDresPQ &c_resPQ() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_resPQ); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPresPQ(const MTPDresPQ *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPResPQ; class MTPp_Q_inner_data : private MTP::internal::TypeDataOwner { public: MTPp_Q_inner_data(); const MTPDp_q_inner_data &c_p_q_inner_data() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_p_q_inner_data); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPp_Q_inner_data(const MTPDp_q_inner_data *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPP_Q_inner_data; class MTPserver_DH_Params : private MTP::internal::TypeDataOwner { public: MTPserver_DH_Params() { } const MTPDserver_DH_params_fail &c_server_DH_params_fail() const; const MTPDserver_DH_params_ok &c_server_DH_params_ok() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPserver_DH_Params(mtpTypeId type); explicit MTPserver_DH_Params(const MTPDserver_DH_params_fail *data); explicit MTPserver_DH_Params(const MTPDserver_DH_params_ok *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPServer_DH_Params; class MTPserver_DH_inner_data : private MTP::internal::TypeDataOwner { public: MTPserver_DH_inner_data(); const MTPDserver_DH_inner_data &c_server_DH_inner_data() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_server_DH_inner_data); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPserver_DH_inner_data(const MTPDserver_DH_inner_data *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPServer_DH_inner_data; class MTPclient_DH_Inner_Data : private MTP::internal::TypeDataOwner { public: MTPclient_DH_Inner_Data(); const MTPDclient_DH_inner_data &c_client_DH_inner_data() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_client_DH_inner_data); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPclient_DH_Inner_Data(const MTPDclient_DH_inner_data *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPClient_DH_Inner_Data; class MTPset_client_DH_params_answer : private MTP::internal::TypeDataOwner { public: MTPset_client_DH_params_answer() { } const MTPDdh_gen_ok &c_dh_gen_ok() const; const MTPDdh_gen_retry &c_dh_gen_retry() const; const MTPDdh_gen_fail &c_dh_gen_fail() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPset_client_DH_params_answer(mtpTypeId type); explicit MTPset_client_DH_params_answer(const MTPDdh_gen_ok *data); explicit MTPset_client_DH_params_answer(const MTPDdh_gen_retry *data); explicit MTPset_client_DH_params_answer(const MTPDdh_gen_fail *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPSet_client_DH_params_answer; class MTPdestroyAuthKeyRes { public: MTPdestroyAuthKeyRes() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdestroyAuthKeyRes(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPDestroyAuthKeyRes; class MTPmsgsAck : private MTP::internal::TypeDataOwner { public: MTPmsgsAck(); const MTPDmsgs_ack &c_msgs_ack() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_ack); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmsgsAck(const MTPDmsgs_ack *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsAck; class MTPbadMsgNotification : private MTP::internal::TypeDataOwner { public: MTPbadMsgNotification() { } const MTPDbad_msg_notification &c_bad_msg_notification() const; const MTPDbad_server_salt &c_bad_server_salt() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPbadMsgNotification(mtpTypeId type); explicit MTPbadMsgNotification(const MTPDbad_msg_notification *data); explicit MTPbadMsgNotification(const MTPDbad_server_salt *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPBadMsgNotification; class MTPmsgsStateReq : private MTP::internal::TypeDataOwner { public: MTPmsgsStateReq(); const MTPDmsgs_state_req &c_msgs_state_req() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_state_req); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmsgsStateReq(const MTPDmsgs_state_req *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsStateReq; class MTPmsgsStateInfo : private MTP::internal::TypeDataOwner { public: MTPmsgsStateInfo(); const MTPDmsgs_state_info &c_msgs_state_info() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_state_info); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmsgsStateInfo(const MTPDmsgs_state_info *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsStateInfo; class MTPmsgsAllInfo : private MTP::internal::TypeDataOwner { public: MTPmsgsAllInfo(); const MTPDmsgs_all_info &c_msgs_all_info() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_all_info); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmsgsAllInfo(const MTPDmsgs_all_info *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsAllInfo; class MTPmsgDetailedInfo : private MTP::internal::TypeDataOwner { public: MTPmsgDetailedInfo() { } const MTPDmsg_detailed_info &c_msg_detailed_info() const; const MTPDmsg_new_detailed_info &c_msg_new_detailed_info() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmsgDetailedInfo(mtpTypeId type); explicit MTPmsgDetailedInfo(const MTPDmsg_detailed_info *data); explicit MTPmsgDetailedInfo(const MTPDmsg_new_detailed_info *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPMsgDetailedInfo; class MTPmsgResendReq : private MTP::internal::TypeDataOwner { public: MTPmsgResendReq(); const MTPDmsg_resend_req &c_msg_resend_req() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msg_resend_req); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmsgResendReq(const MTPDmsg_resend_req *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgResendReq; class MTPrpcError : private MTP::internal::TypeDataOwner { public: MTPrpcError(); const MTPDrpc_error &c_rpc_error() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_rpc_error); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPrpcError(const MTPDrpc_error *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPRpcError; class MTPrpcDropAnswer : private MTP::internal::TypeDataOwner { public: MTPrpcDropAnswer() { } const MTPDrpc_answer_dropped &c_rpc_answer_dropped() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPrpcDropAnswer(mtpTypeId type); explicit MTPrpcDropAnswer(const MTPDrpc_answer_dropped *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPRpcDropAnswer; class MTPfutureSalt : private MTP::internal::TypeDataOwner { public: MTPfutureSalt(); const MTPDfuture_salt &c_future_salt() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_future_salt); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPfutureSalt(const MTPDfuture_salt *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPFutureSalt; class MTPfutureSalts : private MTP::internal::TypeDataOwner { public: MTPfutureSalts(); const MTPDfuture_salts &c_future_salts() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_future_salts); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPfutureSalts(const MTPDfuture_salts *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPFutureSalts; class MTPpong : private MTP::internal::TypeDataOwner { public: MTPpong(); const MTPDpong &c_pong() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_pong); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpong(const MTPDpong *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPPong; class MTPdestroySessionRes : private MTP::internal::TypeDataOwner { public: MTPdestroySessionRes() { } const MTPDdestroy_session_ok &c_destroy_session_ok() const; const MTPDdestroy_session_none &c_destroy_session_none() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdestroySessionRes(mtpTypeId type); explicit MTPdestroySessionRes(const MTPDdestroy_session_ok *data); explicit MTPdestroySessionRes(const MTPDdestroy_session_none *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPDestroySessionRes; class MTPnewSession : private MTP::internal::TypeDataOwner { public: MTPnewSession(); const MTPDnew_session_created &c_new_session_created() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_new_session_created); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPnewSession(const MTPDnew_session_created *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPNewSession; class MTPhttpWait : private MTP::internal::TypeDataOwner { public: MTPhttpWait(); const MTPDhttp_wait &c_http_wait() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_http_wait); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhttpWait(const MTPDhttp_wait *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPHttpWait; class MTPbool { public: MTPbool() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPbool(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPBool; class MTPtrue { public: MTPtrue() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_true); void write(mtpBuffer &to) const; typedef void ResponseType; private: friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPTrue; class MTPerror : private MTP::internal::TypeDataOwner { public: MTPerror(); const MTPDerror &c_error() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_error); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPerror(const MTPDerror *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPError; class MTPnull { public: MTPnull() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_null); void write(mtpBuffer &to) const; typedef void ResponseType; private: friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPNull; class MTPinputPeer : private MTP::internal::TypeDataOwner { public: MTPinputPeer() { } const MTPDinputPeerChat &c_inputPeerChat() const; const MTPDinputPeerUser &c_inputPeerUser() const; const MTPDinputPeerChannel &c_inputPeerChannel() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPeer(mtpTypeId type); explicit MTPinputPeer(const MTPDinputPeerChat *data); explicit MTPinputPeer(const MTPDinputPeerUser *data); explicit MTPinputPeer(const MTPDinputPeerChannel *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputPeer; class MTPinputUser : private MTP::internal::TypeDataOwner { public: MTPinputUser() { } const MTPDinputUser &c_inputUser() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputUser(mtpTypeId type); explicit MTPinputUser(const MTPDinputUser *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputUser; class MTPinputContact : private MTP::internal::TypeDataOwner { public: MTPinputContact(); const MTPDinputPhoneContact &c_inputPhoneContact() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPhoneContact); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputContact(const MTPDinputPhoneContact *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputContact; class MTPinputFile : private MTP::internal::TypeDataOwner { public: MTPinputFile() { } const MTPDinputFile &c_inputFile() const; const MTPDinputFileBig &c_inputFileBig() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputFile(mtpTypeId type); explicit MTPinputFile(const MTPDinputFile *data); explicit MTPinputFile(const MTPDinputFileBig *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputFile; class MTPinputMedia : private MTP::internal::TypeDataOwner { public: MTPinputMedia() { } const MTPDinputMediaUploadedPhoto &c_inputMediaUploadedPhoto() const; const MTPDinputMediaPhoto &c_inputMediaPhoto() const; const MTPDinputMediaGeoPoint &c_inputMediaGeoPoint() const; const MTPDinputMediaContact &c_inputMediaContact() const; const MTPDinputMediaUploadedDocument &c_inputMediaUploadedDocument() const; const MTPDinputMediaUploadedThumbDocument &c_inputMediaUploadedThumbDocument() const; const MTPDinputMediaDocument &c_inputMediaDocument() const; const MTPDinputMediaVenue &c_inputMediaVenue() const; const MTPDinputMediaGifExternal &c_inputMediaGifExternal() const; const MTPDinputMediaPhotoExternal &c_inputMediaPhotoExternal() const; const MTPDinputMediaDocumentExternal &c_inputMediaDocumentExternal() const; const MTPDinputMediaGame &c_inputMediaGame() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputMedia(mtpTypeId type); explicit MTPinputMedia(const MTPDinputMediaUploadedPhoto *data); explicit MTPinputMedia(const MTPDinputMediaPhoto *data); explicit MTPinputMedia(const MTPDinputMediaGeoPoint *data); explicit MTPinputMedia(const MTPDinputMediaContact *data); explicit MTPinputMedia(const MTPDinputMediaUploadedDocument *data); explicit MTPinputMedia(const MTPDinputMediaUploadedThumbDocument *data); explicit MTPinputMedia(const MTPDinputMediaDocument *data); explicit MTPinputMedia(const MTPDinputMediaVenue *data); explicit MTPinputMedia(const MTPDinputMediaGifExternal *data); explicit MTPinputMedia(const MTPDinputMediaPhotoExternal *data); explicit MTPinputMedia(const MTPDinputMediaDocumentExternal *data); explicit MTPinputMedia(const MTPDinputMediaGame *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputMedia; class MTPinputChatPhoto : private MTP::internal::TypeDataOwner { public: MTPinputChatPhoto() { } const MTPDinputChatUploadedPhoto &c_inputChatUploadedPhoto() const; const MTPDinputChatPhoto &c_inputChatPhoto() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputChatPhoto(mtpTypeId type); explicit MTPinputChatPhoto(const MTPDinputChatUploadedPhoto *data); explicit MTPinputChatPhoto(const MTPDinputChatPhoto *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputChatPhoto; class MTPinputGeoPoint : private MTP::internal::TypeDataOwner { public: MTPinputGeoPoint() { } const MTPDinputGeoPoint &c_inputGeoPoint() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputGeoPoint(mtpTypeId type); explicit MTPinputGeoPoint(const MTPDinputGeoPoint *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputGeoPoint; class MTPinputPhoto : private MTP::internal::TypeDataOwner { public: MTPinputPhoto() { } const MTPDinputPhoto &c_inputPhoto() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPhoto(mtpTypeId type); explicit MTPinputPhoto(const MTPDinputPhoto *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputPhoto; class MTPinputFileLocation : private MTP::internal::TypeDataOwner { public: MTPinputFileLocation() { } const MTPDinputFileLocation &c_inputFileLocation() const; const MTPDinputEncryptedFileLocation &c_inputEncryptedFileLocation() const; const MTPDinputDocumentFileLocation &c_inputDocumentFileLocation() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputFileLocation(mtpTypeId type); explicit MTPinputFileLocation(const MTPDinputFileLocation *data); explicit MTPinputFileLocation(const MTPDinputEncryptedFileLocation *data); explicit MTPinputFileLocation(const MTPDinputDocumentFileLocation *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputFileLocation; class MTPinputAppEvent : private MTP::internal::TypeDataOwner { public: MTPinputAppEvent(); const MTPDinputAppEvent &c_inputAppEvent() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputAppEvent); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputAppEvent(const MTPDinputAppEvent *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputAppEvent; class MTPpeer : private MTP::internal::TypeDataOwner { public: MTPpeer() { } const MTPDpeerUser &c_peerUser() const; const MTPDpeerChat &c_peerChat() const; const MTPDpeerChannel &c_peerChannel() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpeer(mtpTypeId type); explicit MTPpeer(const MTPDpeerUser *data); explicit MTPpeer(const MTPDpeerChat *data); explicit MTPpeer(const MTPDpeerChannel *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPeer; class MTPstorage_fileType { public: MTPstorage_fileType() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPstorage_fileType(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPstorage_FileType; class MTPfileLocation : private MTP::internal::TypeDataOwner { public: MTPfileLocation() { } const MTPDfileLocationUnavailable &c_fileLocationUnavailable() const; const MTPDfileLocation &c_fileLocation() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPfileLocation(mtpTypeId type); explicit MTPfileLocation(const MTPDfileLocationUnavailable *data); explicit MTPfileLocation(const MTPDfileLocation *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPFileLocation; class MTPuser : private MTP::internal::TypeDataOwner { public: MTPuser() { } const MTPDuserEmpty &c_userEmpty() const; const MTPDuser &c_user() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPuser(mtpTypeId type); explicit MTPuser(const MTPDuserEmpty *data); explicit MTPuser(const MTPDuser *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPUser; class MTPuserProfilePhoto : private MTP::internal::TypeDataOwner { public: MTPuserProfilePhoto() { } const MTPDuserProfilePhoto &c_userProfilePhoto() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPuserProfilePhoto(mtpTypeId type); explicit MTPuserProfilePhoto(const MTPDuserProfilePhoto *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPUserProfilePhoto; class MTPuserStatus : private MTP::internal::TypeDataOwner { public: MTPuserStatus() { } const MTPDuserStatusOnline &c_userStatusOnline() const; const MTPDuserStatusOffline &c_userStatusOffline() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPuserStatus(mtpTypeId type); explicit MTPuserStatus(const MTPDuserStatusOnline *data); explicit MTPuserStatus(const MTPDuserStatusOffline *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPUserStatus; class MTPchat : private MTP::internal::TypeDataOwner { public: MTPchat() { } const MTPDchatEmpty &c_chatEmpty() const; const MTPDchat &c_chat() const; const MTPDchatForbidden &c_chatForbidden() const; const MTPDchannel &c_channel() const; const MTPDchannelForbidden &c_channelForbidden() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchat(mtpTypeId type); explicit MTPchat(const MTPDchatEmpty *data); explicit MTPchat(const MTPDchat *data); explicit MTPchat(const MTPDchatForbidden *data); explicit MTPchat(const MTPDchannel *data); explicit MTPchat(const MTPDchannelForbidden *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChat; class MTPchatFull : private MTP::internal::TypeDataOwner { public: MTPchatFull() { } const MTPDchatFull &c_chatFull() const; const MTPDchannelFull &c_channelFull() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchatFull(mtpTypeId type); explicit MTPchatFull(const MTPDchatFull *data); explicit MTPchatFull(const MTPDchannelFull *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChatFull; class MTPchatParticipant : private MTP::internal::TypeDataOwner { public: MTPchatParticipant() { } const MTPDchatParticipant &c_chatParticipant() const; const MTPDchatParticipantCreator &c_chatParticipantCreator() const; const MTPDchatParticipantAdmin &c_chatParticipantAdmin() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchatParticipant(mtpTypeId type); explicit MTPchatParticipant(const MTPDchatParticipant *data); explicit MTPchatParticipant(const MTPDchatParticipantCreator *data); explicit MTPchatParticipant(const MTPDchatParticipantAdmin *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChatParticipant; class MTPchatParticipants : private MTP::internal::TypeDataOwner { public: MTPchatParticipants() { } const MTPDchatParticipantsForbidden &c_chatParticipantsForbidden() const; const MTPDchatParticipants &c_chatParticipants() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchatParticipants(mtpTypeId type); explicit MTPchatParticipants(const MTPDchatParticipantsForbidden *data); explicit MTPchatParticipants(const MTPDchatParticipants *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChatParticipants; class MTPchatPhoto : private MTP::internal::TypeDataOwner { public: MTPchatPhoto() { } const MTPDchatPhoto &c_chatPhoto() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchatPhoto(mtpTypeId type); explicit MTPchatPhoto(const MTPDchatPhoto *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChatPhoto; class MTPmessage : private MTP::internal::TypeDataOwner { public: MTPmessage() { } const MTPDmessageEmpty &c_messageEmpty() const; const MTPDmessage &c_message() const; const MTPDmessageService &c_messageService() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessage(mtpTypeId type); explicit MTPmessage(const MTPDmessageEmpty *data); explicit MTPmessage(const MTPDmessage *data); explicit MTPmessage(const MTPDmessageService *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPMessage; class MTPmessageMedia : private MTP::internal::TypeDataOwner { public: MTPmessageMedia() { } const MTPDmessageMediaPhoto &c_messageMediaPhoto() const; const MTPDmessageMediaGeo &c_messageMediaGeo() const; const MTPDmessageMediaContact &c_messageMediaContact() const; const MTPDmessageMediaDocument &c_messageMediaDocument() const; const MTPDmessageMediaWebPage &c_messageMediaWebPage() const; const MTPDmessageMediaVenue &c_messageMediaVenue() const; const MTPDmessageMediaGame &c_messageMediaGame() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessageMedia(mtpTypeId type); explicit MTPmessageMedia(const MTPDmessageMediaPhoto *data); explicit MTPmessageMedia(const MTPDmessageMediaGeo *data); explicit MTPmessageMedia(const MTPDmessageMediaContact *data); explicit MTPmessageMedia(const MTPDmessageMediaDocument *data); explicit MTPmessageMedia(const MTPDmessageMediaWebPage *data); explicit MTPmessageMedia(const MTPDmessageMediaVenue *data); explicit MTPmessageMedia(const MTPDmessageMediaGame *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPMessageMedia; class MTPmessageAction : private MTP::internal::TypeDataOwner { public: MTPmessageAction() { } const MTPDmessageActionChatCreate &c_messageActionChatCreate() const; const MTPDmessageActionChatEditTitle &c_messageActionChatEditTitle() const; const MTPDmessageActionChatEditPhoto &c_messageActionChatEditPhoto() const; const MTPDmessageActionChatAddUser &c_messageActionChatAddUser() const; const MTPDmessageActionChatDeleteUser &c_messageActionChatDeleteUser() const; const MTPDmessageActionChatJoinedByLink &c_messageActionChatJoinedByLink() const; const MTPDmessageActionChannelCreate &c_messageActionChannelCreate() const; const MTPDmessageActionChatMigrateTo &c_messageActionChatMigrateTo() const; const MTPDmessageActionChannelMigrateFrom &c_messageActionChannelMigrateFrom() const; const MTPDmessageActionGameScore &c_messageActionGameScore() const; const MTPDmessageActionPhoneCall &c_messageActionPhoneCall() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessageAction(mtpTypeId type); explicit MTPmessageAction(const MTPDmessageActionChatCreate *data); explicit MTPmessageAction(const MTPDmessageActionChatEditTitle *data); explicit MTPmessageAction(const MTPDmessageActionChatEditPhoto *data); explicit MTPmessageAction(const MTPDmessageActionChatAddUser *data); explicit MTPmessageAction(const MTPDmessageActionChatDeleteUser *data); explicit MTPmessageAction(const MTPDmessageActionChatJoinedByLink *data); explicit MTPmessageAction(const MTPDmessageActionChannelCreate *data); explicit MTPmessageAction(const MTPDmessageActionChatMigrateTo *data); explicit MTPmessageAction(const MTPDmessageActionChannelMigrateFrom *data); explicit MTPmessageAction(const MTPDmessageActionGameScore *data); explicit MTPmessageAction(const MTPDmessageActionPhoneCall *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPMessageAction; class MTPdialog : private MTP::internal::TypeDataOwner { public: MTPdialog(); const MTPDdialog &c_dialog() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_dialog); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdialog(const MTPDdialog *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPDialog; class MTPphoto : private MTP::internal::TypeDataOwner { public: MTPphoto() { } const MTPDphotoEmpty &c_photoEmpty() const; const MTPDphoto &c_photo() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphoto(mtpTypeId type); explicit MTPphoto(const MTPDphotoEmpty *data); explicit MTPphoto(const MTPDphoto *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPhoto; class MTPphotoSize : private MTP::internal::TypeDataOwner { public: MTPphotoSize() { } const MTPDphotoSizeEmpty &c_photoSizeEmpty() const; const MTPDphotoSize &c_photoSize() const; const MTPDphotoCachedSize &c_photoCachedSize() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphotoSize(mtpTypeId type); explicit MTPphotoSize(const MTPDphotoSizeEmpty *data); explicit MTPphotoSize(const MTPDphotoSize *data); explicit MTPphotoSize(const MTPDphotoCachedSize *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPhotoSize; class MTPgeoPoint : private MTP::internal::TypeDataOwner { public: MTPgeoPoint() { } const MTPDgeoPoint &c_geoPoint() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPgeoPoint(mtpTypeId type); explicit MTPgeoPoint(const MTPDgeoPoint *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPGeoPoint; class MTPauth_checkedPhone : private MTP::internal::TypeDataOwner { public: MTPauth_checkedPhone(); const MTPDauth_checkedPhone &c_auth_checkedPhone() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_checkedPhone); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_checkedPhone(const MTPDauth_checkedPhone *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_CheckedPhone; class MTPauth_sentCode : private MTP::internal::TypeDataOwner { public: MTPauth_sentCode(); const MTPDauth_sentCode &c_auth_sentCode() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sentCode); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_sentCode(const MTPDauth_sentCode *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_SentCode; class MTPauth_authorization : private MTP::internal::TypeDataOwner { public: MTPauth_authorization(); const MTPDauth_authorization &c_auth_authorization() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_authorization); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_authorization(const MTPDauth_authorization *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_Authorization; class MTPauth_exportedAuthorization : private MTP::internal::TypeDataOwner { public: MTPauth_exportedAuthorization(); const MTPDauth_exportedAuthorization &c_auth_exportedAuthorization() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_exportedAuthorization); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_exportedAuthorization(const MTPDauth_exportedAuthorization *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_ExportedAuthorization; class MTPinputNotifyPeer : private MTP::internal::TypeDataOwner { public: MTPinputNotifyPeer() { } const MTPDinputNotifyPeer &c_inputNotifyPeer() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputNotifyPeer(mtpTypeId type); explicit MTPinputNotifyPeer(const MTPDinputNotifyPeer *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputNotifyPeer; class MTPinputPeerNotifyEvents { public: MTPinputPeerNotifyEvents() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPeerNotifyEvents(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputPeerNotifyEvents; class MTPinputPeerNotifySettings : private MTP::internal::TypeDataOwner { public: MTPinputPeerNotifySettings(); const MTPDinputPeerNotifySettings &c_inputPeerNotifySettings() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPeerNotifySettings); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPeerNotifySettings(const MTPDinputPeerNotifySettings *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputPeerNotifySettings; class MTPpeerNotifyEvents { public: MTPpeerNotifyEvents() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpeerNotifyEvents(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPeerNotifyEvents; class MTPpeerNotifySettings : private MTP::internal::TypeDataOwner { public: MTPpeerNotifySettings() { } const MTPDpeerNotifySettings &c_peerNotifySettings() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpeerNotifySettings(mtpTypeId type); explicit MTPpeerNotifySettings(const MTPDpeerNotifySettings *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPeerNotifySettings; class MTPpeerSettings : private MTP::internal::TypeDataOwner { public: MTPpeerSettings(); const MTPDpeerSettings &c_peerSettings() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_peerSettings); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpeerSettings(const MTPDpeerSettings *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPPeerSettings; class MTPwallPaper : private MTP::internal::TypeDataOwner { public: MTPwallPaper() { } const MTPDwallPaper &c_wallPaper() const; const MTPDwallPaperSolid &c_wallPaperSolid() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPwallPaper(mtpTypeId type); explicit MTPwallPaper(const MTPDwallPaper *data); explicit MTPwallPaper(const MTPDwallPaperSolid *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPWallPaper; class MTPreportReason : private MTP::internal::TypeDataOwner { public: MTPreportReason() { } const MTPDinputReportReasonOther &c_inputReportReasonOther() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPreportReason(mtpTypeId type); explicit MTPreportReason(const MTPDinputReportReasonOther *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPReportReason; class MTPuserFull : private MTP::internal::TypeDataOwner { public: MTPuserFull(); const MTPDuserFull &c_userFull() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_userFull); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPuserFull(const MTPDuserFull *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPUserFull; class MTPcontact : private MTP::internal::TypeDataOwner { public: MTPcontact(); const MTPDcontact &c_contact() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contact); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontact(const MTPDcontact *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPContact; class MTPimportedContact : private MTP::internal::TypeDataOwner { public: MTPimportedContact(); const MTPDimportedContact &c_importedContact() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_importedContact); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPimportedContact(const MTPDimportedContact *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPImportedContact; class MTPcontactBlocked : private MTP::internal::TypeDataOwner { public: MTPcontactBlocked(); const MTPDcontactBlocked &c_contactBlocked() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contactBlocked); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontactBlocked(const MTPDcontactBlocked *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPContactBlocked; class MTPcontactStatus : private MTP::internal::TypeDataOwner { public: MTPcontactStatus(); const MTPDcontactStatus &c_contactStatus() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contactStatus); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontactStatus(const MTPDcontactStatus *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPContactStatus; class MTPcontacts_link : private MTP::internal::TypeDataOwner { public: MTPcontacts_link(); const MTPDcontacts_link &c_contacts_link() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_link); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_link(const MTPDcontacts_link *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_Link; class MTPcontacts_contacts : private MTP::internal::TypeDataOwner { public: MTPcontacts_contacts() { } const MTPDcontacts_contacts &c_contacts_contacts() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_contacts(mtpTypeId type); explicit MTPcontacts_contacts(const MTPDcontacts_contacts *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPcontacts_Contacts; class MTPcontacts_importedContacts : private MTP::internal::TypeDataOwner { public: MTPcontacts_importedContacts(); const MTPDcontacts_importedContacts &c_contacts_importedContacts() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_importedContacts); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_importedContacts(const MTPDcontacts_importedContacts *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_ImportedContacts; class MTPcontacts_blocked : private MTP::internal::TypeDataOwner { public: MTPcontacts_blocked() { } const MTPDcontacts_blocked &c_contacts_blocked() const; const MTPDcontacts_blockedSlice &c_contacts_blockedSlice() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_blocked(mtpTypeId type); explicit MTPcontacts_blocked(const MTPDcontacts_blocked *data); explicit MTPcontacts_blocked(const MTPDcontacts_blockedSlice *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPcontacts_Blocked; class MTPmessages_dialogs : private MTP::internal::TypeDataOwner { public: MTPmessages_dialogs() { } const MTPDmessages_dialogs &c_messages_dialogs() const; const MTPDmessages_dialogsSlice &c_messages_dialogsSlice() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_dialogs(mtpTypeId type); explicit MTPmessages_dialogs(const MTPDmessages_dialogs *data); explicit MTPmessages_dialogs(const MTPDmessages_dialogsSlice *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_Dialogs; class MTPmessages_messages : private MTP::internal::TypeDataOwner { public: MTPmessages_messages() { } const MTPDmessages_messages &c_messages_messages() const; const MTPDmessages_messagesSlice &c_messages_messagesSlice() const; const MTPDmessages_channelMessages &c_messages_channelMessages() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_messages(mtpTypeId type); explicit MTPmessages_messages(const MTPDmessages_messages *data); explicit MTPmessages_messages(const MTPDmessages_messagesSlice *data); explicit MTPmessages_messages(const MTPDmessages_channelMessages *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_Messages; class MTPmessages_chats : private MTP::internal::TypeDataOwner { public: MTPmessages_chats() { } const MTPDmessages_chats &c_messages_chats() const; const MTPDmessages_chatsSlice &c_messages_chatsSlice() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_chats(mtpTypeId type); explicit MTPmessages_chats(const MTPDmessages_chats *data); explicit MTPmessages_chats(const MTPDmessages_chatsSlice *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_Chats; class MTPmessages_chatFull : private MTP::internal::TypeDataOwner { public: MTPmessages_chatFull(); const MTPDmessages_chatFull &c_messages_chatFull() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_chatFull); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_chatFull(const MTPDmessages_chatFull *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_ChatFull; class MTPmessages_affectedHistory : private MTP::internal::TypeDataOwner { public: MTPmessages_affectedHistory(); const MTPDmessages_affectedHistory &c_messages_affectedHistory() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_affectedHistory); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_affectedHistory(const MTPDmessages_affectedHistory *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_AffectedHistory; class MTPmessagesFilter : private MTP::internal::TypeDataOwner { public: MTPmessagesFilter() { } const MTPDinputMessagesFilterPhoneCalls &c_inputMessagesFilterPhoneCalls() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessagesFilter(mtpTypeId type); explicit MTPmessagesFilter(const MTPDinputMessagesFilterPhoneCalls *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPMessagesFilter; class MTPupdate : private MTP::internal::TypeDataOwner { public: MTPupdate() { } const MTPDupdateNewMessage &c_updateNewMessage() const; const MTPDupdateMessageID &c_updateMessageID() const; const MTPDupdateDeleteMessages &c_updateDeleteMessages() const; const MTPDupdateUserTyping &c_updateUserTyping() const; const MTPDupdateChatUserTyping &c_updateChatUserTyping() const; const MTPDupdateChatParticipants &c_updateChatParticipants() const; const MTPDupdateUserStatus &c_updateUserStatus() const; const MTPDupdateUserName &c_updateUserName() const; const MTPDupdateUserPhoto &c_updateUserPhoto() const; const MTPDupdateContactRegistered &c_updateContactRegistered() const; const MTPDupdateContactLink &c_updateContactLink() const; const MTPDupdateNewEncryptedMessage &c_updateNewEncryptedMessage() const; const MTPDupdateEncryptedChatTyping &c_updateEncryptedChatTyping() const; const MTPDupdateEncryption &c_updateEncryption() const; const MTPDupdateEncryptedMessagesRead &c_updateEncryptedMessagesRead() const; const MTPDupdateChatParticipantAdd &c_updateChatParticipantAdd() const; const MTPDupdateChatParticipantDelete &c_updateChatParticipantDelete() const; const MTPDupdateDcOptions &c_updateDcOptions() const; const MTPDupdateUserBlocked &c_updateUserBlocked() const; const MTPDupdateNotifySettings &c_updateNotifySettings() const; const MTPDupdateServiceNotification &c_updateServiceNotification() const; const MTPDupdatePrivacy &c_updatePrivacy() const; const MTPDupdateUserPhone &c_updateUserPhone() const; const MTPDupdateReadHistoryInbox &c_updateReadHistoryInbox() const; const MTPDupdateReadHistoryOutbox &c_updateReadHistoryOutbox() const; const MTPDupdateWebPage &c_updateWebPage() const; const MTPDupdateReadMessagesContents &c_updateReadMessagesContents() const; const MTPDupdateChannelTooLong &c_updateChannelTooLong() const; const MTPDupdateChannel &c_updateChannel() const; const MTPDupdateNewChannelMessage &c_updateNewChannelMessage() const; const MTPDupdateReadChannelInbox &c_updateReadChannelInbox() const; const MTPDupdateDeleteChannelMessages &c_updateDeleteChannelMessages() const; const MTPDupdateChannelMessageViews &c_updateChannelMessageViews() const; const MTPDupdateChatAdmins &c_updateChatAdmins() const; const MTPDupdateChatParticipantAdmin &c_updateChatParticipantAdmin() const; const MTPDupdateNewStickerSet &c_updateNewStickerSet() const; const MTPDupdateStickerSetsOrder &c_updateStickerSetsOrder() const; const MTPDupdateBotInlineQuery &c_updateBotInlineQuery() const; const MTPDupdateBotInlineSend &c_updateBotInlineSend() const; const MTPDupdateEditChannelMessage &c_updateEditChannelMessage() const; const MTPDupdateChannelPinnedMessage &c_updateChannelPinnedMessage() const; const MTPDupdateBotCallbackQuery &c_updateBotCallbackQuery() const; const MTPDupdateEditMessage &c_updateEditMessage() const; const MTPDupdateInlineBotCallbackQuery &c_updateInlineBotCallbackQuery() const; const MTPDupdateReadChannelOutbox &c_updateReadChannelOutbox() const; const MTPDupdateDraftMessage &c_updateDraftMessage() const; const MTPDupdateChannelWebPage &c_updateChannelWebPage() const; const MTPDupdatePhoneCall &c_updatePhoneCall() const; const MTPDupdateDialogPinned &c_updateDialogPinned() const; const MTPDupdatePinnedDialogs &c_updatePinnedDialogs() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPupdate(mtpTypeId type); explicit MTPupdate(const MTPDupdateNewMessage *data); explicit MTPupdate(const MTPDupdateMessageID *data); explicit MTPupdate(const MTPDupdateDeleteMessages *data); explicit MTPupdate(const MTPDupdateUserTyping *data); explicit MTPupdate(const MTPDupdateChatUserTyping *data); explicit MTPupdate(const MTPDupdateChatParticipants *data); explicit MTPupdate(const MTPDupdateUserStatus *data); explicit MTPupdate(const MTPDupdateUserName *data); explicit MTPupdate(const MTPDupdateUserPhoto *data); explicit MTPupdate(const MTPDupdateContactRegistered *data); explicit MTPupdate(const MTPDupdateContactLink *data); explicit MTPupdate(const MTPDupdateNewEncryptedMessage *data); explicit MTPupdate(const MTPDupdateEncryptedChatTyping *data); explicit MTPupdate(const MTPDupdateEncryption *data); explicit MTPupdate(const MTPDupdateEncryptedMessagesRead *data); explicit MTPupdate(const MTPDupdateChatParticipantAdd *data); explicit MTPupdate(const MTPDupdateChatParticipantDelete *data); explicit MTPupdate(const MTPDupdateDcOptions *data); explicit MTPupdate(const MTPDupdateUserBlocked *data); explicit MTPupdate(const MTPDupdateNotifySettings *data); explicit MTPupdate(const MTPDupdateServiceNotification *data); explicit MTPupdate(const MTPDupdatePrivacy *data); explicit MTPupdate(const MTPDupdateUserPhone *data); explicit MTPupdate(const MTPDupdateReadHistoryInbox *data); explicit MTPupdate(const MTPDupdateReadHistoryOutbox *data); explicit MTPupdate(const MTPDupdateWebPage *data); explicit MTPupdate(const MTPDupdateReadMessagesContents *data); explicit MTPupdate(const MTPDupdateChannelTooLong *data); explicit MTPupdate(const MTPDupdateChannel *data); explicit MTPupdate(const MTPDupdateNewChannelMessage *data); explicit MTPupdate(const MTPDupdateReadChannelInbox *data); explicit MTPupdate(const MTPDupdateDeleteChannelMessages *data); explicit MTPupdate(const MTPDupdateChannelMessageViews *data); explicit MTPupdate(const MTPDupdateChatAdmins *data); explicit MTPupdate(const MTPDupdateChatParticipantAdmin *data); explicit MTPupdate(const MTPDupdateNewStickerSet *data); explicit MTPupdate(const MTPDupdateStickerSetsOrder *data); explicit MTPupdate(const MTPDupdateBotInlineQuery *data); explicit MTPupdate(const MTPDupdateBotInlineSend *data); explicit MTPupdate(const MTPDupdateEditChannelMessage *data); explicit MTPupdate(const MTPDupdateChannelPinnedMessage *data); explicit MTPupdate(const MTPDupdateBotCallbackQuery *data); explicit MTPupdate(const MTPDupdateEditMessage *data); explicit MTPupdate(const MTPDupdateInlineBotCallbackQuery *data); explicit MTPupdate(const MTPDupdateReadChannelOutbox *data); explicit MTPupdate(const MTPDupdateDraftMessage *data); explicit MTPupdate(const MTPDupdateChannelWebPage *data); explicit MTPupdate(const MTPDupdatePhoneCall *data); explicit MTPupdate(const MTPDupdateDialogPinned *data); explicit MTPupdate(const MTPDupdatePinnedDialogs *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPUpdate; class MTPupdates_state : private MTP::internal::TypeDataOwner { public: MTPupdates_state(); const MTPDupdates_state &c_updates_state() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_state); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPupdates_state(const MTPDupdates_state *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPupdates_State; class MTPupdates_difference : private MTP::internal::TypeDataOwner { public: MTPupdates_difference() { } const MTPDupdates_differenceEmpty &c_updates_differenceEmpty() const; const MTPDupdates_difference &c_updates_difference() const; const MTPDupdates_differenceSlice &c_updates_differenceSlice() const; const MTPDupdates_differenceTooLong &c_updates_differenceTooLong() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPupdates_difference(mtpTypeId type); explicit MTPupdates_difference(const MTPDupdates_differenceEmpty *data); explicit MTPupdates_difference(const MTPDupdates_difference *data); explicit MTPupdates_difference(const MTPDupdates_differenceSlice *data); explicit MTPupdates_difference(const MTPDupdates_differenceTooLong *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPupdates_Difference; class MTPupdates : private MTP::internal::TypeDataOwner { public: MTPupdates() { } const MTPDupdateShortMessage &c_updateShortMessage() const; const MTPDupdateShortChatMessage &c_updateShortChatMessage() const; const MTPDupdateShort &c_updateShort() const; const MTPDupdatesCombined &c_updatesCombined() const; const MTPDupdates &c_updates() const; const MTPDupdateShortSentMessage &c_updateShortSentMessage() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPupdates(mtpTypeId type); explicit MTPupdates(const MTPDupdateShortMessage *data); explicit MTPupdates(const MTPDupdateShortChatMessage *data); explicit MTPupdates(const MTPDupdateShort *data); explicit MTPupdates(const MTPDupdatesCombined *data); explicit MTPupdates(const MTPDupdates *data); explicit MTPupdates(const MTPDupdateShortSentMessage *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPUpdates; class MTPphotos_photos : private MTP::internal::TypeDataOwner { public: MTPphotos_photos() { } const MTPDphotos_photos &c_photos_photos() const; const MTPDphotos_photosSlice &c_photos_photosSlice() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphotos_photos(mtpTypeId type); explicit MTPphotos_photos(const MTPDphotos_photos *data); explicit MTPphotos_photos(const MTPDphotos_photosSlice *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPphotos_Photos; class MTPphotos_photo : private MTP::internal::TypeDataOwner { public: MTPphotos_photo(); const MTPDphotos_photo &c_photos_photo() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_photo); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphotos_photo(const MTPDphotos_photo *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPphotos_Photo; class MTPupload_file : private MTP::internal::TypeDataOwner { public: MTPupload_file(); const MTPDupload_file &c_upload_file() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_file); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPupload_file(const MTPDupload_file *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPupload_File; class MTPdcOption : private MTP::internal::TypeDataOwner { public: MTPdcOption(); const MTPDdcOption &c_dcOption() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_dcOption); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdcOption(const MTPDdcOption *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPDcOption; class MTPconfig : private MTP::internal::TypeDataOwner { public: MTPconfig(); const MTPDconfig &c_config() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_config); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPconfig(const MTPDconfig *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPConfig; class MTPnearestDc : private MTP::internal::TypeDataOwner { public: MTPnearestDc(); const MTPDnearestDc &c_nearestDc() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_nearestDc); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPnearestDc(const MTPDnearestDc *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPNearestDc; class MTPhelp_appUpdate : private MTP::internal::TypeDataOwner { public: MTPhelp_appUpdate() { } const MTPDhelp_appUpdate &c_help_appUpdate() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhelp_appUpdate(mtpTypeId type); explicit MTPhelp_appUpdate(const MTPDhelp_appUpdate *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPhelp_AppUpdate; class MTPhelp_inviteText : private MTP::internal::TypeDataOwner { public: MTPhelp_inviteText(); const MTPDhelp_inviteText &c_help_inviteText() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_inviteText); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhelp_inviteText(const MTPDhelp_inviteText *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPhelp_InviteText; class MTPencryptedChat : private MTP::internal::TypeDataOwner { public: MTPencryptedChat() { } const MTPDencryptedChatEmpty &c_encryptedChatEmpty() const; const MTPDencryptedChatWaiting &c_encryptedChatWaiting() const; const MTPDencryptedChatRequested &c_encryptedChatRequested() const; const MTPDencryptedChat &c_encryptedChat() const; const MTPDencryptedChatDiscarded &c_encryptedChatDiscarded() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPencryptedChat(mtpTypeId type); explicit MTPencryptedChat(const MTPDencryptedChatEmpty *data); explicit MTPencryptedChat(const MTPDencryptedChatWaiting *data); explicit MTPencryptedChat(const MTPDencryptedChatRequested *data); explicit MTPencryptedChat(const MTPDencryptedChat *data); explicit MTPencryptedChat(const MTPDencryptedChatDiscarded *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPEncryptedChat; class MTPinputEncryptedChat : private MTP::internal::TypeDataOwner { public: MTPinputEncryptedChat(); const MTPDinputEncryptedChat &c_inputEncryptedChat() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputEncryptedChat); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputEncryptedChat(const MTPDinputEncryptedChat *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputEncryptedChat; class MTPencryptedFile : private MTP::internal::TypeDataOwner { public: MTPencryptedFile() { } const MTPDencryptedFile &c_encryptedFile() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPencryptedFile(mtpTypeId type); explicit MTPencryptedFile(const MTPDencryptedFile *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPEncryptedFile; class MTPinputEncryptedFile : private MTP::internal::TypeDataOwner { public: MTPinputEncryptedFile() { } const MTPDinputEncryptedFileUploaded &c_inputEncryptedFileUploaded() const; const MTPDinputEncryptedFile &c_inputEncryptedFile() const; const MTPDinputEncryptedFileBigUploaded &c_inputEncryptedFileBigUploaded() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputEncryptedFile(mtpTypeId type); explicit MTPinputEncryptedFile(const MTPDinputEncryptedFileUploaded *data); explicit MTPinputEncryptedFile(const MTPDinputEncryptedFile *data); explicit MTPinputEncryptedFile(const MTPDinputEncryptedFileBigUploaded *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputEncryptedFile; class MTPencryptedMessage : private MTP::internal::TypeDataOwner { public: MTPencryptedMessage() { } const MTPDencryptedMessage &c_encryptedMessage() const; const MTPDencryptedMessageService &c_encryptedMessageService() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPencryptedMessage(mtpTypeId type); explicit MTPencryptedMessage(const MTPDencryptedMessage *data); explicit MTPencryptedMessage(const MTPDencryptedMessageService *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPEncryptedMessage; class MTPmessages_dhConfig : private MTP::internal::TypeDataOwner { public: MTPmessages_dhConfig() { } const MTPDmessages_dhConfigNotModified &c_messages_dhConfigNotModified() const; const MTPDmessages_dhConfig &c_messages_dhConfig() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_dhConfig(mtpTypeId type); explicit MTPmessages_dhConfig(const MTPDmessages_dhConfigNotModified *data); explicit MTPmessages_dhConfig(const MTPDmessages_dhConfig *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_DhConfig; class MTPmessages_sentEncryptedMessage : private MTP::internal::TypeDataOwner { public: MTPmessages_sentEncryptedMessage() { } const MTPDmessages_sentEncryptedMessage &c_messages_sentEncryptedMessage() const; const MTPDmessages_sentEncryptedFile &c_messages_sentEncryptedFile() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_sentEncryptedMessage(mtpTypeId type); explicit MTPmessages_sentEncryptedMessage(const MTPDmessages_sentEncryptedMessage *data); explicit MTPmessages_sentEncryptedMessage(const MTPDmessages_sentEncryptedFile *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_SentEncryptedMessage; class MTPinputDocument : private MTP::internal::TypeDataOwner { public: MTPinputDocument() { } const MTPDinputDocument &c_inputDocument() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputDocument(mtpTypeId type); explicit MTPinputDocument(const MTPDinputDocument *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputDocument; class MTPdocument : private MTP::internal::TypeDataOwner { public: MTPdocument() { } const MTPDdocumentEmpty &c_documentEmpty() const; const MTPDdocument &c_document() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdocument(mtpTypeId type); explicit MTPdocument(const MTPDdocumentEmpty *data); explicit MTPdocument(const MTPDdocument *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPDocument; class MTPhelp_support : private MTP::internal::TypeDataOwner { public: MTPhelp_support(); const MTPDhelp_support &c_help_support() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_support); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhelp_support(const MTPDhelp_support *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPhelp_Support; class MTPnotifyPeer : private MTP::internal::TypeDataOwner { public: MTPnotifyPeer() { } const MTPDnotifyPeer &c_notifyPeer() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPnotifyPeer(mtpTypeId type); explicit MTPnotifyPeer(const MTPDnotifyPeer *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPNotifyPeer; class MTPsendMessageAction : private MTP::internal::TypeDataOwner { public: MTPsendMessageAction() { } const MTPDsendMessageUploadVideoAction &c_sendMessageUploadVideoAction() const; const MTPDsendMessageUploadAudioAction &c_sendMessageUploadAudioAction() const; const MTPDsendMessageUploadPhotoAction &c_sendMessageUploadPhotoAction() const; const MTPDsendMessageUploadDocumentAction &c_sendMessageUploadDocumentAction() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPsendMessageAction(mtpTypeId type); explicit MTPsendMessageAction(const MTPDsendMessageUploadVideoAction *data); explicit MTPsendMessageAction(const MTPDsendMessageUploadAudioAction *data); explicit MTPsendMessageAction(const MTPDsendMessageUploadPhotoAction *data); explicit MTPsendMessageAction(const MTPDsendMessageUploadDocumentAction *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPSendMessageAction; class MTPcontacts_found : private MTP::internal::TypeDataOwner { public: MTPcontacts_found(); const MTPDcontacts_found &c_contacts_found() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_found); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_found(const MTPDcontacts_found *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_Found; class MTPinputPrivacyKey { public: MTPinputPrivacyKey() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPrivacyKey(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputPrivacyKey; class MTPprivacyKey { public: MTPprivacyKey() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPprivacyKey(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPrivacyKey; class MTPinputPrivacyRule : private MTP::internal::TypeDataOwner { public: MTPinputPrivacyRule() { } const MTPDinputPrivacyValueAllowUsers &c_inputPrivacyValueAllowUsers() const; const MTPDinputPrivacyValueDisallowUsers &c_inputPrivacyValueDisallowUsers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPrivacyRule(mtpTypeId type); explicit MTPinputPrivacyRule(const MTPDinputPrivacyValueAllowUsers *data); explicit MTPinputPrivacyRule(const MTPDinputPrivacyValueDisallowUsers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputPrivacyRule; class MTPprivacyRule : private MTP::internal::TypeDataOwner { public: MTPprivacyRule() { } const MTPDprivacyValueAllowUsers &c_privacyValueAllowUsers() const; const MTPDprivacyValueDisallowUsers &c_privacyValueDisallowUsers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPprivacyRule(mtpTypeId type); explicit MTPprivacyRule(const MTPDprivacyValueAllowUsers *data); explicit MTPprivacyRule(const MTPDprivacyValueDisallowUsers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPrivacyRule; class MTPaccount_privacyRules : private MTP::internal::TypeDataOwner { public: MTPaccount_privacyRules(); const MTPDaccount_privacyRules &c_account_privacyRules() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_privacyRules); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPaccount_privacyRules(const MTPDaccount_privacyRules *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_PrivacyRules; class MTPaccountDaysTTL : private MTP::internal::TypeDataOwner { public: MTPaccountDaysTTL(); const MTPDaccountDaysTTL &c_accountDaysTTL() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_accountDaysTTL); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPaccountDaysTTL(const MTPDaccountDaysTTL *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPAccountDaysTTL; class MTPdocumentAttribute : private MTP::internal::TypeDataOwner { public: MTPdocumentAttribute() { } const MTPDdocumentAttributeImageSize &c_documentAttributeImageSize() const; const MTPDdocumentAttributeSticker &c_documentAttributeSticker() const; const MTPDdocumentAttributeVideo &c_documentAttributeVideo() const; const MTPDdocumentAttributeAudio &c_documentAttributeAudio() const; const MTPDdocumentAttributeFilename &c_documentAttributeFilename() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdocumentAttribute(mtpTypeId type); explicit MTPdocumentAttribute(const MTPDdocumentAttributeImageSize *data); explicit MTPdocumentAttribute(const MTPDdocumentAttributeSticker *data); explicit MTPdocumentAttribute(const MTPDdocumentAttributeVideo *data); explicit MTPdocumentAttribute(const MTPDdocumentAttributeAudio *data); explicit MTPdocumentAttribute(const MTPDdocumentAttributeFilename *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPDocumentAttribute; class MTPmessages_stickers : private MTP::internal::TypeDataOwner { public: MTPmessages_stickers() { } const MTPDmessages_stickers &c_messages_stickers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_stickers(mtpTypeId type); explicit MTPmessages_stickers(const MTPDmessages_stickers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_Stickers; class MTPstickerPack : private MTP::internal::TypeDataOwner { public: MTPstickerPack(); const MTPDstickerPack &c_stickerPack() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_stickerPack); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPstickerPack(const MTPDstickerPack *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPStickerPack; class MTPmessages_allStickers : private MTP::internal::TypeDataOwner { public: MTPmessages_allStickers() { } const MTPDmessages_allStickers &c_messages_allStickers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_allStickers(mtpTypeId type); explicit MTPmessages_allStickers(const MTPDmessages_allStickers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_AllStickers; class MTPdisabledFeature : private MTP::internal::TypeDataOwner { public: MTPdisabledFeature(); const MTPDdisabledFeature &c_disabledFeature() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_disabledFeature); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdisabledFeature(const MTPDdisabledFeature *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPDisabledFeature; class MTPmessages_affectedMessages : private MTP::internal::TypeDataOwner { public: MTPmessages_affectedMessages(); const MTPDmessages_affectedMessages &c_messages_affectedMessages() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_affectedMessages); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_affectedMessages(const MTPDmessages_affectedMessages *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_AffectedMessages; class MTPcontactLink { public: MTPcontactLink() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontactLink(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPContactLink; class MTPwebPage : private MTP::internal::TypeDataOwner { public: MTPwebPage() { } const MTPDwebPageEmpty &c_webPageEmpty() const; const MTPDwebPagePending &c_webPagePending() const; const MTPDwebPage &c_webPage() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPwebPage(mtpTypeId type); explicit MTPwebPage(const MTPDwebPageEmpty *data); explicit MTPwebPage(const MTPDwebPagePending *data); explicit MTPwebPage(const MTPDwebPage *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPWebPage; class MTPauthorization : private MTP::internal::TypeDataOwner { public: MTPauthorization(); const MTPDauthorization &c_authorization() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_authorization); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauthorization(const MTPDauthorization *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPAuthorization; class MTPaccount_authorizations : private MTP::internal::TypeDataOwner { public: MTPaccount_authorizations(); const MTPDaccount_authorizations &c_account_authorizations() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_authorizations); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPaccount_authorizations(const MTPDaccount_authorizations *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_Authorizations; class MTPaccount_password : private MTP::internal::TypeDataOwner { public: MTPaccount_password() { } const MTPDaccount_noPassword &c_account_noPassword() const; const MTPDaccount_password &c_account_password() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPaccount_password(mtpTypeId type); explicit MTPaccount_password(const MTPDaccount_noPassword *data); explicit MTPaccount_password(const MTPDaccount_password *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPaccount_Password; class MTPaccount_passwordSettings : private MTP::internal::TypeDataOwner { public: MTPaccount_passwordSettings(); const MTPDaccount_passwordSettings &c_account_passwordSettings() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_passwordSettings); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPaccount_passwordSettings(const MTPDaccount_passwordSettings *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_PasswordSettings; class MTPaccount_passwordInputSettings : private MTP::internal::TypeDataOwner { public: MTPaccount_passwordInputSettings(); const MTPDaccount_passwordInputSettings &c_account_passwordInputSettings() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_passwordInputSettings); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPaccount_passwordInputSettings(const MTPDaccount_passwordInputSettings *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_PasswordInputSettings; class MTPauth_passwordRecovery : private MTP::internal::TypeDataOwner { public: MTPauth_passwordRecovery(); const MTPDauth_passwordRecovery &c_auth_passwordRecovery() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_passwordRecovery); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_passwordRecovery(const MTPDauth_passwordRecovery *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_PasswordRecovery; class MTPreceivedNotifyMessage : private MTP::internal::TypeDataOwner { public: MTPreceivedNotifyMessage(); const MTPDreceivedNotifyMessage &c_receivedNotifyMessage() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_receivedNotifyMessage); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPreceivedNotifyMessage(const MTPDreceivedNotifyMessage *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPReceivedNotifyMessage; class MTPexportedChatInvite : private MTP::internal::TypeDataOwner { public: MTPexportedChatInvite() { } const MTPDchatInviteExported &c_chatInviteExported() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPexportedChatInvite(mtpTypeId type); explicit MTPexportedChatInvite(const MTPDchatInviteExported *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPExportedChatInvite; class MTPchatInvite : private MTP::internal::TypeDataOwner { public: MTPchatInvite() { } const MTPDchatInviteAlready &c_chatInviteAlready() const; const MTPDchatInvite &c_chatInvite() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchatInvite(mtpTypeId type); explicit MTPchatInvite(const MTPDchatInviteAlready *data); explicit MTPchatInvite(const MTPDchatInvite *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChatInvite; class MTPinputStickerSet : private MTP::internal::TypeDataOwner { public: MTPinputStickerSet() { } const MTPDinputStickerSetID &c_inputStickerSetID() const; const MTPDinputStickerSetShortName &c_inputStickerSetShortName() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputStickerSet(mtpTypeId type); explicit MTPinputStickerSet(const MTPDinputStickerSetID *data); explicit MTPinputStickerSet(const MTPDinputStickerSetShortName *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputStickerSet; class MTPstickerSet : private MTP::internal::TypeDataOwner { public: MTPstickerSet(); const MTPDstickerSet &c_stickerSet() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_stickerSet); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPstickerSet(const MTPDstickerSet *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPStickerSet; class MTPmessages_stickerSet : private MTP::internal::TypeDataOwner { public: MTPmessages_stickerSet(); const MTPDmessages_stickerSet &c_messages_stickerSet() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_stickerSet); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_stickerSet(const MTPDmessages_stickerSet *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_StickerSet; class MTPbotCommand : private MTP::internal::TypeDataOwner { public: MTPbotCommand(); const MTPDbotCommand &c_botCommand() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_botCommand); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPbotCommand(const MTPDbotCommand *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPBotCommand; class MTPbotInfo : private MTP::internal::TypeDataOwner { public: MTPbotInfo(); const MTPDbotInfo &c_botInfo() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_botInfo); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPbotInfo(const MTPDbotInfo *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPBotInfo; class MTPkeyboardButton : private MTP::internal::TypeDataOwner { public: MTPkeyboardButton() { } const MTPDkeyboardButton &c_keyboardButton() const; const MTPDkeyboardButtonUrl &c_keyboardButtonUrl() const; const MTPDkeyboardButtonCallback &c_keyboardButtonCallback() const; const MTPDkeyboardButtonRequestPhone &c_keyboardButtonRequestPhone() const; const MTPDkeyboardButtonRequestGeoLocation &c_keyboardButtonRequestGeoLocation() const; const MTPDkeyboardButtonSwitchInline &c_keyboardButtonSwitchInline() const; const MTPDkeyboardButtonGame &c_keyboardButtonGame() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPkeyboardButton(mtpTypeId type); explicit MTPkeyboardButton(const MTPDkeyboardButton *data); explicit MTPkeyboardButton(const MTPDkeyboardButtonUrl *data); explicit MTPkeyboardButton(const MTPDkeyboardButtonCallback *data); explicit MTPkeyboardButton(const MTPDkeyboardButtonRequestPhone *data); explicit MTPkeyboardButton(const MTPDkeyboardButtonRequestGeoLocation *data); explicit MTPkeyboardButton(const MTPDkeyboardButtonSwitchInline *data); explicit MTPkeyboardButton(const MTPDkeyboardButtonGame *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPKeyboardButton; class MTPkeyboardButtonRow : private MTP::internal::TypeDataOwner { public: MTPkeyboardButtonRow(); const MTPDkeyboardButtonRow &c_keyboardButtonRow() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_keyboardButtonRow); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPkeyboardButtonRow(const MTPDkeyboardButtonRow *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPKeyboardButtonRow; class MTPreplyMarkup : private MTP::internal::TypeDataOwner { public: MTPreplyMarkup() { } const MTPDreplyKeyboardHide &c_replyKeyboardHide() const; const MTPDreplyKeyboardForceReply &c_replyKeyboardForceReply() const; const MTPDreplyKeyboardMarkup &c_replyKeyboardMarkup() const; const MTPDreplyInlineMarkup &c_replyInlineMarkup() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPreplyMarkup(mtpTypeId type); explicit MTPreplyMarkup(const MTPDreplyKeyboardHide *data); explicit MTPreplyMarkup(const MTPDreplyKeyboardForceReply *data); explicit MTPreplyMarkup(const MTPDreplyKeyboardMarkup *data); explicit MTPreplyMarkup(const MTPDreplyInlineMarkup *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPReplyMarkup; class MTPhelp_appChangelog : private MTP::internal::TypeDataOwner { public: MTPhelp_appChangelog() { } const MTPDhelp_appChangelog &c_help_appChangelog() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhelp_appChangelog(mtpTypeId type); explicit MTPhelp_appChangelog(const MTPDhelp_appChangelog *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPhelp_AppChangelog; class MTPmessageEntity : private MTP::internal::TypeDataOwner { public: MTPmessageEntity() { } const MTPDmessageEntityUnknown &c_messageEntityUnknown() const; const MTPDmessageEntityMention &c_messageEntityMention() const; const MTPDmessageEntityHashtag &c_messageEntityHashtag() const; const MTPDmessageEntityBotCommand &c_messageEntityBotCommand() const; const MTPDmessageEntityUrl &c_messageEntityUrl() const; const MTPDmessageEntityEmail &c_messageEntityEmail() const; const MTPDmessageEntityBold &c_messageEntityBold() const; const MTPDmessageEntityItalic &c_messageEntityItalic() const; const MTPDmessageEntityCode &c_messageEntityCode() const; const MTPDmessageEntityPre &c_messageEntityPre() const; const MTPDmessageEntityTextUrl &c_messageEntityTextUrl() const; const MTPDmessageEntityMentionName &c_messageEntityMentionName() const; const MTPDinputMessageEntityMentionName &c_inputMessageEntityMentionName() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessageEntity(mtpTypeId type); explicit MTPmessageEntity(const MTPDmessageEntityUnknown *data); explicit MTPmessageEntity(const MTPDmessageEntityMention *data); explicit MTPmessageEntity(const MTPDmessageEntityHashtag *data); explicit MTPmessageEntity(const MTPDmessageEntityBotCommand *data); explicit MTPmessageEntity(const MTPDmessageEntityUrl *data); explicit MTPmessageEntity(const MTPDmessageEntityEmail *data); explicit MTPmessageEntity(const MTPDmessageEntityBold *data); explicit MTPmessageEntity(const MTPDmessageEntityItalic *data); explicit MTPmessageEntity(const MTPDmessageEntityCode *data); explicit MTPmessageEntity(const MTPDmessageEntityPre *data); explicit MTPmessageEntity(const MTPDmessageEntityTextUrl *data); explicit MTPmessageEntity(const MTPDmessageEntityMentionName *data); explicit MTPmessageEntity(const MTPDinputMessageEntityMentionName *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPMessageEntity; class MTPinputChannel : private MTP::internal::TypeDataOwner { public: MTPinputChannel() { } const MTPDinputChannel &c_inputChannel() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputChannel(mtpTypeId type); explicit MTPinputChannel(const MTPDinputChannel *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputChannel; class MTPcontacts_resolvedPeer : private MTP::internal::TypeDataOwner { public: MTPcontacts_resolvedPeer(); const MTPDcontacts_resolvedPeer &c_contacts_resolvedPeer() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_resolvedPeer); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_resolvedPeer(const MTPDcontacts_resolvedPeer *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_ResolvedPeer; class MTPmessageRange : private MTP::internal::TypeDataOwner { public: MTPmessageRange(); const MTPDmessageRange &c_messageRange() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messageRange); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessageRange(const MTPDmessageRange *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMessageRange; class MTPupdates_channelDifference : private MTP::internal::TypeDataOwner { public: MTPupdates_channelDifference() { } const MTPDupdates_channelDifferenceEmpty &c_updates_channelDifferenceEmpty() const; const MTPDupdates_channelDifferenceTooLong &c_updates_channelDifferenceTooLong() const; const MTPDupdates_channelDifference &c_updates_channelDifference() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPupdates_channelDifference(mtpTypeId type); explicit MTPupdates_channelDifference(const MTPDupdates_channelDifferenceEmpty *data); explicit MTPupdates_channelDifference(const MTPDupdates_channelDifferenceTooLong *data); explicit MTPupdates_channelDifference(const MTPDupdates_channelDifference *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPupdates_ChannelDifference; class MTPchannelMessagesFilter : private MTP::internal::TypeDataOwner { public: MTPchannelMessagesFilter() { } const MTPDchannelMessagesFilter &c_channelMessagesFilter() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchannelMessagesFilter(mtpTypeId type); explicit MTPchannelMessagesFilter(const MTPDchannelMessagesFilter *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChannelMessagesFilter; class MTPchannelParticipant : private MTP::internal::TypeDataOwner { public: MTPchannelParticipant() { } const MTPDchannelParticipant &c_channelParticipant() const; const MTPDchannelParticipantSelf &c_channelParticipantSelf() const; const MTPDchannelParticipantModerator &c_channelParticipantModerator() const; const MTPDchannelParticipantEditor &c_channelParticipantEditor() const; const MTPDchannelParticipantKicked &c_channelParticipantKicked() const; const MTPDchannelParticipantCreator &c_channelParticipantCreator() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchannelParticipant(mtpTypeId type); explicit MTPchannelParticipant(const MTPDchannelParticipant *data); explicit MTPchannelParticipant(const MTPDchannelParticipantSelf *data); explicit MTPchannelParticipant(const MTPDchannelParticipantModerator *data); explicit MTPchannelParticipant(const MTPDchannelParticipantEditor *data); explicit MTPchannelParticipant(const MTPDchannelParticipantKicked *data); explicit MTPchannelParticipant(const MTPDchannelParticipantCreator *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChannelParticipant; class MTPchannelParticipantsFilter { public: MTPchannelParticipantsFilter() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchannelParticipantsFilter(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChannelParticipantsFilter; class MTPchannelParticipantRole { public: MTPchannelParticipantRole() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchannelParticipantRole(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPChannelParticipantRole; class MTPchannels_channelParticipants : private MTP::internal::TypeDataOwner { public: MTPchannels_channelParticipants(); const MTPDchannels_channelParticipants &c_channels_channelParticipants() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_channelParticipants); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchannels_channelParticipants(const MTPDchannels_channelParticipants *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPchannels_ChannelParticipants; class MTPchannels_channelParticipant : private MTP::internal::TypeDataOwner { public: MTPchannels_channelParticipant(); const MTPDchannels_channelParticipant &c_channels_channelParticipant() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_channelParticipant); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPchannels_channelParticipant(const MTPDchannels_channelParticipant *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPchannels_ChannelParticipant; class MTPhelp_termsOfService : private MTP::internal::TypeDataOwner { public: MTPhelp_termsOfService(); const MTPDhelp_termsOfService &c_help_termsOfService() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_termsOfService); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhelp_termsOfService(const MTPDhelp_termsOfService *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPhelp_TermsOfService; class MTPfoundGif : private MTP::internal::TypeDataOwner { public: MTPfoundGif() { } const MTPDfoundGif &c_foundGif() const; const MTPDfoundGifCached &c_foundGifCached() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPfoundGif(mtpTypeId type); explicit MTPfoundGif(const MTPDfoundGif *data); explicit MTPfoundGif(const MTPDfoundGifCached *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPFoundGif; class MTPmessages_foundGifs : private MTP::internal::TypeDataOwner { public: MTPmessages_foundGifs(); const MTPDmessages_foundGifs &c_messages_foundGifs() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_foundGifs); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_foundGifs(const MTPDmessages_foundGifs *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_FoundGifs; class MTPmessages_savedGifs : private MTP::internal::TypeDataOwner { public: MTPmessages_savedGifs() { } const MTPDmessages_savedGifs &c_messages_savedGifs() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_savedGifs(mtpTypeId type); explicit MTPmessages_savedGifs(const MTPDmessages_savedGifs *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_SavedGifs; class MTPinputBotInlineMessage : private MTP::internal::TypeDataOwner { public: MTPinputBotInlineMessage() { } const MTPDinputBotInlineMessageMediaAuto &c_inputBotInlineMessageMediaAuto() const; const MTPDinputBotInlineMessageText &c_inputBotInlineMessageText() const; const MTPDinputBotInlineMessageMediaGeo &c_inputBotInlineMessageMediaGeo() const; const MTPDinputBotInlineMessageMediaVenue &c_inputBotInlineMessageMediaVenue() const; const MTPDinputBotInlineMessageMediaContact &c_inputBotInlineMessageMediaContact() const; const MTPDinputBotInlineMessageGame &c_inputBotInlineMessageGame() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputBotInlineMessage(mtpTypeId type); explicit MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaAuto *data); explicit MTPinputBotInlineMessage(const MTPDinputBotInlineMessageText *data); explicit MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaGeo *data); explicit MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaVenue *data); explicit MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaContact *data); explicit MTPinputBotInlineMessage(const MTPDinputBotInlineMessageGame *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputBotInlineMessage; class MTPinputBotInlineResult : private MTP::internal::TypeDataOwner { public: MTPinputBotInlineResult() { } const MTPDinputBotInlineResult &c_inputBotInlineResult() const; const MTPDinputBotInlineResultPhoto &c_inputBotInlineResultPhoto() const; const MTPDinputBotInlineResultDocument &c_inputBotInlineResultDocument() const; const MTPDinputBotInlineResultGame &c_inputBotInlineResultGame() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputBotInlineResult(mtpTypeId type); explicit MTPinputBotInlineResult(const MTPDinputBotInlineResult *data); explicit MTPinputBotInlineResult(const MTPDinputBotInlineResultPhoto *data); explicit MTPinputBotInlineResult(const MTPDinputBotInlineResultDocument *data); explicit MTPinputBotInlineResult(const MTPDinputBotInlineResultGame *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputBotInlineResult; class MTPbotInlineMessage : private MTP::internal::TypeDataOwner { public: MTPbotInlineMessage() { } const MTPDbotInlineMessageMediaAuto &c_botInlineMessageMediaAuto() const; const MTPDbotInlineMessageText &c_botInlineMessageText() const; const MTPDbotInlineMessageMediaGeo &c_botInlineMessageMediaGeo() const; const MTPDbotInlineMessageMediaVenue &c_botInlineMessageMediaVenue() const; const MTPDbotInlineMessageMediaContact &c_botInlineMessageMediaContact() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPbotInlineMessage(mtpTypeId type); explicit MTPbotInlineMessage(const MTPDbotInlineMessageMediaAuto *data); explicit MTPbotInlineMessage(const MTPDbotInlineMessageText *data); explicit MTPbotInlineMessage(const MTPDbotInlineMessageMediaGeo *data); explicit MTPbotInlineMessage(const MTPDbotInlineMessageMediaVenue *data); explicit MTPbotInlineMessage(const MTPDbotInlineMessageMediaContact *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPBotInlineMessage; class MTPbotInlineResult : private MTP::internal::TypeDataOwner { public: MTPbotInlineResult() { } const MTPDbotInlineResult &c_botInlineResult() const; const MTPDbotInlineMediaResult &c_botInlineMediaResult() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPbotInlineResult(mtpTypeId type); explicit MTPbotInlineResult(const MTPDbotInlineResult *data); explicit MTPbotInlineResult(const MTPDbotInlineMediaResult *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPBotInlineResult; class MTPmessages_botResults : private MTP::internal::TypeDataOwner { public: MTPmessages_botResults(); const MTPDmessages_botResults &c_messages_botResults() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_botResults); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_botResults(const MTPDmessages_botResults *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_BotResults; class MTPexportedMessageLink : private MTP::internal::TypeDataOwner { public: MTPexportedMessageLink(); const MTPDexportedMessageLink &c_exportedMessageLink() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_exportedMessageLink); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPexportedMessageLink(const MTPDexportedMessageLink *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPExportedMessageLink; class MTPmessageFwdHeader : private MTP::internal::TypeDataOwner { public: MTPmessageFwdHeader(); const MTPDmessageFwdHeader &c_messageFwdHeader() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messageFwdHeader); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessageFwdHeader(const MTPDmessageFwdHeader *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMessageFwdHeader; class MTPauth_codeType { public: MTPauth_codeType() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_codeType(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPauth_CodeType; class MTPauth_sentCodeType : private MTP::internal::TypeDataOwner { public: MTPauth_sentCodeType() { } const MTPDauth_sentCodeTypeApp &c_auth_sentCodeTypeApp() const; const MTPDauth_sentCodeTypeSms &c_auth_sentCodeTypeSms() const; const MTPDauth_sentCodeTypeCall &c_auth_sentCodeTypeCall() const; const MTPDauth_sentCodeTypeFlashCall &c_auth_sentCodeTypeFlashCall() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPauth_sentCodeType(mtpTypeId type); explicit MTPauth_sentCodeType(const MTPDauth_sentCodeTypeApp *data); explicit MTPauth_sentCodeType(const MTPDauth_sentCodeTypeSms *data); explicit MTPauth_sentCodeType(const MTPDauth_sentCodeTypeCall *data); explicit MTPauth_sentCodeType(const MTPDauth_sentCodeTypeFlashCall *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPauth_SentCodeType; class MTPmessages_botCallbackAnswer : private MTP::internal::TypeDataOwner { public: MTPmessages_botCallbackAnswer(); const MTPDmessages_botCallbackAnswer &c_messages_botCallbackAnswer() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_botCallbackAnswer); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_botCallbackAnswer(const MTPDmessages_botCallbackAnswer *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_BotCallbackAnswer; class MTPmessages_messageEditData : private MTP::internal::TypeDataOwner { public: MTPmessages_messageEditData(); const MTPDmessages_messageEditData &c_messages_messageEditData() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_messageEditData); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_messageEditData(const MTPDmessages_messageEditData *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_MessageEditData; class MTPinputBotInlineMessageID : private MTP::internal::TypeDataOwner { public: MTPinputBotInlineMessageID(); const MTPDinputBotInlineMessageID &c_inputBotInlineMessageID() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputBotInlineMessageID); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputBotInlineMessageID(const MTPDinputBotInlineMessageID *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputBotInlineMessageID; class MTPinlineBotSwitchPM : private MTP::internal::TypeDataOwner { public: MTPinlineBotSwitchPM(); const MTPDinlineBotSwitchPM &c_inlineBotSwitchPM() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inlineBotSwitchPM); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinlineBotSwitchPM(const MTPDinlineBotSwitchPM *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInlineBotSwitchPM; class MTPmessages_peerDialogs : private MTP::internal::TypeDataOwner { public: MTPmessages_peerDialogs(); const MTPDmessages_peerDialogs &c_messages_peerDialogs() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_peerDialogs); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_peerDialogs(const MTPDmessages_peerDialogs *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_PeerDialogs; class MTPtopPeer : private MTP::internal::TypeDataOwner { public: MTPtopPeer(); const MTPDtopPeer &c_topPeer() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_topPeer); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPtopPeer(const MTPDtopPeer *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPTopPeer; class MTPtopPeerCategory { public: MTPtopPeerCategory() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPtopPeerCategory(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPTopPeerCategory; class MTPtopPeerCategoryPeers : private MTP::internal::TypeDataOwner { public: MTPtopPeerCategoryPeers(); const MTPDtopPeerCategoryPeers &c_topPeerCategoryPeers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_topPeerCategoryPeers); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPtopPeerCategoryPeers(const MTPDtopPeerCategoryPeers *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPTopPeerCategoryPeers; class MTPcontacts_topPeers : private MTP::internal::TypeDataOwner { public: MTPcontacts_topPeers() { } const MTPDcontacts_topPeers &c_contacts_topPeers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPcontacts_topPeers(mtpTypeId type); explicit MTPcontacts_topPeers(const MTPDcontacts_topPeers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPcontacts_TopPeers; class MTPdraftMessage : private MTP::internal::TypeDataOwner { public: MTPdraftMessage() { } const MTPDdraftMessage &c_draftMessage() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPdraftMessage(mtpTypeId type); explicit MTPdraftMessage(const MTPDdraftMessage *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPDraftMessage; class MTPmessages_featuredStickers : private MTP::internal::TypeDataOwner { public: MTPmessages_featuredStickers() { } const MTPDmessages_featuredStickers &c_messages_featuredStickers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_featuredStickers(mtpTypeId type); explicit MTPmessages_featuredStickers(const MTPDmessages_featuredStickers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_FeaturedStickers; class MTPmessages_recentStickers : private MTP::internal::TypeDataOwner { public: MTPmessages_recentStickers() { } const MTPDmessages_recentStickers &c_messages_recentStickers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_recentStickers(mtpTypeId type); explicit MTPmessages_recentStickers(const MTPDmessages_recentStickers *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_RecentStickers; class MTPmessages_archivedStickers : private MTP::internal::TypeDataOwner { public: MTPmessages_archivedStickers(); const MTPDmessages_archivedStickers &c_messages_archivedStickers() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_archivedStickers); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_archivedStickers(const MTPDmessages_archivedStickers *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_ArchivedStickers; class MTPmessages_stickerSetInstallResult : private MTP::internal::TypeDataOwner { public: MTPmessages_stickerSetInstallResult() { } const MTPDmessages_stickerSetInstallResultArchive &c_messages_stickerSetInstallResultArchive() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_stickerSetInstallResult(mtpTypeId type); explicit MTPmessages_stickerSetInstallResult(const MTPDmessages_stickerSetInstallResultArchive *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPmessages_StickerSetInstallResult; class MTPstickerSetCovered : private MTP::internal::TypeDataOwner { public: MTPstickerSetCovered() { } const MTPDstickerSetCovered &c_stickerSetCovered() const; const MTPDstickerSetMultiCovered &c_stickerSetMultiCovered() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPstickerSetCovered(mtpTypeId type); explicit MTPstickerSetCovered(const MTPDstickerSetCovered *data); explicit MTPstickerSetCovered(const MTPDstickerSetMultiCovered *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPStickerSetCovered; class MTPmaskCoords : private MTP::internal::TypeDataOwner { public: MTPmaskCoords(); const MTPDmaskCoords &c_maskCoords() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_maskCoords); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmaskCoords(const MTPDmaskCoords *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMaskCoords; class MTPinputStickeredMedia : private MTP::internal::TypeDataOwner { public: MTPinputStickeredMedia() { } const MTPDinputStickeredMediaPhoto &c_inputStickeredMediaPhoto() const; const MTPDinputStickeredMediaDocument &c_inputStickeredMediaDocument() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputStickeredMedia(mtpTypeId type); explicit MTPinputStickeredMedia(const MTPDinputStickeredMediaPhoto *data); explicit MTPinputStickeredMedia(const MTPDinputStickeredMediaDocument *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputStickeredMedia; class MTPgame : private MTP::internal::TypeDataOwner { public: MTPgame(); const MTPDgame &c_game() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_game); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPgame(const MTPDgame *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPGame; class MTPinputGame : private MTP::internal::TypeDataOwner { public: MTPinputGame() { } const MTPDinputGameID &c_inputGameID() const; const MTPDinputGameShortName &c_inputGameShortName() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputGame(mtpTypeId type); explicit MTPinputGame(const MTPDinputGameID *data); explicit MTPinputGame(const MTPDinputGameShortName *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPInputGame; class MTPhighScore : private MTP::internal::TypeDataOwner { public: MTPhighScore(); const MTPDhighScore &c_highScore() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_highScore); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPhighScore(const MTPDhighScore *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPHighScore; class MTPmessages_highScores : private MTP::internal::TypeDataOwner { public: MTPmessages_highScores(); const MTPDmessages_highScores &c_messages_highScores() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_highScores); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_highScores(const MTPDmessages_highScores *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_HighScores; class MTPrichText : private MTP::internal::TypeDataOwner { public: MTPrichText() { } const MTPDtextPlain &c_textPlain() const; const MTPDtextBold &c_textBold() const; const MTPDtextItalic &c_textItalic() const; const MTPDtextUnderline &c_textUnderline() const; const MTPDtextStrike &c_textStrike() const; const MTPDtextFixed &c_textFixed() const; const MTPDtextUrl &c_textUrl() const; const MTPDtextEmail &c_textEmail() const; const MTPDtextConcat &c_textConcat() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPrichText(mtpTypeId type); explicit MTPrichText(const MTPDtextPlain *data); explicit MTPrichText(const MTPDtextBold *data); explicit MTPrichText(const MTPDtextItalic *data); explicit MTPrichText(const MTPDtextUnderline *data); explicit MTPrichText(const MTPDtextStrike *data); explicit MTPrichText(const MTPDtextFixed *data); explicit MTPrichText(const MTPDtextUrl *data); explicit MTPrichText(const MTPDtextEmail *data); explicit MTPrichText(const MTPDtextConcat *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPRichText; class MTPpageBlock : private MTP::internal::TypeDataOwner { public: MTPpageBlock() { } const MTPDpageBlockTitle &c_pageBlockTitle() const; const MTPDpageBlockSubtitle &c_pageBlockSubtitle() const; const MTPDpageBlockAuthorDate &c_pageBlockAuthorDate() const; const MTPDpageBlockHeader &c_pageBlockHeader() const; const MTPDpageBlockSubheader &c_pageBlockSubheader() const; const MTPDpageBlockParagraph &c_pageBlockParagraph() const; const MTPDpageBlockPreformatted &c_pageBlockPreformatted() const; const MTPDpageBlockFooter &c_pageBlockFooter() const; const MTPDpageBlockAnchor &c_pageBlockAnchor() const; const MTPDpageBlockList &c_pageBlockList() const; const MTPDpageBlockBlockquote &c_pageBlockBlockquote() const; const MTPDpageBlockPullquote &c_pageBlockPullquote() const; const MTPDpageBlockPhoto &c_pageBlockPhoto() const; const MTPDpageBlockVideo &c_pageBlockVideo() const; const MTPDpageBlockCover &c_pageBlockCover() const; const MTPDpageBlockEmbed &c_pageBlockEmbed() const; const MTPDpageBlockEmbedPost &c_pageBlockEmbedPost() const; const MTPDpageBlockCollage &c_pageBlockCollage() const; const MTPDpageBlockSlideshow &c_pageBlockSlideshow() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpageBlock(mtpTypeId type); explicit MTPpageBlock(const MTPDpageBlockTitle *data); explicit MTPpageBlock(const MTPDpageBlockSubtitle *data); explicit MTPpageBlock(const MTPDpageBlockAuthorDate *data); explicit MTPpageBlock(const MTPDpageBlockHeader *data); explicit MTPpageBlock(const MTPDpageBlockSubheader *data); explicit MTPpageBlock(const MTPDpageBlockParagraph *data); explicit MTPpageBlock(const MTPDpageBlockPreformatted *data); explicit MTPpageBlock(const MTPDpageBlockFooter *data); explicit MTPpageBlock(const MTPDpageBlockAnchor *data); explicit MTPpageBlock(const MTPDpageBlockList *data); explicit MTPpageBlock(const MTPDpageBlockBlockquote *data); explicit MTPpageBlock(const MTPDpageBlockPullquote *data); explicit MTPpageBlock(const MTPDpageBlockPhoto *data); explicit MTPpageBlock(const MTPDpageBlockVideo *data); explicit MTPpageBlock(const MTPDpageBlockCover *data); explicit MTPpageBlock(const MTPDpageBlockEmbed *data); explicit MTPpageBlock(const MTPDpageBlockEmbedPost *data); explicit MTPpageBlock(const MTPDpageBlockCollage *data); explicit MTPpageBlock(const MTPDpageBlockSlideshow *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPageBlock; class MTPpage : private MTP::internal::TypeDataOwner { public: MTPpage() { } const MTPDpagePart &c_pagePart() const; const MTPDpageFull &c_pageFull() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPpage(mtpTypeId type); explicit MTPpage(const MTPDpagePart *data); explicit MTPpage(const MTPDpageFull *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPage; class MTPinputPhoneCall : private MTP::internal::TypeDataOwner { public: MTPinputPhoneCall(); const MTPDinputPhoneCall &c_inputPhoneCall() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPhoneCall); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPinputPhoneCall(const MTPDinputPhoneCall *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputPhoneCall; class MTPphoneCall : private MTP::internal::TypeDataOwner { public: MTPphoneCall() { } const MTPDphoneCallEmpty &c_phoneCallEmpty() const; const MTPDphoneCallWaiting &c_phoneCallWaiting() const; const MTPDphoneCallRequested &c_phoneCallRequested() const; const MTPDphoneCall &c_phoneCall() const; const MTPDphoneCallDiscarded &c_phoneCallDiscarded() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphoneCall(mtpTypeId type); explicit MTPphoneCall(const MTPDphoneCallEmpty *data); explicit MTPphoneCall(const MTPDphoneCallWaiting *data); explicit MTPphoneCall(const MTPDphoneCallRequested *data); explicit MTPphoneCall(const MTPDphoneCall *data); explicit MTPphoneCall(const MTPDphoneCallDiscarded *data); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPhoneCall; class MTPphoneConnection : private MTP::internal::TypeDataOwner { public: MTPphoneConnection(); const MTPDphoneConnection &c_phoneConnection() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phoneConnection); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphoneConnection(const MTPDphoneConnection *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPPhoneConnection; class MTPphoneCallProtocol : private MTP::internal::TypeDataOwner { public: MTPphoneCallProtocol(); const MTPDphoneCallProtocol &c_phoneCallProtocol() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phoneCallProtocol); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphoneCallProtocol(const MTPDphoneCallProtocol *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPPhoneCallProtocol; class MTPphone_phoneCall : private MTP::internal::TypeDataOwner { public: MTPphone_phoneCall(); const MTPDphone_phoneCall &c_phone_phoneCall() const; uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phone_phoneCall); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphone_phoneCall(const MTPDphone_phoneCall *data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPphone_PhoneCall; class MTPphoneCallDiscardReason { public: MTPphoneCallDiscardReason() { } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPphoneCallDiscardReason(mtpTypeId type); friend class MTP::internal::TypeCreator; mtpTypeId _type = 0; }; typedef MTPBoxed MTPPhoneCallDiscardReason; // Type constructors with data class MTPDresPQ : public MTP::internal::TypeData { public: MTPDresPQ() = default; MTPDresPQ(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_pq, const MTPVector &_server_public_key_fingerprints) : vnonce(_nonce), vserver_nonce(_server_nonce), vpq(_pq), vserver_public_key_fingerprints(_server_public_key_fingerprints) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPstring vpq; MTPVector vserver_public_key_fingerprints; }; class MTPDp_q_inner_data : public MTP::internal::TypeData { public: MTPDp_q_inner_data() = default; MTPDp_q_inner_data(const MTPstring &_pq, const MTPstring &_p, const MTPstring &_q, const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint256 &_new_nonce) : vpq(_pq), vp(_p), vq(_q), vnonce(_nonce), vserver_nonce(_server_nonce), vnew_nonce(_new_nonce) { } MTPstring vpq; MTPstring vp; MTPstring vq; MTPint128 vnonce; MTPint128 vserver_nonce; MTPint256 vnew_nonce; }; class MTPDserver_DH_params_fail : public MTP::internal::TypeData { public: MTPDserver_DH_params_fail() = default; MTPDserver_DH_params_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash) : vnonce(_nonce), vserver_nonce(_server_nonce), vnew_nonce_hash(_new_nonce_hash) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPint128 vnew_nonce_hash; }; class MTPDserver_DH_params_ok : public MTP::internal::TypeData { public: MTPDserver_DH_params_ok() = default; MTPDserver_DH_params_ok(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_encrypted_answer) : vnonce(_nonce), vserver_nonce(_server_nonce), vencrypted_answer(_encrypted_answer) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPstring vencrypted_answer; }; class MTPDserver_DH_inner_data : public MTP::internal::TypeData { public: MTPDserver_DH_inner_data() = default; MTPDserver_DH_inner_data(const MTPint128 &_nonce, const MTPint128 &_server_nonce, MTPint _g, const MTPstring &_dh_prime, const MTPstring &_g_a, MTPint _server_time) : vnonce(_nonce), vserver_nonce(_server_nonce), vg(_g), vdh_prime(_dh_prime), vg_a(_g_a), vserver_time(_server_time) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPint vg; MTPstring vdh_prime; MTPstring vg_a; MTPint vserver_time; }; class MTPDclient_DH_inner_data : public MTP::internal::TypeData { public: MTPDclient_DH_inner_data() = default; MTPDclient_DH_inner_data(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPlong &_retry_id, const MTPstring &_g_b) : vnonce(_nonce), vserver_nonce(_server_nonce), vretry_id(_retry_id), vg_b(_g_b) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPlong vretry_id; MTPstring vg_b; }; class MTPDdh_gen_ok : public MTP::internal::TypeData { public: MTPDdh_gen_ok() = default; MTPDdh_gen_ok(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash1) : vnonce(_nonce), vserver_nonce(_server_nonce), vnew_nonce_hash1(_new_nonce_hash1) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPint128 vnew_nonce_hash1; }; class MTPDdh_gen_retry : public MTP::internal::TypeData { public: MTPDdh_gen_retry() = default; MTPDdh_gen_retry(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash2) : vnonce(_nonce), vserver_nonce(_server_nonce), vnew_nonce_hash2(_new_nonce_hash2) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPint128 vnew_nonce_hash2; }; class MTPDdh_gen_fail : public MTP::internal::TypeData { public: MTPDdh_gen_fail() = default; MTPDdh_gen_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash3) : vnonce(_nonce), vserver_nonce(_server_nonce), vnew_nonce_hash3(_new_nonce_hash3) { } MTPint128 vnonce; MTPint128 vserver_nonce; MTPint128 vnew_nonce_hash3; }; class MTPDmsgs_ack : public MTP::internal::TypeData { public: MTPDmsgs_ack() = default; MTPDmsgs_ack(const MTPVector &_msg_ids) : vmsg_ids(_msg_ids) { } MTPVector vmsg_ids; }; class MTPDbad_msg_notification : public MTP::internal::TypeData { public: MTPDbad_msg_notification() = default; MTPDbad_msg_notification(const MTPlong &_bad_msg_id, MTPint _bad_msg_seqno, MTPint _error_code) : vbad_msg_id(_bad_msg_id), vbad_msg_seqno(_bad_msg_seqno), verror_code(_error_code) { } MTPlong vbad_msg_id; MTPint vbad_msg_seqno; MTPint verror_code; }; class MTPDbad_server_salt : public MTP::internal::TypeData { public: MTPDbad_server_salt() = default; MTPDbad_server_salt(const MTPlong &_bad_msg_id, MTPint _bad_msg_seqno, MTPint _error_code, const MTPlong &_new_server_salt) : vbad_msg_id(_bad_msg_id), vbad_msg_seqno(_bad_msg_seqno), verror_code(_error_code), vnew_server_salt(_new_server_salt) { } MTPlong vbad_msg_id; MTPint vbad_msg_seqno; MTPint verror_code; MTPlong vnew_server_salt; }; class MTPDmsgs_state_req : public MTP::internal::TypeData { public: MTPDmsgs_state_req() = default; MTPDmsgs_state_req(const MTPVector &_msg_ids) : vmsg_ids(_msg_ids) { } MTPVector vmsg_ids; }; class MTPDmsgs_state_info : public MTP::internal::TypeData { public: MTPDmsgs_state_info() = default; MTPDmsgs_state_info(const MTPlong &_req_msg_id, const MTPstring &_info) : vreq_msg_id(_req_msg_id), vinfo(_info) { } MTPlong vreq_msg_id; MTPstring vinfo; }; class MTPDmsgs_all_info : public MTP::internal::TypeData { public: MTPDmsgs_all_info() = default; MTPDmsgs_all_info(const MTPVector &_msg_ids, const MTPstring &_info) : vmsg_ids(_msg_ids), vinfo(_info) { } MTPVector vmsg_ids; MTPstring vinfo; }; class MTPDmsg_detailed_info : public MTP::internal::TypeData { public: MTPDmsg_detailed_info() = default; MTPDmsg_detailed_info(const MTPlong &_msg_id, const MTPlong &_answer_msg_id, MTPint _bytes, MTPint _status) : vmsg_id(_msg_id), vanswer_msg_id(_answer_msg_id), vbytes(_bytes), vstatus(_status) { } MTPlong vmsg_id; MTPlong vanswer_msg_id; MTPint vbytes; MTPint vstatus; }; class MTPDmsg_new_detailed_info : public MTP::internal::TypeData { public: MTPDmsg_new_detailed_info() = default; MTPDmsg_new_detailed_info(const MTPlong &_answer_msg_id, MTPint _bytes, MTPint _status) : vanswer_msg_id(_answer_msg_id), vbytes(_bytes), vstatus(_status) { } MTPlong vanswer_msg_id; MTPint vbytes; MTPint vstatus; }; class MTPDmsg_resend_req : public MTP::internal::TypeData { public: MTPDmsg_resend_req() = default; MTPDmsg_resend_req(const MTPVector &_msg_ids) : vmsg_ids(_msg_ids) { } MTPVector vmsg_ids; }; class MTPDrpc_error : public MTP::internal::TypeData { public: MTPDrpc_error() = default; MTPDrpc_error(MTPint _error_code, const MTPstring &_error_message) : verror_code(_error_code), verror_message(_error_message) { } MTPint verror_code; MTPstring verror_message; }; class MTPDrpc_answer_dropped : public MTP::internal::TypeData { public: MTPDrpc_answer_dropped() = default; MTPDrpc_answer_dropped(const MTPlong &_msg_id, MTPint _seq_no, MTPint _bytes) : vmsg_id(_msg_id), vseq_no(_seq_no), vbytes(_bytes) { } MTPlong vmsg_id; MTPint vseq_no; MTPint vbytes; }; class MTPDfuture_salt : public MTP::internal::TypeData { public: MTPDfuture_salt() = default; MTPDfuture_salt(MTPint _valid_since, MTPint _valid_until, const MTPlong &_salt) : vvalid_since(_valid_since), vvalid_until(_valid_until), vsalt(_salt) { } MTPint vvalid_since; MTPint vvalid_until; MTPlong vsalt; }; class MTPDfuture_salts : public MTP::internal::TypeData { public: MTPDfuture_salts() = default; MTPDfuture_salts(const MTPlong &_req_msg_id, MTPint _now, const MTPvector &_salts) : vreq_msg_id(_req_msg_id), vnow(_now), vsalts(_salts) { } MTPlong vreq_msg_id; MTPint vnow; MTPvector vsalts; }; class MTPDpong : public MTP::internal::TypeData { public: MTPDpong() = default; MTPDpong(const MTPlong &_msg_id, const MTPlong &_ping_id) : vmsg_id(_msg_id), vping_id(_ping_id) { } MTPlong vmsg_id; MTPlong vping_id; }; class MTPDdestroy_session_ok : public MTP::internal::TypeData { public: MTPDdestroy_session_ok() = default; MTPDdestroy_session_ok(const MTPlong &_session_id) : vsession_id(_session_id) { } MTPlong vsession_id; }; class MTPDdestroy_session_none : public MTP::internal::TypeData { public: MTPDdestroy_session_none() = default; MTPDdestroy_session_none(const MTPlong &_session_id) : vsession_id(_session_id) { } MTPlong vsession_id; }; class MTPDnew_session_created : public MTP::internal::TypeData { public: MTPDnew_session_created() = default; MTPDnew_session_created(const MTPlong &_first_msg_id, const MTPlong &_unique_id, const MTPlong &_server_salt) : vfirst_msg_id(_first_msg_id), vunique_id(_unique_id), vserver_salt(_server_salt) { } MTPlong vfirst_msg_id; MTPlong vunique_id; MTPlong vserver_salt; }; class MTPDhttp_wait : public MTP::internal::TypeData { public: MTPDhttp_wait() = default; MTPDhttp_wait(MTPint _max_delay, MTPint _wait_after, MTPint _max_wait) : vmax_delay(_max_delay), vwait_after(_wait_after), vmax_wait(_max_wait) { } MTPint vmax_delay; MTPint vwait_after; MTPint vmax_wait; }; class MTPDerror : public MTP::internal::TypeData { public: MTPDerror() = default; MTPDerror(MTPint _code, const MTPstring &_text) : vcode(_code), vtext(_text) { } MTPint vcode; MTPstring vtext; }; class MTPDinputPeerChat : public MTP::internal::TypeData { public: MTPDinputPeerChat() = default; MTPDinputPeerChat(MTPint _chat_id) : vchat_id(_chat_id) { } MTPint vchat_id; }; class MTPDinputPeerUser : public MTP::internal::TypeData { public: MTPDinputPeerUser() = default; MTPDinputPeerUser(MTPint _user_id, const MTPlong &_access_hash) : vuser_id(_user_id), vaccess_hash(_access_hash) { } MTPint vuser_id; MTPlong vaccess_hash; }; class MTPDinputPeerChannel : public MTP::internal::TypeData { public: MTPDinputPeerChannel() = default; MTPDinputPeerChannel(MTPint _channel_id, const MTPlong &_access_hash) : vchannel_id(_channel_id), vaccess_hash(_access_hash) { } MTPint vchannel_id; MTPlong vaccess_hash; }; class MTPDinputUser : public MTP::internal::TypeData { public: MTPDinputUser() = default; MTPDinputUser(MTPint _user_id, const MTPlong &_access_hash) : vuser_id(_user_id), vaccess_hash(_access_hash) { } MTPint vuser_id; MTPlong vaccess_hash; }; class MTPDinputPhoneContact : public MTP::internal::TypeData { public: MTPDinputPhoneContact() = default; MTPDinputPhoneContact(const MTPlong &_client_id, const MTPstring &_phone, const MTPstring &_first_name, const MTPstring &_last_name) : vclient_id(_client_id), vphone(_phone), vfirst_name(_first_name), vlast_name(_last_name) { } MTPlong vclient_id; MTPstring vphone; MTPstring vfirst_name; MTPstring vlast_name; }; class MTPDinputFile : public MTP::internal::TypeData { public: MTPDinputFile() = default; MTPDinputFile(const MTPlong &_id, MTPint _parts, const MTPstring &_name, const MTPstring &_md5_checksum) : vid(_id), vparts(_parts), vname(_name), vmd5_checksum(_md5_checksum) { } MTPlong vid; MTPint vparts; MTPstring vname; MTPstring vmd5_checksum; }; class MTPDinputFileBig : public MTP::internal::TypeData { public: MTPDinputFileBig() = default; MTPDinputFileBig(const MTPlong &_id, MTPint _parts, const MTPstring &_name) : vid(_id), vparts(_parts), vname(_name) { } MTPlong vid; MTPint vparts; MTPstring vname; }; class MTPDinputMediaUploadedPhoto : public MTP::internal::TypeData { public: enum class Flag : int32 { f_stickers = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_stickers() const { return vflags.v & Flag::f_stickers; } MTPDinputMediaUploadedPhoto() = default; MTPDinputMediaUploadedPhoto(const MTPflags &_flags, const MTPInputFile &_file, const MTPstring &_caption, const MTPVector &_stickers) : vflags(_flags), vfile(_file), vcaption(_caption), vstickers(_stickers) { } MTPflags vflags; MTPInputFile vfile; MTPstring vcaption; MTPVector vstickers; }; class MTPDinputMediaPhoto : public MTP::internal::TypeData { public: MTPDinputMediaPhoto() = default; MTPDinputMediaPhoto(const MTPInputPhoto &_id, const MTPstring &_caption) : vid(_id), vcaption(_caption) { } MTPInputPhoto vid; MTPstring vcaption; }; class MTPDinputMediaGeoPoint : public MTP::internal::TypeData { public: MTPDinputMediaGeoPoint() = default; MTPDinputMediaGeoPoint(const MTPInputGeoPoint &_geo_point) : vgeo_point(_geo_point) { } MTPInputGeoPoint vgeo_point; }; class MTPDinputMediaContact : public MTP::internal::TypeData { public: MTPDinputMediaContact() = default; MTPDinputMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name) : vphone_number(_phone_number), vfirst_name(_first_name), vlast_name(_last_name) { } MTPstring vphone_number; MTPstring vfirst_name; MTPstring vlast_name; }; class MTPDinputMediaUploadedDocument : public MTP::internal::TypeData { public: enum class Flag : int32 { f_stickers = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_stickers() const { return vflags.v & Flag::f_stickers; } MTPDinputMediaUploadedDocument() = default; MTPDinputMediaUploadedDocument(const MTPflags &_flags, const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption, const MTPVector &_stickers) : vflags(_flags), vfile(_file), vmime_type(_mime_type), vattributes(_attributes), vcaption(_caption), vstickers(_stickers) { } MTPflags vflags; MTPInputFile vfile; MTPstring vmime_type; MTPVector vattributes; MTPstring vcaption; MTPVector vstickers; }; class MTPDinputMediaUploadedThumbDocument : public MTP::internal::TypeData { public: enum class Flag : int32 { f_stickers = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_stickers() const { return vflags.v & Flag::f_stickers; } MTPDinputMediaUploadedThumbDocument() = default; MTPDinputMediaUploadedThumbDocument(const MTPflags &_flags, const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption, const MTPVector &_stickers) : vflags(_flags), vfile(_file), vthumb(_thumb), vmime_type(_mime_type), vattributes(_attributes), vcaption(_caption), vstickers(_stickers) { } MTPflags vflags; MTPInputFile vfile; MTPInputFile vthumb; MTPstring vmime_type; MTPVector vattributes; MTPstring vcaption; MTPVector vstickers; }; class MTPDinputMediaDocument : public MTP::internal::TypeData { public: MTPDinputMediaDocument() = default; MTPDinputMediaDocument(const MTPInputDocument &_id, const MTPstring &_caption) : vid(_id), vcaption(_caption) { } MTPInputDocument vid; MTPstring vcaption; }; class MTPDinputMediaVenue : public MTP::internal::TypeData { public: MTPDinputMediaVenue() = default; MTPDinputMediaVenue(const MTPInputGeoPoint &_geo_point, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id) : vgeo_point(_geo_point), vtitle(_title), vaddress(_address), vprovider(_provider), vvenue_id(_venue_id) { } MTPInputGeoPoint vgeo_point; MTPstring vtitle; MTPstring vaddress; MTPstring vprovider; MTPstring vvenue_id; }; class MTPDinputMediaGifExternal : public MTP::internal::TypeData { public: MTPDinputMediaGifExternal() = default; MTPDinputMediaGifExternal(const MTPstring &_url, const MTPstring &_q) : vurl(_url), vq(_q) { } MTPstring vurl; MTPstring vq; }; class MTPDinputMediaPhotoExternal : public MTP::internal::TypeData { public: MTPDinputMediaPhotoExternal() = default; MTPDinputMediaPhotoExternal(const MTPstring &_url, const MTPstring &_caption) : vurl(_url), vcaption(_caption) { } MTPstring vurl; MTPstring vcaption; }; class MTPDinputMediaDocumentExternal : public MTP::internal::TypeData { public: MTPDinputMediaDocumentExternal() = default; MTPDinputMediaDocumentExternal(const MTPstring &_url, const MTPstring &_caption) : vurl(_url), vcaption(_caption) { } MTPstring vurl; MTPstring vcaption; }; class MTPDinputMediaGame : public MTP::internal::TypeData { public: MTPDinputMediaGame() = default; MTPDinputMediaGame(const MTPInputGame &_id) : vid(_id) { } MTPInputGame vid; }; class MTPDinputChatUploadedPhoto : public MTP::internal::TypeData { public: MTPDinputChatUploadedPhoto() = default; MTPDinputChatUploadedPhoto(const MTPInputFile &_file) : vfile(_file) { } MTPInputFile vfile; }; class MTPDinputChatPhoto : public MTP::internal::TypeData { public: MTPDinputChatPhoto() = default; MTPDinputChatPhoto(const MTPInputPhoto &_id) : vid(_id) { } MTPInputPhoto vid; }; class MTPDinputGeoPoint : public MTP::internal::TypeData { public: MTPDinputGeoPoint() = default; MTPDinputGeoPoint(const MTPdouble &_lat, const MTPdouble &_long) : vlat(_lat), vlong(_long) { } MTPdouble vlat; MTPdouble vlong; }; class MTPDinputPhoto : public MTP::internal::TypeData { public: MTPDinputPhoto() = default; MTPDinputPhoto(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputFileLocation : public MTP::internal::TypeData { public: MTPDinputFileLocation() = default; MTPDinputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) : vvolume_id(_volume_id), vlocal_id(_local_id), vsecret(_secret) { } MTPlong vvolume_id; MTPint vlocal_id; MTPlong vsecret; }; class MTPDinputEncryptedFileLocation : public MTP::internal::TypeData { public: MTPDinputEncryptedFileLocation() = default; MTPDinputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputDocumentFileLocation : public MTP::internal::TypeData { public: MTPDinputDocumentFileLocation() = default; MTPDinputDocumentFileLocation(const MTPlong &_id, const MTPlong &_access_hash, MTPint _version) : vid(_id), vaccess_hash(_access_hash), vversion(_version) { } MTPlong vid; MTPlong vaccess_hash; MTPint vversion; }; class MTPDinputAppEvent : public MTP::internal::TypeData { public: MTPDinputAppEvent() = default; MTPDinputAppEvent(const MTPdouble &_time, const MTPstring &_type, const MTPlong &_peer, const MTPstring &_data) : vtime(_time), vtype(_type), vpeer(_peer), vdata(_data) { } MTPdouble vtime; MTPstring vtype; MTPlong vpeer; MTPstring vdata; }; class MTPDpeerUser : public MTP::internal::TypeData { public: MTPDpeerUser() = default; MTPDpeerUser(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDpeerChat : public MTP::internal::TypeData { public: MTPDpeerChat() = default; MTPDpeerChat(MTPint _chat_id) : vchat_id(_chat_id) { } MTPint vchat_id; }; class MTPDpeerChannel : public MTP::internal::TypeData { public: MTPDpeerChannel() = default; MTPDpeerChannel(MTPint _channel_id) : vchannel_id(_channel_id) { } MTPint vchannel_id; }; class MTPDfileLocationUnavailable : public MTP::internal::TypeData { public: MTPDfileLocationUnavailable() = default; MTPDfileLocationUnavailable(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) : vvolume_id(_volume_id), vlocal_id(_local_id), vsecret(_secret) { } MTPlong vvolume_id; MTPint vlocal_id; MTPlong vsecret; }; class MTPDfileLocation : public MTP::internal::TypeData { public: MTPDfileLocation() = default; MTPDfileLocation(MTPint _dc_id, const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) : vdc_id(_dc_id), vvolume_id(_volume_id), vlocal_id(_local_id), vsecret(_secret) { } MTPint vdc_id; MTPlong vvolume_id; MTPint vlocal_id; MTPlong vsecret; }; class MTPDuserEmpty : public MTP::internal::TypeData { public: MTPDuserEmpty() = default; MTPDuserEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDuser : public MTP::internal::TypeData { public: enum class Flag : int32 { f_self = (1 << 10), f_contact = (1 << 11), f_mutual_contact = (1 << 12), f_deleted = (1 << 13), f_bot = (1 << 14), f_bot_chat_history = (1 << 15), f_bot_nochats = (1 << 16), f_verified = (1 << 17), f_restricted = (1 << 18), f_min = (1 << 20), f_bot_inline_geo = (1 << 21), f_access_hash = (1 << 0), f_first_name = (1 << 1), f_last_name = (1 << 2), f_username = (1 << 3), f_phone = (1 << 4), f_photo = (1 << 5), f_status = (1 << 6), f_bot_info_version = (1 << 14), f_restriction_reason = (1 << 18), f_bot_inline_placeholder = (1 << 19), MAX_FIELD = (1 << 21), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_self() const { return vflags.v & Flag::f_self; } bool is_contact() const { return vflags.v & Flag::f_contact; } bool is_mutual_contact() const { return vflags.v & Flag::f_mutual_contact; } bool is_deleted() const { return vflags.v & Flag::f_deleted; } bool is_bot() const { return vflags.v & Flag::f_bot; } bool is_bot_chat_history() const { return vflags.v & Flag::f_bot_chat_history; } bool is_bot_nochats() const { return vflags.v & Flag::f_bot_nochats; } bool is_verified() const { return vflags.v & Flag::f_verified; } bool is_restricted() const { return vflags.v & Flag::f_restricted; } bool is_min() const { return vflags.v & Flag::f_min; } bool is_bot_inline_geo() const { return vflags.v & Flag::f_bot_inline_geo; } bool has_access_hash() const { return vflags.v & Flag::f_access_hash; } bool has_first_name() const { return vflags.v & Flag::f_first_name; } bool has_last_name() const { return vflags.v & Flag::f_last_name; } bool has_username() const { return vflags.v & Flag::f_username; } bool has_phone() const { return vflags.v & Flag::f_phone; } bool has_photo() const { return vflags.v & Flag::f_photo; } bool has_status() const { return vflags.v & Flag::f_status; } bool has_bot_info_version() const { return vflags.v & Flag::f_bot_info_version; } bool has_restriction_reason() const { return vflags.v & Flag::f_restriction_reason; } bool has_bot_inline_placeholder() const { return vflags.v & Flag::f_bot_inline_placeholder; } MTPDuser() = default; MTPDuser(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_username, const MTPstring &_phone, const MTPUserProfilePhoto &_photo, const MTPUserStatus &_status, MTPint _bot_info_version, const MTPstring &_restriction_reason, const MTPstring &_bot_inline_placeholder) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vfirst_name(_first_name), vlast_name(_last_name), vusername(_username), vphone(_phone), vphoto(_photo), vstatus(_status), vbot_info_version(_bot_info_version), vrestriction_reason(_restriction_reason), vbot_inline_placeholder(_bot_inline_placeholder) { } MTPflags vflags; MTPint vid; MTPlong vaccess_hash; MTPstring vfirst_name; MTPstring vlast_name; MTPstring vusername; MTPstring vphone; MTPUserProfilePhoto vphoto; MTPUserStatus vstatus; MTPint vbot_info_version; MTPstring vrestriction_reason; MTPstring vbot_inline_placeholder; }; class MTPDuserProfilePhoto : public MTP::internal::TypeData { public: MTPDuserProfilePhoto() = default; MTPDuserProfilePhoto(const MTPlong &_photo_id, const MTPFileLocation &_photo_small, const MTPFileLocation &_photo_big) : vphoto_id(_photo_id), vphoto_small(_photo_small), vphoto_big(_photo_big) { } MTPlong vphoto_id; MTPFileLocation vphoto_small; MTPFileLocation vphoto_big; }; class MTPDuserStatusOnline : public MTP::internal::TypeData { public: MTPDuserStatusOnline() = default; MTPDuserStatusOnline(MTPint _expires) : vexpires(_expires) { } MTPint vexpires; }; class MTPDuserStatusOffline : public MTP::internal::TypeData { public: MTPDuserStatusOffline() = default; MTPDuserStatusOffline(MTPint _was_online) : vwas_online(_was_online) { } MTPint vwas_online; }; class MTPDchatEmpty : public MTP::internal::TypeData { public: MTPDchatEmpty() = default; MTPDchatEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDchat : public MTP::internal::TypeData { public: enum class Flag : int32 { f_creator = (1 << 0), f_kicked = (1 << 1), f_left = (1 << 2), f_admins_enabled = (1 << 3), f_admin = (1 << 4), f_deactivated = (1 << 5), f_migrated_to = (1 << 6), MAX_FIELD = (1 << 6), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_creator() const { return vflags.v & Flag::f_creator; } bool is_kicked() const { return vflags.v & Flag::f_kicked; } bool is_left() const { return vflags.v & Flag::f_left; } bool is_admins_enabled() const { return vflags.v & Flag::f_admins_enabled; } bool is_admin() const { return vflags.v & Flag::f_admin; } bool is_deactivated() const { return vflags.v & Flag::f_deactivated; } bool has_migrated_to() const { return vflags.v & Flag::f_migrated_to; } MTPDchat() = default; MTPDchat(const MTPflags &_flags, MTPint _id, const MTPstring &_title, const MTPChatPhoto &_photo, MTPint _participants_count, MTPint _date, MTPint _version, const MTPInputChannel &_migrated_to) : vflags(_flags), vid(_id), vtitle(_title), vphoto(_photo), vparticipants_count(_participants_count), vdate(_date), vversion(_version), vmigrated_to(_migrated_to) { } MTPflags vflags; MTPint vid; MTPstring vtitle; MTPChatPhoto vphoto; MTPint vparticipants_count; MTPint vdate; MTPint vversion; MTPInputChannel vmigrated_to; }; class MTPDchatForbidden : public MTP::internal::TypeData { public: MTPDchatForbidden() = default; MTPDchatForbidden(MTPint _id, const MTPstring &_title) : vid(_id), vtitle(_title) { } MTPint vid; MTPstring vtitle; }; class MTPDchannel : public MTP::internal::TypeData { public: enum class Flag : int32 { f_creator = (1 << 0), f_kicked = (1 << 1), f_left = (1 << 2), f_editor = (1 << 3), f_moderator = (1 << 4), f_broadcast = (1 << 5), f_verified = (1 << 7), f_megagroup = (1 << 8), f_restricted = (1 << 9), f_democracy = (1 << 10), f_signatures = (1 << 11), f_min = (1 << 12), f_access_hash = (1 << 13), f_username = (1 << 6), f_restriction_reason = (1 << 9), MAX_FIELD = (1 << 13), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_creator() const { return vflags.v & Flag::f_creator; } bool is_kicked() const { return vflags.v & Flag::f_kicked; } bool is_left() const { return vflags.v & Flag::f_left; } bool is_editor() const { return vflags.v & Flag::f_editor; } bool is_moderator() const { return vflags.v & Flag::f_moderator; } bool is_broadcast() const { return vflags.v & Flag::f_broadcast; } bool is_verified() const { return vflags.v & Flag::f_verified; } bool is_megagroup() const { return vflags.v & Flag::f_megagroup; } bool is_restricted() const { return vflags.v & Flag::f_restricted; } bool is_democracy() const { return vflags.v & Flag::f_democracy; } bool is_signatures() const { return vflags.v & Flag::f_signatures; } bool is_min() const { return vflags.v & Flag::f_min; } bool has_access_hash() const { return vflags.v & Flag::f_access_hash; } bool has_username() const { return vflags.v & Flag::f_username; } bool has_restriction_reason() const { return vflags.v & Flag::f_restriction_reason; } MTPDchannel() = default; MTPDchannel(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_title, const MTPstring &_username, const MTPChatPhoto &_photo, MTPint _date, MTPint _version, const MTPstring &_restriction_reason) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vtitle(_title), vusername(_username), vphoto(_photo), vdate(_date), vversion(_version), vrestriction_reason(_restriction_reason) { } MTPflags vflags; MTPint vid; MTPlong vaccess_hash; MTPstring vtitle; MTPstring vusername; MTPChatPhoto vphoto; MTPint vdate; MTPint vversion; MTPstring vrestriction_reason; }; class MTPDchannelForbidden : public MTP::internal::TypeData { public: enum class Flag : int32 { f_broadcast = (1 << 5), f_megagroup = (1 << 8), MAX_FIELD = (1 << 8), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_broadcast() const { return vflags.v & Flag::f_broadcast; } bool is_megagroup() const { return vflags.v & Flag::f_megagroup; } MTPDchannelForbidden() = default; MTPDchannelForbidden(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_title) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vtitle(_title) { } MTPflags vflags; MTPint vid; MTPlong vaccess_hash; MTPstring vtitle; }; class MTPDchatFull : public MTP::internal::TypeData { public: MTPDchatFull() = default; MTPDchatFull(MTPint _id, const MTPChatParticipants &_participants, const MTPPhoto &_chat_photo, const MTPPeerNotifySettings &_notify_settings, const MTPExportedChatInvite &_exported_invite, const MTPVector &_bot_info) : vid(_id), vparticipants(_participants), vchat_photo(_chat_photo), vnotify_settings(_notify_settings), vexported_invite(_exported_invite), vbot_info(_bot_info) { } MTPint vid; MTPChatParticipants vparticipants; MTPPhoto vchat_photo; MTPPeerNotifySettings vnotify_settings; MTPExportedChatInvite vexported_invite; MTPVector vbot_info; }; class MTPDchannelFull : public MTP::internal::TypeData { public: enum class Flag : int32 { f_can_view_participants = (1 << 3), f_can_set_username = (1 << 6), f_participants_count = (1 << 0), f_admins_count = (1 << 1), f_kicked_count = (1 << 2), f_migrated_from_chat_id = (1 << 4), f_migrated_from_max_id = (1 << 4), f_pinned_msg_id = (1 << 5), MAX_FIELD = (1 << 6), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_can_view_participants() const { return vflags.v & Flag::f_can_view_participants; } bool is_can_set_username() const { return vflags.v & Flag::f_can_set_username; } bool has_participants_count() const { return vflags.v & Flag::f_participants_count; } bool has_admins_count() const { return vflags.v & Flag::f_admins_count; } bool has_kicked_count() const { return vflags.v & Flag::f_kicked_count; } bool has_migrated_from_chat_id() const { return vflags.v & Flag::f_migrated_from_chat_id; } bool has_migrated_from_max_id() const { return vflags.v & Flag::f_migrated_from_max_id; } bool has_pinned_msg_id() const { return vflags.v & Flag::f_pinned_msg_id; } MTPDchannelFull() = default; MTPDchannelFull(const MTPflags &_flags, MTPint _id, const MTPstring &_about, MTPint _participants_count, MTPint _admins_count, MTPint _kicked_count, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPPhoto &_chat_photo, const MTPPeerNotifySettings &_notify_settings, const MTPExportedChatInvite &_exported_invite, const MTPVector &_bot_info, MTPint _migrated_from_chat_id, MTPint _migrated_from_max_id, MTPint _pinned_msg_id) : vflags(_flags), vid(_id), vabout(_about), vparticipants_count(_participants_count), vadmins_count(_admins_count), vkicked_count(_kicked_count), vread_inbox_max_id(_read_inbox_max_id), vread_outbox_max_id(_read_outbox_max_id), vunread_count(_unread_count), vchat_photo(_chat_photo), vnotify_settings(_notify_settings), vexported_invite(_exported_invite), vbot_info(_bot_info), vmigrated_from_chat_id(_migrated_from_chat_id), vmigrated_from_max_id(_migrated_from_max_id), vpinned_msg_id(_pinned_msg_id) { } MTPflags vflags; MTPint vid; MTPstring vabout; MTPint vparticipants_count; MTPint vadmins_count; MTPint vkicked_count; MTPint vread_inbox_max_id; MTPint vread_outbox_max_id; MTPint vunread_count; MTPPhoto vchat_photo; MTPPeerNotifySettings vnotify_settings; MTPExportedChatInvite vexported_invite; MTPVector vbot_info; MTPint vmigrated_from_chat_id; MTPint vmigrated_from_max_id; MTPint vpinned_msg_id; }; class MTPDchatParticipant : public MTP::internal::TypeData { public: MTPDchatParticipant() = default; MTPDchatParticipant(MTPint _user_id, MTPint _inviter_id, MTPint _date) : vuser_id(_user_id), vinviter_id(_inviter_id), vdate(_date) { } MTPint vuser_id; MTPint vinviter_id; MTPint vdate; }; class MTPDchatParticipantCreator : public MTP::internal::TypeData { public: MTPDchatParticipantCreator() = default; MTPDchatParticipantCreator(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDchatParticipantAdmin : public MTP::internal::TypeData { public: MTPDchatParticipantAdmin() = default; MTPDchatParticipantAdmin(MTPint _user_id, MTPint _inviter_id, MTPint _date) : vuser_id(_user_id), vinviter_id(_inviter_id), vdate(_date) { } MTPint vuser_id; MTPint vinviter_id; MTPint vdate; }; class MTPDchatParticipantsForbidden : public MTP::internal::TypeData { public: enum class Flag : int32 { f_self_participant = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_self_participant() const { return vflags.v & Flag::f_self_participant; } MTPDchatParticipantsForbidden() = default; MTPDchatParticipantsForbidden(const MTPflags &_flags, MTPint _chat_id, const MTPChatParticipant &_self_participant) : vflags(_flags), vchat_id(_chat_id), vself_participant(_self_participant) { } MTPflags vflags; MTPint vchat_id; MTPChatParticipant vself_participant; }; class MTPDchatParticipants : public MTP::internal::TypeData { public: MTPDchatParticipants() = default; MTPDchatParticipants(MTPint _chat_id, const MTPVector &_participants, MTPint _version) : vchat_id(_chat_id), vparticipants(_participants), vversion(_version) { } MTPint vchat_id; MTPVector vparticipants; MTPint vversion; }; class MTPDchatPhoto : public MTP::internal::TypeData { public: MTPDchatPhoto() = default; MTPDchatPhoto(const MTPFileLocation &_photo_small, const MTPFileLocation &_photo_big) : vphoto_small(_photo_small), vphoto_big(_photo_big) { } MTPFileLocation vphoto_small; MTPFileLocation vphoto_big; }; class MTPDmessageEmpty : public MTP::internal::TypeData { public: MTPDmessageEmpty() = default; MTPDmessageEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDmessage : public MTP::internal::TypeData { public: enum class Flag : int32 { f_out = (1 << 1), f_mentioned = (1 << 4), f_media_unread = (1 << 5), f_silent = (1 << 13), f_post = (1 << 14), f_from_id = (1 << 8), f_fwd_from = (1 << 2), f_via_bot_id = (1 << 11), f_reply_to_msg_id = (1 << 3), f_media = (1 << 9), f_reply_markup = (1 << 6), f_entities = (1 << 7), f_views = (1 << 10), f_edit_date = (1 << 15), MAX_FIELD = (1 << 15), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_out() const { return vflags.v & Flag::f_out; } bool is_mentioned() const { return vflags.v & Flag::f_mentioned; } bool is_media_unread() const { return vflags.v & Flag::f_media_unread; } bool is_silent() const { return vflags.v & Flag::f_silent; } bool is_post() const { return vflags.v & Flag::f_post; } bool has_from_id() const { return vflags.v & Flag::f_from_id; } bool has_fwd_from() const { return vflags.v & Flag::f_fwd_from; } bool has_via_bot_id() const { return vflags.v & Flag::f_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_media() const { return vflags.v & Flag::f_media; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } bool has_entities() const { return vflags.v & Flag::f_entities; } bool has_views() const { return vflags.v & Flag::f_views; } bool has_edit_date() const { return vflags.v & Flag::f_edit_date; } MTPDmessage() = default; MTPDmessage(const MTPflags &_flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views, MTPint _edit_date) : vflags(_flags), vid(_id), vfrom_id(_from_id), vto_id(_to_id), vfwd_from(_fwd_from), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), vdate(_date), vmessage(_message), vmedia(_media), vreply_markup(_reply_markup), ventities(_entities), vviews(_views), vedit_date(_edit_date) { } MTPflags vflags; MTPint vid; MTPint vfrom_id; MTPPeer vto_id; MTPMessageFwdHeader vfwd_from; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPint vdate; MTPstring vmessage; MTPMessageMedia vmedia; MTPReplyMarkup vreply_markup; MTPVector ventities; MTPint vviews; MTPint vedit_date; }; class MTPDmessageService : public MTP::internal::TypeData { public: enum class Flag : int32 { f_out = (1 << 1), f_mentioned = (1 << 4), f_media_unread = (1 << 5), f_silent = (1 << 13), f_post = (1 << 14), f_from_id = (1 << 8), f_reply_to_msg_id = (1 << 3), MAX_FIELD = (1 << 14), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_out() const { return vflags.v & Flag::f_out; } bool is_mentioned() const { return vflags.v & Flag::f_mentioned; } bool is_media_unread() const { return vflags.v & Flag::f_media_unread; } bool is_silent() const { return vflags.v & Flag::f_silent; } bool is_post() const { return vflags.v & Flag::f_post; } bool has_from_id() const { return vflags.v & Flag::f_from_id; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } MTPDmessageService() = default; MTPDmessageService(const MTPflags &_flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _reply_to_msg_id, MTPint _date, const MTPMessageAction &_action) : vflags(_flags), vid(_id), vfrom_id(_from_id), vto_id(_to_id), vreply_to_msg_id(_reply_to_msg_id), vdate(_date), vaction(_action) { } MTPflags vflags; MTPint vid; MTPint vfrom_id; MTPPeer vto_id; MTPint vreply_to_msg_id; MTPint vdate; MTPMessageAction vaction; }; class MTPDmessageMediaPhoto : public MTP::internal::TypeData { public: MTPDmessageMediaPhoto() = default; MTPDmessageMediaPhoto(const MTPPhoto &_photo, const MTPstring &_caption) : vphoto(_photo), vcaption(_caption) { } MTPPhoto vphoto; MTPstring vcaption; }; class MTPDmessageMediaGeo : public MTP::internal::TypeData { public: MTPDmessageMediaGeo() = default; MTPDmessageMediaGeo(const MTPGeoPoint &_geo) : vgeo(_geo) { } MTPGeoPoint vgeo; }; class MTPDmessageMediaContact : public MTP::internal::TypeData { public: MTPDmessageMediaContact() = default; MTPDmessageMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, MTPint _user_id) : vphone_number(_phone_number), vfirst_name(_first_name), vlast_name(_last_name), vuser_id(_user_id) { } MTPstring vphone_number; MTPstring vfirst_name; MTPstring vlast_name; MTPint vuser_id; }; class MTPDmessageMediaDocument : public MTP::internal::TypeData { public: MTPDmessageMediaDocument() = default; MTPDmessageMediaDocument(const MTPDocument &_document, const MTPstring &_caption) : vdocument(_document), vcaption(_caption) { } MTPDocument vdocument; MTPstring vcaption; }; class MTPDmessageMediaWebPage : public MTP::internal::TypeData { public: MTPDmessageMediaWebPage() = default; MTPDmessageMediaWebPage(const MTPWebPage &_webpage) : vwebpage(_webpage) { } MTPWebPage vwebpage; }; class MTPDmessageMediaVenue : public MTP::internal::TypeData { public: MTPDmessageMediaVenue() = default; MTPDmessageMediaVenue(const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id) : vgeo(_geo), vtitle(_title), vaddress(_address), vprovider(_provider), vvenue_id(_venue_id) { } MTPGeoPoint vgeo; MTPstring vtitle; MTPstring vaddress; MTPstring vprovider; MTPstring vvenue_id; }; class MTPDmessageMediaGame : public MTP::internal::TypeData { public: MTPDmessageMediaGame() = default; MTPDmessageMediaGame(const MTPGame &_game) : vgame(_game) { } MTPGame vgame; }; class MTPDmessageActionChatCreate : public MTP::internal::TypeData { public: MTPDmessageActionChatCreate() = default; MTPDmessageActionChatCreate(const MTPstring &_title, const MTPVector &_users) : vtitle(_title), vusers(_users) { } MTPstring vtitle; MTPVector vusers; }; class MTPDmessageActionChatEditTitle : public MTP::internal::TypeData { public: MTPDmessageActionChatEditTitle() = default; MTPDmessageActionChatEditTitle(const MTPstring &_title) : vtitle(_title) { } MTPstring vtitle; }; class MTPDmessageActionChatEditPhoto : public MTP::internal::TypeData { public: MTPDmessageActionChatEditPhoto() = default; MTPDmessageActionChatEditPhoto(const MTPPhoto &_photo) : vphoto(_photo) { } MTPPhoto vphoto; }; class MTPDmessageActionChatAddUser : public MTP::internal::TypeData { public: MTPDmessageActionChatAddUser() = default; MTPDmessageActionChatAddUser(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDmessageActionChatDeleteUser : public MTP::internal::TypeData { public: MTPDmessageActionChatDeleteUser() = default; MTPDmessageActionChatDeleteUser(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDmessageActionChatJoinedByLink : public MTP::internal::TypeData { public: MTPDmessageActionChatJoinedByLink() = default; MTPDmessageActionChatJoinedByLink(MTPint _inviter_id) : vinviter_id(_inviter_id) { } MTPint vinviter_id; }; class MTPDmessageActionChannelCreate : public MTP::internal::TypeData { public: MTPDmessageActionChannelCreate() = default; MTPDmessageActionChannelCreate(const MTPstring &_title) : vtitle(_title) { } MTPstring vtitle; }; class MTPDmessageActionChatMigrateTo : public MTP::internal::TypeData { public: MTPDmessageActionChatMigrateTo() = default; MTPDmessageActionChatMigrateTo(MTPint _channel_id) : vchannel_id(_channel_id) { } MTPint vchannel_id; }; class MTPDmessageActionChannelMigrateFrom : public MTP::internal::TypeData { public: MTPDmessageActionChannelMigrateFrom() = default; MTPDmessageActionChannelMigrateFrom(const MTPstring &_title, MTPint _chat_id) : vtitle(_title), vchat_id(_chat_id) { } MTPstring vtitle; MTPint vchat_id; }; class MTPDmessageActionGameScore : public MTP::internal::TypeData { public: MTPDmessageActionGameScore() = default; MTPDmessageActionGameScore(const MTPlong &_game_id, MTPint _score) : vgame_id(_game_id), vscore(_score) { } MTPlong vgame_id; MTPint vscore; }; class MTPDmessageActionPhoneCall : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reason = (1 << 0), f_duration = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reason() const { return vflags.v & Flag::f_reason; } bool has_duration() const { return vflags.v & Flag::f_duration; } MTPDmessageActionPhoneCall() = default; MTPDmessageActionPhoneCall(const MTPflags &_flags, const MTPlong &_call_id, const MTPPhoneCallDiscardReason &_reason, MTPint _duration) : vflags(_flags), vcall_id(_call_id), vreason(_reason), vduration(_duration) { } MTPflags vflags; MTPlong vcall_id; MTPPhoneCallDiscardReason vreason; MTPint vduration; }; class MTPDdialog : public MTP::internal::TypeData { public: enum class Flag : int32 { f_pinned = (1 << 2), f_pts = (1 << 0), f_draft = (1 << 1), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_pinned() const { return vflags.v & Flag::f_pinned; } bool has_pts() const { return vflags.v & Flag::f_pts; } bool has_draft() const { return vflags.v & Flag::f_draft; } MTPDdialog() = default; MTPDdialog(const MTPflags &_flags, const MTPPeer &_peer, MTPint _top_message, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPPeerNotifySettings &_notify_settings, MTPint _pts, const MTPDraftMessage &_draft) : vflags(_flags), vpeer(_peer), vtop_message(_top_message), vread_inbox_max_id(_read_inbox_max_id), vread_outbox_max_id(_read_outbox_max_id), vunread_count(_unread_count), vnotify_settings(_notify_settings), vpts(_pts), vdraft(_draft) { } MTPflags vflags; MTPPeer vpeer; MTPint vtop_message; MTPint vread_inbox_max_id; MTPint vread_outbox_max_id; MTPint vunread_count; MTPPeerNotifySettings vnotify_settings; MTPint vpts; MTPDraftMessage vdraft; }; class MTPDphotoEmpty : public MTP::internal::TypeData { public: MTPDphotoEmpty() = default; MTPDphotoEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDphoto : public MTP::internal::TypeData { public: enum class Flag : int32 { f_has_stickers = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_has_stickers() const { return vflags.v & Flag::f_has_stickers; } MTPDphoto() = default; MTPDphoto(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPVector &_sizes) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vdate(_date), vsizes(_sizes) { } MTPflags vflags; MTPlong vid; MTPlong vaccess_hash; MTPint vdate; MTPVector vsizes; }; class MTPDphotoSizeEmpty : public MTP::internal::TypeData { public: MTPDphotoSizeEmpty() = default; MTPDphotoSizeEmpty(const MTPstring &_type) : vtype(_type) { } MTPstring vtype; }; class MTPDphotoSize : public MTP::internal::TypeData { public: MTPDphotoSize() = default; MTPDphotoSize(const MTPstring &_type, const MTPFileLocation &_location, MTPint _w, MTPint _h, MTPint _size) : vtype(_type), vlocation(_location), vw(_w), vh(_h), vsize(_size) { } MTPstring vtype; MTPFileLocation vlocation; MTPint vw; MTPint vh; MTPint vsize; }; class MTPDphotoCachedSize : public MTP::internal::TypeData { public: MTPDphotoCachedSize() = default; MTPDphotoCachedSize(const MTPstring &_type, const MTPFileLocation &_location, MTPint _w, MTPint _h, const MTPbytes &_bytes) : vtype(_type), vlocation(_location), vw(_w), vh(_h), vbytes(_bytes) { } MTPstring vtype; MTPFileLocation vlocation; MTPint vw; MTPint vh; MTPbytes vbytes; }; class MTPDgeoPoint : public MTP::internal::TypeData { public: MTPDgeoPoint() = default; MTPDgeoPoint(const MTPdouble &_long, const MTPdouble &_lat) : vlong(_long), vlat(_lat) { } MTPdouble vlong; MTPdouble vlat; }; class MTPDauth_checkedPhone : public MTP::internal::TypeData { public: MTPDauth_checkedPhone() = default; MTPDauth_checkedPhone(MTPBool _phone_registered) : vphone_registered(_phone_registered) { } MTPBool vphone_registered; }; class MTPDauth_sentCode : public MTP::internal::TypeData { public: enum class Flag : int32 { f_phone_registered = (1 << 0), f_next_type = (1 << 1), f_timeout = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_phone_registered() const { return vflags.v & Flag::f_phone_registered; } bool has_next_type() const { return vflags.v & Flag::f_next_type; } bool has_timeout() const { return vflags.v & Flag::f_timeout; } MTPDauth_sentCode() = default; MTPDauth_sentCode(const MTPflags &_flags, const MTPauth_SentCodeType &_type, const MTPstring &_phone_code_hash, const MTPauth_CodeType &_next_type, MTPint _timeout) : vflags(_flags), vtype(_type), vphone_code_hash(_phone_code_hash), vnext_type(_next_type), vtimeout(_timeout) { } MTPflags vflags; MTPauth_SentCodeType vtype; MTPstring vphone_code_hash; MTPauth_CodeType vnext_type; MTPint vtimeout; }; class MTPDauth_authorization : public MTP::internal::TypeData { public: enum class Flag : int32 { f_tmp_sessions = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_tmp_sessions() const { return vflags.v & Flag::f_tmp_sessions; } MTPDauth_authorization() = default; MTPDauth_authorization(const MTPflags &_flags, MTPint _tmp_sessions, const MTPUser &_user) : vflags(_flags), vtmp_sessions(_tmp_sessions), vuser(_user) { } MTPflags vflags; MTPint vtmp_sessions; MTPUser vuser; }; class MTPDauth_exportedAuthorization : public MTP::internal::TypeData { public: MTPDauth_exportedAuthorization() = default; MTPDauth_exportedAuthorization(MTPint _id, const MTPbytes &_bytes) : vid(_id), vbytes(_bytes) { } MTPint vid; MTPbytes vbytes; }; class MTPDinputNotifyPeer : public MTP::internal::TypeData { public: MTPDinputNotifyPeer() = default; MTPDinputNotifyPeer(const MTPInputPeer &_peer) : vpeer(_peer) { } MTPInputPeer vpeer; }; class MTPDinputPeerNotifySettings : public MTP::internal::TypeData { public: enum class Flag : int32 { f_show_previews = (1 << 0), f_silent = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_show_previews() const { return vflags.v & Flag::f_show_previews; } bool is_silent() const { return vflags.v & Flag::f_silent; } MTPDinputPeerNotifySettings() = default; MTPDinputPeerNotifySettings(const MTPflags &_flags, MTPint _mute_until, const MTPstring &_sound) : vflags(_flags), vmute_until(_mute_until), vsound(_sound) { } MTPflags vflags; MTPint vmute_until; MTPstring vsound; }; class MTPDpeerNotifySettings : public MTP::internal::TypeData { public: enum class Flag : int32 { f_show_previews = (1 << 0), f_silent = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_show_previews() const { return vflags.v & Flag::f_show_previews; } bool is_silent() const { return vflags.v & Flag::f_silent; } MTPDpeerNotifySettings() = default; MTPDpeerNotifySettings(const MTPflags &_flags, MTPint _mute_until, const MTPstring &_sound) : vflags(_flags), vmute_until(_mute_until), vsound(_sound) { } MTPflags vflags; MTPint vmute_until; MTPstring vsound; }; class MTPDpeerSettings : public MTP::internal::TypeData { public: enum class Flag : int32 { f_report_spam = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_report_spam() const { return vflags.v & Flag::f_report_spam; } MTPDpeerSettings() = default; MTPDpeerSettings(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDwallPaper : public MTP::internal::TypeData { public: MTPDwallPaper() = default; MTPDwallPaper(MTPint _id, const MTPstring &_title, const MTPVector &_sizes, MTPint _color) : vid(_id), vtitle(_title), vsizes(_sizes), vcolor(_color) { } MTPint vid; MTPstring vtitle; MTPVector vsizes; MTPint vcolor; }; class MTPDwallPaperSolid : public MTP::internal::TypeData { public: MTPDwallPaperSolid() = default; MTPDwallPaperSolid(MTPint _id, const MTPstring &_title, MTPint _bg_color, MTPint _color) : vid(_id), vtitle(_title), vbg_color(_bg_color), vcolor(_color) { } MTPint vid; MTPstring vtitle; MTPint vbg_color; MTPint vcolor; }; class MTPDinputReportReasonOther : public MTP::internal::TypeData { public: MTPDinputReportReasonOther() = default; MTPDinputReportReasonOther(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDuserFull : public MTP::internal::TypeData { public: enum class Flag : int32 { f_blocked = (1 << 0), f_phone_calls_available = (1 << 4), f_about = (1 << 1), f_profile_photo = (1 << 2), f_bot_info = (1 << 3), MAX_FIELD = (1 << 4), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_blocked() const { return vflags.v & Flag::f_blocked; } bool is_phone_calls_available() const { return vflags.v & Flag::f_phone_calls_available; } bool has_about() const { return vflags.v & Flag::f_about; } bool has_profile_photo() const { return vflags.v & Flag::f_profile_photo; } bool has_bot_info() const { return vflags.v & Flag::f_bot_info; } MTPDuserFull() = default; MTPDuserFull(const MTPflags &_flags, const MTPUser &_user, const MTPstring &_about, const MTPcontacts_Link &_link, const MTPPhoto &_profile_photo, const MTPPeerNotifySettings &_notify_settings, const MTPBotInfo &_bot_info, MTPint _common_chats_count) : vflags(_flags), vuser(_user), vabout(_about), vlink(_link), vprofile_photo(_profile_photo), vnotify_settings(_notify_settings), vbot_info(_bot_info), vcommon_chats_count(_common_chats_count) { } MTPflags vflags; MTPUser vuser; MTPstring vabout; MTPcontacts_Link vlink; MTPPhoto vprofile_photo; MTPPeerNotifySettings vnotify_settings; MTPBotInfo vbot_info; MTPint vcommon_chats_count; }; class MTPDcontact : public MTP::internal::TypeData { public: MTPDcontact() = default; MTPDcontact(MTPint _user_id, MTPBool _mutual) : vuser_id(_user_id), vmutual(_mutual) { } MTPint vuser_id; MTPBool vmutual; }; class MTPDimportedContact : public MTP::internal::TypeData { public: MTPDimportedContact() = default; MTPDimportedContact(MTPint _user_id, const MTPlong &_client_id) : vuser_id(_user_id), vclient_id(_client_id) { } MTPint vuser_id; MTPlong vclient_id; }; class MTPDcontactBlocked : public MTP::internal::TypeData { public: MTPDcontactBlocked() = default; MTPDcontactBlocked(MTPint _user_id, MTPint _date) : vuser_id(_user_id), vdate(_date) { } MTPint vuser_id; MTPint vdate; }; class MTPDcontactStatus : public MTP::internal::TypeData { public: MTPDcontactStatus() = default; MTPDcontactStatus(MTPint _user_id, const MTPUserStatus &_status) : vuser_id(_user_id), vstatus(_status) { } MTPint vuser_id; MTPUserStatus vstatus; }; class MTPDcontacts_link : public MTP::internal::TypeData { public: MTPDcontacts_link() = default; MTPDcontacts_link(const MTPContactLink &_my_link, const MTPContactLink &_foreign_link, const MTPUser &_user) : vmy_link(_my_link), vforeign_link(_foreign_link), vuser(_user) { } MTPContactLink vmy_link; MTPContactLink vforeign_link; MTPUser vuser; }; class MTPDcontacts_contacts : public MTP::internal::TypeData { public: MTPDcontacts_contacts() = default; MTPDcontacts_contacts(const MTPVector &_contacts, const MTPVector &_users) : vcontacts(_contacts), vusers(_users) { } MTPVector vcontacts; MTPVector vusers; }; class MTPDcontacts_importedContacts : public MTP::internal::TypeData { public: MTPDcontacts_importedContacts() = default; MTPDcontacts_importedContacts(const MTPVector &_imported, const MTPVector &_retry_contacts, const MTPVector &_users) : vimported(_imported), vretry_contacts(_retry_contacts), vusers(_users) { } MTPVector vimported; MTPVector vretry_contacts; MTPVector vusers; }; class MTPDcontacts_blocked : public MTP::internal::TypeData { public: MTPDcontacts_blocked() = default; MTPDcontacts_blocked(const MTPVector &_blocked, const MTPVector &_users) : vblocked(_blocked), vusers(_users) { } MTPVector vblocked; MTPVector vusers; }; class MTPDcontacts_blockedSlice : public MTP::internal::TypeData { public: MTPDcontacts_blockedSlice() = default; MTPDcontacts_blockedSlice(MTPint _count, const MTPVector &_blocked, const MTPVector &_users) : vcount(_count), vblocked(_blocked), vusers(_users) { } MTPint vcount; MTPVector vblocked; MTPVector vusers; }; class MTPDmessages_dialogs : public MTP::internal::TypeData { public: MTPDmessages_dialogs() = default; MTPDmessages_dialogs(const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) : vdialogs(_dialogs), vmessages(_messages), vchats(_chats), vusers(_users) { } MTPVector vdialogs; MTPVector vmessages; MTPVector vchats; MTPVector vusers; }; class MTPDmessages_dialogsSlice : public MTP::internal::TypeData { public: MTPDmessages_dialogsSlice() = default; MTPDmessages_dialogsSlice(MTPint _count, const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) : vcount(_count), vdialogs(_dialogs), vmessages(_messages), vchats(_chats), vusers(_users) { } MTPint vcount; MTPVector vdialogs; MTPVector vmessages; MTPVector vchats; MTPVector vusers; }; class MTPDmessages_messages : public MTP::internal::TypeData { public: MTPDmessages_messages() = default; MTPDmessages_messages(const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) : vmessages(_messages), vchats(_chats), vusers(_users) { } MTPVector vmessages; MTPVector vchats; MTPVector vusers; }; class MTPDmessages_messagesSlice : public MTP::internal::TypeData { public: MTPDmessages_messagesSlice() = default; MTPDmessages_messagesSlice(MTPint _count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) : vcount(_count), vmessages(_messages), vchats(_chats), vusers(_users) { } MTPint vcount; MTPVector vmessages; MTPVector vchats; MTPVector vusers; }; class MTPDmessages_channelMessages : public MTP::internal::TypeData { public: enum class Flag : int32 { MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } MTPDmessages_channelMessages() = default; MTPDmessages_channelMessages(const MTPflags &_flags, MTPint _pts, MTPint _count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) : vflags(_flags), vpts(_pts), vcount(_count), vmessages(_messages), vchats(_chats), vusers(_users) { } MTPflags vflags; MTPint vpts; MTPint vcount; MTPVector vmessages; MTPVector vchats; MTPVector vusers; }; class MTPDmessages_chats : public MTP::internal::TypeData { public: MTPDmessages_chats() = default; MTPDmessages_chats(const MTPVector &_chats) : vchats(_chats) { } MTPVector vchats; }; class MTPDmessages_chatsSlice : public MTP::internal::TypeData { public: MTPDmessages_chatsSlice() = default; MTPDmessages_chatsSlice(MTPint _count, const MTPVector &_chats) : vcount(_count), vchats(_chats) { } MTPint vcount; MTPVector vchats; }; class MTPDmessages_chatFull : public MTP::internal::TypeData { public: MTPDmessages_chatFull() = default; MTPDmessages_chatFull(const MTPChatFull &_full_chat, const MTPVector &_chats, const MTPVector &_users) : vfull_chat(_full_chat), vchats(_chats), vusers(_users) { } MTPChatFull vfull_chat; MTPVector vchats; MTPVector vusers; }; class MTPDmessages_affectedHistory : public MTP::internal::TypeData { public: MTPDmessages_affectedHistory() = default; MTPDmessages_affectedHistory(MTPint _pts, MTPint _pts_count, MTPint _offset) : vpts(_pts), vpts_count(_pts_count), voffset(_offset) { } MTPint vpts; MTPint vpts_count; MTPint voffset; }; class MTPDinputMessagesFilterPhoneCalls : public MTP::internal::TypeData { public: enum class Flag : int32 { f_missed = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_missed() const { return vflags.v & Flag::f_missed; } MTPDinputMessagesFilterPhoneCalls() = default; MTPDinputMessagesFilterPhoneCalls(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDupdateNewMessage : public MTP::internal::TypeData { public: MTPDupdateNewMessage() = default; MTPDupdateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) : vmessage(_message), vpts(_pts), vpts_count(_pts_count) { } MTPMessage vmessage; MTPint vpts; MTPint vpts_count; }; class MTPDupdateMessageID : public MTP::internal::TypeData { public: MTPDupdateMessageID() = default; MTPDupdateMessageID(MTPint _id, const MTPlong &_random_id) : vid(_id), vrandom_id(_random_id) { } MTPint vid; MTPlong vrandom_id; }; class MTPDupdateDeleteMessages : public MTP::internal::TypeData { public: MTPDupdateDeleteMessages() = default; MTPDupdateDeleteMessages(const MTPVector &_messages, MTPint _pts, MTPint _pts_count) : vmessages(_messages), vpts(_pts), vpts_count(_pts_count) { } MTPVector vmessages; MTPint vpts; MTPint vpts_count; }; class MTPDupdateUserTyping : public MTP::internal::TypeData { public: MTPDupdateUserTyping() = default; MTPDupdateUserTyping(MTPint _user_id, const MTPSendMessageAction &_action) : vuser_id(_user_id), vaction(_action) { } MTPint vuser_id; MTPSendMessageAction vaction; }; class MTPDupdateChatUserTyping : public MTP::internal::TypeData { public: MTPDupdateChatUserTyping() = default; MTPDupdateChatUserTyping(MTPint _chat_id, MTPint _user_id, const MTPSendMessageAction &_action) : vchat_id(_chat_id), vuser_id(_user_id), vaction(_action) { } MTPint vchat_id; MTPint vuser_id; MTPSendMessageAction vaction; }; class MTPDupdateChatParticipants : public MTP::internal::TypeData { public: MTPDupdateChatParticipants() = default; MTPDupdateChatParticipants(const MTPChatParticipants &_participants) : vparticipants(_participants) { } MTPChatParticipants vparticipants; }; class MTPDupdateUserStatus : public MTP::internal::TypeData { public: MTPDupdateUserStatus() = default; MTPDupdateUserStatus(MTPint _user_id, const MTPUserStatus &_status) : vuser_id(_user_id), vstatus(_status) { } MTPint vuser_id; MTPUserStatus vstatus; }; class MTPDupdateUserName : public MTP::internal::TypeData { public: MTPDupdateUserName() = default; MTPDupdateUserName(MTPint _user_id, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_username) : vuser_id(_user_id), vfirst_name(_first_name), vlast_name(_last_name), vusername(_username) { } MTPint vuser_id; MTPstring vfirst_name; MTPstring vlast_name; MTPstring vusername; }; class MTPDupdateUserPhoto : public MTP::internal::TypeData { public: MTPDupdateUserPhoto() = default; MTPDupdateUserPhoto(MTPint _user_id, MTPint _date, const MTPUserProfilePhoto &_photo, MTPBool _previous) : vuser_id(_user_id), vdate(_date), vphoto(_photo), vprevious(_previous) { } MTPint vuser_id; MTPint vdate; MTPUserProfilePhoto vphoto; MTPBool vprevious; }; class MTPDupdateContactRegistered : public MTP::internal::TypeData { public: MTPDupdateContactRegistered() = default; MTPDupdateContactRegistered(MTPint _user_id, MTPint _date) : vuser_id(_user_id), vdate(_date) { } MTPint vuser_id; MTPint vdate; }; class MTPDupdateContactLink : public MTP::internal::TypeData { public: MTPDupdateContactLink() = default; MTPDupdateContactLink(MTPint _user_id, const MTPContactLink &_my_link, const MTPContactLink &_foreign_link) : vuser_id(_user_id), vmy_link(_my_link), vforeign_link(_foreign_link) { } MTPint vuser_id; MTPContactLink vmy_link; MTPContactLink vforeign_link; }; class MTPDupdateNewEncryptedMessage : public MTP::internal::TypeData { public: MTPDupdateNewEncryptedMessage() = default; MTPDupdateNewEncryptedMessage(const MTPEncryptedMessage &_message, MTPint _qts) : vmessage(_message), vqts(_qts) { } MTPEncryptedMessage vmessage; MTPint vqts; }; class MTPDupdateEncryptedChatTyping : public MTP::internal::TypeData { public: MTPDupdateEncryptedChatTyping() = default; MTPDupdateEncryptedChatTyping(MTPint _chat_id) : vchat_id(_chat_id) { } MTPint vchat_id; }; class MTPDupdateEncryption : public MTP::internal::TypeData { public: MTPDupdateEncryption() = default; MTPDupdateEncryption(const MTPEncryptedChat &_chat, MTPint _date) : vchat(_chat), vdate(_date) { } MTPEncryptedChat vchat; MTPint vdate; }; class MTPDupdateEncryptedMessagesRead : public MTP::internal::TypeData { public: MTPDupdateEncryptedMessagesRead() = default; MTPDupdateEncryptedMessagesRead(MTPint _chat_id, MTPint _max_date, MTPint _date) : vchat_id(_chat_id), vmax_date(_max_date), vdate(_date) { } MTPint vchat_id; MTPint vmax_date; MTPint vdate; }; class MTPDupdateChatParticipantAdd : public MTP::internal::TypeData { public: MTPDupdateChatParticipantAdd() = default; MTPDupdateChatParticipantAdd(MTPint _chat_id, MTPint _user_id, MTPint _inviter_id, MTPint _date, MTPint _version) : vchat_id(_chat_id), vuser_id(_user_id), vinviter_id(_inviter_id), vdate(_date), vversion(_version) { } MTPint vchat_id; MTPint vuser_id; MTPint vinviter_id; MTPint vdate; MTPint vversion; }; class MTPDupdateChatParticipantDelete : public MTP::internal::TypeData { public: MTPDupdateChatParticipantDelete() = default; MTPDupdateChatParticipantDelete(MTPint _chat_id, MTPint _user_id, MTPint _version) : vchat_id(_chat_id), vuser_id(_user_id), vversion(_version) { } MTPint vchat_id; MTPint vuser_id; MTPint vversion; }; class MTPDupdateDcOptions : public MTP::internal::TypeData { public: MTPDupdateDcOptions() = default; MTPDupdateDcOptions(const MTPVector &_dc_options) : vdc_options(_dc_options) { } MTPVector vdc_options; }; class MTPDupdateUserBlocked : public MTP::internal::TypeData { public: MTPDupdateUserBlocked() = default; MTPDupdateUserBlocked(MTPint _user_id, MTPBool _blocked) : vuser_id(_user_id), vblocked(_blocked) { } MTPint vuser_id; MTPBool vblocked; }; class MTPDupdateNotifySettings : public MTP::internal::TypeData { public: MTPDupdateNotifySettings() = default; MTPDupdateNotifySettings(const MTPNotifyPeer &_peer, const MTPPeerNotifySettings &_notify_settings) : vpeer(_peer), vnotify_settings(_notify_settings) { } MTPNotifyPeer vpeer; MTPPeerNotifySettings vnotify_settings; }; class MTPDupdateServiceNotification : public MTP::internal::TypeData { public: enum class Flag : int32 { f_popup = (1 << 0), f_inbox_date = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_popup() const { return vflags.v & Flag::f_popup; } bool has_inbox_date() const { return vflags.v & Flag::f_inbox_date; } MTPDupdateServiceNotification() = default; MTPDupdateServiceNotification(const MTPflags &_flags, MTPint _inbox_date, const MTPstring &_type, const MTPstring &_message, const MTPMessageMedia &_media, const MTPVector &_entities) : vflags(_flags), vinbox_date(_inbox_date), vtype(_type), vmessage(_message), vmedia(_media), ventities(_entities) { } MTPflags vflags; MTPint vinbox_date; MTPstring vtype; MTPstring vmessage; MTPMessageMedia vmedia; MTPVector ventities; }; class MTPDupdatePrivacy : public MTP::internal::TypeData { public: MTPDupdatePrivacy() = default; MTPDupdatePrivacy(const MTPPrivacyKey &_key, const MTPVector &_rules) : vkey(_key), vrules(_rules) { } MTPPrivacyKey vkey; MTPVector vrules; }; class MTPDupdateUserPhone : public MTP::internal::TypeData { public: MTPDupdateUserPhone() = default; MTPDupdateUserPhone(MTPint _user_id, const MTPstring &_phone) : vuser_id(_user_id), vphone(_phone) { } MTPint vuser_id; MTPstring vphone; }; class MTPDupdateReadHistoryInbox : public MTP::internal::TypeData { public: MTPDupdateReadHistoryInbox() = default; MTPDupdateReadHistoryInbox(const MTPPeer &_peer, MTPint _max_id, MTPint _pts, MTPint _pts_count) : vpeer(_peer), vmax_id(_max_id), vpts(_pts), vpts_count(_pts_count) { } MTPPeer vpeer; MTPint vmax_id; MTPint vpts; MTPint vpts_count; }; class MTPDupdateReadHistoryOutbox : public MTP::internal::TypeData { public: MTPDupdateReadHistoryOutbox() = default; MTPDupdateReadHistoryOutbox(const MTPPeer &_peer, MTPint _max_id, MTPint _pts, MTPint _pts_count) : vpeer(_peer), vmax_id(_max_id), vpts(_pts), vpts_count(_pts_count) { } MTPPeer vpeer; MTPint vmax_id; MTPint vpts; MTPint vpts_count; }; class MTPDupdateWebPage : public MTP::internal::TypeData { public: MTPDupdateWebPage() = default; MTPDupdateWebPage(const MTPWebPage &_webpage, MTPint _pts, MTPint _pts_count) : vwebpage(_webpage), vpts(_pts), vpts_count(_pts_count) { } MTPWebPage vwebpage; MTPint vpts; MTPint vpts_count; }; class MTPDupdateReadMessagesContents : public MTP::internal::TypeData { public: MTPDupdateReadMessagesContents() = default; MTPDupdateReadMessagesContents(const MTPVector &_messages, MTPint _pts, MTPint _pts_count) : vmessages(_messages), vpts(_pts), vpts_count(_pts_count) { } MTPVector vmessages; MTPint vpts; MTPint vpts_count; }; class MTPDupdateChannelTooLong : public MTP::internal::TypeData { public: enum class Flag : int32 { f_pts = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_pts() const { return vflags.v & Flag::f_pts; } MTPDupdateChannelTooLong() = default; MTPDupdateChannelTooLong(const MTPflags &_flags, MTPint _channel_id, MTPint _pts) : vflags(_flags), vchannel_id(_channel_id), vpts(_pts) { } MTPflags vflags; MTPint vchannel_id; MTPint vpts; }; class MTPDupdateChannel : public MTP::internal::TypeData { public: MTPDupdateChannel() = default; MTPDupdateChannel(MTPint _channel_id) : vchannel_id(_channel_id) { } MTPint vchannel_id; }; class MTPDupdateNewChannelMessage : public MTP::internal::TypeData { public: MTPDupdateNewChannelMessage() = default; MTPDupdateNewChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) : vmessage(_message), vpts(_pts), vpts_count(_pts_count) { } MTPMessage vmessage; MTPint vpts; MTPint vpts_count; }; class MTPDupdateReadChannelInbox : public MTP::internal::TypeData { public: MTPDupdateReadChannelInbox() = default; MTPDupdateReadChannelInbox(MTPint _channel_id, MTPint _max_id) : vchannel_id(_channel_id), vmax_id(_max_id) { } MTPint vchannel_id; MTPint vmax_id; }; class MTPDupdateDeleteChannelMessages : public MTP::internal::TypeData { public: MTPDupdateDeleteChannelMessages() = default; MTPDupdateDeleteChannelMessages(MTPint _channel_id, const MTPVector &_messages, MTPint _pts, MTPint _pts_count) : vchannel_id(_channel_id), vmessages(_messages), vpts(_pts), vpts_count(_pts_count) { } MTPint vchannel_id; MTPVector vmessages; MTPint vpts; MTPint vpts_count; }; class MTPDupdateChannelMessageViews : public MTP::internal::TypeData { public: MTPDupdateChannelMessageViews() = default; MTPDupdateChannelMessageViews(MTPint _channel_id, MTPint _id, MTPint _views) : vchannel_id(_channel_id), vid(_id), vviews(_views) { } MTPint vchannel_id; MTPint vid; MTPint vviews; }; class MTPDupdateChatAdmins : public MTP::internal::TypeData { public: MTPDupdateChatAdmins() = default; MTPDupdateChatAdmins(MTPint _chat_id, MTPBool _enabled, MTPint _version) : vchat_id(_chat_id), venabled(_enabled), vversion(_version) { } MTPint vchat_id; MTPBool venabled; MTPint vversion; }; class MTPDupdateChatParticipantAdmin : public MTP::internal::TypeData { public: MTPDupdateChatParticipantAdmin() = default; MTPDupdateChatParticipantAdmin(MTPint _chat_id, MTPint _user_id, MTPBool _is_admin, MTPint _version) : vchat_id(_chat_id), vuser_id(_user_id), vis_admin(_is_admin), vversion(_version) { } MTPint vchat_id; MTPint vuser_id; MTPBool vis_admin; MTPint vversion; }; class MTPDupdateNewStickerSet : public MTP::internal::TypeData { public: MTPDupdateNewStickerSet() = default; MTPDupdateNewStickerSet(const MTPmessages_StickerSet &_stickerset) : vstickerset(_stickerset) { } MTPmessages_StickerSet vstickerset; }; class MTPDupdateStickerSetsOrder : public MTP::internal::TypeData { public: enum class Flag : int32 { f_masks = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_masks() const { return vflags.v & Flag::f_masks; } MTPDupdateStickerSetsOrder() = default; MTPDupdateStickerSetsOrder(const MTPflags &_flags, const MTPVector &_order) : vflags(_flags), vorder(_order) { } MTPflags vflags; MTPVector vorder; }; class MTPDupdateBotInlineQuery : public MTP::internal::TypeData { public: enum class Flag : int32 { f_geo = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_geo() const { return vflags.v & Flag::f_geo; } MTPDupdateBotInlineQuery() = default; MTPDupdateBotInlineQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPstring &_query, const MTPGeoPoint &_geo, const MTPstring &_offset) : vflags(_flags), vquery_id(_query_id), vuser_id(_user_id), vquery(_query), vgeo(_geo), voffset(_offset) { } MTPflags vflags; MTPlong vquery_id; MTPint vuser_id; MTPstring vquery; MTPGeoPoint vgeo; MTPstring voffset; }; class MTPDupdateBotInlineSend : public MTP::internal::TypeData { public: enum class Flag : int32 { f_geo = (1 << 0), f_msg_id = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_geo() const { return vflags.v & Flag::f_geo; } bool has_msg_id() const { return vflags.v & Flag::f_msg_id; } MTPDupdateBotInlineSend() = default; MTPDupdateBotInlineSend(const MTPflags &_flags, MTPint _user_id, const MTPstring &_query, const MTPGeoPoint &_geo, const MTPstring &_id, const MTPInputBotInlineMessageID &_msg_id) : vflags(_flags), vuser_id(_user_id), vquery(_query), vgeo(_geo), vid(_id), vmsg_id(_msg_id) { } MTPflags vflags; MTPint vuser_id; MTPstring vquery; MTPGeoPoint vgeo; MTPstring vid; MTPInputBotInlineMessageID vmsg_id; }; class MTPDupdateEditChannelMessage : public MTP::internal::TypeData { public: MTPDupdateEditChannelMessage() = default; MTPDupdateEditChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) : vmessage(_message), vpts(_pts), vpts_count(_pts_count) { } MTPMessage vmessage; MTPint vpts; MTPint vpts_count; }; class MTPDupdateChannelPinnedMessage : public MTP::internal::TypeData { public: MTPDupdateChannelPinnedMessage() = default; MTPDupdateChannelPinnedMessage(MTPint _channel_id, MTPint _id) : vchannel_id(_channel_id), vid(_id) { } MTPint vchannel_id; MTPint vid; }; class MTPDupdateBotCallbackQuery : public MTP::internal::TypeData { public: enum class Flag : int32 { f_data = (1 << 0), f_game_short_name = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_data() const { return vflags.v & Flag::f_data; } bool has_game_short_name() const { return vflags.v & Flag::f_game_short_name; } MTPDupdateBotCallbackQuery() = default; MTPDupdateBotCallbackQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPPeer &_peer, MTPint _msg_id, const MTPlong &_chat_instance, const MTPbytes &_data, const MTPstring &_game_short_name) : vflags(_flags), vquery_id(_query_id), vuser_id(_user_id), vpeer(_peer), vmsg_id(_msg_id), vchat_instance(_chat_instance), vdata(_data), vgame_short_name(_game_short_name) { } MTPflags vflags; MTPlong vquery_id; MTPint vuser_id; MTPPeer vpeer; MTPint vmsg_id; MTPlong vchat_instance; MTPbytes vdata; MTPstring vgame_short_name; }; class MTPDupdateEditMessage : public MTP::internal::TypeData { public: MTPDupdateEditMessage() = default; MTPDupdateEditMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) : vmessage(_message), vpts(_pts), vpts_count(_pts_count) { } MTPMessage vmessage; MTPint vpts; MTPint vpts_count; }; class MTPDupdateInlineBotCallbackQuery : public MTP::internal::TypeData { public: enum class Flag : int32 { f_data = (1 << 0), f_game_short_name = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_data() const { return vflags.v & Flag::f_data; } bool has_game_short_name() const { return vflags.v & Flag::f_game_short_name; } MTPDupdateInlineBotCallbackQuery() = default; MTPDupdateInlineBotCallbackQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPInputBotInlineMessageID &_msg_id, const MTPlong &_chat_instance, const MTPbytes &_data, const MTPstring &_game_short_name) : vflags(_flags), vquery_id(_query_id), vuser_id(_user_id), vmsg_id(_msg_id), vchat_instance(_chat_instance), vdata(_data), vgame_short_name(_game_short_name) { } MTPflags vflags; MTPlong vquery_id; MTPint vuser_id; MTPInputBotInlineMessageID vmsg_id; MTPlong vchat_instance; MTPbytes vdata; MTPstring vgame_short_name; }; class MTPDupdateReadChannelOutbox : public MTP::internal::TypeData { public: MTPDupdateReadChannelOutbox() = default; MTPDupdateReadChannelOutbox(MTPint _channel_id, MTPint _max_id) : vchannel_id(_channel_id), vmax_id(_max_id) { } MTPint vchannel_id; MTPint vmax_id; }; class MTPDupdateDraftMessage : public MTP::internal::TypeData { public: MTPDupdateDraftMessage() = default; MTPDupdateDraftMessage(const MTPPeer &_peer, const MTPDraftMessage &_draft) : vpeer(_peer), vdraft(_draft) { } MTPPeer vpeer; MTPDraftMessage vdraft; }; class MTPDupdateChannelWebPage : public MTP::internal::TypeData { public: MTPDupdateChannelWebPage() = default; MTPDupdateChannelWebPage(MTPint _channel_id, const MTPWebPage &_webpage, MTPint _pts, MTPint _pts_count) : vchannel_id(_channel_id), vwebpage(_webpage), vpts(_pts), vpts_count(_pts_count) { } MTPint vchannel_id; MTPWebPage vwebpage; MTPint vpts; MTPint vpts_count; }; class MTPDupdatePhoneCall : public MTP::internal::TypeData { public: MTPDupdatePhoneCall() = default; MTPDupdatePhoneCall(const MTPPhoneCall &_phone_call) : vphone_call(_phone_call) { } MTPPhoneCall vphone_call; }; class MTPDupdateDialogPinned : public MTP::internal::TypeData { public: enum class Flag : int32 { f_pinned = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_pinned() const { return vflags.v & Flag::f_pinned; } MTPDupdateDialogPinned() = default; MTPDupdateDialogPinned(const MTPflags &_flags, const MTPPeer &_peer) : vflags(_flags), vpeer(_peer) { } MTPflags vflags; MTPPeer vpeer; }; class MTPDupdatePinnedDialogs : public MTP::internal::TypeData { public: enum class Flag : int32 { f_order = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_order() const { return vflags.v & Flag::f_order; } MTPDupdatePinnedDialogs() = default; MTPDupdatePinnedDialogs(const MTPflags &_flags, const MTPVector &_order) : vflags(_flags), vorder(_order) { } MTPflags vflags; MTPVector vorder; }; class MTPDupdates_state : public MTP::internal::TypeData { public: MTPDupdates_state() = default; MTPDupdates_state(MTPint _pts, MTPint _qts, MTPint _date, MTPint _seq, MTPint _unread_count) : vpts(_pts), vqts(_qts), vdate(_date), vseq(_seq), vunread_count(_unread_count) { } MTPint vpts; MTPint vqts; MTPint vdate; MTPint vseq; MTPint vunread_count; }; class MTPDupdates_differenceEmpty : public MTP::internal::TypeData { public: MTPDupdates_differenceEmpty() = default; MTPDupdates_differenceEmpty(MTPint _date, MTPint _seq) : vdate(_date), vseq(_seq) { } MTPint vdate; MTPint vseq; }; class MTPDupdates_difference : public MTP::internal::TypeData { public: MTPDupdates_difference() = default; MTPDupdates_difference(const MTPVector &_new_messages, const MTPVector &_new_encrypted_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_state) : vnew_messages(_new_messages), vnew_encrypted_messages(_new_encrypted_messages), vother_updates(_other_updates), vchats(_chats), vusers(_users), vstate(_state) { } MTPVector vnew_messages; MTPVector vnew_encrypted_messages; MTPVector vother_updates; MTPVector vchats; MTPVector vusers; MTPupdates_State vstate; }; class MTPDupdates_differenceSlice : public MTP::internal::TypeData { public: MTPDupdates_differenceSlice() = default; MTPDupdates_differenceSlice(const MTPVector &_new_messages, const MTPVector &_new_encrypted_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_intermediate_state) : vnew_messages(_new_messages), vnew_encrypted_messages(_new_encrypted_messages), vother_updates(_other_updates), vchats(_chats), vusers(_users), vintermediate_state(_intermediate_state) { } MTPVector vnew_messages; MTPVector vnew_encrypted_messages; MTPVector vother_updates; MTPVector vchats; MTPVector vusers; MTPupdates_State vintermediate_state; }; class MTPDupdates_differenceTooLong : public MTP::internal::TypeData { public: MTPDupdates_differenceTooLong() = default; MTPDupdates_differenceTooLong(MTPint _pts) : vpts(_pts) { } MTPint vpts; }; class MTPDupdateShortMessage : public MTP::internal::TypeData { public: enum class Flag : int32 { f_out = (1 << 1), f_mentioned = (1 << 4), f_media_unread = (1 << 5), f_silent = (1 << 13), f_fwd_from = (1 << 2), f_via_bot_id = (1 << 11), f_reply_to_msg_id = (1 << 3), f_entities = (1 << 7), MAX_FIELD = (1 << 13), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_out() const { return vflags.v & Flag::f_out; } bool is_mentioned() const { return vflags.v & Flag::f_mentioned; } bool is_media_unread() const { return vflags.v & Flag::f_media_unread; } bool is_silent() const { return vflags.v & Flag::f_silent; } bool has_fwd_from() const { return vflags.v & Flag::f_fwd_from; } bool has_via_bot_id() const { return vflags.v & Flag::f_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPDupdateShortMessage() = default; MTPDupdateShortMessage(const MTPflags &_flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vuser_id(_user_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from(_fwd_from), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { } MTPflags vflags; MTPint vid; MTPint vuser_id; MTPstring vmessage; MTPint vpts; MTPint vpts_count; MTPint vdate; MTPMessageFwdHeader vfwd_from; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPVector ventities; }; class MTPDupdateShortChatMessage : public MTP::internal::TypeData { public: enum class Flag : int32 { f_out = (1 << 1), f_mentioned = (1 << 4), f_media_unread = (1 << 5), f_silent = (1 << 13), f_fwd_from = (1 << 2), f_via_bot_id = (1 << 11), f_reply_to_msg_id = (1 << 3), f_entities = (1 << 7), MAX_FIELD = (1 << 13), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_out() const { return vflags.v & Flag::f_out; } bool is_mentioned() const { return vflags.v & Flag::f_mentioned; } bool is_media_unread() const { return vflags.v & Flag::f_media_unread; } bool is_silent() const { return vflags.v & Flag::f_silent; } bool has_fwd_from() const { return vflags.v & Flag::f_fwd_from; } bool has_via_bot_id() const { return vflags.v & Flag::f_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPDupdateShortChatMessage() = default; MTPDupdateShortChatMessage(const MTPflags &_flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vfrom_id(_from_id), vchat_id(_chat_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from(_fwd_from), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { } MTPflags vflags; MTPint vid; MTPint vfrom_id; MTPint vchat_id; MTPstring vmessage; MTPint vpts; MTPint vpts_count; MTPint vdate; MTPMessageFwdHeader vfwd_from; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPVector ventities; }; class MTPDupdateShort : public MTP::internal::TypeData { public: MTPDupdateShort() = default; MTPDupdateShort(const MTPUpdate &_update, MTPint _date) : vupdate(_update), vdate(_date) { } MTPUpdate vupdate; MTPint vdate; }; class MTPDupdatesCombined : public MTP::internal::TypeData { public: MTPDupdatesCombined() = default; MTPDupdatesCombined(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq_start, MTPint _seq) : vupdates(_updates), vusers(_users), vchats(_chats), vdate(_date), vseq_start(_seq_start), vseq(_seq) { } MTPVector vupdates; MTPVector vusers; MTPVector vchats; MTPint vdate; MTPint vseq_start; MTPint vseq; }; class MTPDupdates : public MTP::internal::TypeData { public: MTPDupdates() = default; MTPDupdates(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq) : vupdates(_updates), vusers(_users), vchats(_chats), vdate(_date), vseq(_seq) { } MTPVector vupdates; MTPVector vusers; MTPVector vchats; MTPint vdate; MTPint vseq; }; class MTPDupdateShortSentMessage : public MTP::internal::TypeData { public: enum class Flag : int32 { f_out = (1 << 1), f_media = (1 << 9), f_entities = (1 << 7), MAX_FIELD = (1 << 9), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_out() const { return vflags.v & Flag::f_out; } bool has_media() const { return vflags.v & Flag::f_media; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPDupdateShortSentMessage() = default; MTPDupdateShortSentMessage(const MTPflags &_flags, MTPint _id, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageMedia &_media, const MTPVector &_entities) : vflags(_flags), vid(_id), vpts(_pts), vpts_count(_pts_count), vdate(_date), vmedia(_media), ventities(_entities) { } MTPflags vflags; MTPint vid; MTPint vpts; MTPint vpts_count; MTPint vdate; MTPMessageMedia vmedia; MTPVector ventities; }; class MTPDphotos_photos : public MTP::internal::TypeData { public: MTPDphotos_photos() = default; MTPDphotos_photos(const MTPVector &_photos, const MTPVector &_users) : vphotos(_photos), vusers(_users) { } MTPVector vphotos; MTPVector vusers; }; class MTPDphotos_photosSlice : public MTP::internal::TypeData { public: MTPDphotos_photosSlice() = default; MTPDphotos_photosSlice(MTPint _count, const MTPVector &_photos, const MTPVector &_users) : vcount(_count), vphotos(_photos), vusers(_users) { } MTPint vcount; MTPVector vphotos; MTPVector vusers; }; class MTPDphotos_photo : public MTP::internal::TypeData { public: MTPDphotos_photo() = default; MTPDphotos_photo(const MTPPhoto &_photo, const MTPVector &_users) : vphoto(_photo), vusers(_users) { } MTPPhoto vphoto; MTPVector vusers; }; class MTPDupload_file : public MTP::internal::TypeData { public: MTPDupload_file() = default; MTPDupload_file(const MTPstorage_FileType &_type, MTPint _mtime, const MTPbytes &_bytes) : vtype(_type), vmtime(_mtime), vbytes(_bytes) { } MTPstorage_FileType vtype; MTPint vmtime; MTPbytes vbytes; }; class MTPDdcOption : public MTP::internal::TypeData { public: enum class Flag : int32 { f_ipv6 = (1 << 0), f_media_only = (1 << 1), f_tcpo_only = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_ipv6() const { return vflags.v & Flag::f_ipv6; } bool is_media_only() const { return vflags.v & Flag::f_media_only; } bool is_tcpo_only() const { return vflags.v & Flag::f_tcpo_only; } MTPDdcOption() = default; MTPDdcOption(const MTPflags &_flags, MTPint _id, const MTPstring &_ip_address, MTPint _port) : vflags(_flags), vid(_id), vip_address(_ip_address), vport(_port) { } MTPflags vflags; MTPint vid; MTPstring vip_address; MTPint vport; }; class MTPDconfig : public MTP::internal::TypeData { public: enum class Flag : int32 { f_phonecalls_enabled = (1 << 1), f_tmp_sessions = (1 << 0), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_phonecalls_enabled() const { return vflags.v & Flag::f_phonecalls_enabled; } bool has_tmp_sessions() const { return vflags.v & Flag::f_tmp_sessions; } MTPDconfig() = default; MTPDconfig(const MTPflags &_flags, MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, MTPint _edit_time_limit, MTPint _rating_e_decay, MTPint _stickers_recent_limit, MTPint _tmp_sessions, MTPint _pinned_dialogs_count_max, MTPint _call_receive_timeout_ms, MTPint _call_ring_timeout_ms, MTPint _call_connect_timeout_ms, MTPint _call_packet_timeout_ms, const MTPVector &_disabled_features) : vflags(_flags), vdate(_date), vexpires(_expires), vtest_mode(_test_mode), vthis_dc(_this_dc), vdc_options(_dc_options), vchat_size_max(_chat_size_max), vmegagroup_size_max(_megagroup_size_max), vforwarded_count_max(_forwarded_count_max), vonline_update_period_ms(_online_update_period_ms), voffline_blur_timeout_ms(_offline_blur_timeout_ms), voffline_idle_timeout_ms(_offline_idle_timeout_ms), vonline_cloud_timeout_ms(_online_cloud_timeout_ms), vnotify_cloud_delay_ms(_notify_cloud_delay_ms), vnotify_default_delay_ms(_notify_default_delay_ms), vchat_big_size(_chat_big_size), vpush_chat_period_ms(_push_chat_period_ms), vpush_chat_limit(_push_chat_limit), vsaved_gifs_limit(_saved_gifs_limit), vedit_time_limit(_edit_time_limit), vrating_e_decay(_rating_e_decay), vstickers_recent_limit(_stickers_recent_limit), vtmp_sessions(_tmp_sessions), vpinned_dialogs_count_max(_pinned_dialogs_count_max), vcall_receive_timeout_ms(_call_receive_timeout_ms), vcall_ring_timeout_ms(_call_ring_timeout_ms), vcall_connect_timeout_ms(_call_connect_timeout_ms), vcall_packet_timeout_ms(_call_packet_timeout_ms), vdisabled_features(_disabled_features) { } MTPflags vflags; MTPint vdate; MTPint vexpires; MTPBool vtest_mode; MTPint vthis_dc; MTPVector vdc_options; MTPint vchat_size_max; MTPint vmegagroup_size_max; MTPint vforwarded_count_max; MTPint vonline_update_period_ms; MTPint voffline_blur_timeout_ms; MTPint voffline_idle_timeout_ms; MTPint vonline_cloud_timeout_ms; MTPint vnotify_cloud_delay_ms; MTPint vnotify_default_delay_ms; MTPint vchat_big_size; MTPint vpush_chat_period_ms; MTPint vpush_chat_limit; MTPint vsaved_gifs_limit; MTPint vedit_time_limit; MTPint vrating_e_decay; MTPint vstickers_recent_limit; MTPint vtmp_sessions; MTPint vpinned_dialogs_count_max; MTPint vcall_receive_timeout_ms; MTPint vcall_ring_timeout_ms; MTPint vcall_connect_timeout_ms; MTPint vcall_packet_timeout_ms; MTPVector vdisabled_features; }; class MTPDnearestDc : public MTP::internal::TypeData { public: MTPDnearestDc() = default; MTPDnearestDc(const MTPstring &_country, MTPint _this_dc, MTPint _nearest_dc) : vcountry(_country), vthis_dc(_this_dc), vnearest_dc(_nearest_dc) { } MTPstring vcountry; MTPint vthis_dc; MTPint vnearest_dc; }; class MTPDhelp_appUpdate : public MTP::internal::TypeData { public: MTPDhelp_appUpdate() = default; MTPDhelp_appUpdate(MTPint _id, MTPBool _critical, const MTPstring &_url, const MTPstring &_text) : vid(_id), vcritical(_critical), vurl(_url), vtext(_text) { } MTPint vid; MTPBool vcritical; MTPstring vurl; MTPstring vtext; }; class MTPDhelp_inviteText : public MTP::internal::TypeData { public: MTPDhelp_inviteText() = default; MTPDhelp_inviteText(const MTPstring &_message) : vmessage(_message) { } MTPstring vmessage; }; class MTPDencryptedChatEmpty : public MTP::internal::TypeData { public: MTPDencryptedChatEmpty() = default; MTPDencryptedChatEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDencryptedChatWaiting : public MTP::internal::TypeData { public: MTPDencryptedChatWaiting() = default; MTPDencryptedChatWaiting(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vadmin_id(_admin_id), vparticipant_id(_participant_id) { } MTPint vid; MTPlong vaccess_hash; MTPint vdate; MTPint vadmin_id; MTPint vparticipant_id; }; class MTPDencryptedChatRequested : public MTP::internal::TypeData { public: MTPDencryptedChatRequested() = default; MTPDencryptedChatRequested(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vadmin_id(_admin_id), vparticipant_id(_participant_id), vg_a(_g_a) { } MTPint vid; MTPlong vaccess_hash; MTPint vdate; MTPint vadmin_id; MTPint vparticipant_id; MTPbytes vg_a; }; class MTPDencryptedChat : public MTP::internal::TypeData { public: MTPDencryptedChat() = default; MTPDencryptedChat(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a_or_b, const MTPlong &_key_fingerprint) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vadmin_id(_admin_id), vparticipant_id(_participant_id), vg_a_or_b(_g_a_or_b), vkey_fingerprint(_key_fingerprint) { } MTPint vid; MTPlong vaccess_hash; MTPint vdate; MTPint vadmin_id; MTPint vparticipant_id; MTPbytes vg_a_or_b; MTPlong vkey_fingerprint; }; class MTPDencryptedChatDiscarded : public MTP::internal::TypeData { public: MTPDencryptedChatDiscarded() = default; MTPDencryptedChatDiscarded(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDinputEncryptedChat : public MTP::internal::TypeData { public: MTPDinputEncryptedChat() = default; MTPDinputEncryptedChat(MTPint _chat_id, const MTPlong &_access_hash) : vchat_id(_chat_id), vaccess_hash(_access_hash) { } MTPint vchat_id; MTPlong vaccess_hash; }; class MTPDencryptedFile : public MTP::internal::TypeData { public: MTPDencryptedFile() = default; MTPDencryptedFile(const MTPlong &_id, const MTPlong &_access_hash, MTPint _size, MTPint _dc_id, MTPint _key_fingerprint) : vid(_id), vaccess_hash(_access_hash), vsize(_size), vdc_id(_dc_id), vkey_fingerprint(_key_fingerprint) { } MTPlong vid; MTPlong vaccess_hash; MTPint vsize; MTPint vdc_id; MTPint vkey_fingerprint; }; class MTPDinputEncryptedFileUploaded : public MTP::internal::TypeData { public: MTPDinputEncryptedFileUploaded() = default; MTPDinputEncryptedFileUploaded(const MTPlong &_id, MTPint _parts, const MTPstring &_md5_checksum, MTPint _key_fingerprint) : vid(_id), vparts(_parts), vmd5_checksum(_md5_checksum), vkey_fingerprint(_key_fingerprint) { } MTPlong vid; MTPint vparts; MTPstring vmd5_checksum; MTPint vkey_fingerprint; }; class MTPDinputEncryptedFile : public MTP::internal::TypeData { public: MTPDinputEncryptedFile() = default; MTPDinputEncryptedFile(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputEncryptedFileBigUploaded : public MTP::internal::TypeData { public: MTPDinputEncryptedFileBigUploaded() = default; MTPDinputEncryptedFileBigUploaded(const MTPlong &_id, MTPint _parts, MTPint _key_fingerprint) : vid(_id), vparts(_parts), vkey_fingerprint(_key_fingerprint) { } MTPlong vid; MTPint vparts; MTPint vkey_fingerprint; }; class MTPDencryptedMessage : public MTP::internal::TypeData { public: MTPDencryptedMessage() = default; MTPDencryptedMessage(const MTPlong &_random_id, MTPint _chat_id, MTPint _date, const MTPbytes &_bytes, const MTPEncryptedFile &_file) : vrandom_id(_random_id), vchat_id(_chat_id), vdate(_date), vbytes(_bytes), vfile(_file) { } MTPlong vrandom_id; MTPint vchat_id; MTPint vdate; MTPbytes vbytes; MTPEncryptedFile vfile; }; class MTPDencryptedMessageService : public MTP::internal::TypeData { public: MTPDencryptedMessageService() = default; MTPDencryptedMessageService(const MTPlong &_random_id, MTPint _chat_id, MTPint _date, const MTPbytes &_bytes) : vrandom_id(_random_id), vchat_id(_chat_id), vdate(_date), vbytes(_bytes) { } MTPlong vrandom_id; MTPint vchat_id; MTPint vdate; MTPbytes vbytes; }; class MTPDmessages_dhConfigNotModified : public MTP::internal::TypeData { public: MTPDmessages_dhConfigNotModified() = default; MTPDmessages_dhConfigNotModified(const MTPbytes &_random) : vrandom(_random) { } MTPbytes vrandom; }; class MTPDmessages_dhConfig : public MTP::internal::TypeData { public: MTPDmessages_dhConfig() = default; MTPDmessages_dhConfig(MTPint _g, const MTPbytes &_p, MTPint _version, const MTPbytes &_random) : vg(_g), vp(_p), vversion(_version), vrandom(_random) { } MTPint vg; MTPbytes vp; MTPint vversion; MTPbytes vrandom; }; class MTPDmessages_sentEncryptedMessage : public MTP::internal::TypeData { public: MTPDmessages_sentEncryptedMessage() = default; MTPDmessages_sentEncryptedMessage(MTPint _date) : vdate(_date) { } MTPint vdate; }; class MTPDmessages_sentEncryptedFile : public MTP::internal::TypeData { public: MTPDmessages_sentEncryptedFile() = default; MTPDmessages_sentEncryptedFile(MTPint _date, const MTPEncryptedFile &_file) : vdate(_date), vfile(_file) { } MTPint vdate; MTPEncryptedFile vfile; }; class MTPDinputDocument : public MTP::internal::TypeData { public: MTPDinputDocument() = default; MTPDinputDocument(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDdocumentEmpty : public MTP::internal::TypeData { public: MTPDdocumentEmpty() = default; MTPDdocumentEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDdocument : public MTP::internal::TypeData { public: MTPDdocument() = default; MTPDdocument(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPstring &_mime_type, MTPint _size, const MTPPhotoSize &_thumb, MTPint _dc_id, MTPint _version, const MTPVector &_attributes) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vmime_type(_mime_type), vsize(_size), vthumb(_thumb), vdc_id(_dc_id), vversion(_version), vattributes(_attributes) { } MTPlong vid; MTPlong vaccess_hash; MTPint vdate; MTPstring vmime_type; MTPint vsize; MTPPhotoSize vthumb; MTPint vdc_id; MTPint vversion; MTPVector vattributes; }; class MTPDhelp_support : public MTP::internal::TypeData { public: MTPDhelp_support() = default; MTPDhelp_support(const MTPstring &_phone_number, const MTPUser &_user) : vphone_number(_phone_number), vuser(_user) { } MTPstring vphone_number; MTPUser vuser; }; class MTPDnotifyPeer : public MTP::internal::TypeData { public: MTPDnotifyPeer() = default; MTPDnotifyPeer(const MTPPeer &_peer) : vpeer(_peer) { } MTPPeer vpeer; }; class MTPDsendMessageUploadVideoAction : public MTP::internal::TypeData { public: MTPDsendMessageUploadVideoAction() = default; MTPDsendMessageUploadVideoAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDsendMessageUploadAudioAction : public MTP::internal::TypeData { public: MTPDsendMessageUploadAudioAction() = default; MTPDsendMessageUploadAudioAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDsendMessageUploadPhotoAction : public MTP::internal::TypeData { public: MTPDsendMessageUploadPhotoAction() = default; MTPDsendMessageUploadPhotoAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDsendMessageUploadDocumentAction : public MTP::internal::TypeData { public: MTPDsendMessageUploadDocumentAction() = default; MTPDsendMessageUploadDocumentAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDcontacts_found : public MTP::internal::TypeData { public: MTPDcontacts_found() = default; MTPDcontacts_found(const MTPVector &_results, const MTPVector &_chats, const MTPVector &_users) : vresults(_results), vchats(_chats), vusers(_users) { } MTPVector vresults; MTPVector vchats; MTPVector vusers; }; class MTPDinputPrivacyValueAllowUsers : public MTP::internal::TypeData { public: MTPDinputPrivacyValueAllowUsers() = default; MTPDinputPrivacyValueAllowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDinputPrivacyValueDisallowUsers : public MTP::internal::TypeData { public: MTPDinputPrivacyValueDisallowUsers() = default; MTPDinputPrivacyValueDisallowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDprivacyValueAllowUsers : public MTP::internal::TypeData { public: MTPDprivacyValueAllowUsers() = default; MTPDprivacyValueAllowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDprivacyValueDisallowUsers : public MTP::internal::TypeData { public: MTPDprivacyValueDisallowUsers() = default; MTPDprivacyValueDisallowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDaccount_privacyRules : public MTP::internal::TypeData { public: MTPDaccount_privacyRules() = default; MTPDaccount_privacyRules(const MTPVector &_rules, const MTPVector &_users) : vrules(_rules), vusers(_users) { } MTPVector vrules; MTPVector vusers; }; class MTPDaccountDaysTTL : public MTP::internal::TypeData { public: MTPDaccountDaysTTL() = default; MTPDaccountDaysTTL(MTPint _days) : vdays(_days) { } MTPint vdays; }; class MTPDdocumentAttributeImageSize : public MTP::internal::TypeData { public: MTPDdocumentAttributeImageSize() = default; MTPDdocumentAttributeImageSize(MTPint _w, MTPint _h) : vw(_w), vh(_h) { } MTPint vw; MTPint vh; }; class MTPDdocumentAttributeSticker : public MTP::internal::TypeData { public: enum class Flag : int32 { f_mask = (1 << 1), f_mask_coords = (1 << 0), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_mask() const { return vflags.v & Flag::f_mask; } bool has_mask_coords() const { return vflags.v & Flag::f_mask_coords; } MTPDdocumentAttributeSticker() = default; MTPDdocumentAttributeSticker(const MTPflags &_flags, const MTPstring &_alt, const MTPInputStickerSet &_stickerset, const MTPMaskCoords &_mask_coords) : vflags(_flags), valt(_alt), vstickerset(_stickerset), vmask_coords(_mask_coords) { } MTPflags vflags; MTPstring valt; MTPInputStickerSet vstickerset; MTPMaskCoords vmask_coords; }; class MTPDdocumentAttributeVideo : public MTP::internal::TypeData { public: MTPDdocumentAttributeVideo() = default; MTPDdocumentAttributeVideo(MTPint _duration, MTPint _w, MTPint _h) : vduration(_duration), vw(_w), vh(_h) { } MTPint vduration; MTPint vw; MTPint vh; }; class MTPDdocumentAttributeAudio : public MTP::internal::TypeData { public: enum class Flag : int32 { f_voice = (1 << 10), f_title = (1 << 0), f_performer = (1 << 1), f_waveform = (1 << 2), MAX_FIELD = (1 << 10), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_voice() const { return vflags.v & Flag::f_voice; } bool has_title() const { return vflags.v & Flag::f_title; } bool has_performer() const { return vflags.v & Flag::f_performer; } bool has_waveform() const { return vflags.v & Flag::f_waveform; } MTPDdocumentAttributeAudio() = default; MTPDdocumentAttributeAudio(const MTPflags &_flags, MTPint _duration, const MTPstring &_title, const MTPstring &_performer, const MTPbytes &_waveform) : vflags(_flags), vduration(_duration), vtitle(_title), vperformer(_performer), vwaveform(_waveform) { } MTPflags vflags; MTPint vduration; MTPstring vtitle; MTPstring vperformer; MTPbytes vwaveform; }; class MTPDdocumentAttributeFilename : public MTP::internal::TypeData { public: MTPDdocumentAttributeFilename() = default; MTPDdocumentAttributeFilename(const MTPstring &_file_name) : vfile_name(_file_name) { } MTPstring vfile_name; }; class MTPDmessages_stickers : public MTP::internal::TypeData { public: MTPDmessages_stickers() = default; MTPDmessages_stickers(const MTPstring &_hash, const MTPVector &_stickers) : vhash(_hash), vstickers(_stickers) { } MTPstring vhash; MTPVector vstickers; }; class MTPDstickerPack : public MTP::internal::TypeData { public: MTPDstickerPack() = default; MTPDstickerPack(const MTPstring &_emoticon, const MTPVector &_documents) : vemoticon(_emoticon), vdocuments(_documents) { } MTPstring vemoticon; MTPVector vdocuments; }; class MTPDmessages_allStickers : public MTP::internal::TypeData { public: MTPDmessages_allStickers() = default; MTPDmessages_allStickers(MTPint _hash, const MTPVector &_sets) : vhash(_hash), vsets(_sets) { } MTPint vhash; MTPVector vsets; }; class MTPDdisabledFeature : public MTP::internal::TypeData { public: MTPDdisabledFeature() = default; MTPDdisabledFeature(const MTPstring &_feature, const MTPstring &_description) : vfeature(_feature), vdescription(_description) { } MTPstring vfeature; MTPstring vdescription; }; class MTPDmessages_affectedMessages : public MTP::internal::TypeData { public: MTPDmessages_affectedMessages() = default; MTPDmessages_affectedMessages(MTPint _pts, MTPint _pts_count) : vpts(_pts), vpts_count(_pts_count) { } MTPint vpts; MTPint vpts_count; }; class MTPDwebPageEmpty : public MTP::internal::TypeData { public: MTPDwebPageEmpty() = default; MTPDwebPageEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDwebPagePending : public MTP::internal::TypeData { public: MTPDwebPagePending() = default; MTPDwebPagePending(const MTPlong &_id, MTPint _date) : vid(_id), vdate(_date) { } MTPlong vid; MTPint vdate; }; class MTPDwebPage : public MTP::internal::TypeData { public: enum class Flag : int32 { f_type = (1 << 0), f_site_name = (1 << 1), f_title = (1 << 2), f_description = (1 << 3), f_photo = (1 << 4), f_embed_url = (1 << 5), f_embed_type = (1 << 5), f_embed_width = (1 << 6), f_embed_height = (1 << 6), f_duration = (1 << 7), f_author = (1 << 8), f_document = (1 << 9), f_cached_page = (1 << 10), MAX_FIELD = (1 << 10), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_type() const { return vflags.v & Flag::f_type; } bool has_site_name() const { return vflags.v & Flag::f_site_name; } bool has_title() const { return vflags.v & Flag::f_title; } bool has_description() const { return vflags.v & Flag::f_description; } bool has_photo() const { return vflags.v & Flag::f_photo; } bool has_embed_url() const { return vflags.v & Flag::f_embed_url; } bool has_embed_type() const { return vflags.v & Flag::f_embed_type; } bool has_embed_width() const { return vflags.v & Flag::f_embed_width; } bool has_embed_height() const { return vflags.v & Flag::f_embed_height; } bool has_duration() const { return vflags.v & Flag::f_duration; } bool has_author() const { return vflags.v & Flag::f_author; } bool has_document() const { return vflags.v & Flag::f_document; } bool has_cached_page() const { return vflags.v & Flag::f_cached_page; } MTPDwebPage() = default; MTPDwebPage(const MTPflags &_flags, const MTPlong &_id, const MTPstring &_url, const MTPstring &_display_url, MTPint _hash, const MTPstring &_type, const MTPstring &_site_name, const MTPstring &_title, const MTPstring &_description, const MTPPhoto &_photo, const MTPstring &_embed_url, const MTPstring &_embed_type, MTPint _embed_width, MTPint _embed_height, MTPint _duration, const MTPstring &_author, const MTPDocument &_document, const MTPPage &_cached_page) : vflags(_flags), vid(_id), vurl(_url), vdisplay_url(_display_url), vhash(_hash), vtype(_type), vsite_name(_site_name), vtitle(_title), vdescription(_description), vphoto(_photo), vembed_url(_embed_url), vembed_type(_embed_type), vembed_width(_embed_width), vembed_height(_embed_height), vduration(_duration), vauthor(_author), vdocument(_document), vcached_page(_cached_page) { } MTPflags vflags; MTPlong vid; MTPstring vurl; MTPstring vdisplay_url; MTPint vhash; MTPstring vtype; MTPstring vsite_name; MTPstring vtitle; MTPstring vdescription; MTPPhoto vphoto; MTPstring vembed_url; MTPstring vembed_type; MTPint vembed_width; MTPint vembed_height; MTPint vduration; MTPstring vauthor; MTPDocument vdocument; MTPPage vcached_page; }; class MTPDauthorization : public MTP::internal::TypeData { public: MTPDauthorization() = default; MTPDauthorization(const MTPlong &_hash, MTPint _flags, const MTPstring &_device_model, const MTPstring &_platform, const MTPstring &_system_version, MTPint _api_id, const MTPstring &_app_name, const MTPstring &_app_version, MTPint _date_created, MTPint _date_active, const MTPstring &_ip, const MTPstring &_country, const MTPstring &_region) : vhash(_hash), vflags(_flags), vdevice_model(_device_model), vplatform(_platform), vsystem_version(_system_version), vapi_id(_api_id), vapp_name(_app_name), vapp_version(_app_version), vdate_created(_date_created), vdate_active(_date_active), vip(_ip), vcountry(_country), vregion(_region) { } MTPlong vhash; MTPint vflags; MTPstring vdevice_model; MTPstring vplatform; MTPstring vsystem_version; MTPint vapi_id; MTPstring vapp_name; MTPstring vapp_version; MTPint vdate_created; MTPint vdate_active; MTPstring vip; MTPstring vcountry; MTPstring vregion; }; class MTPDaccount_authorizations : public MTP::internal::TypeData { public: MTPDaccount_authorizations() = default; MTPDaccount_authorizations(const MTPVector &_authorizations) : vauthorizations(_authorizations) { } MTPVector vauthorizations; }; class MTPDaccount_noPassword : public MTP::internal::TypeData { public: MTPDaccount_noPassword() = default; MTPDaccount_noPassword(const MTPbytes &_new_salt, const MTPstring &_email_unconfirmed_pattern) : vnew_salt(_new_salt), vemail_unconfirmed_pattern(_email_unconfirmed_pattern) { } MTPbytes vnew_salt; MTPstring vemail_unconfirmed_pattern; }; class MTPDaccount_password : public MTP::internal::TypeData { public: MTPDaccount_password() = default; MTPDaccount_password(const MTPbytes &_current_salt, const MTPbytes &_new_salt, const MTPstring &_hint, MTPBool _has_recovery, const MTPstring &_email_unconfirmed_pattern) : vcurrent_salt(_current_salt), vnew_salt(_new_salt), vhint(_hint), vhas_recovery(_has_recovery), vemail_unconfirmed_pattern(_email_unconfirmed_pattern) { } MTPbytes vcurrent_salt; MTPbytes vnew_salt; MTPstring vhint; MTPBool vhas_recovery; MTPstring vemail_unconfirmed_pattern; }; class MTPDaccount_passwordSettings : public MTP::internal::TypeData { public: MTPDaccount_passwordSettings() = default; MTPDaccount_passwordSettings(const MTPstring &_email) : vemail(_email) { } MTPstring vemail; }; class MTPDaccount_passwordInputSettings : public MTP::internal::TypeData { public: enum class Flag : int32 { f_new_salt = (1 << 0), f_new_password_hash = (1 << 0), f_hint = (1 << 0), f_email = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_new_salt() const { return vflags.v & Flag::f_new_salt; } bool has_new_password_hash() const { return vflags.v & Flag::f_new_password_hash; } bool has_hint() const { return vflags.v & Flag::f_hint; } bool has_email() const { return vflags.v & Flag::f_email; } MTPDaccount_passwordInputSettings() = default; MTPDaccount_passwordInputSettings(const MTPflags &_flags, const MTPbytes &_new_salt, const MTPbytes &_new_password_hash, const MTPstring &_hint, const MTPstring &_email) : vflags(_flags), vnew_salt(_new_salt), vnew_password_hash(_new_password_hash), vhint(_hint), vemail(_email) { } MTPflags vflags; MTPbytes vnew_salt; MTPbytes vnew_password_hash; MTPstring vhint; MTPstring vemail; }; class MTPDauth_passwordRecovery : public MTP::internal::TypeData { public: MTPDauth_passwordRecovery() = default; MTPDauth_passwordRecovery(const MTPstring &_email_pattern) : vemail_pattern(_email_pattern) { } MTPstring vemail_pattern; }; class MTPDreceivedNotifyMessage : public MTP::internal::TypeData { public: MTPDreceivedNotifyMessage() = default; MTPDreceivedNotifyMessage(MTPint _id, MTPint _flags) : vid(_id), vflags(_flags) { } MTPint vid; MTPint vflags; }; class MTPDchatInviteExported : public MTP::internal::TypeData { public: MTPDchatInviteExported() = default; MTPDchatInviteExported(const MTPstring &_link) : vlink(_link) { } MTPstring vlink; }; class MTPDchatInviteAlready : public MTP::internal::TypeData { public: MTPDchatInviteAlready() = default; MTPDchatInviteAlready(const MTPChat &_chat) : vchat(_chat) { } MTPChat vchat; }; class MTPDchatInvite : public MTP::internal::TypeData { public: enum class Flag : int32 { f_channel = (1 << 0), f_broadcast = (1 << 1), f_public = (1 << 2), f_megagroup = (1 << 3), f_participants = (1 << 4), MAX_FIELD = (1 << 4), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_channel() const { return vflags.v & Flag::f_channel; } bool is_broadcast() const { return vflags.v & Flag::f_broadcast; } bool is_public() const { return vflags.v & Flag::f_public; } bool is_megagroup() const { return vflags.v & Flag::f_megagroup; } bool has_participants() const { return vflags.v & Flag::f_participants; } MTPDchatInvite() = default; MTPDchatInvite(const MTPflags &_flags, const MTPstring &_title, const MTPChatPhoto &_photo, MTPint _participants_count, const MTPVector &_participants) : vflags(_flags), vtitle(_title), vphoto(_photo), vparticipants_count(_participants_count), vparticipants(_participants) { } MTPflags vflags; MTPstring vtitle; MTPChatPhoto vphoto; MTPint vparticipants_count; MTPVector vparticipants; }; class MTPDinputStickerSetID : public MTP::internal::TypeData { public: MTPDinputStickerSetID() = default; MTPDinputStickerSetID(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputStickerSetShortName : public MTP::internal::TypeData { public: MTPDinputStickerSetShortName() = default; MTPDinputStickerSetShortName(const MTPstring &_short_name) : vshort_name(_short_name) { } MTPstring vshort_name; }; class MTPDstickerSet : public MTP::internal::TypeData { public: enum class Flag : int32 { f_installed = (1 << 0), f_archived = (1 << 1), f_official = (1 << 2), f_masks = (1 << 3), MAX_FIELD = (1 << 3), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_installed() const { return vflags.v & Flag::f_installed; } bool is_archived() const { return vflags.v & Flag::f_archived; } bool is_official() const { return vflags.v & Flag::f_official; } bool is_masks() const { return vflags.v & Flag::f_masks; } MTPDstickerSet() = default; MTPDstickerSet(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, const MTPstring &_title, const MTPstring &_short_name, MTPint _count, MTPint _hash) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vtitle(_title), vshort_name(_short_name), vcount(_count), vhash(_hash) { } MTPflags vflags; MTPlong vid; MTPlong vaccess_hash; MTPstring vtitle; MTPstring vshort_name; MTPint vcount; MTPint vhash; }; class MTPDmessages_stickerSet : public MTP::internal::TypeData { public: MTPDmessages_stickerSet() = default; MTPDmessages_stickerSet(const MTPStickerSet &_set, const MTPVector &_packs, const MTPVector &_documents) : vset(_set), vpacks(_packs), vdocuments(_documents) { } MTPStickerSet vset; MTPVector vpacks; MTPVector vdocuments; }; class MTPDbotCommand : public MTP::internal::TypeData { public: MTPDbotCommand() = default; MTPDbotCommand(const MTPstring &_command, const MTPstring &_description) : vcommand(_command), vdescription(_description) { } MTPstring vcommand; MTPstring vdescription; }; class MTPDbotInfo : public MTP::internal::TypeData { public: MTPDbotInfo() = default; MTPDbotInfo(MTPint _user_id, const MTPstring &_description, const MTPVector &_commands) : vuser_id(_user_id), vdescription(_description), vcommands(_commands) { } MTPint vuser_id; MTPstring vdescription; MTPVector vcommands; }; class MTPDkeyboardButton : public MTP::internal::TypeData { public: MTPDkeyboardButton() = default; MTPDkeyboardButton(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonUrl : public MTP::internal::TypeData { public: MTPDkeyboardButtonUrl() = default; MTPDkeyboardButtonUrl(const MTPstring &_text, const MTPstring &_url) : vtext(_text), vurl(_url) { } MTPstring vtext; MTPstring vurl; }; class MTPDkeyboardButtonCallback : public MTP::internal::TypeData { public: MTPDkeyboardButtonCallback() = default; MTPDkeyboardButtonCallback(const MTPstring &_text, const MTPbytes &_data) : vtext(_text), vdata(_data) { } MTPstring vtext; MTPbytes vdata; }; class MTPDkeyboardButtonRequestPhone : public MTP::internal::TypeData { public: MTPDkeyboardButtonRequestPhone() = default; MTPDkeyboardButtonRequestPhone(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonRequestGeoLocation : public MTP::internal::TypeData { public: MTPDkeyboardButtonRequestGeoLocation() = default; MTPDkeyboardButtonRequestGeoLocation(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonSwitchInline : public MTP::internal::TypeData { public: enum class Flag : int32 { f_same_peer = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_same_peer() const { return vflags.v & Flag::f_same_peer; } MTPDkeyboardButtonSwitchInline() = default; MTPDkeyboardButtonSwitchInline(const MTPflags &_flags, const MTPstring &_text, const MTPstring &_query) : vflags(_flags), vtext(_text), vquery(_query) { } MTPflags vflags; MTPstring vtext; MTPstring vquery; }; class MTPDkeyboardButtonGame : public MTP::internal::TypeData { public: MTPDkeyboardButtonGame() = default; MTPDkeyboardButtonGame(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonRow : public MTP::internal::TypeData { public: MTPDkeyboardButtonRow() = default; MTPDkeyboardButtonRow(const MTPVector &_buttons) : vbuttons(_buttons) { } MTPVector vbuttons; }; class MTPDreplyKeyboardHide : public MTP::internal::TypeData { public: enum class Flag : int32 { f_selective = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_selective() const { return vflags.v & Flag::f_selective; } MTPDreplyKeyboardHide() = default; MTPDreplyKeyboardHide(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDreplyKeyboardForceReply : public MTP::internal::TypeData { public: enum class Flag : int32 { f_single_use = (1 << 1), f_selective = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_single_use() const { return vflags.v & Flag::f_single_use; } bool is_selective() const { return vflags.v & Flag::f_selective; } MTPDreplyKeyboardForceReply() = default; MTPDreplyKeyboardForceReply(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDreplyKeyboardMarkup : public MTP::internal::TypeData { public: enum class Flag : int32 { f_resize = (1 << 0), f_single_use = (1 << 1), f_selective = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_resize() const { return vflags.v & Flag::f_resize; } bool is_single_use() const { return vflags.v & Flag::f_single_use; } bool is_selective() const { return vflags.v & Flag::f_selective; } MTPDreplyKeyboardMarkup() = default; MTPDreplyKeyboardMarkup(const MTPflags &_flags, const MTPVector &_rows) : vflags(_flags), vrows(_rows) { } MTPflags vflags; MTPVector vrows; }; class MTPDreplyInlineMarkup : public MTP::internal::TypeData { public: MTPDreplyInlineMarkup() = default; MTPDreplyInlineMarkup(const MTPVector &_rows) : vrows(_rows) { } MTPVector vrows; }; class MTPDhelp_appChangelog : public MTP::internal::TypeData { public: MTPDhelp_appChangelog() = default; MTPDhelp_appChangelog(const MTPstring &_message, const MTPMessageMedia &_media, const MTPVector &_entities) : vmessage(_message), vmedia(_media), ventities(_entities) { } MTPstring vmessage; MTPMessageMedia vmedia; MTPVector ventities; }; class MTPDmessageEntityUnknown : public MTP::internal::TypeData { public: MTPDmessageEntityUnknown() = default; MTPDmessageEntityUnknown(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityMention : public MTP::internal::TypeData { public: MTPDmessageEntityMention() = default; MTPDmessageEntityMention(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityHashtag : public MTP::internal::TypeData { public: MTPDmessageEntityHashtag() = default; MTPDmessageEntityHashtag(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityBotCommand : public MTP::internal::TypeData { public: MTPDmessageEntityBotCommand() = default; MTPDmessageEntityBotCommand(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityUrl : public MTP::internal::TypeData { public: MTPDmessageEntityUrl() = default; MTPDmessageEntityUrl(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityEmail : public MTP::internal::TypeData { public: MTPDmessageEntityEmail() = default; MTPDmessageEntityEmail(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityBold : public MTP::internal::TypeData { public: MTPDmessageEntityBold() = default; MTPDmessageEntityBold(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityItalic : public MTP::internal::TypeData { public: MTPDmessageEntityItalic() = default; MTPDmessageEntityItalic(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityCode : public MTP::internal::TypeData { public: MTPDmessageEntityCode() = default; MTPDmessageEntityCode(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityPre : public MTP::internal::TypeData { public: MTPDmessageEntityPre() = default; MTPDmessageEntityPre(MTPint _offset, MTPint _length, const MTPstring &_language) : voffset(_offset), vlength(_length), vlanguage(_language) { } MTPint voffset; MTPint vlength; MTPstring vlanguage; }; class MTPDmessageEntityTextUrl : public MTP::internal::TypeData { public: MTPDmessageEntityTextUrl() = default; MTPDmessageEntityTextUrl(MTPint _offset, MTPint _length, const MTPstring &_url) : voffset(_offset), vlength(_length), vurl(_url) { } MTPint voffset; MTPint vlength; MTPstring vurl; }; class MTPDmessageEntityMentionName : public MTP::internal::TypeData { public: MTPDmessageEntityMentionName() = default; MTPDmessageEntityMentionName(MTPint _offset, MTPint _length, MTPint _user_id) : voffset(_offset), vlength(_length), vuser_id(_user_id) { } MTPint voffset; MTPint vlength; MTPint vuser_id; }; class MTPDinputMessageEntityMentionName : public MTP::internal::TypeData { public: MTPDinputMessageEntityMentionName() = default; MTPDinputMessageEntityMentionName(MTPint _offset, MTPint _length, const MTPInputUser &_user_id) : voffset(_offset), vlength(_length), vuser_id(_user_id) { } MTPint voffset; MTPint vlength; MTPInputUser vuser_id; }; class MTPDinputChannel : public MTP::internal::TypeData { public: MTPDinputChannel() = default; MTPDinputChannel(MTPint _channel_id, const MTPlong &_access_hash) : vchannel_id(_channel_id), vaccess_hash(_access_hash) { } MTPint vchannel_id; MTPlong vaccess_hash; }; class MTPDcontacts_resolvedPeer : public MTP::internal::TypeData { public: MTPDcontacts_resolvedPeer() = default; MTPDcontacts_resolvedPeer(const MTPPeer &_peer, const MTPVector &_chats, const MTPVector &_users) : vpeer(_peer), vchats(_chats), vusers(_users) { } MTPPeer vpeer; MTPVector vchats; MTPVector vusers; }; class MTPDmessageRange : public MTP::internal::TypeData { public: MTPDmessageRange() = default; MTPDmessageRange(MTPint _min_id, MTPint _max_id) : vmin_id(_min_id), vmax_id(_max_id) { } MTPint vmin_id; MTPint vmax_id; }; class MTPDupdates_channelDifferenceEmpty : public MTP::internal::TypeData { public: enum class Flag : int32 { f_final = (1 << 0), f_timeout = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_final() const { return vflags.v & Flag::f_final; } bool has_timeout() const { return vflags.v & Flag::f_timeout; } MTPDupdates_channelDifferenceEmpty() = default; MTPDupdates_channelDifferenceEmpty(const MTPflags &_flags, MTPint _pts, MTPint _timeout) : vflags(_flags), vpts(_pts), vtimeout(_timeout) { } MTPflags vflags; MTPint vpts; MTPint vtimeout; }; class MTPDupdates_channelDifferenceTooLong : public MTP::internal::TypeData { public: enum class Flag : int32 { f_final = (1 << 0), f_timeout = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_final() const { return vflags.v & Flag::f_final; } bool has_timeout() const { return vflags.v & Flag::f_timeout; } MTPDupdates_channelDifferenceTooLong() = default; MTPDupdates_channelDifferenceTooLong(const MTPflags &_flags, MTPint _pts, MTPint _timeout, MTPint _top_message, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) : vflags(_flags), vpts(_pts), vtimeout(_timeout), vtop_message(_top_message), vread_inbox_max_id(_read_inbox_max_id), vread_outbox_max_id(_read_outbox_max_id), vunread_count(_unread_count), vmessages(_messages), vchats(_chats), vusers(_users) { } MTPflags vflags; MTPint vpts; MTPint vtimeout; MTPint vtop_message; MTPint vread_inbox_max_id; MTPint vread_outbox_max_id; MTPint vunread_count; MTPVector vmessages; MTPVector vchats; MTPVector vusers; }; class MTPDupdates_channelDifference : public MTP::internal::TypeData { public: enum class Flag : int32 { f_final = (1 << 0), f_timeout = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_final() const { return vflags.v & Flag::f_final; } bool has_timeout() const { return vflags.v & Flag::f_timeout; } MTPDupdates_channelDifference() = default; MTPDupdates_channelDifference(const MTPflags &_flags, MTPint _pts, MTPint _timeout, const MTPVector &_new_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users) : vflags(_flags), vpts(_pts), vtimeout(_timeout), vnew_messages(_new_messages), vother_updates(_other_updates), vchats(_chats), vusers(_users) { } MTPflags vflags; MTPint vpts; MTPint vtimeout; MTPVector vnew_messages; MTPVector vother_updates; MTPVector vchats; MTPVector vusers; }; class MTPDchannelMessagesFilter : public MTP::internal::TypeData { public: enum class Flag : int32 { f_exclude_new_messages = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_exclude_new_messages() const { return vflags.v & Flag::f_exclude_new_messages; } MTPDchannelMessagesFilter() = default; MTPDchannelMessagesFilter(const MTPflags &_flags, const MTPVector &_ranges) : vflags(_flags), vranges(_ranges) { } MTPflags vflags; MTPVector vranges; }; class MTPDchannelParticipant : public MTP::internal::TypeData { public: MTPDchannelParticipant() = default; MTPDchannelParticipant(MTPint _user_id, MTPint _date) : vuser_id(_user_id), vdate(_date) { } MTPint vuser_id; MTPint vdate; }; class MTPDchannelParticipantSelf : public MTP::internal::TypeData { public: MTPDchannelParticipantSelf() = default; MTPDchannelParticipantSelf(MTPint _user_id, MTPint _inviter_id, MTPint _date) : vuser_id(_user_id), vinviter_id(_inviter_id), vdate(_date) { } MTPint vuser_id; MTPint vinviter_id; MTPint vdate; }; class MTPDchannelParticipantModerator : public MTP::internal::TypeData { public: MTPDchannelParticipantModerator() = default; MTPDchannelParticipantModerator(MTPint _user_id, MTPint _inviter_id, MTPint _date) : vuser_id(_user_id), vinviter_id(_inviter_id), vdate(_date) { } MTPint vuser_id; MTPint vinviter_id; MTPint vdate; }; class MTPDchannelParticipantEditor : public MTP::internal::TypeData { public: MTPDchannelParticipantEditor() = default; MTPDchannelParticipantEditor(MTPint _user_id, MTPint _inviter_id, MTPint _date) : vuser_id(_user_id), vinviter_id(_inviter_id), vdate(_date) { } MTPint vuser_id; MTPint vinviter_id; MTPint vdate; }; class MTPDchannelParticipantKicked : public MTP::internal::TypeData { public: MTPDchannelParticipantKicked() = default; MTPDchannelParticipantKicked(MTPint _user_id, MTPint _kicked_by, MTPint _date) : vuser_id(_user_id), vkicked_by(_kicked_by), vdate(_date) { } MTPint vuser_id; MTPint vkicked_by; MTPint vdate; }; class MTPDchannelParticipantCreator : public MTP::internal::TypeData { public: MTPDchannelParticipantCreator() = default; MTPDchannelParticipantCreator(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDchannels_channelParticipants : public MTP::internal::TypeData { public: MTPDchannels_channelParticipants() = default; MTPDchannels_channelParticipants(MTPint _count, const MTPVector &_participants, const MTPVector &_users) : vcount(_count), vparticipants(_participants), vusers(_users) { } MTPint vcount; MTPVector vparticipants; MTPVector vusers; }; class MTPDchannels_channelParticipant : public MTP::internal::TypeData { public: MTPDchannels_channelParticipant() = default; MTPDchannels_channelParticipant(const MTPChannelParticipant &_participant, const MTPVector &_users) : vparticipant(_participant), vusers(_users) { } MTPChannelParticipant vparticipant; MTPVector vusers; }; class MTPDhelp_termsOfService : public MTP::internal::TypeData { public: MTPDhelp_termsOfService() = default; MTPDhelp_termsOfService(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDfoundGif : public MTP::internal::TypeData { public: MTPDfoundGif() = default; MTPDfoundGif(const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h) : vurl(_url), vthumb_url(_thumb_url), vcontent_url(_content_url), vcontent_type(_content_type), vw(_w), vh(_h) { } MTPstring vurl; MTPstring vthumb_url; MTPstring vcontent_url; MTPstring vcontent_type; MTPint vw; MTPint vh; }; class MTPDfoundGifCached : public MTP::internal::TypeData { public: MTPDfoundGifCached() = default; MTPDfoundGifCached(const MTPstring &_url, const MTPPhoto &_photo, const MTPDocument &_document) : vurl(_url), vphoto(_photo), vdocument(_document) { } MTPstring vurl; MTPPhoto vphoto; MTPDocument vdocument; }; class MTPDmessages_foundGifs : public MTP::internal::TypeData { public: MTPDmessages_foundGifs() = default; MTPDmessages_foundGifs(MTPint _next_offset, const MTPVector &_results) : vnext_offset(_next_offset), vresults(_results) { } MTPint vnext_offset; MTPVector vresults; }; class MTPDmessages_savedGifs : public MTP::internal::TypeData { public: MTPDmessages_savedGifs() = default; MTPDmessages_savedGifs(MTPint _hash, const MTPVector &_gifs) : vhash(_hash), vgifs(_gifs) { } MTPint vhash; MTPVector vgifs; }; class MTPDinputBotInlineMessageMediaAuto : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDinputBotInlineMessageMediaAuto() = default; MTPDinputBotInlineMessageMediaAuto(const MTPflags &_flags, const MTPstring &_caption, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vcaption(_caption), vreply_markup(_reply_markup) { } MTPflags vflags; MTPstring vcaption; MTPReplyMarkup vreply_markup; }; class MTPDinputBotInlineMessageText : public MTP::internal::TypeData { public: enum class Flag : int32 { f_no_webpage = (1 << 0), f_entities = (1 << 1), f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool has_entities() const { return vflags.v & Flag::f_entities; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDinputBotInlineMessageText() = default; MTPDinputBotInlineMessageText(const MTPflags &_flags, const MTPstring &_message, const MTPVector &_entities, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vmessage(_message), ventities(_entities), vreply_markup(_reply_markup) { } MTPflags vflags; MTPstring vmessage; MTPVector ventities; MTPReplyMarkup vreply_markup; }; class MTPDinputBotInlineMessageMediaGeo : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDinputBotInlineMessageMediaGeo() = default; MTPDinputBotInlineMessageMediaGeo(const MTPflags &_flags, const MTPInputGeoPoint &_geo_point, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vgeo_point(_geo_point), vreply_markup(_reply_markup) { } MTPflags vflags; MTPInputGeoPoint vgeo_point; MTPReplyMarkup vreply_markup; }; class MTPDinputBotInlineMessageMediaVenue : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDinputBotInlineMessageMediaVenue() = default; MTPDinputBotInlineMessageMediaVenue(const MTPflags &_flags, const MTPInputGeoPoint &_geo_point, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vgeo_point(_geo_point), vtitle(_title), vaddress(_address), vprovider(_provider), vvenue_id(_venue_id), vreply_markup(_reply_markup) { } MTPflags vflags; MTPInputGeoPoint vgeo_point; MTPstring vtitle; MTPstring vaddress; MTPstring vprovider; MTPstring vvenue_id; MTPReplyMarkup vreply_markup; }; class MTPDinputBotInlineMessageMediaContact : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDinputBotInlineMessageMediaContact() = default; MTPDinputBotInlineMessageMediaContact(const MTPflags &_flags, const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vphone_number(_phone_number), vfirst_name(_first_name), vlast_name(_last_name), vreply_markup(_reply_markup) { } MTPflags vflags; MTPstring vphone_number; MTPstring vfirst_name; MTPstring vlast_name; MTPReplyMarkup vreply_markup; }; class MTPDinputBotInlineMessageGame : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDinputBotInlineMessageGame() = default; MTPDinputBotInlineMessageGame(const MTPflags &_flags, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vreply_markup(_reply_markup) { } MTPflags vflags; MTPReplyMarkup vreply_markup; }; class MTPDinputBotInlineResult : public MTP::internal::TypeData { public: enum class Flag : int32 { f_title = (1 << 1), f_description = (1 << 2), f_url = (1 << 3), f_thumb_url = (1 << 4), f_content_url = (1 << 5), f_content_type = (1 << 5), f_w = (1 << 6), f_h = (1 << 6), f_duration = (1 << 7), MAX_FIELD = (1 << 7), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_title() const { return vflags.v & Flag::f_title; } bool has_description() const { return vflags.v & Flag::f_description; } bool has_url() const { return vflags.v & Flag::f_url; } bool has_thumb_url() const { return vflags.v & Flag::f_thumb_url; } bool has_content_url() const { return vflags.v & Flag::f_content_url; } bool has_content_type() const { return vflags.v & Flag::f_content_type; } bool has_w() const { return vflags.v & Flag::f_w; } bool has_h() const { return vflags.v & Flag::f_h; } bool has_duration() const { return vflags.v & Flag::f_duration; } MTPDinputBotInlineResult() = default; MTPDinputBotInlineResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h, MTPint _duration, const MTPInputBotInlineMessage &_send_message) : vflags(_flags), vid(_id), vtype(_type), vtitle(_title), vdescription(_description), vurl(_url), vthumb_url(_thumb_url), vcontent_url(_content_url), vcontent_type(_content_type), vw(_w), vh(_h), vduration(_duration), vsend_message(_send_message) { } MTPflags vflags; MTPstring vid; MTPstring vtype; MTPstring vtitle; MTPstring vdescription; MTPstring vurl; MTPstring vthumb_url; MTPstring vcontent_url; MTPstring vcontent_type; MTPint vw; MTPint vh; MTPint vduration; MTPInputBotInlineMessage vsend_message; }; class MTPDinputBotInlineResultPhoto : public MTP::internal::TypeData { public: MTPDinputBotInlineResultPhoto() = default; MTPDinputBotInlineResultPhoto(const MTPstring &_id, const MTPstring &_type, const MTPInputPhoto &_photo, const MTPInputBotInlineMessage &_send_message) : vid(_id), vtype(_type), vphoto(_photo), vsend_message(_send_message) { } MTPstring vid; MTPstring vtype; MTPInputPhoto vphoto; MTPInputBotInlineMessage vsend_message; }; class MTPDinputBotInlineResultDocument : public MTP::internal::TypeData { public: enum class Flag : int32 { f_title = (1 << 1), f_description = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_title() const { return vflags.v & Flag::f_title; } bool has_description() const { return vflags.v & Flag::f_description; } MTPDinputBotInlineResultDocument() = default; MTPDinputBotInlineResultDocument(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPInputDocument &_document, const MTPInputBotInlineMessage &_send_message) : vflags(_flags), vid(_id), vtype(_type), vtitle(_title), vdescription(_description), vdocument(_document), vsend_message(_send_message) { } MTPflags vflags; MTPstring vid; MTPstring vtype; MTPstring vtitle; MTPstring vdescription; MTPInputDocument vdocument; MTPInputBotInlineMessage vsend_message; }; class MTPDinputBotInlineResultGame : public MTP::internal::TypeData { public: MTPDinputBotInlineResultGame() = default; MTPDinputBotInlineResultGame(const MTPstring &_id, const MTPstring &_short_name, const MTPInputBotInlineMessage &_send_message) : vid(_id), vshort_name(_short_name), vsend_message(_send_message) { } MTPstring vid; MTPstring vshort_name; MTPInputBotInlineMessage vsend_message; }; class MTPDbotInlineMessageMediaAuto : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDbotInlineMessageMediaAuto() = default; MTPDbotInlineMessageMediaAuto(const MTPflags &_flags, const MTPstring &_caption, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vcaption(_caption), vreply_markup(_reply_markup) { } MTPflags vflags; MTPstring vcaption; MTPReplyMarkup vreply_markup; }; class MTPDbotInlineMessageText : public MTP::internal::TypeData { public: enum class Flag : int32 { f_no_webpage = (1 << 0), f_entities = (1 << 1), f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool has_entities() const { return vflags.v & Flag::f_entities; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDbotInlineMessageText() = default; MTPDbotInlineMessageText(const MTPflags &_flags, const MTPstring &_message, const MTPVector &_entities, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vmessage(_message), ventities(_entities), vreply_markup(_reply_markup) { } MTPflags vflags; MTPstring vmessage; MTPVector ventities; MTPReplyMarkup vreply_markup; }; class MTPDbotInlineMessageMediaGeo : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDbotInlineMessageMediaGeo() = default; MTPDbotInlineMessageMediaGeo(const MTPflags &_flags, const MTPGeoPoint &_geo, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vgeo(_geo), vreply_markup(_reply_markup) { } MTPflags vflags; MTPGeoPoint vgeo; MTPReplyMarkup vreply_markup; }; class MTPDbotInlineMessageMediaVenue : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDbotInlineMessageMediaVenue() = default; MTPDbotInlineMessageMediaVenue(const MTPflags &_flags, const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vgeo(_geo), vtitle(_title), vaddress(_address), vprovider(_provider), vvenue_id(_venue_id), vreply_markup(_reply_markup) { } MTPflags vflags; MTPGeoPoint vgeo; MTPstring vtitle; MTPstring vaddress; MTPstring vprovider; MTPstring vvenue_id; MTPReplyMarkup vreply_markup; }; class MTPDbotInlineMessageMediaContact : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reply_markup = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPDbotInlineMessageMediaContact() = default; MTPDbotInlineMessageMediaContact(const MTPflags &_flags, const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vphone_number(_phone_number), vfirst_name(_first_name), vlast_name(_last_name), vreply_markup(_reply_markup) { } MTPflags vflags; MTPstring vphone_number; MTPstring vfirst_name; MTPstring vlast_name; MTPReplyMarkup vreply_markup; }; class MTPDbotInlineResult : public MTP::internal::TypeData { public: enum class Flag : int32 { f_title = (1 << 1), f_description = (1 << 2), f_url = (1 << 3), f_thumb_url = (1 << 4), f_content_url = (1 << 5), f_content_type = (1 << 5), f_w = (1 << 6), f_h = (1 << 6), f_duration = (1 << 7), MAX_FIELD = (1 << 7), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_title() const { return vflags.v & Flag::f_title; } bool has_description() const { return vflags.v & Flag::f_description; } bool has_url() const { return vflags.v & Flag::f_url; } bool has_thumb_url() const { return vflags.v & Flag::f_thumb_url; } bool has_content_url() const { return vflags.v & Flag::f_content_url; } bool has_content_type() const { return vflags.v & Flag::f_content_type; } bool has_w() const { return vflags.v & Flag::f_w; } bool has_h() const { return vflags.v & Flag::f_h; } bool has_duration() const { return vflags.v & Flag::f_duration; } MTPDbotInlineResult() = default; MTPDbotInlineResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h, MTPint _duration, const MTPBotInlineMessage &_send_message) : vflags(_flags), vid(_id), vtype(_type), vtitle(_title), vdescription(_description), vurl(_url), vthumb_url(_thumb_url), vcontent_url(_content_url), vcontent_type(_content_type), vw(_w), vh(_h), vduration(_duration), vsend_message(_send_message) { } MTPflags vflags; MTPstring vid; MTPstring vtype; MTPstring vtitle; MTPstring vdescription; MTPstring vurl; MTPstring vthumb_url; MTPstring vcontent_url; MTPstring vcontent_type; MTPint vw; MTPint vh; MTPint vduration; MTPBotInlineMessage vsend_message; }; class MTPDbotInlineMediaResult : public MTP::internal::TypeData { public: enum class Flag : int32 { f_photo = (1 << 0), f_document = (1 << 1), f_title = (1 << 2), f_description = (1 << 3), MAX_FIELD = (1 << 3), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_photo() const { return vflags.v & Flag::f_photo; } bool has_document() const { return vflags.v & Flag::f_document; } bool has_title() const { return vflags.v & Flag::f_title; } bool has_description() const { return vflags.v & Flag::f_description; } MTPDbotInlineMediaResult() = default; MTPDbotInlineMediaResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPPhoto &_photo, const MTPDocument &_document, const MTPstring &_title, const MTPstring &_description, const MTPBotInlineMessage &_send_message) : vflags(_flags), vid(_id), vtype(_type), vphoto(_photo), vdocument(_document), vtitle(_title), vdescription(_description), vsend_message(_send_message) { } MTPflags vflags; MTPstring vid; MTPstring vtype; MTPPhoto vphoto; MTPDocument vdocument; MTPstring vtitle; MTPstring vdescription; MTPBotInlineMessage vsend_message; }; class MTPDmessages_botResults : public MTP::internal::TypeData { public: enum class Flag : int32 { f_gallery = (1 << 0), f_next_offset = (1 << 1), f_switch_pm = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_gallery() const { return vflags.v & Flag::f_gallery; } bool has_next_offset() const { return vflags.v & Flag::f_next_offset; } bool has_switch_pm() const { return vflags.v & Flag::f_switch_pm; } MTPDmessages_botResults() = default; MTPDmessages_botResults(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_next_offset, const MTPInlineBotSwitchPM &_switch_pm, const MTPVector &_results, MTPint _cache_time) : vflags(_flags), vquery_id(_query_id), vnext_offset(_next_offset), vswitch_pm(_switch_pm), vresults(_results), vcache_time(_cache_time) { } MTPflags vflags; MTPlong vquery_id; MTPstring vnext_offset; MTPInlineBotSwitchPM vswitch_pm; MTPVector vresults; MTPint vcache_time; }; class MTPDexportedMessageLink : public MTP::internal::TypeData { public: MTPDexportedMessageLink() = default; MTPDexportedMessageLink(const MTPstring &_link) : vlink(_link) { } MTPstring vlink; }; class MTPDmessageFwdHeader : public MTP::internal::TypeData { public: enum class Flag : int32 { f_from_id = (1 << 0), f_channel_id = (1 << 1), f_channel_post = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_from_id() const { return vflags.v & Flag::f_from_id; } bool has_channel_id() const { return vflags.v & Flag::f_channel_id; } bool has_channel_post() const { return vflags.v & Flag::f_channel_post; } MTPDmessageFwdHeader() = default; MTPDmessageFwdHeader(const MTPflags &_flags, MTPint _from_id, MTPint _date, MTPint _channel_id, MTPint _channel_post) : vflags(_flags), vfrom_id(_from_id), vdate(_date), vchannel_id(_channel_id), vchannel_post(_channel_post) { } MTPflags vflags; MTPint vfrom_id; MTPint vdate; MTPint vchannel_id; MTPint vchannel_post; }; class MTPDauth_sentCodeTypeApp : public MTP::internal::TypeData { public: MTPDauth_sentCodeTypeApp() = default; MTPDauth_sentCodeTypeApp(MTPint _length) : vlength(_length) { } MTPint vlength; }; class MTPDauth_sentCodeTypeSms : public MTP::internal::TypeData { public: MTPDauth_sentCodeTypeSms() = default; MTPDauth_sentCodeTypeSms(MTPint _length) : vlength(_length) { } MTPint vlength; }; class MTPDauth_sentCodeTypeCall : public MTP::internal::TypeData { public: MTPDauth_sentCodeTypeCall() = default; MTPDauth_sentCodeTypeCall(MTPint _length) : vlength(_length) { } MTPint vlength; }; class MTPDauth_sentCodeTypeFlashCall : public MTP::internal::TypeData { public: MTPDauth_sentCodeTypeFlashCall() = default; MTPDauth_sentCodeTypeFlashCall(const MTPstring &_pattern) : vpattern(_pattern) { } MTPstring vpattern; }; class MTPDmessages_botCallbackAnswer : public MTP::internal::TypeData { public: enum class Flag : int32 { f_alert = (1 << 1), f_has_url = (1 << 3), f_message = (1 << 0), f_url = (1 << 2), MAX_FIELD = (1 << 3), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_alert() const { return vflags.v & Flag::f_alert; } bool is_has_url() const { return vflags.v & Flag::f_has_url; } bool has_message() const { return vflags.v & Flag::f_message; } bool has_url() const { return vflags.v & Flag::f_url; } MTPDmessages_botCallbackAnswer() = default; MTPDmessages_botCallbackAnswer(const MTPflags &_flags, const MTPstring &_message, const MTPstring &_url, MTPint _cache_time) : vflags(_flags), vmessage(_message), vurl(_url), vcache_time(_cache_time) { } MTPflags vflags; MTPstring vmessage; MTPstring vurl; MTPint vcache_time; }; class MTPDmessages_messageEditData : public MTP::internal::TypeData { public: enum class Flag : int32 { f_caption = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_caption() const { return vflags.v & Flag::f_caption; } MTPDmessages_messageEditData() = default; MTPDmessages_messageEditData(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDinputBotInlineMessageID : public MTP::internal::TypeData { public: MTPDinputBotInlineMessageID() = default; MTPDinputBotInlineMessageID(MTPint _dc_id, const MTPlong &_id, const MTPlong &_access_hash) : vdc_id(_dc_id), vid(_id), vaccess_hash(_access_hash) { } MTPint vdc_id; MTPlong vid; MTPlong vaccess_hash; }; class MTPDinlineBotSwitchPM : public MTP::internal::TypeData { public: MTPDinlineBotSwitchPM() = default; MTPDinlineBotSwitchPM(const MTPstring &_text, const MTPstring &_start_param) : vtext(_text), vstart_param(_start_param) { } MTPstring vtext; MTPstring vstart_param; }; class MTPDmessages_peerDialogs : public MTP::internal::TypeData { public: MTPDmessages_peerDialogs() = default; MTPDmessages_peerDialogs(const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_state) : vdialogs(_dialogs), vmessages(_messages), vchats(_chats), vusers(_users), vstate(_state) { } MTPVector vdialogs; MTPVector vmessages; MTPVector vchats; MTPVector vusers; MTPupdates_State vstate; }; class MTPDtopPeer : public MTP::internal::TypeData { public: MTPDtopPeer() = default; MTPDtopPeer(const MTPPeer &_peer, const MTPdouble &_rating) : vpeer(_peer), vrating(_rating) { } MTPPeer vpeer; MTPdouble vrating; }; class MTPDtopPeerCategoryPeers : public MTP::internal::TypeData { public: MTPDtopPeerCategoryPeers() = default; MTPDtopPeerCategoryPeers(const MTPTopPeerCategory &_category, MTPint _count, const MTPVector &_peers) : vcategory(_category), vcount(_count), vpeers(_peers) { } MTPTopPeerCategory vcategory; MTPint vcount; MTPVector vpeers; }; class MTPDcontacts_topPeers : public MTP::internal::TypeData { public: MTPDcontacts_topPeers() = default; MTPDcontacts_topPeers(const MTPVector &_categories, const MTPVector &_chats, const MTPVector &_users) : vcategories(_categories), vchats(_chats), vusers(_users) { } MTPVector vcategories; MTPVector vchats; MTPVector vusers; }; class MTPDdraftMessage : public MTP::internal::TypeData { public: enum class Flag : int32 { f_no_webpage = (1 << 1), f_reply_to_msg_id = (1 << 0), f_entities = (1 << 3), MAX_FIELD = (1 << 3), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPDdraftMessage() = default; MTPDdraftMessage(const MTPflags &_flags, MTPint _reply_to_msg_id, const MTPstring &_message, const MTPVector &_entities, MTPint _date) : vflags(_flags), vreply_to_msg_id(_reply_to_msg_id), vmessage(_message), ventities(_entities), vdate(_date) { } MTPflags vflags; MTPint vreply_to_msg_id; MTPstring vmessage; MTPVector ventities; MTPint vdate; }; class MTPDmessages_featuredStickers : public MTP::internal::TypeData { public: MTPDmessages_featuredStickers() = default; MTPDmessages_featuredStickers(MTPint _hash, const MTPVector &_sets, const MTPVector &_unread) : vhash(_hash), vsets(_sets), vunread(_unread) { } MTPint vhash; MTPVector vsets; MTPVector vunread; }; class MTPDmessages_recentStickers : public MTP::internal::TypeData { public: MTPDmessages_recentStickers() = default; MTPDmessages_recentStickers(MTPint _hash, const MTPVector &_stickers) : vhash(_hash), vstickers(_stickers) { } MTPint vhash; MTPVector vstickers; }; class MTPDmessages_archivedStickers : public MTP::internal::TypeData { public: MTPDmessages_archivedStickers() = default; MTPDmessages_archivedStickers(MTPint _count, const MTPVector &_sets) : vcount(_count), vsets(_sets) { } MTPint vcount; MTPVector vsets; }; class MTPDmessages_stickerSetInstallResultArchive : public MTP::internal::TypeData { public: MTPDmessages_stickerSetInstallResultArchive() = default; MTPDmessages_stickerSetInstallResultArchive(const MTPVector &_sets) : vsets(_sets) { } MTPVector vsets; }; class MTPDstickerSetCovered : public MTP::internal::TypeData { public: MTPDstickerSetCovered() = default; MTPDstickerSetCovered(const MTPStickerSet &_set, const MTPDocument &_cover) : vset(_set), vcover(_cover) { } MTPStickerSet vset; MTPDocument vcover; }; class MTPDstickerSetMultiCovered : public MTP::internal::TypeData { public: MTPDstickerSetMultiCovered() = default; MTPDstickerSetMultiCovered(const MTPStickerSet &_set, const MTPVector &_covers) : vset(_set), vcovers(_covers) { } MTPStickerSet vset; MTPVector vcovers; }; class MTPDmaskCoords : public MTP::internal::TypeData { public: MTPDmaskCoords() = default; MTPDmaskCoords(MTPint _n, const MTPdouble &_x, const MTPdouble &_y, const MTPdouble &_zoom) : vn(_n), vx(_x), vy(_y), vzoom(_zoom) { } MTPint vn; MTPdouble vx; MTPdouble vy; MTPdouble vzoom; }; class MTPDinputStickeredMediaPhoto : public MTP::internal::TypeData { public: MTPDinputStickeredMediaPhoto() = default; MTPDinputStickeredMediaPhoto(const MTPInputPhoto &_id) : vid(_id) { } MTPInputPhoto vid; }; class MTPDinputStickeredMediaDocument : public MTP::internal::TypeData { public: MTPDinputStickeredMediaDocument() = default; MTPDinputStickeredMediaDocument(const MTPInputDocument &_id) : vid(_id) { } MTPInputDocument vid; }; class MTPDgame : public MTP::internal::TypeData { public: enum class Flag : int32 { f_document = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_document() const { return vflags.v & Flag::f_document; } MTPDgame() = default; MTPDgame(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, const MTPstring &_short_name, const MTPstring &_title, const MTPstring &_description, const MTPPhoto &_photo, const MTPDocument &_document) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vshort_name(_short_name), vtitle(_title), vdescription(_description), vphoto(_photo), vdocument(_document) { } MTPflags vflags; MTPlong vid; MTPlong vaccess_hash; MTPstring vshort_name; MTPstring vtitle; MTPstring vdescription; MTPPhoto vphoto; MTPDocument vdocument; }; class MTPDinputGameID : public MTP::internal::TypeData { public: MTPDinputGameID() = default; MTPDinputGameID(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputGameShortName : public MTP::internal::TypeData { public: MTPDinputGameShortName() = default; MTPDinputGameShortName(const MTPInputUser &_bot_id, const MTPstring &_short_name) : vbot_id(_bot_id), vshort_name(_short_name) { } MTPInputUser vbot_id; MTPstring vshort_name; }; class MTPDhighScore : public MTP::internal::TypeData { public: MTPDhighScore() = default; MTPDhighScore(MTPint _pos, MTPint _user_id, MTPint _score) : vpos(_pos), vuser_id(_user_id), vscore(_score) { } MTPint vpos; MTPint vuser_id; MTPint vscore; }; class MTPDmessages_highScores : public MTP::internal::TypeData { public: MTPDmessages_highScores() = default; MTPDmessages_highScores(const MTPVector &_scores, const MTPVector &_users) : vscores(_scores), vusers(_users) { } MTPVector vscores; MTPVector vusers; }; class MTPDtextPlain : public MTP::internal::TypeData { public: MTPDtextPlain() = default; MTPDtextPlain(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDtextBold : public MTP::internal::TypeData { public: MTPDtextBold() = default; MTPDtextBold(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDtextItalic : public MTP::internal::TypeData { public: MTPDtextItalic() = default; MTPDtextItalic(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDtextUnderline : public MTP::internal::TypeData { public: MTPDtextUnderline() = default; MTPDtextUnderline(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDtextStrike : public MTP::internal::TypeData { public: MTPDtextStrike() = default; MTPDtextStrike(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDtextFixed : public MTP::internal::TypeData { public: MTPDtextFixed() = default; MTPDtextFixed(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDtextUrl : public MTP::internal::TypeData { public: MTPDtextUrl() = default; MTPDtextUrl(const MTPRichText &_text, const MTPstring &_url, const MTPlong &_webpage_id) : vtext(_text), vurl(_url), vwebpage_id(_webpage_id) { } MTPRichText vtext; MTPstring vurl; MTPlong vwebpage_id; }; class MTPDtextEmail : public MTP::internal::TypeData { public: MTPDtextEmail() = default; MTPDtextEmail(const MTPRichText &_text, const MTPstring &_email) : vtext(_text), vemail(_email) { } MTPRichText vtext; MTPstring vemail; }; class MTPDtextConcat : public MTP::internal::TypeData { public: MTPDtextConcat() = default; MTPDtextConcat(const MTPVector &_texts) : vtexts(_texts) { } MTPVector vtexts; }; class MTPDpageBlockTitle : public MTP::internal::TypeData { public: MTPDpageBlockTitle() = default; MTPDpageBlockTitle(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDpageBlockSubtitle : public MTP::internal::TypeData { public: MTPDpageBlockSubtitle() = default; MTPDpageBlockSubtitle(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDpageBlockAuthorDate : public MTP::internal::TypeData { public: MTPDpageBlockAuthorDate() = default; MTPDpageBlockAuthorDate(const MTPRichText &_author, MTPint _published_date) : vauthor(_author), vpublished_date(_published_date) { } MTPRichText vauthor; MTPint vpublished_date; }; class MTPDpageBlockHeader : public MTP::internal::TypeData { public: MTPDpageBlockHeader() = default; MTPDpageBlockHeader(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDpageBlockSubheader : public MTP::internal::TypeData { public: MTPDpageBlockSubheader() = default; MTPDpageBlockSubheader(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDpageBlockParagraph : public MTP::internal::TypeData { public: MTPDpageBlockParagraph() = default; MTPDpageBlockParagraph(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDpageBlockPreformatted : public MTP::internal::TypeData { public: MTPDpageBlockPreformatted() = default; MTPDpageBlockPreformatted(const MTPRichText &_text, const MTPstring &_language) : vtext(_text), vlanguage(_language) { } MTPRichText vtext; MTPstring vlanguage; }; class MTPDpageBlockFooter : public MTP::internal::TypeData { public: MTPDpageBlockFooter() = default; MTPDpageBlockFooter(const MTPRichText &_text) : vtext(_text) { } MTPRichText vtext; }; class MTPDpageBlockAnchor : public MTP::internal::TypeData { public: MTPDpageBlockAnchor() = default; MTPDpageBlockAnchor(const MTPstring &_name) : vname(_name) { } MTPstring vname; }; class MTPDpageBlockList : public MTP::internal::TypeData { public: MTPDpageBlockList() = default; MTPDpageBlockList(MTPBool _ordered, const MTPVector &_items) : vordered(_ordered), vitems(_items) { } MTPBool vordered; MTPVector vitems; }; class MTPDpageBlockBlockquote : public MTP::internal::TypeData { public: MTPDpageBlockBlockquote() = default; MTPDpageBlockBlockquote(const MTPRichText &_text, const MTPRichText &_caption) : vtext(_text), vcaption(_caption) { } MTPRichText vtext; MTPRichText vcaption; }; class MTPDpageBlockPullquote : public MTP::internal::TypeData { public: MTPDpageBlockPullquote() = default; MTPDpageBlockPullquote(const MTPRichText &_text, const MTPRichText &_caption) : vtext(_text), vcaption(_caption) { } MTPRichText vtext; MTPRichText vcaption; }; class MTPDpageBlockPhoto : public MTP::internal::TypeData { public: MTPDpageBlockPhoto() = default; MTPDpageBlockPhoto(const MTPlong &_photo_id, const MTPRichText &_caption) : vphoto_id(_photo_id), vcaption(_caption) { } MTPlong vphoto_id; MTPRichText vcaption; }; class MTPDpageBlockVideo : public MTP::internal::TypeData { public: enum class Flag : int32 { f_autoplay = (1 << 0), f_loop = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_autoplay() const { return vflags.v & Flag::f_autoplay; } bool is_loop() const { return vflags.v & Flag::f_loop; } MTPDpageBlockVideo() = default; MTPDpageBlockVideo(const MTPflags &_flags, const MTPlong &_video_id, const MTPRichText &_caption) : vflags(_flags), vvideo_id(_video_id), vcaption(_caption) { } MTPflags vflags; MTPlong vvideo_id; MTPRichText vcaption; }; class MTPDpageBlockCover : public MTP::internal::TypeData { public: MTPDpageBlockCover() = default; MTPDpageBlockCover(const MTPPageBlock &_cover) : vcover(_cover) { } MTPPageBlock vcover; }; class MTPDpageBlockEmbed : public MTP::internal::TypeData { public: enum class Flag : int32 { f_full_width = (1 << 0), f_allow_scrolling = (1 << 3), f_url = (1 << 1), f_html = (1 << 2), f_poster_photo_id = (1 << 4), MAX_FIELD = (1 << 4), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_full_width() const { return vflags.v & Flag::f_full_width; } bool is_allow_scrolling() const { return vflags.v & Flag::f_allow_scrolling; } bool has_url() const { return vflags.v & Flag::f_url; } bool has_html() const { return vflags.v & Flag::f_html; } bool has_poster_photo_id() const { return vflags.v & Flag::f_poster_photo_id; } MTPDpageBlockEmbed() = default; MTPDpageBlockEmbed(const MTPflags &_flags, const MTPstring &_url, const MTPstring &_html, const MTPlong &_poster_photo_id, MTPint _w, MTPint _h, const MTPRichText &_caption) : vflags(_flags), vurl(_url), vhtml(_html), vposter_photo_id(_poster_photo_id), vw(_w), vh(_h), vcaption(_caption) { } MTPflags vflags; MTPstring vurl; MTPstring vhtml; MTPlong vposter_photo_id; MTPint vw; MTPint vh; MTPRichText vcaption; }; class MTPDpageBlockEmbedPost : public MTP::internal::TypeData { public: MTPDpageBlockEmbedPost() = default; MTPDpageBlockEmbedPost(const MTPstring &_url, const MTPlong &_webpage_id, const MTPlong &_author_photo_id, const MTPstring &_author, MTPint _date, const MTPVector &_blocks, const MTPRichText &_caption) : vurl(_url), vwebpage_id(_webpage_id), vauthor_photo_id(_author_photo_id), vauthor(_author), vdate(_date), vblocks(_blocks), vcaption(_caption) { } MTPstring vurl; MTPlong vwebpage_id; MTPlong vauthor_photo_id; MTPstring vauthor; MTPint vdate; MTPVector vblocks; MTPRichText vcaption; }; class MTPDpageBlockCollage : public MTP::internal::TypeData { public: MTPDpageBlockCollage() = default; MTPDpageBlockCollage(const MTPVector &_items, const MTPRichText &_caption) : vitems(_items), vcaption(_caption) { } MTPVector vitems; MTPRichText vcaption; }; class MTPDpageBlockSlideshow : public MTP::internal::TypeData { public: MTPDpageBlockSlideshow() = default; MTPDpageBlockSlideshow(const MTPVector &_items, const MTPRichText &_caption) : vitems(_items), vcaption(_caption) { } MTPVector vitems; MTPRichText vcaption; }; class MTPDpagePart : public MTP::internal::TypeData { public: MTPDpagePart() = default; MTPDpagePart(const MTPVector &_blocks, const MTPVector &_photos, const MTPVector &_videos) : vblocks(_blocks), vphotos(_photos), vvideos(_videos) { } MTPVector vblocks; MTPVector vphotos; MTPVector vvideos; }; class MTPDpageFull : public MTP::internal::TypeData { public: MTPDpageFull() = default; MTPDpageFull(const MTPVector &_blocks, const MTPVector &_photos, const MTPVector &_videos) : vblocks(_blocks), vphotos(_photos), vvideos(_videos) { } MTPVector vblocks; MTPVector vphotos; MTPVector vvideos; }; class MTPDinputPhoneCall : public MTP::internal::TypeData { public: MTPDinputPhoneCall() = default; MTPDinputPhoneCall(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDphoneCallEmpty : public MTP::internal::TypeData { public: MTPDphoneCallEmpty() = default; MTPDphoneCallEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDphoneCallWaiting : public MTP::internal::TypeData { public: enum class Flag : int32 { f_receive_date = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_receive_date() const { return vflags.v & Flag::f_receive_date; } MTPDphoneCallWaiting() = default; MTPDphoneCallWaiting(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPPhoneCallProtocol &_protocol, MTPint _receive_date) : vflags(_flags), vid(_id), vaccess_hash(_access_hash), vdate(_date), vadmin_id(_admin_id), vparticipant_id(_participant_id), vprotocol(_protocol), vreceive_date(_receive_date) { } MTPflags vflags; MTPlong vid; MTPlong vaccess_hash; MTPint vdate; MTPint vadmin_id; MTPint vparticipant_id; MTPPhoneCallProtocol vprotocol; MTPint vreceive_date; }; class MTPDphoneCallRequested : public MTP::internal::TypeData { public: MTPDphoneCallRequested() = default; MTPDphoneCallRequested(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a, const MTPPhoneCallProtocol &_protocol) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vadmin_id(_admin_id), vparticipant_id(_participant_id), vg_a(_g_a), vprotocol(_protocol) { } MTPlong vid; MTPlong vaccess_hash; MTPint vdate; MTPint vadmin_id; MTPint vparticipant_id; MTPbytes vg_a; MTPPhoneCallProtocol vprotocol; }; class MTPDphoneCall : public MTP::internal::TypeData { public: MTPDphoneCall() = default; MTPDphoneCall(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a_or_b, const MTPlong &_key_fingerprint, const MTPPhoneCallProtocol &_protocol, const MTPPhoneConnection &_connection, const MTPVector &_alternative_connections, MTPint _start_date) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vadmin_id(_admin_id), vparticipant_id(_participant_id), vg_a_or_b(_g_a_or_b), vkey_fingerprint(_key_fingerprint), vprotocol(_protocol), vconnection(_connection), valternative_connections(_alternative_connections), vstart_date(_start_date) { } MTPlong vid; MTPlong vaccess_hash; MTPint vdate; MTPint vadmin_id; MTPint vparticipant_id; MTPbytes vg_a_or_b; MTPlong vkey_fingerprint; MTPPhoneCallProtocol vprotocol; MTPPhoneConnection vconnection; MTPVector valternative_connections; MTPint vstart_date; }; class MTPDphoneCallDiscarded : public MTP::internal::TypeData { public: enum class Flag : int32 { f_reason = (1 << 0), f_duration = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_reason() const { return vflags.v & Flag::f_reason; } bool has_duration() const { return vflags.v & Flag::f_duration; } MTPDphoneCallDiscarded() = default; MTPDphoneCallDiscarded(const MTPflags &_flags, const MTPlong &_id, const MTPPhoneCallDiscardReason &_reason, MTPint _duration) : vflags(_flags), vid(_id), vreason(_reason), vduration(_duration) { } MTPflags vflags; MTPlong vid; MTPPhoneCallDiscardReason vreason; MTPint vduration; }; class MTPDphoneConnection : public MTP::internal::TypeData { public: MTPDphoneConnection() = default; MTPDphoneConnection(const MTPlong &_id, const MTPstring &_ip, const MTPstring &_ipv6, MTPint _port, const MTPbytes &_peer_tag) : vid(_id), vip(_ip), vipv6(_ipv6), vport(_port), vpeer_tag(_peer_tag) { } MTPlong vid; MTPstring vip; MTPstring vipv6; MTPint vport; MTPbytes vpeer_tag; }; class MTPDphoneCallProtocol : public MTP::internal::TypeData { public: enum class Flag : int32 { f_udp_p2p = (1 << 0), f_udp_reflector = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_udp_p2p() const { return vflags.v & Flag::f_udp_p2p; } bool is_udp_reflector() const { return vflags.v & Flag::f_udp_reflector; } MTPDphoneCallProtocol() = default; MTPDphoneCallProtocol(const MTPflags &_flags, MTPint _min_layer, MTPint _max_layer) : vflags(_flags), vmin_layer(_min_layer), vmax_layer(_max_layer) { } MTPflags vflags; MTPint vmin_layer; MTPint vmax_layer; }; class MTPDphone_phoneCall : public MTP::internal::TypeData { public: MTPDphone_phoneCall() = default; MTPDphone_phoneCall(const MTPPhoneCall &_phone_call, const MTPVector &_users) : vphone_call(_phone_call), vusers(_users) { } MTPPhoneCall vphone_call; MTPVector vusers; }; // RPC methods class MTPreq_pq { // RPC method 'req_pq' public: MTPint128 vnonce; MTPreq_pq() = default; MTPreq_pq(const MTPint128 &_nonce) : vnonce(_nonce) { } uint32 innerLength() const { return vnonce.innerLength(); } mtpTypeId type() const { return mtpc_req_pq; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_req_pq) { vnonce.read(from, end); } void write(mtpBuffer &to) const { vnonce.write(to); } typedef MTPResPQ ResponseType; }; class MTPReq_pq : public MTPBoxed { public: MTPReq_pq() = default; MTPReq_pq(const MTPreq_pq &v) : MTPBoxed(v) { } MTPReq_pq(const MTPint128 &_nonce) : MTPBoxed(MTPreq_pq(_nonce)) { } }; class MTPreq_DH_params { // RPC method 'req_DH_params' public: MTPint128 vnonce; MTPint128 vserver_nonce; MTPstring vp; MTPstring vq; MTPlong vpublic_key_fingerprint; MTPstring vencrypted_data; MTPreq_DH_params() = default; MTPreq_DH_params(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_p, const MTPstring &_q, const MTPlong &_public_key_fingerprint, const MTPstring &_encrypted_data) : vnonce(_nonce), vserver_nonce(_server_nonce), vp(_p), vq(_q), vpublic_key_fingerprint(_public_key_fingerprint), vencrypted_data(_encrypted_data) { } uint32 innerLength() const { return vnonce.innerLength() + vserver_nonce.innerLength() + vp.innerLength() + vq.innerLength() + vpublic_key_fingerprint.innerLength() + vencrypted_data.innerLength(); } mtpTypeId type() const { return mtpc_req_DH_params; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_req_DH_params) { vnonce.read(from, end); vserver_nonce.read(from, end); vp.read(from, end); vq.read(from, end); vpublic_key_fingerprint.read(from, end); vencrypted_data.read(from, end); } void write(mtpBuffer &to) const { vnonce.write(to); vserver_nonce.write(to); vp.write(to); vq.write(to); vpublic_key_fingerprint.write(to); vencrypted_data.write(to); } typedef MTPServer_DH_Params ResponseType; }; class MTPReq_DH_params : public MTPBoxed { public: MTPReq_DH_params() = default; MTPReq_DH_params(const MTPreq_DH_params &v) : MTPBoxed(v) { } MTPReq_DH_params(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_p, const MTPstring &_q, const MTPlong &_public_key_fingerprint, const MTPstring &_encrypted_data) : MTPBoxed(MTPreq_DH_params(_nonce, _server_nonce, _p, _q, _public_key_fingerprint, _encrypted_data)) { } }; class MTPset_client_DH_params { // RPC method 'set_client_DH_params' public: MTPint128 vnonce; MTPint128 vserver_nonce; MTPstring vencrypted_data; MTPset_client_DH_params() = default; MTPset_client_DH_params(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_encrypted_data) : vnonce(_nonce), vserver_nonce(_server_nonce), vencrypted_data(_encrypted_data) { } uint32 innerLength() const { return vnonce.innerLength() + vserver_nonce.innerLength() + vencrypted_data.innerLength(); } mtpTypeId type() const { return mtpc_set_client_DH_params; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_set_client_DH_params) { vnonce.read(from, end); vserver_nonce.read(from, end); vencrypted_data.read(from, end); } void write(mtpBuffer &to) const { vnonce.write(to); vserver_nonce.write(to); vencrypted_data.write(to); } typedef MTPSet_client_DH_params_answer ResponseType; }; class MTPSet_client_DH_params : public MTPBoxed { public: MTPSet_client_DH_params() = default; MTPSet_client_DH_params(const MTPset_client_DH_params &v) : MTPBoxed(v) { } MTPSet_client_DH_params(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_encrypted_data) : MTPBoxed(MTPset_client_DH_params(_nonce, _server_nonce, _encrypted_data)) { } }; class MTPdestroy_auth_key { // RPC method 'destroy_auth_key' public: MTPdestroy_auth_key() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_destroy_auth_key; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_destroy_auth_key) { } void write(mtpBuffer &to) const { } typedef MTPDestroyAuthKeyRes ResponseType; }; class MTPDestroy_auth_key : public MTPBoxed { public: MTPDestroy_auth_key() = default; MTPDestroy_auth_key(const MTPdestroy_auth_key &v) : MTPBoxed(v) { } }; class MTPrpc_drop_answer { // RPC method 'rpc_drop_answer' public: MTPlong vreq_msg_id; MTPrpc_drop_answer() = default; MTPrpc_drop_answer(const MTPlong &_req_msg_id) : vreq_msg_id(_req_msg_id) { } uint32 innerLength() const { return vreq_msg_id.innerLength(); } mtpTypeId type() const { return mtpc_rpc_drop_answer; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_rpc_drop_answer) { vreq_msg_id.read(from, end); } void write(mtpBuffer &to) const { vreq_msg_id.write(to); } typedef MTPRpcDropAnswer ResponseType; }; class MTPRpc_drop_answer : public MTPBoxed { public: MTPRpc_drop_answer() = default; MTPRpc_drop_answer(const MTPrpc_drop_answer &v) : MTPBoxed(v) { } MTPRpc_drop_answer(const MTPlong &_req_msg_id) : MTPBoxed(MTPrpc_drop_answer(_req_msg_id)) { } }; class MTPget_future_salts { // RPC method 'get_future_salts' public: MTPint vnum; MTPget_future_salts() = default; MTPget_future_salts(MTPint _num) : vnum(_num) { } uint32 innerLength() const { return vnum.innerLength(); } mtpTypeId type() const { return mtpc_get_future_salts; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_get_future_salts) { vnum.read(from, end); } void write(mtpBuffer &to) const { vnum.write(to); } typedef MTPFutureSalts ResponseType; }; class MTPGet_future_salts : public MTPBoxed { public: MTPGet_future_salts() = default; MTPGet_future_salts(const MTPget_future_salts &v) : MTPBoxed(v) { } MTPGet_future_salts(MTPint _num) : MTPBoxed(MTPget_future_salts(_num)) { } }; class MTPping { // RPC method 'ping' public: MTPlong vping_id; MTPping() = default; MTPping(const MTPlong &_ping_id) : vping_id(_ping_id) { } uint32 innerLength() const { return vping_id.innerLength(); } mtpTypeId type() const { return mtpc_ping; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_ping) { vping_id.read(from, end); } void write(mtpBuffer &to) const { vping_id.write(to); } typedef MTPPong ResponseType; }; class MTPPing : public MTPBoxed { public: MTPPing() = default; MTPPing(const MTPping &v) : MTPBoxed(v) { } MTPPing(const MTPlong &_ping_id) : MTPBoxed(MTPping(_ping_id)) { } }; class MTPping_delay_disconnect { // RPC method 'ping_delay_disconnect' public: MTPlong vping_id; MTPint vdisconnect_delay; MTPping_delay_disconnect() = default; MTPping_delay_disconnect(const MTPlong &_ping_id, MTPint _disconnect_delay) : vping_id(_ping_id), vdisconnect_delay(_disconnect_delay) { } uint32 innerLength() const { return vping_id.innerLength() + vdisconnect_delay.innerLength(); } mtpTypeId type() const { return mtpc_ping_delay_disconnect; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_ping_delay_disconnect) { vping_id.read(from, end); vdisconnect_delay.read(from, end); } void write(mtpBuffer &to) const { vping_id.write(to); vdisconnect_delay.write(to); } typedef MTPPong ResponseType; }; class MTPPing_delay_disconnect : public MTPBoxed { public: MTPPing_delay_disconnect() = default; MTPPing_delay_disconnect(const MTPping_delay_disconnect &v) : MTPBoxed(v) { } MTPPing_delay_disconnect(const MTPlong &_ping_id, MTPint _disconnect_delay) : MTPBoxed(MTPping_delay_disconnect(_ping_id, _disconnect_delay)) { } }; class MTPdestroy_session { // RPC method 'destroy_session' public: MTPlong vsession_id; MTPdestroy_session() = default; MTPdestroy_session(const MTPlong &_session_id) : vsession_id(_session_id) { } uint32 innerLength() const { return vsession_id.innerLength(); } mtpTypeId type() const { return mtpc_destroy_session; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_destroy_session) { vsession_id.read(from, end); } void write(mtpBuffer &to) const { vsession_id.write(to); } typedef MTPDestroySessionRes ResponseType; }; class MTPDestroy_session : public MTPBoxed { public: MTPDestroy_session() = default; MTPDestroy_session(const MTPdestroy_session &v) : MTPBoxed(v) { } MTPDestroy_session(const MTPlong &_session_id) : MTPBoxed(MTPdestroy_session(_session_id)) { } }; class MTPcontest_saveDeveloperInfo { // RPC method 'contest.saveDeveloperInfo' public: MTPint vvk_id; MTPstring vname; MTPstring vphone_number; MTPint vage; MTPstring vcity; MTPcontest_saveDeveloperInfo() = default; MTPcontest_saveDeveloperInfo(MTPint _vk_id, const MTPstring &_name, const MTPstring &_phone_number, MTPint _age, const MTPstring &_city) : vvk_id(_vk_id), vname(_name), vphone_number(_phone_number), vage(_age), vcity(_city) { } uint32 innerLength() const { return vvk_id.innerLength() + vname.innerLength() + vphone_number.innerLength() + vage.innerLength() + vcity.innerLength(); } mtpTypeId type() const { return mtpc_contest_saveDeveloperInfo; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contest_saveDeveloperInfo) { vvk_id.read(from, end); vname.read(from, end); vphone_number.read(from, end); vage.read(from, end); vcity.read(from, end); } void write(mtpBuffer &to) const { vvk_id.write(to); vname.write(to); vphone_number.write(to); vage.write(to); vcity.write(to); } typedef MTPBool ResponseType; }; class MTPcontest_SaveDeveloperInfo : public MTPBoxed { public: MTPcontest_SaveDeveloperInfo() = default; MTPcontest_SaveDeveloperInfo(const MTPcontest_saveDeveloperInfo &v) : MTPBoxed(v) { } MTPcontest_SaveDeveloperInfo(MTPint _vk_id, const MTPstring &_name, const MTPstring &_phone_number, MTPint _age, const MTPstring &_city) : MTPBoxed(MTPcontest_saveDeveloperInfo(_vk_id, _name, _phone_number, _age, _city)) { } }; template class MTPinvokeAfterMsg { // RPC method 'invokeAfterMsg' public: MTPlong vmsg_id; TQueryType vquery; MTPinvokeAfterMsg() = default; MTPinvokeAfterMsg(const MTPlong &_msg_id, const TQueryType &_query) : vmsg_id(_msg_id), vquery(_query) { } uint32 innerLength() const { return vmsg_id.innerLength() + vquery.innerLength(); } mtpTypeId type() const { return mtpc_invokeAfterMsg; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeAfterMsg) { vmsg_id.read(from, end); vquery.read(from, end); } void write(mtpBuffer &to) const { vmsg_id.write(to); vquery.write(to); } typedef typename TQueryType::ResponseType ResponseType; }; template class MTPInvokeAfterMsg : public MTPBoxed > { public: MTPInvokeAfterMsg() = default; MTPInvokeAfterMsg(const MTPinvokeAfterMsg &v) : MTPBoxed >(v) { } MTPInvokeAfterMsg(const MTPlong &_msg_id, const TQueryType &_query) : MTPBoxed >(MTPinvokeAfterMsg(_msg_id, _query)) { } }; template class MTPinvokeAfterMsgs { // RPC method 'invokeAfterMsgs' public: MTPVector vmsg_ids; TQueryType vquery; MTPinvokeAfterMsgs() = default; MTPinvokeAfterMsgs(const MTPVector &_msg_ids, const TQueryType &_query) : vmsg_ids(_msg_ids), vquery(_query) { } uint32 innerLength() const { return vmsg_ids.innerLength() + vquery.innerLength(); } mtpTypeId type() const { return mtpc_invokeAfterMsgs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeAfterMsgs) { vmsg_ids.read(from, end); vquery.read(from, end); } void write(mtpBuffer &to) const { vmsg_ids.write(to); vquery.write(to); } typedef typename TQueryType::ResponseType ResponseType; }; template class MTPInvokeAfterMsgs : public MTPBoxed > { public: MTPInvokeAfterMsgs() = default; MTPInvokeAfterMsgs(const MTPinvokeAfterMsgs &v) : MTPBoxed >(v) { } MTPInvokeAfterMsgs(const MTPVector &_msg_ids, const TQueryType &_query) : MTPBoxed >(MTPinvokeAfterMsgs(_msg_ids, _query)) { } }; template class MTPinitConnection { // RPC method 'initConnection' public: MTPint vapi_id; MTPstring vdevice_model; MTPstring vsystem_version; MTPstring vapp_version; MTPstring vlang_code; TQueryType vquery; MTPinitConnection() = default; MTPinitConnection(MTPint _api_id, const MTPstring &_device_model, const MTPstring &_system_version, const MTPstring &_app_version, const MTPstring &_lang_code, const TQueryType &_query) : vapi_id(_api_id), vdevice_model(_device_model), vsystem_version(_system_version), vapp_version(_app_version), vlang_code(_lang_code), vquery(_query) { } uint32 innerLength() const { return vapi_id.innerLength() + vdevice_model.innerLength() + vsystem_version.innerLength() + vapp_version.innerLength() + vlang_code.innerLength() + vquery.innerLength(); } mtpTypeId type() const { return mtpc_initConnection; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_initConnection) { vapi_id.read(from, end); vdevice_model.read(from, end); vsystem_version.read(from, end); vapp_version.read(from, end); vlang_code.read(from, end); vquery.read(from, end); } void write(mtpBuffer &to) const { vapi_id.write(to); vdevice_model.write(to); vsystem_version.write(to); vapp_version.write(to); vlang_code.write(to); vquery.write(to); } typedef typename TQueryType::ResponseType ResponseType; }; template class MTPInitConnection : public MTPBoxed > { public: MTPInitConnection() = default; MTPInitConnection(const MTPinitConnection &v) : MTPBoxed >(v) { } MTPInitConnection(MTPint _api_id, const MTPstring &_device_model, const MTPstring &_system_version, const MTPstring &_app_version, const MTPstring &_lang_code, const TQueryType &_query) : MTPBoxed >(MTPinitConnection(_api_id, _device_model, _system_version, _app_version, _lang_code, _query)) { } }; template class MTPinvokeWithLayer { // RPC method 'invokeWithLayer' public: MTPint vlayer; TQueryType vquery; MTPinvokeWithLayer() = default; MTPinvokeWithLayer(MTPint _layer, const TQueryType &_query) : vlayer(_layer), vquery(_query) { } uint32 innerLength() const { return vlayer.innerLength() + vquery.innerLength(); } mtpTypeId type() const { return mtpc_invokeWithLayer; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeWithLayer) { vlayer.read(from, end); vquery.read(from, end); } void write(mtpBuffer &to) const { vlayer.write(to); vquery.write(to); } typedef typename TQueryType::ResponseType ResponseType; }; template class MTPInvokeWithLayer : public MTPBoxed > { public: MTPInvokeWithLayer() = default; MTPInvokeWithLayer(const MTPinvokeWithLayer &v) : MTPBoxed >(v) { } MTPInvokeWithLayer(MTPint _layer, const TQueryType &_query) : MTPBoxed >(MTPinvokeWithLayer(_layer, _query)) { } }; template class MTPinvokeWithoutUpdates { // RPC method 'invokeWithoutUpdates' public: TQueryType vquery; MTPinvokeWithoutUpdates() = default; MTPinvokeWithoutUpdates(const TQueryType &_query) : vquery(_query) { } uint32 innerLength() const { return vquery.innerLength(); } mtpTypeId type() const { return mtpc_invokeWithoutUpdates; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeWithoutUpdates) { vquery.read(from, end); } void write(mtpBuffer &to) const { vquery.write(to); } typedef typename TQueryType::ResponseType ResponseType; }; template class MTPInvokeWithoutUpdates : public MTPBoxed > { public: MTPInvokeWithoutUpdates() = default; MTPInvokeWithoutUpdates(const MTPinvokeWithoutUpdates &v) : MTPBoxed >(v) { } MTPInvokeWithoutUpdates(const TQueryType &_query) : MTPBoxed >(MTPinvokeWithoutUpdates(_query)) { } }; class MTPauth_checkPhone { // RPC method 'auth.checkPhone' public: MTPstring vphone_number; MTPauth_checkPhone() = default; MTPauth_checkPhone(const MTPstring &_phone_number) : vphone_number(_phone_number) { } uint32 innerLength() const { return vphone_number.innerLength(); } mtpTypeId type() const { return mtpc_auth_checkPhone; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_checkPhone) { vphone_number.read(from, end); } void write(mtpBuffer &to) const { vphone_number.write(to); } typedef MTPauth_CheckedPhone ResponseType; }; class MTPauth_CheckPhone : public MTPBoxed { public: MTPauth_CheckPhone() = default; MTPauth_CheckPhone(const MTPauth_checkPhone &v) : MTPBoxed(v) { } MTPauth_CheckPhone(const MTPstring &_phone_number) : MTPBoxed(MTPauth_checkPhone(_phone_number)) { } }; class MTPauth_sendCode { // RPC method 'auth.sendCode' public: enum class Flag : int32 { f_allow_flashcall = (1 << 0), f_current_number = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_allow_flashcall() const { return vflags.v & Flag::f_allow_flashcall; } bool has_current_number() const { return vflags.v & Flag::f_current_number; } MTPflags vflags; MTPstring vphone_number; MTPBool vcurrent_number; MTPint vapi_id; MTPstring vapi_hash; MTPauth_sendCode() = default; MTPauth_sendCode(const MTPflags &_flags, const MTPstring &_phone_number, MTPBool _current_number, MTPint _api_id, const MTPstring &_api_hash) : vflags(_flags), vphone_number(_phone_number), vcurrent_number(_current_number), vapi_id(_api_id), vapi_hash(_api_hash) { } uint32 innerLength() const { return vflags.innerLength() + vphone_number.innerLength() + (has_current_number() ? vcurrent_number.innerLength() : 0) + vapi_id.innerLength() + vapi_hash.innerLength(); } mtpTypeId type() const { return mtpc_auth_sendCode; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendCode) { vflags.read(from, end); vphone_number.read(from, end); if (has_current_number()) { vcurrent_number.read(from, end); } else { vcurrent_number = MTPBool(); } vapi_id.read(from, end); vapi_hash.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vphone_number.write(to); if (has_current_number()) vcurrent_number.write(to); vapi_id.write(to); vapi_hash.write(to); } typedef MTPauth_SentCode ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPauth_sendCode::Flags) class MTPauth_SendCode : public MTPBoxed { public: MTPauth_SendCode() = default; MTPauth_SendCode(const MTPauth_sendCode &v) : MTPBoxed(v) { } MTPauth_SendCode(const MTPflags &_flags, const MTPstring &_phone_number, MTPBool _current_number, MTPint _api_id, const MTPstring &_api_hash) : MTPBoxed(MTPauth_sendCode(_flags, _phone_number, _current_number, _api_id, _api_hash)) { } }; class MTPauth_signUp { // RPC method 'auth.signUp' public: MTPstring vphone_number; MTPstring vphone_code_hash; MTPstring vphone_code; MTPstring vfirst_name; MTPstring vlast_name; MTPauth_signUp() = default; MTPauth_signUp(const MTPstring &_phone_number, const MTPstring &_phone_code_hash, const MTPstring &_phone_code, const MTPstring &_first_name, const MTPstring &_last_name) : vphone_number(_phone_number), vphone_code_hash(_phone_code_hash), vphone_code(_phone_code), vfirst_name(_first_name), vlast_name(_last_name) { } uint32 innerLength() const { return vphone_number.innerLength() + vphone_code_hash.innerLength() + vphone_code.innerLength() + vfirst_name.innerLength() + vlast_name.innerLength(); } mtpTypeId type() const { return mtpc_auth_signUp; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_signUp) { vphone_number.read(from, end); vphone_code_hash.read(from, end); vphone_code.read(from, end); vfirst_name.read(from, end); vlast_name.read(from, end); } void write(mtpBuffer &to) const { vphone_number.write(to); vphone_code_hash.write(to); vphone_code.write(to); vfirst_name.write(to); vlast_name.write(to); } typedef MTPauth_Authorization ResponseType; }; class MTPauth_SignUp : public MTPBoxed { public: MTPauth_SignUp() = default; MTPauth_SignUp(const MTPauth_signUp &v) : MTPBoxed(v) { } MTPauth_SignUp(const MTPstring &_phone_number, const MTPstring &_phone_code_hash, const MTPstring &_phone_code, const MTPstring &_first_name, const MTPstring &_last_name) : MTPBoxed(MTPauth_signUp(_phone_number, _phone_code_hash, _phone_code, _first_name, _last_name)) { } }; class MTPauth_signIn { // RPC method 'auth.signIn' public: MTPstring vphone_number; MTPstring vphone_code_hash; MTPstring vphone_code; MTPauth_signIn() = default; MTPauth_signIn(const MTPstring &_phone_number, const MTPstring &_phone_code_hash, const MTPstring &_phone_code) : vphone_number(_phone_number), vphone_code_hash(_phone_code_hash), vphone_code(_phone_code) { } uint32 innerLength() const { return vphone_number.innerLength() + vphone_code_hash.innerLength() + vphone_code.innerLength(); } mtpTypeId type() const { return mtpc_auth_signIn; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_signIn) { vphone_number.read(from, end); vphone_code_hash.read(from, end); vphone_code.read(from, end); } void write(mtpBuffer &to) const { vphone_number.write(to); vphone_code_hash.write(to); vphone_code.write(to); } typedef MTPauth_Authorization ResponseType; }; class MTPauth_SignIn : public MTPBoxed { public: MTPauth_SignIn() = default; MTPauth_SignIn(const MTPauth_signIn &v) : MTPBoxed(v) { } MTPauth_SignIn(const MTPstring &_phone_number, const MTPstring &_phone_code_hash, const MTPstring &_phone_code) : MTPBoxed(MTPauth_signIn(_phone_number, _phone_code_hash, _phone_code)) { } }; class MTPauth_logOut { // RPC method 'auth.logOut' public: MTPauth_logOut() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_auth_logOut; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_logOut) { } void write(mtpBuffer &to) const { } typedef MTPBool ResponseType; }; class MTPauth_LogOut : public MTPBoxed { public: MTPauth_LogOut() = default; MTPauth_LogOut(const MTPauth_logOut &v) : MTPBoxed(v) { } }; class MTPauth_resetAuthorizations { // RPC method 'auth.resetAuthorizations' public: MTPauth_resetAuthorizations() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_auth_resetAuthorizations; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_resetAuthorizations) { } void write(mtpBuffer &to) const { } typedef MTPBool ResponseType; }; class MTPauth_ResetAuthorizations : public MTPBoxed { public: MTPauth_ResetAuthorizations() = default; MTPauth_ResetAuthorizations(const MTPauth_resetAuthorizations &v) : MTPBoxed(v) { } }; class MTPauth_sendInvites { // RPC method 'auth.sendInvites' public: MTPVector vphone_numbers; MTPstring vmessage; MTPauth_sendInvites() = default; MTPauth_sendInvites(const MTPVector &_phone_numbers, const MTPstring &_message) : vphone_numbers(_phone_numbers), vmessage(_message) { } uint32 innerLength() const { return vphone_numbers.innerLength() + vmessage.innerLength(); } mtpTypeId type() const { return mtpc_auth_sendInvites; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendInvites) { vphone_numbers.read(from, end); vmessage.read(from, end); } void write(mtpBuffer &to) const { vphone_numbers.write(to); vmessage.write(to); } typedef MTPBool ResponseType; }; class MTPauth_SendInvites : public MTPBoxed { public: MTPauth_SendInvites() = default; MTPauth_SendInvites(const MTPauth_sendInvites &v) : MTPBoxed(v) { } MTPauth_SendInvites(const MTPVector &_phone_numbers, const MTPstring &_message) : MTPBoxed(MTPauth_sendInvites(_phone_numbers, _message)) { } }; class MTPauth_exportAuthorization { // RPC method 'auth.exportAuthorization' public: MTPint vdc_id; MTPauth_exportAuthorization() = default; MTPauth_exportAuthorization(MTPint _dc_id) : vdc_id(_dc_id) { } uint32 innerLength() const { return vdc_id.innerLength(); } mtpTypeId type() const { return mtpc_auth_exportAuthorization; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_exportAuthorization) { vdc_id.read(from, end); } void write(mtpBuffer &to) const { vdc_id.write(to); } typedef MTPauth_ExportedAuthorization ResponseType; }; class MTPauth_ExportAuthorization : public MTPBoxed { public: MTPauth_ExportAuthorization() = default; MTPauth_ExportAuthorization(const MTPauth_exportAuthorization &v) : MTPBoxed(v) { } MTPauth_ExportAuthorization(MTPint _dc_id) : MTPBoxed(MTPauth_exportAuthorization(_dc_id)) { } }; class MTPauth_importAuthorization { // RPC method 'auth.importAuthorization' public: MTPint vid; MTPbytes vbytes; MTPauth_importAuthorization() = default; MTPauth_importAuthorization(MTPint _id, const MTPbytes &_bytes) : vid(_id), vbytes(_bytes) { } uint32 innerLength() const { return vid.innerLength() + vbytes.innerLength(); } mtpTypeId type() const { return mtpc_auth_importAuthorization; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_importAuthorization) { vid.read(from, end); vbytes.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); vbytes.write(to); } typedef MTPauth_Authorization ResponseType; }; class MTPauth_ImportAuthorization : public MTPBoxed { public: MTPauth_ImportAuthorization() = default; MTPauth_ImportAuthorization(const MTPauth_importAuthorization &v) : MTPBoxed(v) { } MTPauth_ImportAuthorization(MTPint _id, const MTPbytes &_bytes) : MTPBoxed(MTPauth_importAuthorization(_id, _bytes)) { } }; class MTPauth_bindTempAuthKey { // RPC method 'auth.bindTempAuthKey' public: MTPlong vperm_auth_key_id; MTPlong vnonce; MTPint vexpires_at; MTPbytes vencrypted_message; MTPauth_bindTempAuthKey() = default; MTPauth_bindTempAuthKey(const MTPlong &_perm_auth_key_id, const MTPlong &_nonce, MTPint _expires_at, const MTPbytes &_encrypted_message) : vperm_auth_key_id(_perm_auth_key_id), vnonce(_nonce), vexpires_at(_expires_at), vencrypted_message(_encrypted_message) { } uint32 innerLength() const { return vperm_auth_key_id.innerLength() + vnonce.innerLength() + vexpires_at.innerLength() + vencrypted_message.innerLength(); } mtpTypeId type() const { return mtpc_auth_bindTempAuthKey; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_bindTempAuthKey) { vperm_auth_key_id.read(from, end); vnonce.read(from, end); vexpires_at.read(from, end); vencrypted_message.read(from, end); } void write(mtpBuffer &to) const { vperm_auth_key_id.write(to); vnonce.write(to); vexpires_at.write(to); vencrypted_message.write(to); } typedef MTPBool ResponseType; }; class MTPauth_BindTempAuthKey : public MTPBoxed { public: MTPauth_BindTempAuthKey() = default; MTPauth_BindTempAuthKey(const MTPauth_bindTempAuthKey &v) : MTPBoxed(v) { } MTPauth_BindTempAuthKey(const MTPlong &_perm_auth_key_id, const MTPlong &_nonce, MTPint _expires_at, const MTPbytes &_encrypted_message) : MTPBoxed(MTPauth_bindTempAuthKey(_perm_auth_key_id, _nonce, _expires_at, _encrypted_message)) { } }; class MTPauth_importBotAuthorization { // RPC method 'auth.importBotAuthorization' public: MTPint vflags; MTPint vapi_id; MTPstring vapi_hash; MTPstring vbot_auth_token; MTPauth_importBotAuthorization() = default; MTPauth_importBotAuthorization(MTPint _flags, MTPint _api_id, const MTPstring &_api_hash, const MTPstring &_bot_auth_token) : vflags(_flags), vapi_id(_api_id), vapi_hash(_api_hash), vbot_auth_token(_bot_auth_token) { } uint32 innerLength() const { return vflags.innerLength() + vapi_id.innerLength() + vapi_hash.innerLength() + vbot_auth_token.innerLength(); } mtpTypeId type() const { return mtpc_auth_importBotAuthorization; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_importBotAuthorization) { vflags.read(from, end); vapi_id.read(from, end); vapi_hash.read(from, end); vbot_auth_token.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vapi_id.write(to); vapi_hash.write(to); vbot_auth_token.write(to); } typedef MTPauth_Authorization ResponseType; }; class MTPauth_ImportBotAuthorization : public MTPBoxed { public: MTPauth_ImportBotAuthorization() = default; MTPauth_ImportBotAuthorization(const MTPauth_importBotAuthorization &v) : MTPBoxed(v) { } MTPauth_ImportBotAuthorization(MTPint _flags, MTPint _api_id, const MTPstring &_api_hash, const MTPstring &_bot_auth_token) : MTPBoxed(MTPauth_importBotAuthorization(_flags, _api_id, _api_hash, _bot_auth_token)) { } }; class MTPauth_checkPassword { // RPC method 'auth.checkPassword' public: MTPbytes vpassword_hash; MTPauth_checkPassword() = default; MTPauth_checkPassword(const MTPbytes &_password_hash) : vpassword_hash(_password_hash) { } uint32 innerLength() const { return vpassword_hash.innerLength(); } mtpTypeId type() const { return mtpc_auth_checkPassword; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_checkPassword) { vpassword_hash.read(from, end); } void write(mtpBuffer &to) const { vpassword_hash.write(to); } typedef MTPauth_Authorization ResponseType; }; class MTPauth_CheckPassword : public MTPBoxed { public: MTPauth_CheckPassword() = default; MTPauth_CheckPassword(const MTPauth_checkPassword &v) : MTPBoxed(v) { } MTPauth_CheckPassword(const MTPbytes &_password_hash) : MTPBoxed(MTPauth_checkPassword(_password_hash)) { } }; class MTPauth_requestPasswordRecovery { // RPC method 'auth.requestPasswordRecovery' public: MTPauth_requestPasswordRecovery() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_auth_requestPasswordRecovery; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_requestPasswordRecovery) { } void write(mtpBuffer &to) const { } typedef MTPauth_PasswordRecovery ResponseType; }; class MTPauth_RequestPasswordRecovery : public MTPBoxed { public: MTPauth_RequestPasswordRecovery() = default; MTPauth_RequestPasswordRecovery(const MTPauth_requestPasswordRecovery &v) : MTPBoxed(v) { } }; class MTPauth_recoverPassword { // RPC method 'auth.recoverPassword' public: MTPstring vcode; MTPauth_recoverPassword() = default; MTPauth_recoverPassword(const MTPstring &_code) : vcode(_code) { } uint32 innerLength() const { return vcode.innerLength(); } mtpTypeId type() const { return mtpc_auth_recoverPassword; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_recoverPassword) { vcode.read(from, end); } void write(mtpBuffer &to) const { vcode.write(to); } typedef MTPauth_Authorization ResponseType; }; class MTPauth_RecoverPassword : public MTPBoxed { public: MTPauth_RecoverPassword() = default; MTPauth_RecoverPassword(const MTPauth_recoverPassword &v) : MTPBoxed(v) { } MTPauth_RecoverPassword(const MTPstring &_code) : MTPBoxed(MTPauth_recoverPassword(_code)) { } }; class MTPauth_resendCode { // RPC method 'auth.resendCode' public: MTPstring vphone_number; MTPstring vphone_code_hash; MTPauth_resendCode() = default; MTPauth_resendCode(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : vphone_number(_phone_number), vphone_code_hash(_phone_code_hash) { } uint32 innerLength() const { return vphone_number.innerLength() + vphone_code_hash.innerLength(); } mtpTypeId type() const { return mtpc_auth_resendCode; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_resendCode) { vphone_number.read(from, end); vphone_code_hash.read(from, end); } void write(mtpBuffer &to) const { vphone_number.write(to); vphone_code_hash.write(to); } typedef MTPauth_SentCode ResponseType; }; class MTPauth_ResendCode : public MTPBoxed { public: MTPauth_ResendCode() = default; MTPauth_ResendCode(const MTPauth_resendCode &v) : MTPBoxed(v) { } MTPauth_ResendCode(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : MTPBoxed(MTPauth_resendCode(_phone_number, _phone_code_hash)) { } }; class MTPauth_cancelCode { // RPC method 'auth.cancelCode' public: MTPstring vphone_number; MTPstring vphone_code_hash; MTPauth_cancelCode() = default; MTPauth_cancelCode(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : vphone_number(_phone_number), vphone_code_hash(_phone_code_hash) { } uint32 innerLength() const { return vphone_number.innerLength() + vphone_code_hash.innerLength(); } mtpTypeId type() const { return mtpc_auth_cancelCode; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_cancelCode) { vphone_number.read(from, end); vphone_code_hash.read(from, end); } void write(mtpBuffer &to) const { vphone_number.write(to); vphone_code_hash.write(to); } typedef MTPBool ResponseType; }; class MTPauth_CancelCode : public MTPBoxed { public: MTPauth_CancelCode() = default; MTPauth_CancelCode(const MTPauth_cancelCode &v) : MTPBoxed(v) { } MTPauth_CancelCode(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : MTPBoxed(MTPauth_cancelCode(_phone_number, _phone_code_hash)) { } }; class MTPauth_dropTempAuthKeys { // RPC method 'auth.dropTempAuthKeys' public: MTPVector vexcept_auth_keys; MTPauth_dropTempAuthKeys() = default; MTPauth_dropTempAuthKeys(const MTPVector &_except_auth_keys) : vexcept_auth_keys(_except_auth_keys) { } uint32 innerLength() const { return vexcept_auth_keys.innerLength(); } mtpTypeId type() const { return mtpc_auth_dropTempAuthKeys; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_dropTempAuthKeys) { vexcept_auth_keys.read(from, end); } void write(mtpBuffer &to) const { vexcept_auth_keys.write(to); } typedef MTPBool ResponseType; }; class MTPauth_DropTempAuthKeys : public MTPBoxed { public: MTPauth_DropTempAuthKeys() = default; MTPauth_DropTempAuthKeys(const MTPauth_dropTempAuthKeys &v) : MTPBoxed(v) { } MTPauth_DropTempAuthKeys(const MTPVector &_except_auth_keys) : MTPBoxed(MTPauth_dropTempAuthKeys(_except_auth_keys)) { } }; class MTPaccount_registerDevice { // RPC method 'account.registerDevice' public: MTPint vtoken_type; MTPstring vtoken; MTPaccount_registerDevice() = default; MTPaccount_registerDevice(MTPint _token_type, const MTPstring &_token) : vtoken_type(_token_type), vtoken(_token) { } uint32 innerLength() const { return vtoken_type.innerLength() + vtoken.innerLength(); } mtpTypeId type() const { return mtpc_account_registerDevice; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_registerDevice) { vtoken_type.read(from, end); vtoken.read(from, end); } void write(mtpBuffer &to) const { vtoken_type.write(to); vtoken.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_RegisterDevice : public MTPBoxed { public: MTPaccount_RegisterDevice() = default; MTPaccount_RegisterDevice(const MTPaccount_registerDevice &v) : MTPBoxed(v) { } MTPaccount_RegisterDevice(MTPint _token_type, const MTPstring &_token) : MTPBoxed(MTPaccount_registerDevice(_token_type, _token)) { } }; class MTPaccount_unregisterDevice { // RPC method 'account.unregisterDevice' public: MTPint vtoken_type; MTPstring vtoken; MTPaccount_unregisterDevice() = default; MTPaccount_unregisterDevice(MTPint _token_type, const MTPstring &_token) : vtoken_type(_token_type), vtoken(_token) { } uint32 innerLength() const { return vtoken_type.innerLength() + vtoken.innerLength(); } mtpTypeId type() const { return mtpc_account_unregisterDevice; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_unregisterDevice) { vtoken_type.read(from, end); vtoken.read(from, end); } void write(mtpBuffer &to) const { vtoken_type.write(to); vtoken.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_UnregisterDevice : public MTPBoxed { public: MTPaccount_UnregisterDevice() = default; MTPaccount_UnregisterDevice(const MTPaccount_unregisterDevice &v) : MTPBoxed(v) { } MTPaccount_UnregisterDevice(MTPint _token_type, const MTPstring &_token) : MTPBoxed(MTPaccount_unregisterDevice(_token_type, _token)) { } }; class MTPaccount_updateNotifySettings { // RPC method 'account.updateNotifySettings' public: MTPInputNotifyPeer vpeer; MTPInputPeerNotifySettings vsettings; MTPaccount_updateNotifySettings() = default; MTPaccount_updateNotifySettings(const MTPInputNotifyPeer &_peer, const MTPInputPeerNotifySettings &_settings) : vpeer(_peer), vsettings(_settings) { } uint32 innerLength() const { return vpeer.innerLength() + vsettings.innerLength(); } mtpTypeId type() const { return mtpc_account_updateNotifySettings; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateNotifySettings) { vpeer.read(from, end); vsettings.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vsettings.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_UpdateNotifySettings : public MTPBoxed { public: MTPaccount_UpdateNotifySettings() = default; MTPaccount_UpdateNotifySettings(const MTPaccount_updateNotifySettings &v) : MTPBoxed(v) { } MTPaccount_UpdateNotifySettings(const MTPInputNotifyPeer &_peer, const MTPInputPeerNotifySettings &_settings) : MTPBoxed(MTPaccount_updateNotifySettings(_peer, _settings)) { } }; class MTPaccount_getNotifySettings { // RPC method 'account.getNotifySettings' public: MTPInputNotifyPeer vpeer; MTPaccount_getNotifySettings() = default; MTPaccount_getNotifySettings(const MTPInputNotifyPeer &_peer) : vpeer(_peer) { } uint32 innerLength() const { return vpeer.innerLength(); } mtpTypeId type() const { return mtpc_account_getNotifySettings; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getNotifySettings) { vpeer.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); } typedef MTPPeerNotifySettings ResponseType; }; class MTPaccount_GetNotifySettings : public MTPBoxed { public: MTPaccount_GetNotifySettings() = default; MTPaccount_GetNotifySettings(const MTPaccount_getNotifySettings &v) : MTPBoxed(v) { } MTPaccount_GetNotifySettings(const MTPInputNotifyPeer &_peer) : MTPBoxed(MTPaccount_getNotifySettings(_peer)) { } }; class MTPaccount_resetNotifySettings { // RPC method 'account.resetNotifySettings' public: MTPaccount_resetNotifySettings() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_account_resetNotifySettings; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_resetNotifySettings) { } void write(mtpBuffer &to) const { } typedef MTPBool ResponseType; }; class MTPaccount_ResetNotifySettings : public MTPBoxed { public: MTPaccount_ResetNotifySettings() = default; MTPaccount_ResetNotifySettings(const MTPaccount_resetNotifySettings &v) : MTPBoxed(v) { } }; class MTPaccount_updateProfile { // RPC method 'account.updateProfile' public: enum class Flag : int32 { f_first_name = (1 << 0), f_last_name = (1 << 1), f_about = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_first_name() const { return vflags.v & Flag::f_first_name; } bool has_last_name() const { return vflags.v & Flag::f_last_name; } bool has_about() const { return vflags.v & Flag::f_about; } MTPflags vflags; MTPstring vfirst_name; MTPstring vlast_name; MTPstring vabout; MTPaccount_updateProfile() = default; MTPaccount_updateProfile(const MTPflags &_flags, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_about) : vflags(_flags), vfirst_name(_first_name), vlast_name(_last_name), vabout(_about) { } uint32 innerLength() const { return vflags.innerLength() + (has_first_name() ? vfirst_name.innerLength() : 0) + (has_last_name() ? vlast_name.innerLength() : 0) + (has_about() ? vabout.innerLength() : 0); } mtpTypeId type() const { return mtpc_account_updateProfile; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateProfile) { vflags.read(from, end); if (has_first_name()) { vfirst_name.read(from, end); } else { vfirst_name = MTPstring(); } if (has_last_name()) { vlast_name.read(from, end); } else { vlast_name = MTPstring(); } if (has_about()) { vabout.read(from, end); } else { vabout = MTPstring(); } } void write(mtpBuffer &to) const { vflags.write(to); if (has_first_name()) vfirst_name.write(to); if (has_last_name()) vlast_name.write(to); if (has_about()) vabout.write(to); } typedef MTPUser ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPaccount_updateProfile::Flags) class MTPaccount_UpdateProfile : public MTPBoxed { public: MTPaccount_UpdateProfile() = default; MTPaccount_UpdateProfile(const MTPaccount_updateProfile &v) : MTPBoxed(v) { } MTPaccount_UpdateProfile(const MTPflags &_flags, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_about) : MTPBoxed(MTPaccount_updateProfile(_flags, _first_name, _last_name, _about)) { } }; class MTPaccount_updateStatus { // RPC method 'account.updateStatus' public: MTPBool voffline; MTPaccount_updateStatus() = default; MTPaccount_updateStatus(MTPBool _offline) : voffline(_offline) { } uint32 innerLength() const { return voffline.innerLength(); } mtpTypeId type() const { return mtpc_account_updateStatus; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateStatus) { voffline.read(from, end); } void write(mtpBuffer &to) const { voffline.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_UpdateStatus : public MTPBoxed { public: MTPaccount_UpdateStatus() = default; MTPaccount_UpdateStatus(const MTPaccount_updateStatus &v) : MTPBoxed(v) { } MTPaccount_UpdateStatus(MTPBool _offline) : MTPBoxed(MTPaccount_updateStatus(_offline)) { } }; class MTPaccount_getWallPapers { // RPC method 'account.getWallPapers' public: MTPaccount_getWallPapers() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_account_getWallPapers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getWallPapers) { } void write(mtpBuffer &to) const { } typedef MTPVector ResponseType; }; class MTPaccount_GetWallPapers : public MTPBoxed { public: MTPaccount_GetWallPapers() = default; MTPaccount_GetWallPapers(const MTPaccount_getWallPapers &v) : MTPBoxed(v) { } }; class MTPaccount_reportPeer { // RPC method 'account.reportPeer' public: MTPInputPeer vpeer; MTPReportReason vreason; MTPaccount_reportPeer() = default; MTPaccount_reportPeer(const MTPInputPeer &_peer, const MTPReportReason &_reason) : vpeer(_peer), vreason(_reason) { } uint32 innerLength() const { return vpeer.innerLength() + vreason.innerLength(); } mtpTypeId type() const { return mtpc_account_reportPeer; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_reportPeer) { vpeer.read(from, end); vreason.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vreason.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_ReportPeer : public MTPBoxed { public: MTPaccount_ReportPeer() = default; MTPaccount_ReportPeer(const MTPaccount_reportPeer &v) : MTPBoxed(v) { } MTPaccount_ReportPeer(const MTPInputPeer &_peer, const MTPReportReason &_reason) : MTPBoxed(MTPaccount_reportPeer(_peer, _reason)) { } }; class MTPaccount_checkUsername { // RPC method 'account.checkUsername' public: MTPstring vusername; MTPaccount_checkUsername() = default; MTPaccount_checkUsername(const MTPstring &_username) : vusername(_username) { } uint32 innerLength() const { return vusername.innerLength(); } mtpTypeId type() const { return mtpc_account_checkUsername; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_checkUsername) { vusername.read(from, end); } void write(mtpBuffer &to) const { vusername.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_CheckUsername : public MTPBoxed { public: MTPaccount_CheckUsername() = default; MTPaccount_CheckUsername(const MTPaccount_checkUsername &v) : MTPBoxed(v) { } MTPaccount_CheckUsername(const MTPstring &_username) : MTPBoxed(MTPaccount_checkUsername(_username)) { } }; class MTPaccount_updateUsername { // RPC method 'account.updateUsername' public: MTPstring vusername; MTPaccount_updateUsername() = default; MTPaccount_updateUsername(const MTPstring &_username) : vusername(_username) { } uint32 innerLength() const { return vusername.innerLength(); } mtpTypeId type() const { return mtpc_account_updateUsername; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateUsername) { vusername.read(from, end); } void write(mtpBuffer &to) const { vusername.write(to); } typedef MTPUser ResponseType; }; class MTPaccount_UpdateUsername : public MTPBoxed { public: MTPaccount_UpdateUsername() = default; MTPaccount_UpdateUsername(const MTPaccount_updateUsername &v) : MTPBoxed(v) { } MTPaccount_UpdateUsername(const MTPstring &_username) : MTPBoxed(MTPaccount_updateUsername(_username)) { } }; class MTPaccount_getPrivacy { // RPC method 'account.getPrivacy' public: MTPInputPrivacyKey vkey; MTPaccount_getPrivacy() = default; MTPaccount_getPrivacy(const MTPInputPrivacyKey &_key) : vkey(_key) { } uint32 innerLength() const { return vkey.innerLength(); } mtpTypeId type() const { return mtpc_account_getPrivacy; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getPrivacy) { vkey.read(from, end); } void write(mtpBuffer &to) const { vkey.write(to); } typedef MTPaccount_PrivacyRules ResponseType; }; class MTPaccount_GetPrivacy : public MTPBoxed { public: MTPaccount_GetPrivacy() = default; MTPaccount_GetPrivacy(const MTPaccount_getPrivacy &v) : MTPBoxed(v) { } MTPaccount_GetPrivacy(const MTPInputPrivacyKey &_key) : MTPBoxed(MTPaccount_getPrivacy(_key)) { } }; class MTPaccount_setPrivacy { // RPC method 'account.setPrivacy' public: MTPInputPrivacyKey vkey; MTPVector vrules; MTPaccount_setPrivacy() = default; MTPaccount_setPrivacy(const MTPInputPrivacyKey &_key, const MTPVector &_rules) : vkey(_key), vrules(_rules) { } uint32 innerLength() const { return vkey.innerLength() + vrules.innerLength(); } mtpTypeId type() const { return mtpc_account_setPrivacy; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_setPrivacy) { vkey.read(from, end); vrules.read(from, end); } void write(mtpBuffer &to) const { vkey.write(to); vrules.write(to); } typedef MTPaccount_PrivacyRules ResponseType; }; class MTPaccount_SetPrivacy : public MTPBoxed { public: MTPaccount_SetPrivacy() = default; MTPaccount_SetPrivacy(const MTPaccount_setPrivacy &v) : MTPBoxed(v) { } MTPaccount_SetPrivacy(const MTPInputPrivacyKey &_key, const MTPVector &_rules) : MTPBoxed(MTPaccount_setPrivacy(_key, _rules)) { } }; class MTPaccount_deleteAccount { // RPC method 'account.deleteAccount' public: MTPstring vreason; MTPaccount_deleteAccount() = default; MTPaccount_deleteAccount(const MTPstring &_reason) : vreason(_reason) { } uint32 innerLength() const { return vreason.innerLength(); } mtpTypeId type() const { return mtpc_account_deleteAccount; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_deleteAccount) { vreason.read(from, end); } void write(mtpBuffer &to) const { vreason.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_DeleteAccount : public MTPBoxed { public: MTPaccount_DeleteAccount() = default; MTPaccount_DeleteAccount(const MTPaccount_deleteAccount &v) : MTPBoxed(v) { } MTPaccount_DeleteAccount(const MTPstring &_reason) : MTPBoxed(MTPaccount_deleteAccount(_reason)) { } }; class MTPaccount_getAccountTTL { // RPC method 'account.getAccountTTL' public: MTPaccount_getAccountTTL() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_account_getAccountTTL; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getAccountTTL) { } void write(mtpBuffer &to) const { } typedef MTPAccountDaysTTL ResponseType; }; class MTPaccount_GetAccountTTL : public MTPBoxed { public: MTPaccount_GetAccountTTL() = default; MTPaccount_GetAccountTTL(const MTPaccount_getAccountTTL &v) : MTPBoxed(v) { } }; class MTPaccount_setAccountTTL { // RPC method 'account.setAccountTTL' public: MTPAccountDaysTTL vttl; MTPaccount_setAccountTTL() = default; MTPaccount_setAccountTTL(const MTPAccountDaysTTL &_ttl) : vttl(_ttl) { } uint32 innerLength() const { return vttl.innerLength(); } mtpTypeId type() const { return mtpc_account_setAccountTTL; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_setAccountTTL) { vttl.read(from, end); } void write(mtpBuffer &to) const { vttl.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_SetAccountTTL : public MTPBoxed { public: MTPaccount_SetAccountTTL() = default; MTPaccount_SetAccountTTL(const MTPaccount_setAccountTTL &v) : MTPBoxed(v) { } MTPaccount_SetAccountTTL(const MTPAccountDaysTTL &_ttl) : MTPBoxed(MTPaccount_setAccountTTL(_ttl)) { } }; class MTPaccount_sendChangePhoneCode { // RPC method 'account.sendChangePhoneCode' public: enum class Flag : int32 { f_allow_flashcall = (1 << 0), f_current_number = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_allow_flashcall() const { return vflags.v & Flag::f_allow_flashcall; } bool has_current_number() const { return vflags.v & Flag::f_current_number; } MTPflags vflags; MTPstring vphone_number; MTPBool vcurrent_number; MTPaccount_sendChangePhoneCode() = default; MTPaccount_sendChangePhoneCode(const MTPflags &_flags, const MTPstring &_phone_number, MTPBool _current_number) : vflags(_flags), vphone_number(_phone_number), vcurrent_number(_current_number) { } uint32 innerLength() const { return vflags.innerLength() + vphone_number.innerLength() + (has_current_number() ? vcurrent_number.innerLength() : 0); } mtpTypeId type() const { return mtpc_account_sendChangePhoneCode; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendChangePhoneCode) { vflags.read(from, end); vphone_number.read(from, end); if (has_current_number()) { vcurrent_number.read(from, end); } else { vcurrent_number = MTPBool(); } } void write(mtpBuffer &to) const { vflags.write(to); vphone_number.write(to); if (has_current_number()) vcurrent_number.write(to); } typedef MTPauth_SentCode ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPaccount_sendChangePhoneCode::Flags) class MTPaccount_SendChangePhoneCode : public MTPBoxed { public: MTPaccount_SendChangePhoneCode() = default; MTPaccount_SendChangePhoneCode(const MTPaccount_sendChangePhoneCode &v) : MTPBoxed(v) { } MTPaccount_SendChangePhoneCode(const MTPflags &_flags, const MTPstring &_phone_number, MTPBool _current_number) : MTPBoxed(MTPaccount_sendChangePhoneCode(_flags, _phone_number, _current_number)) { } }; class MTPaccount_changePhone { // RPC method 'account.changePhone' public: MTPstring vphone_number; MTPstring vphone_code_hash; MTPstring vphone_code; MTPaccount_changePhone() = default; MTPaccount_changePhone(const MTPstring &_phone_number, const MTPstring &_phone_code_hash, const MTPstring &_phone_code) : vphone_number(_phone_number), vphone_code_hash(_phone_code_hash), vphone_code(_phone_code) { } uint32 innerLength() const { return vphone_number.innerLength() + vphone_code_hash.innerLength() + vphone_code.innerLength(); } mtpTypeId type() const { return mtpc_account_changePhone; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_changePhone) { vphone_number.read(from, end); vphone_code_hash.read(from, end); vphone_code.read(from, end); } void write(mtpBuffer &to) const { vphone_number.write(to); vphone_code_hash.write(to); vphone_code.write(to); } typedef MTPUser ResponseType; }; class MTPaccount_ChangePhone : public MTPBoxed { public: MTPaccount_ChangePhone() = default; MTPaccount_ChangePhone(const MTPaccount_changePhone &v) : MTPBoxed(v) { } MTPaccount_ChangePhone(const MTPstring &_phone_number, const MTPstring &_phone_code_hash, const MTPstring &_phone_code) : MTPBoxed(MTPaccount_changePhone(_phone_number, _phone_code_hash, _phone_code)) { } }; class MTPaccount_updateDeviceLocked { // RPC method 'account.updateDeviceLocked' public: MTPint vperiod; MTPaccount_updateDeviceLocked() = default; MTPaccount_updateDeviceLocked(MTPint _period) : vperiod(_period) { } uint32 innerLength() const { return vperiod.innerLength(); } mtpTypeId type() const { return mtpc_account_updateDeviceLocked; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateDeviceLocked) { vperiod.read(from, end); } void write(mtpBuffer &to) const { vperiod.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_UpdateDeviceLocked : public MTPBoxed { public: MTPaccount_UpdateDeviceLocked() = default; MTPaccount_UpdateDeviceLocked(const MTPaccount_updateDeviceLocked &v) : MTPBoxed(v) { } MTPaccount_UpdateDeviceLocked(MTPint _period) : MTPBoxed(MTPaccount_updateDeviceLocked(_period)) { } }; class MTPaccount_getAuthorizations { // RPC method 'account.getAuthorizations' public: MTPaccount_getAuthorizations() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_account_getAuthorizations; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getAuthorizations) { } void write(mtpBuffer &to) const { } typedef MTPaccount_Authorizations ResponseType; }; class MTPaccount_GetAuthorizations : public MTPBoxed { public: MTPaccount_GetAuthorizations() = default; MTPaccount_GetAuthorizations(const MTPaccount_getAuthorizations &v) : MTPBoxed(v) { } }; class MTPaccount_resetAuthorization { // RPC method 'account.resetAuthorization' public: MTPlong vhash; MTPaccount_resetAuthorization() = default; MTPaccount_resetAuthorization(const MTPlong &_hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_account_resetAuthorization; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_resetAuthorization) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_ResetAuthorization : public MTPBoxed { public: MTPaccount_ResetAuthorization() = default; MTPaccount_ResetAuthorization(const MTPaccount_resetAuthorization &v) : MTPBoxed(v) { } MTPaccount_ResetAuthorization(const MTPlong &_hash) : MTPBoxed(MTPaccount_resetAuthorization(_hash)) { } }; class MTPaccount_getPassword { // RPC method 'account.getPassword' public: MTPaccount_getPassword() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_account_getPassword; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getPassword) { } void write(mtpBuffer &to) const { } typedef MTPaccount_Password ResponseType; }; class MTPaccount_GetPassword : public MTPBoxed { public: MTPaccount_GetPassword() = default; MTPaccount_GetPassword(const MTPaccount_getPassword &v) : MTPBoxed(v) { } }; class MTPaccount_getPasswordSettings { // RPC method 'account.getPasswordSettings' public: MTPbytes vcurrent_password_hash; MTPaccount_getPasswordSettings() = default; MTPaccount_getPasswordSettings(const MTPbytes &_current_password_hash) : vcurrent_password_hash(_current_password_hash) { } uint32 innerLength() const { return vcurrent_password_hash.innerLength(); } mtpTypeId type() const { return mtpc_account_getPasswordSettings; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getPasswordSettings) { vcurrent_password_hash.read(from, end); } void write(mtpBuffer &to) const { vcurrent_password_hash.write(to); } typedef MTPaccount_PasswordSettings ResponseType; }; class MTPaccount_GetPasswordSettings : public MTPBoxed { public: MTPaccount_GetPasswordSettings() = default; MTPaccount_GetPasswordSettings(const MTPaccount_getPasswordSettings &v) : MTPBoxed(v) { } MTPaccount_GetPasswordSettings(const MTPbytes &_current_password_hash) : MTPBoxed(MTPaccount_getPasswordSettings(_current_password_hash)) { } }; class MTPaccount_updatePasswordSettings { // RPC method 'account.updatePasswordSettings' public: MTPbytes vcurrent_password_hash; MTPaccount_PasswordInputSettings vnew_settings; MTPaccount_updatePasswordSettings() = default; MTPaccount_updatePasswordSettings(const MTPbytes &_current_password_hash, const MTPaccount_PasswordInputSettings &_new_settings) : vcurrent_password_hash(_current_password_hash), vnew_settings(_new_settings) { } uint32 innerLength() const { return vcurrent_password_hash.innerLength() + vnew_settings.innerLength(); } mtpTypeId type() const { return mtpc_account_updatePasswordSettings; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updatePasswordSettings) { vcurrent_password_hash.read(from, end); vnew_settings.read(from, end); } void write(mtpBuffer &to) const { vcurrent_password_hash.write(to); vnew_settings.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_UpdatePasswordSettings : public MTPBoxed { public: MTPaccount_UpdatePasswordSettings() = default; MTPaccount_UpdatePasswordSettings(const MTPaccount_updatePasswordSettings &v) : MTPBoxed(v) { } MTPaccount_UpdatePasswordSettings(const MTPbytes &_current_password_hash, const MTPaccount_PasswordInputSettings &_new_settings) : MTPBoxed(MTPaccount_updatePasswordSettings(_current_password_hash, _new_settings)) { } }; class MTPaccount_sendConfirmPhoneCode { // RPC method 'account.sendConfirmPhoneCode' public: enum class Flag : int32 { f_allow_flashcall = (1 << 0), f_current_number = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_allow_flashcall() const { return vflags.v & Flag::f_allow_flashcall; } bool has_current_number() const { return vflags.v & Flag::f_current_number; } MTPflags vflags; MTPstring vhash; MTPBool vcurrent_number; MTPaccount_sendConfirmPhoneCode() = default; MTPaccount_sendConfirmPhoneCode(const MTPflags &_flags, const MTPstring &_hash, MTPBool _current_number) : vflags(_flags), vhash(_hash), vcurrent_number(_current_number) { } uint32 innerLength() const { return vflags.innerLength() + vhash.innerLength() + (has_current_number() ? vcurrent_number.innerLength() : 0); } mtpTypeId type() const { return mtpc_account_sendConfirmPhoneCode; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendConfirmPhoneCode) { vflags.read(from, end); vhash.read(from, end); if (has_current_number()) { vcurrent_number.read(from, end); } else { vcurrent_number = MTPBool(); } } void write(mtpBuffer &to) const { vflags.write(to); vhash.write(to); if (has_current_number()) vcurrent_number.write(to); } typedef MTPauth_SentCode ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPaccount_sendConfirmPhoneCode::Flags) class MTPaccount_SendConfirmPhoneCode : public MTPBoxed { public: MTPaccount_SendConfirmPhoneCode() = default; MTPaccount_SendConfirmPhoneCode(const MTPaccount_sendConfirmPhoneCode &v) : MTPBoxed(v) { } MTPaccount_SendConfirmPhoneCode(const MTPflags &_flags, const MTPstring &_hash, MTPBool _current_number) : MTPBoxed(MTPaccount_sendConfirmPhoneCode(_flags, _hash, _current_number)) { } }; class MTPaccount_confirmPhone { // RPC method 'account.confirmPhone' public: MTPstring vphone_code_hash; MTPstring vphone_code; MTPaccount_confirmPhone() = default; MTPaccount_confirmPhone(const MTPstring &_phone_code_hash, const MTPstring &_phone_code) : vphone_code_hash(_phone_code_hash), vphone_code(_phone_code) { } uint32 innerLength() const { return vphone_code_hash.innerLength() + vphone_code.innerLength(); } mtpTypeId type() const { return mtpc_account_confirmPhone; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_confirmPhone) { vphone_code_hash.read(from, end); vphone_code.read(from, end); } void write(mtpBuffer &to) const { vphone_code_hash.write(to); vphone_code.write(to); } typedef MTPBool ResponseType; }; class MTPaccount_ConfirmPhone : public MTPBoxed { public: MTPaccount_ConfirmPhone() = default; MTPaccount_ConfirmPhone(const MTPaccount_confirmPhone &v) : MTPBoxed(v) { } MTPaccount_ConfirmPhone(const MTPstring &_phone_code_hash, const MTPstring &_phone_code) : MTPBoxed(MTPaccount_confirmPhone(_phone_code_hash, _phone_code)) { } }; class MTPusers_getUsers { // RPC method 'users.getUsers' public: MTPVector vid; MTPusers_getUsers() = default; MTPusers_getUsers(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_users_getUsers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_users_getUsers) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPVector ResponseType; }; class MTPusers_GetUsers : public MTPBoxed { public: MTPusers_GetUsers() = default; MTPusers_GetUsers(const MTPusers_getUsers &v) : MTPBoxed(v) { } MTPusers_GetUsers(const MTPVector &_id) : MTPBoxed(MTPusers_getUsers(_id)) { } }; class MTPusers_getFullUser { // RPC method 'users.getFullUser' public: MTPInputUser vid; MTPusers_getFullUser() = default; MTPusers_getFullUser(const MTPInputUser &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_users_getFullUser; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_users_getFullUser) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPUserFull ResponseType; }; class MTPusers_GetFullUser : public MTPBoxed { public: MTPusers_GetFullUser() = default; MTPusers_GetFullUser(const MTPusers_getFullUser &v) : MTPBoxed(v) { } MTPusers_GetFullUser(const MTPInputUser &_id) : MTPBoxed(MTPusers_getFullUser(_id)) { } }; class MTPcontacts_getStatuses { // RPC method 'contacts.getStatuses' public: MTPcontacts_getStatuses() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_contacts_getStatuses; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getStatuses) { } void write(mtpBuffer &to) const { } typedef MTPVector ResponseType; }; class MTPcontacts_GetStatuses : public MTPBoxed { public: MTPcontacts_GetStatuses() = default; MTPcontacts_GetStatuses(const MTPcontacts_getStatuses &v) : MTPBoxed(v) { } }; class MTPcontacts_getContacts { // RPC method 'contacts.getContacts' public: MTPstring vhash; MTPcontacts_getContacts() = default; MTPcontacts_getContacts(const MTPstring &_hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_contacts_getContacts; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getContacts) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPcontacts_Contacts ResponseType; }; class MTPcontacts_GetContacts : public MTPBoxed { public: MTPcontacts_GetContacts() = default; MTPcontacts_GetContacts(const MTPcontacts_getContacts &v) : MTPBoxed(v) { } MTPcontacts_GetContacts(const MTPstring &_hash) : MTPBoxed(MTPcontacts_getContacts(_hash)) { } }; class MTPcontacts_importContacts { // RPC method 'contacts.importContacts' public: MTPVector vcontacts; MTPBool vreplace; MTPcontacts_importContacts() = default; MTPcontacts_importContacts(const MTPVector &_contacts, MTPBool _replace) : vcontacts(_contacts), vreplace(_replace) { } uint32 innerLength() const { return vcontacts.innerLength() + vreplace.innerLength(); } mtpTypeId type() const { return mtpc_contacts_importContacts; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_importContacts) { vcontacts.read(from, end); vreplace.read(from, end); } void write(mtpBuffer &to) const { vcontacts.write(to); vreplace.write(to); } typedef MTPcontacts_ImportedContacts ResponseType; }; class MTPcontacts_ImportContacts : public MTPBoxed { public: MTPcontacts_ImportContacts() = default; MTPcontacts_ImportContacts(const MTPcontacts_importContacts &v) : MTPBoxed(v) { } MTPcontacts_ImportContacts(const MTPVector &_contacts, MTPBool _replace) : MTPBoxed(MTPcontacts_importContacts(_contacts, _replace)) { } }; class MTPcontacts_deleteContact { // RPC method 'contacts.deleteContact' public: MTPInputUser vid; MTPcontacts_deleteContact() = default; MTPcontacts_deleteContact(const MTPInputUser &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_contacts_deleteContact; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_deleteContact) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPcontacts_Link ResponseType; }; class MTPcontacts_DeleteContact : public MTPBoxed { public: MTPcontacts_DeleteContact() = default; MTPcontacts_DeleteContact(const MTPcontacts_deleteContact &v) : MTPBoxed(v) { } MTPcontacts_DeleteContact(const MTPInputUser &_id) : MTPBoxed(MTPcontacts_deleteContact(_id)) { } }; class MTPcontacts_deleteContacts { // RPC method 'contacts.deleteContacts' public: MTPVector vid; MTPcontacts_deleteContacts() = default; MTPcontacts_deleteContacts(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_contacts_deleteContacts; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_deleteContacts) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPBool ResponseType; }; class MTPcontacts_DeleteContacts : public MTPBoxed { public: MTPcontacts_DeleteContacts() = default; MTPcontacts_DeleteContacts(const MTPcontacts_deleteContacts &v) : MTPBoxed(v) { } MTPcontacts_DeleteContacts(const MTPVector &_id) : MTPBoxed(MTPcontacts_deleteContacts(_id)) { } }; class MTPcontacts_block { // RPC method 'contacts.block' public: MTPInputUser vid; MTPcontacts_block() = default; MTPcontacts_block(const MTPInputUser &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_contacts_block; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_block) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPBool ResponseType; }; class MTPcontacts_Block : public MTPBoxed { public: MTPcontacts_Block() = default; MTPcontacts_Block(const MTPcontacts_block &v) : MTPBoxed(v) { } MTPcontacts_Block(const MTPInputUser &_id) : MTPBoxed(MTPcontacts_block(_id)) { } }; class MTPcontacts_unblock { // RPC method 'contacts.unblock' public: MTPInputUser vid; MTPcontacts_unblock() = default; MTPcontacts_unblock(const MTPInputUser &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_contacts_unblock; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_unblock) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPBool ResponseType; }; class MTPcontacts_Unblock : public MTPBoxed { public: MTPcontacts_Unblock() = default; MTPcontacts_Unblock(const MTPcontacts_unblock &v) : MTPBoxed(v) { } MTPcontacts_Unblock(const MTPInputUser &_id) : MTPBoxed(MTPcontacts_unblock(_id)) { } }; class MTPcontacts_getBlocked { // RPC method 'contacts.getBlocked' public: MTPint voffset; MTPint vlimit; MTPcontacts_getBlocked() = default; MTPcontacts_getBlocked(MTPint _offset, MTPint _limit) : voffset(_offset), vlimit(_limit) { } uint32 innerLength() const { return voffset.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_contacts_getBlocked; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getBlocked) { voffset.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { voffset.write(to); vlimit.write(to); } typedef MTPcontacts_Blocked ResponseType; }; class MTPcontacts_GetBlocked : public MTPBoxed { public: MTPcontacts_GetBlocked() = default; MTPcontacts_GetBlocked(const MTPcontacts_getBlocked &v) : MTPBoxed(v) { } MTPcontacts_GetBlocked(MTPint _offset, MTPint _limit) : MTPBoxed(MTPcontacts_getBlocked(_offset, _limit)) { } }; class MTPcontacts_exportCard { // RPC method 'contacts.exportCard' public: MTPcontacts_exportCard() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_contacts_exportCard; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_exportCard) { } void write(mtpBuffer &to) const { } typedef MTPVector ResponseType; }; class MTPcontacts_ExportCard : public MTPBoxed { public: MTPcontacts_ExportCard() = default; MTPcontacts_ExportCard(const MTPcontacts_exportCard &v) : MTPBoxed(v) { } }; class MTPcontacts_importCard { // RPC method 'contacts.importCard' public: MTPVector vexport_card; MTPcontacts_importCard() = default; MTPcontacts_importCard(const MTPVector &_export_card) : vexport_card(_export_card) { } uint32 innerLength() const { return vexport_card.innerLength(); } mtpTypeId type() const { return mtpc_contacts_importCard; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_importCard) { vexport_card.read(from, end); } void write(mtpBuffer &to) const { vexport_card.write(to); } typedef MTPUser ResponseType; }; class MTPcontacts_ImportCard : public MTPBoxed { public: MTPcontacts_ImportCard() = default; MTPcontacts_ImportCard(const MTPcontacts_importCard &v) : MTPBoxed(v) { } MTPcontacts_ImportCard(const MTPVector &_export_card) : MTPBoxed(MTPcontacts_importCard(_export_card)) { } }; class MTPcontacts_search { // RPC method 'contacts.search' public: MTPstring vq; MTPint vlimit; MTPcontacts_search() = default; MTPcontacts_search(const MTPstring &_q, MTPint _limit) : vq(_q), vlimit(_limit) { } uint32 innerLength() const { return vq.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_contacts_search; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_search) { vq.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vq.write(to); vlimit.write(to); } typedef MTPcontacts_Found ResponseType; }; class MTPcontacts_Search : public MTPBoxed { public: MTPcontacts_Search() = default; MTPcontacts_Search(const MTPcontacts_search &v) : MTPBoxed(v) { } MTPcontacts_Search(const MTPstring &_q, MTPint _limit) : MTPBoxed(MTPcontacts_search(_q, _limit)) { } }; class MTPcontacts_resolveUsername { // RPC method 'contacts.resolveUsername' public: MTPstring vusername; MTPcontacts_resolveUsername() = default; MTPcontacts_resolveUsername(const MTPstring &_username) : vusername(_username) { } uint32 innerLength() const { return vusername.innerLength(); } mtpTypeId type() const { return mtpc_contacts_resolveUsername; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_resolveUsername) { vusername.read(from, end); } void write(mtpBuffer &to) const { vusername.write(to); } typedef MTPcontacts_ResolvedPeer ResponseType; }; class MTPcontacts_ResolveUsername : public MTPBoxed { public: MTPcontacts_ResolveUsername() = default; MTPcontacts_ResolveUsername(const MTPcontacts_resolveUsername &v) : MTPBoxed(v) { } MTPcontacts_ResolveUsername(const MTPstring &_username) : MTPBoxed(MTPcontacts_resolveUsername(_username)) { } }; class MTPcontacts_getTopPeers { // RPC method 'contacts.getTopPeers' public: enum class Flag : int32 { f_correspondents = (1 << 0), f_bots_pm = (1 << 1), f_bots_inline = (1 << 2), f_groups = (1 << 10), f_channels = (1 << 15), MAX_FIELD = (1 << 15), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_correspondents() const { return vflags.v & Flag::f_correspondents; } bool is_bots_pm() const { return vflags.v & Flag::f_bots_pm; } bool is_bots_inline() const { return vflags.v & Flag::f_bots_inline; } bool is_groups() const { return vflags.v & Flag::f_groups; } bool is_channels() const { return vflags.v & Flag::f_channels; } MTPflags vflags; MTPint voffset; MTPint vlimit; MTPint vhash; MTPcontacts_getTopPeers() = default; MTPcontacts_getTopPeers(const MTPflags &_flags, MTPint _offset, MTPint _limit, MTPint _hash) : vflags(_flags), voffset(_offset), vlimit(_limit), vhash(_hash) { } uint32 innerLength() const { return vflags.innerLength() + voffset.innerLength() + vlimit.innerLength() + vhash.innerLength(); } mtpTypeId type() const { return mtpc_contacts_getTopPeers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getTopPeers) { vflags.read(from, end); voffset.read(from, end); vlimit.read(from, end); vhash.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); voffset.write(to); vlimit.write(to); vhash.write(to); } typedef MTPcontacts_TopPeers ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPcontacts_getTopPeers::Flags) class MTPcontacts_GetTopPeers : public MTPBoxed { public: MTPcontacts_GetTopPeers() = default; MTPcontacts_GetTopPeers(const MTPcontacts_getTopPeers &v) : MTPBoxed(v) { } MTPcontacts_GetTopPeers(const MTPflags &_flags, MTPint _offset, MTPint _limit, MTPint _hash) : MTPBoxed(MTPcontacts_getTopPeers(_flags, _offset, _limit, _hash)) { } }; class MTPcontacts_resetTopPeerRating { // RPC method 'contacts.resetTopPeerRating' public: MTPTopPeerCategory vcategory; MTPInputPeer vpeer; MTPcontacts_resetTopPeerRating() = default; MTPcontacts_resetTopPeerRating(const MTPTopPeerCategory &_category, const MTPInputPeer &_peer) : vcategory(_category), vpeer(_peer) { } uint32 innerLength() const { return vcategory.innerLength() + vpeer.innerLength(); } mtpTypeId type() const { return mtpc_contacts_resetTopPeerRating; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_resetTopPeerRating) { vcategory.read(from, end); vpeer.read(from, end); } void write(mtpBuffer &to) const { vcategory.write(to); vpeer.write(to); } typedef MTPBool ResponseType; }; class MTPcontacts_ResetTopPeerRating : public MTPBoxed { public: MTPcontacts_ResetTopPeerRating() = default; MTPcontacts_ResetTopPeerRating(const MTPcontacts_resetTopPeerRating &v) : MTPBoxed(v) { } MTPcontacts_ResetTopPeerRating(const MTPTopPeerCategory &_category, const MTPInputPeer &_peer) : MTPBoxed(MTPcontacts_resetTopPeerRating(_category, _peer)) { } }; class MTPmessages_getMessages { // RPC method 'messages.getMessages' public: MTPVector vid; MTPmessages_getMessages() = default; MTPmessages_getMessages(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_getMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMessages) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPmessages_Messages ResponseType; }; class MTPmessages_GetMessages : public MTPBoxed { public: MTPmessages_GetMessages() = default; MTPmessages_GetMessages(const MTPmessages_getMessages &v) : MTPBoxed(v) { } MTPmessages_GetMessages(const MTPVector &_id) : MTPBoxed(MTPmessages_getMessages(_id)) { } }; class MTPmessages_getDialogs { // RPC method 'messages.getDialogs' public: enum class Flag : int32 { f_exclude_pinned = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_exclude_pinned() const { return vflags.v & Flag::f_exclude_pinned; } MTPflags vflags; MTPint voffset_date; MTPint voffset_id; MTPInputPeer voffset_peer; MTPint vlimit; MTPmessages_getDialogs() = default; MTPmessages_getDialogs(const MTPflags &_flags, MTPint _offset_date, MTPint _offset_id, const MTPInputPeer &_offset_peer, MTPint _limit) : vflags(_flags), voffset_date(_offset_date), voffset_id(_offset_id), voffset_peer(_offset_peer), vlimit(_limit) { } uint32 innerLength() const { return vflags.innerLength() + voffset_date.innerLength() + voffset_id.innerLength() + voffset_peer.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_messages_getDialogs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getDialogs) { vflags.read(from, end); voffset_date.read(from, end); voffset_id.read(from, end); voffset_peer.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); voffset_date.write(to); voffset_id.write(to); voffset_peer.write(to); vlimit.write(to); } typedef MTPmessages_Dialogs ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_getDialogs::Flags) class MTPmessages_GetDialogs : public MTPBoxed { public: MTPmessages_GetDialogs() = default; MTPmessages_GetDialogs(const MTPmessages_getDialogs &v) : MTPBoxed(v) { } MTPmessages_GetDialogs(const MTPflags &_flags, MTPint _offset_date, MTPint _offset_id, const MTPInputPeer &_offset_peer, MTPint _limit) : MTPBoxed(MTPmessages_getDialogs(_flags, _offset_date, _offset_id, _offset_peer, _limit)) { } }; class MTPmessages_getHistory { // RPC method 'messages.getHistory' public: MTPInputPeer vpeer; MTPint voffset_id; MTPint voffset_date; MTPint vadd_offset; MTPint vlimit; MTPint vmax_id; MTPint vmin_id; MTPmessages_getHistory() = default; MTPmessages_getHistory(const MTPInputPeer &_peer, MTPint _offset_id, MTPint _offset_date, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : vpeer(_peer), voffset_id(_offset_id), voffset_date(_offset_date), vadd_offset(_add_offset), vlimit(_limit), vmax_id(_max_id), vmin_id(_min_id) { } uint32 innerLength() const { return vpeer.innerLength() + voffset_id.innerLength() + voffset_date.innerLength() + vadd_offset.innerLength() + vlimit.innerLength() + vmax_id.innerLength() + vmin_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_getHistory; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getHistory) { vpeer.read(from, end); voffset_id.read(from, end); voffset_date.read(from, end); vadd_offset.read(from, end); vlimit.read(from, end); vmax_id.read(from, end); vmin_id.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); voffset_id.write(to); voffset_date.write(to); vadd_offset.write(to); vlimit.write(to); vmax_id.write(to); vmin_id.write(to); } typedef MTPmessages_Messages ResponseType; }; class MTPmessages_GetHistory : public MTPBoxed { public: MTPmessages_GetHistory() = default; MTPmessages_GetHistory(const MTPmessages_getHistory &v) : MTPBoxed(v) { } MTPmessages_GetHistory(const MTPInputPeer &_peer, MTPint _offset_id, MTPint _offset_date, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : MTPBoxed(MTPmessages_getHistory(_peer, _offset_id, _offset_date, _add_offset, _limit, _max_id, _min_id)) { } }; class MTPmessages_search { // RPC method 'messages.search' public: enum class Flag : int32 { MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } MTPflags vflags; MTPInputPeer vpeer; MTPstring vq; MTPMessagesFilter vfilter; MTPint vmin_date; MTPint vmax_date; MTPint voffset; MTPint vmax_id; MTPint vlimit; MTPmessages_search() = default; MTPmessages_search(const MTPflags &_flags, const MTPInputPeer &_peer, const MTPstring &_q, const MTPMessagesFilter &_filter, MTPint _min_date, MTPint _max_date, MTPint _offset, MTPint _max_id, MTPint _limit) : vflags(_flags), vpeer(_peer), vq(_q), vfilter(_filter), vmin_date(_min_date), vmax_date(_max_date), voffset(_offset), vmax_id(_max_id), vlimit(_limit) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + vq.innerLength() + vfilter.innerLength() + vmin_date.innerLength() + vmax_date.innerLength() + voffset.innerLength() + vmax_id.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_messages_search; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_search) { vflags.read(from, end); vpeer.read(from, end); vq.read(from, end); vfilter.read(from, end); vmin_date.read(from, end); vmax_date.read(from, end); voffset.read(from, end); vmax_id.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); vq.write(to); vfilter.write(to); vmin_date.write(to); vmax_date.write(to); voffset.write(to); vmax_id.write(to); vlimit.write(to); } typedef MTPmessages_Messages ResponseType; }; class MTPmessages_Search : public MTPBoxed { public: MTPmessages_Search() = default; MTPmessages_Search(const MTPmessages_search &v) : MTPBoxed(v) { } MTPmessages_Search(const MTPflags &_flags, const MTPInputPeer &_peer, const MTPstring &_q, const MTPMessagesFilter &_filter, MTPint _min_date, MTPint _max_date, MTPint _offset, MTPint _max_id, MTPint _limit) : MTPBoxed(MTPmessages_search(_flags, _peer, _q, _filter, _min_date, _max_date, _offset, _max_id, _limit)) { } }; class MTPmessages_readHistory { // RPC method 'messages.readHistory' public: MTPInputPeer vpeer; MTPint vmax_id; MTPmessages_readHistory() = default; MTPmessages_readHistory(const MTPInputPeer &_peer, MTPint _max_id) : vpeer(_peer), vmax_id(_max_id) { } uint32 innerLength() const { return vpeer.innerLength() + vmax_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_readHistory; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readHistory) { vpeer.read(from, end); vmax_id.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vmax_id.write(to); } typedef MTPmessages_AffectedMessages ResponseType; }; class MTPmessages_ReadHistory : public MTPBoxed { public: MTPmessages_ReadHistory() = default; MTPmessages_ReadHistory(const MTPmessages_readHistory &v) : MTPBoxed(v) { } MTPmessages_ReadHistory(const MTPInputPeer &_peer, MTPint _max_id) : MTPBoxed(MTPmessages_readHistory(_peer, _max_id)) { } }; class MTPmessages_deleteHistory { // RPC method 'messages.deleteHistory' public: enum class Flag : int32 { f_just_clear = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_just_clear() const { return vflags.v & Flag::f_just_clear; } MTPflags vflags; MTPInputPeer vpeer; MTPint vmax_id; MTPmessages_deleteHistory() = default; MTPmessages_deleteHistory(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _max_id) : vflags(_flags), vpeer(_peer), vmax_id(_max_id) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + vmax_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_deleteHistory; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteHistory) { vflags.read(from, end); vpeer.read(from, end); vmax_id.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); vmax_id.write(to); } typedef MTPmessages_AffectedHistory ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_deleteHistory::Flags) class MTPmessages_DeleteHistory : public MTPBoxed { public: MTPmessages_DeleteHistory() = default; MTPmessages_DeleteHistory(const MTPmessages_deleteHistory &v) : MTPBoxed(v) { } MTPmessages_DeleteHistory(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _max_id) : MTPBoxed(MTPmessages_deleteHistory(_flags, _peer, _max_id)) { } }; class MTPmessages_deleteMessages { // RPC method 'messages.deleteMessages' public: enum class Flag : int32 { f_revoke = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_revoke() const { return vflags.v & Flag::f_revoke; } MTPflags vflags; MTPVector vid; MTPmessages_deleteMessages() = default; MTPmessages_deleteMessages(const MTPflags &_flags, const MTPVector &_id) : vflags(_flags), vid(_id) { } uint32 innerLength() const { return vflags.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_deleteMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteMessages) { vflags.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vid.write(to); } typedef MTPmessages_AffectedMessages ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_deleteMessages::Flags) class MTPmessages_DeleteMessages : public MTPBoxed { public: MTPmessages_DeleteMessages() = default; MTPmessages_DeleteMessages(const MTPmessages_deleteMessages &v) : MTPBoxed(v) { } MTPmessages_DeleteMessages(const MTPflags &_flags, const MTPVector &_id) : MTPBoxed(MTPmessages_deleteMessages(_flags, _id)) { } }; class MTPmessages_receivedMessages { // RPC method 'messages.receivedMessages' public: MTPint vmax_id; MTPmessages_receivedMessages() = default; MTPmessages_receivedMessages(MTPint _max_id) : vmax_id(_max_id) { } uint32 innerLength() const { return vmax_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_receivedMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_receivedMessages) { vmax_id.read(from, end); } void write(mtpBuffer &to) const { vmax_id.write(to); } typedef MTPVector ResponseType; }; class MTPmessages_ReceivedMessages : public MTPBoxed { public: MTPmessages_ReceivedMessages() = default; MTPmessages_ReceivedMessages(const MTPmessages_receivedMessages &v) : MTPBoxed(v) { } MTPmessages_ReceivedMessages(MTPint _max_id) : MTPBoxed(MTPmessages_receivedMessages(_max_id)) { } }; class MTPmessages_setTyping { // RPC method 'messages.setTyping' public: MTPInputPeer vpeer; MTPSendMessageAction vaction; MTPmessages_setTyping() = default; MTPmessages_setTyping(const MTPInputPeer &_peer, const MTPSendMessageAction &_action) : vpeer(_peer), vaction(_action) { } uint32 innerLength() const { return vpeer.innerLength() + vaction.innerLength(); } mtpTypeId type() const { return mtpc_messages_setTyping; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setTyping) { vpeer.read(from, end); vaction.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vaction.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_SetTyping : public MTPBoxed { public: MTPmessages_SetTyping() = default; MTPmessages_SetTyping(const MTPmessages_setTyping &v) : MTPBoxed(v) { } MTPmessages_SetTyping(const MTPInputPeer &_peer, const MTPSendMessageAction &_action) : MTPBoxed(MTPmessages_setTyping(_peer, _action)) { } }; class MTPmessages_sendMessage { // RPC method 'messages.sendMessage' public: enum class Flag : int32 { f_no_webpage = (1 << 1), f_silent = (1 << 5), f_background = (1 << 6), f_clear_draft = (1 << 7), f_reply_to_msg_id = (1 << 0), f_reply_markup = (1 << 2), f_entities = (1 << 3), MAX_FIELD = (1 << 7), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool is_silent() const { return vflags.v & Flag::f_silent; } bool is_background() const { return vflags.v & Flag::f_background; } bool is_clear_draft() const { return vflags.v & Flag::f_clear_draft; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPflags vflags; MTPInputPeer vpeer; MTPint vreply_to_msg_id; MTPstring vmessage; MTPlong vrandom_id; MTPReplyMarkup vreply_markup; MTPVector ventities; MTPmessages_sendMessage() = default; MTPmessages_sendMessage(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _reply_to_msg_id, const MTPstring &_message, const MTPlong &_random_id, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities) : vflags(_flags), vpeer(_peer), vreply_to_msg_id(_reply_to_msg_id), vmessage(_message), vrandom_id(_random_id), vreply_markup(_reply_markup), ventities(_entities) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + (has_reply_to_msg_id() ? vreply_to_msg_id.innerLength() : 0) + vmessage.innerLength() + vrandom_id.innerLength() + (has_reply_markup() ? vreply_markup.innerLength() : 0) + (has_entities() ? ventities.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_sendMessage; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendMessage) { vflags.read(from, end); vpeer.read(from, end); if (has_reply_to_msg_id()) { vreply_to_msg_id.read(from, end); } else { vreply_to_msg_id = MTPint(); } vmessage.read(from, end); vrandom_id.read(from, end); if (has_reply_markup()) { vreply_markup.read(from, end); } else { vreply_markup = MTPReplyMarkup(); } if (has_entities()) { ventities.read(from, end); } else { ventities = MTPVector(); } } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); if (has_reply_to_msg_id()) vreply_to_msg_id.write(to); vmessage.write(to); vrandom_id.write(to); if (has_reply_markup()) vreply_markup.write(to); if (has_entities()) ventities.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_sendMessage::Flags) class MTPmessages_SendMessage : public MTPBoxed { public: MTPmessages_SendMessage() = default; MTPmessages_SendMessage(const MTPmessages_sendMessage &v) : MTPBoxed(v) { } MTPmessages_SendMessage(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _reply_to_msg_id, const MTPstring &_message, const MTPlong &_random_id, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities) : MTPBoxed(MTPmessages_sendMessage(_flags, _peer, _reply_to_msg_id, _message, _random_id, _reply_markup, _entities)) { } }; class MTPmessages_sendMedia { // RPC method 'messages.sendMedia' public: enum class Flag : int32 { f_silent = (1 << 5), f_background = (1 << 6), f_clear_draft = (1 << 7), f_reply_to_msg_id = (1 << 0), f_reply_markup = (1 << 2), MAX_FIELD = (1 << 7), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_silent() const { return vflags.v & Flag::f_silent; } bool is_background() const { return vflags.v & Flag::f_background; } bool is_clear_draft() const { return vflags.v & Flag::f_clear_draft; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } MTPflags vflags; MTPInputPeer vpeer; MTPint vreply_to_msg_id; MTPInputMedia vmedia; MTPlong vrandom_id; MTPReplyMarkup vreply_markup; MTPmessages_sendMedia() = default; MTPmessages_sendMedia(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _reply_to_msg_id, const MTPInputMedia &_media, const MTPlong &_random_id, const MTPReplyMarkup &_reply_markup) : vflags(_flags), vpeer(_peer), vreply_to_msg_id(_reply_to_msg_id), vmedia(_media), vrandom_id(_random_id), vreply_markup(_reply_markup) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + (has_reply_to_msg_id() ? vreply_to_msg_id.innerLength() : 0) + vmedia.innerLength() + vrandom_id.innerLength() + (has_reply_markup() ? vreply_markup.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_sendMedia; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendMedia) { vflags.read(from, end); vpeer.read(from, end); if (has_reply_to_msg_id()) { vreply_to_msg_id.read(from, end); } else { vreply_to_msg_id = MTPint(); } vmedia.read(from, end); vrandom_id.read(from, end); if (has_reply_markup()) { vreply_markup.read(from, end); } else { vreply_markup = MTPReplyMarkup(); } } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); if (has_reply_to_msg_id()) vreply_to_msg_id.write(to); vmedia.write(to); vrandom_id.write(to); if (has_reply_markup()) vreply_markup.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_sendMedia::Flags) class MTPmessages_SendMedia : public MTPBoxed { public: MTPmessages_SendMedia() = default; MTPmessages_SendMedia(const MTPmessages_sendMedia &v) : MTPBoxed(v) { } MTPmessages_SendMedia(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _reply_to_msg_id, const MTPInputMedia &_media, const MTPlong &_random_id, const MTPReplyMarkup &_reply_markup) : MTPBoxed(MTPmessages_sendMedia(_flags, _peer, _reply_to_msg_id, _media, _random_id, _reply_markup)) { } }; class MTPmessages_forwardMessages { // RPC method 'messages.forwardMessages' public: enum class Flag : int32 { f_silent = (1 << 5), f_background = (1 << 6), f_with_my_score = (1 << 8), MAX_FIELD = (1 << 8), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_silent() const { return vflags.v & Flag::f_silent; } bool is_background() const { return vflags.v & Flag::f_background; } bool is_with_my_score() const { return vflags.v & Flag::f_with_my_score; } MTPflags vflags; MTPInputPeer vfrom_peer; MTPVector vid; MTPVector vrandom_id; MTPInputPeer vto_peer; MTPmessages_forwardMessages() = default; MTPmessages_forwardMessages(const MTPflags &_flags, const MTPInputPeer &_from_peer, const MTPVector &_id, const MTPVector &_random_id, const MTPInputPeer &_to_peer) : vflags(_flags), vfrom_peer(_from_peer), vid(_id), vrandom_id(_random_id), vto_peer(_to_peer) { } uint32 innerLength() const { return vflags.innerLength() + vfrom_peer.innerLength() + vid.innerLength() + vrandom_id.innerLength() + vto_peer.innerLength(); } mtpTypeId type() const { return mtpc_messages_forwardMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_forwardMessages) { vflags.read(from, end); vfrom_peer.read(from, end); vid.read(from, end); vrandom_id.read(from, end); vto_peer.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vfrom_peer.write(to); vid.write(to); vrandom_id.write(to); vto_peer.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_forwardMessages::Flags) class MTPmessages_ForwardMessages : public MTPBoxed { public: MTPmessages_ForwardMessages() = default; MTPmessages_ForwardMessages(const MTPmessages_forwardMessages &v) : MTPBoxed(v) { } MTPmessages_ForwardMessages(const MTPflags &_flags, const MTPInputPeer &_from_peer, const MTPVector &_id, const MTPVector &_random_id, const MTPInputPeer &_to_peer) : MTPBoxed(MTPmessages_forwardMessages(_flags, _from_peer, _id, _random_id, _to_peer)) { } }; class MTPmessages_reportSpam { // RPC method 'messages.reportSpam' public: MTPInputPeer vpeer; MTPmessages_reportSpam() = default; MTPmessages_reportSpam(const MTPInputPeer &_peer) : vpeer(_peer) { } uint32 innerLength() const { return vpeer.innerLength(); } mtpTypeId type() const { return mtpc_messages_reportSpam; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reportSpam) { vpeer.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_ReportSpam : public MTPBoxed { public: MTPmessages_ReportSpam() = default; MTPmessages_ReportSpam(const MTPmessages_reportSpam &v) : MTPBoxed(v) { } MTPmessages_ReportSpam(const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_reportSpam(_peer)) { } }; class MTPmessages_hideReportSpam { // RPC method 'messages.hideReportSpam' public: MTPInputPeer vpeer; MTPmessages_hideReportSpam() = default; MTPmessages_hideReportSpam(const MTPInputPeer &_peer) : vpeer(_peer) { } uint32 innerLength() const { return vpeer.innerLength(); } mtpTypeId type() const { return mtpc_messages_hideReportSpam; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_hideReportSpam) { vpeer.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_HideReportSpam : public MTPBoxed { public: MTPmessages_HideReportSpam() = default; MTPmessages_HideReportSpam(const MTPmessages_hideReportSpam &v) : MTPBoxed(v) { } MTPmessages_HideReportSpam(const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_hideReportSpam(_peer)) { } }; class MTPmessages_getPeerSettings { // RPC method 'messages.getPeerSettings' public: MTPInputPeer vpeer; MTPmessages_getPeerSettings() = default; MTPmessages_getPeerSettings(const MTPInputPeer &_peer) : vpeer(_peer) { } uint32 innerLength() const { return vpeer.innerLength(); } mtpTypeId type() const { return mtpc_messages_getPeerSettings; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getPeerSettings) { vpeer.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); } typedef MTPPeerSettings ResponseType; }; class MTPmessages_GetPeerSettings : public MTPBoxed { public: MTPmessages_GetPeerSettings() = default; MTPmessages_GetPeerSettings(const MTPmessages_getPeerSettings &v) : MTPBoxed(v) { } MTPmessages_GetPeerSettings(const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_getPeerSettings(_peer)) { } }; class MTPmessages_getChats { // RPC method 'messages.getChats' public: MTPVector vid; MTPmessages_getChats() = default; MTPmessages_getChats(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_getChats; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getChats) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPmessages_Chats ResponseType; }; class MTPmessages_GetChats : public MTPBoxed { public: MTPmessages_GetChats() = default; MTPmessages_GetChats(const MTPmessages_getChats &v) : MTPBoxed(v) { } MTPmessages_GetChats(const MTPVector &_id) : MTPBoxed(MTPmessages_getChats(_id)) { } }; class MTPmessages_getFullChat { // RPC method 'messages.getFullChat' public: MTPint vchat_id; MTPmessages_getFullChat() = default; MTPmessages_getFullChat(MTPint _chat_id) : vchat_id(_chat_id) { } uint32 innerLength() const { return vchat_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_getFullChat; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getFullChat) { vchat_id.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); } typedef MTPmessages_ChatFull ResponseType; }; class MTPmessages_GetFullChat : public MTPBoxed { public: MTPmessages_GetFullChat() = default; MTPmessages_GetFullChat(const MTPmessages_getFullChat &v) : MTPBoxed(v) { } MTPmessages_GetFullChat(MTPint _chat_id) : MTPBoxed(MTPmessages_getFullChat(_chat_id)) { } }; class MTPmessages_editChatTitle { // RPC method 'messages.editChatTitle' public: MTPint vchat_id; MTPstring vtitle; MTPmessages_editChatTitle() = default; MTPmessages_editChatTitle(MTPint _chat_id, const MTPstring &_title) : vchat_id(_chat_id), vtitle(_title) { } uint32 innerLength() const { return vchat_id.innerLength() + vtitle.innerLength(); } mtpTypeId type() const { return mtpc_messages_editChatTitle; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editChatTitle) { vchat_id.read(from, end); vtitle.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); vtitle.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_EditChatTitle : public MTPBoxed { public: MTPmessages_EditChatTitle() = default; MTPmessages_EditChatTitle(const MTPmessages_editChatTitle &v) : MTPBoxed(v) { } MTPmessages_EditChatTitle(MTPint _chat_id, const MTPstring &_title) : MTPBoxed(MTPmessages_editChatTitle(_chat_id, _title)) { } }; class MTPmessages_editChatPhoto { // RPC method 'messages.editChatPhoto' public: MTPint vchat_id; MTPInputChatPhoto vphoto; MTPmessages_editChatPhoto() = default; MTPmessages_editChatPhoto(MTPint _chat_id, const MTPInputChatPhoto &_photo) : vchat_id(_chat_id), vphoto(_photo) { } uint32 innerLength() const { return vchat_id.innerLength() + vphoto.innerLength(); } mtpTypeId type() const { return mtpc_messages_editChatPhoto; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editChatPhoto) { vchat_id.read(from, end); vphoto.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); vphoto.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_EditChatPhoto : public MTPBoxed { public: MTPmessages_EditChatPhoto() = default; MTPmessages_EditChatPhoto(const MTPmessages_editChatPhoto &v) : MTPBoxed(v) { } MTPmessages_EditChatPhoto(MTPint _chat_id, const MTPInputChatPhoto &_photo) : MTPBoxed(MTPmessages_editChatPhoto(_chat_id, _photo)) { } }; class MTPmessages_addChatUser { // RPC method 'messages.addChatUser' public: MTPint vchat_id; MTPInputUser vuser_id; MTPint vfwd_limit; MTPmessages_addChatUser() = default; MTPmessages_addChatUser(MTPint _chat_id, const MTPInputUser &_user_id, MTPint _fwd_limit) : vchat_id(_chat_id), vuser_id(_user_id), vfwd_limit(_fwd_limit) { } uint32 innerLength() const { return vchat_id.innerLength() + vuser_id.innerLength() + vfwd_limit.innerLength(); } mtpTypeId type() const { return mtpc_messages_addChatUser; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_addChatUser) { vchat_id.read(from, end); vuser_id.read(from, end); vfwd_limit.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); vuser_id.write(to); vfwd_limit.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_AddChatUser : public MTPBoxed { public: MTPmessages_AddChatUser() = default; MTPmessages_AddChatUser(const MTPmessages_addChatUser &v) : MTPBoxed(v) { } MTPmessages_AddChatUser(MTPint _chat_id, const MTPInputUser &_user_id, MTPint _fwd_limit) : MTPBoxed(MTPmessages_addChatUser(_chat_id, _user_id, _fwd_limit)) { } }; class MTPmessages_deleteChatUser { // RPC method 'messages.deleteChatUser' public: MTPint vchat_id; MTPInputUser vuser_id; MTPmessages_deleteChatUser() = default; MTPmessages_deleteChatUser(MTPint _chat_id, const MTPInputUser &_user_id) : vchat_id(_chat_id), vuser_id(_user_id) { } uint32 innerLength() const { return vchat_id.innerLength() + vuser_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_deleteChatUser; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteChatUser) { vchat_id.read(from, end); vuser_id.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); vuser_id.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_DeleteChatUser : public MTPBoxed { public: MTPmessages_DeleteChatUser() = default; MTPmessages_DeleteChatUser(const MTPmessages_deleteChatUser &v) : MTPBoxed(v) { } MTPmessages_DeleteChatUser(MTPint _chat_id, const MTPInputUser &_user_id) : MTPBoxed(MTPmessages_deleteChatUser(_chat_id, _user_id)) { } }; class MTPmessages_createChat { // RPC method 'messages.createChat' public: MTPVector vusers; MTPstring vtitle; MTPmessages_createChat() = default; MTPmessages_createChat(const MTPVector &_users, const MTPstring &_title) : vusers(_users), vtitle(_title) { } uint32 innerLength() const { return vusers.innerLength() + vtitle.innerLength(); } mtpTypeId type() const { return mtpc_messages_createChat; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_createChat) { vusers.read(from, end); vtitle.read(from, end); } void write(mtpBuffer &to) const { vusers.write(to); vtitle.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_CreateChat : public MTPBoxed { public: MTPmessages_CreateChat() = default; MTPmessages_CreateChat(const MTPmessages_createChat &v) : MTPBoxed(v) { } MTPmessages_CreateChat(const MTPVector &_users, const MTPstring &_title) : MTPBoxed(MTPmessages_createChat(_users, _title)) { } }; class MTPmessages_forwardMessage { // RPC method 'messages.forwardMessage' public: MTPInputPeer vpeer; MTPint vid; MTPlong vrandom_id; MTPmessages_forwardMessage() = default; MTPmessages_forwardMessage(const MTPInputPeer &_peer, MTPint _id, const MTPlong &_random_id) : vpeer(_peer), vid(_id), vrandom_id(_random_id) { } uint32 innerLength() const { return vpeer.innerLength() + vid.innerLength() + vrandom_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_forwardMessage; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_forwardMessage) { vpeer.read(from, end); vid.read(from, end); vrandom_id.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vid.write(to); vrandom_id.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_ForwardMessage : public MTPBoxed { public: MTPmessages_ForwardMessage() = default; MTPmessages_ForwardMessage(const MTPmessages_forwardMessage &v) : MTPBoxed(v) { } MTPmessages_ForwardMessage(const MTPInputPeer &_peer, MTPint _id, const MTPlong &_random_id) : MTPBoxed(MTPmessages_forwardMessage(_peer, _id, _random_id)) { } }; class MTPmessages_getDhConfig { // RPC method 'messages.getDhConfig' public: MTPint vversion; MTPint vrandom_length; MTPmessages_getDhConfig() = default; MTPmessages_getDhConfig(MTPint _version, MTPint _random_length) : vversion(_version), vrandom_length(_random_length) { } uint32 innerLength() const { return vversion.innerLength() + vrandom_length.innerLength(); } mtpTypeId type() const { return mtpc_messages_getDhConfig; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getDhConfig) { vversion.read(from, end); vrandom_length.read(from, end); } void write(mtpBuffer &to) const { vversion.write(to); vrandom_length.write(to); } typedef MTPmessages_DhConfig ResponseType; }; class MTPmessages_GetDhConfig : public MTPBoxed { public: MTPmessages_GetDhConfig() = default; MTPmessages_GetDhConfig(const MTPmessages_getDhConfig &v) : MTPBoxed(v) { } MTPmessages_GetDhConfig(MTPint _version, MTPint _random_length) : MTPBoxed(MTPmessages_getDhConfig(_version, _random_length)) { } }; class MTPmessages_requestEncryption { // RPC method 'messages.requestEncryption' public: MTPInputUser vuser_id; MTPint vrandom_id; MTPbytes vg_a; MTPmessages_requestEncryption() = default; MTPmessages_requestEncryption(const MTPInputUser &_user_id, MTPint _random_id, const MTPbytes &_g_a) : vuser_id(_user_id), vrandom_id(_random_id), vg_a(_g_a) { } uint32 innerLength() const { return vuser_id.innerLength() + vrandom_id.innerLength() + vg_a.innerLength(); } mtpTypeId type() const { return mtpc_messages_requestEncryption; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_requestEncryption) { vuser_id.read(from, end); vrandom_id.read(from, end); vg_a.read(from, end); } void write(mtpBuffer &to) const { vuser_id.write(to); vrandom_id.write(to); vg_a.write(to); } typedef MTPEncryptedChat ResponseType; }; class MTPmessages_RequestEncryption : public MTPBoxed { public: MTPmessages_RequestEncryption() = default; MTPmessages_RequestEncryption(const MTPmessages_requestEncryption &v) : MTPBoxed(v) { } MTPmessages_RequestEncryption(const MTPInputUser &_user_id, MTPint _random_id, const MTPbytes &_g_a) : MTPBoxed(MTPmessages_requestEncryption(_user_id, _random_id, _g_a)) { } }; class MTPmessages_acceptEncryption { // RPC method 'messages.acceptEncryption' public: MTPInputEncryptedChat vpeer; MTPbytes vg_b; MTPlong vkey_fingerprint; MTPmessages_acceptEncryption() = default; MTPmessages_acceptEncryption(const MTPInputEncryptedChat &_peer, const MTPbytes &_g_b, const MTPlong &_key_fingerprint) : vpeer(_peer), vg_b(_g_b), vkey_fingerprint(_key_fingerprint) { } uint32 innerLength() const { return vpeer.innerLength() + vg_b.innerLength() + vkey_fingerprint.innerLength(); } mtpTypeId type() const { return mtpc_messages_acceptEncryption; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_acceptEncryption) { vpeer.read(from, end); vg_b.read(from, end); vkey_fingerprint.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vg_b.write(to); vkey_fingerprint.write(to); } typedef MTPEncryptedChat ResponseType; }; class MTPmessages_AcceptEncryption : public MTPBoxed { public: MTPmessages_AcceptEncryption() = default; MTPmessages_AcceptEncryption(const MTPmessages_acceptEncryption &v) : MTPBoxed(v) { } MTPmessages_AcceptEncryption(const MTPInputEncryptedChat &_peer, const MTPbytes &_g_b, const MTPlong &_key_fingerprint) : MTPBoxed(MTPmessages_acceptEncryption(_peer, _g_b, _key_fingerprint)) { } }; class MTPmessages_discardEncryption { // RPC method 'messages.discardEncryption' public: MTPint vchat_id; MTPmessages_discardEncryption() = default; MTPmessages_discardEncryption(MTPint _chat_id) : vchat_id(_chat_id) { } uint32 innerLength() const { return vchat_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_discardEncryption; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_discardEncryption) { vchat_id.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_DiscardEncryption : public MTPBoxed { public: MTPmessages_DiscardEncryption() = default; MTPmessages_DiscardEncryption(const MTPmessages_discardEncryption &v) : MTPBoxed(v) { } MTPmessages_DiscardEncryption(MTPint _chat_id) : MTPBoxed(MTPmessages_discardEncryption(_chat_id)) { } }; class MTPmessages_setEncryptedTyping { // RPC method 'messages.setEncryptedTyping' public: MTPInputEncryptedChat vpeer; MTPBool vtyping; MTPmessages_setEncryptedTyping() = default; MTPmessages_setEncryptedTyping(const MTPInputEncryptedChat &_peer, MTPBool _typing) : vpeer(_peer), vtyping(_typing) { } uint32 innerLength() const { return vpeer.innerLength() + vtyping.innerLength(); } mtpTypeId type() const { return mtpc_messages_setEncryptedTyping; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setEncryptedTyping) { vpeer.read(from, end); vtyping.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vtyping.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_SetEncryptedTyping : public MTPBoxed { public: MTPmessages_SetEncryptedTyping() = default; MTPmessages_SetEncryptedTyping(const MTPmessages_setEncryptedTyping &v) : MTPBoxed(v) { } MTPmessages_SetEncryptedTyping(const MTPInputEncryptedChat &_peer, MTPBool _typing) : MTPBoxed(MTPmessages_setEncryptedTyping(_peer, _typing)) { } }; class MTPmessages_readEncryptedHistory { // RPC method 'messages.readEncryptedHistory' public: MTPInputEncryptedChat vpeer; MTPint vmax_date; MTPmessages_readEncryptedHistory() = default; MTPmessages_readEncryptedHistory(const MTPInputEncryptedChat &_peer, MTPint _max_date) : vpeer(_peer), vmax_date(_max_date) { } uint32 innerLength() const { return vpeer.innerLength() + vmax_date.innerLength(); } mtpTypeId type() const { return mtpc_messages_readEncryptedHistory; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readEncryptedHistory) { vpeer.read(from, end); vmax_date.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vmax_date.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_ReadEncryptedHistory : public MTPBoxed { public: MTPmessages_ReadEncryptedHistory() = default; MTPmessages_ReadEncryptedHistory(const MTPmessages_readEncryptedHistory &v) : MTPBoxed(v) { } MTPmessages_ReadEncryptedHistory(const MTPInputEncryptedChat &_peer, MTPint _max_date) : MTPBoxed(MTPmessages_readEncryptedHistory(_peer, _max_date)) { } }; class MTPmessages_sendEncrypted { // RPC method 'messages.sendEncrypted' public: MTPInputEncryptedChat vpeer; MTPlong vrandom_id; MTPbytes vdata; MTPmessages_sendEncrypted() = default; MTPmessages_sendEncrypted(const MTPInputEncryptedChat &_peer, const MTPlong &_random_id, const MTPbytes &_data) : vpeer(_peer), vrandom_id(_random_id), vdata(_data) { } uint32 innerLength() const { return vpeer.innerLength() + vrandom_id.innerLength() + vdata.innerLength(); } mtpTypeId type() const { return mtpc_messages_sendEncrypted; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendEncrypted) { vpeer.read(from, end); vrandom_id.read(from, end); vdata.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vrandom_id.write(to); vdata.write(to); } typedef MTPmessages_SentEncryptedMessage ResponseType; }; class MTPmessages_SendEncrypted : public MTPBoxed { public: MTPmessages_SendEncrypted() = default; MTPmessages_SendEncrypted(const MTPmessages_sendEncrypted &v) : MTPBoxed(v) { } MTPmessages_SendEncrypted(const MTPInputEncryptedChat &_peer, const MTPlong &_random_id, const MTPbytes &_data) : MTPBoxed(MTPmessages_sendEncrypted(_peer, _random_id, _data)) { } }; class MTPmessages_sendEncryptedFile { // RPC method 'messages.sendEncryptedFile' public: MTPInputEncryptedChat vpeer; MTPlong vrandom_id; MTPbytes vdata; MTPInputEncryptedFile vfile; MTPmessages_sendEncryptedFile() = default; MTPmessages_sendEncryptedFile(const MTPInputEncryptedChat &_peer, const MTPlong &_random_id, const MTPbytes &_data, const MTPInputEncryptedFile &_file) : vpeer(_peer), vrandom_id(_random_id), vdata(_data), vfile(_file) { } uint32 innerLength() const { return vpeer.innerLength() + vrandom_id.innerLength() + vdata.innerLength() + vfile.innerLength(); } mtpTypeId type() const { return mtpc_messages_sendEncryptedFile; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendEncryptedFile) { vpeer.read(from, end); vrandom_id.read(from, end); vdata.read(from, end); vfile.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vrandom_id.write(to); vdata.write(to); vfile.write(to); } typedef MTPmessages_SentEncryptedMessage ResponseType; }; class MTPmessages_SendEncryptedFile : public MTPBoxed { public: MTPmessages_SendEncryptedFile() = default; MTPmessages_SendEncryptedFile(const MTPmessages_sendEncryptedFile &v) : MTPBoxed(v) { } MTPmessages_SendEncryptedFile(const MTPInputEncryptedChat &_peer, const MTPlong &_random_id, const MTPbytes &_data, const MTPInputEncryptedFile &_file) : MTPBoxed(MTPmessages_sendEncryptedFile(_peer, _random_id, _data, _file)) { } }; class MTPmessages_sendEncryptedService { // RPC method 'messages.sendEncryptedService' public: MTPInputEncryptedChat vpeer; MTPlong vrandom_id; MTPbytes vdata; MTPmessages_sendEncryptedService() = default; MTPmessages_sendEncryptedService(const MTPInputEncryptedChat &_peer, const MTPlong &_random_id, const MTPbytes &_data) : vpeer(_peer), vrandom_id(_random_id), vdata(_data) { } uint32 innerLength() const { return vpeer.innerLength() + vrandom_id.innerLength() + vdata.innerLength(); } mtpTypeId type() const { return mtpc_messages_sendEncryptedService; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendEncryptedService) { vpeer.read(from, end); vrandom_id.read(from, end); vdata.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vrandom_id.write(to); vdata.write(to); } typedef MTPmessages_SentEncryptedMessage ResponseType; }; class MTPmessages_SendEncryptedService : public MTPBoxed { public: MTPmessages_SendEncryptedService() = default; MTPmessages_SendEncryptedService(const MTPmessages_sendEncryptedService &v) : MTPBoxed(v) { } MTPmessages_SendEncryptedService(const MTPInputEncryptedChat &_peer, const MTPlong &_random_id, const MTPbytes &_data) : MTPBoxed(MTPmessages_sendEncryptedService(_peer, _random_id, _data)) { } }; class MTPmessages_receivedQueue { // RPC method 'messages.receivedQueue' public: MTPint vmax_qts; MTPmessages_receivedQueue() = default; MTPmessages_receivedQueue(MTPint _max_qts) : vmax_qts(_max_qts) { } uint32 innerLength() const { return vmax_qts.innerLength(); } mtpTypeId type() const { return mtpc_messages_receivedQueue; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_receivedQueue) { vmax_qts.read(from, end); } void write(mtpBuffer &to) const { vmax_qts.write(to); } typedef MTPVector ResponseType; }; class MTPmessages_ReceivedQueue : public MTPBoxed { public: MTPmessages_ReceivedQueue() = default; MTPmessages_ReceivedQueue(const MTPmessages_receivedQueue &v) : MTPBoxed(v) { } MTPmessages_ReceivedQueue(MTPint _max_qts) : MTPBoxed(MTPmessages_receivedQueue(_max_qts)) { } }; class MTPmessages_reportEncryptedSpam { // RPC method 'messages.reportEncryptedSpam' public: MTPInputEncryptedChat vpeer; MTPmessages_reportEncryptedSpam() = default; MTPmessages_reportEncryptedSpam(const MTPInputEncryptedChat &_peer) : vpeer(_peer) { } uint32 innerLength() const { return vpeer.innerLength(); } mtpTypeId type() const { return mtpc_messages_reportEncryptedSpam; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reportEncryptedSpam) { vpeer.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_ReportEncryptedSpam : public MTPBoxed { public: MTPmessages_ReportEncryptedSpam() = default; MTPmessages_ReportEncryptedSpam(const MTPmessages_reportEncryptedSpam &v) : MTPBoxed(v) { } MTPmessages_ReportEncryptedSpam(const MTPInputEncryptedChat &_peer) : MTPBoxed(MTPmessages_reportEncryptedSpam(_peer)) { } }; class MTPmessages_readMessageContents { // RPC method 'messages.readMessageContents' public: MTPVector vid; MTPmessages_readMessageContents() = default; MTPmessages_readMessageContents(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_readMessageContents; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readMessageContents) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPmessages_AffectedMessages ResponseType; }; class MTPmessages_ReadMessageContents : public MTPBoxed { public: MTPmessages_ReadMessageContents() = default; MTPmessages_ReadMessageContents(const MTPmessages_readMessageContents &v) : MTPBoxed(v) { } MTPmessages_ReadMessageContents(const MTPVector &_id) : MTPBoxed(MTPmessages_readMessageContents(_id)) { } }; class MTPmessages_getAllStickers { // RPC method 'messages.getAllStickers' public: MTPint vhash; MTPmessages_getAllStickers() = default; MTPmessages_getAllStickers(MTPint _hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getAllStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getAllStickers) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPmessages_AllStickers ResponseType; }; class MTPmessages_GetAllStickers : public MTPBoxed { public: MTPmessages_GetAllStickers() = default; MTPmessages_GetAllStickers(const MTPmessages_getAllStickers &v) : MTPBoxed(v) { } MTPmessages_GetAllStickers(MTPint _hash) : MTPBoxed(MTPmessages_getAllStickers(_hash)) { } }; class MTPmessages_getWebPagePreview { // RPC method 'messages.getWebPagePreview' public: MTPstring vmessage; MTPmessages_getWebPagePreview() = default; MTPmessages_getWebPagePreview(const MTPstring &_message) : vmessage(_message) { } uint32 innerLength() const { return vmessage.innerLength(); } mtpTypeId type() const { return mtpc_messages_getWebPagePreview; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getWebPagePreview) { vmessage.read(from, end); } void write(mtpBuffer &to) const { vmessage.write(to); } typedef MTPMessageMedia ResponseType; }; class MTPmessages_GetWebPagePreview : public MTPBoxed { public: MTPmessages_GetWebPagePreview() = default; MTPmessages_GetWebPagePreview(const MTPmessages_getWebPagePreview &v) : MTPBoxed(v) { } MTPmessages_GetWebPagePreview(const MTPstring &_message) : MTPBoxed(MTPmessages_getWebPagePreview(_message)) { } }; class MTPmessages_exportChatInvite { // RPC method 'messages.exportChatInvite' public: MTPint vchat_id; MTPmessages_exportChatInvite() = default; MTPmessages_exportChatInvite(MTPint _chat_id) : vchat_id(_chat_id) { } uint32 innerLength() const { return vchat_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_exportChatInvite; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_exportChatInvite) { vchat_id.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); } typedef MTPExportedChatInvite ResponseType; }; class MTPmessages_ExportChatInvite : public MTPBoxed { public: MTPmessages_ExportChatInvite() = default; MTPmessages_ExportChatInvite(const MTPmessages_exportChatInvite &v) : MTPBoxed(v) { } MTPmessages_ExportChatInvite(MTPint _chat_id) : MTPBoxed(MTPmessages_exportChatInvite(_chat_id)) { } }; class MTPmessages_checkChatInvite { // RPC method 'messages.checkChatInvite' public: MTPstring vhash; MTPmessages_checkChatInvite() = default; MTPmessages_checkChatInvite(const MTPstring &_hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_checkChatInvite; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_checkChatInvite) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPChatInvite ResponseType; }; class MTPmessages_CheckChatInvite : public MTPBoxed { public: MTPmessages_CheckChatInvite() = default; MTPmessages_CheckChatInvite(const MTPmessages_checkChatInvite &v) : MTPBoxed(v) { } MTPmessages_CheckChatInvite(const MTPstring &_hash) : MTPBoxed(MTPmessages_checkChatInvite(_hash)) { } }; class MTPmessages_importChatInvite { // RPC method 'messages.importChatInvite' public: MTPstring vhash; MTPmessages_importChatInvite() = default; MTPmessages_importChatInvite(const MTPstring &_hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_importChatInvite; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_importChatInvite) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_ImportChatInvite : public MTPBoxed { public: MTPmessages_ImportChatInvite() = default; MTPmessages_ImportChatInvite(const MTPmessages_importChatInvite &v) : MTPBoxed(v) { } MTPmessages_ImportChatInvite(const MTPstring &_hash) : MTPBoxed(MTPmessages_importChatInvite(_hash)) { } }; class MTPmessages_getStickerSet { // RPC method 'messages.getStickerSet' public: MTPInputStickerSet vstickerset; MTPmessages_getStickerSet() = default; MTPmessages_getStickerSet(const MTPInputStickerSet &_stickerset) : vstickerset(_stickerset) { } uint32 innerLength() const { return vstickerset.innerLength(); } mtpTypeId type() const { return mtpc_messages_getStickerSet; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getStickerSet) { vstickerset.read(from, end); } void write(mtpBuffer &to) const { vstickerset.write(to); } typedef MTPmessages_StickerSet ResponseType; }; class MTPmessages_GetStickerSet : public MTPBoxed { public: MTPmessages_GetStickerSet() = default; MTPmessages_GetStickerSet(const MTPmessages_getStickerSet &v) : MTPBoxed(v) { } MTPmessages_GetStickerSet(const MTPInputStickerSet &_stickerset) : MTPBoxed(MTPmessages_getStickerSet(_stickerset)) { } }; class MTPmessages_installStickerSet { // RPC method 'messages.installStickerSet' public: MTPInputStickerSet vstickerset; MTPBool varchived; MTPmessages_installStickerSet() = default; MTPmessages_installStickerSet(const MTPInputStickerSet &_stickerset, MTPBool _archived) : vstickerset(_stickerset), varchived(_archived) { } uint32 innerLength() const { return vstickerset.innerLength() + varchived.innerLength(); } mtpTypeId type() const { return mtpc_messages_installStickerSet; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_installStickerSet) { vstickerset.read(from, end); varchived.read(from, end); } void write(mtpBuffer &to) const { vstickerset.write(to); varchived.write(to); } typedef MTPmessages_StickerSetInstallResult ResponseType; }; class MTPmessages_InstallStickerSet : public MTPBoxed { public: MTPmessages_InstallStickerSet() = default; MTPmessages_InstallStickerSet(const MTPmessages_installStickerSet &v) : MTPBoxed(v) { } MTPmessages_InstallStickerSet(const MTPInputStickerSet &_stickerset, MTPBool _archived) : MTPBoxed(MTPmessages_installStickerSet(_stickerset, _archived)) { } }; class MTPmessages_uninstallStickerSet { // RPC method 'messages.uninstallStickerSet' public: MTPInputStickerSet vstickerset; MTPmessages_uninstallStickerSet() = default; MTPmessages_uninstallStickerSet(const MTPInputStickerSet &_stickerset) : vstickerset(_stickerset) { } uint32 innerLength() const { return vstickerset.innerLength(); } mtpTypeId type() const { return mtpc_messages_uninstallStickerSet; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_uninstallStickerSet) { vstickerset.read(from, end); } void write(mtpBuffer &to) const { vstickerset.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_UninstallStickerSet : public MTPBoxed { public: MTPmessages_UninstallStickerSet() = default; MTPmessages_UninstallStickerSet(const MTPmessages_uninstallStickerSet &v) : MTPBoxed(v) { } MTPmessages_UninstallStickerSet(const MTPInputStickerSet &_stickerset) : MTPBoxed(MTPmessages_uninstallStickerSet(_stickerset)) { } }; class MTPmessages_startBot { // RPC method 'messages.startBot' public: MTPInputUser vbot; MTPInputPeer vpeer; MTPlong vrandom_id; MTPstring vstart_param; MTPmessages_startBot() = default; MTPmessages_startBot(const MTPInputUser &_bot, const MTPInputPeer &_peer, const MTPlong &_random_id, const MTPstring &_start_param) : vbot(_bot), vpeer(_peer), vrandom_id(_random_id), vstart_param(_start_param) { } uint32 innerLength() const { return vbot.innerLength() + vpeer.innerLength() + vrandom_id.innerLength() + vstart_param.innerLength(); } mtpTypeId type() const { return mtpc_messages_startBot; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_startBot) { vbot.read(from, end); vpeer.read(from, end); vrandom_id.read(from, end); vstart_param.read(from, end); } void write(mtpBuffer &to) const { vbot.write(to); vpeer.write(to); vrandom_id.write(to); vstart_param.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_StartBot : public MTPBoxed { public: MTPmessages_StartBot() = default; MTPmessages_StartBot(const MTPmessages_startBot &v) : MTPBoxed(v) { } MTPmessages_StartBot(const MTPInputUser &_bot, const MTPInputPeer &_peer, const MTPlong &_random_id, const MTPstring &_start_param) : MTPBoxed(MTPmessages_startBot(_bot, _peer, _random_id, _start_param)) { } }; class MTPmessages_getMessagesViews { // RPC method 'messages.getMessagesViews' public: MTPInputPeer vpeer; MTPVector vid; MTPBool vincrement; MTPmessages_getMessagesViews() = default; MTPmessages_getMessagesViews(const MTPInputPeer &_peer, const MTPVector &_id, MTPBool _increment) : vpeer(_peer), vid(_id), vincrement(_increment) { } uint32 innerLength() const { return vpeer.innerLength() + vid.innerLength() + vincrement.innerLength(); } mtpTypeId type() const { return mtpc_messages_getMessagesViews; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMessagesViews) { vpeer.read(from, end); vid.read(from, end); vincrement.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vid.write(to); vincrement.write(to); } typedef MTPVector ResponseType; }; class MTPmessages_GetMessagesViews : public MTPBoxed { public: MTPmessages_GetMessagesViews() = default; MTPmessages_GetMessagesViews(const MTPmessages_getMessagesViews &v) : MTPBoxed(v) { } MTPmessages_GetMessagesViews(const MTPInputPeer &_peer, const MTPVector &_id, MTPBool _increment) : MTPBoxed(MTPmessages_getMessagesViews(_peer, _id, _increment)) { } }; class MTPmessages_toggleChatAdmins { // RPC method 'messages.toggleChatAdmins' public: MTPint vchat_id; MTPBool venabled; MTPmessages_toggleChatAdmins() = default; MTPmessages_toggleChatAdmins(MTPint _chat_id, MTPBool _enabled) : vchat_id(_chat_id), venabled(_enabled) { } uint32 innerLength() const { return vchat_id.innerLength() + venabled.innerLength(); } mtpTypeId type() const { return mtpc_messages_toggleChatAdmins; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_toggleChatAdmins) { vchat_id.read(from, end); venabled.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); venabled.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_ToggleChatAdmins : public MTPBoxed { public: MTPmessages_ToggleChatAdmins() = default; MTPmessages_ToggleChatAdmins(const MTPmessages_toggleChatAdmins &v) : MTPBoxed(v) { } MTPmessages_ToggleChatAdmins(MTPint _chat_id, MTPBool _enabled) : MTPBoxed(MTPmessages_toggleChatAdmins(_chat_id, _enabled)) { } }; class MTPmessages_editChatAdmin { // RPC method 'messages.editChatAdmin' public: MTPint vchat_id; MTPInputUser vuser_id; MTPBool vis_admin; MTPmessages_editChatAdmin() = default; MTPmessages_editChatAdmin(MTPint _chat_id, const MTPInputUser &_user_id, MTPBool _is_admin) : vchat_id(_chat_id), vuser_id(_user_id), vis_admin(_is_admin) { } uint32 innerLength() const { return vchat_id.innerLength() + vuser_id.innerLength() + vis_admin.innerLength(); } mtpTypeId type() const { return mtpc_messages_editChatAdmin; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editChatAdmin) { vchat_id.read(from, end); vuser_id.read(from, end); vis_admin.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); vuser_id.write(to); vis_admin.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_EditChatAdmin : public MTPBoxed { public: MTPmessages_EditChatAdmin() = default; MTPmessages_EditChatAdmin(const MTPmessages_editChatAdmin &v) : MTPBoxed(v) { } MTPmessages_EditChatAdmin(MTPint _chat_id, const MTPInputUser &_user_id, MTPBool _is_admin) : MTPBoxed(MTPmessages_editChatAdmin(_chat_id, _user_id, _is_admin)) { } }; class MTPmessages_migrateChat { // RPC method 'messages.migrateChat' public: MTPint vchat_id; MTPmessages_migrateChat() = default; MTPmessages_migrateChat(MTPint _chat_id) : vchat_id(_chat_id) { } uint32 innerLength() const { return vchat_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_migrateChat; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_migrateChat) { vchat_id.read(from, end); } void write(mtpBuffer &to) const { vchat_id.write(to); } typedef MTPUpdates ResponseType; }; class MTPmessages_MigrateChat : public MTPBoxed { public: MTPmessages_MigrateChat() = default; MTPmessages_MigrateChat(const MTPmessages_migrateChat &v) : MTPBoxed(v) { } MTPmessages_MigrateChat(MTPint _chat_id) : MTPBoxed(MTPmessages_migrateChat(_chat_id)) { } }; class MTPmessages_searchGlobal { // RPC method 'messages.searchGlobal' public: MTPstring vq; MTPint voffset_date; MTPInputPeer voffset_peer; MTPint voffset_id; MTPint vlimit; MTPmessages_searchGlobal() = default; MTPmessages_searchGlobal(const MTPstring &_q, MTPint _offset_date, const MTPInputPeer &_offset_peer, MTPint _offset_id, MTPint _limit) : vq(_q), voffset_date(_offset_date), voffset_peer(_offset_peer), voffset_id(_offset_id), vlimit(_limit) { } uint32 innerLength() const { return vq.innerLength() + voffset_date.innerLength() + voffset_peer.innerLength() + voffset_id.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_messages_searchGlobal; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_searchGlobal) { vq.read(from, end); voffset_date.read(from, end); voffset_peer.read(from, end); voffset_id.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vq.write(to); voffset_date.write(to); voffset_peer.write(to); voffset_id.write(to); vlimit.write(to); } typedef MTPmessages_Messages ResponseType; }; class MTPmessages_SearchGlobal : public MTPBoxed { public: MTPmessages_SearchGlobal() = default; MTPmessages_SearchGlobal(const MTPmessages_searchGlobal &v) : MTPBoxed(v) { } MTPmessages_SearchGlobal(const MTPstring &_q, MTPint _offset_date, const MTPInputPeer &_offset_peer, MTPint _offset_id, MTPint _limit) : MTPBoxed(MTPmessages_searchGlobal(_q, _offset_date, _offset_peer, _offset_id, _limit)) { } }; class MTPmessages_reorderStickerSets { // RPC method 'messages.reorderStickerSets' public: enum class Flag : int32 { f_masks = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_masks() const { return vflags.v & Flag::f_masks; } MTPflags vflags; MTPVector vorder; MTPmessages_reorderStickerSets() = default; MTPmessages_reorderStickerSets(const MTPflags &_flags, const MTPVector &_order) : vflags(_flags), vorder(_order) { } uint32 innerLength() const { return vflags.innerLength() + vorder.innerLength(); } mtpTypeId type() const { return mtpc_messages_reorderStickerSets; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reorderStickerSets) { vflags.read(from, end); vorder.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vorder.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_reorderStickerSets::Flags) class MTPmessages_ReorderStickerSets : public MTPBoxed { public: MTPmessages_ReorderStickerSets() = default; MTPmessages_ReorderStickerSets(const MTPmessages_reorderStickerSets &v) : MTPBoxed(v) { } MTPmessages_ReorderStickerSets(const MTPflags &_flags, const MTPVector &_order) : MTPBoxed(MTPmessages_reorderStickerSets(_flags, _order)) { } }; class MTPmessages_getDocumentByHash { // RPC method 'messages.getDocumentByHash' public: MTPbytes vsha256; MTPint vsize; MTPstring vmime_type; MTPmessages_getDocumentByHash() = default; MTPmessages_getDocumentByHash(const MTPbytes &_sha256, MTPint _size, const MTPstring &_mime_type) : vsha256(_sha256), vsize(_size), vmime_type(_mime_type) { } uint32 innerLength() const { return vsha256.innerLength() + vsize.innerLength() + vmime_type.innerLength(); } mtpTypeId type() const { return mtpc_messages_getDocumentByHash; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getDocumentByHash) { vsha256.read(from, end); vsize.read(from, end); vmime_type.read(from, end); } void write(mtpBuffer &to) const { vsha256.write(to); vsize.write(to); vmime_type.write(to); } typedef MTPDocument ResponseType; }; class MTPmessages_GetDocumentByHash : public MTPBoxed { public: MTPmessages_GetDocumentByHash() = default; MTPmessages_GetDocumentByHash(const MTPmessages_getDocumentByHash &v) : MTPBoxed(v) { } MTPmessages_GetDocumentByHash(const MTPbytes &_sha256, MTPint _size, const MTPstring &_mime_type) : MTPBoxed(MTPmessages_getDocumentByHash(_sha256, _size, _mime_type)) { } }; class MTPmessages_searchGifs { // RPC method 'messages.searchGifs' public: MTPstring vq; MTPint voffset; MTPmessages_searchGifs() = default; MTPmessages_searchGifs(const MTPstring &_q, MTPint _offset) : vq(_q), voffset(_offset) { } uint32 innerLength() const { return vq.innerLength() + voffset.innerLength(); } mtpTypeId type() const { return mtpc_messages_searchGifs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_searchGifs) { vq.read(from, end); voffset.read(from, end); } void write(mtpBuffer &to) const { vq.write(to); voffset.write(to); } typedef MTPmessages_FoundGifs ResponseType; }; class MTPmessages_SearchGifs : public MTPBoxed { public: MTPmessages_SearchGifs() = default; MTPmessages_SearchGifs(const MTPmessages_searchGifs &v) : MTPBoxed(v) { } MTPmessages_SearchGifs(const MTPstring &_q, MTPint _offset) : MTPBoxed(MTPmessages_searchGifs(_q, _offset)) { } }; class MTPmessages_getSavedGifs { // RPC method 'messages.getSavedGifs' public: MTPint vhash; MTPmessages_getSavedGifs() = default; MTPmessages_getSavedGifs(MTPint _hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getSavedGifs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getSavedGifs) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPmessages_SavedGifs ResponseType; }; class MTPmessages_GetSavedGifs : public MTPBoxed { public: MTPmessages_GetSavedGifs() = default; MTPmessages_GetSavedGifs(const MTPmessages_getSavedGifs &v) : MTPBoxed(v) { } MTPmessages_GetSavedGifs(MTPint _hash) : MTPBoxed(MTPmessages_getSavedGifs(_hash)) { } }; class MTPmessages_saveGif { // RPC method 'messages.saveGif' public: MTPInputDocument vid; MTPBool vunsave; MTPmessages_saveGif() = default; MTPmessages_saveGif(const MTPInputDocument &_id, MTPBool _unsave) : vid(_id), vunsave(_unsave) { } uint32 innerLength() const { return vid.innerLength() + vunsave.innerLength(); } mtpTypeId type() const { return mtpc_messages_saveGif; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveGif) { vid.read(from, end); vunsave.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); vunsave.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_SaveGif : public MTPBoxed { public: MTPmessages_SaveGif() = default; MTPmessages_SaveGif(const MTPmessages_saveGif &v) : MTPBoxed(v) { } MTPmessages_SaveGif(const MTPInputDocument &_id, MTPBool _unsave) : MTPBoxed(MTPmessages_saveGif(_id, _unsave)) { } }; class MTPmessages_getInlineBotResults { // RPC method 'messages.getInlineBotResults' public: enum class Flag : int32 { f_geo_point = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_geo_point() const { return vflags.v & Flag::f_geo_point; } MTPflags vflags; MTPInputUser vbot; MTPInputPeer vpeer; MTPInputGeoPoint vgeo_point; MTPstring vquery; MTPstring voffset; MTPmessages_getInlineBotResults() = default; MTPmessages_getInlineBotResults(const MTPflags &_flags, const MTPInputUser &_bot, const MTPInputPeer &_peer, const MTPInputGeoPoint &_geo_point, const MTPstring &_query, const MTPstring &_offset) : vflags(_flags), vbot(_bot), vpeer(_peer), vgeo_point(_geo_point), vquery(_query), voffset(_offset) { } uint32 innerLength() const { return vflags.innerLength() + vbot.innerLength() + vpeer.innerLength() + (has_geo_point() ? vgeo_point.innerLength() : 0) + vquery.innerLength() + voffset.innerLength(); } mtpTypeId type() const { return mtpc_messages_getInlineBotResults; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getInlineBotResults) { vflags.read(from, end); vbot.read(from, end); vpeer.read(from, end); if (has_geo_point()) { vgeo_point.read(from, end); } else { vgeo_point = MTPInputGeoPoint(); } vquery.read(from, end); voffset.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vbot.write(to); vpeer.write(to); if (has_geo_point()) vgeo_point.write(to); vquery.write(to); voffset.write(to); } typedef MTPmessages_BotResults ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_getInlineBotResults::Flags) class MTPmessages_GetInlineBotResults : public MTPBoxed { public: MTPmessages_GetInlineBotResults() = default; MTPmessages_GetInlineBotResults(const MTPmessages_getInlineBotResults &v) : MTPBoxed(v) { } MTPmessages_GetInlineBotResults(const MTPflags &_flags, const MTPInputUser &_bot, const MTPInputPeer &_peer, const MTPInputGeoPoint &_geo_point, const MTPstring &_query, const MTPstring &_offset) : MTPBoxed(MTPmessages_getInlineBotResults(_flags, _bot, _peer, _geo_point, _query, _offset)) { } }; class MTPmessages_setInlineBotResults { // RPC method 'messages.setInlineBotResults' public: enum class Flag : int32 { f_gallery = (1 << 0), f_private = (1 << 1), f_next_offset = (1 << 2), f_switch_pm = (1 << 3), MAX_FIELD = (1 << 3), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_gallery() const { return vflags.v & Flag::f_gallery; } bool is_private() const { return vflags.v & Flag::f_private; } bool has_next_offset() const { return vflags.v & Flag::f_next_offset; } bool has_switch_pm() const { return vflags.v & Flag::f_switch_pm; } MTPflags vflags; MTPlong vquery_id; MTPVector vresults; MTPint vcache_time; MTPstring vnext_offset; MTPInlineBotSwitchPM vswitch_pm; MTPmessages_setInlineBotResults() = default; MTPmessages_setInlineBotResults(const MTPflags &_flags, const MTPlong &_query_id, const MTPVector &_results, MTPint _cache_time, const MTPstring &_next_offset, const MTPInlineBotSwitchPM &_switch_pm) : vflags(_flags), vquery_id(_query_id), vresults(_results), vcache_time(_cache_time), vnext_offset(_next_offset), vswitch_pm(_switch_pm) { } uint32 innerLength() const { return vflags.innerLength() + vquery_id.innerLength() + vresults.innerLength() + vcache_time.innerLength() + (has_next_offset() ? vnext_offset.innerLength() : 0) + (has_switch_pm() ? vswitch_pm.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_setInlineBotResults; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setInlineBotResults) { vflags.read(from, end); vquery_id.read(from, end); vresults.read(from, end); vcache_time.read(from, end); if (has_next_offset()) { vnext_offset.read(from, end); } else { vnext_offset = MTPstring(); } if (has_switch_pm()) { vswitch_pm.read(from, end); } else { vswitch_pm = MTPInlineBotSwitchPM(); } } void write(mtpBuffer &to) const { vflags.write(to); vquery_id.write(to); vresults.write(to); vcache_time.write(to); if (has_next_offset()) vnext_offset.write(to); if (has_switch_pm()) vswitch_pm.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_setInlineBotResults::Flags) class MTPmessages_SetInlineBotResults : public MTPBoxed { public: MTPmessages_SetInlineBotResults() = default; MTPmessages_SetInlineBotResults(const MTPmessages_setInlineBotResults &v) : MTPBoxed(v) { } MTPmessages_SetInlineBotResults(const MTPflags &_flags, const MTPlong &_query_id, const MTPVector &_results, MTPint _cache_time, const MTPstring &_next_offset, const MTPInlineBotSwitchPM &_switch_pm) : MTPBoxed(MTPmessages_setInlineBotResults(_flags, _query_id, _results, _cache_time, _next_offset, _switch_pm)) { } }; class MTPmessages_sendInlineBotResult { // RPC method 'messages.sendInlineBotResult' public: enum class Flag : int32 { f_silent = (1 << 5), f_background = (1 << 6), f_clear_draft = (1 << 7), f_reply_to_msg_id = (1 << 0), MAX_FIELD = (1 << 7), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_silent() const { return vflags.v & Flag::f_silent; } bool is_background() const { return vflags.v & Flag::f_background; } bool is_clear_draft() const { return vflags.v & Flag::f_clear_draft; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } MTPflags vflags; MTPInputPeer vpeer; MTPint vreply_to_msg_id; MTPlong vrandom_id; MTPlong vquery_id; MTPstring vid; MTPmessages_sendInlineBotResult() = default; MTPmessages_sendInlineBotResult(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _reply_to_msg_id, const MTPlong &_random_id, const MTPlong &_query_id, const MTPstring &_id) : vflags(_flags), vpeer(_peer), vreply_to_msg_id(_reply_to_msg_id), vrandom_id(_random_id), vquery_id(_query_id), vid(_id) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + (has_reply_to_msg_id() ? vreply_to_msg_id.innerLength() : 0) + vrandom_id.innerLength() + vquery_id.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_sendInlineBotResult; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendInlineBotResult) { vflags.read(from, end); vpeer.read(from, end); if (has_reply_to_msg_id()) { vreply_to_msg_id.read(from, end); } else { vreply_to_msg_id = MTPint(); } vrandom_id.read(from, end); vquery_id.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); if (has_reply_to_msg_id()) vreply_to_msg_id.write(to); vrandom_id.write(to); vquery_id.write(to); vid.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_sendInlineBotResult::Flags) class MTPmessages_SendInlineBotResult : public MTPBoxed { public: MTPmessages_SendInlineBotResult() = default; MTPmessages_SendInlineBotResult(const MTPmessages_sendInlineBotResult &v) : MTPBoxed(v) { } MTPmessages_SendInlineBotResult(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _reply_to_msg_id, const MTPlong &_random_id, const MTPlong &_query_id, const MTPstring &_id) : MTPBoxed(MTPmessages_sendInlineBotResult(_flags, _peer, _reply_to_msg_id, _random_id, _query_id, _id)) { } }; class MTPmessages_getMessageEditData { // RPC method 'messages.getMessageEditData' public: MTPInputPeer vpeer; MTPint vid; MTPmessages_getMessageEditData() = default; MTPmessages_getMessageEditData(const MTPInputPeer &_peer, MTPint _id) : vpeer(_peer), vid(_id) { } uint32 innerLength() const { return vpeer.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_getMessageEditData; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMessageEditData) { vpeer.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vid.write(to); } typedef MTPmessages_MessageEditData ResponseType; }; class MTPmessages_GetMessageEditData : public MTPBoxed { public: MTPmessages_GetMessageEditData() = default; MTPmessages_GetMessageEditData(const MTPmessages_getMessageEditData &v) : MTPBoxed(v) { } MTPmessages_GetMessageEditData(const MTPInputPeer &_peer, MTPint _id) : MTPBoxed(MTPmessages_getMessageEditData(_peer, _id)) { } }; class MTPmessages_editMessage { // RPC method 'messages.editMessage' public: enum class Flag : int32 { f_no_webpage = (1 << 1), f_message = (1 << 11), f_reply_markup = (1 << 2), f_entities = (1 << 3), MAX_FIELD = (1 << 11), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool has_message() const { return vflags.v & Flag::f_message; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPflags vflags; MTPInputPeer vpeer; MTPint vid; MTPstring vmessage; MTPReplyMarkup vreply_markup; MTPVector ventities; MTPmessages_editMessage() = default; MTPmessages_editMessage(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _id, const MTPstring &_message, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities) : vflags(_flags), vpeer(_peer), vid(_id), vmessage(_message), vreply_markup(_reply_markup), ventities(_entities) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + vid.innerLength() + (has_message() ? vmessage.innerLength() : 0) + (has_reply_markup() ? vreply_markup.innerLength() : 0) + (has_entities() ? ventities.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_editMessage; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editMessage) { vflags.read(from, end); vpeer.read(from, end); vid.read(from, end); if (has_message()) { vmessage.read(from, end); } else { vmessage = MTPstring(); } if (has_reply_markup()) { vreply_markup.read(from, end); } else { vreply_markup = MTPReplyMarkup(); } if (has_entities()) { ventities.read(from, end); } else { ventities = MTPVector(); } } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); vid.write(to); if (has_message()) vmessage.write(to); if (has_reply_markup()) vreply_markup.write(to); if (has_entities()) ventities.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_editMessage::Flags) class MTPmessages_EditMessage : public MTPBoxed { public: MTPmessages_EditMessage() = default; MTPmessages_EditMessage(const MTPmessages_editMessage &v) : MTPBoxed(v) { } MTPmessages_EditMessage(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _id, const MTPstring &_message, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities) : MTPBoxed(MTPmessages_editMessage(_flags, _peer, _id, _message, _reply_markup, _entities)) { } }; class MTPmessages_editInlineBotMessage { // RPC method 'messages.editInlineBotMessage' public: enum class Flag : int32 { f_no_webpage = (1 << 1), f_message = (1 << 11), f_reply_markup = (1 << 2), f_entities = (1 << 3), MAX_FIELD = (1 << 11), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool has_message() const { return vflags.v & Flag::f_message; } bool has_reply_markup() const { return vflags.v & Flag::f_reply_markup; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPflags vflags; MTPInputBotInlineMessageID vid; MTPstring vmessage; MTPReplyMarkup vreply_markup; MTPVector ventities; MTPmessages_editInlineBotMessage() = default; MTPmessages_editInlineBotMessage(const MTPflags &_flags, const MTPInputBotInlineMessageID &_id, const MTPstring &_message, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities) : vflags(_flags), vid(_id), vmessage(_message), vreply_markup(_reply_markup), ventities(_entities) { } uint32 innerLength() const { return vflags.innerLength() + vid.innerLength() + (has_message() ? vmessage.innerLength() : 0) + (has_reply_markup() ? vreply_markup.innerLength() : 0) + (has_entities() ? ventities.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_editInlineBotMessage; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editInlineBotMessage) { vflags.read(from, end); vid.read(from, end); if (has_message()) { vmessage.read(from, end); } else { vmessage = MTPstring(); } if (has_reply_markup()) { vreply_markup.read(from, end); } else { vreply_markup = MTPReplyMarkup(); } if (has_entities()) { ventities.read(from, end); } else { ventities = MTPVector(); } } void write(mtpBuffer &to) const { vflags.write(to); vid.write(to); if (has_message()) vmessage.write(to); if (has_reply_markup()) vreply_markup.write(to); if (has_entities()) ventities.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_editInlineBotMessage::Flags) class MTPmessages_EditInlineBotMessage : public MTPBoxed { public: MTPmessages_EditInlineBotMessage() = default; MTPmessages_EditInlineBotMessage(const MTPmessages_editInlineBotMessage &v) : MTPBoxed(v) { } MTPmessages_EditInlineBotMessage(const MTPflags &_flags, const MTPInputBotInlineMessageID &_id, const MTPstring &_message, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities) : MTPBoxed(MTPmessages_editInlineBotMessage(_flags, _id, _message, _reply_markup, _entities)) { } }; class MTPmessages_getBotCallbackAnswer { // RPC method 'messages.getBotCallbackAnswer' public: enum class Flag : int32 { f_game = (1 << 1), f_data = (1 << 0), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_game() const { return vflags.v & Flag::f_game; } bool has_data() const { return vflags.v & Flag::f_data; } MTPflags vflags; MTPInputPeer vpeer; MTPint vmsg_id; MTPbytes vdata; MTPmessages_getBotCallbackAnswer() = default; MTPmessages_getBotCallbackAnswer(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _msg_id, const MTPbytes &_data) : vflags(_flags), vpeer(_peer), vmsg_id(_msg_id), vdata(_data) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + vmsg_id.innerLength() + (has_data() ? vdata.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_getBotCallbackAnswer; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getBotCallbackAnswer) { vflags.read(from, end); vpeer.read(from, end); vmsg_id.read(from, end); if (has_data()) { vdata.read(from, end); } else { vdata = MTPbytes(); } } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); vmsg_id.write(to); if (has_data()) vdata.write(to); } typedef MTPmessages_BotCallbackAnswer ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_getBotCallbackAnswer::Flags) class MTPmessages_GetBotCallbackAnswer : public MTPBoxed { public: MTPmessages_GetBotCallbackAnswer() = default; MTPmessages_GetBotCallbackAnswer(const MTPmessages_getBotCallbackAnswer &v) : MTPBoxed(v) { } MTPmessages_GetBotCallbackAnswer(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _msg_id, const MTPbytes &_data) : MTPBoxed(MTPmessages_getBotCallbackAnswer(_flags, _peer, _msg_id, _data)) { } }; class MTPmessages_setBotCallbackAnswer { // RPC method 'messages.setBotCallbackAnswer' public: enum class Flag : int32 { f_alert = (1 << 1), f_message = (1 << 0), f_url = (1 << 2), MAX_FIELD = (1 << 2), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_alert() const { return vflags.v & Flag::f_alert; } bool has_message() const { return vflags.v & Flag::f_message; } bool has_url() const { return vflags.v & Flag::f_url; } MTPflags vflags; MTPlong vquery_id; MTPstring vmessage; MTPstring vurl; MTPint vcache_time; MTPmessages_setBotCallbackAnswer() = default; MTPmessages_setBotCallbackAnswer(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_message, const MTPstring &_url, MTPint _cache_time) : vflags(_flags), vquery_id(_query_id), vmessage(_message), vurl(_url), vcache_time(_cache_time) { } uint32 innerLength() const { return vflags.innerLength() + vquery_id.innerLength() + (has_message() ? vmessage.innerLength() : 0) + (has_url() ? vurl.innerLength() : 0) + vcache_time.innerLength(); } mtpTypeId type() const { return mtpc_messages_setBotCallbackAnswer; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setBotCallbackAnswer) { vflags.read(from, end); vquery_id.read(from, end); if (has_message()) { vmessage.read(from, end); } else { vmessage = MTPstring(); } if (has_url()) { vurl.read(from, end); } else { vurl = MTPstring(); } vcache_time.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vquery_id.write(to); if (has_message()) vmessage.write(to); if (has_url()) vurl.write(to); vcache_time.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_setBotCallbackAnswer::Flags) class MTPmessages_SetBotCallbackAnswer : public MTPBoxed { public: MTPmessages_SetBotCallbackAnswer() = default; MTPmessages_SetBotCallbackAnswer(const MTPmessages_setBotCallbackAnswer &v) : MTPBoxed(v) { } MTPmessages_SetBotCallbackAnswer(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_message, const MTPstring &_url, MTPint _cache_time) : MTPBoxed(MTPmessages_setBotCallbackAnswer(_flags, _query_id, _message, _url, _cache_time)) { } }; class MTPmessages_getPeerDialogs { // RPC method 'messages.getPeerDialogs' public: MTPVector vpeers; MTPmessages_getPeerDialogs() = default; MTPmessages_getPeerDialogs(const MTPVector &_peers) : vpeers(_peers) { } uint32 innerLength() const { return vpeers.innerLength(); } mtpTypeId type() const { return mtpc_messages_getPeerDialogs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getPeerDialogs) { vpeers.read(from, end); } void write(mtpBuffer &to) const { vpeers.write(to); } typedef MTPmessages_PeerDialogs ResponseType; }; class MTPmessages_GetPeerDialogs : public MTPBoxed { public: MTPmessages_GetPeerDialogs() = default; MTPmessages_GetPeerDialogs(const MTPmessages_getPeerDialogs &v) : MTPBoxed(v) { } MTPmessages_GetPeerDialogs(const MTPVector &_peers) : MTPBoxed(MTPmessages_getPeerDialogs(_peers)) { } }; class MTPmessages_saveDraft { // RPC method 'messages.saveDraft' public: enum class Flag : int32 { f_no_webpage = (1 << 1), f_reply_to_msg_id = (1 << 0), f_entities = (1 << 3), MAX_FIELD = (1 << 3), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_no_webpage() const { return vflags.v & Flag::f_no_webpage; } bool has_reply_to_msg_id() const { return vflags.v & Flag::f_reply_to_msg_id; } bool has_entities() const { return vflags.v & Flag::f_entities; } MTPflags vflags; MTPint vreply_to_msg_id; MTPInputPeer vpeer; MTPstring vmessage; MTPVector ventities; MTPmessages_saveDraft() = default; MTPmessages_saveDraft(const MTPflags &_flags, MTPint _reply_to_msg_id, const MTPInputPeer &_peer, const MTPstring &_message, const MTPVector &_entities) : vflags(_flags), vreply_to_msg_id(_reply_to_msg_id), vpeer(_peer), vmessage(_message), ventities(_entities) { } uint32 innerLength() const { return vflags.innerLength() + (has_reply_to_msg_id() ? vreply_to_msg_id.innerLength() : 0) + vpeer.innerLength() + vmessage.innerLength() + (has_entities() ? ventities.innerLength() : 0); } mtpTypeId type() const { return mtpc_messages_saveDraft; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveDraft) { vflags.read(from, end); if (has_reply_to_msg_id()) { vreply_to_msg_id.read(from, end); } else { vreply_to_msg_id = MTPint(); } vpeer.read(from, end); vmessage.read(from, end); if (has_entities()) { ventities.read(from, end); } else { ventities = MTPVector(); } } void write(mtpBuffer &to) const { vflags.write(to); if (has_reply_to_msg_id()) vreply_to_msg_id.write(to); vpeer.write(to); vmessage.write(to); if (has_entities()) ventities.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_saveDraft::Flags) class MTPmessages_SaveDraft : public MTPBoxed { public: MTPmessages_SaveDraft() = default; MTPmessages_SaveDraft(const MTPmessages_saveDraft &v) : MTPBoxed(v) { } MTPmessages_SaveDraft(const MTPflags &_flags, MTPint _reply_to_msg_id, const MTPInputPeer &_peer, const MTPstring &_message, const MTPVector &_entities) : MTPBoxed(MTPmessages_saveDraft(_flags, _reply_to_msg_id, _peer, _message, _entities)) { } }; class MTPmessages_getAllDrafts { // RPC method 'messages.getAllDrafts' public: MTPmessages_getAllDrafts() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_messages_getAllDrafts; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getAllDrafts) { } void write(mtpBuffer &to) const { } typedef MTPUpdates ResponseType; }; class MTPmessages_GetAllDrafts : public MTPBoxed { public: MTPmessages_GetAllDrafts() = default; MTPmessages_GetAllDrafts(const MTPmessages_getAllDrafts &v) : MTPBoxed(v) { } }; class MTPmessages_getFeaturedStickers { // RPC method 'messages.getFeaturedStickers' public: MTPint vhash; MTPmessages_getFeaturedStickers() = default; MTPmessages_getFeaturedStickers(MTPint _hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getFeaturedStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getFeaturedStickers) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPmessages_FeaturedStickers ResponseType; }; class MTPmessages_GetFeaturedStickers : public MTPBoxed { public: MTPmessages_GetFeaturedStickers() = default; MTPmessages_GetFeaturedStickers(const MTPmessages_getFeaturedStickers &v) : MTPBoxed(v) { } MTPmessages_GetFeaturedStickers(MTPint _hash) : MTPBoxed(MTPmessages_getFeaturedStickers(_hash)) { } }; class MTPmessages_readFeaturedStickers { // RPC method 'messages.readFeaturedStickers' public: MTPVector vid; MTPmessages_readFeaturedStickers() = default; MTPmessages_readFeaturedStickers(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_readFeaturedStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readFeaturedStickers) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_ReadFeaturedStickers : public MTPBoxed { public: MTPmessages_ReadFeaturedStickers() = default; MTPmessages_ReadFeaturedStickers(const MTPmessages_readFeaturedStickers &v) : MTPBoxed(v) { } MTPmessages_ReadFeaturedStickers(const MTPVector &_id) : MTPBoxed(MTPmessages_readFeaturedStickers(_id)) { } }; class MTPmessages_getRecentStickers { // RPC method 'messages.getRecentStickers' public: enum class Flag : int32 { f_attached = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_attached() const { return vflags.v & Flag::f_attached; } MTPflags vflags; MTPint vhash; MTPmessages_getRecentStickers() = default; MTPmessages_getRecentStickers(const MTPflags &_flags, MTPint _hash) : vflags(_flags), vhash(_hash) { } uint32 innerLength() const { return vflags.innerLength() + vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getRecentStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getRecentStickers) { vflags.read(from, end); vhash.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vhash.write(to); } typedef MTPmessages_RecentStickers ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_getRecentStickers::Flags) class MTPmessages_GetRecentStickers : public MTPBoxed { public: MTPmessages_GetRecentStickers() = default; MTPmessages_GetRecentStickers(const MTPmessages_getRecentStickers &v) : MTPBoxed(v) { } MTPmessages_GetRecentStickers(const MTPflags &_flags, MTPint _hash) : MTPBoxed(MTPmessages_getRecentStickers(_flags, _hash)) { } }; class MTPmessages_saveRecentSticker { // RPC method 'messages.saveRecentSticker' public: enum class Flag : int32 { f_attached = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_attached() const { return vflags.v & Flag::f_attached; } MTPflags vflags; MTPInputDocument vid; MTPBool vunsave; MTPmessages_saveRecentSticker() = default; MTPmessages_saveRecentSticker(const MTPflags &_flags, const MTPInputDocument &_id, MTPBool _unsave) : vflags(_flags), vid(_id), vunsave(_unsave) { } uint32 innerLength() const { return vflags.innerLength() + vid.innerLength() + vunsave.innerLength(); } mtpTypeId type() const { return mtpc_messages_saveRecentSticker; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveRecentSticker) { vflags.read(from, end); vid.read(from, end); vunsave.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vid.write(to); vunsave.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_saveRecentSticker::Flags) class MTPmessages_SaveRecentSticker : public MTPBoxed { public: MTPmessages_SaveRecentSticker() = default; MTPmessages_SaveRecentSticker(const MTPmessages_saveRecentSticker &v) : MTPBoxed(v) { } MTPmessages_SaveRecentSticker(const MTPflags &_flags, const MTPInputDocument &_id, MTPBool _unsave) : MTPBoxed(MTPmessages_saveRecentSticker(_flags, _id, _unsave)) { } }; class MTPmessages_clearRecentStickers { // RPC method 'messages.clearRecentStickers' public: enum class Flag : int32 { f_attached = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_attached() const { return vflags.v & Flag::f_attached; } MTPflags vflags; MTPmessages_clearRecentStickers() = default; MTPmessages_clearRecentStickers(const MTPflags &_flags) : vflags(_flags) { } uint32 innerLength() const { return vflags.innerLength(); } mtpTypeId type() const { return mtpc_messages_clearRecentStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_clearRecentStickers) { vflags.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_clearRecentStickers::Flags) class MTPmessages_ClearRecentStickers : public MTPBoxed { public: MTPmessages_ClearRecentStickers() = default; MTPmessages_ClearRecentStickers(const MTPmessages_clearRecentStickers &v) : MTPBoxed(v) { } MTPmessages_ClearRecentStickers(const MTPflags &_flags) : MTPBoxed(MTPmessages_clearRecentStickers(_flags)) { } }; class MTPmessages_getArchivedStickers { // RPC method 'messages.getArchivedStickers' public: enum class Flag : int32 { f_masks = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_masks() const { return vflags.v & Flag::f_masks; } MTPflags vflags; MTPlong voffset_id; MTPint vlimit; MTPmessages_getArchivedStickers() = default; MTPmessages_getArchivedStickers(const MTPflags &_flags, const MTPlong &_offset_id, MTPint _limit) : vflags(_flags), voffset_id(_offset_id), vlimit(_limit) { } uint32 innerLength() const { return vflags.innerLength() + voffset_id.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_messages_getArchivedStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getArchivedStickers) { vflags.read(from, end); voffset_id.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); voffset_id.write(to); vlimit.write(to); } typedef MTPmessages_ArchivedStickers ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_getArchivedStickers::Flags) class MTPmessages_GetArchivedStickers : public MTPBoxed { public: MTPmessages_GetArchivedStickers() = default; MTPmessages_GetArchivedStickers(const MTPmessages_getArchivedStickers &v) : MTPBoxed(v) { } MTPmessages_GetArchivedStickers(const MTPflags &_flags, const MTPlong &_offset_id, MTPint _limit) : MTPBoxed(MTPmessages_getArchivedStickers(_flags, _offset_id, _limit)) { } }; class MTPmessages_getMaskStickers { // RPC method 'messages.getMaskStickers' public: MTPint vhash; MTPmessages_getMaskStickers() = default; MTPmessages_getMaskStickers(MTPint _hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getMaskStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMaskStickers) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPmessages_AllStickers ResponseType; }; class MTPmessages_GetMaskStickers : public MTPBoxed { public: MTPmessages_GetMaskStickers() = default; MTPmessages_GetMaskStickers(const MTPmessages_getMaskStickers &v) : MTPBoxed(v) { } MTPmessages_GetMaskStickers(MTPint _hash) : MTPBoxed(MTPmessages_getMaskStickers(_hash)) { } }; class MTPmessages_getAttachedStickers { // RPC method 'messages.getAttachedStickers' public: MTPInputStickeredMedia vmedia; MTPmessages_getAttachedStickers() = default; MTPmessages_getAttachedStickers(const MTPInputStickeredMedia &_media) : vmedia(_media) { } uint32 innerLength() const { return vmedia.innerLength(); } mtpTypeId type() const { return mtpc_messages_getAttachedStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getAttachedStickers) { vmedia.read(from, end); } void write(mtpBuffer &to) const { vmedia.write(to); } typedef MTPVector ResponseType; }; class MTPmessages_GetAttachedStickers : public MTPBoxed { public: MTPmessages_GetAttachedStickers() = default; MTPmessages_GetAttachedStickers(const MTPmessages_getAttachedStickers &v) : MTPBoxed(v) { } MTPmessages_GetAttachedStickers(const MTPInputStickeredMedia &_media) : MTPBoxed(MTPmessages_getAttachedStickers(_media)) { } }; class MTPmessages_setGameScore { // RPC method 'messages.setGameScore' public: enum class Flag : int32 { f_edit_message = (1 << 0), f_force = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_edit_message() const { return vflags.v & Flag::f_edit_message; } bool is_force() const { return vflags.v & Flag::f_force; } MTPflags vflags; MTPInputPeer vpeer; MTPint vid; MTPInputUser vuser_id; MTPint vscore; MTPmessages_setGameScore() = default; MTPmessages_setGameScore(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _id, const MTPInputUser &_user_id, MTPint _score) : vflags(_flags), vpeer(_peer), vid(_id), vuser_id(_user_id), vscore(_score) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength() + vid.innerLength() + vuser_id.innerLength() + vscore.innerLength(); } mtpTypeId type() const { return mtpc_messages_setGameScore; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setGameScore) { vflags.read(from, end); vpeer.read(from, end); vid.read(from, end); vuser_id.read(from, end); vscore.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); vid.write(to); vuser_id.write(to); vscore.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_setGameScore::Flags) class MTPmessages_SetGameScore : public MTPBoxed { public: MTPmessages_SetGameScore() = default; MTPmessages_SetGameScore(const MTPmessages_setGameScore &v) : MTPBoxed(v) { } MTPmessages_SetGameScore(const MTPflags &_flags, const MTPInputPeer &_peer, MTPint _id, const MTPInputUser &_user_id, MTPint _score) : MTPBoxed(MTPmessages_setGameScore(_flags, _peer, _id, _user_id, _score)) { } }; class MTPmessages_setInlineGameScore { // RPC method 'messages.setInlineGameScore' public: enum class Flag : int32 { f_edit_message = (1 << 0), f_force = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_edit_message() const { return vflags.v & Flag::f_edit_message; } bool is_force() const { return vflags.v & Flag::f_force; } MTPflags vflags; MTPInputBotInlineMessageID vid; MTPInputUser vuser_id; MTPint vscore; MTPmessages_setInlineGameScore() = default; MTPmessages_setInlineGameScore(const MTPflags &_flags, const MTPInputBotInlineMessageID &_id, const MTPInputUser &_user_id, MTPint _score) : vflags(_flags), vid(_id), vuser_id(_user_id), vscore(_score) { } uint32 innerLength() const { return vflags.innerLength() + vid.innerLength() + vuser_id.innerLength() + vscore.innerLength(); } mtpTypeId type() const { return mtpc_messages_setInlineGameScore; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setInlineGameScore) { vflags.read(from, end); vid.read(from, end); vuser_id.read(from, end); vscore.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vid.write(to); vuser_id.write(to); vscore.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_setInlineGameScore::Flags) class MTPmessages_SetInlineGameScore : public MTPBoxed { public: MTPmessages_SetInlineGameScore() = default; MTPmessages_SetInlineGameScore(const MTPmessages_setInlineGameScore &v) : MTPBoxed(v) { } MTPmessages_SetInlineGameScore(const MTPflags &_flags, const MTPInputBotInlineMessageID &_id, const MTPInputUser &_user_id, MTPint _score) : MTPBoxed(MTPmessages_setInlineGameScore(_flags, _id, _user_id, _score)) { } }; class MTPmessages_getGameHighScores { // RPC method 'messages.getGameHighScores' public: MTPInputPeer vpeer; MTPint vid; MTPInputUser vuser_id; MTPmessages_getGameHighScores() = default; MTPmessages_getGameHighScores(const MTPInputPeer &_peer, MTPint _id, const MTPInputUser &_user_id) : vpeer(_peer), vid(_id), vuser_id(_user_id) { } uint32 innerLength() const { return vpeer.innerLength() + vid.innerLength() + vuser_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_getGameHighScores; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getGameHighScores) { vpeer.read(from, end); vid.read(from, end); vuser_id.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vid.write(to); vuser_id.write(to); } typedef MTPmessages_HighScores ResponseType; }; class MTPmessages_GetGameHighScores : public MTPBoxed { public: MTPmessages_GetGameHighScores() = default; MTPmessages_GetGameHighScores(const MTPmessages_getGameHighScores &v) : MTPBoxed(v) { } MTPmessages_GetGameHighScores(const MTPInputPeer &_peer, MTPint _id, const MTPInputUser &_user_id) : MTPBoxed(MTPmessages_getGameHighScores(_peer, _id, _user_id)) { } }; class MTPmessages_getInlineGameHighScores { // RPC method 'messages.getInlineGameHighScores' public: MTPInputBotInlineMessageID vid; MTPInputUser vuser_id; MTPmessages_getInlineGameHighScores() = default; MTPmessages_getInlineGameHighScores(const MTPInputBotInlineMessageID &_id, const MTPInputUser &_user_id) : vid(_id), vuser_id(_user_id) { } uint32 innerLength() const { return vid.innerLength() + vuser_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_getInlineGameHighScores; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getInlineGameHighScores) { vid.read(from, end); vuser_id.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); vuser_id.write(to); } typedef MTPmessages_HighScores ResponseType; }; class MTPmessages_GetInlineGameHighScores : public MTPBoxed { public: MTPmessages_GetInlineGameHighScores() = default; MTPmessages_GetInlineGameHighScores(const MTPmessages_getInlineGameHighScores &v) : MTPBoxed(v) { } MTPmessages_GetInlineGameHighScores(const MTPInputBotInlineMessageID &_id, const MTPInputUser &_user_id) : MTPBoxed(MTPmessages_getInlineGameHighScores(_id, _user_id)) { } }; class MTPmessages_getCommonChats { // RPC method 'messages.getCommonChats' public: MTPInputUser vuser_id; MTPint vmax_id; MTPint vlimit; MTPmessages_getCommonChats() = default; MTPmessages_getCommonChats(const MTPInputUser &_user_id, MTPint _max_id, MTPint _limit) : vuser_id(_user_id), vmax_id(_max_id), vlimit(_limit) { } uint32 innerLength() const { return vuser_id.innerLength() + vmax_id.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_messages_getCommonChats; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getCommonChats) { vuser_id.read(from, end); vmax_id.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vuser_id.write(to); vmax_id.write(to); vlimit.write(to); } typedef MTPmessages_Chats ResponseType; }; class MTPmessages_GetCommonChats : public MTPBoxed { public: MTPmessages_GetCommonChats() = default; MTPmessages_GetCommonChats(const MTPmessages_getCommonChats &v) : MTPBoxed(v) { } MTPmessages_GetCommonChats(const MTPInputUser &_user_id, MTPint _max_id, MTPint _limit) : MTPBoxed(MTPmessages_getCommonChats(_user_id, _max_id, _limit)) { } }; class MTPmessages_getAllChats { // RPC method 'messages.getAllChats' public: MTPVector vexcept_ids; MTPmessages_getAllChats() = default; MTPmessages_getAllChats(const MTPVector &_except_ids) : vexcept_ids(_except_ids) { } uint32 innerLength() const { return vexcept_ids.innerLength(); } mtpTypeId type() const { return mtpc_messages_getAllChats; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getAllChats) { vexcept_ids.read(from, end); } void write(mtpBuffer &to) const { vexcept_ids.write(to); } typedef MTPmessages_Chats ResponseType; }; class MTPmessages_GetAllChats : public MTPBoxed { public: MTPmessages_GetAllChats() = default; MTPmessages_GetAllChats(const MTPmessages_getAllChats &v) : MTPBoxed(v) { } MTPmessages_GetAllChats(const MTPVector &_except_ids) : MTPBoxed(MTPmessages_getAllChats(_except_ids)) { } }; class MTPmessages_getWebPage { // RPC method 'messages.getWebPage' public: MTPstring vurl; MTPint vhash; MTPmessages_getWebPage() = default; MTPmessages_getWebPage(const MTPstring &_url, MTPint _hash) : vurl(_url), vhash(_hash) { } uint32 innerLength() const { return vurl.innerLength() + vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getWebPage; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getWebPage) { vurl.read(from, end); vhash.read(from, end); } void write(mtpBuffer &to) const { vurl.write(to); vhash.write(to); } typedef MTPWebPage ResponseType; }; class MTPmessages_GetWebPage : public MTPBoxed { public: MTPmessages_GetWebPage() = default; MTPmessages_GetWebPage(const MTPmessages_getWebPage &v) : MTPBoxed(v) { } MTPmessages_GetWebPage(const MTPstring &_url, MTPint _hash) : MTPBoxed(MTPmessages_getWebPage(_url, _hash)) { } }; class MTPmessages_toggleDialogPin { // RPC method 'messages.toggleDialogPin' public: enum class Flag : int32 { f_pinned = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_pinned() const { return vflags.v & Flag::f_pinned; } MTPflags vflags; MTPInputPeer vpeer; MTPmessages_toggleDialogPin() = default; MTPmessages_toggleDialogPin(const MTPflags &_flags, const MTPInputPeer &_peer) : vflags(_flags), vpeer(_peer) { } uint32 innerLength() const { return vflags.innerLength() + vpeer.innerLength(); } mtpTypeId type() const { return mtpc_messages_toggleDialogPin; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_toggleDialogPin) { vflags.read(from, end); vpeer.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vpeer.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_toggleDialogPin::Flags) class MTPmessages_ToggleDialogPin : public MTPBoxed { public: MTPmessages_ToggleDialogPin() = default; MTPmessages_ToggleDialogPin(const MTPmessages_toggleDialogPin &v) : MTPBoxed(v) { } MTPmessages_ToggleDialogPin(const MTPflags &_flags, const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_toggleDialogPin(_flags, _peer)) { } }; class MTPmessages_reorderPinnedDialogs { // RPC method 'messages.reorderPinnedDialogs' public: enum class Flag : int32 { f_force = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_force() const { return vflags.v & Flag::f_force; } MTPflags vflags; MTPVector vorder; MTPmessages_reorderPinnedDialogs() = default; MTPmessages_reorderPinnedDialogs(const MTPflags &_flags, const MTPVector &_order) : vflags(_flags), vorder(_order) { } uint32 innerLength() const { return vflags.innerLength() + vorder.innerLength(); } mtpTypeId type() const { return mtpc_messages_reorderPinnedDialogs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reorderPinnedDialogs) { vflags.read(from, end); vorder.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vorder.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_reorderPinnedDialogs::Flags) class MTPmessages_ReorderPinnedDialogs : public MTPBoxed { public: MTPmessages_ReorderPinnedDialogs() = default; MTPmessages_ReorderPinnedDialogs(const MTPmessages_reorderPinnedDialogs &v) : MTPBoxed(v) { } MTPmessages_ReorderPinnedDialogs(const MTPflags &_flags, const MTPVector &_order) : MTPBoxed(MTPmessages_reorderPinnedDialogs(_flags, _order)) { } }; class MTPmessages_getPinnedDialogs { // RPC method 'messages.getPinnedDialogs' public: MTPmessages_getPinnedDialogs() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_messages_getPinnedDialogs; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getPinnedDialogs) { } void write(mtpBuffer &to) const { } typedef MTPmessages_PeerDialogs ResponseType; }; class MTPmessages_GetPinnedDialogs : public MTPBoxed { public: MTPmessages_GetPinnedDialogs() = default; MTPmessages_GetPinnedDialogs(const MTPmessages_getPinnedDialogs &v) : MTPBoxed(v) { } }; class MTPupdates_getState { // RPC method 'updates.getState' public: MTPupdates_getState() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_updates_getState; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getState) { } void write(mtpBuffer &to) const { } typedef MTPupdates_State ResponseType; }; class MTPupdates_GetState : public MTPBoxed { public: MTPupdates_GetState() = default; MTPupdates_GetState(const MTPupdates_getState &v) : MTPBoxed(v) { } }; class MTPupdates_getDifference { // RPC method 'updates.getDifference' public: enum class Flag : int32 { f_pts_total_limit = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool has_pts_total_limit() const { return vflags.v & Flag::f_pts_total_limit; } MTPflags vflags; MTPint vpts; MTPint vpts_total_limit; MTPint vdate; MTPint vqts; MTPupdates_getDifference() = default; MTPupdates_getDifference(const MTPflags &_flags, MTPint _pts, MTPint _pts_total_limit, MTPint _date, MTPint _qts) : vflags(_flags), vpts(_pts), vpts_total_limit(_pts_total_limit), vdate(_date), vqts(_qts) { } uint32 innerLength() const { return vflags.innerLength() + vpts.innerLength() + (has_pts_total_limit() ? vpts_total_limit.innerLength() : 0) + vdate.innerLength() + vqts.innerLength(); } mtpTypeId type() const { return mtpc_updates_getDifference; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getDifference) { vflags.read(from, end); vpts.read(from, end); if (has_pts_total_limit()) { vpts_total_limit.read(from, end); } else { vpts_total_limit = MTPint(); } vdate.read(from, end); vqts.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vpts.write(to); if (has_pts_total_limit()) vpts_total_limit.write(to); vdate.write(to); vqts.write(to); } typedef MTPupdates_Difference ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPupdates_getDifference::Flags) class MTPupdates_GetDifference : public MTPBoxed { public: MTPupdates_GetDifference() = default; MTPupdates_GetDifference(const MTPupdates_getDifference &v) : MTPBoxed(v) { } MTPupdates_GetDifference(const MTPflags &_flags, MTPint _pts, MTPint _pts_total_limit, MTPint _date, MTPint _qts) : MTPBoxed(MTPupdates_getDifference(_flags, _pts, _pts_total_limit, _date, _qts)) { } }; class MTPupdates_getChannelDifference { // RPC method 'updates.getChannelDifference' public: enum class Flag : int32 { f_force = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_force() const { return vflags.v & Flag::f_force; } MTPflags vflags; MTPInputChannel vchannel; MTPChannelMessagesFilter vfilter; MTPint vpts; MTPint vlimit; MTPupdates_getChannelDifference() = default; MTPupdates_getChannelDifference(const MTPflags &_flags, const MTPInputChannel &_channel, const MTPChannelMessagesFilter &_filter, MTPint _pts, MTPint _limit) : vflags(_flags), vchannel(_channel), vfilter(_filter), vpts(_pts), vlimit(_limit) { } uint32 innerLength() const { return vflags.innerLength() + vchannel.innerLength() + vfilter.innerLength() + vpts.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_updates_getChannelDifference; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getChannelDifference) { vflags.read(from, end); vchannel.read(from, end); vfilter.read(from, end); vpts.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vchannel.write(to); vfilter.write(to); vpts.write(to); vlimit.write(to); } typedef MTPupdates_ChannelDifference ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPupdates_getChannelDifference::Flags) class MTPupdates_GetChannelDifference : public MTPBoxed { public: MTPupdates_GetChannelDifference() = default; MTPupdates_GetChannelDifference(const MTPupdates_getChannelDifference &v) : MTPBoxed(v) { } MTPupdates_GetChannelDifference(const MTPflags &_flags, const MTPInputChannel &_channel, const MTPChannelMessagesFilter &_filter, MTPint _pts, MTPint _limit) : MTPBoxed(MTPupdates_getChannelDifference(_flags, _channel, _filter, _pts, _limit)) { } }; class MTPphotos_updateProfilePhoto { // RPC method 'photos.updateProfilePhoto' public: MTPInputPhoto vid; MTPphotos_updateProfilePhoto() = default; MTPphotos_updateProfilePhoto(const MTPInputPhoto &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_photos_updateProfilePhoto; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_updateProfilePhoto) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPUserProfilePhoto ResponseType; }; class MTPphotos_UpdateProfilePhoto : public MTPBoxed { public: MTPphotos_UpdateProfilePhoto() = default; MTPphotos_UpdateProfilePhoto(const MTPphotos_updateProfilePhoto &v) : MTPBoxed(v) { } MTPphotos_UpdateProfilePhoto(const MTPInputPhoto &_id) : MTPBoxed(MTPphotos_updateProfilePhoto(_id)) { } }; class MTPphotos_uploadProfilePhoto { // RPC method 'photos.uploadProfilePhoto' public: MTPInputFile vfile; MTPphotos_uploadProfilePhoto() = default; MTPphotos_uploadProfilePhoto(const MTPInputFile &_file) : vfile(_file) { } uint32 innerLength() const { return vfile.innerLength(); } mtpTypeId type() const { return mtpc_photos_uploadProfilePhoto; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_uploadProfilePhoto) { vfile.read(from, end); } void write(mtpBuffer &to) const { vfile.write(to); } typedef MTPphotos_Photo ResponseType; }; class MTPphotos_UploadProfilePhoto : public MTPBoxed { public: MTPphotos_UploadProfilePhoto() = default; MTPphotos_UploadProfilePhoto(const MTPphotos_uploadProfilePhoto &v) : MTPBoxed(v) { } MTPphotos_UploadProfilePhoto(const MTPInputFile &_file) : MTPBoxed(MTPphotos_uploadProfilePhoto(_file)) { } }; class MTPphotos_deletePhotos { // RPC method 'photos.deletePhotos' public: MTPVector vid; MTPphotos_deletePhotos() = default; MTPphotos_deletePhotos(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_photos_deletePhotos; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_deletePhotos) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPVector ResponseType; }; class MTPphotos_DeletePhotos : public MTPBoxed { public: MTPphotos_DeletePhotos() = default; MTPphotos_DeletePhotos(const MTPphotos_deletePhotos &v) : MTPBoxed(v) { } MTPphotos_DeletePhotos(const MTPVector &_id) : MTPBoxed(MTPphotos_deletePhotos(_id)) { } }; class MTPphotos_getUserPhotos { // RPC method 'photos.getUserPhotos' public: MTPInputUser vuser_id; MTPint voffset; MTPlong vmax_id; MTPint vlimit; MTPphotos_getUserPhotos() = default; MTPphotos_getUserPhotos(const MTPInputUser &_user_id, MTPint _offset, const MTPlong &_max_id, MTPint _limit) : vuser_id(_user_id), voffset(_offset), vmax_id(_max_id), vlimit(_limit) { } uint32 innerLength() const { return vuser_id.innerLength() + voffset.innerLength() + vmax_id.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_photos_getUserPhotos; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_getUserPhotos) { vuser_id.read(from, end); voffset.read(from, end); vmax_id.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vuser_id.write(to); voffset.write(to); vmax_id.write(to); vlimit.write(to); } typedef MTPphotos_Photos ResponseType; }; class MTPphotos_GetUserPhotos : public MTPBoxed { public: MTPphotos_GetUserPhotos() = default; MTPphotos_GetUserPhotos(const MTPphotos_getUserPhotos &v) : MTPBoxed(v) { } MTPphotos_GetUserPhotos(const MTPInputUser &_user_id, MTPint _offset, const MTPlong &_max_id, MTPint _limit) : MTPBoxed(MTPphotos_getUserPhotos(_user_id, _offset, _max_id, _limit)) { } }; class MTPupload_saveFilePart { // RPC method 'upload.saveFilePart' public: MTPlong vfile_id; MTPint vfile_part; MTPbytes vbytes; MTPupload_saveFilePart() = default; MTPupload_saveFilePart(const MTPlong &_file_id, MTPint _file_part, const MTPbytes &_bytes) : vfile_id(_file_id), vfile_part(_file_part), vbytes(_bytes) { } uint32 innerLength() const { return vfile_id.innerLength() + vfile_part.innerLength() + vbytes.innerLength(); } mtpTypeId type() const { return mtpc_upload_saveFilePart; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_saveFilePart) { vfile_id.read(from, end); vfile_part.read(from, end); vbytes.read(from, end); } void write(mtpBuffer &to) const { vfile_id.write(to); vfile_part.write(to); vbytes.write(to); } typedef MTPBool ResponseType; }; class MTPupload_SaveFilePart : public MTPBoxed { public: MTPupload_SaveFilePart() = default; MTPupload_SaveFilePart(const MTPupload_saveFilePart &v) : MTPBoxed(v) { } MTPupload_SaveFilePart(const MTPlong &_file_id, MTPint _file_part, const MTPbytes &_bytes) : MTPBoxed(MTPupload_saveFilePart(_file_id, _file_part, _bytes)) { } }; class MTPupload_getFile { // RPC method 'upload.getFile' public: MTPInputFileLocation vlocation; MTPint voffset; MTPint vlimit; MTPupload_getFile() = default; MTPupload_getFile(const MTPInputFileLocation &_location, MTPint _offset, MTPint _limit) : vlocation(_location), voffset(_offset), vlimit(_limit) { } uint32 innerLength() const { return vlocation.innerLength() + voffset.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_upload_getFile; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_getFile) { vlocation.read(from, end); voffset.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vlocation.write(to); voffset.write(to); vlimit.write(to); } typedef MTPupload_File ResponseType; }; class MTPupload_GetFile : public MTPBoxed { public: MTPupload_GetFile() = default; MTPupload_GetFile(const MTPupload_getFile &v) : MTPBoxed(v) { } MTPupload_GetFile(const MTPInputFileLocation &_location, MTPint _offset, MTPint _limit) : MTPBoxed(MTPupload_getFile(_location, _offset, _limit)) { } }; class MTPupload_saveBigFilePart { // RPC method 'upload.saveBigFilePart' public: MTPlong vfile_id; MTPint vfile_part; MTPint vfile_total_parts; MTPbytes vbytes; MTPupload_saveBigFilePart() = default; MTPupload_saveBigFilePart(const MTPlong &_file_id, MTPint _file_part, MTPint _file_total_parts, const MTPbytes &_bytes) : vfile_id(_file_id), vfile_part(_file_part), vfile_total_parts(_file_total_parts), vbytes(_bytes) { } uint32 innerLength() const { return vfile_id.innerLength() + vfile_part.innerLength() + vfile_total_parts.innerLength() + vbytes.innerLength(); } mtpTypeId type() const { return mtpc_upload_saveBigFilePart; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_saveBigFilePart) { vfile_id.read(from, end); vfile_part.read(from, end); vfile_total_parts.read(from, end); vbytes.read(from, end); } void write(mtpBuffer &to) const { vfile_id.write(to); vfile_part.write(to); vfile_total_parts.write(to); vbytes.write(to); } typedef MTPBool ResponseType; }; class MTPupload_SaveBigFilePart : public MTPBoxed { public: MTPupload_SaveBigFilePart() = default; MTPupload_SaveBigFilePart(const MTPupload_saveBigFilePart &v) : MTPBoxed(v) { } MTPupload_SaveBigFilePart(const MTPlong &_file_id, MTPint _file_part, MTPint _file_total_parts, const MTPbytes &_bytes) : MTPBoxed(MTPupload_saveBigFilePart(_file_id, _file_part, _file_total_parts, _bytes)) { } }; class MTPhelp_getConfig { // RPC method 'help.getConfig' public: MTPhelp_getConfig() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getConfig; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getConfig) { } void write(mtpBuffer &to) const { } typedef MTPConfig ResponseType; }; class MTPhelp_GetConfig : public MTPBoxed { public: MTPhelp_GetConfig() = default; MTPhelp_GetConfig(const MTPhelp_getConfig &v) : MTPBoxed(v) { } }; class MTPhelp_getNearestDc { // RPC method 'help.getNearestDc' public: MTPhelp_getNearestDc() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getNearestDc; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getNearestDc) { } void write(mtpBuffer &to) const { } typedef MTPNearestDc ResponseType; }; class MTPhelp_GetNearestDc : public MTPBoxed { public: MTPhelp_GetNearestDc() = default; MTPhelp_GetNearestDc(const MTPhelp_getNearestDc &v) : MTPBoxed(v) { } }; class MTPhelp_getAppUpdate { // RPC method 'help.getAppUpdate' public: MTPhelp_getAppUpdate() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getAppUpdate; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppUpdate) { } void write(mtpBuffer &to) const { } typedef MTPhelp_AppUpdate ResponseType; }; class MTPhelp_GetAppUpdate : public MTPBoxed { public: MTPhelp_GetAppUpdate() = default; MTPhelp_GetAppUpdate(const MTPhelp_getAppUpdate &v) : MTPBoxed(v) { } }; class MTPhelp_saveAppLog { // RPC method 'help.saveAppLog' public: MTPVector vevents; MTPhelp_saveAppLog() = default; MTPhelp_saveAppLog(const MTPVector &_events) : vevents(_events) { } uint32 innerLength() const { return vevents.innerLength(); } mtpTypeId type() const { return mtpc_help_saveAppLog; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_saveAppLog) { vevents.read(from, end); } void write(mtpBuffer &to) const { vevents.write(to); } typedef MTPBool ResponseType; }; class MTPhelp_SaveAppLog : public MTPBoxed { public: MTPhelp_SaveAppLog() = default; MTPhelp_SaveAppLog(const MTPhelp_saveAppLog &v) : MTPBoxed(v) { } MTPhelp_SaveAppLog(const MTPVector &_events) : MTPBoxed(MTPhelp_saveAppLog(_events)) { } }; class MTPhelp_getInviteText { // RPC method 'help.getInviteText' public: MTPhelp_getInviteText() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getInviteText; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getInviteText) { } void write(mtpBuffer &to) const { } typedef MTPhelp_InviteText ResponseType; }; class MTPhelp_GetInviteText : public MTPBoxed { public: MTPhelp_GetInviteText() = default; MTPhelp_GetInviteText(const MTPhelp_getInviteText &v) : MTPBoxed(v) { } }; class MTPhelp_getSupport { // RPC method 'help.getSupport' public: MTPhelp_getSupport() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getSupport; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getSupport) { } void write(mtpBuffer &to) const { } typedef MTPhelp_Support ResponseType; }; class MTPhelp_GetSupport : public MTPBoxed { public: MTPhelp_GetSupport() = default; MTPhelp_GetSupport(const MTPhelp_getSupport &v) : MTPBoxed(v) { } }; class MTPhelp_getAppChangelog { // RPC method 'help.getAppChangelog' public: MTPhelp_getAppChangelog() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getAppChangelog; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppChangelog) { } void write(mtpBuffer &to) const { } typedef MTPhelp_AppChangelog ResponseType; }; class MTPhelp_GetAppChangelog : public MTPBoxed { public: MTPhelp_GetAppChangelog() = default; MTPhelp_GetAppChangelog(const MTPhelp_getAppChangelog &v) : MTPBoxed(v) { } }; class MTPhelp_getTermsOfService { // RPC method 'help.getTermsOfService' public: MTPhelp_getTermsOfService() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_help_getTermsOfService; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getTermsOfService) { } void write(mtpBuffer &to) const { } typedef MTPhelp_TermsOfService ResponseType; }; class MTPhelp_GetTermsOfService : public MTPBoxed { public: MTPhelp_GetTermsOfService() = default; MTPhelp_GetTermsOfService(const MTPhelp_getTermsOfService &v) : MTPBoxed(v) { } }; class MTPhelp_setBotUpdatesStatus { // RPC method 'help.setBotUpdatesStatus' public: MTPint vpending_updates_count; MTPstring vmessage; MTPhelp_setBotUpdatesStatus() = default; MTPhelp_setBotUpdatesStatus(MTPint _pending_updates_count, const MTPstring &_message) : vpending_updates_count(_pending_updates_count), vmessage(_message) { } uint32 innerLength() const { return vpending_updates_count.innerLength() + vmessage.innerLength(); } mtpTypeId type() const { return mtpc_help_setBotUpdatesStatus; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_setBotUpdatesStatus) { vpending_updates_count.read(from, end); vmessage.read(from, end); } void write(mtpBuffer &to) const { vpending_updates_count.write(to); vmessage.write(to); } typedef MTPBool ResponseType; }; class MTPhelp_SetBotUpdatesStatus : public MTPBoxed { public: MTPhelp_SetBotUpdatesStatus() = default; MTPhelp_SetBotUpdatesStatus(const MTPhelp_setBotUpdatesStatus &v) : MTPBoxed(v) { } MTPhelp_SetBotUpdatesStatus(MTPint _pending_updates_count, const MTPstring &_message) : MTPBoxed(MTPhelp_setBotUpdatesStatus(_pending_updates_count, _message)) { } }; class MTPchannels_readHistory { // RPC method 'channels.readHistory' public: MTPInputChannel vchannel; MTPint vmax_id; MTPchannels_readHistory() = default; MTPchannels_readHistory(const MTPInputChannel &_channel, MTPint _max_id) : vchannel(_channel), vmax_id(_max_id) { } uint32 innerLength() const { return vchannel.innerLength() + vmax_id.innerLength(); } mtpTypeId type() const { return mtpc_channels_readHistory; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_readHistory) { vchannel.read(from, end); vmax_id.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vmax_id.write(to); } typedef MTPBool ResponseType; }; class MTPchannels_ReadHistory : public MTPBoxed { public: MTPchannels_ReadHistory() = default; MTPchannels_ReadHistory(const MTPchannels_readHistory &v) : MTPBoxed(v) { } MTPchannels_ReadHistory(const MTPInputChannel &_channel, MTPint _max_id) : MTPBoxed(MTPchannels_readHistory(_channel, _max_id)) { } }; class MTPchannels_deleteMessages { // RPC method 'channels.deleteMessages' public: MTPInputChannel vchannel; MTPVector vid; MTPchannels_deleteMessages() = default; MTPchannels_deleteMessages(const MTPInputChannel &_channel, const MTPVector &_id) : vchannel(_channel), vid(_id) { } uint32 innerLength() const { return vchannel.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_channels_deleteMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_deleteMessages) { vchannel.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vid.write(to); } typedef MTPmessages_AffectedMessages ResponseType; }; class MTPchannels_DeleteMessages : public MTPBoxed { public: MTPchannels_DeleteMessages() = default; MTPchannels_DeleteMessages(const MTPchannels_deleteMessages &v) : MTPBoxed(v) { } MTPchannels_DeleteMessages(const MTPInputChannel &_channel, const MTPVector &_id) : MTPBoxed(MTPchannels_deleteMessages(_channel, _id)) { } }; class MTPchannels_deleteUserHistory { // RPC method 'channels.deleteUserHistory' public: MTPInputChannel vchannel; MTPInputUser vuser_id; MTPchannels_deleteUserHistory() = default; MTPchannels_deleteUserHistory(const MTPInputChannel &_channel, const MTPInputUser &_user_id) : vchannel(_channel), vuser_id(_user_id) { } uint32 innerLength() const { return vchannel.innerLength() + vuser_id.innerLength(); } mtpTypeId type() const { return mtpc_channels_deleteUserHistory; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_deleteUserHistory) { vchannel.read(from, end); vuser_id.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vuser_id.write(to); } typedef MTPmessages_AffectedHistory ResponseType; }; class MTPchannels_DeleteUserHistory : public MTPBoxed { public: MTPchannels_DeleteUserHistory() = default; MTPchannels_DeleteUserHistory(const MTPchannels_deleteUserHistory &v) : MTPBoxed(v) { } MTPchannels_DeleteUserHistory(const MTPInputChannel &_channel, const MTPInputUser &_user_id) : MTPBoxed(MTPchannels_deleteUserHistory(_channel, _user_id)) { } }; class MTPchannels_reportSpam { // RPC method 'channels.reportSpam' public: MTPInputChannel vchannel; MTPInputUser vuser_id; MTPVector vid; MTPchannels_reportSpam() = default; MTPchannels_reportSpam(const MTPInputChannel &_channel, const MTPInputUser &_user_id, const MTPVector &_id) : vchannel(_channel), vuser_id(_user_id), vid(_id) { } uint32 innerLength() const { return vchannel.innerLength() + vuser_id.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_channels_reportSpam; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_reportSpam) { vchannel.read(from, end); vuser_id.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vuser_id.write(to); vid.write(to); } typedef MTPBool ResponseType; }; class MTPchannels_ReportSpam : public MTPBoxed { public: MTPchannels_ReportSpam() = default; MTPchannels_ReportSpam(const MTPchannels_reportSpam &v) : MTPBoxed(v) { } MTPchannels_ReportSpam(const MTPInputChannel &_channel, const MTPInputUser &_user_id, const MTPVector &_id) : MTPBoxed(MTPchannels_reportSpam(_channel, _user_id, _id)) { } }; class MTPchannels_getMessages { // RPC method 'channels.getMessages' public: MTPInputChannel vchannel; MTPVector vid; MTPchannels_getMessages() = default; MTPchannels_getMessages(const MTPInputChannel &_channel, const MTPVector &_id) : vchannel(_channel), vid(_id) { } uint32 innerLength() const { return vchannel.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_channels_getMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getMessages) { vchannel.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vid.write(to); } typedef MTPmessages_Messages ResponseType; }; class MTPchannels_GetMessages : public MTPBoxed { public: MTPchannels_GetMessages() = default; MTPchannels_GetMessages(const MTPchannels_getMessages &v) : MTPBoxed(v) { } MTPchannels_GetMessages(const MTPInputChannel &_channel, const MTPVector &_id) : MTPBoxed(MTPchannels_getMessages(_channel, _id)) { } }; class MTPchannels_getParticipants { // RPC method 'channels.getParticipants' public: MTPInputChannel vchannel; MTPChannelParticipantsFilter vfilter; MTPint voffset; MTPint vlimit; MTPchannels_getParticipants() = default; MTPchannels_getParticipants(const MTPInputChannel &_channel, const MTPChannelParticipantsFilter &_filter, MTPint _offset, MTPint _limit) : vchannel(_channel), vfilter(_filter), voffset(_offset), vlimit(_limit) { } uint32 innerLength() const { return vchannel.innerLength() + vfilter.innerLength() + voffset.innerLength() + vlimit.innerLength(); } mtpTypeId type() const { return mtpc_channels_getParticipants; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getParticipants) { vchannel.read(from, end); vfilter.read(from, end); voffset.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vfilter.write(to); voffset.write(to); vlimit.write(to); } typedef MTPchannels_ChannelParticipants ResponseType; }; class MTPchannels_GetParticipants : public MTPBoxed { public: MTPchannels_GetParticipants() = default; MTPchannels_GetParticipants(const MTPchannels_getParticipants &v) : MTPBoxed(v) { } MTPchannels_GetParticipants(const MTPInputChannel &_channel, const MTPChannelParticipantsFilter &_filter, MTPint _offset, MTPint _limit) : MTPBoxed(MTPchannels_getParticipants(_channel, _filter, _offset, _limit)) { } }; class MTPchannels_getParticipant { // RPC method 'channels.getParticipant' public: MTPInputChannel vchannel; MTPInputUser vuser_id; MTPchannels_getParticipant() = default; MTPchannels_getParticipant(const MTPInputChannel &_channel, const MTPInputUser &_user_id) : vchannel(_channel), vuser_id(_user_id) { } uint32 innerLength() const { return vchannel.innerLength() + vuser_id.innerLength(); } mtpTypeId type() const { return mtpc_channels_getParticipant; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getParticipant) { vchannel.read(from, end); vuser_id.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vuser_id.write(to); } typedef MTPchannels_ChannelParticipant ResponseType; }; class MTPchannels_GetParticipant : public MTPBoxed { public: MTPchannels_GetParticipant() = default; MTPchannels_GetParticipant(const MTPchannels_getParticipant &v) : MTPBoxed(v) { } MTPchannels_GetParticipant(const MTPInputChannel &_channel, const MTPInputUser &_user_id) : MTPBoxed(MTPchannels_getParticipant(_channel, _user_id)) { } }; class MTPchannels_getChannels { // RPC method 'channels.getChannels' public: MTPVector vid; MTPchannels_getChannels() = default; MTPchannels_getChannels(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_channels_getChannels; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getChannels) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPmessages_Chats ResponseType; }; class MTPchannels_GetChannels : public MTPBoxed { public: MTPchannels_GetChannels() = default; MTPchannels_GetChannels(const MTPchannels_getChannels &v) : MTPBoxed(v) { } MTPchannels_GetChannels(const MTPVector &_id) : MTPBoxed(MTPchannels_getChannels(_id)) { } }; class MTPchannels_getFullChannel { // RPC method 'channels.getFullChannel' public: MTPInputChannel vchannel; MTPchannels_getFullChannel() = default; MTPchannels_getFullChannel(const MTPInputChannel &_channel) : vchannel(_channel) { } uint32 innerLength() const { return vchannel.innerLength(); } mtpTypeId type() const { return mtpc_channels_getFullChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getFullChannel) { vchannel.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); } typedef MTPmessages_ChatFull ResponseType; }; class MTPchannels_GetFullChannel : public MTPBoxed { public: MTPchannels_GetFullChannel() = default; MTPchannels_GetFullChannel(const MTPchannels_getFullChannel &v) : MTPBoxed(v) { } MTPchannels_GetFullChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_getFullChannel(_channel)) { } }; class MTPchannels_createChannel { // RPC method 'channels.createChannel' public: enum class Flag : int32 { f_broadcast = (1 << 0), f_megagroup = (1 << 1), MAX_FIELD = (1 << 1), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_broadcast() const { return vflags.v & Flag::f_broadcast; } bool is_megagroup() const { return vflags.v & Flag::f_megagroup; } MTPflags vflags; MTPstring vtitle; MTPstring vabout; MTPchannels_createChannel() = default; MTPchannels_createChannel(const MTPflags &_flags, const MTPstring &_title, const MTPstring &_about) : vflags(_flags), vtitle(_title), vabout(_about) { } uint32 innerLength() const { return vflags.innerLength() + vtitle.innerLength() + vabout.innerLength(); } mtpTypeId type() const { return mtpc_channels_createChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_createChannel) { vflags.read(from, end); vtitle.read(from, end); vabout.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vtitle.write(to); vabout.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPchannels_createChannel::Flags) class MTPchannels_CreateChannel : public MTPBoxed { public: MTPchannels_CreateChannel() = default; MTPchannels_CreateChannel(const MTPchannels_createChannel &v) : MTPBoxed(v) { } MTPchannels_CreateChannel(const MTPflags &_flags, const MTPstring &_title, const MTPstring &_about) : MTPBoxed(MTPchannels_createChannel(_flags, _title, _about)) { } }; class MTPchannels_editAbout { // RPC method 'channels.editAbout' public: MTPInputChannel vchannel; MTPstring vabout; MTPchannels_editAbout() = default; MTPchannels_editAbout(const MTPInputChannel &_channel, const MTPstring &_about) : vchannel(_channel), vabout(_about) { } uint32 innerLength() const { return vchannel.innerLength() + vabout.innerLength(); } mtpTypeId type() const { return mtpc_channels_editAbout; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editAbout) { vchannel.read(from, end); vabout.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vabout.write(to); } typedef MTPBool ResponseType; }; class MTPchannels_EditAbout : public MTPBoxed { public: MTPchannels_EditAbout() = default; MTPchannels_EditAbout(const MTPchannels_editAbout &v) : MTPBoxed(v) { } MTPchannels_EditAbout(const MTPInputChannel &_channel, const MTPstring &_about) : MTPBoxed(MTPchannels_editAbout(_channel, _about)) { } }; class MTPchannels_editAdmin { // RPC method 'channels.editAdmin' public: MTPInputChannel vchannel; MTPInputUser vuser_id; MTPChannelParticipantRole vrole; MTPchannels_editAdmin() = default; MTPchannels_editAdmin(const MTPInputChannel &_channel, const MTPInputUser &_user_id, const MTPChannelParticipantRole &_role) : vchannel(_channel), vuser_id(_user_id), vrole(_role) { } uint32 innerLength() const { return vchannel.innerLength() + vuser_id.innerLength() + vrole.innerLength(); } mtpTypeId type() const { return mtpc_channels_editAdmin; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editAdmin) { vchannel.read(from, end); vuser_id.read(from, end); vrole.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vuser_id.write(to); vrole.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_EditAdmin : public MTPBoxed { public: MTPchannels_EditAdmin() = default; MTPchannels_EditAdmin(const MTPchannels_editAdmin &v) : MTPBoxed(v) { } MTPchannels_EditAdmin(const MTPInputChannel &_channel, const MTPInputUser &_user_id, const MTPChannelParticipantRole &_role) : MTPBoxed(MTPchannels_editAdmin(_channel, _user_id, _role)) { } }; class MTPchannels_editTitle { // RPC method 'channels.editTitle' public: MTPInputChannel vchannel; MTPstring vtitle; MTPchannels_editTitle() = default; MTPchannels_editTitle(const MTPInputChannel &_channel, const MTPstring &_title) : vchannel(_channel), vtitle(_title) { } uint32 innerLength() const { return vchannel.innerLength() + vtitle.innerLength(); } mtpTypeId type() const { return mtpc_channels_editTitle; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editTitle) { vchannel.read(from, end); vtitle.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vtitle.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_EditTitle : public MTPBoxed { public: MTPchannels_EditTitle() = default; MTPchannels_EditTitle(const MTPchannels_editTitle &v) : MTPBoxed(v) { } MTPchannels_EditTitle(const MTPInputChannel &_channel, const MTPstring &_title) : MTPBoxed(MTPchannels_editTitle(_channel, _title)) { } }; class MTPchannels_editPhoto { // RPC method 'channels.editPhoto' public: MTPInputChannel vchannel; MTPInputChatPhoto vphoto; MTPchannels_editPhoto() = default; MTPchannels_editPhoto(const MTPInputChannel &_channel, const MTPInputChatPhoto &_photo) : vchannel(_channel), vphoto(_photo) { } uint32 innerLength() const { return vchannel.innerLength() + vphoto.innerLength(); } mtpTypeId type() const { return mtpc_channels_editPhoto; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editPhoto) { vchannel.read(from, end); vphoto.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vphoto.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_EditPhoto : public MTPBoxed { public: MTPchannels_EditPhoto() = default; MTPchannels_EditPhoto(const MTPchannels_editPhoto &v) : MTPBoxed(v) { } MTPchannels_EditPhoto(const MTPInputChannel &_channel, const MTPInputChatPhoto &_photo) : MTPBoxed(MTPchannels_editPhoto(_channel, _photo)) { } }; class MTPchannels_checkUsername { // RPC method 'channels.checkUsername' public: MTPInputChannel vchannel; MTPstring vusername; MTPchannels_checkUsername() = default; MTPchannels_checkUsername(const MTPInputChannel &_channel, const MTPstring &_username) : vchannel(_channel), vusername(_username) { } uint32 innerLength() const { return vchannel.innerLength() + vusername.innerLength(); } mtpTypeId type() const { return mtpc_channels_checkUsername; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_checkUsername) { vchannel.read(from, end); vusername.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vusername.write(to); } typedef MTPBool ResponseType; }; class MTPchannels_CheckUsername : public MTPBoxed { public: MTPchannels_CheckUsername() = default; MTPchannels_CheckUsername(const MTPchannels_checkUsername &v) : MTPBoxed(v) { } MTPchannels_CheckUsername(const MTPInputChannel &_channel, const MTPstring &_username) : MTPBoxed(MTPchannels_checkUsername(_channel, _username)) { } }; class MTPchannels_updateUsername { // RPC method 'channels.updateUsername' public: MTPInputChannel vchannel; MTPstring vusername; MTPchannels_updateUsername() = default; MTPchannels_updateUsername(const MTPInputChannel &_channel, const MTPstring &_username) : vchannel(_channel), vusername(_username) { } uint32 innerLength() const { return vchannel.innerLength() + vusername.innerLength(); } mtpTypeId type() const { return mtpc_channels_updateUsername; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_updateUsername) { vchannel.read(from, end); vusername.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vusername.write(to); } typedef MTPBool ResponseType; }; class MTPchannels_UpdateUsername : public MTPBoxed { public: MTPchannels_UpdateUsername() = default; MTPchannels_UpdateUsername(const MTPchannels_updateUsername &v) : MTPBoxed(v) { } MTPchannels_UpdateUsername(const MTPInputChannel &_channel, const MTPstring &_username) : MTPBoxed(MTPchannels_updateUsername(_channel, _username)) { } }; class MTPchannels_joinChannel { // RPC method 'channels.joinChannel' public: MTPInputChannel vchannel; MTPchannels_joinChannel() = default; MTPchannels_joinChannel(const MTPInputChannel &_channel) : vchannel(_channel) { } uint32 innerLength() const { return vchannel.innerLength(); } mtpTypeId type() const { return mtpc_channels_joinChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_joinChannel) { vchannel.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_JoinChannel : public MTPBoxed { public: MTPchannels_JoinChannel() = default; MTPchannels_JoinChannel(const MTPchannels_joinChannel &v) : MTPBoxed(v) { } MTPchannels_JoinChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_joinChannel(_channel)) { } }; class MTPchannels_leaveChannel { // RPC method 'channels.leaveChannel' public: MTPInputChannel vchannel; MTPchannels_leaveChannel() = default; MTPchannels_leaveChannel(const MTPInputChannel &_channel) : vchannel(_channel) { } uint32 innerLength() const { return vchannel.innerLength(); } mtpTypeId type() const { return mtpc_channels_leaveChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_leaveChannel) { vchannel.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_LeaveChannel : public MTPBoxed { public: MTPchannels_LeaveChannel() = default; MTPchannels_LeaveChannel(const MTPchannels_leaveChannel &v) : MTPBoxed(v) { } MTPchannels_LeaveChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_leaveChannel(_channel)) { } }; class MTPchannels_inviteToChannel { // RPC method 'channels.inviteToChannel' public: MTPInputChannel vchannel; MTPVector vusers; MTPchannels_inviteToChannel() = default; MTPchannels_inviteToChannel(const MTPInputChannel &_channel, const MTPVector &_users) : vchannel(_channel), vusers(_users) { } uint32 innerLength() const { return vchannel.innerLength() + vusers.innerLength(); } mtpTypeId type() const { return mtpc_channels_inviteToChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_inviteToChannel) { vchannel.read(from, end); vusers.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vusers.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_InviteToChannel : public MTPBoxed { public: MTPchannels_InviteToChannel() = default; MTPchannels_InviteToChannel(const MTPchannels_inviteToChannel &v) : MTPBoxed(v) { } MTPchannels_InviteToChannel(const MTPInputChannel &_channel, const MTPVector &_users) : MTPBoxed(MTPchannels_inviteToChannel(_channel, _users)) { } }; class MTPchannels_kickFromChannel { // RPC method 'channels.kickFromChannel' public: MTPInputChannel vchannel; MTPInputUser vuser_id; MTPBool vkicked; MTPchannels_kickFromChannel() = default; MTPchannels_kickFromChannel(const MTPInputChannel &_channel, const MTPInputUser &_user_id, MTPBool _kicked) : vchannel(_channel), vuser_id(_user_id), vkicked(_kicked) { } uint32 innerLength() const { return vchannel.innerLength() + vuser_id.innerLength() + vkicked.innerLength(); } mtpTypeId type() const { return mtpc_channels_kickFromChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_kickFromChannel) { vchannel.read(from, end); vuser_id.read(from, end); vkicked.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vuser_id.write(to); vkicked.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_KickFromChannel : public MTPBoxed { public: MTPchannels_KickFromChannel() = default; MTPchannels_KickFromChannel(const MTPchannels_kickFromChannel &v) : MTPBoxed(v) { } MTPchannels_KickFromChannel(const MTPInputChannel &_channel, const MTPInputUser &_user_id, MTPBool _kicked) : MTPBoxed(MTPchannels_kickFromChannel(_channel, _user_id, _kicked)) { } }; class MTPchannels_exportInvite { // RPC method 'channels.exportInvite' public: MTPInputChannel vchannel; MTPchannels_exportInvite() = default; MTPchannels_exportInvite(const MTPInputChannel &_channel) : vchannel(_channel) { } uint32 innerLength() const { return vchannel.innerLength(); } mtpTypeId type() const { return mtpc_channels_exportInvite; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_exportInvite) { vchannel.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); } typedef MTPExportedChatInvite ResponseType; }; class MTPchannels_ExportInvite : public MTPBoxed { public: MTPchannels_ExportInvite() = default; MTPchannels_ExportInvite(const MTPchannels_exportInvite &v) : MTPBoxed(v) { } MTPchannels_ExportInvite(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_exportInvite(_channel)) { } }; class MTPchannels_deleteChannel { // RPC method 'channels.deleteChannel' public: MTPInputChannel vchannel; MTPchannels_deleteChannel() = default; MTPchannels_deleteChannel(const MTPInputChannel &_channel) : vchannel(_channel) { } uint32 innerLength() const { return vchannel.innerLength(); } mtpTypeId type() const { return mtpc_channels_deleteChannel; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_deleteChannel) { vchannel.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_DeleteChannel : public MTPBoxed { public: MTPchannels_DeleteChannel() = default; MTPchannels_DeleteChannel(const MTPchannels_deleteChannel &v) : MTPBoxed(v) { } MTPchannels_DeleteChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_deleteChannel(_channel)) { } }; class MTPchannels_toggleInvites { // RPC method 'channels.toggleInvites' public: MTPInputChannel vchannel; MTPBool venabled; MTPchannels_toggleInvites() = default; MTPchannels_toggleInvites(const MTPInputChannel &_channel, MTPBool _enabled) : vchannel(_channel), venabled(_enabled) { } uint32 innerLength() const { return vchannel.innerLength() + venabled.innerLength(); } mtpTypeId type() const { return mtpc_channels_toggleInvites; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleInvites) { vchannel.read(from, end); venabled.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); venabled.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_ToggleInvites : public MTPBoxed { public: MTPchannels_ToggleInvites() = default; MTPchannels_ToggleInvites(const MTPchannels_toggleInvites &v) : MTPBoxed(v) { } MTPchannels_ToggleInvites(const MTPInputChannel &_channel, MTPBool _enabled) : MTPBoxed(MTPchannels_toggleInvites(_channel, _enabled)) { } }; class MTPchannels_exportMessageLink { // RPC method 'channels.exportMessageLink' public: MTPInputChannel vchannel; MTPint vid; MTPchannels_exportMessageLink() = default; MTPchannels_exportMessageLink(const MTPInputChannel &_channel, MTPint _id) : vchannel(_channel), vid(_id) { } uint32 innerLength() const { return vchannel.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_channels_exportMessageLink; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_exportMessageLink) { vchannel.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vid.write(to); } typedef MTPExportedMessageLink ResponseType; }; class MTPchannels_ExportMessageLink : public MTPBoxed { public: MTPchannels_ExportMessageLink() = default; MTPchannels_ExportMessageLink(const MTPchannels_exportMessageLink &v) : MTPBoxed(v) { } MTPchannels_ExportMessageLink(const MTPInputChannel &_channel, MTPint _id) : MTPBoxed(MTPchannels_exportMessageLink(_channel, _id)) { } }; class MTPchannels_toggleSignatures { // RPC method 'channels.toggleSignatures' public: MTPInputChannel vchannel; MTPBool venabled; MTPchannels_toggleSignatures() = default; MTPchannels_toggleSignatures(const MTPInputChannel &_channel, MTPBool _enabled) : vchannel(_channel), venabled(_enabled) { } uint32 innerLength() const { return vchannel.innerLength() + venabled.innerLength(); } mtpTypeId type() const { return mtpc_channels_toggleSignatures; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleSignatures) { vchannel.read(from, end); venabled.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); venabled.write(to); } typedef MTPUpdates ResponseType; }; class MTPchannels_ToggleSignatures : public MTPBoxed { public: MTPchannels_ToggleSignatures() = default; MTPchannels_ToggleSignatures(const MTPchannels_toggleSignatures &v) : MTPBoxed(v) { } MTPchannels_ToggleSignatures(const MTPInputChannel &_channel, MTPBool _enabled) : MTPBoxed(MTPchannels_toggleSignatures(_channel, _enabled)) { } }; class MTPchannels_updatePinnedMessage { // RPC method 'channels.updatePinnedMessage' public: enum class Flag : int32 { f_silent = (1 << 0), MAX_FIELD = (1 << 0), }; Q_DECLARE_FLAGS(Flags, Flag); friend inline Flags operator~(Flag v) { return QFlag(~static_cast(v)); } bool is_silent() const { return vflags.v & Flag::f_silent; } MTPflags vflags; MTPInputChannel vchannel; MTPint vid; MTPchannels_updatePinnedMessage() = default; MTPchannels_updatePinnedMessage(const MTPflags &_flags, const MTPInputChannel &_channel, MTPint _id) : vflags(_flags), vchannel(_channel), vid(_id) { } uint32 innerLength() const { return vflags.innerLength() + vchannel.innerLength() + vid.innerLength(); } mtpTypeId type() const { return mtpc_channels_updatePinnedMessage; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_updatePinnedMessage) { vflags.read(from, end); vchannel.read(from, end); vid.read(from, end); } void write(mtpBuffer &to) const { vflags.write(to); vchannel.write(to); vid.write(to); } typedef MTPUpdates ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPchannels_updatePinnedMessage::Flags) class MTPchannels_UpdatePinnedMessage : public MTPBoxed { public: MTPchannels_UpdatePinnedMessage() = default; MTPchannels_UpdatePinnedMessage(const MTPchannels_updatePinnedMessage &v) : MTPBoxed(v) { } MTPchannels_UpdatePinnedMessage(const MTPflags &_flags, const MTPInputChannel &_channel, MTPint _id) : MTPBoxed(MTPchannels_updatePinnedMessage(_flags, _channel, _id)) { } }; class MTPchannels_getAdminedPublicChannels { // RPC method 'channels.getAdminedPublicChannels' public: MTPchannels_getAdminedPublicChannels() = default; uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_channels_getAdminedPublicChannels; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getAdminedPublicChannels) { } void write(mtpBuffer &to) const { } typedef MTPmessages_Chats ResponseType; }; class MTPchannels_GetAdminedPublicChannels : public MTPBoxed { public: MTPchannels_GetAdminedPublicChannels() = default; MTPchannels_GetAdminedPublicChannels(const MTPchannels_getAdminedPublicChannels &v) : MTPBoxed(v) { } }; class MTPphone_requestCall { // RPC method 'phone.requestCall' public: MTPInputUser vuser_id; MTPint vrandom_id; MTPbytes vg_a; MTPPhoneCallProtocol vprotocol; MTPphone_requestCall() = default; MTPphone_requestCall(const MTPInputUser &_user_id, MTPint _random_id, const MTPbytes &_g_a, const MTPPhoneCallProtocol &_protocol) : vuser_id(_user_id), vrandom_id(_random_id), vg_a(_g_a), vprotocol(_protocol) { } uint32 innerLength() const { return vuser_id.innerLength() + vrandom_id.innerLength() + vg_a.innerLength() + vprotocol.innerLength(); } mtpTypeId type() const { return mtpc_phone_requestCall; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phone_requestCall) { vuser_id.read(from, end); vrandom_id.read(from, end); vg_a.read(from, end); vprotocol.read(from, end); } void write(mtpBuffer &to) const { vuser_id.write(to); vrandom_id.write(to); vg_a.write(to); vprotocol.write(to); } typedef MTPphone_PhoneCall ResponseType; }; class MTPphone_RequestCall : public MTPBoxed { public: MTPphone_RequestCall() = default; MTPphone_RequestCall(const MTPphone_requestCall &v) : MTPBoxed(v) { } MTPphone_RequestCall(const MTPInputUser &_user_id, MTPint _random_id, const MTPbytes &_g_a, const MTPPhoneCallProtocol &_protocol) : MTPBoxed(MTPphone_requestCall(_user_id, _random_id, _g_a, _protocol)) { } }; class MTPphone_acceptCall { // RPC method 'phone.acceptCall' public: MTPInputPhoneCall vpeer; MTPbytes vg_b; MTPlong vkey_fingerprint; MTPPhoneCallProtocol vprotocol; MTPphone_acceptCall() = default; MTPphone_acceptCall(const MTPInputPhoneCall &_peer, const MTPbytes &_g_b, const MTPlong &_key_fingerprint, const MTPPhoneCallProtocol &_protocol) : vpeer(_peer), vg_b(_g_b), vkey_fingerprint(_key_fingerprint), vprotocol(_protocol) { } uint32 innerLength() const { return vpeer.innerLength() + vg_b.innerLength() + vkey_fingerprint.innerLength() + vprotocol.innerLength(); } mtpTypeId type() const { return mtpc_phone_acceptCall; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phone_acceptCall) { vpeer.read(from, end); vg_b.read(from, end); vkey_fingerprint.read(from, end); vprotocol.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vg_b.write(to); vkey_fingerprint.write(to); vprotocol.write(to); } typedef MTPphone_PhoneCall ResponseType; }; class MTPphone_AcceptCall : public MTPBoxed { public: MTPphone_AcceptCall() = default; MTPphone_AcceptCall(const MTPphone_acceptCall &v) : MTPBoxed(v) { } MTPphone_AcceptCall(const MTPInputPhoneCall &_peer, const MTPbytes &_g_b, const MTPlong &_key_fingerprint, const MTPPhoneCallProtocol &_protocol) : MTPBoxed(MTPphone_acceptCall(_peer, _g_b, _key_fingerprint, _protocol)) { } }; class MTPphone_discardCall { // RPC method 'phone.discardCall' public: MTPInputPhoneCall vpeer; MTPint vduration; MTPPhoneCallDiscardReason vreason; MTPlong vconnection_id; MTPphone_discardCall() = default; MTPphone_discardCall(const MTPInputPhoneCall &_peer, MTPint _duration, const MTPPhoneCallDiscardReason &_reason, const MTPlong &_connection_id) : vpeer(_peer), vduration(_duration), vreason(_reason), vconnection_id(_connection_id) { } uint32 innerLength() const { return vpeer.innerLength() + vduration.innerLength() + vreason.innerLength() + vconnection_id.innerLength(); } mtpTypeId type() const { return mtpc_phone_discardCall; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phone_discardCall) { vpeer.read(from, end); vduration.read(from, end); vreason.read(from, end); vconnection_id.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vduration.write(to); vreason.write(to); vconnection_id.write(to); } typedef MTPBool ResponseType; }; class MTPphone_DiscardCall : public MTPBoxed { public: MTPphone_DiscardCall() = default; MTPphone_DiscardCall(const MTPphone_discardCall &v) : MTPBoxed(v) { } MTPphone_DiscardCall(const MTPInputPhoneCall &_peer, MTPint _duration, const MTPPhoneCallDiscardReason &_reason, const MTPlong &_connection_id) : MTPBoxed(MTPphone_discardCall(_peer, _duration, _reason, _connection_id)) { } }; class MTPphone_receivedCall { // RPC method 'phone.receivedCall' public: MTPInputPhoneCall vpeer; MTPphone_receivedCall() = default; MTPphone_receivedCall(const MTPInputPhoneCall &_peer) : vpeer(_peer) { } uint32 innerLength() const { return vpeer.innerLength(); } mtpTypeId type() const { return mtpc_phone_receivedCall; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_phone_receivedCall) { vpeer.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); } typedef MTPBool ResponseType; }; class MTPphone_ReceivedCall : public MTPBoxed { public: MTPphone_ReceivedCall() = default; MTPphone_ReceivedCall(const MTPphone_receivedCall &v) : MTPBoxed(v) { } MTPphone_ReceivedCall(const MTPInputPhoneCall &_peer) : MTPBoxed(MTPphone_receivedCall(_peer)) { } }; // Creator proxy class definition namespace MTP { namespace internal { class TypeCreator { public: inline static MTPresPQ new_resPQ(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_pq, const MTPVector &_server_public_key_fingerprints) { return MTPresPQ(new MTPDresPQ(_nonce, _server_nonce, _pq, _server_public_key_fingerprints)); } inline static MTPp_Q_inner_data new_p_q_inner_data(const MTPstring &_pq, const MTPstring &_p, const MTPstring &_q, const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint256 &_new_nonce) { return MTPp_Q_inner_data(new MTPDp_q_inner_data(_pq, _p, _q, _nonce, _server_nonce, _new_nonce)); } inline static MTPserver_DH_Params new_server_DH_params_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash) { return MTPserver_DH_Params(new MTPDserver_DH_params_fail(_nonce, _server_nonce, _new_nonce_hash)); } inline static MTPserver_DH_Params new_server_DH_params_ok(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_encrypted_answer) { return MTPserver_DH_Params(new MTPDserver_DH_params_ok(_nonce, _server_nonce, _encrypted_answer)); } inline static MTPserver_DH_inner_data new_server_DH_inner_data(const MTPint128 &_nonce, const MTPint128 &_server_nonce, MTPint _g, const MTPstring &_dh_prime, const MTPstring &_g_a, MTPint _server_time) { return MTPserver_DH_inner_data(new MTPDserver_DH_inner_data(_nonce, _server_nonce, _g, _dh_prime, _g_a, _server_time)); } inline static MTPclient_DH_Inner_Data new_client_DH_inner_data(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPlong &_retry_id, const MTPstring &_g_b) { return MTPclient_DH_Inner_Data(new MTPDclient_DH_inner_data(_nonce, _server_nonce, _retry_id, _g_b)); } inline static MTPset_client_DH_params_answer new_dh_gen_ok(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash1) { return MTPset_client_DH_params_answer(new MTPDdh_gen_ok(_nonce, _server_nonce, _new_nonce_hash1)); } inline static MTPset_client_DH_params_answer new_dh_gen_retry(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash2) { return MTPset_client_DH_params_answer(new MTPDdh_gen_retry(_nonce, _server_nonce, _new_nonce_hash2)); } inline static MTPset_client_DH_params_answer new_dh_gen_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash3) { return MTPset_client_DH_params_answer(new MTPDdh_gen_fail(_nonce, _server_nonce, _new_nonce_hash3)); } inline static MTPdestroyAuthKeyRes new_destroy_auth_key_ok() { return MTPdestroyAuthKeyRes(mtpc_destroy_auth_key_ok); } inline static MTPdestroyAuthKeyRes new_destroy_auth_key_none() { return MTPdestroyAuthKeyRes(mtpc_destroy_auth_key_none); } inline static MTPdestroyAuthKeyRes new_destroy_auth_key_fail() { return MTPdestroyAuthKeyRes(mtpc_destroy_auth_key_fail); } inline static MTPmsgsAck new_msgs_ack(const MTPVector &_msg_ids) { return MTPmsgsAck(new MTPDmsgs_ack(_msg_ids)); } inline static MTPbadMsgNotification new_bad_msg_notification(const MTPlong &_bad_msg_id, MTPint _bad_msg_seqno, MTPint _error_code) { return MTPbadMsgNotification(new MTPDbad_msg_notification(_bad_msg_id, _bad_msg_seqno, _error_code)); } inline static MTPbadMsgNotification new_bad_server_salt(const MTPlong &_bad_msg_id, MTPint _bad_msg_seqno, MTPint _error_code, const MTPlong &_new_server_salt) { return MTPbadMsgNotification(new MTPDbad_server_salt(_bad_msg_id, _bad_msg_seqno, _error_code, _new_server_salt)); } inline static MTPmsgsStateReq new_msgs_state_req(const MTPVector &_msg_ids) { return MTPmsgsStateReq(new MTPDmsgs_state_req(_msg_ids)); } inline static MTPmsgsStateInfo new_msgs_state_info(const MTPlong &_req_msg_id, const MTPstring &_info) { return MTPmsgsStateInfo(new MTPDmsgs_state_info(_req_msg_id, _info)); } inline static MTPmsgsAllInfo new_msgs_all_info(const MTPVector &_msg_ids, const MTPstring &_info) { return MTPmsgsAllInfo(new MTPDmsgs_all_info(_msg_ids, _info)); } inline static MTPmsgDetailedInfo new_msg_detailed_info(const MTPlong &_msg_id, const MTPlong &_answer_msg_id, MTPint _bytes, MTPint _status) { return MTPmsgDetailedInfo(new MTPDmsg_detailed_info(_msg_id, _answer_msg_id, _bytes, _status)); } inline static MTPmsgDetailedInfo new_msg_new_detailed_info(const MTPlong &_answer_msg_id, MTPint _bytes, MTPint _status) { return MTPmsgDetailedInfo(new MTPDmsg_new_detailed_info(_answer_msg_id, _bytes, _status)); } inline static MTPmsgResendReq new_msg_resend_req(const MTPVector &_msg_ids) { return MTPmsgResendReq(new MTPDmsg_resend_req(_msg_ids)); } inline static MTPrpcError new_rpc_error(MTPint _error_code, const MTPstring &_error_message) { return MTPrpcError(new MTPDrpc_error(_error_code, _error_message)); } inline static MTPrpcDropAnswer new_rpc_answer_unknown() { return MTPrpcDropAnswer(mtpc_rpc_answer_unknown); } inline static MTPrpcDropAnswer new_rpc_answer_dropped_running() { return MTPrpcDropAnswer(mtpc_rpc_answer_dropped_running); } inline static MTPrpcDropAnswer new_rpc_answer_dropped(const MTPlong &_msg_id, MTPint _seq_no, MTPint _bytes) { return MTPrpcDropAnswer(new MTPDrpc_answer_dropped(_msg_id, _seq_no, _bytes)); } inline static MTPfutureSalt new_future_salt(MTPint _valid_since, MTPint _valid_until, const MTPlong &_salt) { return MTPfutureSalt(new MTPDfuture_salt(_valid_since, _valid_until, _salt)); } inline static MTPfutureSalts new_future_salts(const MTPlong &_req_msg_id, MTPint _now, const MTPvector &_salts) { return MTPfutureSalts(new MTPDfuture_salts(_req_msg_id, _now, _salts)); } inline static MTPpong new_pong(const MTPlong &_msg_id, const MTPlong &_ping_id) { return MTPpong(new MTPDpong(_msg_id, _ping_id)); } inline static MTPdestroySessionRes new_destroy_session_ok(const MTPlong &_session_id) { return MTPdestroySessionRes(new MTPDdestroy_session_ok(_session_id)); } inline static MTPdestroySessionRes new_destroy_session_none(const MTPlong &_session_id) { return MTPdestroySessionRes(new MTPDdestroy_session_none(_session_id)); } inline static MTPnewSession new_new_session_created(const MTPlong &_first_msg_id, const MTPlong &_unique_id, const MTPlong &_server_salt) { return MTPnewSession(new MTPDnew_session_created(_first_msg_id, _unique_id, _server_salt)); } inline static MTPhttpWait new_http_wait(MTPint _max_delay, MTPint _wait_after, MTPint _max_wait) { return MTPhttpWait(new MTPDhttp_wait(_max_delay, _wait_after, _max_wait)); } inline static MTPbool new_boolFalse() { return MTPbool(mtpc_boolFalse); } inline static MTPbool new_boolTrue() { return MTPbool(mtpc_boolTrue); } inline static MTPtrue new_true() { return MTPtrue(); } inline static MTPerror new_error(MTPint _code, const MTPstring &_text) { return MTPerror(new MTPDerror(_code, _text)); } inline static MTPnull new_null() { return MTPnull(); } inline static MTPinputPeer new_inputPeerEmpty() { return MTPinputPeer(mtpc_inputPeerEmpty); } inline static MTPinputPeer new_inputPeerSelf() { return MTPinputPeer(mtpc_inputPeerSelf); } inline static MTPinputPeer new_inputPeerChat(MTPint _chat_id) { return MTPinputPeer(new MTPDinputPeerChat(_chat_id)); } inline static MTPinputPeer new_inputPeerUser(MTPint _user_id, const MTPlong &_access_hash) { return MTPinputPeer(new MTPDinputPeerUser(_user_id, _access_hash)); } inline static MTPinputPeer new_inputPeerChannel(MTPint _channel_id, const MTPlong &_access_hash) { return MTPinputPeer(new MTPDinputPeerChannel(_channel_id, _access_hash)); } inline static MTPinputUser new_inputUserEmpty() { return MTPinputUser(mtpc_inputUserEmpty); } inline static MTPinputUser new_inputUserSelf() { return MTPinputUser(mtpc_inputUserSelf); } inline static MTPinputUser new_inputUser(MTPint _user_id, const MTPlong &_access_hash) { return MTPinputUser(new MTPDinputUser(_user_id, _access_hash)); } inline static MTPinputContact new_inputPhoneContact(const MTPlong &_client_id, const MTPstring &_phone, const MTPstring &_first_name, const MTPstring &_last_name) { return MTPinputContact(new MTPDinputPhoneContact(_client_id, _phone, _first_name, _last_name)); } inline static MTPinputFile new_inputFile(const MTPlong &_id, MTPint _parts, const MTPstring &_name, const MTPstring &_md5_checksum) { return MTPinputFile(new MTPDinputFile(_id, _parts, _name, _md5_checksum)); } inline static MTPinputFile new_inputFileBig(const MTPlong &_id, MTPint _parts, const MTPstring &_name) { return MTPinputFile(new MTPDinputFileBig(_id, _parts, _name)); } inline static MTPinputMedia new_inputMediaEmpty() { return MTPinputMedia(mtpc_inputMediaEmpty); } inline static MTPinputMedia new_inputMediaUploadedPhoto(const MTPflags &_flags, const MTPInputFile &_file, const MTPstring &_caption, const MTPVector &_stickers) { return MTPinputMedia(new MTPDinputMediaUploadedPhoto(_flags, _file, _caption, _stickers)); } inline static MTPinputMedia new_inputMediaPhoto(const MTPInputPhoto &_id, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaPhoto(_id, _caption)); } inline static MTPinputMedia new_inputMediaGeoPoint(const MTPInputGeoPoint &_geo_point) { return MTPinputMedia(new MTPDinputMediaGeoPoint(_geo_point)); } inline static MTPinputMedia new_inputMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name) { return MTPinputMedia(new MTPDinputMediaContact(_phone_number, _first_name, _last_name)); } inline static MTPinputMedia new_inputMediaUploadedDocument(const MTPflags &_flags, const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption, const MTPVector &_stickers) { return MTPinputMedia(new MTPDinputMediaUploadedDocument(_flags, _file, _mime_type, _attributes, _caption, _stickers)); } inline static MTPinputMedia new_inputMediaUploadedThumbDocument(const MTPflags &_flags, const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption, const MTPVector &_stickers) { return MTPinputMedia(new MTPDinputMediaUploadedThumbDocument(_flags, _file, _thumb, _mime_type, _attributes, _caption, _stickers)); } inline static MTPinputMedia new_inputMediaDocument(const MTPInputDocument &_id, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaDocument(_id, _caption)); } inline static MTPinputMedia new_inputMediaVenue(const MTPInputGeoPoint &_geo_point, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id) { return MTPinputMedia(new MTPDinputMediaVenue(_geo_point, _title, _address, _provider, _venue_id)); } inline static MTPinputMedia new_inputMediaGifExternal(const MTPstring &_url, const MTPstring &_q) { return MTPinputMedia(new MTPDinputMediaGifExternal(_url, _q)); } inline static MTPinputMedia new_inputMediaPhotoExternal(const MTPstring &_url, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaPhotoExternal(_url, _caption)); } inline static MTPinputMedia new_inputMediaDocumentExternal(const MTPstring &_url, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaDocumentExternal(_url, _caption)); } inline static MTPinputMedia new_inputMediaGame(const MTPInputGame &_id) { return MTPinputMedia(new MTPDinputMediaGame(_id)); } inline static MTPinputChatPhoto new_inputChatPhotoEmpty() { return MTPinputChatPhoto(mtpc_inputChatPhotoEmpty); } inline static MTPinputChatPhoto new_inputChatUploadedPhoto(const MTPInputFile &_file) { return MTPinputChatPhoto(new MTPDinputChatUploadedPhoto(_file)); } inline static MTPinputChatPhoto new_inputChatPhoto(const MTPInputPhoto &_id) { return MTPinputChatPhoto(new MTPDinputChatPhoto(_id)); } inline static MTPinputGeoPoint new_inputGeoPointEmpty() { return MTPinputGeoPoint(mtpc_inputGeoPointEmpty); } inline static MTPinputGeoPoint new_inputGeoPoint(const MTPdouble &_lat, const MTPdouble &_long) { return MTPinputGeoPoint(new MTPDinputGeoPoint(_lat, _long)); } inline static MTPinputPhoto new_inputPhotoEmpty() { return MTPinputPhoto(mtpc_inputPhotoEmpty); } inline static MTPinputPhoto new_inputPhoto(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputPhoto(new MTPDinputPhoto(_id, _access_hash)); } inline static MTPinputFileLocation new_inputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTPinputFileLocation(new MTPDinputFileLocation(_volume_id, _local_id, _secret)); } inline static MTPinputFileLocation new_inputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputFileLocation(new MTPDinputEncryptedFileLocation(_id, _access_hash)); } inline static MTPinputFileLocation new_inputDocumentFileLocation(const MTPlong &_id, const MTPlong &_access_hash, MTPint _version) { return MTPinputFileLocation(new MTPDinputDocumentFileLocation(_id, _access_hash, _version)); } inline static MTPinputAppEvent new_inputAppEvent(const MTPdouble &_time, const MTPstring &_type, const MTPlong &_peer, const MTPstring &_data) { return MTPinputAppEvent(new MTPDinputAppEvent(_time, _type, _peer, _data)); } inline static MTPpeer new_peerUser(MTPint _user_id) { return MTPpeer(new MTPDpeerUser(_user_id)); } inline static MTPpeer new_peerChat(MTPint _chat_id) { return MTPpeer(new MTPDpeerChat(_chat_id)); } inline static MTPpeer new_peerChannel(MTPint _channel_id) { return MTPpeer(new MTPDpeerChannel(_channel_id)); } inline static MTPstorage_fileType new_storage_fileUnknown() { return MTPstorage_fileType(mtpc_storage_fileUnknown); } inline static MTPstorage_fileType new_storage_fileJpeg() { return MTPstorage_fileType(mtpc_storage_fileJpeg); } inline static MTPstorage_fileType new_storage_fileGif() { return MTPstorage_fileType(mtpc_storage_fileGif); } inline static MTPstorage_fileType new_storage_filePng() { return MTPstorage_fileType(mtpc_storage_filePng); } inline static MTPstorage_fileType new_storage_filePdf() { return MTPstorage_fileType(mtpc_storage_filePdf); } inline static MTPstorage_fileType new_storage_fileMp3() { return MTPstorage_fileType(mtpc_storage_fileMp3); } inline static MTPstorage_fileType new_storage_fileMov() { return MTPstorage_fileType(mtpc_storage_fileMov); } inline static MTPstorage_fileType new_storage_filePartial() { return MTPstorage_fileType(mtpc_storage_filePartial); } inline static MTPstorage_fileType new_storage_fileMp4() { return MTPstorage_fileType(mtpc_storage_fileMp4); } inline static MTPstorage_fileType new_storage_fileWebp() { return MTPstorage_fileType(mtpc_storage_fileWebp); } inline static MTPfileLocation new_fileLocationUnavailable(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTPfileLocation(new MTPDfileLocationUnavailable(_volume_id, _local_id, _secret)); } inline static MTPfileLocation new_fileLocation(MTPint _dc_id, const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTPfileLocation(new MTPDfileLocation(_dc_id, _volume_id, _local_id, _secret)); } inline static MTPuser new_userEmpty(MTPint _id) { return MTPuser(new MTPDuserEmpty(_id)); } inline static MTPuser new_user(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_username, const MTPstring &_phone, const MTPUserProfilePhoto &_photo, const MTPUserStatus &_status, MTPint _bot_info_version, const MTPstring &_restriction_reason, const MTPstring &_bot_inline_placeholder) { return MTPuser(new MTPDuser(_flags, _id, _access_hash, _first_name, _last_name, _username, _phone, _photo, _status, _bot_info_version, _restriction_reason, _bot_inline_placeholder)); } inline static MTPuserProfilePhoto new_userProfilePhotoEmpty() { return MTPuserProfilePhoto(mtpc_userProfilePhotoEmpty); } inline static MTPuserProfilePhoto new_userProfilePhoto(const MTPlong &_photo_id, const MTPFileLocation &_photo_small, const MTPFileLocation &_photo_big) { return MTPuserProfilePhoto(new MTPDuserProfilePhoto(_photo_id, _photo_small, _photo_big)); } inline static MTPuserStatus new_userStatusEmpty() { return MTPuserStatus(mtpc_userStatusEmpty); } inline static MTPuserStatus new_userStatusOnline(MTPint _expires) { return MTPuserStatus(new MTPDuserStatusOnline(_expires)); } inline static MTPuserStatus new_userStatusOffline(MTPint _was_online) { return MTPuserStatus(new MTPDuserStatusOffline(_was_online)); } inline static MTPuserStatus new_userStatusRecently() { return MTPuserStatus(mtpc_userStatusRecently); } inline static MTPuserStatus new_userStatusLastWeek() { return MTPuserStatus(mtpc_userStatusLastWeek); } inline static MTPuserStatus new_userStatusLastMonth() { return MTPuserStatus(mtpc_userStatusLastMonth); } inline static MTPchat new_chatEmpty(MTPint _id) { return MTPchat(new MTPDchatEmpty(_id)); } inline static MTPchat new_chat(const MTPflags &_flags, MTPint _id, const MTPstring &_title, const MTPChatPhoto &_photo, MTPint _participants_count, MTPint _date, MTPint _version, const MTPInputChannel &_migrated_to) { return MTPchat(new MTPDchat(_flags, _id, _title, _photo, _participants_count, _date, _version, _migrated_to)); } inline static MTPchat new_chatForbidden(MTPint _id, const MTPstring &_title) { return MTPchat(new MTPDchatForbidden(_id, _title)); } inline static MTPchat new_channel(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_title, const MTPstring &_username, const MTPChatPhoto &_photo, MTPint _date, MTPint _version, const MTPstring &_restriction_reason) { return MTPchat(new MTPDchannel(_flags, _id, _access_hash, _title, _username, _photo, _date, _version, _restriction_reason)); } inline static MTPchat new_channelForbidden(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_title) { return MTPchat(new MTPDchannelForbidden(_flags, _id, _access_hash, _title)); } inline static MTPchatFull new_chatFull(MTPint _id, const MTPChatParticipants &_participants, const MTPPhoto &_chat_photo, const MTPPeerNotifySettings &_notify_settings, const MTPExportedChatInvite &_exported_invite, const MTPVector &_bot_info) { return MTPchatFull(new MTPDchatFull(_id, _participants, _chat_photo, _notify_settings, _exported_invite, _bot_info)); } inline static MTPchatFull new_channelFull(const MTPflags &_flags, MTPint _id, const MTPstring &_about, MTPint _participants_count, MTPint _admins_count, MTPint _kicked_count, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPPhoto &_chat_photo, const MTPPeerNotifySettings &_notify_settings, const MTPExportedChatInvite &_exported_invite, const MTPVector &_bot_info, MTPint _migrated_from_chat_id, MTPint _migrated_from_max_id, MTPint _pinned_msg_id) { return MTPchatFull(new MTPDchannelFull(_flags, _id, _about, _participants_count, _admins_count, _kicked_count, _read_inbox_max_id, _read_outbox_max_id, _unread_count, _chat_photo, _notify_settings, _exported_invite, _bot_info, _migrated_from_chat_id, _migrated_from_max_id, _pinned_msg_id)); } inline static MTPchatParticipant new_chatParticipant(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTPchatParticipant(new MTPDchatParticipant(_user_id, _inviter_id, _date)); } inline static MTPchatParticipant new_chatParticipantCreator(MTPint _user_id) { return MTPchatParticipant(new MTPDchatParticipantCreator(_user_id)); } inline static MTPchatParticipant new_chatParticipantAdmin(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTPchatParticipant(new MTPDchatParticipantAdmin(_user_id, _inviter_id, _date)); } inline static MTPchatParticipants new_chatParticipantsForbidden(const MTPflags &_flags, MTPint _chat_id, const MTPChatParticipant &_self_participant) { return MTPchatParticipants(new MTPDchatParticipantsForbidden(_flags, _chat_id, _self_participant)); } inline static MTPchatParticipants new_chatParticipants(MTPint _chat_id, const MTPVector &_participants, MTPint _version) { return MTPchatParticipants(new MTPDchatParticipants(_chat_id, _participants, _version)); } inline static MTPchatPhoto new_chatPhotoEmpty() { return MTPchatPhoto(mtpc_chatPhotoEmpty); } inline static MTPchatPhoto new_chatPhoto(const MTPFileLocation &_photo_small, const MTPFileLocation &_photo_big) { return MTPchatPhoto(new MTPDchatPhoto(_photo_small, _photo_big)); } inline static MTPmessage new_messageEmpty(MTPint _id) { return MTPmessage(new MTPDmessageEmpty(_id)); } inline static MTPmessage new_message(const MTPflags &_flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views, MTPint _edit_date) { return MTPmessage(new MTPDmessage(_flags, _id, _from_id, _to_id, _fwd_from, _via_bot_id, _reply_to_msg_id, _date, _message, _media, _reply_markup, _entities, _views, _edit_date)); } inline static MTPmessage new_messageService(const MTPflags &_flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _reply_to_msg_id, MTPint _date, const MTPMessageAction &_action) { return MTPmessage(new MTPDmessageService(_flags, _id, _from_id, _to_id, _reply_to_msg_id, _date, _action)); } inline static MTPmessageMedia new_messageMediaEmpty() { return MTPmessageMedia(mtpc_messageMediaEmpty); } inline static MTPmessageMedia new_messageMediaPhoto(const MTPPhoto &_photo, const MTPstring &_caption) { return MTPmessageMedia(new MTPDmessageMediaPhoto(_photo, _caption)); } inline static MTPmessageMedia new_messageMediaGeo(const MTPGeoPoint &_geo) { return MTPmessageMedia(new MTPDmessageMediaGeo(_geo)); } inline static MTPmessageMedia new_messageMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, MTPint _user_id) { return MTPmessageMedia(new MTPDmessageMediaContact(_phone_number, _first_name, _last_name, _user_id)); } inline static MTPmessageMedia new_messageMediaUnsupported() { return MTPmessageMedia(mtpc_messageMediaUnsupported); } inline static MTPmessageMedia new_messageMediaDocument(const MTPDocument &_document, const MTPstring &_caption) { return MTPmessageMedia(new MTPDmessageMediaDocument(_document, _caption)); } inline static MTPmessageMedia new_messageMediaWebPage(const MTPWebPage &_webpage) { return MTPmessageMedia(new MTPDmessageMediaWebPage(_webpage)); } inline static MTPmessageMedia new_messageMediaVenue(const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id) { return MTPmessageMedia(new MTPDmessageMediaVenue(_geo, _title, _address, _provider, _venue_id)); } inline static MTPmessageMedia new_messageMediaGame(const MTPGame &_game) { return MTPmessageMedia(new MTPDmessageMediaGame(_game)); } inline static MTPmessageAction new_messageActionEmpty() { return MTPmessageAction(mtpc_messageActionEmpty); } inline static MTPmessageAction new_messageActionChatCreate(const MTPstring &_title, const MTPVector &_users) { return MTPmessageAction(new MTPDmessageActionChatCreate(_title, _users)); } inline static MTPmessageAction new_messageActionChatEditTitle(const MTPstring &_title) { return MTPmessageAction(new MTPDmessageActionChatEditTitle(_title)); } inline static MTPmessageAction new_messageActionChatEditPhoto(const MTPPhoto &_photo) { return MTPmessageAction(new MTPDmessageActionChatEditPhoto(_photo)); } inline static MTPmessageAction new_messageActionChatDeletePhoto() { return MTPmessageAction(mtpc_messageActionChatDeletePhoto); } inline static MTPmessageAction new_messageActionChatAddUser(const MTPVector &_users) { return MTPmessageAction(new MTPDmessageActionChatAddUser(_users)); } inline static MTPmessageAction new_messageActionChatDeleteUser(MTPint _user_id) { return MTPmessageAction(new MTPDmessageActionChatDeleteUser(_user_id)); } inline static MTPmessageAction new_messageActionChatJoinedByLink(MTPint _inviter_id) { return MTPmessageAction(new MTPDmessageActionChatJoinedByLink(_inviter_id)); } inline static MTPmessageAction new_messageActionChannelCreate(const MTPstring &_title) { return MTPmessageAction(new MTPDmessageActionChannelCreate(_title)); } inline static MTPmessageAction new_messageActionChatMigrateTo(MTPint _channel_id) { return MTPmessageAction(new MTPDmessageActionChatMigrateTo(_channel_id)); } inline static MTPmessageAction new_messageActionChannelMigrateFrom(const MTPstring &_title, MTPint _chat_id) { return MTPmessageAction(new MTPDmessageActionChannelMigrateFrom(_title, _chat_id)); } inline static MTPmessageAction new_messageActionPinMessage() { return MTPmessageAction(mtpc_messageActionPinMessage); } inline static MTPmessageAction new_messageActionHistoryClear() { return MTPmessageAction(mtpc_messageActionHistoryClear); } inline static MTPmessageAction new_messageActionGameScore(const MTPlong &_game_id, MTPint _score) { return MTPmessageAction(new MTPDmessageActionGameScore(_game_id, _score)); } inline static MTPmessageAction new_messageActionPhoneCall(const MTPflags &_flags, const MTPlong &_call_id, const MTPPhoneCallDiscardReason &_reason, MTPint _duration) { return MTPmessageAction(new MTPDmessageActionPhoneCall(_flags, _call_id, _reason, _duration)); } inline static MTPdialog new_dialog(const MTPflags &_flags, const MTPPeer &_peer, MTPint _top_message, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPPeerNotifySettings &_notify_settings, MTPint _pts, const MTPDraftMessage &_draft) { return MTPdialog(new MTPDdialog(_flags, _peer, _top_message, _read_inbox_max_id, _read_outbox_max_id, _unread_count, _notify_settings, _pts, _draft)); } inline static MTPphoto new_photoEmpty(const MTPlong &_id) { return MTPphoto(new MTPDphotoEmpty(_id)); } inline static MTPphoto new_photo(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPVector &_sizes) { return MTPphoto(new MTPDphoto(_flags, _id, _access_hash, _date, _sizes)); } inline static MTPphotoSize new_photoSizeEmpty(const MTPstring &_type) { return MTPphotoSize(new MTPDphotoSizeEmpty(_type)); } inline static MTPphotoSize new_photoSize(const MTPstring &_type, const MTPFileLocation &_location, MTPint _w, MTPint _h, MTPint _size) { return MTPphotoSize(new MTPDphotoSize(_type, _location, _w, _h, _size)); } inline static MTPphotoSize new_photoCachedSize(const MTPstring &_type, const MTPFileLocation &_location, MTPint _w, MTPint _h, const MTPbytes &_bytes) { return MTPphotoSize(new MTPDphotoCachedSize(_type, _location, _w, _h, _bytes)); } inline static MTPgeoPoint new_geoPointEmpty() { return MTPgeoPoint(mtpc_geoPointEmpty); } inline static MTPgeoPoint new_geoPoint(const MTPdouble &_long, const MTPdouble &_lat) { return MTPgeoPoint(new MTPDgeoPoint(_long, _lat)); } inline static MTPauth_checkedPhone new_auth_checkedPhone(MTPBool _phone_registered) { return MTPauth_checkedPhone(new MTPDauth_checkedPhone(_phone_registered)); } inline static MTPauth_sentCode new_auth_sentCode(const MTPflags &_flags, const MTPauth_SentCodeType &_type, const MTPstring &_phone_code_hash, const MTPauth_CodeType &_next_type, MTPint _timeout) { return MTPauth_sentCode(new MTPDauth_sentCode(_flags, _type, _phone_code_hash, _next_type, _timeout)); } inline static MTPauth_authorization new_auth_authorization(const MTPflags &_flags, MTPint _tmp_sessions, const MTPUser &_user) { return MTPauth_authorization(new MTPDauth_authorization(_flags, _tmp_sessions, _user)); } inline static MTPauth_exportedAuthorization new_auth_exportedAuthorization(MTPint _id, const MTPbytes &_bytes) { return MTPauth_exportedAuthorization(new MTPDauth_exportedAuthorization(_id, _bytes)); } inline static MTPinputNotifyPeer new_inputNotifyPeer(const MTPInputPeer &_peer) { return MTPinputNotifyPeer(new MTPDinputNotifyPeer(_peer)); } inline static MTPinputNotifyPeer new_inputNotifyUsers() { return MTPinputNotifyPeer(mtpc_inputNotifyUsers); } inline static MTPinputNotifyPeer new_inputNotifyChats() { return MTPinputNotifyPeer(mtpc_inputNotifyChats); } inline static MTPinputNotifyPeer new_inputNotifyAll() { return MTPinputNotifyPeer(mtpc_inputNotifyAll); } inline static MTPinputPeerNotifyEvents new_inputPeerNotifyEventsEmpty() { return MTPinputPeerNotifyEvents(mtpc_inputPeerNotifyEventsEmpty); } inline static MTPinputPeerNotifyEvents new_inputPeerNotifyEventsAll() { return MTPinputPeerNotifyEvents(mtpc_inputPeerNotifyEventsAll); } inline static MTPinputPeerNotifySettings new_inputPeerNotifySettings(const MTPflags &_flags, MTPint _mute_until, const MTPstring &_sound) { return MTPinputPeerNotifySettings(new MTPDinputPeerNotifySettings(_flags, _mute_until, _sound)); } inline static MTPpeerNotifyEvents new_peerNotifyEventsEmpty() { return MTPpeerNotifyEvents(mtpc_peerNotifyEventsEmpty); } inline static MTPpeerNotifyEvents new_peerNotifyEventsAll() { return MTPpeerNotifyEvents(mtpc_peerNotifyEventsAll); } inline static MTPpeerNotifySettings new_peerNotifySettingsEmpty() { return MTPpeerNotifySettings(mtpc_peerNotifySettingsEmpty); } inline static MTPpeerNotifySettings new_peerNotifySettings(const MTPflags &_flags, MTPint _mute_until, const MTPstring &_sound) { return MTPpeerNotifySettings(new MTPDpeerNotifySettings(_flags, _mute_until, _sound)); } inline static MTPpeerSettings new_peerSettings(const MTPflags &_flags) { return MTPpeerSettings(new MTPDpeerSettings(_flags)); } inline static MTPwallPaper new_wallPaper(MTPint _id, const MTPstring &_title, const MTPVector &_sizes, MTPint _color) { return MTPwallPaper(new MTPDwallPaper(_id, _title, _sizes, _color)); } inline static MTPwallPaper new_wallPaperSolid(MTPint _id, const MTPstring &_title, MTPint _bg_color, MTPint _color) { return MTPwallPaper(new MTPDwallPaperSolid(_id, _title, _bg_color, _color)); } inline static MTPreportReason new_inputReportReasonSpam() { return MTPreportReason(mtpc_inputReportReasonSpam); } inline static MTPreportReason new_inputReportReasonViolence() { return MTPreportReason(mtpc_inputReportReasonViolence); } inline static MTPreportReason new_inputReportReasonPornography() { return MTPreportReason(mtpc_inputReportReasonPornography); } inline static MTPreportReason new_inputReportReasonOther(const MTPstring &_text) { return MTPreportReason(new MTPDinputReportReasonOther(_text)); } inline static MTPuserFull new_userFull(const MTPflags &_flags, const MTPUser &_user, const MTPstring &_about, const MTPcontacts_Link &_link, const MTPPhoto &_profile_photo, const MTPPeerNotifySettings &_notify_settings, const MTPBotInfo &_bot_info, MTPint _common_chats_count) { return MTPuserFull(new MTPDuserFull(_flags, _user, _about, _link, _profile_photo, _notify_settings, _bot_info, _common_chats_count)); } inline static MTPcontact new_contact(MTPint _user_id, MTPBool _mutual) { return MTPcontact(new MTPDcontact(_user_id, _mutual)); } inline static MTPimportedContact new_importedContact(MTPint _user_id, const MTPlong &_client_id) { return MTPimportedContact(new MTPDimportedContact(_user_id, _client_id)); } inline static MTPcontactBlocked new_contactBlocked(MTPint _user_id, MTPint _date) { return MTPcontactBlocked(new MTPDcontactBlocked(_user_id, _date)); } inline static MTPcontactStatus new_contactStatus(MTPint _user_id, const MTPUserStatus &_status) { return MTPcontactStatus(new MTPDcontactStatus(_user_id, _status)); } inline static MTPcontacts_link new_contacts_link(const MTPContactLink &_my_link, const MTPContactLink &_foreign_link, const MTPUser &_user) { return MTPcontacts_link(new MTPDcontacts_link(_my_link, _foreign_link, _user)); } inline static MTPcontacts_contacts new_contacts_contactsNotModified() { return MTPcontacts_contacts(mtpc_contacts_contactsNotModified); } inline static MTPcontacts_contacts new_contacts_contacts(const MTPVector &_contacts, const MTPVector &_users) { return MTPcontacts_contacts(new MTPDcontacts_contacts(_contacts, _users)); } inline static MTPcontacts_importedContacts new_contacts_importedContacts(const MTPVector &_imported, const MTPVector &_retry_contacts, const MTPVector &_users) { return MTPcontacts_importedContacts(new MTPDcontacts_importedContacts(_imported, _retry_contacts, _users)); } inline static MTPcontacts_blocked new_contacts_blocked(const MTPVector &_blocked, const MTPVector &_users) { return MTPcontacts_blocked(new MTPDcontacts_blocked(_blocked, _users)); } inline static MTPcontacts_blocked new_contacts_blockedSlice(MTPint _count, const MTPVector &_blocked, const MTPVector &_users) { return MTPcontacts_blocked(new MTPDcontacts_blockedSlice(_count, _blocked, _users)); } inline static MTPmessages_dialogs new_messages_dialogs(const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTPmessages_dialogs(new MTPDmessages_dialogs(_dialogs, _messages, _chats, _users)); } inline static MTPmessages_dialogs new_messages_dialogsSlice(MTPint _count, const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTPmessages_dialogs(new MTPDmessages_dialogsSlice(_count, _dialogs, _messages, _chats, _users)); } inline static MTPmessages_messages new_messages_messages(const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTPmessages_messages(new MTPDmessages_messages(_messages, _chats, _users)); } inline static MTPmessages_messages new_messages_messagesSlice(MTPint _count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTPmessages_messages(new MTPDmessages_messagesSlice(_count, _messages, _chats, _users)); } inline static MTPmessages_messages new_messages_channelMessages(const MTPflags &_flags, MTPint _pts, MTPint _count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTPmessages_messages(new MTPDmessages_channelMessages(_flags, _pts, _count, _messages, _chats, _users)); } inline static MTPmessages_chats new_messages_chats(const MTPVector &_chats) { return MTPmessages_chats(new MTPDmessages_chats(_chats)); } inline static MTPmessages_chats new_messages_chatsSlice(MTPint _count, const MTPVector &_chats) { return MTPmessages_chats(new MTPDmessages_chatsSlice(_count, _chats)); } inline static MTPmessages_chatFull new_messages_chatFull(const MTPChatFull &_full_chat, const MTPVector &_chats, const MTPVector &_users) { return MTPmessages_chatFull(new MTPDmessages_chatFull(_full_chat, _chats, _users)); } inline static MTPmessages_affectedHistory new_messages_affectedHistory(MTPint _pts, MTPint _pts_count, MTPint _offset) { return MTPmessages_affectedHistory(new MTPDmessages_affectedHistory(_pts, _pts_count, _offset)); } inline static MTPmessagesFilter new_inputMessagesFilterEmpty() { return MTPmessagesFilter(mtpc_inputMessagesFilterEmpty); } inline static MTPmessagesFilter new_inputMessagesFilterPhotos() { return MTPmessagesFilter(mtpc_inputMessagesFilterPhotos); } inline static MTPmessagesFilter new_inputMessagesFilterVideo() { return MTPmessagesFilter(mtpc_inputMessagesFilterVideo); } inline static MTPmessagesFilter new_inputMessagesFilterPhotoVideo() { return MTPmessagesFilter(mtpc_inputMessagesFilterPhotoVideo); } inline static MTPmessagesFilter new_inputMessagesFilterPhotoVideoDocuments() { return MTPmessagesFilter(mtpc_inputMessagesFilterPhotoVideoDocuments); } inline static MTPmessagesFilter new_inputMessagesFilterDocument() { return MTPmessagesFilter(mtpc_inputMessagesFilterDocument); } inline static MTPmessagesFilter new_inputMessagesFilterUrl() { return MTPmessagesFilter(mtpc_inputMessagesFilterUrl); } inline static MTPmessagesFilter new_inputMessagesFilterGif() { return MTPmessagesFilter(mtpc_inputMessagesFilterGif); } inline static MTPmessagesFilter new_inputMessagesFilterVoice() { return MTPmessagesFilter(mtpc_inputMessagesFilterVoice); } inline static MTPmessagesFilter new_inputMessagesFilterMusic() { return MTPmessagesFilter(mtpc_inputMessagesFilterMusic); } inline static MTPmessagesFilter new_inputMessagesFilterChatPhotos() { return MTPmessagesFilter(mtpc_inputMessagesFilterChatPhotos); } inline static MTPmessagesFilter new_inputMessagesFilterPhoneCalls(const MTPflags &_flags) { return MTPmessagesFilter(new MTPDinputMessagesFilterPhoneCalls(_flags)); } inline static MTPupdate new_updateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateNewMessage(_message, _pts, _pts_count)); } inline static MTPupdate new_updateMessageID(MTPint _id, const MTPlong &_random_id) { return MTPupdate(new MTPDupdateMessageID(_id, _random_id)); } inline static MTPupdate new_updateDeleteMessages(const MTPVector &_messages, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateDeleteMessages(_messages, _pts, _pts_count)); } inline static MTPupdate new_updateUserTyping(MTPint _user_id, const MTPSendMessageAction &_action) { return MTPupdate(new MTPDupdateUserTyping(_user_id, _action)); } inline static MTPupdate new_updateChatUserTyping(MTPint _chat_id, MTPint _user_id, const MTPSendMessageAction &_action) { return MTPupdate(new MTPDupdateChatUserTyping(_chat_id, _user_id, _action)); } inline static MTPupdate new_updateChatParticipants(const MTPChatParticipants &_participants) { return MTPupdate(new MTPDupdateChatParticipants(_participants)); } inline static MTPupdate new_updateUserStatus(MTPint _user_id, const MTPUserStatus &_status) { return MTPupdate(new MTPDupdateUserStatus(_user_id, _status)); } inline static MTPupdate new_updateUserName(MTPint _user_id, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_username) { return MTPupdate(new MTPDupdateUserName(_user_id, _first_name, _last_name, _username)); } inline static MTPupdate new_updateUserPhoto(MTPint _user_id, MTPint _date, const MTPUserProfilePhoto &_photo, MTPBool _previous) { return MTPupdate(new MTPDupdateUserPhoto(_user_id, _date, _photo, _previous)); } inline static MTPupdate new_updateContactRegistered(MTPint _user_id, MTPint _date) { return MTPupdate(new MTPDupdateContactRegistered(_user_id, _date)); } inline static MTPupdate new_updateContactLink(MTPint _user_id, const MTPContactLink &_my_link, const MTPContactLink &_foreign_link) { return MTPupdate(new MTPDupdateContactLink(_user_id, _my_link, _foreign_link)); } inline static MTPupdate new_updateNewEncryptedMessage(const MTPEncryptedMessage &_message, MTPint _qts) { return MTPupdate(new MTPDupdateNewEncryptedMessage(_message, _qts)); } inline static MTPupdate new_updateEncryptedChatTyping(MTPint _chat_id) { return MTPupdate(new MTPDupdateEncryptedChatTyping(_chat_id)); } inline static MTPupdate new_updateEncryption(const MTPEncryptedChat &_chat, MTPint _date) { return MTPupdate(new MTPDupdateEncryption(_chat, _date)); } inline static MTPupdate new_updateEncryptedMessagesRead(MTPint _chat_id, MTPint _max_date, MTPint _date) { return MTPupdate(new MTPDupdateEncryptedMessagesRead(_chat_id, _max_date, _date)); } inline static MTPupdate new_updateChatParticipantAdd(MTPint _chat_id, MTPint _user_id, MTPint _inviter_id, MTPint _date, MTPint _version) { return MTPupdate(new MTPDupdateChatParticipantAdd(_chat_id, _user_id, _inviter_id, _date, _version)); } inline static MTPupdate new_updateChatParticipantDelete(MTPint _chat_id, MTPint _user_id, MTPint _version) { return MTPupdate(new MTPDupdateChatParticipantDelete(_chat_id, _user_id, _version)); } inline static MTPupdate new_updateDcOptions(const MTPVector &_dc_options) { return MTPupdate(new MTPDupdateDcOptions(_dc_options)); } inline static MTPupdate new_updateUserBlocked(MTPint _user_id, MTPBool _blocked) { return MTPupdate(new MTPDupdateUserBlocked(_user_id, _blocked)); } inline static MTPupdate new_updateNotifySettings(const MTPNotifyPeer &_peer, const MTPPeerNotifySettings &_notify_settings) { return MTPupdate(new MTPDupdateNotifySettings(_peer, _notify_settings)); } inline static MTPupdate new_updateServiceNotification(const MTPflags &_flags, MTPint _inbox_date, const MTPstring &_type, const MTPstring &_message, const MTPMessageMedia &_media, const MTPVector &_entities) { return MTPupdate(new MTPDupdateServiceNotification(_flags, _inbox_date, _type, _message, _media, _entities)); } inline static MTPupdate new_updatePrivacy(const MTPPrivacyKey &_key, const MTPVector &_rules) { return MTPupdate(new MTPDupdatePrivacy(_key, _rules)); } inline static MTPupdate new_updateUserPhone(MTPint _user_id, const MTPstring &_phone) { return MTPupdate(new MTPDupdateUserPhone(_user_id, _phone)); } inline static MTPupdate new_updateReadHistoryInbox(const MTPPeer &_peer, MTPint _max_id, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateReadHistoryInbox(_peer, _max_id, _pts, _pts_count)); } inline static MTPupdate new_updateReadHistoryOutbox(const MTPPeer &_peer, MTPint _max_id, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateReadHistoryOutbox(_peer, _max_id, _pts, _pts_count)); } inline static MTPupdate new_updateWebPage(const MTPWebPage &_webpage, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateWebPage(_webpage, _pts, _pts_count)); } inline static MTPupdate new_updateReadMessagesContents(const MTPVector &_messages, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateReadMessagesContents(_messages, _pts, _pts_count)); } inline static MTPupdate new_updateChannelTooLong(const MTPflags &_flags, MTPint _channel_id, MTPint _pts) { return MTPupdate(new MTPDupdateChannelTooLong(_flags, _channel_id, _pts)); } inline static MTPupdate new_updateChannel(MTPint _channel_id) { return MTPupdate(new MTPDupdateChannel(_channel_id)); } inline static MTPupdate new_updateNewChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateNewChannelMessage(_message, _pts, _pts_count)); } inline static MTPupdate new_updateReadChannelInbox(MTPint _channel_id, MTPint _max_id) { return MTPupdate(new MTPDupdateReadChannelInbox(_channel_id, _max_id)); } inline static MTPupdate new_updateDeleteChannelMessages(MTPint _channel_id, const MTPVector &_messages, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateDeleteChannelMessages(_channel_id, _messages, _pts, _pts_count)); } inline static MTPupdate new_updateChannelMessageViews(MTPint _channel_id, MTPint _id, MTPint _views) { return MTPupdate(new MTPDupdateChannelMessageViews(_channel_id, _id, _views)); } inline static MTPupdate new_updateChatAdmins(MTPint _chat_id, MTPBool _enabled, MTPint _version) { return MTPupdate(new MTPDupdateChatAdmins(_chat_id, _enabled, _version)); } inline static MTPupdate new_updateChatParticipantAdmin(MTPint _chat_id, MTPint _user_id, MTPBool _is_admin, MTPint _version) { return MTPupdate(new MTPDupdateChatParticipantAdmin(_chat_id, _user_id, _is_admin, _version)); } inline static MTPupdate new_updateNewStickerSet(const MTPmessages_StickerSet &_stickerset) { return MTPupdate(new MTPDupdateNewStickerSet(_stickerset)); } inline static MTPupdate new_updateStickerSetsOrder(const MTPflags &_flags, const MTPVector &_order) { return MTPupdate(new MTPDupdateStickerSetsOrder(_flags, _order)); } inline static MTPupdate new_updateStickerSets() { return MTPupdate(mtpc_updateStickerSets); } inline static MTPupdate new_updateSavedGifs() { return MTPupdate(mtpc_updateSavedGifs); } inline static MTPupdate new_updateBotInlineQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPstring &_query, const MTPGeoPoint &_geo, const MTPstring &_offset) { return MTPupdate(new MTPDupdateBotInlineQuery(_flags, _query_id, _user_id, _query, _geo, _offset)); } inline static MTPupdate new_updateBotInlineSend(const MTPflags &_flags, MTPint _user_id, const MTPstring &_query, const MTPGeoPoint &_geo, const MTPstring &_id, const MTPInputBotInlineMessageID &_msg_id) { return MTPupdate(new MTPDupdateBotInlineSend(_flags, _user_id, _query, _geo, _id, _msg_id)); } inline static MTPupdate new_updateEditChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateEditChannelMessage(_message, _pts, _pts_count)); } inline static MTPupdate new_updateChannelPinnedMessage(MTPint _channel_id, MTPint _id) { return MTPupdate(new MTPDupdateChannelPinnedMessage(_channel_id, _id)); } inline static MTPupdate new_updateBotCallbackQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPPeer &_peer, MTPint _msg_id, const MTPlong &_chat_instance, const MTPbytes &_data, const MTPstring &_game_short_name) { return MTPupdate(new MTPDupdateBotCallbackQuery(_flags, _query_id, _user_id, _peer, _msg_id, _chat_instance, _data, _game_short_name)); } inline static MTPupdate new_updateEditMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateEditMessage(_message, _pts, _pts_count)); } inline static MTPupdate new_updateInlineBotCallbackQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPInputBotInlineMessageID &_msg_id, const MTPlong &_chat_instance, const MTPbytes &_data, const MTPstring &_game_short_name) { return MTPupdate(new MTPDupdateInlineBotCallbackQuery(_flags, _query_id, _user_id, _msg_id, _chat_instance, _data, _game_short_name)); } inline static MTPupdate new_updateReadChannelOutbox(MTPint _channel_id, MTPint _max_id) { return MTPupdate(new MTPDupdateReadChannelOutbox(_channel_id, _max_id)); } inline static MTPupdate new_updateDraftMessage(const MTPPeer &_peer, const MTPDraftMessage &_draft) { return MTPupdate(new MTPDupdateDraftMessage(_peer, _draft)); } inline static MTPupdate new_updateReadFeaturedStickers() { return MTPupdate(mtpc_updateReadFeaturedStickers); } inline static MTPupdate new_updateRecentStickers() { return MTPupdate(mtpc_updateRecentStickers); } inline static MTPupdate new_updateConfig() { return MTPupdate(mtpc_updateConfig); } inline static MTPupdate new_updatePtsChanged() { return MTPupdate(mtpc_updatePtsChanged); } inline static MTPupdate new_updateChannelWebPage(MTPint _channel_id, const MTPWebPage &_webpage, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateChannelWebPage(_channel_id, _webpage, _pts, _pts_count)); } inline static MTPupdate new_updatePhoneCall(const MTPPhoneCall &_phone_call) { return MTPupdate(new MTPDupdatePhoneCall(_phone_call)); } inline static MTPupdate new_updateDialogPinned(const MTPflags &_flags, const MTPPeer &_peer) { return MTPupdate(new MTPDupdateDialogPinned(_flags, _peer)); } inline static MTPupdate new_updatePinnedDialogs(const MTPflags &_flags, const MTPVector &_order) { return MTPupdate(new MTPDupdatePinnedDialogs(_flags, _order)); } inline static MTPupdates_state new_updates_state(MTPint _pts, MTPint _qts, MTPint _date, MTPint _seq, MTPint _unread_count) { return MTPupdates_state(new MTPDupdates_state(_pts, _qts, _date, _seq, _unread_count)); } inline static MTPupdates_difference new_updates_differenceEmpty(MTPint _date, MTPint _seq) { return MTPupdates_difference(new MTPDupdates_differenceEmpty(_date, _seq)); } inline static MTPupdates_difference new_updates_difference(const MTPVector &_new_messages, const MTPVector &_new_encrypted_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_state) { return MTPupdates_difference(new MTPDupdates_difference(_new_messages, _new_encrypted_messages, _other_updates, _chats, _users, _state)); } inline static MTPupdates_difference new_updates_differenceSlice(const MTPVector &_new_messages, const MTPVector &_new_encrypted_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_intermediate_state) { return MTPupdates_difference(new MTPDupdates_differenceSlice(_new_messages, _new_encrypted_messages, _other_updates, _chats, _users, _intermediate_state)); } inline static MTPupdates_difference new_updates_differenceTooLong(MTPint _pts) { return MTPupdates_difference(new MTPDupdates_differenceTooLong(_pts)); } inline static MTPupdates new_updatesTooLong() { return MTPupdates(mtpc_updatesTooLong); } inline static MTPupdates new_updateShortMessage(const MTPflags &_flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { return MTPupdates(new MTPDupdateShortMessage(_flags, _id, _user_id, _message, _pts, _pts_count, _date, _fwd_from, _via_bot_id, _reply_to_msg_id, _entities)); } inline static MTPupdates new_updateShortChatMessage(const MTPflags &_flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { return MTPupdates(new MTPDupdateShortChatMessage(_flags, _id, _from_id, _chat_id, _message, _pts, _pts_count, _date, _fwd_from, _via_bot_id, _reply_to_msg_id, _entities)); } inline static MTPupdates new_updateShort(const MTPUpdate &_update, MTPint _date) { return MTPupdates(new MTPDupdateShort(_update, _date)); } inline static MTPupdates new_updatesCombined(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq_start, MTPint _seq) { return MTPupdates(new MTPDupdatesCombined(_updates, _users, _chats, _date, _seq_start, _seq)); } inline static MTPupdates new_updates(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq) { return MTPupdates(new MTPDupdates(_updates, _users, _chats, _date, _seq)); } inline static MTPupdates new_updateShortSentMessage(const MTPflags &_flags, MTPint _id, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageMedia &_media, const MTPVector &_entities) { return MTPupdates(new MTPDupdateShortSentMessage(_flags, _id, _pts, _pts_count, _date, _media, _entities)); } inline static MTPphotos_photos new_photos_photos(const MTPVector &_photos, const MTPVector &_users) { return MTPphotos_photos(new MTPDphotos_photos(_photos, _users)); } inline static MTPphotos_photos new_photos_photosSlice(MTPint _count, const MTPVector &_photos, const MTPVector &_users) { return MTPphotos_photos(new MTPDphotos_photosSlice(_count, _photos, _users)); } inline static MTPphotos_photo new_photos_photo(const MTPPhoto &_photo, const MTPVector &_users) { return MTPphotos_photo(new MTPDphotos_photo(_photo, _users)); } inline static MTPupload_file new_upload_file(const MTPstorage_FileType &_type, MTPint _mtime, const MTPbytes &_bytes) { return MTPupload_file(new MTPDupload_file(_type, _mtime, _bytes)); } inline static MTPdcOption new_dcOption(const MTPflags &_flags, MTPint _id, const MTPstring &_ip_address, MTPint _port) { return MTPdcOption(new MTPDdcOption(_flags, _id, _ip_address, _port)); } inline static MTPconfig new_config(const MTPflags &_flags, MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, MTPint _edit_time_limit, MTPint _rating_e_decay, MTPint _stickers_recent_limit, MTPint _tmp_sessions, MTPint _pinned_dialogs_count_max, MTPint _call_receive_timeout_ms, MTPint _call_ring_timeout_ms, MTPint _call_connect_timeout_ms, MTPint _call_packet_timeout_ms, const MTPVector &_disabled_features) { return MTPconfig(new MTPDconfig(_flags, _date, _expires, _test_mode, _this_dc, _dc_options, _chat_size_max, _megagroup_size_max, _forwarded_count_max, _online_update_period_ms, _offline_blur_timeout_ms, _offline_idle_timeout_ms, _online_cloud_timeout_ms, _notify_cloud_delay_ms, _notify_default_delay_ms, _chat_big_size, _push_chat_period_ms, _push_chat_limit, _saved_gifs_limit, _edit_time_limit, _rating_e_decay, _stickers_recent_limit, _tmp_sessions, _pinned_dialogs_count_max, _call_receive_timeout_ms, _call_ring_timeout_ms, _call_connect_timeout_ms, _call_packet_timeout_ms, _disabled_features)); } inline static MTPnearestDc new_nearestDc(const MTPstring &_country, MTPint _this_dc, MTPint _nearest_dc) { return MTPnearestDc(new MTPDnearestDc(_country, _this_dc, _nearest_dc)); } inline static MTPhelp_appUpdate new_help_appUpdate(MTPint _id, MTPBool _critical, const MTPstring &_url, const MTPstring &_text) { return MTPhelp_appUpdate(new MTPDhelp_appUpdate(_id, _critical, _url, _text)); } inline static MTPhelp_appUpdate new_help_noAppUpdate() { return MTPhelp_appUpdate(mtpc_help_noAppUpdate); } inline static MTPhelp_inviteText new_help_inviteText(const MTPstring &_message) { return MTPhelp_inviteText(new MTPDhelp_inviteText(_message)); } inline static MTPencryptedChat new_encryptedChatEmpty(MTPint _id) { return MTPencryptedChat(new MTPDencryptedChatEmpty(_id)); } inline static MTPencryptedChat new_encryptedChatWaiting(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id) { return MTPencryptedChat(new MTPDencryptedChatWaiting(_id, _access_hash, _date, _admin_id, _participant_id)); } inline static MTPencryptedChat new_encryptedChatRequested(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a) { return MTPencryptedChat(new MTPDencryptedChatRequested(_id, _access_hash, _date, _admin_id, _participant_id, _g_a)); } inline static MTPencryptedChat new_encryptedChat(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a_or_b, const MTPlong &_key_fingerprint) { return MTPencryptedChat(new MTPDencryptedChat(_id, _access_hash, _date, _admin_id, _participant_id, _g_a_or_b, _key_fingerprint)); } inline static MTPencryptedChat new_encryptedChatDiscarded(MTPint _id) { return MTPencryptedChat(new MTPDencryptedChatDiscarded(_id)); } inline static MTPinputEncryptedChat new_inputEncryptedChat(MTPint _chat_id, const MTPlong &_access_hash) { return MTPinputEncryptedChat(new MTPDinputEncryptedChat(_chat_id, _access_hash)); } inline static MTPencryptedFile new_encryptedFileEmpty() { return MTPencryptedFile(mtpc_encryptedFileEmpty); } inline static MTPencryptedFile new_encryptedFile(const MTPlong &_id, const MTPlong &_access_hash, MTPint _size, MTPint _dc_id, MTPint _key_fingerprint) { return MTPencryptedFile(new MTPDencryptedFile(_id, _access_hash, _size, _dc_id, _key_fingerprint)); } inline static MTPinputEncryptedFile new_inputEncryptedFileEmpty() { return MTPinputEncryptedFile(mtpc_inputEncryptedFileEmpty); } inline static MTPinputEncryptedFile new_inputEncryptedFileUploaded(const MTPlong &_id, MTPint _parts, const MTPstring &_md5_checksum, MTPint _key_fingerprint) { return MTPinputEncryptedFile(new MTPDinputEncryptedFileUploaded(_id, _parts, _md5_checksum, _key_fingerprint)); } inline static MTPinputEncryptedFile new_inputEncryptedFile(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputEncryptedFile(new MTPDinputEncryptedFile(_id, _access_hash)); } inline static MTPinputEncryptedFile new_inputEncryptedFileBigUploaded(const MTPlong &_id, MTPint _parts, MTPint _key_fingerprint) { return MTPinputEncryptedFile(new MTPDinputEncryptedFileBigUploaded(_id, _parts, _key_fingerprint)); } inline static MTPencryptedMessage new_encryptedMessage(const MTPlong &_random_id, MTPint _chat_id, MTPint _date, const MTPbytes &_bytes, const MTPEncryptedFile &_file) { return MTPencryptedMessage(new MTPDencryptedMessage(_random_id, _chat_id, _date, _bytes, _file)); } inline static MTPencryptedMessage new_encryptedMessageService(const MTPlong &_random_id, MTPint _chat_id, MTPint _date, const MTPbytes &_bytes) { return MTPencryptedMessage(new MTPDencryptedMessageService(_random_id, _chat_id, _date, _bytes)); } inline static MTPmessages_dhConfig new_messages_dhConfigNotModified(const MTPbytes &_random) { return MTPmessages_dhConfig(new MTPDmessages_dhConfigNotModified(_random)); } inline static MTPmessages_dhConfig new_messages_dhConfig(MTPint _g, const MTPbytes &_p, MTPint _version, const MTPbytes &_random) { return MTPmessages_dhConfig(new MTPDmessages_dhConfig(_g, _p, _version, _random)); } inline static MTPmessages_sentEncryptedMessage new_messages_sentEncryptedMessage(MTPint _date) { return MTPmessages_sentEncryptedMessage(new MTPDmessages_sentEncryptedMessage(_date)); } inline static MTPmessages_sentEncryptedMessage new_messages_sentEncryptedFile(MTPint _date, const MTPEncryptedFile &_file) { return MTPmessages_sentEncryptedMessage(new MTPDmessages_sentEncryptedFile(_date, _file)); } inline static MTPinputDocument new_inputDocumentEmpty() { return MTPinputDocument(mtpc_inputDocumentEmpty); } inline static MTPinputDocument new_inputDocument(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputDocument(new MTPDinputDocument(_id, _access_hash)); } inline static MTPdocument new_documentEmpty(const MTPlong &_id) { return MTPdocument(new MTPDdocumentEmpty(_id)); } inline static MTPdocument new_document(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPstring &_mime_type, MTPint _size, const MTPPhotoSize &_thumb, MTPint _dc_id, MTPint _version, const MTPVector &_attributes) { return MTPdocument(new MTPDdocument(_id, _access_hash, _date, _mime_type, _size, _thumb, _dc_id, _version, _attributes)); } inline static MTPhelp_support new_help_support(const MTPstring &_phone_number, const MTPUser &_user) { return MTPhelp_support(new MTPDhelp_support(_phone_number, _user)); } inline static MTPnotifyPeer new_notifyPeer(const MTPPeer &_peer) { return MTPnotifyPeer(new MTPDnotifyPeer(_peer)); } inline static MTPnotifyPeer new_notifyUsers() { return MTPnotifyPeer(mtpc_notifyUsers); } inline static MTPnotifyPeer new_notifyChats() { return MTPnotifyPeer(mtpc_notifyChats); } inline static MTPnotifyPeer new_notifyAll() { return MTPnotifyPeer(mtpc_notifyAll); } inline static MTPsendMessageAction new_sendMessageTypingAction() { return MTPsendMessageAction(mtpc_sendMessageTypingAction); } inline static MTPsendMessageAction new_sendMessageCancelAction() { return MTPsendMessageAction(mtpc_sendMessageCancelAction); } inline static MTPsendMessageAction new_sendMessageRecordVideoAction() { return MTPsendMessageAction(mtpc_sendMessageRecordVideoAction); } inline static MTPsendMessageAction new_sendMessageUploadVideoAction(MTPint _progress) { return MTPsendMessageAction(new MTPDsendMessageUploadVideoAction(_progress)); } inline static MTPsendMessageAction new_sendMessageRecordAudioAction() { return MTPsendMessageAction(mtpc_sendMessageRecordAudioAction); } inline static MTPsendMessageAction new_sendMessageUploadAudioAction(MTPint _progress) { return MTPsendMessageAction(new MTPDsendMessageUploadAudioAction(_progress)); } inline static MTPsendMessageAction new_sendMessageUploadPhotoAction(MTPint _progress) { return MTPsendMessageAction(new MTPDsendMessageUploadPhotoAction(_progress)); } inline static MTPsendMessageAction new_sendMessageUploadDocumentAction(MTPint _progress) { return MTPsendMessageAction(new MTPDsendMessageUploadDocumentAction(_progress)); } inline static MTPsendMessageAction new_sendMessageGeoLocationAction() { return MTPsendMessageAction(mtpc_sendMessageGeoLocationAction); } inline static MTPsendMessageAction new_sendMessageChooseContactAction() { return MTPsendMessageAction(mtpc_sendMessageChooseContactAction); } inline static MTPsendMessageAction new_sendMessageGamePlayAction() { return MTPsendMessageAction(mtpc_sendMessageGamePlayAction); } inline static MTPcontacts_found new_contacts_found(const MTPVector &_results, const MTPVector &_chats, const MTPVector &_users) { return MTPcontacts_found(new MTPDcontacts_found(_results, _chats, _users)); } inline static MTPinputPrivacyKey new_inputPrivacyKeyStatusTimestamp() { return MTPinputPrivacyKey(mtpc_inputPrivacyKeyStatusTimestamp); } inline static MTPinputPrivacyKey new_inputPrivacyKeyChatInvite() { return MTPinputPrivacyKey(mtpc_inputPrivacyKeyChatInvite); } inline static MTPinputPrivacyKey new_inputPrivacyKeyPhoneCall() { return MTPinputPrivacyKey(mtpc_inputPrivacyKeyPhoneCall); } inline static MTPprivacyKey new_privacyKeyStatusTimestamp() { return MTPprivacyKey(mtpc_privacyKeyStatusTimestamp); } inline static MTPprivacyKey new_privacyKeyChatInvite() { return MTPprivacyKey(mtpc_privacyKeyChatInvite); } inline static MTPprivacyKey new_privacyKeyPhoneCall() { return MTPprivacyKey(mtpc_privacyKeyPhoneCall); } inline static MTPinputPrivacyRule new_inputPrivacyValueAllowContacts() { return MTPinputPrivacyRule(mtpc_inputPrivacyValueAllowContacts); } inline static MTPinputPrivacyRule new_inputPrivacyValueAllowAll() { return MTPinputPrivacyRule(mtpc_inputPrivacyValueAllowAll); } inline static MTPinputPrivacyRule new_inputPrivacyValueAllowUsers(const MTPVector &_users) { return MTPinputPrivacyRule(new MTPDinputPrivacyValueAllowUsers(_users)); } inline static MTPinputPrivacyRule new_inputPrivacyValueDisallowContacts() { return MTPinputPrivacyRule(mtpc_inputPrivacyValueDisallowContacts); } inline static MTPinputPrivacyRule new_inputPrivacyValueDisallowAll() { return MTPinputPrivacyRule(mtpc_inputPrivacyValueDisallowAll); } inline static MTPinputPrivacyRule new_inputPrivacyValueDisallowUsers(const MTPVector &_users) { return MTPinputPrivacyRule(new MTPDinputPrivacyValueDisallowUsers(_users)); } inline static MTPprivacyRule new_privacyValueAllowContacts() { return MTPprivacyRule(mtpc_privacyValueAllowContacts); } inline static MTPprivacyRule new_privacyValueAllowAll() { return MTPprivacyRule(mtpc_privacyValueAllowAll); } inline static MTPprivacyRule new_privacyValueAllowUsers(const MTPVector &_users) { return MTPprivacyRule(new MTPDprivacyValueAllowUsers(_users)); } inline static MTPprivacyRule new_privacyValueDisallowContacts() { return MTPprivacyRule(mtpc_privacyValueDisallowContacts); } inline static MTPprivacyRule new_privacyValueDisallowAll() { return MTPprivacyRule(mtpc_privacyValueDisallowAll); } inline static MTPprivacyRule new_privacyValueDisallowUsers(const MTPVector &_users) { return MTPprivacyRule(new MTPDprivacyValueDisallowUsers(_users)); } inline static MTPaccount_privacyRules new_account_privacyRules(const MTPVector &_rules, const MTPVector &_users) { return MTPaccount_privacyRules(new MTPDaccount_privacyRules(_rules, _users)); } inline static MTPaccountDaysTTL new_accountDaysTTL(MTPint _days) { return MTPaccountDaysTTL(new MTPDaccountDaysTTL(_days)); } inline static MTPdocumentAttribute new_documentAttributeImageSize(MTPint _w, MTPint _h) { return MTPdocumentAttribute(new MTPDdocumentAttributeImageSize(_w, _h)); } inline static MTPdocumentAttribute new_documentAttributeAnimated() { return MTPdocumentAttribute(mtpc_documentAttributeAnimated); } inline static MTPdocumentAttribute new_documentAttributeSticker(const MTPflags &_flags, const MTPstring &_alt, const MTPInputStickerSet &_stickerset, const MTPMaskCoords &_mask_coords) { return MTPdocumentAttribute(new MTPDdocumentAttributeSticker(_flags, _alt, _stickerset, _mask_coords)); } inline static MTPdocumentAttribute new_documentAttributeVideo(MTPint _duration, MTPint _w, MTPint _h) { return MTPdocumentAttribute(new MTPDdocumentAttributeVideo(_duration, _w, _h)); } inline static MTPdocumentAttribute new_documentAttributeAudio(const MTPflags &_flags, MTPint _duration, const MTPstring &_title, const MTPstring &_performer, const MTPbytes &_waveform) { return MTPdocumentAttribute(new MTPDdocumentAttributeAudio(_flags, _duration, _title, _performer, _waveform)); } inline static MTPdocumentAttribute new_documentAttributeFilename(const MTPstring &_file_name) { return MTPdocumentAttribute(new MTPDdocumentAttributeFilename(_file_name)); } inline static MTPdocumentAttribute new_documentAttributeHasStickers() { return MTPdocumentAttribute(mtpc_documentAttributeHasStickers); } inline static MTPmessages_stickers new_messages_stickersNotModified() { return MTPmessages_stickers(mtpc_messages_stickersNotModified); } inline static MTPmessages_stickers new_messages_stickers(const MTPstring &_hash, const MTPVector &_stickers) { return MTPmessages_stickers(new MTPDmessages_stickers(_hash, _stickers)); } inline static MTPstickerPack new_stickerPack(const MTPstring &_emoticon, const MTPVector &_documents) { return MTPstickerPack(new MTPDstickerPack(_emoticon, _documents)); } inline static MTPmessages_allStickers new_messages_allStickersNotModified() { return MTPmessages_allStickers(mtpc_messages_allStickersNotModified); } inline static MTPmessages_allStickers new_messages_allStickers(MTPint _hash, const MTPVector &_sets) { return MTPmessages_allStickers(new MTPDmessages_allStickers(_hash, _sets)); } inline static MTPdisabledFeature new_disabledFeature(const MTPstring &_feature, const MTPstring &_description) { return MTPdisabledFeature(new MTPDdisabledFeature(_feature, _description)); } inline static MTPmessages_affectedMessages new_messages_affectedMessages(MTPint _pts, MTPint _pts_count) { return MTPmessages_affectedMessages(new MTPDmessages_affectedMessages(_pts, _pts_count)); } inline static MTPcontactLink new_contactLinkUnknown() { return MTPcontactLink(mtpc_contactLinkUnknown); } inline static MTPcontactLink new_contactLinkNone() { return MTPcontactLink(mtpc_contactLinkNone); } inline static MTPcontactLink new_contactLinkHasPhone() { return MTPcontactLink(mtpc_contactLinkHasPhone); } inline static MTPcontactLink new_contactLinkContact() { return MTPcontactLink(mtpc_contactLinkContact); } inline static MTPwebPage new_webPageEmpty(const MTPlong &_id) { return MTPwebPage(new MTPDwebPageEmpty(_id)); } inline static MTPwebPage new_webPagePending(const MTPlong &_id, MTPint _date) { return MTPwebPage(new MTPDwebPagePending(_id, _date)); } inline static MTPwebPage new_webPage(const MTPflags &_flags, const MTPlong &_id, const MTPstring &_url, const MTPstring &_display_url, MTPint _hash, const MTPstring &_type, const MTPstring &_site_name, const MTPstring &_title, const MTPstring &_description, const MTPPhoto &_photo, const MTPstring &_embed_url, const MTPstring &_embed_type, MTPint _embed_width, MTPint _embed_height, MTPint _duration, const MTPstring &_author, const MTPDocument &_document, const MTPPage &_cached_page) { return MTPwebPage(new MTPDwebPage(_flags, _id, _url, _display_url, _hash, _type, _site_name, _title, _description, _photo, _embed_url, _embed_type, _embed_width, _embed_height, _duration, _author, _document, _cached_page)); } inline static MTPwebPage new_webPageNotModified() { return MTPwebPage(mtpc_webPageNotModified); } inline static MTPauthorization new_authorization(const MTPlong &_hash, MTPint _flags, const MTPstring &_device_model, const MTPstring &_platform, const MTPstring &_system_version, MTPint _api_id, const MTPstring &_app_name, const MTPstring &_app_version, MTPint _date_created, MTPint _date_active, const MTPstring &_ip, const MTPstring &_country, const MTPstring &_region) { return MTPauthorization(new MTPDauthorization(_hash, _flags, _device_model, _platform, _system_version, _api_id, _app_name, _app_version, _date_created, _date_active, _ip, _country, _region)); } inline static MTPaccount_authorizations new_account_authorizations(const MTPVector &_authorizations) { return MTPaccount_authorizations(new MTPDaccount_authorizations(_authorizations)); } inline static MTPaccount_password new_account_noPassword(const MTPbytes &_new_salt, const MTPstring &_email_unconfirmed_pattern) { return MTPaccount_password(new MTPDaccount_noPassword(_new_salt, _email_unconfirmed_pattern)); } inline static MTPaccount_password new_account_password(const MTPbytes &_current_salt, const MTPbytes &_new_salt, const MTPstring &_hint, MTPBool _has_recovery, const MTPstring &_email_unconfirmed_pattern) { return MTPaccount_password(new MTPDaccount_password(_current_salt, _new_salt, _hint, _has_recovery, _email_unconfirmed_pattern)); } inline static MTPaccount_passwordSettings new_account_passwordSettings(const MTPstring &_email) { return MTPaccount_passwordSettings(new MTPDaccount_passwordSettings(_email)); } inline static MTPaccount_passwordInputSettings new_account_passwordInputSettings(const MTPflags &_flags, const MTPbytes &_new_salt, const MTPbytes &_new_password_hash, const MTPstring &_hint, const MTPstring &_email) { return MTPaccount_passwordInputSettings(new MTPDaccount_passwordInputSettings(_flags, _new_salt, _new_password_hash, _hint, _email)); } inline static MTPauth_passwordRecovery new_auth_passwordRecovery(const MTPstring &_email_pattern) { return MTPauth_passwordRecovery(new MTPDauth_passwordRecovery(_email_pattern)); } inline static MTPreceivedNotifyMessage new_receivedNotifyMessage(MTPint _id, MTPint _flags) { return MTPreceivedNotifyMessage(new MTPDreceivedNotifyMessage(_id, _flags)); } inline static MTPexportedChatInvite new_chatInviteEmpty() { return MTPexportedChatInvite(mtpc_chatInviteEmpty); } inline static MTPexportedChatInvite new_chatInviteExported(const MTPstring &_link) { return MTPexportedChatInvite(new MTPDchatInviteExported(_link)); } inline static MTPchatInvite new_chatInviteAlready(const MTPChat &_chat) { return MTPchatInvite(new MTPDchatInviteAlready(_chat)); } inline static MTPchatInvite new_chatInvite(const MTPflags &_flags, const MTPstring &_title, const MTPChatPhoto &_photo, MTPint _participants_count, const MTPVector &_participants) { return MTPchatInvite(new MTPDchatInvite(_flags, _title, _photo, _participants_count, _participants)); } inline static MTPinputStickerSet new_inputStickerSetEmpty() { return MTPinputStickerSet(mtpc_inputStickerSetEmpty); } inline static MTPinputStickerSet new_inputStickerSetID(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputStickerSet(new MTPDinputStickerSetID(_id, _access_hash)); } inline static MTPinputStickerSet new_inputStickerSetShortName(const MTPstring &_short_name) { return MTPinputStickerSet(new MTPDinputStickerSetShortName(_short_name)); } inline static MTPstickerSet new_stickerSet(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, const MTPstring &_title, const MTPstring &_short_name, MTPint _count, MTPint _hash) { return MTPstickerSet(new MTPDstickerSet(_flags, _id, _access_hash, _title, _short_name, _count, _hash)); } inline static MTPmessages_stickerSet new_messages_stickerSet(const MTPStickerSet &_set, const MTPVector &_packs, const MTPVector &_documents) { return MTPmessages_stickerSet(new MTPDmessages_stickerSet(_set, _packs, _documents)); } inline static MTPbotCommand new_botCommand(const MTPstring &_command, const MTPstring &_description) { return MTPbotCommand(new MTPDbotCommand(_command, _description)); } inline static MTPbotInfo new_botInfo(MTPint _user_id, const MTPstring &_description, const MTPVector &_commands) { return MTPbotInfo(new MTPDbotInfo(_user_id, _description, _commands)); } inline static MTPkeyboardButton new_keyboardButton(const MTPstring &_text) { return MTPkeyboardButton(new MTPDkeyboardButton(_text)); } inline static MTPkeyboardButton new_keyboardButtonUrl(const MTPstring &_text, const MTPstring &_url) { return MTPkeyboardButton(new MTPDkeyboardButtonUrl(_text, _url)); } inline static MTPkeyboardButton new_keyboardButtonCallback(const MTPstring &_text, const MTPbytes &_data) { return MTPkeyboardButton(new MTPDkeyboardButtonCallback(_text, _data)); } inline static MTPkeyboardButton new_keyboardButtonRequestPhone(const MTPstring &_text) { return MTPkeyboardButton(new MTPDkeyboardButtonRequestPhone(_text)); } inline static MTPkeyboardButton new_keyboardButtonRequestGeoLocation(const MTPstring &_text) { return MTPkeyboardButton(new MTPDkeyboardButtonRequestGeoLocation(_text)); } inline static MTPkeyboardButton new_keyboardButtonSwitchInline(const MTPflags &_flags, const MTPstring &_text, const MTPstring &_query) { return MTPkeyboardButton(new MTPDkeyboardButtonSwitchInline(_flags, _text, _query)); } inline static MTPkeyboardButton new_keyboardButtonGame(const MTPstring &_text) { return MTPkeyboardButton(new MTPDkeyboardButtonGame(_text)); } inline static MTPkeyboardButtonRow new_keyboardButtonRow(const MTPVector &_buttons) { return MTPkeyboardButtonRow(new MTPDkeyboardButtonRow(_buttons)); } inline static MTPreplyMarkup new_replyKeyboardHide(const MTPflags &_flags) { return MTPreplyMarkup(new MTPDreplyKeyboardHide(_flags)); } inline static MTPreplyMarkup new_replyKeyboardForceReply(const MTPflags &_flags) { return MTPreplyMarkup(new MTPDreplyKeyboardForceReply(_flags)); } inline static MTPreplyMarkup new_replyKeyboardMarkup(const MTPflags &_flags, const MTPVector &_rows) { return MTPreplyMarkup(new MTPDreplyKeyboardMarkup(_flags, _rows)); } inline static MTPreplyMarkup new_replyInlineMarkup(const MTPVector &_rows) { return MTPreplyMarkup(new MTPDreplyInlineMarkup(_rows)); } inline static MTPhelp_appChangelog new_help_appChangelogEmpty() { return MTPhelp_appChangelog(mtpc_help_appChangelogEmpty); } inline static MTPhelp_appChangelog new_help_appChangelog(const MTPstring &_message, const MTPMessageMedia &_media, const MTPVector &_entities) { return MTPhelp_appChangelog(new MTPDhelp_appChangelog(_message, _media, _entities)); } inline static MTPmessageEntity new_messageEntityUnknown(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityUnknown(_offset, _length)); } inline static MTPmessageEntity new_messageEntityMention(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityMention(_offset, _length)); } inline static MTPmessageEntity new_messageEntityHashtag(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityHashtag(_offset, _length)); } inline static MTPmessageEntity new_messageEntityBotCommand(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityBotCommand(_offset, _length)); } inline static MTPmessageEntity new_messageEntityUrl(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityUrl(_offset, _length)); } inline static MTPmessageEntity new_messageEntityEmail(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityEmail(_offset, _length)); } inline static MTPmessageEntity new_messageEntityBold(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityBold(_offset, _length)); } inline static MTPmessageEntity new_messageEntityItalic(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityItalic(_offset, _length)); } inline static MTPmessageEntity new_messageEntityCode(MTPint _offset, MTPint _length) { return MTPmessageEntity(new MTPDmessageEntityCode(_offset, _length)); } inline static MTPmessageEntity new_messageEntityPre(MTPint _offset, MTPint _length, const MTPstring &_language) { return MTPmessageEntity(new MTPDmessageEntityPre(_offset, _length, _language)); } inline static MTPmessageEntity new_messageEntityTextUrl(MTPint _offset, MTPint _length, const MTPstring &_url) { return MTPmessageEntity(new MTPDmessageEntityTextUrl(_offset, _length, _url)); } inline static MTPmessageEntity new_messageEntityMentionName(MTPint _offset, MTPint _length, MTPint _user_id) { return MTPmessageEntity(new MTPDmessageEntityMentionName(_offset, _length, _user_id)); } inline static MTPmessageEntity new_inputMessageEntityMentionName(MTPint _offset, MTPint _length, const MTPInputUser &_user_id) { return MTPmessageEntity(new MTPDinputMessageEntityMentionName(_offset, _length, _user_id)); } inline static MTPinputChannel new_inputChannelEmpty() { return MTPinputChannel(mtpc_inputChannelEmpty); } inline static MTPinputChannel new_inputChannel(MTPint _channel_id, const MTPlong &_access_hash) { return MTPinputChannel(new MTPDinputChannel(_channel_id, _access_hash)); } inline static MTPcontacts_resolvedPeer new_contacts_resolvedPeer(const MTPPeer &_peer, const MTPVector &_chats, const MTPVector &_users) { return MTPcontacts_resolvedPeer(new MTPDcontacts_resolvedPeer(_peer, _chats, _users)); } inline static MTPmessageRange new_messageRange(MTPint _min_id, MTPint _max_id) { return MTPmessageRange(new MTPDmessageRange(_min_id, _max_id)); } inline static MTPupdates_channelDifference new_updates_channelDifferenceEmpty(const MTPflags &_flags, MTPint _pts, MTPint _timeout) { return MTPupdates_channelDifference(new MTPDupdates_channelDifferenceEmpty(_flags, _pts, _timeout)); } inline static MTPupdates_channelDifference new_updates_channelDifferenceTooLong(const MTPflags &_flags, MTPint _pts, MTPint _timeout, MTPint _top_message, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTPupdates_channelDifference(new MTPDupdates_channelDifferenceTooLong(_flags, _pts, _timeout, _top_message, _read_inbox_max_id, _read_outbox_max_id, _unread_count, _messages, _chats, _users)); } inline static MTPupdates_channelDifference new_updates_channelDifference(const MTPflags &_flags, MTPint _pts, MTPint _timeout, const MTPVector &_new_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users) { return MTPupdates_channelDifference(new MTPDupdates_channelDifference(_flags, _pts, _timeout, _new_messages, _other_updates, _chats, _users)); } inline static MTPchannelMessagesFilter new_channelMessagesFilterEmpty() { return MTPchannelMessagesFilter(mtpc_channelMessagesFilterEmpty); } inline static MTPchannelMessagesFilter new_channelMessagesFilter(const MTPflags &_flags, const MTPVector &_ranges) { return MTPchannelMessagesFilter(new MTPDchannelMessagesFilter(_flags, _ranges)); } inline static MTPchannelParticipant new_channelParticipant(MTPint _user_id, MTPint _date) { return MTPchannelParticipant(new MTPDchannelParticipant(_user_id, _date)); } inline static MTPchannelParticipant new_channelParticipantSelf(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTPchannelParticipant(new MTPDchannelParticipantSelf(_user_id, _inviter_id, _date)); } inline static MTPchannelParticipant new_channelParticipantModerator(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTPchannelParticipant(new MTPDchannelParticipantModerator(_user_id, _inviter_id, _date)); } inline static MTPchannelParticipant new_channelParticipantEditor(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTPchannelParticipant(new MTPDchannelParticipantEditor(_user_id, _inviter_id, _date)); } inline static MTPchannelParticipant new_channelParticipantKicked(MTPint _user_id, MTPint _kicked_by, MTPint _date) { return MTPchannelParticipant(new MTPDchannelParticipantKicked(_user_id, _kicked_by, _date)); } inline static MTPchannelParticipant new_channelParticipantCreator(MTPint _user_id) { return MTPchannelParticipant(new MTPDchannelParticipantCreator(_user_id)); } inline static MTPchannelParticipantsFilter new_channelParticipantsRecent() { return MTPchannelParticipantsFilter(mtpc_channelParticipantsRecent); } inline static MTPchannelParticipantsFilter new_channelParticipantsAdmins() { return MTPchannelParticipantsFilter(mtpc_channelParticipantsAdmins); } inline static MTPchannelParticipantsFilter new_channelParticipantsKicked() { return MTPchannelParticipantsFilter(mtpc_channelParticipantsKicked); } inline static MTPchannelParticipantsFilter new_channelParticipantsBots() { return MTPchannelParticipantsFilter(mtpc_channelParticipantsBots); } inline static MTPchannelParticipantRole new_channelRoleEmpty() { return MTPchannelParticipantRole(mtpc_channelRoleEmpty); } inline static MTPchannelParticipantRole new_channelRoleModerator() { return MTPchannelParticipantRole(mtpc_channelRoleModerator); } inline static MTPchannelParticipantRole new_channelRoleEditor() { return MTPchannelParticipantRole(mtpc_channelRoleEditor); } inline static MTPchannels_channelParticipants new_channels_channelParticipants(MTPint _count, const MTPVector &_participants, const MTPVector &_users) { return MTPchannels_channelParticipants(new MTPDchannels_channelParticipants(_count, _participants, _users)); } inline static MTPchannels_channelParticipant new_channels_channelParticipant(const MTPChannelParticipant &_participant, const MTPVector &_users) { return MTPchannels_channelParticipant(new MTPDchannels_channelParticipant(_participant, _users)); } inline static MTPhelp_termsOfService new_help_termsOfService(const MTPstring &_text) { return MTPhelp_termsOfService(new MTPDhelp_termsOfService(_text)); } inline static MTPfoundGif new_foundGif(const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h) { return MTPfoundGif(new MTPDfoundGif(_url, _thumb_url, _content_url, _content_type, _w, _h)); } inline static MTPfoundGif new_foundGifCached(const MTPstring &_url, const MTPPhoto &_photo, const MTPDocument &_document) { return MTPfoundGif(new MTPDfoundGifCached(_url, _photo, _document)); } inline static MTPmessages_foundGifs new_messages_foundGifs(MTPint _next_offset, const MTPVector &_results) { return MTPmessages_foundGifs(new MTPDmessages_foundGifs(_next_offset, _results)); } inline static MTPmessages_savedGifs new_messages_savedGifsNotModified() { return MTPmessages_savedGifs(mtpc_messages_savedGifsNotModified); } inline static MTPmessages_savedGifs new_messages_savedGifs(MTPint _hash, const MTPVector &_gifs) { return MTPmessages_savedGifs(new MTPDmessages_savedGifs(_hash, _gifs)); } inline static MTPinputBotInlineMessage new_inputBotInlineMessageMediaAuto(const MTPflags &_flags, const MTPstring &_caption, const MTPReplyMarkup &_reply_markup) { return MTPinputBotInlineMessage(new MTPDinputBotInlineMessageMediaAuto(_flags, _caption, _reply_markup)); } inline static MTPinputBotInlineMessage new_inputBotInlineMessageText(const MTPflags &_flags, const MTPstring &_message, const MTPVector &_entities, const MTPReplyMarkup &_reply_markup) { return MTPinputBotInlineMessage(new MTPDinputBotInlineMessageText(_flags, _message, _entities, _reply_markup)); } inline static MTPinputBotInlineMessage new_inputBotInlineMessageMediaGeo(const MTPflags &_flags, const MTPInputGeoPoint &_geo_point, const MTPReplyMarkup &_reply_markup) { return MTPinputBotInlineMessage(new MTPDinputBotInlineMessageMediaGeo(_flags, _geo_point, _reply_markup)); } inline static MTPinputBotInlineMessage new_inputBotInlineMessageMediaVenue(const MTPflags &_flags, const MTPInputGeoPoint &_geo_point, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id, const MTPReplyMarkup &_reply_markup) { return MTPinputBotInlineMessage(new MTPDinputBotInlineMessageMediaVenue(_flags, _geo_point, _title, _address, _provider, _venue_id, _reply_markup)); } inline static MTPinputBotInlineMessage new_inputBotInlineMessageMediaContact(const MTPflags &_flags, const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, const MTPReplyMarkup &_reply_markup) { return MTPinputBotInlineMessage(new MTPDinputBotInlineMessageMediaContact(_flags, _phone_number, _first_name, _last_name, _reply_markup)); } inline static MTPinputBotInlineMessage new_inputBotInlineMessageGame(const MTPflags &_flags, const MTPReplyMarkup &_reply_markup) { return MTPinputBotInlineMessage(new MTPDinputBotInlineMessageGame(_flags, _reply_markup)); } inline static MTPinputBotInlineResult new_inputBotInlineResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h, MTPint _duration, const MTPInputBotInlineMessage &_send_message) { return MTPinputBotInlineResult(new MTPDinputBotInlineResult(_flags, _id, _type, _title, _description, _url, _thumb_url, _content_url, _content_type, _w, _h, _duration, _send_message)); } inline static MTPinputBotInlineResult new_inputBotInlineResultPhoto(const MTPstring &_id, const MTPstring &_type, const MTPInputPhoto &_photo, const MTPInputBotInlineMessage &_send_message) { return MTPinputBotInlineResult(new MTPDinputBotInlineResultPhoto(_id, _type, _photo, _send_message)); } inline static MTPinputBotInlineResult new_inputBotInlineResultDocument(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPInputDocument &_document, const MTPInputBotInlineMessage &_send_message) { return MTPinputBotInlineResult(new MTPDinputBotInlineResultDocument(_flags, _id, _type, _title, _description, _document, _send_message)); } inline static MTPinputBotInlineResult new_inputBotInlineResultGame(const MTPstring &_id, const MTPstring &_short_name, const MTPInputBotInlineMessage &_send_message) { return MTPinputBotInlineResult(new MTPDinputBotInlineResultGame(_id, _short_name, _send_message)); } inline static MTPbotInlineMessage new_botInlineMessageMediaAuto(const MTPflags &_flags, const MTPstring &_caption, const MTPReplyMarkup &_reply_markup) { return MTPbotInlineMessage(new MTPDbotInlineMessageMediaAuto(_flags, _caption, _reply_markup)); } inline static MTPbotInlineMessage new_botInlineMessageText(const MTPflags &_flags, const MTPstring &_message, const MTPVector &_entities, const MTPReplyMarkup &_reply_markup) { return MTPbotInlineMessage(new MTPDbotInlineMessageText(_flags, _message, _entities, _reply_markup)); } inline static MTPbotInlineMessage new_botInlineMessageMediaGeo(const MTPflags &_flags, const MTPGeoPoint &_geo, const MTPReplyMarkup &_reply_markup) { return MTPbotInlineMessage(new MTPDbotInlineMessageMediaGeo(_flags, _geo, _reply_markup)); } inline static MTPbotInlineMessage new_botInlineMessageMediaVenue(const MTPflags &_flags, const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id, const MTPReplyMarkup &_reply_markup) { return MTPbotInlineMessage(new MTPDbotInlineMessageMediaVenue(_flags, _geo, _title, _address, _provider, _venue_id, _reply_markup)); } inline static MTPbotInlineMessage new_botInlineMessageMediaContact(const MTPflags &_flags, const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, const MTPReplyMarkup &_reply_markup) { return MTPbotInlineMessage(new MTPDbotInlineMessageMediaContact(_flags, _phone_number, _first_name, _last_name, _reply_markup)); } inline static MTPbotInlineResult new_botInlineResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h, MTPint _duration, const MTPBotInlineMessage &_send_message) { return MTPbotInlineResult(new MTPDbotInlineResult(_flags, _id, _type, _title, _description, _url, _thumb_url, _content_url, _content_type, _w, _h, _duration, _send_message)); } inline static MTPbotInlineResult new_botInlineMediaResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPPhoto &_photo, const MTPDocument &_document, const MTPstring &_title, const MTPstring &_description, const MTPBotInlineMessage &_send_message) { return MTPbotInlineResult(new MTPDbotInlineMediaResult(_flags, _id, _type, _photo, _document, _title, _description, _send_message)); } inline static MTPmessages_botResults new_messages_botResults(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_next_offset, const MTPInlineBotSwitchPM &_switch_pm, const MTPVector &_results, MTPint _cache_time) { return MTPmessages_botResults(new MTPDmessages_botResults(_flags, _query_id, _next_offset, _switch_pm, _results, _cache_time)); } inline static MTPexportedMessageLink new_exportedMessageLink(const MTPstring &_link) { return MTPexportedMessageLink(new MTPDexportedMessageLink(_link)); } inline static MTPmessageFwdHeader new_messageFwdHeader(const MTPflags &_flags, MTPint _from_id, MTPint _date, MTPint _channel_id, MTPint _channel_post) { return MTPmessageFwdHeader(new MTPDmessageFwdHeader(_flags, _from_id, _date, _channel_id, _channel_post)); } inline static MTPauth_codeType new_auth_codeTypeSms() { return MTPauth_codeType(mtpc_auth_codeTypeSms); } inline static MTPauth_codeType new_auth_codeTypeCall() { return MTPauth_codeType(mtpc_auth_codeTypeCall); } inline static MTPauth_codeType new_auth_codeTypeFlashCall() { return MTPauth_codeType(mtpc_auth_codeTypeFlashCall); } inline static MTPauth_sentCodeType new_auth_sentCodeTypeApp(MTPint _length) { return MTPauth_sentCodeType(new MTPDauth_sentCodeTypeApp(_length)); } inline static MTPauth_sentCodeType new_auth_sentCodeTypeSms(MTPint _length) { return MTPauth_sentCodeType(new MTPDauth_sentCodeTypeSms(_length)); } inline static MTPauth_sentCodeType new_auth_sentCodeTypeCall(MTPint _length) { return MTPauth_sentCodeType(new MTPDauth_sentCodeTypeCall(_length)); } inline static MTPauth_sentCodeType new_auth_sentCodeTypeFlashCall(const MTPstring &_pattern) { return MTPauth_sentCodeType(new MTPDauth_sentCodeTypeFlashCall(_pattern)); } inline static MTPmessages_botCallbackAnswer new_messages_botCallbackAnswer(const MTPflags &_flags, const MTPstring &_message, const MTPstring &_url, MTPint _cache_time) { return MTPmessages_botCallbackAnswer(new MTPDmessages_botCallbackAnswer(_flags, _message, _url, _cache_time)); } inline static MTPmessages_messageEditData new_messages_messageEditData(const MTPflags &_flags) { return MTPmessages_messageEditData(new MTPDmessages_messageEditData(_flags)); } inline static MTPinputBotInlineMessageID new_inputBotInlineMessageID(MTPint _dc_id, const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputBotInlineMessageID(new MTPDinputBotInlineMessageID(_dc_id, _id, _access_hash)); } inline static MTPinlineBotSwitchPM new_inlineBotSwitchPM(const MTPstring &_text, const MTPstring &_start_param) { return MTPinlineBotSwitchPM(new MTPDinlineBotSwitchPM(_text, _start_param)); } inline static MTPmessages_peerDialogs new_messages_peerDialogs(const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_state) { return MTPmessages_peerDialogs(new MTPDmessages_peerDialogs(_dialogs, _messages, _chats, _users, _state)); } inline static MTPtopPeer new_topPeer(const MTPPeer &_peer, const MTPdouble &_rating) { return MTPtopPeer(new MTPDtopPeer(_peer, _rating)); } inline static MTPtopPeerCategory new_topPeerCategoryBotsPM() { return MTPtopPeerCategory(mtpc_topPeerCategoryBotsPM); } inline static MTPtopPeerCategory new_topPeerCategoryBotsInline() { return MTPtopPeerCategory(mtpc_topPeerCategoryBotsInline); } inline static MTPtopPeerCategory new_topPeerCategoryCorrespondents() { return MTPtopPeerCategory(mtpc_topPeerCategoryCorrespondents); } inline static MTPtopPeerCategory new_topPeerCategoryGroups() { return MTPtopPeerCategory(mtpc_topPeerCategoryGroups); } inline static MTPtopPeerCategory new_topPeerCategoryChannels() { return MTPtopPeerCategory(mtpc_topPeerCategoryChannels); } inline static MTPtopPeerCategoryPeers new_topPeerCategoryPeers(const MTPTopPeerCategory &_category, MTPint _count, const MTPVector &_peers) { return MTPtopPeerCategoryPeers(new MTPDtopPeerCategoryPeers(_category, _count, _peers)); } inline static MTPcontacts_topPeers new_contacts_topPeersNotModified() { return MTPcontacts_topPeers(mtpc_contacts_topPeersNotModified); } inline static MTPcontacts_topPeers new_contacts_topPeers(const MTPVector &_categories, const MTPVector &_chats, const MTPVector &_users) { return MTPcontacts_topPeers(new MTPDcontacts_topPeers(_categories, _chats, _users)); } inline static MTPdraftMessage new_draftMessageEmpty() { return MTPdraftMessage(mtpc_draftMessageEmpty); } inline static MTPdraftMessage new_draftMessage(const MTPflags &_flags, MTPint _reply_to_msg_id, const MTPstring &_message, const MTPVector &_entities, MTPint _date) { return MTPdraftMessage(new MTPDdraftMessage(_flags, _reply_to_msg_id, _message, _entities, _date)); } inline static MTPmessages_featuredStickers new_messages_featuredStickersNotModified() { return MTPmessages_featuredStickers(mtpc_messages_featuredStickersNotModified); } inline static MTPmessages_featuredStickers new_messages_featuredStickers(MTPint _hash, const MTPVector &_sets, const MTPVector &_unread) { return MTPmessages_featuredStickers(new MTPDmessages_featuredStickers(_hash, _sets, _unread)); } inline static MTPmessages_recentStickers new_messages_recentStickersNotModified() { return MTPmessages_recentStickers(mtpc_messages_recentStickersNotModified); } inline static MTPmessages_recentStickers new_messages_recentStickers(MTPint _hash, const MTPVector &_stickers) { return MTPmessages_recentStickers(new MTPDmessages_recentStickers(_hash, _stickers)); } inline static MTPmessages_archivedStickers new_messages_archivedStickers(MTPint _count, const MTPVector &_sets) { return MTPmessages_archivedStickers(new MTPDmessages_archivedStickers(_count, _sets)); } inline static MTPmessages_stickerSetInstallResult new_messages_stickerSetInstallResultSuccess() { return MTPmessages_stickerSetInstallResult(mtpc_messages_stickerSetInstallResultSuccess); } inline static MTPmessages_stickerSetInstallResult new_messages_stickerSetInstallResultArchive(const MTPVector &_sets) { return MTPmessages_stickerSetInstallResult(new MTPDmessages_stickerSetInstallResultArchive(_sets)); } inline static MTPstickerSetCovered new_stickerSetCovered(const MTPStickerSet &_set, const MTPDocument &_cover) { return MTPstickerSetCovered(new MTPDstickerSetCovered(_set, _cover)); } inline static MTPstickerSetCovered new_stickerSetMultiCovered(const MTPStickerSet &_set, const MTPVector &_covers) { return MTPstickerSetCovered(new MTPDstickerSetMultiCovered(_set, _covers)); } inline static MTPmaskCoords new_maskCoords(MTPint _n, const MTPdouble &_x, const MTPdouble &_y, const MTPdouble &_zoom) { return MTPmaskCoords(new MTPDmaskCoords(_n, _x, _y, _zoom)); } inline static MTPinputStickeredMedia new_inputStickeredMediaPhoto(const MTPInputPhoto &_id) { return MTPinputStickeredMedia(new MTPDinputStickeredMediaPhoto(_id)); } inline static MTPinputStickeredMedia new_inputStickeredMediaDocument(const MTPInputDocument &_id) { return MTPinputStickeredMedia(new MTPDinputStickeredMediaDocument(_id)); } inline static MTPgame new_game(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, const MTPstring &_short_name, const MTPstring &_title, const MTPstring &_description, const MTPPhoto &_photo, const MTPDocument &_document) { return MTPgame(new MTPDgame(_flags, _id, _access_hash, _short_name, _title, _description, _photo, _document)); } inline static MTPinputGame new_inputGameID(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputGame(new MTPDinputGameID(_id, _access_hash)); } inline static MTPinputGame new_inputGameShortName(const MTPInputUser &_bot_id, const MTPstring &_short_name) { return MTPinputGame(new MTPDinputGameShortName(_bot_id, _short_name)); } inline static MTPhighScore new_highScore(MTPint _pos, MTPint _user_id, MTPint _score) { return MTPhighScore(new MTPDhighScore(_pos, _user_id, _score)); } inline static MTPmessages_highScores new_messages_highScores(const MTPVector &_scores, const MTPVector &_users) { return MTPmessages_highScores(new MTPDmessages_highScores(_scores, _users)); } inline static MTPrichText new_textEmpty() { return MTPrichText(mtpc_textEmpty); } inline static MTPrichText new_textPlain(const MTPstring &_text) { return MTPrichText(new MTPDtextPlain(_text)); } inline static MTPrichText new_textBold(const MTPRichText &_text) { return MTPrichText(new MTPDtextBold(_text)); } inline static MTPrichText new_textItalic(const MTPRichText &_text) { return MTPrichText(new MTPDtextItalic(_text)); } inline static MTPrichText new_textUnderline(const MTPRichText &_text) { return MTPrichText(new MTPDtextUnderline(_text)); } inline static MTPrichText new_textStrike(const MTPRichText &_text) { return MTPrichText(new MTPDtextStrike(_text)); } inline static MTPrichText new_textFixed(const MTPRichText &_text) { return MTPrichText(new MTPDtextFixed(_text)); } inline static MTPrichText new_textUrl(const MTPRichText &_text, const MTPstring &_url, const MTPlong &_webpage_id) { return MTPrichText(new MTPDtextUrl(_text, _url, _webpage_id)); } inline static MTPrichText new_textEmail(const MTPRichText &_text, const MTPstring &_email) { return MTPrichText(new MTPDtextEmail(_text, _email)); } inline static MTPrichText new_textConcat(const MTPVector &_texts) { return MTPrichText(new MTPDtextConcat(_texts)); } inline static MTPpageBlock new_pageBlockUnsupported() { return MTPpageBlock(mtpc_pageBlockUnsupported); } inline static MTPpageBlock new_pageBlockTitle(const MTPRichText &_text) { return MTPpageBlock(new MTPDpageBlockTitle(_text)); } inline static MTPpageBlock new_pageBlockSubtitle(const MTPRichText &_text) { return MTPpageBlock(new MTPDpageBlockSubtitle(_text)); } inline static MTPpageBlock new_pageBlockAuthorDate(const MTPRichText &_author, MTPint _published_date) { return MTPpageBlock(new MTPDpageBlockAuthorDate(_author, _published_date)); } inline static MTPpageBlock new_pageBlockHeader(const MTPRichText &_text) { return MTPpageBlock(new MTPDpageBlockHeader(_text)); } inline static MTPpageBlock new_pageBlockSubheader(const MTPRichText &_text) { return MTPpageBlock(new MTPDpageBlockSubheader(_text)); } inline static MTPpageBlock new_pageBlockParagraph(const MTPRichText &_text) { return MTPpageBlock(new MTPDpageBlockParagraph(_text)); } inline static MTPpageBlock new_pageBlockPreformatted(const MTPRichText &_text, const MTPstring &_language) { return MTPpageBlock(new MTPDpageBlockPreformatted(_text, _language)); } inline static MTPpageBlock new_pageBlockFooter(const MTPRichText &_text) { return MTPpageBlock(new MTPDpageBlockFooter(_text)); } inline static MTPpageBlock new_pageBlockDivider() { return MTPpageBlock(mtpc_pageBlockDivider); } inline static MTPpageBlock new_pageBlockAnchor(const MTPstring &_name) { return MTPpageBlock(new MTPDpageBlockAnchor(_name)); } inline static MTPpageBlock new_pageBlockList(MTPBool _ordered, const MTPVector &_items) { return MTPpageBlock(new MTPDpageBlockList(_ordered, _items)); } inline static MTPpageBlock new_pageBlockBlockquote(const MTPRichText &_text, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockBlockquote(_text, _caption)); } inline static MTPpageBlock new_pageBlockPullquote(const MTPRichText &_text, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockPullquote(_text, _caption)); } inline static MTPpageBlock new_pageBlockPhoto(const MTPlong &_photo_id, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockPhoto(_photo_id, _caption)); } inline static MTPpageBlock new_pageBlockVideo(const MTPflags &_flags, const MTPlong &_video_id, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockVideo(_flags, _video_id, _caption)); } inline static MTPpageBlock new_pageBlockCover(const MTPPageBlock &_cover) { return MTPpageBlock(new MTPDpageBlockCover(_cover)); } inline static MTPpageBlock new_pageBlockEmbed(const MTPflags &_flags, const MTPstring &_url, const MTPstring &_html, const MTPlong &_poster_photo_id, MTPint _w, MTPint _h, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockEmbed(_flags, _url, _html, _poster_photo_id, _w, _h, _caption)); } inline static MTPpageBlock new_pageBlockEmbedPost(const MTPstring &_url, const MTPlong &_webpage_id, const MTPlong &_author_photo_id, const MTPstring &_author, MTPint _date, const MTPVector &_blocks, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockEmbedPost(_url, _webpage_id, _author_photo_id, _author, _date, _blocks, _caption)); } inline static MTPpageBlock new_pageBlockCollage(const MTPVector &_items, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockCollage(_items, _caption)); } inline static MTPpageBlock new_pageBlockSlideshow(const MTPVector &_items, const MTPRichText &_caption) { return MTPpageBlock(new MTPDpageBlockSlideshow(_items, _caption)); } inline static MTPpage new_pagePart(const MTPVector &_blocks, const MTPVector &_photos, const MTPVector &_videos) { return MTPpage(new MTPDpagePart(_blocks, _photos, _videos)); } inline static MTPpage new_pageFull(const MTPVector &_blocks, const MTPVector &_photos, const MTPVector &_videos) { return MTPpage(new MTPDpageFull(_blocks, _photos, _videos)); } inline static MTPinputPhoneCall new_inputPhoneCall(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputPhoneCall(new MTPDinputPhoneCall(_id, _access_hash)); } inline static MTPphoneCall new_phoneCallEmpty(const MTPlong &_id) { return MTPphoneCall(new MTPDphoneCallEmpty(_id)); } inline static MTPphoneCall new_phoneCallWaiting(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPPhoneCallProtocol &_protocol, MTPint _receive_date) { return MTPphoneCall(new MTPDphoneCallWaiting(_flags, _id, _access_hash, _date, _admin_id, _participant_id, _protocol, _receive_date)); } inline static MTPphoneCall new_phoneCallRequested(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a, const MTPPhoneCallProtocol &_protocol) { return MTPphoneCall(new MTPDphoneCallRequested(_id, _access_hash, _date, _admin_id, _participant_id, _g_a, _protocol)); } inline static MTPphoneCall new_phoneCall(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a_or_b, const MTPlong &_key_fingerprint, const MTPPhoneCallProtocol &_protocol, const MTPPhoneConnection &_connection, const MTPVector &_alternative_connections, MTPint _start_date) { return MTPphoneCall(new MTPDphoneCall(_id, _access_hash, _date, _admin_id, _participant_id, _g_a_or_b, _key_fingerprint, _protocol, _connection, _alternative_connections, _start_date)); } inline static MTPphoneCall new_phoneCallDiscarded(const MTPflags &_flags, const MTPlong &_id, const MTPPhoneCallDiscardReason &_reason, MTPint _duration) { return MTPphoneCall(new MTPDphoneCallDiscarded(_flags, _id, _reason, _duration)); } inline static MTPphoneConnection new_phoneConnection(const MTPlong &_id, const MTPstring &_ip, const MTPstring &_ipv6, MTPint _port, const MTPbytes &_peer_tag) { return MTPphoneConnection(new MTPDphoneConnection(_id, _ip, _ipv6, _port, _peer_tag)); } inline static MTPphoneCallProtocol new_phoneCallProtocol(const MTPflags &_flags, MTPint _min_layer, MTPint _max_layer) { return MTPphoneCallProtocol(new MTPDphoneCallProtocol(_flags, _min_layer, _max_layer)); } inline static MTPphone_phoneCall new_phone_phoneCall(const MTPPhoneCall &_phone_call, const MTPVector &_users) { return MTPphone_phoneCall(new MTPDphone_phoneCall(_phone_call, _users)); } inline static MTPphoneCallDiscardReason new_phoneCallDiscardReasonMissed() { return MTPphoneCallDiscardReason(mtpc_phoneCallDiscardReasonMissed); } inline static MTPphoneCallDiscardReason new_phoneCallDiscardReasonDisconnect() { return MTPphoneCallDiscardReason(mtpc_phoneCallDiscardReasonDisconnect); } inline static MTPphoneCallDiscardReason new_phoneCallDiscardReasonHangup() { return MTPphoneCallDiscardReason(mtpc_phoneCallDiscardReasonHangup); } inline static MTPphoneCallDiscardReason new_phoneCallDiscardReasonBusy() { return MTPphoneCallDiscardReason(mtpc_phoneCallDiscardReasonBusy); } }; } // namespace internal } // namespace MTP // Inline methods definition inline MTPresPQ::MTPresPQ() : TypeDataOwner(new MTPDresPQ()) { } inline uint32 MTPresPQ::innerLength() const { const MTPDresPQ &v(c_resPQ()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vpq.innerLength() + v.vserver_public_key_fingerprints.innerLength(); } inline mtpTypeId MTPresPQ::type() const { return mtpc_resPQ; } inline void MTPresPQ::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_resPQ) throw mtpErrorUnexpected(cons, "MTPresPQ"); auto v = new MTPDresPQ(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vpq.read(from, end); v->vserver_public_key_fingerprints.read(from, end); } inline void MTPresPQ::write(mtpBuffer &to) const { auto &v = c_resPQ(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vpq.write(to); v.vserver_public_key_fingerprints.write(to); } inline const MTPDresPQ &MTPresPQ::c_resPQ() const { return queryData(); } inline MTPresPQ::MTPresPQ(const MTPDresPQ *data) : TypeDataOwner(data) { } inline MTPresPQ MTP_resPQ(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_pq, const MTPVector &_server_public_key_fingerprints) { return MTP::internal::TypeCreator::new_resPQ(_nonce, _server_nonce, _pq, _server_public_key_fingerprints); } inline MTPp_Q_inner_data::MTPp_Q_inner_data() : TypeDataOwner(new MTPDp_q_inner_data()) { } inline uint32 MTPp_Q_inner_data::innerLength() const { const MTPDp_q_inner_data &v(c_p_q_inner_data()); return v.vpq.innerLength() + v.vp.innerLength() + v.vq.innerLength() + v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vnew_nonce.innerLength(); } inline mtpTypeId MTPp_Q_inner_data::type() const { return mtpc_p_q_inner_data; } inline void MTPp_Q_inner_data::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_p_q_inner_data) throw mtpErrorUnexpected(cons, "MTPp_Q_inner_data"); auto v = new MTPDp_q_inner_data(); setData(v); v->vpq.read(from, end); v->vp.read(from, end); v->vq.read(from, end); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vnew_nonce.read(from, end); } inline void MTPp_Q_inner_data::write(mtpBuffer &to) const { auto &v = c_p_q_inner_data(); v.vpq.write(to); v.vp.write(to); v.vq.write(to); v.vnonce.write(to); v.vserver_nonce.write(to); v.vnew_nonce.write(to); } inline const MTPDp_q_inner_data &MTPp_Q_inner_data::c_p_q_inner_data() const { return queryData(); } inline MTPp_Q_inner_data::MTPp_Q_inner_data(const MTPDp_q_inner_data *data) : TypeDataOwner(data) { } inline MTPp_Q_inner_data MTP_p_q_inner_data(const MTPstring &_pq, const MTPstring &_p, const MTPstring &_q, const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint256 &_new_nonce) { return MTP::internal::TypeCreator::new_p_q_inner_data(_pq, _p, _q, _nonce, _server_nonce, _new_nonce); } inline uint32 MTPserver_DH_Params::innerLength() const { switch (_type) { case mtpc_server_DH_params_fail: { const MTPDserver_DH_params_fail &v(c_server_DH_params_fail()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vnew_nonce_hash.innerLength(); } case mtpc_server_DH_params_ok: { const MTPDserver_DH_params_ok &v(c_server_DH_params_ok()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vencrypted_answer.innerLength(); } } return 0; } inline mtpTypeId MTPserver_DH_Params::type() const { t_assert(_type != 0); return _type; } inline void MTPserver_DH_Params::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_server_DH_params_fail: _type = cons; { auto v = new MTPDserver_DH_params_fail(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vnew_nonce_hash.read(from, end); } break; case mtpc_server_DH_params_ok: _type = cons; { auto v = new MTPDserver_DH_params_ok(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vencrypted_answer.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPserver_DH_Params"); } } inline void MTPserver_DH_Params::write(mtpBuffer &to) const { switch (_type) { case mtpc_server_DH_params_fail: { auto &v = c_server_DH_params_fail(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vnew_nonce_hash.write(to); } break; case mtpc_server_DH_params_ok: { auto &v = c_server_DH_params_ok(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vencrypted_answer.write(to); } break; } } inline MTPserver_DH_Params::MTPserver_DH_Params(mtpTypeId type) : _type(type) { switch (type) { case mtpc_server_DH_params_fail: setData(new MTPDserver_DH_params_fail()); break; case mtpc_server_DH_params_ok: setData(new MTPDserver_DH_params_ok()); break; default: throw mtpErrorBadTypeId(type, "MTPserver_DH_Params"); } } inline const MTPDserver_DH_params_fail &MTPserver_DH_Params::c_server_DH_params_fail() const { t_assert(_type == mtpc_server_DH_params_fail); return queryData(); } inline MTPserver_DH_Params::MTPserver_DH_Params(const MTPDserver_DH_params_fail *data) : TypeDataOwner(data), _type(mtpc_server_DH_params_fail) { } inline const MTPDserver_DH_params_ok &MTPserver_DH_Params::c_server_DH_params_ok() const { t_assert(_type == mtpc_server_DH_params_ok); return queryData(); } inline MTPserver_DH_Params::MTPserver_DH_Params(const MTPDserver_DH_params_ok *data) : TypeDataOwner(data), _type(mtpc_server_DH_params_ok) { } inline MTPserver_DH_Params MTP_server_DH_params_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash) { return MTP::internal::TypeCreator::new_server_DH_params_fail(_nonce, _server_nonce, _new_nonce_hash); } inline MTPserver_DH_Params MTP_server_DH_params_ok(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPstring &_encrypted_answer) { return MTP::internal::TypeCreator::new_server_DH_params_ok(_nonce, _server_nonce, _encrypted_answer); } inline MTPserver_DH_inner_data::MTPserver_DH_inner_data() : TypeDataOwner(new MTPDserver_DH_inner_data()) { } inline uint32 MTPserver_DH_inner_data::innerLength() const { const MTPDserver_DH_inner_data &v(c_server_DH_inner_data()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vg.innerLength() + v.vdh_prime.innerLength() + v.vg_a.innerLength() + v.vserver_time.innerLength(); } inline mtpTypeId MTPserver_DH_inner_data::type() const { return mtpc_server_DH_inner_data; } inline void MTPserver_DH_inner_data::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_server_DH_inner_data) throw mtpErrorUnexpected(cons, "MTPserver_DH_inner_data"); auto v = new MTPDserver_DH_inner_data(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vg.read(from, end); v->vdh_prime.read(from, end); v->vg_a.read(from, end); v->vserver_time.read(from, end); } inline void MTPserver_DH_inner_data::write(mtpBuffer &to) const { auto &v = c_server_DH_inner_data(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vg.write(to); v.vdh_prime.write(to); v.vg_a.write(to); v.vserver_time.write(to); } inline const MTPDserver_DH_inner_data &MTPserver_DH_inner_data::c_server_DH_inner_data() const { return queryData(); } inline MTPserver_DH_inner_data::MTPserver_DH_inner_data(const MTPDserver_DH_inner_data *data) : TypeDataOwner(data) { } inline MTPserver_DH_inner_data MTP_server_DH_inner_data(const MTPint128 &_nonce, const MTPint128 &_server_nonce, MTPint _g, const MTPstring &_dh_prime, const MTPstring &_g_a, MTPint _server_time) { return MTP::internal::TypeCreator::new_server_DH_inner_data(_nonce, _server_nonce, _g, _dh_prime, _g_a, _server_time); } inline MTPclient_DH_Inner_Data::MTPclient_DH_Inner_Data() : TypeDataOwner(new MTPDclient_DH_inner_data()) { } inline uint32 MTPclient_DH_Inner_Data::innerLength() const { const MTPDclient_DH_inner_data &v(c_client_DH_inner_data()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vretry_id.innerLength() + v.vg_b.innerLength(); } inline mtpTypeId MTPclient_DH_Inner_Data::type() const { return mtpc_client_DH_inner_data; } inline void MTPclient_DH_Inner_Data::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_client_DH_inner_data) throw mtpErrorUnexpected(cons, "MTPclient_DH_Inner_Data"); auto v = new MTPDclient_DH_inner_data(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vretry_id.read(from, end); v->vg_b.read(from, end); } inline void MTPclient_DH_Inner_Data::write(mtpBuffer &to) const { auto &v = c_client_DH_inner_data(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vretry_id.write(to); v.vg_b.write(to); } inline const MTPDclient_DH_inner_data &MTPclient_DH_Inner_Data::c_client_DH_inner_data() const { return queryData(); } inline MTPclient_DH_Inner_Data::MTPclient_DH_Inner_Data(const MTPDclient_DH_inner_data *data) : TypeDataOwner(data) { } inline MTPclient_DH_Inner_Data MTP_client_DH_inner_data(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPlong &_retry_id, const MTPstring &_g_b) { return MTP::internal::TypeCreator::new_client_DH_inner_data(_nonce, _server_nonce, _retry_id, _g_b); } inline uint32 MTPset_client_DH_params_answer::innerLength() const { switch (_type) { case mtpc_dh_gen_ok: { const MTPDdh_gen_ok &v(c_dh_gen_ok()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vnew_nonce_hash1.innerLength(); } case mtpc_dh_gen_retry: { const MTPDdh_gen_retry &v(c_dh_gen_retry()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vnew_nonce_hash2.innerLength(); } case mtpc_dh_gen_fail: { const MTPDdh_gen_fail &v(c_dh_gen_fail()); return v.vnonce.innerLength() + v.vserver_nonce.innerLength() + v.vnew_nonce_hash3.innerLength(); } } return 0; } inline mtpTypeId MTPset_client_DH_params_answer::type() const { t_assert(_type != 0); return _type; } inline void MTPset_client_DH_params_answer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_dh_gen_ok: _type = cons; { auto v = new MTPDdh_gen_ok(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vnew_nonce_hash1.read(from, end); } break; case mtpc_dh_gen_retry: _type = cons; { auto v = new MTPDdh_gen_retry(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vnew_nonce_hash2.read(from, end); } break; case mtpc_dh_gen_fail: _type = cons; { auto v = new MTPDdh_gen_fail(); setData(v); v->vnonce.read(from, end); v->vserver_nonce.read(from, end); v->vnew_nonce_hash3.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPset_client_DH_params_answer"); } } inline void MTPset_client_DH_params_answer::write(mtpBuffer &to) const { switch (_type) { case mtpc_dh_gen_ok: { auto &v = c_dh_gen_ok(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vnew_nonce_hash1.write(to); } break; case mtpc_dh_gen_retry: { auto &v = c_dh_gen_retry(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vnew_nonce_hash2.write(to); } break; case mtpc_dh_gen_fail: { auto &v = c_dh_gen_fail(); v.vnonce.write(to); v.vserver_nonce.write(to); v.vnew_nonce_hash3.write(to); } break; } } inline MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(mtpTypeId type) : _type(type) { switch (type) { case mtpc_dh_gen_ok: setData(new MTPDdh_gen_ok()); break; case mtpc_dh_gen_retry: setData(new MTPDdh_gen_retry()); break; case mtpc_dh_gen_fail: setData(new MTPDdh_gen_fail()); break; default: throw mtpErrorBadTypeId(type, "MTPset_client_DH_params_answer"); } } inline const MTPDdh_gen_ok &MTPset_client_DH_params_answer::c_dh_gen_ok() const { t_assert(_type == mtpc_dh_gen_ok); return queryData(); } inline MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(const MTPDdh_gen_ok *data) : TypeDataOwner(data), _type(mtpc_dh_gen_ok) { } inline const MTPDdh_gen_retry &MTPset_client_DH_params_answer::c_dh_gen_retry() const { t_assert(_type == mtpc_dh_gen_retry); return queryData(); } inline MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(const MTPDdh_gen_retry *data) : TypeDataOwner(data), _type(mtpc_dh_gen_retry) { } inline const MTPDdh_gen_fail &MTPset_client_DH_params_answer::c_dh_gen_fail() const { t_assert(_type == mtpc_dh_gen_fail); return queryData(); } inline MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(const MTPDdh_gen_fail *data) : TypeDataOwner(data), _type(mtpc_dh_gen_fail) { } inline MTPset_client_DH_params_answer MTP_dh_gen_ok(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash1) { return MTP::internal::TypeCreator::new_dh_gen_ok(_nonce, _server_nonce, _new_nonce_hash1); } inline MTPset_client_DH_params_answer MTP_dh_gen_retry(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash2) { return MTP::internal::TypeCreator::new_dh_gen_retry(_nonce, _server_nonce, _new_nonce_hash2); } inline MTPset_client_DH_params_answer MTP_dh_gen_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash3) { return MTP::internal::TypeCreator::new_dh_gen_fail(_nonce, _server_nonce, _new_nonce_hash3); } inline uint32 MTPdestroyAuthKeyRes::innerLength() const { return 0; } inline mtpTypeId MTPdestroyAuthKeyRes::type() const { t_assert(_type != 0); return _type; } inline void MTPdestroyAuthKeyRes::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_destroy_auth_key_ok: _type = cons; break; case mtpc_destroy_auth_key_none: _type = cons; break; case mtpc_destroy_auth_key_fail: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPdestroyAuthKeyRes"); } } inline void MTPdestroyAuthKeyRes::write(mtpBuffer &to) const { } inline MTPdestroyAuthKeyRes::MTPdestroyAuthKeyRes(mtpTypeId type) : _type(type) { switch (type) { case mtpc_destroy_auth_key_ok: break; case mtpc_destroy_auth_key_none: break; case mtpc_destroy_auth_key_fail: break; default: throw mtpErrorBadTypeId(type, "MTPdestroyAuthKeyRes"); } } inline MTPdestroyAuthKeyRes MTP_destroy_auth_key_ok() { return MTP::internal::TypeCreator::new_destroy_auth_key_ok(); } inline MTPdestroyAuthKeyRes MTP_destroy_auth_key_none() { return MTP::internal::TypeCreator::new_destroy_auth_key_none(); } inline MTPdestroyAuthKeyRes MTP_destroy_auth_key_fail() { return MTP::internal::TypeCreator::new_destroy_auth_key_fail(); } inline MTPmsgsAck::MTPmsgsAck() : TypeDataOwner(new MTPDmsgs_ack()) { } inline uint32 MTPmsgsAck::innerLength() const { const MTPDmsgs_ack &v(c_msgs_ack()); return v.vmsg_ids.innerLength(); } inline mtpTypeId MTPmsgsAck::type() const { return mtpc_msgs_ack; } inline void MTPmsgsAck::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_msgs_ack) throw mtpErrorUnexpected(cons, "MTPmsgsAck"); auto v = new MTPDmsgs_ack(); setData(v); v->vmsg_ids.read(from, end); } inline void MTPmsgsAck::write(mtpBuffer &to) const { auto &v = c_msgs_ack(); v.vmsg_ids.write(to); } inline const MTPDmsgs_ack &MTPmsgsAck::c_msgs_ack() const { return queryData(); } inline MTPmsgsAck::MTPmsgsAck(const MTPDmsgs_ack *data) : TypeDataOwner(data) { } inline MTPmsgsAck MTP_msgs_ack(const MTPVector &_msg_ids) { return MTP::internal::TypeCreator::new_msgs_ack(_msg_ids); } inline uint32 MTPbadMsgNotification::innerLength() const { switch (_type) { case mtpc_bad_msg_notification: { const MTPDbad_msg_notification &v(c_bad_msg_notification()); return v.vbad_msg_id.innerLength() + v.vbad_msg_seqno.innerLength() + v.verror_code.innerLength(); } case mtpc_bad_server_salt: { const MTPDbad_server_salt &v(c_bad_server_salt()); return v.vbad_msg_id.innerLength() + v.vbad_msg_seqno.innerLength() + v.verror_code.innerLength() + v.vnew_server_salt.innerLength(); } } return 0; } inline mtpTypeId MTPbadMsgNotification::type() const { t_assert(_type != 0); return _type; } inline void MTPbadMsgNotification::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_bad_msg_notification: _type = cons; { auto v = new MTPDbad_msg_notification(); setData(v); v->vbad_msg_id.read(from, end); v->vbad_msg_seqno.read(from, end); v->verror_code.read(from, end); } break; case mtpc_bad_server_salt: _type = cons; { auto v = new MTPDbad_server_salt(); setData(v); v->vbad_msg_id.read(from, end); v->vbad_msg_seqno.read(from, end); v->verror_code.read(from, end); v->vnew_server_salt.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPbadMsgNotification"); } } inline void MTPbadMsgNotification::write(mtpBuffer &to) const { switch (_type) { case mtpc_bad_msg_notification: { auto &v = c_bad_msg_notification(); v.vbad_msg_id.write(to); v.vbad_msg_seqno.write(to); v.verror_code.write(to); } break; case mtpc_bad_server_salt: { auto &v = c_bad_server_salt(); v.vbad_msg_id.write(to); v.vbad_msg_seqno.write(to); v.verror_code.write(to); v.vnew_server_salt.write(to); } break; } } inline MTPbadMsgNotification::MTPbadMsgNotification(mtpTypeId type) : _type(type) { switch (type) { case mtpc_bad_msg_notification: setData(new MTPDbad_msg_notification()); break; case mtpc_bad_server_salt: setData(new MTPDbad_server_salt()); break; default: throw mtpErrorBadTypeId(type, "MTPbadMsgNotification"); } } inline const MTPDbad_msg_notification &MTPbadMsgNotification::c_bad_msg_notification() const { t_assert(_type == mtpc_bad_msg_notification); return queryData(); } inline MTPbadMsgNotification::MTPbadMsgNotification(const MTPDbad_msg_notification *data) : TypeDataOwner(data), _type(mtpc_bad_msg_notification) { } inline const MTPDbad_server_salt &MTPbadMsgNotification::c_bad_server_salt() const { t_assert(_type == mtpc_bad_server_salt); return queryData(); } inline MTPbadMsgNotification::MTPbadMsgNotification(const MTPDbad_server_salt *data) : TypeDataOwner(data), _type(mtpc_bad_server_salt) { } inline MTPbadMsgNotification MTP_bad_msg_notification(const MTPlong &_bad_msg_id, MTPint _bad_msg_seqno, MTPint _error_code) { return MTP::internal::TypeCreator::new_bad_msg_notification(_bad_msg_id, _bad_msg_seqno, _error_code); } inline MTPbadMsgNotification MTP_bad_server_salt(const MTPlong &_bad_msg_id, MTPint _bad_msg_seqno, MTPint _error_code, const MTPlong &_new_server_salt) { return MTP::internal::TypeCreator::new_bad_server_salt(_bad_msg_id, _bad_msg_seqno, _error_code, _new_server_salt); } inline MTPmsgsStateReq::MTPmsgsStateReq() : TypeDataOwner(new MTPDmsgs_state_req()) { } inline uint32 MTPmsgsStateReq::innerLength() const { const MTPDmsgs_state_req &v(c_msgs_state_req()); return v.vmsg_ids.innerLength(); } inline mtpTypeId MTPmsgsStateReq::type() const { return mtpc_msgs_state_req; } inline void MTPmsgsStateReq::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_msgs_state_req) throw mtpErrorUnexpected(cons, "MTPmsgsStateReq"); auto v = new MTPDmsgs_state_req(); setData(v); v->vmsg_ids.read(from, end); } inline void MTPmsgsStateReq::write(mtpBuffer &to) const { auto &v = c_msgs_state_req(); v.vmsg_ids.write(to); } inline const MTPDmsgs_state_req &MTPmsgsStateReq::c_msgs_state_req() const { return queryData(); } inline MTPmsgsStateReq::MTPmsgsStateReq(const MTPDmsgs_state_req *data) : TypeDataOwner(data) { } inline MTPmsgsStateReq MTP_msgs_state_req(const MTPVector &_msg_ids) { return MTP::internal::TypeCreator::new_msgs_state_req(_msg_ids); } inline MTPmsgsStateInfo::MTPmsgsStateInfo() : TypeDataOwner(new MTPDmsgs_state_info()) { } inline uint32 MTPmsgsStateInfo::innerLength() const { const MTPDmsgs_state_info &v(c_msgs_state_info()); return v.vreq_msg_id.innerLength() + v.vinfo.innerLength(); } inline mtpTypeId MTPmsgsStateInfo::type() const { return mtpc_msgs_state_info; } inline void MTPmsgsStateInfo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_msgs_state_info) throw mtpErrorUnexpected(cons, "MTPmsgsStateInfo"); auto v = new MTPDmsgs_state_info(); setData(v); v->vreq_msg_id.read(from, end); v->vinfo.read(from, end); } inline void MTPmsgsStateInfo::write(mtpBuffer &to) const { auto &v = c_msgs_state_info(); v.vreq_msg_id.write(to); v.vinfo.write(to); } inline const MTPDmsgs_state_info &MTPmsgsStateInfo::c_msgs_state_info() const { return queryData(); } inline MTPmsgsStateInfo::MTPmsgsStateInfo(const MTPDmsgs_state_info *data) : TypeDataOwner(data) { } inline MTPmsgsStateInfo MTP_msgs_state_info(const MTPlong &_req_msg_id, const MTPstring &_info) { return MTP::internal::TypeCreator::new_msgs_state_info(_req_msg_id, _info); } inline MTPmsgsAllInfo::MTPmsgsAllInfo() : TypeDataOwner(new MTPDmsgs_all_info()) { } inline uint32 MTPmsgsAllInfo::innerLength() const { const MTPDmsgs_all_info &v(c_msgs_all_info()); return v.vmsg_ids.innerLength() + v.vinfo.innerLength(); } inline mtpTypeId MTPmsgsAllInfo::type() const { return mtpc_msgs_all_info; } inline void MTPmsgsAllInfo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_msgs_all_info) throw mtpErrorUnexpected(cons, "MTPmsgsAllInfo"); auto v = new MTPDmsgs_all_info(); setData(v); v->vmsg_ids.read(from, end); v->vinfo.read(from, end); } inline void MTPmsgsAllInfo::write(mtpBuffer &to) const { auto &v = c_msgs_all_info(); v.vmsg_ids.write(to); v.vinfo.write(to); } inline const MTPDmsgs_all_info &MTPmsgsAllInfo::c_msgs_all_info() const { return queryData(); } inline MTPmsgsAllInfo::MTPmsgsAllInfo(const MTPDmsgs_all_info *data) : TypeDataOwner(data) { } inline MTPmsgsAllInfo MTP_msgs_all_info(const MTPVector &_msg_ids, const MTPstring &_info) { return MTP::internal::TypeCreator::new_msgs_all_info(_msg_ids, _info); } inline uint32 MTPmsgDetailedInfo::innerLength() const { switch (_type) { case mtpc_msg_detailed_info: { const MTPDmsg_detailed_info &v(c_msg_detailed_info()); return v.vmsg_id.innerLength() + v.vanswer_msg_id.innerLength() + v.vbytes.innerLength() + v.vstatus.innerLength(); } case mtpc_msg_new_detailed_info: { const MTPDmsg_new_detailed_info &v(c_msg_new_detailed_info()); return v.vanswer_msg_id.innerLength() + v.vbytes.innerLength() + v.vstatus.innerLength(); } } return 0; } inline mtpTypeId MTPmsgDetailedInfo::type() const { t_assert(_type != 0); return _type; } inline void MTPmsgDetailedInfo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_msg_detailed_info: _type = cons; { auto v = new MTPDmsg_detailed_info(); setData(v); v->vmsg_id.read(from, end); v->vanswer_msg_id.read(from, end); v->vbytes.read(from, end); v->vstatus.read(from, end); } break; case mtpc_msg_new_detailed_info: _type = cons; { auto v = new MTPDmsg_new_detailed_info(); setData(v); v->vanswer_msg_id.read(from, end); v->vbytes.read(from, end); v->vstatus.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmsgDetailedInfo"); } } inline void MTPmsgDetailedInfo::write(mtpBuffer &to) const { switch (_type) { case mtpc_msg_detailed_info: { auto &v = c_msg_detailed_info(); v.vmsg_id.write(to); v.vanswer_msg_id.write(to); v.vbytes.write(to); v.vstatus.write(to); } break; case mtpc_msg_new_detailed_info: { auto &v = c_msg_new_detailed_info(); v.vanswer_msg_id.write(to); v.vbytes.write(to); v.vstatus.write(to); } break; } } inline MTPmsgDetailedInfo::MTPmsgDetailedInfo(mtpTypeId type) : _type(type) { switch (type) { case mtpc_msg_detailed_info: setData(new MTPDmsg_detailed_info()); break; case mtpc_msg_new_detailed_info: setData(new MTPDmsg_new_detailed_info()); break; default: throw mtpErrorBadTypeId(type, "MTPmsgDetailedInfo"); } } inline const MTPDmsg_detailed_info &MTPmsgDetailedInfo::c_msg_detailed_info() const { t_assert(_type == mtpc_msg_detailed_info); return queryData(); } inline MTPmsgDetailedInfo::MTPmsgDetailedInfo(const MTPDmsg_detailed_info *data) : TypeDataOwner(data), _type(mtpc_msg_detailed_info) { } inline const MTPDmsg_new_detailed_info &MTPmsgDetailedInfo::c_msg_new_detailed_info() const { t_assert(_type == mtpc_msg_new_detailed_info); return queryData(); } inline MTPmsgDetailedInfo::MTPmsgDetailedInfo(const MTPDmsg_new_detailed_info *data) : TypeDataOwner(data), _type(mtpc_msg_new_detailed_info) { } inline MTPmsgDetailedInfo MTP_msg_detailed_info(const MTPlong &_msg_id, const MTPlong &_answer_msg_id, MTPint _bytes, MTPint _status) { return MTP::internal::TypeCreator::new_msg_detailed_info(_msg_id, _answer_msg_id, _bytes, _status); } inline MTPmsgDetailedInfo MTP_msg_new_detailed_info(const MTPlong &_answer_msg_id, MTPint _bytes, MTPint _status) { return MTP::internal::TypeCreator::new_msg_new_detailed_info(_answer_msg_id, _bytes, _status); } inline MTPmsgResendReq::MTPmsgResendReq() : TypeDataOwner(new MTPDmsg_resend_req()) { } inline uint32 MTPmsgResendReq::innerLength() const { const MTPDmsg_resend_req &v(c_msg_resend_req()); return v.vmsg_ids.innerLength(); } inline mtpTypeId MTPmsgResendReq::type() const { return mtpc_msg_resend_req; } inline void MTPmsgResendReq::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_msg_resend_req) throw mtpErrorUnexpected(cons, "MTPmsgResendReq"); auto v = new MTPDmsg_resend_req(); setData(v); v->vmsg_ids.read(from, end); } inline void MTPmsgResendReq::write(mtpBuffer &to) const { auto &v = c_msg_resend_req(); v.vmsg_ids.write(to); } inline const MTPDmsg_resend_req &MTPmsgResendReq::c_msg_resend_req() const { return queryData(); } inline MTPmsgResendReq::MTPmsgResendReq(const MTPDmsg_resend_req *data) : TypeDataOwner(data) { } inline MTPmsgResendReq MTP_msg_resend_req(const MTPVector &_msg_ids) { return MTP::internal::TypeCreator::new_msg_resend_req(_msg_ids); } inline MTPrpcError::MTPrpcError() : TypeDataOwner(new MTPDrpc_error()) { } inline uint32 MTPrpcError::innerLength() const { const MTPDrpc_error &v(c_rpc_error()); return v.verror_code.innerLength() + v.verror_message.innerLength(); } inline mtpTypeId MTPrpcError::type() const { return mtpc_rpc_error; } inline void MTPrpcError::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_rpc_error) throw mtpErrorUnexpected(cons, "MTPrpcError"); auto v = new MTPDrpc_error(); setData(v); v->verror_code.read(from, end); v->verror_message.read(from, end); } inline void MTPrpcError::write(mtpBuffer &to) const { auto &v = c_rpc_error(); v.verror_code.write(to); v.verror_message.write(to); } inline const MTPDrpc_error &MTPrpcError::c_rpc_error() const { return queryData(); } inline MTPrpcError::MTPrpcError(const MTPDrpc_error *data) : TypeDataOwner(data) { } inline MTPrpcError MTP_rpc_error(MTPint _error_code, const MTPstring &_error_message) { return MTP::internal::TypeCreator::new_rpc_error(_error_code, _error_message); } inline uint32 MTPrpcDropAnswer::innerLength() const { switch (_type) { case mtpc_rpc_answer_dropped: { const MTPDrpc_answer_dropped &v(c_rpc_answer_dropped()); return v.vmsg_id.innerLength() + v.vseq_no.innerLength() + v.vbytes.innerLength(); } } return 0; } inline mtpTypeId MTPrpcDropAnswer::type() const { t_assert(_type != 0); return _type; } inline void MTPrpcDropAnswer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_rpc_answer_unknown: _type = cons; break; case mtpc_rpc_answer_dropped_running: _type = cons; break; case mtpc_rpc_answer_dropped: _type = cons; { auto v = new MTPDrpc_answer_dropped(); setData(v); v->vmsg_id.read(from, end); v->vseq_no.read(from, end); v->vbytes.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPrpcDropAnswer"); } } inline void MTPrpcDropAnswer::write(mtpBuffer &to) const { switch (_type) { case mtpc_rpc_answer_dropped: { auto &v = c_rpc_answer_dropped(); v.vmsg_id.write(to); v.vseq_no.write(to); v.vbytes.write(to); } break; } } inline MTPrpcDropAnswer::MTPrpcDropAnswer(mtpTypeId type) : _type(type) { switch (type) { case mtpc_rpc_answer_unknown: break; case mtpc_rpc_answer_dropped_running: break; case mtpc_rpc_answer_dropped: setData(new MTPDrpc_answer_dropped()); break; default: throw mtpErrorBadTypeId(type, "MTPrpcDropAnswer"); } } inline const MTPDrpc_answer_dropped &MTPrpcDropAnswer::c_rpc_answer_dropped() const { t_assert(_type == mtpc_rpc_answer_dropped); return queryData(); } inline MTPrpcDropAnswer::MTPrpcDropAnswer(const MTPDrpc_answer_dropped *data) : TypeDataOwner(data), _type(mtpc_rpc_answer_dropped) { } inline MTPrpcDropAnswer MTP_rpc_answer_unknown() { return MTP::internal::TypeCreator::new_rpc_answer_unknown(); } inline MTPrpcDropAnswer MTP_rpc_answer_dropped_running() { return MTP::internal::TypeCreator::new_rpc_answer_dropped_running(); } inline MTPrpcDropAnswer MTP_rpc_answer_dropped(const MTPlong &_msg_id, MTPint _seq_no, MTPint _bytes) { return MTP::internal::TypeCreator::new_rpc_answer_dropped(_msg_id, _seq_no, _bytes); } inline MTPfutureSalt::MTPfutureSalt() : TypeDataOwner(new MTPDfuture_salt()) { } inline uint32 MTPfutureSalt::innerLength() const { const MTPDfuture_salt &v(c_future_salt()); return v.vvalid_since.innerLength() + v.vvalid_until.innerLength() + v.vsalt.innerLength(); } inline mtpTypeId MTPfutureSalt::type() const { return mtpc_future_salt; } inline void MTPfutureSalt::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_future_salt) throw mtpErrorUnexpected(cons, "MTPfutureSalt"); auto v = new MTPDfuture_salt(); setData(v); v->vvalid_since.read(from, end); v->vvalid_until.read(from, end); v->vsalt.read(from, end); } inline void MTPfutureSalt::write(mtpBuffer &to) const { auto &v = c_future_salt(); v.vvalid_since.write(to); v.vvalid_until.write(to); v.vsalt.write(to); } inline const MTPDfuture_salt &MTPfutureSalt::c_future_salt() const { return queryData(); } inline MTPfutureSalt::MTPfutureSalt(const MTPDfuture_salt *data) : TypeDataOwner(data) { } inline MTPfutureSalt MTP_future_salt(MTPint _valid_since, MTPint _valid_until, const MTPlong &_salt) { return MTP::internal::TypeCreator::new_future_salt(_valid_since, _valid_until, _salt); } inline MTPfutureSalts::MTPfutureSalts() : TypeDataOwner(new MTPDfuture_salts()) { } inline uint32 MTPfutureSalts::innerLength() const { const MTPDfuture_salts &v(c_future_salts()); return v.vreq_msg_id.innerLength() + v.vnow.innerLength() + v.vsalts.innerLength(); } inline mtpTypeId MTPfutureSalts::type() const { return mtpc_future_salts; } inline void MTPfutureSalts::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_future_salts) throw mtpErrorUnexpected(cons, "MTPfutureSalts"); auto v = new MTPDfuture_salts(); setData(v); v->vreq_msg_id.read(from, end); v->vnow.read(from, end); v->vsalts.read(from, end); } inline void MTPfutureSalts::write(mtpBuffer &to) const { auto &v = c_future_salts(); v.vreq_msg_id.write(to); v.vnow.write(to); v.vsalts.write(to); } inline const MTPDfuture_salts &MTPfutureSalts::c_future_salts() const { return queryData(); } inline MTPfutureSalts::MTPfutureSalts(const MTPDfuture_salts *data) : TypeDataOwner(data) { } inline MTPfutureSalts MTP_future_salts(const MTPlong &_req_msg_id, MTPint _now, const MTPvector &_salts) { return MTP::internal::TypeCreator::new_future_salts(_req_msg_id, _now, _salts); } inline MTPpong::MTPpong() : TypeDataOwner(new MTPDpong()) { } inline uint32 MTPpong::innerLength() const { const MTPDpong &v(c_pong()); return v.vmsg_id.innerLength() + v.vping_id.innerLength(); } inline mtpTypeId MTPpong::type() const { return mtpc_pong; } inline void MTPpong::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_pong) throw mtpErrorUnexpected(cons, "MTPpong"); auto v = new MTPDpong(); setData(v); v->vmsg_id.read(from, end); v->vping_id.read(from, end); } inline void MTPpong::write(mtpBuffer &to) const { auto &v = c_pong(); v.vmsg_id.write(to); v.vping_id.write(to); } inline const MTPDpong &MTPpong::c_pong() const { return queryData(); } inline MTPpong::MTPpong(const MTPDpong *data) : TypeDataOwner(data) { } inline MTPpong MTP_pong(const MTPlong &_msg_id, const MTPlong &_ping_id) { return MTP::internal::TypeCreator::new_pong(_msg_id, _ping_id); } inline uint32 MTPdestroySessionRes::innerLength() const { switch (_type) { case mtpc_destroy_session_ok: { const MTPDdestroy_session_ok &v(c_destroy_session_ok()); return v.vsession_id.innerLength(); } case mtpc_destroy_session_none: { const MTPDdestroy_session_none &v(c_destroy_session_none()); return v.vsession_id.innerLength(); } } return 0; } inline mtpTypeId MTPdestroySessionRes::type() const { t_assert(_type != 0); return _type; } inline void MTPdestroySessionRes::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_destroy_session_ok: _type = cons; { auto v = new MTPDdestroy_session_ok(); setData(v); v->vsession_id.read(from, end); } break; case mtpc_destroy_session_none: _type = cons; { auto v = new MTPDdestroy_session_none(); setData(v); v->vsession_id.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPdestroySessionRes"); } } inline void MTPdestroySessionRes::write(mtpBuffer &to) const { switch (_type) { case mtpc_destroy_session_ok: { auto &v = c_destroy_session_ok(); v.vsession_id.write(to); } break; case mtpc_destroy_session_none: { auto &v = c_destroy_session_none(); v.vsession_id.write(to); } break; } } inline MTPdestroySessionRes::MTPdestroySessionRes(mtpTypeId type) : _type(type) { switch (type) { case mtpc_destroy_session_ok: setData(new MTPDdestroy_session_ok()); break; case mtpc_destroy_session_none: setData(new MTPDdestroy_session_none()); break; default: throw mtpErrorBadTypeId(type, "MTPdestroySessionRes"); } } inline const MTPDdestroy_session_ok &MTPdestroySessionRes::c_destroy_session_ok() const { t_assert(_type == mtpc_destroy_session_ok); return queryData(); } inline MTPdestroySessionRes::MTPdestroySessionRes(const MTPDdestroy_session_ok *data) : TypeDataOwner(data), _type(mtpc_destroy_session_ok) { } inline const MTPDdestroy_session_none &MTPdestroySessionRes::c_destroy_session_none() const { t_assert(_type == mtpc_destroy_session_none); return queryData(); } inline MTPdestroySessionRes::MTPdestroySessionRes(const MTPDdestroy_session_none *data) : TypeDataOwner(data), _type(mtpc_destroy_session_none) { } inline MTPdestroySessionRes MTP_destroy_session_ok(const MTPlong &_session_id) { return MTP::internal::TypeCreator::new_destroy_session_ok(_session_id); } inline MTPdestroySessionRes MTP_destroy_session_none(const MTPlong &_session_id) { return MTP::internal::TypeCreator::new_destroy_session_none(_session_id); } inline MTPnewSession::MTPnewSession() : TypeDataOwner(new MTPDnew_session_created()) { } inline uint32 MTPnewSession::innerLength() const { const MTPDnew_session_created &v(c_new_session_created()); return v.vfirst_msg_id.innerLength() + v.vunique_id.innerLength() + v.vserver_salt.innerLength(); } inline mtpTypeId MTPnewSession::type() const { return mtpc_new_session_created; } inline void MTPnewSession::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_new_session_created) throw mtpErrorUnexpected(cons, "MTPnewSession"); auto v = new MTPDnew_session_created(); setData(v); v->vfirst_msg_id.read(from, end); v->vunique_id.read(from, end); v->vserver_salt.read(from, end); } inline void MTPnewSession::write(mtpBuffer &to) const { auto &v = c_new_session_created(); v.vfirst_msg_id.write(to); v.vunique_id.write(to); v.vserver_salt.write(to); } inline const MTPDnew_session_created &MTPnewSession::c_new_session_created() const { return queryData(); } inline MTPnewSession::MTPnewSession(const MTPDnew_session_created *data) : TypeDataOwner(data) { } inline MTPnewSession MTP_new_session_created(const MTPlong &_first_msg_id, const MTPlong &_unique_id, const MTPlong &_server_salt) { return MTP::internal::TypeCreator::new_new_session_created(_first_msg_id, _unique_id, _server_salt); } inline MTPhttpWait::MTPhttpWait() : TypeDataOwner(new MTPDhttp_wait()) { } inline uint32 MTPhttpWait::innerLength() const { const MTPDhttp_wait &v(c_http_wait()); return v.vmax_delay.innerLength() + v.vwait_after.innerLength() + v.vmax_wait.innerLength(); } inline mtpTypeId MTPhttpWait::type() const { return mtpc_http_wait; } inline void MTPhttpWait::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_http_wait) throw mtpErrorUnexpected(cons, "MTPhttpWait"); auto v = new MTPDhttp_wait(); setData(v); v->vmax_delay.read(from, end); v->vwait_after.read(from, end); v->vmax_wait.read(from, end); } inline void MTPhttpWait::write(mtpBuffer &to) const { auto &v = c_http_wait(); v.vmax_delay.write(to); v.vwait_after.write(to); v.vmax_wait.write(to); } inline const MTPDhttp_wait &MTPhttpWait::c_http_wait() const { return queryData(); } inline MTPhttpWait::MTPhttpWait(const MTPDhttp_wait *data) : TypeDataOwner(data) { } inline MTPhttpWait MTP_http_wait(MTPint _max_delay, MTPint _wait_after, MTPint _max_wait) { return MTP::internal::TypeCreator::new_http_wait(_max_delay, _wait_after, _max_wait); } inline uint32 MTPbool::innerLength() const { return 0; } inline mtpTypeId MTPbool::type() const { t_assert(_type != 0); return _type; } inline void MTPbool::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_boolFalse: _type = cons; break; case mtpc_boolTrue: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPbool"); } } inline void MTPbool::write(mtpBuffer &to) const { } inline MTPbool::MTPbool(mtpTypeId type) : _type(type) { switch (type) { case mtpc_boolFalse: break; case mtpc_boolTrue: break; default: throw mtpErrorBadTypeId(type, "MTPbool"); } } inline MTPbool MTP_boolFalse() { return MTP::internal::TypeCreator::new_boolFalse(); } inline MTPbool MTP_boolTrue() { return MTP::internal::TypeCreator::new_boolTrue(); } inline uint32 MTPtrue::innerLength() const { return 0; } inline mtpTypeId MTPtrue::type() const { return mtpc_true; } inline void MTPtrue::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { } inline void MTPtrue::write(mtpBuffer &to) const { } inline MTPtrue MTP_true() { return MTP::internal::TypeCreator::new_true(); } inline MTPerror::MTPerror() : TypeDataOwner(new MTPDerror()) { } inline uint32 MTPerror::innerLength() const { const MTPDerror &v(c_error()); return v.vcode.innerLength() + v.vtext.innerLength(); } inline mtpTypeId MTPerror::type() const { return mtpc_error; } inline void MTPerror::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_error) throw mtpErrorUnexpected(cons, "MTPerror"); auto v = new MTPDerror(); setData(v); v->vcode.read(from, end); v->vtext.read(from, end); } inline void MTPerror::write(mtpBuffer &to) const { auto &v = c_error(); v.vcode.write(to); v.vtext.write(to); } inline const MTPDerror &MTPerror::c_error() const { return queryData(); } inline MTPerror::MTPerror(const MTPDerror *data) : TypeDataOwner(data) { } inline MTPerror MTP_error(MTPint _code, const MTPstring &_text) { return MTP::internal::TypeCreator::new_error(_code, _text); } inline uint32 MTPnull::innerLength() const { return 0; } inline mtpTypeId MTPnull::type() const { return mtpc_null; } inline void MTPnull::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { } inline void MTPnull::write(mtpBuffer &to) const { } inline MTPnull MTP_null() { return MTP::internal::TypeCreator::new_null(); } inline uint32 MTPinputPeer::innerLength() const { switch (_type) { case mtpc_inputPeerChat: { const MTPDinputPeerChat &v(c_inputPeerChat()); return v.vchat_id.innerLength(); } case mtpc_inputPeerUser: { const MTPDinputPeerUser &v(c_inputPeerUser()); return v.vuser_id.innerLength() + v.vaccess_hash.innerLength(); } case mtpc_inputPeerChannel: { const MTPDinputPeerChannel &v(c_inputPeerChannel()); return v.vchannel_id.innerLength() + v.vaccess_hash.innerLength(); } } return 0; } inline mtpTypeId MTPinputPeer::type() const { t_assert(_type != 0); return _type; } inline void MTPinputPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputPeerEmpty: _type = cons; break; case mtpc_inputPeerSelf: _type = cons; break; case mtpc_inputPeerChat: _type = cons; { auto v = new MTPDinputPeerChat(); setData(v); v->vchat_id.read(from, end); } break; case mtpc_inputPeerUser: _type = cons; { auto v = new MTPDinputPeerUser(); setData(v); v->vuser_id.read(from, end); v->vaccess_hash.read(from, end); } break; case mtpc_inputPeerChannel: _type = cons; { auto v = new MTPDinputPeerChannel(); setData(v); v->vchannel_id.read(from, end); v->vaccess_hash.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputPeer"); } } inline void MTPinputPeer::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputPeerChat: { auto &v = c_inputPeerChat(); v.vchat_id.write(to); } break; case mtpc_inputPeerUser: { auto &v = c_inputPeerUser(); v.vuser_id.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputPeerChannel: { auto &v = c_inputPeerChannel(); v.vchannel_id.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputPeer::MTPinputPeer(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputPeerEmpty: break; case mtpc_inputPeerSelf: break; case mtpc_inputPeerChat: setData(new MTPDinputPeerChat()); break; case mtpc_inputPeerUser: setData(new MTPDinputPeerUser()); break; case mtpc_inputPeerChannel: setData(new MTPDinputPeerChannel()); break; default: throw mtpErrorBadTypeId(type, "MTPinputPeer"); } } inline const MTPDinputPeerChat &MTPinputPeer::c_inputPeerChat() const { t_assert(_type == mtpc_inputPeerChat); return queryData(); } inline MTPinputPeer::MTPinputPeer(const MTPDinputPeerChat *data) : TypeDataOwner(data), _type(mtpc_inputPeerChat) { } inline const MTPDinputPeerUser &MTPinputPeer::c_inputPeerUser() const { t_assert(_type == mtpc_inputPeerUser); return queryData(); } inline MTPinputPeer::MTPinputPeer(const MTPDinputPeerUser *data) : TypeDataOwner(data), _type(mtpc_inputPeerUser) { } inline const MTPDinputPeerChannel &MTPinputPeer::c_inputPeerChannel() const { t_assert(_type == mtpc_inputPeerChannel); return queryData(); } inline MTPinputPeer::MTPinputPeer(const MTPDinputPeerChannel *data) : TypeDataOwner(data), _type(mtpc_inputPeerChannel) { } inline MTPinputPeer MTP_inputPeerEmpty() { return MTP::internal::TypeCreator::new_inputPeerEmpty(); } inline MTPinputPeer MTP_inputPeerSelf() { return MTP::internal::TypeCreator::new_inputPeerSelf(); } inline MTPinputPeer MTP_inputPeerChat(MTPint _chat_id) { return MTP::internal::TypeCreator::new_inputPeerChat(_chat_id); } inline MTPinputPeer MTP_inputPeerUser(MTPint _user_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputPeerUser(_user_id, _access_hash); } inline MTPinputPeer MTP_inputPeerChannel(MTPint _channel_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputPeerChannel(_channel_id, _access_hash); } inline uint32 MTPinputUser::innerLength() const { switch (_type) { case mtpc_inputUser: { const MTPDinputUser &v(c_inputUser()); return v.vuser_id.innerLength() + v.vaccess_hash.innerLength(); } } return 0; } inline mtpTypeId MTPinputUser::type() const { t_assert(_type != 0); return _type; } inline void MTPinputUser::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputUserEmpty: _type = cons; break; case mtpc_inputUserSelf: _type = cons; break; case mtpc_inputUser: _type = cons; { auto v = new MTPDinputUser(); setData(v); v->vuser_id.read(from, end); v->vaccess_hash.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputUser"); } } inline void MTPinputUser::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputUser: { auto &v = c_inputUser(); v.vuser_id.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputUser::MTPinputUser(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputUserEmpty: break; case mtpc_inputUserSelf: break; case mtpc_inputUser: setData(new MTPDinputUser()); break; default: throw mtpErrorBadTypeId(type, "MTPinputUser"); } } inline const MTPDinputUser &MTPinputUser::c_inputUser() const { t_assert(_type == mtpc_inputUser); return queryData(); } inline MTPinputUser::MTPinputUser(const MTPDinputUser *data) : TypeDataOwner(data), _type(mtpc_inputUser) { } inline MTPinputUser MTP_inputUserEmpty() { return MTP::internal::TypeCreator::new_inputUserEmpty(); } inline MTPinputUser MTP_inputUserSelf() { return MTP::internal::TypeCreator::new_inputUserSelf(); } inline MTPinputUser MTP_inputUser(MTPint _user_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputUser(_user_id, _access_hash); } inline MTPinputContact::MTPinputContact() : TypeDataOwner(new MTPDinputPhoneContact()) { } inline uint32 MTPinputContact::innerLength() const { const MTPDinputPhoneContact &v(c_inputPhoneContact()); return v.vclient_id.innerLength() + v.vphone.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength(); } inline mtpTypeId MTPinputContact::type() const { return mtpc_inputPhoneContact; } inline void MTPinputContact::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inputPhoneContact) throw mtpErrorUnexpected(cons, "MTPinputContact"); auto v = new MTPDinputPhoneContact(); setData(v); v->vclient_id.read(from, end); v->vphone.read(from, end); v->vfirst_name.read(from, end); v->vlast_name.read(from, end); } inline void MTPinputContact::write(mtpBuffer &to) const { auto &v = c_inputPhoneContact(); v.vclient_id.write(to); v.vphone.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); } inline const MTPDinputPhoneContact &MTPinputContact::c_inputPhoneContact() const { return queryData(); } inline MTPinputContact::MTPinputContact(const MTPDinputPhoneContact *data) : TypeDataOwner(data) { } inline MTPinputContact MTP_inputPhoneContact(const MTPlong &_client_id, const MTPstring &_phone, const MTPstring &_first_name, const MTPstring &_last_name) { return MTP::internal::TypeCreator::new_inputPhoneContact(_client_id, _phone, _first_name, _last_name); } inline uint32 MTPinputFile::innerLength() const { switch (_type) { case mtpc_inputFile: { const MTPDinputFile &v(c_inputFile()); return v.vid.innerLength() + v.vparts.innerLength() + v.vname.innerLength() + v.vmd5_checksum.innerLength(); } case mtpc_inputFileBig: { const MTPDinputFileBig &v(c_inputFileBig()); return v.vid.innerLength() + v.vparts.innerLength() + v.vname.innerLength(); } } return 0; } inline mtpTypeId MTPinputFile::type() const { t_assert(_type != 0); return _type; } inline void MTPinputFile::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputFile: _type = cons; { auto v = new MTPDinputFile(); setData(v); v->vid.read(from, end); v->vparts.read(from, end); v->vname.read(from, end); v->vmd5_checksum.read(from, end); } break; case mtpc_inputFileBig: _type = cons; { auto v = new MTPDinputFileBig(); setData(v); v->vid.read(from, end); v->vparts.read(from, end); v->vname.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputFile"); } } inline void MTPinputFile::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputFile: { auto &v = c_inputFile(); v.vid.write(to); v.vparts.write(to); v.vname.write(to); v.vmd5_checksum.write(to); } break; case mtpc_inputFileBig: { auto &v = c_inputFileBig(); v.vid.write(to); v.vparts.write(to); v.vname.write(to); } break; } } inline MTPinputFile::MTPinputFile(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputFile: setData(new MTPDinputFile()); break; case mtpc_inputFileBig: setData(new MTPDinputFileBig()); break; default: throw mtpErrorBadTypeId(type, "MTPinputFile"); } } inline const MTPDinputFile &MTPinputFile::c_inputFile() const { t_assert(_type == mtpc_inputFile); return queryData(); } inline MTPinputFile::MTPinputFile(const MTPDinputFile *data) : TypeDataOwner(data), _type(mtpc_inputFile) { } inline const MTPDinputFileBig &MTPinputFile::c_inputFileBig() const { t_assert(_type == mtpc_inputFileBig); return queryData(); } inline MTPinputFile::MTPinputFile(const MTPDinputFileBig *data) : TypeDataOwner(data), _type(mtpc_inputFileBig) { } inline MTPinputFile MTP_inputFile(const MTPlong &_id, MTPint _parts, const MTPstring &_name, const MTPstring &_md5_checksum) { return MTP::internal::TypeCreator::new_inputFile(_id, _parts, _name, _md5_checksum); } inline MTPinputFile MTP_inputFileBig(const MTPlong &_id, MTPint _parts, const MTPstring &_name) { return MTP::internal::TypeCreator::new_inputFileBig(_id, _parts, _name); } inline uint32 MTPinputMedia::innerLength() const { switch (_type) { case mtpc_inputMediaUploadedPhoto: { const MTPDinputMediaUploadedPhoto &v(c_inputMediaUploadedPhoto()); return v.vflags.innerLength() + v.vfile.innerLength() + v.vcaption.innerLength() + (v.has_stickers() ? v.vstickers.innerLength() : 0); } case mtpc_inputMediaPhoto: { const MTPDinputMediaPhoto &v(c_inputMediaPhoto()); return v.vid.innerLength() + v.vcaption.innerLength(); } case mtpc_inputMediaGeoPoint: { const MTPDinputMediaGeoPoint &v(c_inputMediaGeoPoint()); return v.vgeo_point.innerLength(); } case mtpc_inputMediaContact: { const MTPDinputMediaContact &v(c_inputMediaContact()); return v.vphone_number.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength(); } case mtpc_inputMediaUploadedDocument: { const MTPDinputMediaUploadedDocument &v(c_inputMediaUploadedDocument()); return v.vflags.innerLength() + v.vfile.innerLength() + v.vmime_type.innerLength() + v.vattributes.innerLength() + v.vcaption.innerLength() + (v.has_stickers() ? v.vstickers.innerLength() : 0); } case mtpc_inputMediaUploadedThumbDocument: { const MTPDinputMediaUploadedThumbDocument &v(c_inputMediaUploadedThumbDocument()); return v.vflags.innerLength() + v.vfile.innerLength() + v.vthumb.innerLength() + v.vmime_type.innerLength() + v.vattributes.innerLength() + v.vcaption.innerLength() + (v.has_stickers() ? v.vstickers.innerLength() : 0); } case mtpc_inputMediaDocument: { const MTPDinputMediaDocument &v(c_inputMediaDocument()); return v.vid.innerLength() + v.vcaption.innerLength(); } case mtpc_inputMediaVenue: { const MTPDinputMediaVenue &v(c_inputMediaVenue()); return v.vgeo_point.innerLength() + v.vtitle.innerLength() + v.vaddress.innerLength() + v.vprovider.innerLength() + v.vvenue_id.innerLength(); } case mtpc_inputMediaGifExternal: { const MTPDinputMediaGifExternal &v(c_inputMediaGifExternal()); return v.vurl.innerLength() + v.vq.innerLength(); } case mtpc_inputMediaPhotoExternal: { const MTPDinputMediaPhotoExternal &v(c_inputMediaPhotoExternal()); return v.vurl.innerLength() + v.vcaption.innerLength(); } case mtpc_inputMediaDocumentExternal: { const MTPDinputMediaDocumentExternal &v(c_inputMediaDocumentExternal()); return v.vurl.innerLength() + v.vcaption.innerLength(); } case mtpc_inputMediaGame: { const MTPDinputMediaGame &v(c_inputMediaGame()); return v.vid.innerLength(); } } return 0; } inline mtpTypeId MTPinputMedia::type() const { t_assert(_type != 0); return _type; } inline void MTPinputMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputMediaEmpty: _type = cons; break; case mtpc_inputMediaUploadedPhoto: _type = cons; { auto v = new MTPDinputMediaUploadedPhoto(); setData(v); v->vflags.read(from, end); v->vfile.read(from, end); v->vcaption.read(from, end); if (v->has_stickers()) { v->vstickers.read(from, end); } else { v->vstickers = MTPVector(); } } break; case mtpc_inputMediaPhoto: _type = cons; { auto v = new MTPDinputMediaPhoto(); setData(v); v->vid.read(from, end); v->vcaption.read(from, end); } break; case mtpc_inputMediaGeoPoint: _type = cons; { auto v = new MTPDinputMediaGeoPoint(); setData(v); v->vgeo_point.read(from, end); } break; case mtpc_inputMediaContact: _type = cons; { auto v = new MTPDinputMediaContact(); setData(v); v->vphone_number.read(from, end); v->vfirst_name.read(from, end); v->vlast_name.read(from, end); } break; case mtpc_inputMediaUploadedDocument: _type = cons; { auto v = new MTPDinputMediaUploadedDocument(); setData(v); v->vflags.read(from, end); v->vfile.read(from, end); v->vmime_type.read(from, end); v->vattributes.read(from, end); v->vcaption.read(from, end); if (v->has_stickers()) { v->vstickers.read(from, end); } else { v->vstickers = MTPVector(); } } break; case mtpc_inputMediaUploadedThumbDocument: _type = cons; { auto v = new MTPDinputMediaUploadedThumbDocument(); setData(v); v->vflags.read(from, end); v->vfile.read(from, end); v->vthumb.read(from, end); v->vmime_type.read(from, end); v->vattributes.read(from, end); v->vcaption.read(from, end); if (v->has_stickers()) { v->vstickers.read(from, end); } else { v->vstickers = MTPVector(); } } break; case mtpc_inputMediaDocument: _type = cons; { auto v = new MTPDinputMediaDocument(); setData(v); v->vid.read(from, end); v->vcaption.read(from, end); } break; case mtpc_inputMediaVenue: _type = cons; { auto v = new MTPDinputMediaVenue(); setData(v); v->vgeo_point.read(from, end); v->vtitle.read(from, end); v->vaddress.read(from, end); v->vprovider.read(from, end); v->vvenue_id.read(from, end); } break; case mtpc_inputMediaGifExternal: _type = cons; { auto v = new MTPDinputMediaGifExternal(); setData(v); v->vurl.read(from, end); v->vq.read(from, end); } break; case mtpc_inputMediaPhotoExternal: _type = cons; { auto v = new MTPDinputMediaPhotoExternal(); setData(v); v->vurl.read(from, end); v->vcaption.read(from, end); } break; case mtpc_inputMediaDocumentExternal: _type = cons; { auto v = new MTPDinputMediaDocumentExternal(); setData(v); v->vurl.read(from, end); v->vcaption.read(from, end); } break; case mtpc_inputMediaGame: _type = cons; { auto v = new MTPDinputMediaGame(); setData(v); v->vid.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputMedia"); } } inline void MTPinputMedia::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputMediaUploadedPhoto: { auto &v = c_inputMediaUploadedPhoto(); v.vflags.write(to); v.vfile.write(to); v.vcaption.write(to); if (v.has_stickers()) v.vstickers.write(to); } break; case mtpc_inputMediaPhoto: { auto &v = c_inputMediaPhoto(); v.vid.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaGeoPoint: { auto &v = c_inputMediaGeoPoint(); v.vgeo_point.write(to); } break; case mtpc_inputMediaContact: { auto &v = c_inputMediaContact(); v.vphone_number.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); } break; case mtpc_inputMediaUploadedDocument: { auto &v = c_inputMediaUploadedDocument(); v.vflags.write(to); v.vfile.write(to); v.vmime_type.write(to); v.vattributes.write(to); v.vcaption.write(to); if (v.has_stickers()) v.vstickers.write(to); } break; case mtpc_inputMediaUploadedThumbDocument: { auto &v = c_inputMediaUploadedThumbDocument(); v.vflags.write(to); v.vfile.write(to); v.vthumb.write(to); v.vmime_type.write(to); v.vattributes.write(to); v.vcaption.write(to); if (v.has_stickers()) v.vstickers.write(to); } break; case mtpc_inputMediaDocument: { auto &v = c_inputMediaDocument(); v.vid.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaVenue: { auto &v = c_inputMediaVenue(); v.vgeo_point.write(to); v.vtitle.write(to); v.vaddress.write(to); v.vprovider.write(to); v.vvenue_id.write(to); } break; case mtpc_inputMediaGifExternal: { auto &v = c_inputMediaGifExternal(); v.vurl.write(to); v.vq.write(to); } break; case mtpc_inputMediaPhotoExternal: { auto &v = c_inputMediaPhotoExternal(); v.vurl.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaDocumentExternal: { auto &v = c_inputMediaDocumentExternal(); v.vurl.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaGame: { auto &v = c_inputMediaGame(); v.vid.write(to); } break; } } inline MTPinputMedia::MTPinputMedia(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputMediaEmpty: break; case mtpc_inputMediaUploadedPhoto: setData(new MTPDinputMediaUploadedPhoto()); break; case mtpc_inputMediaPhoto: setData(new MTPDinputMediaPhoto()); break; case mtpc_inputMediaGeoPoint: setData(new MTPDinputMediaGeoPoint()); break; case mtpc_inputMediaContact: setData(new MTPDinputMediaContact()); break; case mtpc_inputMediaUploadedDocument: setData(new MTPDinputMediaUploadedDocument()); break; case mtpc_inputMediaUploadedThumbDocument: setData(new MTPDinputMediaUploadedThumbDocument()); break; case mtpc_inputMediaDocument: setData(new MTPDinputMediaDocument()); break; case mtpc_inputMediaVenue: setData(new MTPDinputMediaVenue()); break; case mtpc_inputMediaGifExternal: setData(new MTPDinputMediaGifExternal()); break; case mtpc_inputMediaPhotoExternal: setData(new MTPDinputMediaPhotoExternal()); break; case mtpc_inputMediaDocumentExternal: setData(new MTPDinputMediaDocumentExternal()); break; case mtpc_inputMediaGame: setData(new MTPDinputMediaGame()); break; default: throw mtpErrorBadTypeId(type, "MTPinputMedia"); } } inline const MTPDinputMediaUploadedPhoto &MTPinputMedia::c_inputMediaUploadedPhoto() const { t_assert(_type == mtpc_inputMediaUploadedPhoto); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaUploadedPhoto *data) : TypeDataOwner(data), _type(mtpc_inputMediaUploadedPhoto) { } inline const MTPDinputMediaPhoto &MTPinputMedia::c_inputMediaPhoto() const { t_assert(_type == mtpc_inputMediaPhoto); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaPhoto *data) : TypeDataOwner(data), _type(mtpc_inputMediaPhoto) { } inline const MTPDinputMediaGeoPoint &MTPinputMedia::c_inputMediaGeoPoint() const { t_assert(_type == mtpc_inputMediaGeoPoint); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaGeoPoint *data) : TypeDataOwner(data), _type(mtpc_inputMediaGeoPoint) { } inline const MTPDinputMediaContact &MTPinputMedia::c_inputMediaContact() const { t_assert(_type == mtpc_inputMediaContact); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaContact *data) : TypeDataOwner(data), _type(mtpc_inputMediaContact) { } inline const MTPDinputMediaUploadedDocument &MTPinputMedia::c_inputMediaUploadedDocument() const { t_assert(_type == mtpc_inputMediaUploadedDocument); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaUploadedDocument *data) : TypeDataOwner(data), _type(mtpc_inputMediaUploadedDocument) { } inline const MTPDinputMediaUploadedThumbDocument &MTPinputMedia::c_inputMediaUploadedThumbDocument() const { t_assert(_type == mtpc_inputMediaUploadedThumbDocument); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaUploadedThumbDocument *data) : TypeDataOwner(data), _type(mtpc_inputMediaUploadedThumbDocument) { } inline const MTPDinputMediaDocument &MTPinputMedia::c_inputMediaDocument() const { t_assert(_type == mtpc_inputMediaDocument); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaDocument *data) : TypeDataOwner(data), _type(mtpc_inputMediaDocument) { } inline const MTPDinputMediaVenue &MTPinputMedia::c_inputMediaVenue() const { t_assert(_type == mtpc_inputMediaVenue); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaVenue *data) : TypeDataOwner(data), _type(mtpc_inputMediaVenue) { } inline const MTPDinputMediaGifExternal &MTPinputMedia::c_inputMediaGifExternal() const { t_assert(_type == mtpc_inputMediaGifExternal); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaGifExternal *data) : TypeDataOwner(data), _type(mtpc_inputMediaGifExternal) { } inline const MTPDinputMediaPhotoExternal &MTPinputMedia::c_inputMediaPhotoExternal() const { t_assert(_type == mtpc_inputMediaPhotoExternal); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaPhotoExternal *data) : TypeDataOwner(data), _type(mtpc_inputMediaPhotoExternal) { } inline const MTPDinputMediaDocumentExternal &MTPinputMedia::c_inputMediaDocumentExternal() const { t_assert(_type == mtpc_inputMediaDocumentExternal); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaDocumentExternal *data) : TypeDataOwner(data), _type(mtpc_inputMediaDocumentExternal) { } inline const MTPDinputMediaGame &MTPinputMedia::c_inputMediaGame() const { t_assert(_type == mtpc_inputMediaGame); return queryData(); } inline MTPinputMedia::MTPinputMedia(const MTPDinputMediaGame *data) : TypeDataOwner(data), _type(mtpc_inputMediaGame) { } inline MTPinputMedia MTP_inputMediaEmpty() { return MTP::internal::TypeCreator::new_inputMediaEmpty(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputMediaUploadedPhoto::Flags) inline MTPinputMedia MTP_inputMediaUploadedPhoto(const MTPflags &_flags, const MTPInputFile &_file, const MTPstring &_caption, const MTPVector &_stickers) { return MTP::internal::TypeCreator::new_inputMediaUploadedPhoto(_flags, _file, _caption, _stickers); } inline MTPinputMedia MTP_inputMediaPhoto(const MTPInputPhoto &_id, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaPhoto(_id, _caption); } inline MTPinputMedia MTP_inputMediaGeoPoint(const MTPInputGeoPoint &_geo_point) { return MTP::internal::TypeCreator::new_inputMediaGeoPoint(_geo_point); } inline MTPinputMedia MTP_inputMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name) { return MTP::internal::TypeCreator::new_inputMediaContact(_phone_number, _first_name, _last_name); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputMediaUploadedDocument::Flags) inline MTPinputMedia MTP_inputMediaUploadedDocument(const MTPflags &_flags, const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption, const MTPVector &_stickers) { return MTP::internal::TypeCreator::new_inputMediaUploadedDocument(_flags, _file, _mime_type, _attributes, _caption, _stickers); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputMediaUploadedThumbDocument::Flags) inline MTPinputMedia MTP_inputMediaUploadedThumbDocument(const MTPflags &_flags, const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption, const MTPVector &_stickers) { return MTP::internal::TypeCreator::new_inputMediaUploadedThumbDocument(_flags, _file, _thumb, _mime_type, _attributes, _caption, _stickers); } inline MTPinputMedia MTP_inputMediaDocument(const MTPInputDocument &_id, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaDocument(_id, _caption); } inline MTPinputMedia MTP_inputMediaVenue(const MTPInputGeoPoint &_geo_point, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id) { return MTP::internal::TypeCreator::new_inputMediaVenue(_geo_point, _title, _address, _provider, _venue_id); } inline MTPinputMedia MTP_inputMediaGifExternal(const MTPstring &_url, const MTPstring &_q) { return MTP::internal::TypeCreator::new_inputMediaGifExternal(_url, _q); } inline MTPinputMedia MTP_inputMediaPhotoExternal(const MTPstring &_url, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaPhotoExternal(_url, _caption); } inline MTPinputMedia MTP_inputMediaDocumentExternal(const MTPstring &_url, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaDocumentExternal(_url, _caption); } inline MTPinputMedia MTP_inputMediaGame(const MTPInputGame &_id) { return MTP::internal::TypeCreator::new_inputMediaGame(_id); } inline uint32 MTPinputChatPhoto::innerLength() const { switch (_type) { case mtpc_inputChatUploadedPhoto: { const MTPDinputChatUploadedPhoto &v(c_inputChatUploadedPhoto()); return v.vfile.innerLength(); } case mtpc_inputChatPhoto: { const MTPDinputChatPhoto &v(c_inputChatPhoto()); return v.vid.innerLength(); } } return 0; } inline mtpTypeId MTPinputChatPhoto::type() const { t_assert(_type != 0); return _type; } inline void MTPinputChatPhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputChatPhotoEmpty: _type = cons; break; case mtpc_inputChatUploadedPhoto: _type = cons; { auto v = new MTPDinputChatUploadedPhoto(); setData(v); v->vfile.read(from, end); } break; case mtpc_inputChatPhoto: _type = cons; { auto v = new MTPDinputChatPhoto(); setData(v); v->vid.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputChatPhoto"); } } inline void MTPinputChatPhoto::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputChatUploadedPhoto: { auto &v = c_inputChatUploadedPhoto(); v.vfile.write(to); } break; case mtpc_inputChatPhoto: { auto &v = c_inputChatPhoto(); v.vid.write(to); } break; } } inline MTPinputChatPhoto::MTPinputChatPhoto(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputChatPhotoEmpty: break; case mtpc_inputChatUploadedPhoto: setData(new MTPDinputChatUploadedPhoto()); break; case mtpc_inputChatPhoto: setData(new MTPDinputChatPhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPinputChatPhoto"); } } inline const MTPDinputChatUploadedPhoto &MTPinputChatPhoto::c_inputChatUploadedPhoto() const { t_assert(_type == mtpc_inputChatUploadedPhoto); return queryData(); } inline MTPinputChatPhoto::MTPinputChatPhoto(const MTPDinputChatUploadedPhoto *data) : TypeDataOwner(data), _type(mtpc_inputChatUploadedPhoto) { } inline const MTPDinputChatPhoto &MTPinputChatPhoto::c_inputChatPhoto() const { t_assert(_type == mtpc_inputChatPhoto); return queryData(); } inline MTPinputChatPhoto::MTPinputChatPhoto(const MTPDinputChatPhoto *data) : TypeDataOwner(data), _type(mtpc_inputChatPhoto) { } inline MTPinputChatPhoto MTP_inputChatPhotoEmpty() { return MTP::internal::TypeCreator::new_inputChatPhotoEmpty(); } inline MTPinputChatPhoto MTP_inputChatUploadedPhoto(const MTPInputFile &_file) { return MTP::internal::TypeCreator::new_inputChatUploadedPhoto(_file); } inline MTPinputChatPhoto MTP_inputChatPhoto(const MTPInputPhoto &_id) { return MTP::internal::TypeCreator::new_inputChatPhoto(_id); } inline uint32 MTPinputGeoPoint::innerLength() const { switch (_type) { case mtpc_inputGeoPoint: { const MTPDinputGeoPoint &v(c_inputGeoPoint()); return v.vlat.innerLength() + v.vlong.innerLength(); } } return 0; } inline mtpTypeId MTPinputGeoPoint::type() const { t_assert(_type != 0); return _type; } inline void MTPinputGeoPoint::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputGeoPointEmpty: _type = cons; break; case mtpc_inputGeoPoint: _type = cons; { auto v = new MTPDinputGeoPoint(); setData(v); v->vlat.read(from, end); v->vlong.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputGeoPoint"); } } inline void MTPinputGeoPoint::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputGeoPoint: { auto &v = c_inputGeoPoint(); v.vlat.write(to); v.vlong.write(to); } break; } } inline MTPinputGeoPoint::MTPinputGeoPoint(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputGeoPointEmpty: break; case mtpc_inputGeoPoint: setData(new MTPDinputGeoPoint()); break; default: throw mtpErrorBadTypeId(type, "MTPinputGeoPoint"); } } inline const MTPDinputGeoPoint &MTPinputGeoPoint::c_inputGeoPoint() const { t_assert(_type == mtpc_inputGeoPoint); return queryData(); } inline MTPinputGeoPoint::MTPinputGeoPoint(const MTPDinputGeoPoint *data) : TypeDataOwner(data), _type(mtpc_inputGeoPoint) { } inline MTPinputGeoPoint MTP_inputGeoPointEmpty() { return MTP::internal::TypeCreator::new_inputGeoPointEmpty(); } inline MTPinputGeoPoint MTP_inputGeoPoint(const MTPdouble &_lat, const MTPdouble &_long) { return MTP::internal::TypeCreator::new_inputGeoPoint(_lat, _long); } inline uint32 MTPinputPhoto::innerLength() const { switch (_type) { case mtpc_inputPhoto: { const MTPDinputPhoto &v(c_inputPhoto()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } } return 0; } inline mtpTypeId MTPinputPhoto::type() const { t_assert(_type != 0); return _type; } inline void MTPinputPhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputPhotoEmpty: _type = cons; break; case mtpc_inputPhoto: _type = cons; { auto v = new MTPDinputPhoto(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputPhoto"); } } inline void MTPinputPhoto::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputPhoto: { auto &v = c_inputPhoto(); v.vid.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputPhoto::MTPinputPhoto(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputPhotoEmpty: break; case mtpc_inputPhoto: setData(new MTPDinputPhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPinputPhoto"); } } inline const MTPDinputPhoto &MTPinputPhoto::c_inputPhoto() const { t_assert(_type == mtpc_inputPhoto); return queryData(); } inline MTPinputPhoto::MTPinputPhoto(const MTPDinputPhoto *data) : TypeDataOwner(data), _type(mtpc_inputPhoto) { } inline MTPinputPhoto MTP_inputPhotoEmpty() { return MTP::internal::TypeCreator::new_inputPhotoEmpty(); } inline MTPinputPhoto MTP_inputPhoto(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputPhoto(_id, _access_hash); } inline uint32 MTPinputFileLocation::innerLength() const { switch (_type) { case mtpc_inputFileLocation: { const MTPDinputFileLocation &v(c_inputFileLocation()); return v.vvolume_id.innerLength() + v.vlocal_id.innerLength() + v.vsecret.innerLength(); } case mtpc_inputEncryptedFileLocation: { const MTPDinputEncryptedFileLocation &v(c_inputEncryptedFileLocation()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } case mtpc_inputDocumentFileLocation: { const MTPDinputDocumentFileLocation &v(c_inputDocumentFileLocation()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vversion.innerLength(); } } return 0; } inline mtpTypeId MTPinputFileLocation::type() const { t_assert(_type != 0); return _type; } inline void MTPinputFileLocation::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputFileLocation: _type = cons; { auto v = new MTPDinputFileLocation(); setData(v); v->vvolume_id.read(from, end); v->vlocal_id.read(from, end); v->vsecret.read(from, end); } break; case mtpc_inputEncryptedFileLocation: _type = cons; { auto v = new MTPDinputEncryptedFileLocation(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } break; case mtpc_inputDocumentFileLocation: _type = cons; { auto v = new MTPDinputDocumentFileLocation(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vversion.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputFileLocation"); } } inline void MTPinputFileLocation::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputFileLocation: { auto &v = c_inputFileLocation(); v.vvolume_id.write(to); v.vlocal_id.write(to); v.vsecret.write(to); } break; case mtpc_inputEncryptedFileLocation: { auto &v = c_inputEncryptedFileLocation(); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputDocumentFileLocation: { auto &v = c_inputDocumentFileLocation(); v.vid.write(to); v.vaccess_hash.write(to); v.vversion.write(to); } break; } } inline MTPinputFileLocation::MTPinputFileLocation(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputFileLocation: setData(new MTPDinputFileLocation()); break; case mtpc_inputEncryptedFileLocation: setData(new MTPDinputEncryptedFileLocation()); break; case mtpc_inputDocumentFileLocation: setData(new MTPDinputDocumentFileLocation()); break; default: throw mtpErrorBadTypeId(type, "MTPinputFileLocation"); } } inline const MTPDinputFileLocation &MTPinputFileLocation::c_inputFileLocation() const { t_assert(_type == mtpc_inputFileLocation); return queryData(); } inline MTPinputFileLocation::MTPinputFileLocation(const MTPDinputFileLocation *data) : TypeDataOwner(data), _type(mtpc_inputFileLocation) { } inline const MTPDinputEncryptedFileLocation &MTPinputFileLocation::c_inputEncryptedFileLocation() const { t_assert(_type == mtpc_inputEncryptedFileLocation); return queryData(); } inline MTPinputFileLocation::MTPinputFileLocation(const MTPDinputEncryptedFileLocation *data) : TypeDataOwner(data), _type(mtpc_inputEncryptedFileLocation) { } inline const MTPDinputDocumentFileLocation &MTPinputFileLocation::c_inputDocumentFileLocation() const { t_assert(_type == mtpc_inputDocumentFileLocation); return queryData(); } inline MTPinputFileLocation::MTPinputFileLocation(const MTPDinputDocumentFileLocation *data) : TypeDataOwner(data), _type(mtpc_inputDocumentFileLocation) { } inline MTPinputFileLocation MTP_inputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTP::internal::TypeCreator::new_inputFileLocation(_volume_id, _local_id, _secret); } inline MTPinputFileLocation MTP_inputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputEncryptedFileLocation(_id, _access_hash); } inline MTPinputFileLocation MTP_inputDocumentFileLocation(const MTPlong &_id, const MTPlong &_access_hash, MTPint _version) { return MTP::internal::TypeCreator::new_inputDocumentFileLocation(_id, _access_hash, _version); } inline MTPinputAppEvent::MTPinputAppEvent() : TypeDataOwner(new MTPDinputAppEvent()) { } inline uint32 MTPinputAppEvent::innerLength() const { const MTPDinputAppEvent &v(c_inputAppEvent()); return v.vtime.innerLength() + v.vtype.innerLength() + v.vpeer.innerLength() + v.vdata.innerLength(); } inline mtpTypeId MTPinputAppEvent::type() const { return mtpc_inputAppEvent; } inline void MTPinputAppEvent::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inputAppEvent) throw mtpErrorUnexpected(cons, "MTPinputAppEvent"); auto v = new MTPDinputAppEvent(); setData(v); v->vtime.read(from, end); v->vtype.read(from, end); v->vpeer.read(from, end); v->vdata.read(from, end); } inline void MTPinputAppEvent::write(mtpBuffer &to) const { auto &v = c_inputAppEvent(); v.vtime.write(to); v.vtype.write(to); v.vpeer.write(to); v.vdata.write(to); } inline const MTPDinputAppEvent &MTPinputAppEvent::c_inputAppEvent() const { return queryData(); } inline MTPinputAppEvent::MTPinputAppEvent(const MTPDinputAppEvent *data) : TypeDataOwner(data) { } inline MTPinputAppEvent MTP_inputAppEvent(const MTPdouble &_time, const MTPstring &_type, const MTPlong &_peer, const MTPstring &_data) { return MTP::internal::TypeCreator::new_inputAppEvent(_time, _type, _peer, _data); } inline uint32 MTPpeer::innerLength() const { switch (_type) { case mtpc_peerUser: { const MTPDpeerUser &v(c_peerUser()); return v.vuser_id.innerLength(); } case mtpc_peerChat: { const MTPDpeerChat &v(c_peerChat()); return v.vchat_id.innerLength(); } case mtpc_peerChannel: { const MTPDpeerChannel &v(c_peerChannel()); return v.vchannel_id.innerLength(); } } return 0; } inline mtpTypeId MTPpeer::type() const { t_assert(_type != 0); return _type; } inline void MTPpeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_peerUser: _type = cons; { auto v = new MTPDpeerUser(); setData(v); v->vuser_id.read(from, end); } break; case mtpc_peerChat: _type = cons; { auto v = new MTPDpeerChat(); setData(v); v->vchat_id.read(from, end); } break; case mtpc_peerChannel: _type = cons; { auto v = new MTPDpeerChannel(); setData(v); v->vchannel_id.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPpeer"); } } inline void MTPpeer::write(mtpBuffer &to) const { switch (_type) { case mtpc_peerUser: { auto &v = c_peerUser(); v.vuser_id.write(to); } break; case mtpc_peerChat: { auto &v = c_peerChat(); v.vchat_id.write(to); } break; case mtpc_peerChannel: { auto &v = c_peerChannel(); v.vchannel_id.write(to); } break; } } inline MTPpeer::MTPpeer(mtpTypeId type) : _type(type) { switch (type) { case mtpc_peerUser: setData(new MTPDpeerUser()); break; case mtpc_peerChat: setData(new MTPDpeerChat()); break; case mtpc_peerChannel: setData(new MTPDpeerChannel()); break; default: throw mtpErrorBadTypeId(type, "MTPpeer"); } } inline const MTPDpeerUser &MTPpeer::c_peerUser() const { t_assert(_type == mtpc_peerUser); return queryData(); } inline MTPpeer::MTPpeer(const MTPDpeerUser *data) : TypeDataOwner(data), _type(mtpc_peerUser) { } inline const MTPDpeerChat &MTPpeer::c_peerChat() const { t_assert(_type == mtpc_peerChat); return queryData(); } inline MTPpeer::MTPpeer(const MTPDpeerChat *data) : TypeDataOwner(data), _type(mtpc_peerChat) { } inline const MTPDpeerChannel &MTPpeer::c_peerChannel() const { t_assert(_type == mtpc_peerChannel); return queryData(); } inline MTPpeer::MTPpeer(const MTPDpeerChannel *data) : TypeDataOwner(data), _type(mtpc_peerChannel) { } inline MTPpeer MTP_peerUser(MTPint _user_id) { return MTP::internal::TypeCreator::new_peerUser(_user_id); } inline MTPpeer MTP_peerChat(MTPint _chat_id) { return MTP::internal::TypeCreator::new_peerChat(_chat_id); } inline MTPpeer MTP_peerChannel(MTPint _channel_id) { return MTP::internal::TypeCreator::new_peerChannel(_channel_id); } inline uint32 MTPstorage_fileType::innerLength() const { return 0; } inline mtpTypeId MTPstorage_fileType::type() const { t_assert(_type != 0); return _type; } inline void MTPstorage_fileType::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_storage_fileUnknown: _type = cons; break; case mtpc_storage_fileJpeg: _type = cons; break; case mtpc_storage_fileGif: _type = cons; break; case mtpc_storage_filePng: _type = cons; break; case mtpc_storage_filePdf: _type = cons; break; case mtpc_storage_fileMp3: _type = cons; break; case mtpc_storage_fileMov: _type = cons; break; case mtpc_storage_filePartial: _type = cons; break; case mtpc_storage_fileMp4: _type = cons; break; case mtpc_storage_fileWebp: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPstorage_fileType"); } } inline void MTPstorage_fileType::write(mtpBuffer &to) const { } inline MTPstorage_fileType::MTPstorage_fileType(mtpTypeId type) : _type(type) { switch (type) { case mtpc_storage_fileUnknown: break; case mtpc_storage_fileJpeg: break; case mtpc_storage_fileGif: break; case mtpc_storage_filePng: break; case mtpc_storage_filePdf: break; case mtpc_storage_fileMp3: break; case mtpc_storage_fileMov: break; case mtpc_storage_filePartial: break; case mtpc_storage_fileMp4: break; case mtpc_storage_fileWebp: break; default: throw mtpErrorBadTypeId(type, "MTPstorage_fileType"); } } inline MTPstorage_fileType MTP_storage_fileUnknown() { return MTP::internal::TypeCreator::new_storage_fileUnknown(); } inline MTPstorage_fileType MTP_storage_fileJpeg() { return MTP::internal::TypeCreator::new_storage_fileJpeg(); } inline MTPstorage_fileType MTP_storage_fileGif() { return MTP::internal::TypeCreator::new_storage_fileGif(); } inline MTPstorage_fileType MTP_storage_filePng() { return MTP::internal::TypeCreator::new_storage_filePng(); } inline MTPstorage_fileType MTP_storage_filePdf() { return MTP::internal::TypeCreator::new_storage_filePdf(); } inline MTPstorage_fileType MTP_storage_fileMp3() { return MTP::internal::TypeCreator::new_storage_fileMp3(); } inline MTPstorage_fileType MTP_storage_fileMov() { return MTP::internal::TypeCreator::new_storage_fileMov(); } inline MTPstorage_fileType MTP_storage_filePartial() { return MTP::internal::TypeCreator::new_storage_filePartial(); } inline MTPstorage_fileType MTP_storage_fileMp4() { return MTP::internal::TypeCreator::new_storage_fileMp4(); } inline MTPstorage_fileType MTP_storage_fileWebp() { return MTP::internal::TypeCreator::new_storage_fileWebp(); } inline uint32 MTPfileLocation::innerLength() const { switch (_type) { case mtpc_fileLocationUnavailable: { const MTPDfileLocationUnavailable &v(c_fileLocationUnavailable()); return v.vvolume_id.innerLength() + v.vlocal_id.innerLength() + v.vsecret.innerLength(); } case mtpc_fileLocation: { const MTPDfileLocation &v(c_fileLocation()); return v.vdc_id.innerLength() + v.vvolume_id.innerLength() + v.vlocal_id.innerLength() + v.vsecret.innerLength(); } } return 0; } inline mtpTypeId MTPfileLocation::type() const { t_assert(_type != 0); return _type; } inline void MTPfileLocation::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_fileLocationUnavailable: _type = cons; { auto v = new MTPDfileLocationUnavailable(); setData(v); v->vvolume_id.read(from, end); v->vlocal_id.read(from, end); v->vsecret.read(from, end); } break; case mtpc_fileLocation: _type = cons; { auto v = new MTPDfileLocation(); setData(v); v->vdc_id.read(from, end); v->vvolume_id.read(from, end); v->vlocal_id.read(from, end); v->vsecret.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPfileLocation"); } } inline void MTPfileLocation::write(mtpBuffer &to) const { switch (_type) { case mtpc_fileLocationUnavailable: { auto &v = c_fileLocationUnavailable(); v.vvolume_id.write(to); v.vlocal_id.write(to); v.vsecret.write(to); } break; case mtpc_fileLocation: { auto &v = c_fileLocation(); v.vdc_id.write(to); v.vvolume_id.write(to); v.vlocal_id.write(to); v.vsecret.write(to); } break; } } inline MTPfileLocation::MTPfileLocation(mtpTypeId type) : _type(type) { switch (type) { case mtpc_fileLocationUnavailable: setData(new MTPDfileLocationUnavailable()); break; case mtpc_fileLocation: setData(new MTPDfileLocation()); break; default: throw mtpErrorBadTypeId(type, "MTPfileLocation"); } } inline const MTPDfileLocationUnavailable &MTPfileLocation::c_fileLocationUnavailable() const { t_assert(_type == mtpc_fileLocationUnavailable); return queryData(); } inline MTPfileLocation::MTPfileLocation(const MTPDfileLocationUnavailable *data) : TypeDataOwner(data), _type(mtpc_fileLocationUnavailable) { } inline const MTPDfileLocation &MTPfileLocation::c_fileLocation() const { t_assert(_type == mtpc_fileLocation); return queryData(); } inline MTPfileLocation::MTPfileLocation(const MTPDfileLocation *data) : TypeDataOwner(data), _type(mtpc_fileLocation) { } inline MTPfileLocation MTP_fileLocationUnavailable(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTP::internal::TypeCreator::new_fileLocationUnavailable(_volume_id, _local_id, _secret); } inline MTPfileLocation MTP_fileLocation(MTPint _dc_id, const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTP::internal::TypeCreator::new_fileLocation(_dc_id, _volume_id, _local_id, _secret); } inline uint32 MTPuser::innerLength() const { switch (_type) { case mtpc_userEmpty: { const MTPDuserEmpty &v(c_userEmpty()); return v.vid.innerLength(); } case mtpc_user: { const MTPDuser &v(c_user()); return v.vflags.innerLength() + v.vid.innerLength() + (v.has_access_hash() ? v.vaccess_hash.innerLength() : 0) + (v.has_first_name() ? v.vfirst_name.innerLength() : 0) + (v.has_last_name() ? v.vlast_name.innerLength() : 0) + (v.has_username() ? v.vusername.innerLength() : 0) + (v.has_phone() ? v.vphone.innerLength() : 0) + (v.has_photo() ? v.vphoto.innerLength() : 0) + (v.has_status() ? v.vstatus.innerLength() : 0) + (v.has_bot_info_version() ? v.vbot_info_version.innerLength() : 0) + (v.has_restriction_reason() ? v.vrestriction_reason.innerLength() : 0) + (v.has_bot_inline_placeholder() ? v.vbot_inline_placeholder.innerLength() : 0); } } return 0; } inline mtpTypeId MTPuser::type() const { t_assert(_type != 0); return _type; } inline void MTPuser::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_userEmpty: _type = cons; { auto v = new MTPDuserEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_user: _type = cons; { auto v = new MTPDuser(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); if (v->has_access_hash()) { v->vaccess_hash.read(from, end); } else { v->vaccess_hash = MTPlong(); } if (v->has_first_name()) { v->vfirst_name.read(from, end); } else { v->vfirst_name = MTPstring(); } if (v->has_last_name()) { v->vlast_name.read(from, end); } else { v->vlast_name = MTPstring(); } if (v->has_username()) { v->vusername.read(from, end); } else { v->vusername = MTPstring(); } if (v->has_phone()) { v->vphone.read(from, end); } else { v->vphone = MTPstring(); } if (v->has_photo()) { v->vphoto.read(from, end); } else { v->vphoto = MTPUserProfilePhoto(); } if (v->has_status()) { v->vstatus.read(from, end); } else { v->vstatus = MTPUserStatus(); } if (v->has_bot_info_version()) { v->vbot_info_version.read(from, end); } else { v->vbot_info_version = MTPint(); } if (v->has_restriction_reason()) { v->vrestriction_reason.read(from, end); } else { v->vrestriction_reason = MTPstring(); } if (v->has_bot_inline_placeholder()) { v->vbot_inline_placeholder.read(from, end); } else { v->vbot_inline_placeholder = MTPstring(); } } break; default: throw mtpErrorUnexpected(cons, "MTPuser"); } } inline void MTPuser::write(mtpBuffer &to) const { switch (_type) { case mtpc_userEmpty: { auto &v = c_userEmpty(); v.vid.write(to); } break; case mtpc_user: { auto &v = c_user(); v.vflags.write(to); v.vid.write(to); if (v.has_access_hash()) v.vaccess_hash.write(to); if (v.has_first_name()) v.vfirst_name.write(to); if (v.has_last_name()) v.vlast_name.write(to); if (v.has_username()) v.vusername.write(to); if (v.has_phone()) v.vphone.write(to); if (v.has_photo()) v.vphoto.write(to); if (v.has_status()) v.vstatus.write(to); if (v.has_bot_info_version()) v.vbot_info_version.write(to); if (v.has_restriction_reason()) v.vrestriction_reason.write(to); if (v.has_bot_inline_placeholder()) v.vbot_inline_placeholder.write(to); } break; } } inline MTPuser::MTPuser(mtpTypeId type) : _type(type) { switch (type) { case mtpc_userEmpty: setData(new MTPDuserEmpty()); break; case mtpc_user: setData(new MTPDuser()); break; default: throw mtpErrorBadTypeId(type, "MTPuser"); } } inline const MTPDuserEmpty &MTPuser::c_userEmpty() const { t_assert(_type == mtpc_userEmpty); return queryData(); } inline MTPuser::MTPuser(const MTPDuserEmpty *data) : TypeDataOwner(data), _type(mtpc_userEmpty) { } inline const MTPDuser &MTPuser::c_user() const { t_assert(_type == mtpc_user); return queryData(); } inline MTPuser::MTPuser(const MTPDuser *data) : TypeDataOwner(data), _type(mtpc_user) { } inline MTPuser MTP_userEmpty(MTPint _id) { return MTP::internal::TypeCreator::new_userEmpty(_id); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDuser::Flags) inline MTPuser MTP_user(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_username, const MTPstring &_phone, const MTPUserProfilePhoto &_photo, const MTPUserStatus &_status, MTPint _bot_info_version, const MTPstring &_restriction_reason, const MTPstring &_bot_inline_placeholder) { return MTP::internal::TypeCreator::new_user(_flags, _id, _access_hash, _first_name, _last_name, _username, _phone, _photo, _status, _bot_info_version, _restriction_reason, _bot_inline_placeholder); } inline uint32 MTPuserProfilePhoto::innerLength() const { switch (_type) { case mtpc_userProfilePhoto: { const MTPDuserProfilePhoto &v(c_userProfilePhoto()); return v.vphoto_id.innerLength() + v.vphoto_small.innerLength() + v.vphoto_big.innerLength(); } } return 0; } inline mtpTypeId MTPuserProfilePhoto::type() const { t_assert(_type != 0); return _type; } inline void MTPuserProfilePhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_userProfilePhotoEmpty: _type = cons; break; case mtpc_userProfilePhoto: _type = cons; { auto v = new MTPDuserProfilePhoto(); setData(v); v->vphoto_id.read(from, end); v->vphoto_small.read(from, end); v->vphoto_big.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPuserProfilePhoto"); } } inline void MTPuserProfilePhoto::write(mtpBuffer &to) const { switch (_type) { case mtpc_userProfilePhoto: { auto &v = c_userProfilePhoto(); v.vphoto_id.write(to); v.vphoto_small.write(to); v.vphoto_big.write(to); } break; } } inline MTPuserProfilePhoto::MTPuserProfilePhoto(mtpTypeId type) : _type(type) { switch (type) { case mtpc_userProfilePhotoEmpty: break; case mtpc_userProfilePhoto: setData(new MTPDuserProfilePhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPuserProfilePhoto"); } } inline const MTPDuserProfilePhoto &MTPuserProfilePhoto::c_userProfilePhoto() const { t_assert(_type == mtpc_userProfilePhoto); return queryData(); } inline MTPuserProfilePhoto::MTPuserProfilePhoto(const MTPDuserProfilePhoto *data) : TypeDataOwner(data), _type(mtpc_userProfilePhoto) { } inline MTPuserProfilePhoto MTP_userProfilePhotoEmpty() { return MTP::internal::TypeCreator::new_userProfilePhotoEmpty(); } inline MTPuserProfilePhoto MTP_userProfilePhoto(const MTPlong &_photo_id, const MTPFileLocation &_photo_small, const MTPFileLocation &_photo_big) { return MTP::internal::TypeCreator::new_userProfilePhoto(_photo_id, _photo_small, _photo_big); } inline uint32 MTPuserStatus::innerLength() const { switch (_type) { case mtpc_userStatusOnline: { const MTPDuserStatusOnline &v(c_userStatusOnline()); return v.vexpires.innerLength(); } case mtpc_userStatusOffline: { const MTPDuserStatusOffline &v(c_userStatusOffline()); return v.vwas_online.innerLength(); } } return 0; } inline mtpTypeId MTPuserStatus::type() const { t_assert(_type != 0); return _type; } inline void MTPuserStatus::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_userStatusEmpty: _type = cons; break; case mtpc_userStatusOnline: _type = cons; { auto v = new MTPDuserStatusOnline(); setData(v); v->vexpires.read(from, end); } break; case mtpc_userStatusOffline: _type = cons; { auto v = new MTPDuserStatusOffline(); setData(v); v->vwas_online.read(from, end); } break; case mtpc_userStatusRecently: _type = cons; break; case mtpc_userStatusLastWeek: _type = cons; break; case mtpc_userStatusLastMonth: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPuserStatus"); } } inline void MTPuserStatus::write(mtpBuffer &to) const { switch (_type) { case mtpc_userStatusOnline: { auto &v = c_userStatusOnline(); v.vexpires.write(to); } break; case mtpc_userStatusOffline: { auto &v = c_userStatusOffline(); v.vwas_online.write(to); } break; } } inline MTPuserStatus::MTPuserStatus(mtpTypeId type) : _type(type) { switch (type) { case mtpc_userStatusEmpty: break; case mtpc_userStatusOnline: setData(new MTPDuserStatusOnline()); break; case mtpc_userStatusOffline: setData(new MTPDuserStatusOffline()); break; case mtpc_userStatusRecently: break; case mtpc_userStatusLastWeek: break; case mtpc_userStatusLastMonth: break; default: throw mtpErrorBadTypeId(type, "MTPuserStatus"); } } inline const MTPDuserStatusOnline &MTPuserStatus::c_userStatusOnline() const { t_assert(_type == mtpc_userStatusOnline); return queryData(); } inline MTPuserStatus::MTPuserStatus(const MTPDuserStatusOnline *data) : TypeDataOwner(data), _type(mtpc_userStatusOnline) { } inline const MTPDuserStatusOffline &MTPuserStatus::c_userStatusOffline() const { t_assert(_type == mtpc_userStatusOffline); return queryData(); } inline MTPuserStatus::MTPuserStatus(const MTPDuserStatusOffline *data) : TypeDataOwner(data), _type(mtpc_userStatusOffline) { } inline MTPuserStatus MTP_userStatusEmpty() { return MTP::internal::TypeCreator::new_userStatusEmpty(); } inline MTPuserStatus MTP_userStatusOnline(MTPint _expires) { return MTP::internal::TypeCreator::new_userStatusOnline(_expires); } inline MTPuserStatus MTP_userStatusOffline(MTPint _was_online) { return MTP::internal::TypeCreator::new_userStatusOffline(_was_online); } inline MTPuserStatus MTP_userStatusRecently() { return MTP::internal::TypeCreator::new_userStatusRecently(); } inline MTPuserStatus MTP_userStatusLastWeek() { return MTP::internal::TypeCreator::new_userStatusLastWeek(); } inline MTPuserStatus MTP_userStatusLastMonth() { return MTP::internal::TypeCreator::new_userStatusLastMonth(); } inline uint32 MTPchat::innerLength() const { switch (_type) { case mtpc_chatEmpty: { const MTPDchatEmpty &v(c_chatEmpty()); return v.vid.innerLength(); } case mtpc_chat: { const MTPDchat &v(c_chat()); return v.vflags.innerLength() + v.vid.innerLength() + v.vtitle.innerLength() + v.vphoto.innerLength() + v.vparticipants_count.innerLength() + v.vdate.innerLength() + v.vversion.innerLength() + (v.has_migrated_to() ? v.vmigrated_to.innerLength() : 0); } case mtpc_chatForbidden: { const MTPDchatForbidden &v(c_chatForbidden()); return v.vid.innerLength() + v.vtitle.innerLength(); } case mtpc_channel: { const MTPDchannel &v(c_channel()); return v.vflags.innerLength() + v.vid.innerLength() + (v.has_access_hash() ? v.vaccess_hash.innerLength() : 0) + v.vtitle.innerLength() + (v.has_username() ? v.vusername.innerLength() : 0) + v.vphoto.innerLength() + v.vdate.innerLength() + v.vversion.innerLength() + (v.has_restriction_reason() ? v.vrestriction_reason.innerLength() : 0); } case mtpc_channelForbidden: { const MTPDchannelForbidden &v(c_channelForbidden()); return v.vflags.innerLength() + v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vtitle.innerLength(); } } return 0; } inline mtpTypeId MTPchat::type() const { t_assert(_type != 0); return _type; } inline void MTPchat::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatEmpty: _type = cons; { auto v = new MTPDchatEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_chat: _type = cons; { auto v = new MTPDchat(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vtitle.read(from, end); v->vphoto.read(from, end); v->vparticipants_count.read(from, end); v->vdate.read(from, end); v->vversion.read(from, end); if (v->has_migrated_to()) { v->vmigrated_to.read(from, end); } else { v->vmigrated_to = MTPInputChannel(); } } break; case mtpc_chatForbidden: _type = cons; { auto v = new MTPDchatForbidden(); setData(v); v->vid.read(from, end); v->vtitle.read(from, end); } break; case mtpc_channel: _type = cons; { auto v = new MTPDchannel(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); if (v->has_access_hash()) { v->vaccess_hash.read(from, end); } else { v->vaccess_hash = MTPlong(); } v->vtitle.read(from, end); if (v->has_username()) { v->vusername.read(from, end); } else { v->vusername = MTPstring(); } v->vphoto.read(from, end); v->vdate.read(from, end); v->vversion.read(from, end); if (v->has_restriction_reason()) { v->vrestriction_reason.read(from, end); } else { v->vrestriction_reason = MTPstring(); } } break; case mtpc_channelForbidden: _type = cons; { auto v = new MTPDchannelForbidden(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vtitle.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchat"); } } inline void MTPchat::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatEmpty: { auto &v = c_chatEmpty(); v.vid.write(to); } break; case mtpc_chat: { auto &v = c_chat(); v.vflags.write(to); v.vid.write(to); v.vtitle.write(to); v.vphoto.write(to); v.vparticipants_count.write(to); v.vdate.write(to); v.vversion.write(to); if (v.has_migrated_to()) v.vmigrated_to.write(to); } break; case mtpc_chatForbidden: { auto &v = c_chatForbidden(); v.vid.write(to); v.vtitle.write(to); } break; case mtpc_channel: { auto &v = c_channel(); v.vflags.write(to); v.vid.write(to); if (v.has_access_hash()) v.vaccess_hash.write(to); v.vtitle.write(to); if (v.has_username()) v.vusername.write(to); v.vphoto.write(to); v.vdate.write(to); v.vversion.write(to); if (v.has_restriction_reason()) v.vrestriction_reason.write(to); } break; case mtpc_channelForbidden: { auto &v = c_channelForbidden(); v.vflags.write(to); v.vid.write(to); v.vaccess_hash.write(to); v.vtitle.write(to); } break; } } inline MTPchat::MTPchat(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatEmpty: setData(new MTPDchatEmpty()); break; case mtpc_chat: setData(new MTPDchat()); break; case mtpc_chatForbidden: setData(new MTPDchatForbidden()); break; case mtpc_channel: setData(new MTPDchannel()); break; case mtpc_channelForbidden: setData(new MTPDchannelForbidden()); break; default: throw mtpErrorBadTypeId(type, "MTPchat"); } } inline const MTPDchatEmpty &MTPchat::c_chatEmpty() const { t_assert(_type == mtpc_chatEmpty); return queryData(); } inline MTPchat::MTPchat(const MTPDchatEmpty *data) : TypeDataOwner(data), _type(mtpc_chatEmpty) { } inline const MTPDchat &MTPchat::c_chat() const { t_assert(_type == mtpc_chat); return queryData(); } inline MTPchat::MTPchat(const MTPDchat *data) : TypeDataOwner(data), _type(mtpc_chat) { } inline const MTPDchatForbidden &MTPchat::c_chatForbidden() const { t_assert(_type == mtpc_chatForbidden); return queryData(); } inline MTPchat::MTPchat(const MTPDchatForbidden *data) : TypeDataOwner(data), _type(mtpc_chatForbidden) { } inline const MTPDchannel &MTPchat::c_channel() const { t_assert(_type == mtpc_channel); return queryData(); } inline MTPchat::MTPchat(const MTPDchannel *data) : TypeDataOwner(data), _type(mtpc_channel) { } inline const MTPDchannelForbidden &MTPchat::c_channelForbidden() const { t_assert(_type == mtpc_channelForbidden); return queryData(); } inline MTPchat::MTPchat(const MTPDchannelForbidden *data) : TypeDataOwner(data), _type(mtpc_channelForbidden) { } inline MTPchat MTP_chatEmpty(MTPint _id) { return MTP::internal::TypeCreator::new_chatEmpty(_id); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchat::Flags) inline MTPchat MTP_chat(const MTPflags &_flags, MTPint _id, const MTPstring &_title, const MTPChatPhoto &_photo, MTPint _participants_count, MTPint _date, MTPint _version, const MTPInputChannel &_migrated_to) { return MTP::internal::TypeCreator::new_chat(_flags, _id, _title, _photo, _participants_count, _date, _version, _migrated_to); } inline MTPchat MTP_chatForbidden(MTPint _id, const MTPstring &_title) { return MTP::internal::TypeCreator::new_chatForbidden(_id, _title); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchannel::Flags) inline MTPchat MTP_channel(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_title, const MTPstring &_username, const MTPChatPhoto &_photo, MTPint _date, MTPint _version, const MTPstring &_restriction_reason) { return MTP::internal::TypeCreator::new_channel(_flags, _id, _access_hash, _title, _username, _photo, _date, _version, _restriction_reason); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchannelForbidden::Flags) inline MTPchat MTP_channelForbidden(const MTPflags &_flags, MTPint _id, const MTPlong &_access_hash, const MTPstring &_title) { return MTP::internal::TypeCreator::new_channelForbidden(_flags, _id, _access_hash, _title); } inline uint32 MTPchatFull::innerLength() const { switch (_type) { case mtpc_chatFull: { const MTPDchatFull &v(c_chatFull()); return v.vid.innerLength() + v.vparticipants.innerLength() + v.vchat_photo.innerLength() + v.vnotify_settings.innerLength() + v.vexported_invite.innerLength() + v.vbot_info.innerLength(); } case mtpc_channelFull: { const MTPDchannelFull &v(c_channelFull()); return v.vflags.innerLength() + v.vid.innerLength() + v.vabout.innerLength() + (v.has_participants_count() ? v.vparticipants_count.innerLength() : 0) + (v.has_admins_count() ? v.vadmins_count.innerLength() : 0) + (v.has_kicked_count() ? v.vkicked_count.innerLength() : 0) + v.vread_inbox_max_id.innerLength() + v.vread_outbox_max_id.innerLength() + v.vunread_count.innerLength() + v.vchat_photo.innerLength() + v.vnotify_settings.innerLength() + v.vexported_invite.innerLength() + v.vbot_info.innerLength() + (v.has_migrated_from_chat_id() ? v.vmigrated_from_chat_id.innerLength() : 0) + (v.has_migrated_from_max_id() ? v.vmigrated_from_max_id.innerLength() : 0) + (v.has_pinned_msg_id() ? v.vpinned_msg_id.innerLength() : 0); } } return 0; } inline mtpTypeId MTPchatFull::type() const { t_assert(_type != 0); return _type; } inline void MTPchatFull::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatFull: _type = cons; { auto v = new MTPDchatFull(); setData(v); v->vid.read(from, end); v->vparticipants.read(from, end); v->vchat_photo.read(from, end); v->vnotify_settings.read(from, end); v->vexported_invite.read(from, end); v->vbot_info.read(from, end); } break; case mtpc_channelFull: _type = cons; { auto v = new MTPDchannelFull(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vabout.read(from, end); if (v->has_participants_count()) { v->vparticipants_count.read(from, end); } else { v->vparticipants_count = MTPint(); } if (v->has_admins_count()) { v->vadmins_count.read(from, end); } else { v->vadmins_count = MTPint(); } if (v->has_kicked_count()) { v->vkicked_count.read(from, end); } else { v->vkicked_count = MTPint(); } v->vread_inbox_max_id.read(from, end); v->vread_outbox_max_id.read(from, end); v->vunread_count.read(from, end); v->vchat_photo.read(from, end); v->vnotify_settings.read(from, end); v->vexported_invite.read(from, end); v->vbot_info.read(from, end); if (v->has_migrated_from_chat_id()) { v->vmigrated_from_chat_id.read(from, end); } else { v->vmigrated_from_chat_id = MTPint(); } if (v->has_migrated_from_max_id()) { v->vmigrated_from_max_id.read(from, end); } else { v->vmigrated_from_max_id = MTPint(); } if (v->has_pinned_msg_id()) { v->vpinned_msg_id.read(from, end); } else { v->vpinned_msg_id = MTPint(); } } break; default: throw mtpErrorUnexpected(cons, "MTPchatFull"); } } inline void MTPchatFull::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatFull: { auto &v = c_chatFull(); v.vid.write(to); v.vparticipants.write(to); v.vchat_photo.write(to); v.vnotify_settings.write(to); v.vexported_invite.write(to); v.vbot_info.write(to); } break; case mtpc_channelFull: { auto &v = c_channelFull(); v.vflags.write(to); v.vid.write(to); v.vabout.write(to); if (v.has_participants_count()) v.vparticipants_count.write(to); if (v.has_admins_count()) v.vadmins_count.write(to); if (v.has_kicked_count()) v.vkicked_count.write(to); v.vread_inbox_max_id.write(to); v.vread_outbox_max_id.write(to); v.vunread_count.write(to); v.vchat_photo.write(to); v.vnotify_settings.write(to); v.vexported_invite.write(to); v.vbot_info.write(to); if (v.has_migrated_from_chat_id()) v.vmigrated_from_chat_id.write(to); if (v.has_migrated_from_max_id()) v.vmigrated_from_max_id.write(to); if (v.has_pinned_msg_id()) v.vpinned_msg_id.write(to); } break; } } inline MTPchatFull::MTPchatFull(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatFull: setData(new MTPDchatFull()); break; case mtpc_channelFull: setData(new MTPDchannelFull()); break; default: throw mtpErrorBadTypeId(type, "MTPchatFull"); } } inline const MTPDchatFull &MTPchatFull::c_chatFull() const { t_assert(_type == mtpc_chatFull); return queryData(); } inline MTPchatFull::MTPchatFull(const MTPDchatFull *data) : TypeDataOwner(data), _type(mtpc_chatFull) { } inline const MTPDchannelFull &MTPchatFull::c_channelFull() const { t_assert(_type == mtpc_channelFull); return queryData(); } inline MTPchatFull::MTPchatFull(const MTPDchannelFull *data) : TypeDataOwner(data), _type(mtpc_channelFull) { } inline MTPchatFull MTP_chatFull(MTPint _id, const MTPChatParticipants &_participants, const MTPPhoto &_chat_photo, const MTPPeerNotifySettings &_notify_settings, const MTPExportedChatInvite &_exported_invite, const MTPVector &_bot_info) { return MTP::internal::TypeCreator::new_chatFull(_id, _participants, _chat_photo, _notify_settings, _exported_invite, _bot_info); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchannelFull::Flags) inline MTPchatFull MTP_channelFull(const MTPflags &_flags, MTPint _id, const MTPstring &_about, MTPint _participants_count, MTPint _admins_count, MTPint _kicked_count, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPPhoto &_chat_photo, const MTPPeerNotifySettings &_notify_settings, const MTPExportedChatInvite &_exported_invite, const MTPVector &_bot_info, MTPint _migrated_from_chat_id, MTPint _migrated_from_max_id, MTPint _pinned_msg_id) { return MTP::internal::TypeCreator::new_channelFull(_flags, _id, _about, _participants_count, _admins_count, _kicked_count, _read_inbox_max_id, _read_outbox_max_id, _unread_count, _chat_photo, _notify_settings, _exported_invite, _bot_info, _migrated_from_chat_id, _migrated_from_max_id, _pinned_msg_id); } inline uint32 MTPchatParticipant::innerLength() const { switch (_type) { case mtpc_chatParticipant: { const MTPDchatParticipant &v(c_chatParticipant()); return v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vdate.innerLength(); } case mtpc_chatParticipantCreator: { const MTPDchatParticipantCreator &v(c_chatParticipantCreator()); return v.vuser_id.innerLength(); } case mtpc_chatParticipantAdmin: { const MTPDchatParticipantAdmin &v(c_chatParticipantAdmin()); return v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vdate.innerLength(); } } return 0; } inline mtpTypeId MTPchatParticipant::type() const { t_assert(_type != 0); return _type; } inline void MTPchatParticipant::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatParticipant: _type = cons; { auto v = new MTPDchatParticipant(); setData(v); v->vuser_id.read(from, end); v->vinviter_id.read(from, end); v->vdate.read(from, end); } break; case mtpc_chatParticipantCreator: _type = cons; { auto v = new MTPDchatParticipantCreator(); setData(v); v->vuser_id.read(from, end); } break; case mtpc_chatParticipantAdmin: _type = cons; { auto v = new MTPDchatParticipantAdmin(); setData(v); v->vuser_id.read(from, end); v->vinviter_id.read(from, end); v->vdate.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchatParticipant"); } } inline void MTPchatParticipant::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatParticipant: { auto &v = c_chatParticipant(); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_chatParticipantCreator: { auto &v = c_chatParticipantCreator(); v.vuser_id.write(to); } break; case mtpc_chatParticipantAdmin: { auto &v = c_chatParticipantAdmin(); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; } } inline MTPchatParticipant::MTPchatParticipant(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatParticipant: setData(new MTPDchatParticipant()); break; case mtpc_chatParticipantCreator: setData(new MTPDchatParticipantCreator()); break; case mtpc_chatParticipantAdmin: setData(new MTPDchatParticipantAdmin()); break; default: throw mtpErrorBadTypeId(type, "MTPchatParticipant"); } } inline const MTPDchatParticipant &MTPchatParticipant::c_chatParticipant() const { t_assert(_type == mtpc_chatParticipant); return queryData(); } inline MTPchatParticipant::MTPchatParticipant(const MTPDchatParticipant *data) : TypeDataOwner(data), _type(mtpc_chatParticipant) { } inline const MTPDchatParticipantCreator &MTPchatParticipant::c_chatParticipantCreator() const { t_assert(_type == mtpc_chatParticipantCreator); return queryData(); } inline MTPchatParticipant::MTPchatParticipant(const MTPDchatParticipantCreator *data) : TypeDataOwner(data), _type(mtpc_chatParticipantCreator) { } inline const MTPDchatParticipantAdmin &MTPchatParticipant::c_chatParticipantAdmin() const { t_assert(_type == mtpc_chatParticipantAdmin); return queryData(); } inline MTPchatParticipant::MTPchatParticipant(const MTPDchatParticipantAdmin *data) : TypeDataOwner(data), _type(mtpc_chatParticipantAdmin) { } inline MTPchatParticipant MTP_chatParticipant(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTP::internal::TypeCreator::new_chatParticipant(_user_id, _inviter_id, _date); } inline MTPchatParticipant MTP_chatParticipantCreator(MTPint _user_id) { return MTP::internal::TypeCreator::new_chatParticipantCreator(_user_id); } inline MTPchatParticipant MTP_chatParticipantAdmin(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTP::internal::TypeCreator::new_chatParticipantAdmin(_user_id, _inviter_id, _date); } inline uint32 MTPchatParticipants::innerLength() const { switch (_type) { case mtpc_chatParticipantsForbidden: { const MTPDchatParticipantsForbidden &v(c_chatParticipantsForbidden()); return v.vflags.innerLength() + v.vchat_id.innerLength() + (v.has_self_participant() ? v.vself_participant.innerLength() : 0); } case mtpc_chatParticipants: { const MTPDchatParticipants &v(c_chatParticipants()); return v.vchat_id.innerLength() + v.vparticipants.innerLength() + v.vversion.innerLength(); } } return 0; } inline mtpTypeId MTPchatParticipants::type() const { t_assert(_type != 0); return _type; } inline void MTPchatParticipants::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatParticipantsForbidden: _type = cons; { auto v = new MTPDchatParticipantsForbidden(); setData(v); v->vflags.read(from, end); v->vchat_id.read(from, end); if (v->has_self_participant()) { v->vself_participant.read(from, end); } else { v->vself_participant = MTPChatParticipant(); } } break; case mtpc_chatParticipants: _type = cons; { auto v = new MTPDchatParticipants(); setData(v); v->vchat_id.read(from, end); v->vparticipants.read(from, end); v->vversion.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchatParticipants"); } } inline void MTPchatParticipants::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatParticipantsForbidden: { auto &v = c_chatParticipantsForbidden(); v.vflags.write(to); v.vchat_id.write(to); if (v.has_self_participant()) v.vself_participant.write(to); } break; case mtpc_chatParticipants: { auto &v = c_chatParticipants(); v.vchat_id.write(to); v.vparticipants.write(to); v.vversion.write(to); } break; } } inline MTPchatParticipants::MTPchatParticipants(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatParticipantsForbidden: setData(new MTPDchatParticipantsForbidden()); break; case mtpc_chatParticipants: setData(new MTPDchatParticipants()); break; default: throw mtpErrorBadTypeId(type, "MTPchatParticipants"); } } inline const MTPDchatParticipantsForbidden &MTPchatParticipants::c_chatParticipantsForbidden() const { t_assert(_type == mtpc_chatParticipantsForbidden); return queryData(); } inline MTPchatParticipants::MTPchatParticipants(const MTPDchatParticipantsForbidden *data) : TypeDataOwner(data), _type(mtpc_chatParticipantsForbidden) { } inline const MTPDchatParticipants &MTPchatParticipants::c_chatParticipants() const { t_assert(_type == mtpc_chatParticipants); return queryData(); } inline MTPchatParticipants::MTPchatParticipants(const MTPDchatParticipants *data) : TypeDataOwner(data), _type(mtpc_chatParticipants) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchatParticipantsForbidden::Flags) inline MTPchatParticipants MTP_chatParticipantsForbidden(const MTPflags &_flags, MTPint _chat_id, const MTPChatParticipant &_self_participant) { return MTP::internal::TypeCreator::new_chatParticipantsForbidden(_flags, _chat_id, _self_participant); } inline MTPchatParticipants MTP_chatParticipants(MTPint _chat_id, const MTPVector &_participants, MTPint _version) { return MTP::internal::TypeCreator::new_chatParticipants(_chat_id, _participants, _version); } inline uint32 MTPchatPhoto::innerLength() const { switch (_type) { case mtpc_chatPhoto: { const MTPDchatPhoto &v(c_chatPhoto()); return v.vphoto_small.innerLength() + v.vphoto_big.innerLength(); } } return 0; } inline mtpTypeId MTPchatPhoto::type() const { t_assert(_type != 0); return _type; } inline void MTPchatPhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatPhotoEmpty: _type = cons; break; case mtpc_chatPhoto: _type = cons; { auto v = new MTPDchatPhoto(); setData(v); v->vphoto_small.read(from, end); v->vphoto_big.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchatPhoto"); } } inline void MTPchatPhoto::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatPhoto: { auto &v = c_chatPhoto(); v.vphoto_small.write(to); v.vphoto_big.write(to); } break; } } inline MTPchatPhoto::MTPchatPhoto(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatPhotoEmpty: break; case mtpc_chatPhoto: setData(new MTPDchatPhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPchatPhoto"); } } inline const MTPDchatPhoto &MTPchatPhoto::c_chatPhoto() const { t_assert(_type == mtpc_chatPhoto); return queryData(); } inline MTPchatPhoto::MTPchatPhoto(const MTPDchatPhoto *data) : TypeDataOwner(data), _type(mtpc_chatPhoto) { } inline MTPchatPhoto MTP_chatPhotoEmpty() { return MTP::internal::TypeCreator::new_chatPhotoEmpty(); } inline MTPchatPhoto MTP_chatPhoto(const MTPFileLocation &_photo_small, const MTPFileLocation &_photo_big) { return MTP::internal::TypeCreator::new_chatPhoto(_photo_small, _photo_big); } inline uint32 MTPmessage::innerLength() const { switch (_type) { case mtpc_messageEmpty: { const MTPDmessageEmpty &v(c_messageEmpty()); return v.vid.innerLength(); } case mtpc_message: { const MTPDmessage &v(c_message()); return v.vflags.innerLength() + v.vid.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vto_id.innerLength() + (v.has_fwd_from() ? v.vfwd_from.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vdate.innerLength() + v.vmessage.innerLength() + (v.has_media() ? v.vmedia.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_views() ? v.vviews.innerLength() : 0) + (v.has_edit_date() ? v.vedit_date.innerLength() : 0); } case mtpc_messageService: { const MTPDmessageService &v(c_messageService()); return v.vflags.innerLength() + v.vid.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vto_id.innerLength() + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vdate.innerLength() + v.vaction.innerLength(); } } return 0; } inline mtpTypeId MTPmessage::type() const { t_assert(_type != 0); return _type; } inline void MTPmessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messageEmpty: _type = cons; { auto v = new MTPDmessageEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_message: _type = cons; { auto v = new MTPDmessage(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); if (v->has_from_id()) { v->vfrom_id.read(from, end); } else { v->vfrom_id = MTPint(); } v->vto_id.read(from, end); if (v->has_fwd_from()) { v->vfwd_from.read(from, end); } else { v->vfwd_from = MTPMessageFwdHeader(); } if (v->has_via_bot_id()) { v->vvia_bot_id.read(from, end); } else { v->vvia_bot_id = MTPint(); } if (v->has_reply_to_msg_id()) { v->vreply_to_msg_id.read(from, end); } else { v->vreply_to_msg_id = MTPint(); } v->vdate.read(from, end); v->vmessage.read(from, end); if (v->has_media()) { v->vmedia.read(from, end); } else { v->vmedia = MTPMessageMedia(); } if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } if (v->has_views()) { v->vviews.read(from, end); } else { v->vviews = MTPint(); } if (v->has_edit_date()) { v->vedit_date.read(from, end); } else { v->vedit_date = MTPint(); } } break; case mtpc_messageService: _type = cons; { auto v = new MTPDmessageService(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); if (v->has_from_id()) { v->vfrom_id.read(from, end); } else { v->vfrom_id = MTPint(); } v->vto_id.read(from, end); if (v->has_reply_to_msg_id()) { v->vreply_to_msg_id.read(from, end); } else { v->vreply_to_msg_id = MTPint(); } v->vdate.read(from, end); v->vaction.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessage"); } } inline void MTPmessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_messageEmpty: { auto &v = c_messageEmpty(); v.vid.write(to); } break; case mtpc_message: { auto &v = c_message(); v.vflags.write(to); v.vid.write(to); if (v.has_from_id()) v.vfrom_id.write(to); v.vto_id.write(to); if (v.has_fwd_from()) v.vfwd_from.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); v.vdate.write(to); v.vmessage.write(to); if (v.has_media()) v.vmedia.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); if (v.has_entities()) v.ventities.write(to); if (v.has_views()) v.vviews.write(to); if (v.has_edit_date()) v.vedit_date.write(to); } break; case mtpc_messageService: { auto &v = c_messageService(); v.vflags.write(to); v.vid.write(to); if (v.has_from_id()) v.vfrom_id.write(to); v.vto_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); v.vdate.write(to); v.vaction.write(to); } break; } } inline MTPmessage::MTPmessage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messageEmpty: setData(new MTPDmessageEmpty()); break; case mtpc_message: setData(new MTPDmessage()); break; case mtpc_messageService: setData(new MTPDmessageService()); break; default: throw mtpErrorBadTypeId(type, "MTPmessage"); } } inline const MTPDmessageEmpty &MTPmessage::c_messageEmpty() const { t_assert(_type == mtpc_messageEmpty); return queryData(); } inline MTPmessage::MTPmessage(const MTPDmessageEmpty *data) : TypeDataOwner(data), _type(mtpc_messageEmpty) { } inline const MTPDmessage &MTPmessage::c_message() const { t_assert(_type == mtpc_message); return queryData(); } inline MTPmessage::MTPmessage(const MTPDmessage *data) : TypeDataOwner(data), _type(mtpc_message) { } inline const MTPDmessageService &MTPmessage::c_messageService() const { t_assert(_type == mtpc_messageService); return queryData(); } inline MTPmessage::MTPmessage(const MTPDmessageService *data) : TypeDataOwner(data), _type(mtpc_messageService) { } inline MTPmessage MTP_messageEmpty(MTPint _id) { return MTP::internal::TypeCreator::new_messageEmpty(_id); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessage::Flags) inline MTPmessage MTP_message(const MTPflags &_flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views, MTPint _edit_date) { return MTP::internal::TypeCreator::new_message(_flags, _id, _from_id, _to_id, _fwd_from, _via_bot_id, _reply_to_msg_id, _date, _message, _media, _reply_markup, _entities, _views, _edit_date); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessageService::Flags) inline MTPmessage MTP_messageService(const MTPflags &_flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _reply_to_msg_id, MTPint _date, const MTPMessageAction &_action) { return MTP::internal::TypeCreator::new_messageService(_flags, _id, _from_id, _to_id, _reply_to_msg_id, _date, _action); } inline uint32 MTPmessageMedia::innerLength() const { switch (_type) { case mtpc_messageMediaPhoto: { const MTPDmessageMediaPhoto &v(c_messageMediaPhoto()); return v.vphoto.innerLength() + v.vcaption.innerLength(); } case mtpc_messageMediaGeo: { const MTPDmessageMediaGeo &v(c_messageMediaGeo()); return v.vgeo.innerLength(); } case mtpc_messageMediaContact: { const MTPDmessageMediaContact &v(c_messageMediaContact()); return v.vphone_number.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength() + v.vuser_id.innerLength(); } case mtpc_messageMediaDocument: { const MTPDmessageMediaDocument &v(c_messageMediaDocument()); return v.vdocument.innerLength() + v.vcaption.innerLength(); } case mtpc_messageMediaWebPage: { const MTPDmessageMediaWebPage &v(c_messageMediaWebPage()); return v.vwebpage.innerLength(); } case mtpc_messageMediaVenue: { const MTPDmessageMediaVenue &v(c_messageMediaVenue()); return v.vgeo.innerLength() + v.vtitle.innerLength() + v.vaddress.innerLength() + v.vprovider.innerLength() + v.vvenue_id.innerLength(); } case mtpc_messageMediaGame: { const MTPDmessageMediaGame &v(c_messageMediaGame()); return v.vgame.innerLength(); } } return 0; } inline mtpTypeId MTPmessageMedia::type() const { t_assert(_type != 0); return _type; } inline void MTPmessageMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messageMediaEmpty: _type = cons; break; case mtpc_messageMediaPhoto: _type = cons; { auto v = new MTPDmessageMediaPhoto(); setData(v); v->vphoto.read(from, end); v->vcaption.read(from, end); } break; case mtpc_messageMediaGeo: _type = cons; { auto v = new MTPDmessageMediaGeo(); setData(v); v->vgeo.read(from, end); } break; case mtpc_messageMediaContact: _type = cons; { auto v = new MTPDmessageMediaContact(); setData(v); v->vphone_number.read(from, end); v->vfirst_name.read(from, end); v->vlast_name.read(from, end); v->vuser_id.read(from, end); } break; case mtpc_messageMediaUnsupported: _type = cons; break; case mtpc_messageMediaDocument: _type = cons; { auto v = new MTPDmessageMediaDocument(); setData(v); v->vdocument.read(from, end); v->vcaption.read(from, end); } break; case mtpc_messageMediaWebPage: _type = cons; { auto v = new MTPDmessageMediaWebPage(); setData(v); v->vwebpage.read(from, end); } break; case mtpc_messageMediaVenue: _type = cons; { auto v = new MTPDmessageMediaVenue(); setData(v); v->vgeo.read(from, end); v->vtitle.read(from, end); v->vaddress.read(from, end); v->vprovider.read(from, end); v->vvenue_id.read(from, end); } break; case mtpc_messageMediaGame: _type = cons; { auto v = new MTPDmessageMediaGame(); setData(v); v->vgame.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessageMedia"); } } inline void MTPmessageMedia::write(mtpBuffer &to) const { switch (_type) { case mtpc_messageMediaPhoto: { auto &v = c_messageMediaPhoto(); v.vphoto.write(to); v.vcaption.write(to); } break; case mtpc_messageMediaGeo: { auto &v = c_messageMediaGeo(); v.vgeo.write(to); } break; case mtpc_messageMediaContact: { auto &v = c_messageMediaContact(); v.vphone_number.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); v.vuser_id.write(to); } break; case mtpc_messageMediaDocument: { auto &v = c_messageMediaDocument(); v.vdocument.write(to); v.vcaption.write(to); } break; case mtpc_messageMediaWebPage: { auto &v = c_messageMediaWebPage(); v.vwebpage.write(to); } break; case mtpc_messageMediaVenue: { auto &v = c_messageMediaVenue(); v.vgeo.write(to); v.vtitle.write(to); v.vaddress.write(to); v.vprovider.write(to); v.vvenue_id.write(to); } break; case mtpc_messageMediaGame: { auto &v = c_messageMediaGame(); v.vgame.write(to); } break; } } inline MTPmessageMedia::MTPmessageMedia(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messageMediaEmpty: break; case mtpc_messageMediaPhoto: setData(new MTPDmessageMediaPhoto()); break; case mtpc_messageMediaGeo: setData(new MTPDmessageMediaGeo()); break; case mtpc_messageMediaContact: setData(new MTPDmessageMediaContact()); break; case mtpc_messageMediaUnsupported: break; case mtpc_messageMediaDocument: setData(new MTPDmessageMediaDocument()); break; case mtpc_messageMediaWebPage: setData(new MTPDmessageMediaWebPage()); break; case mtpc_messageMediaVenue: setData(new MTPDmessageMediaVenue()); break; case mtpc_messageMediaGame: setData(new MTPDmessageMediaGame()); break; default: throw mtpErrorBadTypeId(type, "MTPmessageMedia"); } } inline const MTPDmessageMediaPhoto &MTPmessageMedia::c_messageMediaPhoto() const { t_assert(_type == mtpc_messageMediaPhoto); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaPhoto *data) : TypeDataOwner(data), _type(mtpc_messageMediaPhoto) { } inline const MTPDmessageMediaGeo &MTPmessageMedia::c_messageMediaGeo() const { t_assert(_type == mtpc_messageMediaGeo); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaGeo *data) : TypeDataOwner(data), _type(mtpc_messageMediaGeo) { } inline const MTPDmessageMediaContact &MTPmessageMedia::c_messageMediaContact() const { t_assert(_type == mtpc_messageMediaContact); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaContact *data) : TypeDataOwner(data), _type(mtpc_messageMediaContact) { } inline const MTPDmessageMediaDocument &MTPmessageMedia::c_messageMediaDocument() const { t_assert(_type == mtpc_messageMediaDocument); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaDocument *data) : TypeDataOwner(data), _type(mtpc_messageMediaDocument) { } inline const MTPDmessageMediaWebPage &MTPmessageMedia::c_messageMediaWebPage() const { t_assert(_type == mtpc_messageMediaWebPage); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaWebPage *data) : TypeDataOwner(data), _type(mtpc_messageMediaWebPage) { } inline const MTPDmessageMediaVenue &MTPmessageMedia::c_messageMediaVenue() const { t_assert(_type == mtpc_messageMediaVenue); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaVenue *data) : TypeDataOwner(data), _type(mtpc_messageMediaVenue) { } inline const MTPDmessageMediaGame &MTPmessageMedia::c_messageMediaGame() const { t_assert(_type == mtpc_messageMediaGame); return queryData(); } inline MTPmessageMedia::MTPmessageMedia(const MTPDmessageMediaGame *data) : TypeDataOwner(data), _type(mtpc_messageMediaGame) { } inline MTPmessageMedia MTP_messageMediaEmpty() { return MTP::internal::TypeCreator::new_messageMediaEmpty(); } inline MTPmessageMedia MTP_messageMediaPhoto(const MTPPhoto &_photo, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_messageMediaPhoto(_photo, _caption); } inline MTPmessageMedia MTP_messageMediaGeo(const MTPGeoPoint &_geo) { return MTP::internal::TypeCreator::new_messageMediaGeo(_geo); } inline MTPmessageMedia MTP_messageMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, MTPint _user_id) { return MTP::internal::TypeCreator::new_messageMediaContact(_phone_number, _first_name, _last_name, _user_id); } inline MTPmessageMedia MTP_messageMediaUnsupported() { return MTP::internal::TypeCreator::new_messageMediaUnsupported(); } inline MTPmessageMedia MTP_messageMediaDocument(const MTPDocument &_document, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_messageMediaDocument(_document, _caption); } inline MTPmessageMedia MTP_messageMediaWebPage(const MTPWebPage &_webpage) { return MTP::internal::TypeCreator::new_messageMediaWebPage(_webpage); } inline MTPmessageMedia MTP_messageMediaVenue(const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id) { return MTP::internal::TypeCreator::new_messageMediaVenue(_geo, _title, _address, _provider, _venue_id); } inline MTPmessageMedia MTP_messageMediaGame(const MTPGame &_game) { return MTP::internal::TypeCreator::new_messageMediaGame(_game); } inline uint32 MTPmessageAction::innerLength() const { switch (_type) { case mtpc_messageActionChatCreate: { const MTPDmessageActionChatCreate &v(c_messageActionChatCreate()); return v.vtitle.innerLength() + v.vusers.innerLength(); } case mtpc_messageActionChatEditTitle: { const MTPDmessageActionChatEditTitle &v(c_messageActionChatEditTitle()); return v.vtitle.innerLength(); } case mtpc_messageActionChatEditPhoto: { const MTPDmessageActionChatEditPhoto &v(c_messageActionChatEditPhoto()); return v.vphoto.innerLength(); } case mtpc_messageActionChatAddUser: { const MTPDmessageActionChatAddUser &v(c_messageActionChatAddUser()); return v.vusers.innerLength(); } case mtpc_messageActionChatDeleteUser: { const MTPDmessageActionChatDeleteUser &v(c_messageActionChatDeleteUser()); return v.vuser_id.innerLength(); } case mtpc_messageActionChatJoinedByLink: { const MTPDmessageActionChatJoinedByLink &v(c_messageActionChatJoinedByLink()); return v.vinviter_id.innerLength(); } case mtpc_messageActionChannelCreate: { const MTPDmessageActionChannelCreate &v(c_messageActionChannelCreate()); return v.vtitle.innerLength(); } case mtpc_messageActionChatMigrateTo: { const MTPDmessageActionChatMigrateTo &v(c_messageActionChatMigrateTo()); return v.vchannel_id.innerLength(); } case mtpc_messageActionChannelMigrateFrom: { const MTPDmessageActionChannelMigrateFrom &v(c_messageActionChannelMigrateFrom()); return v.vtitle.innerLength() + v.vchat_id.innerLength(); } case mtpc_messageActionGameScore: { const MTPDmessageActionGameScore &v(c_messageActionGameScore()); return v.vgame_id.innerLength() + v.vscore.innerLength(); } case mtpc_messageActionPhoneCall: { const MTPDmessageActionPhoneCall &v(c_messageActionPhoneCall()); return v.vflags.innerLength() + v.vcall_id.innerLength() + (v.has_reason() ? v.vreason.innerLength() : 0) + (v.has_duration() ? v.vduration.innerLength() : 0); } } return 0; } inline mtpTypeId MTPmessageAction::type() const { t_assert(_type != 0); return _type; } inline void MTPmessageAction::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messageActionEmpty: _type = cons; break; case mtpc_messageActionChatCreate: _type = cons; { auto v = new MTPDmessageActionChatCreate(); setData(v); v->vtitle.read(from, end); v->vusers.read(from, end); } break; case mtpc_messageActionChatEditTitle: _type = cons; { auto v = new MTPDmessageActionChatEditTitle(); setData(v); v->vtitle.read(from, end); } break; case mtpc_messageActionChatEditPhoto: _type = cons; { auto v = new MTPDmessageActionChatEditPhoto(); setData(v); v->vphoto.read(from, end); } break; case mtpc_messageActionChatDeletePhoto: _type = cons; break; case mtpc_messageActionChatAddUser: _type = cons; { auto v = new MTPDmessageActionChatAddUser(); setData(v); v->vusers.read(from, end); } break; case mtpc_messageActionChatDeleteUser: _type = cons; { auto v = new MTPDmessageActionChatDeleteUser(); setData(v); v->vuser_id.read(from, end); } break; case mtpc_messageActionChatJoinedByLink: _type = cons; { auto v = new MTPDmessageActionChatJoinedByLink(); setData(v); v->vinviter_id.read(from, end); } break; case mtpc_messageActionChannelCreate: _type = cons; { auto v = new MTPDmessageActionChannelCreate(); setData(v); v->vtitle.read(from, end); } break; case mtpc_messageActionChatMigrateTo: _type = cons; { auto v = new MTPDmessageActionChatMigrateTo(); setData(v); v->vchannel_id.read(from, end); } break; case mtpc_messageActionChannelMigrateFrom: _type = cons; { auto v = new MTPDmessageActionChannelMigrateFrom(); setData(v); v->vtitle.read(from, end); v->vchat_id.read(from, end); } break; case mtpc_messageActionPinMessage: _type = cons; break; case mtpc_messageActionHistoryClear: _type = cons; break; case mtpc_messageActionGameScore: _type = cons; { auto v = new MTPDmessageActionGameScore(); setData(v); v->vgame_id.read(from, end); v->vscore.read(from, end); } break; case mtpc_messageActionPhoneCall: _type = cons; { auto v = new MTPDmessageActionPhoneCall(); setData(v); v->vflags.read(from, end); v->vcall_id.read(from, end); if (v->has_reason()) { v->vreason.read(from, end); } else { v->vreason = MTPPhoneCallDiscardReason(); } if (v->has_duration()) { v->vduration.read(from, end); } else { v->vduration = MTPint(); } } break; default: throw mtpErrorUnexpected(cons, "MTPmessageAction"); } } inline void MTPmessageAction::write(mtpBuffer &to) const { switch (_type) { case mtpc_messageActionChatCreate: { auto &v = c_messageActionChatCreate(); v.vtitle.write(to); v.vusers.write(to); } break; case mtpc_messageActionChatEditTitle: { auto &v = c_messageActionChatEditTitle(); v.vtitle.write(to); } break; case mtpc_messageActionChatEditPhoto: { auto &v = c_messageActionChatEditPhoto(); v.vphoto.write(to); } break; case mtpc_messageActionChatAddUser: { auto &v = c_messageActionChatAddUser(); v.vusers.write(to); } break; case mtpc_messageActionChatDeleteUser: { auto &v = c_messageActionChatDeleteUser(); v.vuser_id.write(to); } break; case mtpc_messageActionChatJoinedByLink: { auto &v = c_messageActionChatJoinedByLink(); v.vinviter_id.write(to); } break; case mtpc_messageActionChannelCreate: { auto &v = c_messageActionChannelCreate(); v.vtitle.write(to); } break; case mtpc_messageActionChatMigrateTo: { auto &v = c_messageActionChatMigrateTo(); v.vchannel_id.write(to); } break; case mtpc_messageActionChannelMigrateFrom: { auto &v = c_messageActionChannelMigrateFrom(); v.vtitle.write(to); v.vchat_id.write(to); } break; case mtpc_messageActionGameScore: { auto &v = c_messageActionGameScore(); v.vgame_id.write(to); v.vscore.write(to); } break; case mtpc_messageActionPhoneCall: { auto &v = c_messageActionPhoneCall(); v.vflags.write(to); v.vcall_id.write(to); if (v.has_reason()) v.vreason.write(to); if (v.has_duration()) v.vduration.write(to); } break; } } inline MTPmessageAction::MTPmessageAction(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messageActionEmpty: break; case mtpc_messageActionChatCreate: setData(new MTPDmessageActionChatCreate()); break; case mtpc_messageActionChatEditTitle: setData(new MTPDmessageActionChatEditTitle()); break; case mtpc_messageActionChatEditPhoto: setData(new MTPDmessageActionChatEditPhoto()); break; case mtpc_messageActionChatDeletePhoto: break; case mtpc_messageActionChatAddUser: setData(new MTPDmessageActionChatAddUser()); break; case mtpc_messageActionChatDeleteUser: setData(new MTPDmessageActionChatDeleteUser()); break; case mtpc_messageActionChatJoinedByLink: setData(new MTPDmessageActionChatJoinedByLink()); break; case mtpc_messageActionChannelCreate: setData(new MTPDmessageActionChannelCreate()); break; case mtpc_messageActionChatMigrateTo: setData(new MTPDmessageActionChatMigrateTo()); break; case mtpc_messageActionChannelMigrateFrom: setData(new MTPDmessageActionChannelMigrateFrom()); break; case mtpc_messageActionPinMessage: break; case mtpc_messageActionHistoryClear: break; case mtpc_messageActionGameScore: setData(new MTPDmessageActionGameScore()); break; case mtpc_messageActionPhoneCall: setData(new MTPDmessageActionPhoneCall()); break; default: throw mtpErrorBadTypeId(type, "MTPmessageAction"); } } inline const MTPDmessageActionChatCreate &MTPmessageAction::c_messageActionChatCreate() const { t_assert(_type == mtpc_messageActionChatCreate); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatCreate *data) : TypeDataOwner(data), _type(mtpc_messageActionChatCreate) { } inline const MTPDmessageActionChatEditTitle &MTPmessageAction::c_messageActionChatEditTitle() const { t_assert(_type == mtpc_messageActionChatEditTitle); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatEditTitle *data) : TypeDataOwner(data), _type(mtpc_messageActionChatEditTitle) { } inline const MTPDmessageActionChatEditPhoto &MTPmessageAction::c_messageActionChatEditPhoto() const { t_assert(_type == mtpc_messageActionChatEditPhoto); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatEditPhoto *data) : TypeDataOwner(data), _type(mtpc_messageActionChatEditPhoto) { } inline const MTPDmessageActionChatAddUser &MTPmessageAction::c_messageActionChatAddUser() const { t_assert(_type == mtpc_messageActionChatAddUser); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatAddUser *data) : TypeDataOwner(data), _type(mtpc_messageActionChatAddUser) { } inline const MTPDmessageActionChatDeleteUser &MTPmessageAction::c_messageActionChatDeleteUser() const { t_assert(_type == mtpc_messageActionChatDeleteUser); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatDeleteUser *data) : TypeDataOwner(data), _type(mtpc_messageActionChatDeleteUser) { } inline const MTPDmessageActionChatJoinedByLink &MTPmessageAction::c_messageActionChatJoinedByLink() const { t_assert(_type == mtpc_messageActionChatJoinedByLink); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatJoinedByLink *data) : TypeDataOwner(data), _type(mtpc_messageActionChatJoinedByLink) { } inline const MTPDmessageActionChannelCreate &MTPmessageAction::c_messageActionChannelCreate() const { t_assert(_type == mtpc_messageActionChannelCreate); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChannelCreate *data) : TypeDataOwner(data), _type(mtpc_messageActionChannelCreate) { } inline const MTPDmessageActionChatMigrateTo &MTPmessageAction::c_messageActionChatMigrateTo() const { t_assert(_type == mtpc_messageActionChatMigrateTo); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChatMigrateTo *data) : TypeDataOwner(data), _type(mtpc_messageActionChatMigrateTo) { } inline const MTPDmessageActionChannelMigrateFrom &MTPmessageAction::c_messageActionChannelMigrateFrom() const { t_assert(_type == mtpc_messageActionChannelMigrateFrom); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionChannelMigrateFrom *data) : TypeDataOwner(data), _type(mtpc_messageActionChannelMigrateFrom) { } inline const MTPDmessageActionGameScore &MTPmessageAction::c_messageActionGameScore() const { t_assert(_type == mtpc_messageActionGameScore); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionGameScore *data) : TypeDataOwner(data), _type(mtpc_messageActionGameScore) { } inline const MTPDmessageActionPhoneCall &MTPmessageAction::c_messageActionPhoneCall() const { t_assert(_type == mtpc_messageActionPhoneCall); return queryData(); } inline MTPmessageAction::MTPmessageAction(const MTPDmessageActionPhoneCall *data) : TypeDataOwner(data), _type(mtpc_messageActionPhoneCall) { } inline MTPmessageAction MTP_messageActionEmpty() { return MTP::internal::TypeCreator::new_messageActionEmpty(); } inline MTPmessageAction MTP_messageActionChatCreate(const MTPstring &_title, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messageActionChatCreate(_title, _users); } inline MTPmessageAction MTP_messageActionChatEditTitle(const MTPstring &_title) { return MTP::internal::TypeCreator::new_messageActionChatEditTitle(_title); } inline MTPmessageAction MTP_messageActionChatEditPhoto(const MTPPhoto &_photo) { return MTP::internal::TypeCreator::new_messageActionChatEditPhoto(_photo); } inline MTPmessageAction MTP_messageActionChatDeletePhoto() { return MTP::internal::TypeCreator::new_messageActionChatDeletePhoto(); } inline MTPmessageAction MTP_messageActionChatAddUser(const MTPVector &_users) { return MTP::internal::TypeCreator::new_messageActionChatAddUser(_users); } inline MTPmessageAction MTP_messageActionChatDeleteUser(MTPint _user_id) { return MTP::internal::TypeCreator::new_messageActionChatDeleteUser(_user_id); } inline MTPmessageAction MTP_messageActionChatJoinedByLink(MTPint _inviter_id) { return MTP::internal::TypeCreator::new_messageActionChatJoinedByLink(_inviter_id); } inline MTPmessageAction MTP_messageActionChannelCreate(const MTPstring &_title) { return MTP::internal::TypeCreator::new_messageActionChannelCreate(_title); } inline MTPmessageAction MTP_messageActionChatMigrateTo(MTPint _channel_id) { return MTP::internal::TypeCreator::new_messageActionChatMigrateTo(_channel_id); } inline MTPmessageAction MTP_messageActionChannelMigrateFrom(const MTPstring &_title, MTPint _chat_id) { return MTP::internal::TypeCreator::new_messageActionChannelMigrateFrom(_title, _chat_id); } inline MTPmessageAction MTP_messageActionPinMessage() { return MTP::internal::TypeCreator::new_messageActionPinMessage(); } inline MTPmessageAction MTP_messageActionHistoryClear() { return MTP::internal::TypeCreator::new_messageActionHistoryClear(); } inline MTPmessageAction MTP_messageActionGameScore(const MTPlong &_game_id, MTPint _score) { return MTP::internal::TypeCreator::new_messageActionGameScore(_game_id, _score); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessageActionPhoneCall::Flags) inline MTPmessageAction MTP_messageActionPhoneCall(const MTPflags &_flags, const MTPlong &_call_id, const MTPPhoneCallDiscardReason &_reason, MTPint _duration) { return MTP::internal::TypeCreator::new_messageActionPhoneCall(_flags, _call_id, _reason, _duration); } inline MTPdialog::MTPdialog() : TypeDataOwner(new MTPDdialog()) { } inline uint32 MTPdialog::innerLength() const { const MTPDdialog &v(c_dialog()); return v.vflags.innerLength() + v.vpeer.innerLength() + v.vtop_message.innerLength() + v.vread_inbox_max_id.innerLength() + v.vread_outbox_max_id.innerLength() + v.vunread_count.innerLength() + v.vnotify_settings.innerLength() + (v.has_pts() ? v.vpts.innerLength() : 0) + (v.has_draft() ? v.vdraft.innerLength() : 0); } inline mtpTypeId MTPdialog::type() const { return mtpc_dialog; } inline void MTPdialog::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_dialog) throw mtpErrorUnexpected(cons, "MTPdialog"); auto v = new MTPDdialog(); setData(v); v->vflags.read(from, end); v->vpeer.read(from, end); v->vtop_message.read(from, end); v->vread_inbox_max_id.read(from, end); v->vread_outbox_max_id.read(from, end); v->vunread_count.read(from, end); v->vnotify_settings.read(from, end); if (v->has_pts()) { v->vpts.read(from, end); } else { v->vpts = MTPint(); } if (v->has_draft()) { v->vdraft.read(from, end); } else { v->vdraft = MTPDraftMessage(); } } inline void MTPdialog::write(mtpBuffer &to) const { auto &v = c_dialog(); v.vflags.write(to); v.vpeer.write(to); v.vtop_message.write(to); v.vread_inbox_max_id.write(to); v.vread_outbox_max_id.write(to); v.vunread_count.write(to); v.vnotify_settings.write(to); if (v.has_pts()) v.vpts.write(to); if (v.has_draft()) v.vdraft.write(to); } inline const MTPDdialog &MTPdialog::c_dialog() const { return queryData(); } inline MTPdialog::MTPdialog(const MTPDdialog *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDdialog::Flags) inline MTPdialog MTP_dialog(const MTPflags &_flags, const MTPPeer &_peer, MTPint _top_message, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPPeerNotifySettings &_notify_settings, MTPint _pts, const MTPDraftMessage &_draft) { return MTP::internal::TypeCreator::new_dialog(_flags, _peer, _top_message, _read_inbox_max_id, _read_outbox_max_id, _unread_count, _notify_settings, _pts, _draft); } inline uint32 MTPphoto::innerLength() const { switch (_type) { case mtpc_photoEmpty: { const MTPDphotoEmpty &v(c_photoEmpty()); return v.vid.innerLength(); } case mtpc_photo: { const MTPDphoto &v(c_photo()); return v.vflags.innerLength() + v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vsizes.innerLength(); } } return 0; } inline mtpTypeId MTPphoto::type() const { t_assert(_type != 0); return _type; } inline void MTPphoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_photoEmpty: _type = cons; { auto v = new MTPDphotoEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_photo: _type = cons; { auto v = new MTPDphoto(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vsizes.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPphoto"); } } inline void MTPphoto::write(mtpBuffer &to) const { switch (_type) { case mtpc_photoEmpty: { auto &v = c_photoEmpty(); v.vid.write(to); } break; case mtpc_photo: { auto &v = c_photo(); v.vflags.write(to); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vsizes.write(to); } break; } } inline MTPphoto::MTPphoto(mtpTypeId type) : _type(type) { switch (type) { case mtpc_photoEmpty: setData(new MTPDphotoEmpty()); break; case mtpc_photo: setData(new MTPDphoto()); break; default: throw mtpErrorBadTypeId(type, "MTPphoto"); } } inline const MTPDphotoEmpty &MTPphoto::c_photoEmpty() const { t_assert(_type == mtpc_photoEmpty); return queryData(); } inline MTPphoto::MTPphoto(const MTPDphotoEmpty *data) : TypeDataOwner(data), _type(mtpc_photoEmpty) { } inline const MTPDphoto &MTPphoto::c_photo() const { t_assert(_type == mtpc_photo); return queryData(); } inline MTPphoto::MTPphoto(const MTPDphoto *data) : TypeDataOwner(data), _type(mtpc_photo) { } inline MTPphoto MTP_photoEmpty(const MTPlong &_id) { return MTP::internal::TypeCreator::new_photoEmpty(_id); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDphoto::Flags) inline MTPphoto MTP_photo(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPVector &_sizes) { return MTP::internal::TypeCreator::new_photo(_flags, _id, _access_hash, _date, _sizes); } inline uint32 MTPphotoSize::innerLength() const { switch (_type) { case mtpc_photoSizeEmpty: { const MTPDphotoSizeEmpty &v(c_photoSizeEmpty()); return v.vtype.innerLength(); } case mtpc_photoSize: { const MTPDphotoSize &v(c_photoSize()); return v.vtype.innerLength() + v.vlocation.innerLength() + v.vw.innerLength() + v.vh.innerLength() + v.vsize.innerLength(); } case mtpc_photoCachedSize: { const MTPDphotoCachedSize &v(c_photoCachedSize()); return v.vtype.innerLength() + v.vlocation.innerLength() + v.vw.innerLength() + v.vh.innerLength() + v.vbytes.innerLength(); } } return 0; } inline mtpTypeId MTPphotoSize::type() const { t_assert(_type != 0); return _type; } inline void MTPphotoSize::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_photoSizeEmpty: _type = cons; { auto v = new MTPDphotoSizeEmpty(); setData(v); v->vtype.read(from, end); } break; case mtpc_photoSize: _type = cons; { auto v = new MTPDphotoSize(); setData(v); v->vtype.read(from, end); v->vlocation.read(from, end); v->vw.read(from, end); v->vh.read(from, end); v->vsize.read(from, end); } break; case mtpc_photoCachedSize: _type = cons; { auto v = new MTPDphotoCachedSize(); setData(v); v->vtype.read(from, end); v->vlocation.read(from, end); v->vw.read(from, end); v->vh.read(from, end); v->vbytes.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPphotoSize"); } } inline void MTPphotoSize::write(mtpBuffer &to) const { switch (_type) { case mtpc_photoSizeEmpty: { auto &v = c_photoSizeEmpty(); v.vtype.write(to); } break; case mtpc_photoSize: { auto &v = c_photoSize(); v.vtype.write(to); v.vlocation.write(to); v.vw.write(to); v.vh.write(to); v.vsize.write(to); } break; case mtpc_photoCachedSize: { auto &v = c_photoCachedSize(); v.vtype.write(to); v.vlocation.write(to); v.vw.write(to); v.vh.write(to); v.vbytes.write(to); } break; } } inline MTPphotoSize::MTPphotoSize(mtpTypeId type) : _type(type) { switch (type) { case mtpc_photoSizeEmpty: setData(new MTPDphotoSizeEmpty()); break; case mtpc_photoSize: setData(new MTPDphotoSize()); break; case mtpc_photoCachedSize: setData(new MTPDphotoCachedSize()); break; default: throw mtpErrorBadTypeId(type, "MTPphotoSize"); } } inline const MTPDphotoSizeEmpty &MTPphotoSize::c_photoSizeEmpty() const { t_assert(_type == mtpc_photoSizeEmpty); return queryData(); } inline MTPphotoSize::MTPphotoSize(const MTPDphotoSizeEmpty *data) : TypeDataOwner(data), _type(mtpc_photoSizeEmpty) { } inline const MTPDphotoSize &MTPphotoSize::c_photoSize() const { t_assert(_type == mtpc_photoSize); return queryData(); } inline MTPphotoSize::MTPphotoSize(const MTPDphotoSize *data) : TypeDataOwner(data), _type(mtpc_photoSize) { } inline const MTPDphotoCachedSize &MTPphotoSize::c_photoCachedSize() const { t_assert(_type == mtpc_photoCachedSize); return queryData(); } inline MTPphotoSize::MTPphotoSize(const MTPDphotoCachedSize *data) : TypeDataOwner(data), _type(mtpc_photoCachedSize) { } inline MTPphotoSize MTP_photoSizeEmpty(const MTPstring &_type) { return MTP::internal::TypeCreator::new_photoSizeEmpty(_type); } inline MTPphotoSize MTP_photoSize(const MTPstring &_type, const MTPFileLocation &_location, MTPint _w, MTPint _h, MTPint _size) { return MTP::internal::TypeCreator::new_photoSize(_type, _location, _w, _h, _size); } inline MTPphotoSize MTP_photoCachedSize(const MTPstring &_type, const MTPFileLocation &_location, MTPint _w, MTPint _h, const MTPbytes &_bytes) { return MTP::internal::TypeCreator::new_photoCachedSize(_type, _location, _w, _h, _bytes); } inline uint32 MTPgeoPoint::innerLength() const { switch (_type) { case mtpc_geoPoint: { const MTPDgeoPoint &v(c_geoPoint()); return v.vlong.innerLength() + v.vlat.innerLength(); } } return 0; } inline mtpTypeId MTPgeoPoint::type() const { t_assert(_type != 0); return _type; } inline void MTPgeoPoint::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_geoPointEmpty: _type = cons; break; case mtpc_geoPoint: _type = cons; { auto v = new MTPDgeoPoint(); setData(v); v->vlong.read(from, end); v->vlat.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPgeoPoint"); } } inline void MTPgeoPoint::write(mtpBuffer &to) const { switch (_type) { case mtpc_geoPoint: { auto &v = c_geoPoint(); v.vlong.write(to); v.vlat.write(to); } break; } } inline MTPgeoPoint::MTPgeoPoint(mtpTypeId type) : _type(type) { switch (type) { case mtpc_geoPointEmpty: break; case mtpc_geoPoint: setData(new MTPDgeoPoint()); break; default: throw mtpErrorBadTypeId(type, "MTPgeoPoint"); } } inline const MTPDgeoPoint &MTPgeoPoint::c_geoPoint() const { t_assert(_type == mtpc_geoPoint); return queryData(); } inline MTPgeoPoint::MTPgeoPoint(const MTPDgeoPoint *data) : TypeDataOwner(data), _type(mtpc_geoPoint) { } inline MTPgeoPoint MTP_geoPointEmpty() { return MTP::internal::TypeCreator::new_geoPointEmpty(); } inline MTPgeoPoint MTP_geoPoint(const MTPdouble &_long, const MTPdouble &_lat) { return MTP::internal::TypeCreator::new_geoPoint(_long, _lat); } inline MTPauth_checkedPhone::MTPauth_checkedPhone() : TypeDataOwner(new MTPDauth_checkedPhone()) { } inline uint32 MTPauth_checkedPhone::innerLength() const { const MTPDauth_checkedPhone &v(c_auth_checkedPhone()); return v.vphone_registered.innerLength(); } inline mtpTypeId MTPauth_checkedPhone::type() const { return mtpc_auth_checkedPhone; } inline void MTPauth_checkedPhone::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_auth_checkedPhone) throw mtpErrorUnexpected(cons, "MTPauth_checkedPhone"); auto v = new MTPDauth_checkedPhone(); setData(v); v->vphone_registered.read(from, end); } inline void MTPauth_checkedPhone::write(mtpBuffer &to) const { auto &v = c_auth_checkedPhone(); v.vphone_registered.write(to); } inline const MTPDauth_checkedPhone &MTPauth_checkedPhone::c_auth_checkedPhone() const { return queryData(); } inline MTPauth_checkedPhone::MTPauth_checkedPhone(const MTPDauth_checkedPhone *data) : TypeDataOwner(data) { } inline MTPauth_checkedPhone MTP_auth_checkedPhone(MTPBool _phone_registered) { return MTP::internal::TypeCreator::new_auth_checkedPhone(_phone_registered); } inline MTPauth_sentCode::MTPauth_sentCode() : TypeDataOwner(new MTPDauth_sentCode()) { } inline uint32 MTPauth_sentCode::innerLength() const { const MTPDauth_sentCode &v(c_auth_sentCode()); return v.vflags.innerLength() + v.vtype.innerLength() + v.vphone_code_hash.innerLength() + (v.has_next_type() ? v.vnext_type.innerLength() : 0) + (v.has_timeout() ? v.vtimeout.innerLength() : 0); } inline mtpTypeId MTPauth_sentCode::type() const { return mtpc_auth_sentCode; } inline void MTPauth_sentCode::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_auth_sentCode) throw mtpErrorUnexpected(cons, "MTPauth_sentCode"); auto v = new MTPDauth_sentCode(); setData(v); v->vflags.read(from, end); v->vtype.read(from, end); v->vphone_code_hash.read(from, end); if (v->has_next_type()) { v->vnext_type.read(from, end); } else { v->vnext_type = MTPauth_CodeType(); } if (v->has_timeout()) { v->vtimeout.read(from, end); } else { v->vtimeout = MTPint(); } } inline void MTPauth_sentCode::write(mtpBuffer &to) const { auto &v = c_auth_sentCode(); v.vflags.write(to); v.vtype.write(to); v.vphone_code_hash.write(to); if (v.has_next_type()) v.vnext_type.write(to); if (v.has_timeout()) v.vtimeout.write(to); } inline const MTPDauth_sentCode &MTPauth_sentCode::c_auth_sentCode() const { return queryData(); } inline MTPauth_sentCode::MTPauth_sentCode(const MTPDauth_sentCode *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDauth_sentCode::Flags) inline MTPauth_sentCode MTP_auth_sentCode(const MTPflags &_flags, const MTPauth_SentCodeType &_type, const MTPstring &_phone_code_hash, const MTPauth_CodeType &_next_type, MTPint _timeout) { return MTP::internal::TypeCreator::new_auth_sentCode(_flags, _type, _phone_code_hash, _next_type, _timeout); } inline MTPauth_authorization::MTPauth_authorization() : TypeDataOwner(new MTPDauth_authorization()) { } inline uint32 MTPauth_authorization::innerLength() const { const MTPDauth_authorization &v(c_auth_authorization()); return v.vflags.innerLength() + (v.has_tmp_sessions() ? v.vtmp_sessions.innerLength() : 0) + v.vuser.innerLength(); } inline mtpTypeId MTPauth_authorization::type() const { return mtpc_auth_authorization; } inline void MTPauth_authorization::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_auth_authorization) throw mtpErrorUnexpected(cons, "MTPauth_authorization"); auto v = new MTPDauth_authorization(); setData(v); v->vflags.read(from, end); if (v->has_tmp_sessions()) { v->vtmp_sessions.read(from, end); } else { v->vtmp_sessions = MTPint(); } v->vuser.read(from, end); } inline void MTPauth_authorization::write(mtpBuffer &to) const { auto &v = c_auth_authorization(); v.vflags.write(to); if (v.has_tmp_sessions()) v.vtmp_sessions.write(to); v.vuser.write(to); } inline const MTPDauth_authorization &MTPauth_authorization::c_auth_authorization() const { return queryData(); } inline MTPauth_authorization::MTPauth_authorization(const MTPDauth_authorization *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDauth_authorization::Flags) inline MTPauth_authorization MTP_auth_authorization(const MTPflags &_flags, MTPint _tmp_sessions, const MTPUser &_user) { return MTP::internal::TypeCreator::new_auth_authorization(_flags, _tmp_sessions, _user); } inline MTPauth_exportedAuthorization::MTPauth_exportedAuthorization() : TypeDataOwner(new MTPDauth_exportedAuthorization()) { } inline uint32 MTPauth_exportedAuthorization::innerLength() const { const MTPDauth_exportedAuthorization &v(c_auth_exportedAuthorization()); return v.vid.innerLength() + v.vbytes.innerLength(); } inline mtpTypeId MTPauth_exportedAuthorization::type() const { return mtpc_auth_exportedAuthorization; } inline void MTPauth_exportedAuthorization::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_auth_exportedAuthorization) throw mtpErrorUnexpected(cons, "MTPauth_exportedAuthorization"); auto v = new MTPDauth_exportedAuthorization(); setData(v); v->vid.read(from, end); v->vbytes.read(from, end); } inline void MTPauth_exportedAuthorization::write(mtpBuffer &to) const { auto &v = c_auth_exportedAuthorization(); v.vid.write(to); v.vbytes.write(to); } inline const MTPDauth_exportedAuthorization &MTPauth_exportedAuthorization::c_auth_exportedAuthorization() const { return queryData(); } inline MTPauth_exportedAuthorization::MTPauth_exportedAuthorization(const MTPDauth_exportedAuthorization *data) : TypeDataOwner(data) { } inline MTPauth_exportedAuthorization MTP_auth_exportedAuthorization(MTPint _id, const MTPbytes &_bytes) { return MTP::internal::TypeCreator::new_auth_exportedAuthorization(_id, _bytes); } inline uint32 MTPinputNotifyPeer::innerLength() const { switch (_type) { case mtpc_inputNotifyPeer: { const MTPDinputNotifyPeer &v(c_inputNotifyPeer()); return v.vpeer.innerLength(); } } return 0; } inline mtpTypeId MTPinputNotifyPeer::type() const { t_assert(_type != 0); return _type; } inline void MTPinputNotifyPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputNotifyPeer: _type = cons; { auto v = new MTPDinputNotifyPeer(); setData(v); v->vpeer.read(from, end); } break; case mtpc_inputNotifyUsers: _type = cons; break; case mtpc_inputNotifyChats: _type = cons; break; case mtpc_inputNotifyAll: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPinputNotifyPeer"); } } inline void MTPinputNotifyPeer::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputNotifyPeer: { auto &v = c_inputNotifyPeer(); v.vpeer.write(to); } break; } } inline MTPinputNotifyPeer::MTPinputNotifyPeer(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputNotifyPeer: setData(new MTPDinputNotifyPeer()); break; case mtpc_inputNotifyUsers: break; case mtpc_inputNotifyChats: break; case mtpc_inputNotifyAll: break; default: throw mtpErrorBadTypeId(type, "MTPinputNotifyPeer"); } } inline const MTPDinputNotifyPeer &MTPinputNotifyPeer::c_inputNotifyPeer() const { t_assert(_type == mtpc_inputNotifyPeer); return queryData(); } inline MTPinputNotifyPeer::MTPinputNotifyPeer(const MTPDinputNotifyPeer *data) : TypeDataOwner(data), _type(mtpc_inputNotifyPeer) { } inline MTPinputNotifyPeer MTP_inputNotifyPeer(const MTPInputPeer &_peer) { return MTP::internal::TypeCreator::new_inputNotifyPeer(_peer); } inline MTPinputNotifyPeer MTP_inputNotifyUsers() { return MTP::internal::TypeCreator::new_inputNotifyUsers(); } inline MTPinputNotifyPeer MTP_inputNotifyChats() { return MTP::internal::TypeCreator::new_inputNotifyChats(); } inline MTPinputNotifyPeer MTP_inputNotifyAll() { return MTP::internal::TypeCreator::new_inputNotifyAll(); } inline uint32 MTPinputPeerNotifyEvents::innerLength() const { return 0; } inline mtpTypeId MTPinputPeerNotifyEvents::type() const { t_assert(_type != 0); return _type; } inline void MTPinputPeerNotifyEvents::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputPeerNotifyEventsEmpty: _type = cons; break; case mtpc_inputPeerNotifyEventsAll: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPinputPeerNotifyEvents"); } } inline void MTPinputPeerNotifyEvents::write(mtpBuffer &to) const { } inline MTPinputPeerNotifyEvents::MTPinputPeerNotifyEvents(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputPeerNotifyEventsEmpty: break; case mtpc_inputPeerNotifyEventsAll: break; default: throw mtpErrorBadTypeId(type, "MTPinputPeerNotifyEvents"); } } inline MTPinputPeerNotifyEvents MTP_inputPeerNotifyEventsEmpty() { return MTP::internal::TypeCreator::new_inputPeerNotifyEventsEmpty(); } inline MTPinputPeerNotifyEvents MTP_inputPeerNotifyEventsAll() { return MTP::internal::TypeCreator::new_inputPeerNotifyEventsAll(); } inline MTPinputPeerNotifySettings::MTPinputPeerNotifySettings() : TypeDataOwner(new MTPDinputPeerNotifySettings()) { } inline uint32 MTPinputPeerNotifySettings::innerLength() const { const MTPDinputPeerNotifySettings &v(c_inputPeerNotifySettings()); return v.vflags.innerLength() + v.vmute_until.innerLength() + v.vsound.innerLength(); } inline mtpTypeId MTPinputPeerNotifySettings::type() const { return mtpc_inputPeerNotifySettings; } inline void MTPinputPeerNotifySettings::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inputPeerNotifySettings) throw mtpErrorUnexpected(cons, "MTPinputPeerNotifySettings"); auto v = new MTPDinputPeerNotifySettings(); setData(v); v->vflags.read(from, end); v->vmute_until.read(from, end); v->vsound.read(from, end); } inline void MTPinputPeerNotifySettings::write(mtpBuffer &to) const { auto &v = c_inputPeerNotifySettings(); v.vflags.write(to); v.vmute_until.write(to); v.vsound.write(to); } inline const MTPDinputPeerNotifySettings &MTPinputPeerNotifySettings::c_inputPeerNotifySettings() const { return queryData(); } inline MTPinputPeerNotifySettings::MTPinputPeerNotifySettings(const MTPDinputPeerNotifySettings *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputPeerNotifySettings::Flags) inline MTPinputPeerNotifySettings MTP_inputPeerNotifySettings(const MTPflags &_flags, MTPint _mute_until, const MTPstring &_sound) { return MTP::internal::TypeCreator::new_inputPeerNotifySettings(_flags, _mute_until, _sound); } inline uint32 MTPpeerNotifyEvents::innerLength() const { return 0; } inline mtpTypeId MTPpeerNotifyEvents::type() const { t_assert(_type != 0); return _type; } inline void MTPpeerNotifyEvents::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_peerNotifyEventsEmpty: _type = cons; break; case mtpc_peerNotifyEventsAll: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPpeerNotifyEvents"); } } inline void MTPpeerNotifyEvents::write(mtpBuffer &to) const { } inline MTPpeerNotifyEvents::MTPpeerNotifyEvents(mtpTypeId type) : _type(type) { switch (type) { case mtpc_peerNotifyEventsEmpty: break; case mtpc_peerNotifyEventsAll: break; default: throw mtpErrorBadTypeId(type, "MTPpeerNotifyEvents"); } } inline MTPpeerNotifyEvents MTP_peerNotifyEventsEmpty() { return MTP::internal::TypeCreator::new_peerNotifyEventsEmpty(); } inline MTPpeerNotifyEvents MTP_peerNotifyEventsAll() { return MTP::internal::TypeCreator::new_peerNotifyEventsAll(); } inline uint32 MTPpeerNotifySettings::innerLength() const { switch (_type) { case mtpc_peerNotifySettings: { const MTPDpeerNotifySettings &v(c_peerNotifySettings()); return v.vflags.innerLength() + v.vmute_until.innerLength() + v.vsound.innerLength(); } } return 0; } inline mtpTypeId MTPpeerNotifySettings::type() const { t_assert(_type != 0); return _type; } inline void MTPpeerNotifySettings::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_peerNotifySettingsEmpty: _type = cons; break; case mtpc_peerNotifySettings: _type = cons; { auto v = new MTPDpeerNotifySettings(); setData(v); v->vflags.read(from, end); v->vmute_until.read(from, end); v->vsound.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPpeerNotifySettings"); } } inline void MTPpeerNotifySettings::write(mtpBuffer &to) const { switch (_type) { case mtpc_peerNotifySettings: { auto &v = c_peerNotifySettings(); v.vflags.write(to); v.vmute_until.write(to); v.vsound.write(to); } break; } } inline MTPpeerNotifySettings::MTPpeerNotifySettings(mtpTypeId type) : _type(type) { switch (type) { case mtpc_peerNotifySettingsEmpty: break; case mtpc_peerNotifySettings: setData(new MTPDpeerNotifySettings()); break; default: throw mtpErrorBadTypeId(type, "MTPpeerNotifySettings"); } } inline const MTPDpeerNotifySettings &MTPpeerNotifySettings::c_peerNotifySettings() const { t_assert(_type == mtpc_peerNotifySettings); return queryData(); } inline MTPpeerNotifySettings::MTPpeerNotifySettings(const MTPDpeerNotifySettings *data) : TypeDataOwner(data), _type(mtpc_peerNotifySettings) { } inline MTPpeerNotifySettings MTP_peerNotifySettingsEmpty() { return MTP::internal::TypeCreator::new_peerNotifySettingsEmpty(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDpeerNotifySettings::Flags) inline MTPpeerNotifySettings MTP_peerNotifySettings(const MTPflags &_flags, MTPint _mute_until, const MTPstring &_sound) { return MTP::internal::TypeCreator::new_peerNotifySettings(_flags, _mute_until, _sound); } inline MTPpeerSettings::MTPpeerSettings() : TypeDataOwner(new MTPDpeerSettings()) { } inline uint32 MTPpeerSettings::innerLength() const { const MTPDpeerSettings &v(c_peerSettings()); return v.vflags.innerLength(); } inline mtpTypeId MTPpeerSettings::type() const { return mtpc_peerSettings; } inline void MTPpeerSettings::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_peerSettings) throw mtpErrorUnexpected(cons, "MTPpeerSettings"); auto v = new MTPDpeerSettings(); setData(v); v->vflags.read(from, end); } inline void MTPpeerSettings::write(mtpBuffer &to) const { auto &v = c_peerSettings(); v.vflags.write(to); } inline const MTPDpeerSettings &MTPpeerSettings::c_peerSettings() const { return queryData(); } inline MTPpeerSettings::MTPpeerSettings(const MTPDpeerSettings *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDpeerSettings::Flags) inline MTPpeerSettings MTP_peerSettings(const MTPflags &_flags) { return MTP::internal::TypeCreator::new_peerSettings(_flags); } inline uint32 MTPwallPaper::innerLength() const { switch (_type) { case mtpc_wallPaper: { const MTPDwallPaper &v(c_wallPaper()); return v.vid.innerLength() + v.vtitle.innerLength() + v.vsizes.innerLength() + v.vcolor.innerLength(); } case mtpc_wallPaperSolid: { const MTPDwallPaperSolid &v(c_wallPaperSolid()); return v.vid.innerLength() + v.vtitle.innerLength() + v.vbg_color.innerLength() + v.vcolor.innerLength(); } } return 0; } inline mtpTypeId MTPwallPaper::type() const { t_assert(_type != 0); return _type; } inline void MTPwallPaper::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_wallPaper: _type = cons; { auto v = new MTPDwallPaper(); setData(v); v->vid.read(from, end); v->vtitle.read(from, end); v->vsizes.read(from, end); v->vcolor.read(from, end); } break; case mtpc_wallPaperSolid: _type = cons; { auto v = new MTPDwallPaperSolid(); setData(v); v->vid.read(from, end); v->vtitle.read(from, end); v->vbg_color.read(from, end); v->vcolor.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPwallPaper"); } } inline void MTPwallPaper::write(mtpBuffer &to) const { switch (_type) { case mtpc_wallPaper: { auto &v = c_wallPaper(); v.vid.write(to); v.vtitle.write(to); v.vsizes.write(to); v.vcolor.write(to); } break; case mtpc_wallPaperSolid: { auto &v = c_wallPaperSolid(); v.vid.write(to); v.vtitle.write(to); v.vbg_color.write(to); v.vcolor.write(to); } break; } } inline MTPwallPaper::MTPwallPaper(mtpTypeId type) : _type(type) { switch (type) { case mtpc_wallPaper: setData(new MTPDwallPaper()); break; case mtpc_wallPaperSolid: setData(new MTPDwallPaperSolid()); break; default: throw mtpErrorBadTypeId(type, "MTPwallPaper"); } } inline const MTPDwallPaper &MTPwallPaper::c_wallPaper() const { t_assert(_type == mtpc_wallPaper); return queryData(); } inline MTPwallPaper::MTPwallPaper(const MTPDwallPaper *data) : TypeDataOwner(data), _type(mtpc_wallPaper) { } inline const MTPDwallPaperSolid &MTPwallPaper::c_wallPaperSolid() const { t_assert(_type == mtpc_wallPaperSolid); return queryData(); } inline MTPwallPaper::MTPwallPaper(const MTPDwallPaperSolid *data) : TypeDataOwner(data), _type(mtpc_wallPaperSolid) { } inline MTPwallPaper MTP_wallPaper(MTPint _id, const MTPstring &_title, const MTPVector &_sizes, MTPint _color) { return MTP::internal::TypeCreator::new_wallPaper(_id, _title, _sizes, _color); } inline MTPwallPaper MTP_wallPaperSolid(MTPint _id, const MTPstring &_title, MTPint _bg_color, MTPint _color) { return MTP::internal::TypeCreator::new_wallPaperSolid(_id, _title, _bg_color, _color); } inline uint32 MTPreportReason::innerLength() const { switch (_type) { case mtpc_inputReportReasonOther: { const MTPDinputReportReasonOther &v(c_inputReportReasonOther()); return v.vtext.innerLength(); } } return 0; } inline mtpTypeId MTPreportReason::type() const { t_assert(_type != 0); return _type; } inline void MTPreportReason::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputReportReasonSpam: _type = cons; break; case mtpc_inputReportReasonViolence: _type = cons; break; case mtpc_inputReportReasonPornography: _type = cons; break; case mtpc_inputReportReasonOther: _type = cons; { auto v = new MTPDinputReportReasonOther(); setData(v); v->vtext.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPreportReason"); } } inline void MTPreportReason::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputReportReasonOther: { auto &v = c_inputReportReasonOther(); v.vtext.write(to); } break; } } inline MTPreportReason::MTPreportReason(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputReportReasonSpam: break; case mtpc_inputReportReasonViolence: break; case mtpc_inputReportReasonPornography: break; case mtpc_inputReportReasonOther: setData(new MTPDinputReportReasonOther()); break; default: throw mtpErrorBadTypeId(type, "MTPreportReason"); } } inline const MTPDinputReportReasonOther &MTPreportReason::c_inputReportReasonOther() const { t_assert(_type == mtpc_inputReportReasonOther); return queryData(); } inline MTPreportReason::MTPreportReason(const MTPDinputReportReasonOther *data) : TypeDataOwner(data), _type(mtpc_inputReportReasonOther) { } inline MTPreportReason MTP_inputReportReasonSpam() { return MTP::internal::TypeCreator::new_inputReportReasonSpam(); } inline MTPreportReason MTP_inputReportReasonViolence() { return MTP::internal::TypeCreator::new_inputReportReasonViolence(); } inline MTPreportReason MTP_inputReportReasonPornography() { return MTP::internal::TypeCreator::new_inputReportReasonPornography(); } inline MTPreportReason MTP_inputReportReasonOther(const MTPstring &_text) { return MTP::internal::TypeCreator::new_inputReportReasonOther(_text); } inline MTPuserFull::MTPuserFull() : TypeDataOwner(new MTPDuserFull()) { } inline uint32 MTPuserFull::innerLength() const { const MTPDuserFull &v(c_userFull()); return v.vflags.innerLength() + v.vuser.innerLength() + (v.has_about() ? v.vabout.innerLength() : 0) + v.vlink.innerLength() + (v.has_profile_photo() ? v.vprofile_photo.innerLength() : 0) + v.vnotify_settings.innerLength() + (v.has_bot_info() ? v.vbot_info.innerLength() : 0) + v.vcommon_chats_count.innerLength(); } inline mtpTypeId MTPuserFull::type() const { return mtpc_userFull; } inline void MTPuserFull::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_userFull) throw mtpErrorUnexpected(cons, "MTPuserFull"); auto v = new MTPDuserFull(); setData(v); v->vflags.read(from, end); v->vuser.read(from, end); if (v->has_about()) { v->vabout.read(from, end); } else { v->vabout = MTPstring(); } v->vlink.read(from, end); if (v->has_profile_photo()) { v->vprofile_photo.read(from, end); } else { v->vprofile_photo = MTPPhoto(); } v->vnotify_settings.read(from, end); if (v->has_bot_info()) { v->vbot_info.read(from, end); } else { v->vbot_info = MTPBotInfo(); } v->vcommon_chats_count.read(from, end); } inline void MTPuserFull::write(mtpBuffer &to) const { auto &v = c_userFull(); v.vflags.write(to); v.vuser.write(to); if (v.has_about()) v.vabout.write(to); v.vlink.write(to); if (v.has_profile_photo()) v.vprofile_photo.write(to); v.vnotify_settings.write(to); if (v.has_bot_info()) v.vbot_info.write(to); v.vcommon_chats_count.write(to); } inline const MTPDuserFull &MTPuserFull::c_userFull() const { return queryData(); } inline MTPuserFull::MTPuserFull(const MTPDuserFull *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDuserFull::Flags) inline MTPuserFull MTP_userFull(const MTPflags &_flags, const MTPUser &_user, const MTPstring &_about, const MTPcontacts_Link &_link, const MTPPhoto &_profile_photo, const MTPPeerNotifySettings &_notify_settings, const MTPBotInfo &_bot_info, MTPint _common_chats_count) { return MTP::internal::TypeCreator::new_userFull(_flags, _user, _about, _link, _profile_photo, _notify_settings, _bot_info, _common_chats_count); } inline MTPcontact::MTPcontact() : TypeDataOwner(new MTPDcontact()) { } inline uint32 MTPcontact::innerLength() const { const MTPDcontact &v(c_contact()); return v.vuser_id.innerLength() + v.vmutual.innerLength(); } inline mtpTypeId MTPcontact::type() const { return mtpc_contact; } inline void MTPcontact::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contact) throw mtpErrorUnexpected(cons, "MTPcontact"); auto v = new MTPDcontact(); setData(v); v->vuser_id.read(from, end); v->vmutual.read(from, end); } inline void MTPcontact::write(mtpBuffer &to) const { auto &v = c_contact(); v.vuser_id.write(to); v.vmutual.write(to); } inline const MTPDcontact &MTPcontact::c_contact() const { return queryData(); } inline MTPcontact::MTPcontact(const MTPDcontact *data) : TypeDataOwner(data) { } inline MTPcontact MTP_contact(MTPint _user_id, MTPBool _mutual) { return MTP::internal::TypeCreator::new_contact(_user_id, _mutual); } inline MTPimportedContact::MTPimportedContact() : TypeDataOwner(new MTPDimportedContact()) { } inline uint32 MTPimportedContact::innerLength() const { const MTPDimportedContact &v(c_importedContact()); return v.vuser_id.innerLength() + v.vclient_id.innerLength(); } inline mtpTypeId MTPimportedContact::type() const { return mtpc_importedContact; } inline void MTPimportedContact::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_importedContact) throw mtpErrorUnexpected(cons, "MTPimportedContact"); auto v = new MTPDimportedContact(); setData(v); v->vuser_id.read(from, end); v->vclient_id.read(from, end); } inline void MTPimportedContact::write(mtpBuffer &to) const { auto &v = c_importedContact(); v.vuser_id.write(to); v.vclient_id.write(to); } inline const MTPDimportedContact &MTPimportedContact::c_importedContact() const { return queryData(); } inline MTPimportedContact::MTPimportedContact(const MTPDimportedContact *data) : TypeDataOwner(data) { } inline MTPimportedContact MTP_importedContact(MTPint _user_id, const MTPlong &_client_id) { return MTP::internal::TypeCreator::new_importedContact(_user_id, _client_id); } inline MTPcontactBlocked::MTPcontactBlocked() : TypeDataOwner(new MTPDcontactBlocked()) { } inline uint32 MTPcontactBlocked::innerLength() const { const MTPDcontactBlocked &v(c_contactBlocked()); return v.vuser_id.innerLength() + v.vdate.innerLength(); } inline mtpTypeId MTPcontactBlocked::type() const { return mtpc_contactBlocked; } inline void MTPcontactBlocked::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contactBlocked) throw mtpErrorUnexpected(cons, "MTPcontactBlocked"); auto v = new MTPDcontactBlocked(); setData(v); v->vuser_id.read(from, end); v->vdate.read(from, end); } inline void MTPcontactBlocked::write(mtpBuffer &to) const { auto &v = c_contactBlocked(); v.vuser_id.write(to); v.vdate.write(to); } inline const MTPDcontactBlocked &MTPcontactBlocked::c_contactBlocked() const { return queryData(); } inline MTPcontactBlocked::MTPcontactBlocked(const MTPDcontactBlocked *data) : TypeDataOwner(data) { } inline MTPcontactBlocked MTP_contactBlocked(MTPint _user_id, MTPint _date) { return MTP::internal::TypeCreator::new_contactBlocked(_user_id, _date); } inline MTPcontactStatus::MTPcontactStatus() : TypeDataOwner(new MTPDcontactStatus()) { } inline uint32 MTPcontactStatus::innerLength() const { const MTPDcontactStatus &v(c_contactStatus()); return v.vuser_id.innerLength() + v.vstatus.innerLength(); } inline mtpTypeId MTPcontactStatus::type() const { return mtpc_contactStatus; } inline void MTPcontactStatus::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contactStatus) throw mtpErrorUnexpected(cons, "MTPcontactStatus"); auto v = new MTPDcontactStatus(); setData(v); v->vuser_id.read(from, end); v->vstatus.read(from, end); } inline void MTPcontactStatus::write(mtpBuffer &to) const { auto &v = c_contactStatus(); v.vuser_id.write(to); v.vstatus.write(to); } inline const MTPDcontactStatus &MTPcontactStatus::c_contactStatus() const { return queryData(); } inline MTPcontactStatus::MTPcontactStatus(const MTPDcontactStatus *data) : TypeDataOwner(data) { } inline MTPcontactStatus MTP_contactStatus(MTPint _user_id, const MTPUserStatus &_status) { return MTP::internal::TypeCreator::new_contactStatus(_user_id, _status); } inline MTPcontacts_link::MTPcontacts_link() : TypeDataOwner(new MTPDcontacts_link()) { } inline uint32 MTPcontacts_link::innerLength() const { const MTPDcontacts_link &v(c_contacts_link()); return v.vmy_link.innerLength() + v.vforeign_link.innerLength() + v.vuser.innerLength(); } inline mtpTypeId MTPcontacts_link::type() const { return mtpc_contacts_link; } inline void MTPcontacts_link::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contacts_link) throw mtpErrorUnexpected(cons, "MTPcontacts_link"); auto v = new MTPDcontacts_link(); setData(v); v->vmy_link.read(from, end); v->vforeign_link.read(from, end); v->vuser.read(from, end); } inline void MTPcontacts_link::write(mtpBuffer &to) const { auto &v = c_contacts_link(); v.vmy_link.write(to); v.vforeign_link.write(to); v.vuser.write(to); } inline const MTPDcontacts_link &MTPcontacts_link::c_contacts_link() const { return queryData(); } inline MTPcontacts_link::MTPcontacts_link(const MTPDcontacts_link *data) : TypeDataOwner(data) { } inline MTPcontacts_link MTP_contacts_link(const MTPContactLink &_my_link, const MTPContactLink &_foreign_link, const MTPUser &_user) { return MTP::internal::TypeCreator::new_contacts_link(_my_link, _foreign_link, _user); } inline uint32 MTPcontacts_contacts::innerLength() const { switch (_type) { case mtpc_contacts_contacts: { const MTPDcontacts_contacts &v(c_contacts_contacts()); return v.vcontacts.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPcontacts_contacts::type() const { t_assert(_type != 0); return _type; } inline void MTPcontacts_contacts::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_contacts_contactsNotModified: _type = cons; break; case mtpc_contacts_contacts: _type = cons; { auto v = new MTPDcontacts_contacts(); setData(v); v->vcontacts.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPcontacts_contacts"); } } inline void MTPcontacts_contacts::write(mtpBuffer &to) const { switch (_type) { case mtpc_contacts_contacts: { auto &v = c_contacts_contacts(); v.vcontacts.write(to); v.vusers.write(to); } break; } } inline MTPcontacts_contacts::MTPcontacts_contacts(mtpTypeId type) : _type(type) { switch (type) { case mtpc_contacts_contactsNotModified: break; case mtpc_contacts_contacts: setData(new MTPDcontacts_contacts()); break; default: throw mtpErrorBadTypeId(type, "MTPcontacts_contacts"); } } inline const MTPDcontacts_contacts &MTPcontacts_contacts::c_contacts_contacts() const { t_assert(_type == mtpc_contacts_contacts); return queryData(); } inline MTPcontacts_contacts::MTPcontacts_contacts(const MTPDcontacts_contacts *data) : TypeDataOwner(data), _type(mtpc_contacts_contacts) { } inline MTPcontacts_contacts MTP_contacts_contactsNotModified() { return MTP::internal::TypeCreator::new_contacts_contactsNotModified(); } inline MTPcontacts_contacts MTP_contacts_contacts(const MTPVector &_contacts, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_contacts(_contacts, _users); } inline MTPcontacts_importedContacts::MTPcontacts_importedContacts() : TypeDataOwner(new MTPDcontacts_importedContacts()) { } inline uint32 MTPcontacts_importedContacts::innerLength() const { const MTPDcontacts_importedContacts &v(c_contacts_importedContacts()); return v.vimported.innerLength() + v.vretry_contacts.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPcontacts_importedContacts::type() const { return mtpc_contacts_importedContacts; } inline void MTPcontacts_importedContacts::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contacts_importedContacts) throw mtpErrorUnexpected(cons, "MTPcontacts_importedContacts"); auto v = new MTPDcontacts_importedContacts(); setData(v); v->vimported.read(from, end); v->vretry_contacts.read(from, end); v->vusers.read(from, end); } inline void MTPcontacts_importedContacts::write(mtpBuffer &to) const { auto &v = c_contacts_importedContacts(); v.vimported.write(to); v.vretry_contacts.write(to); v.vusers.write(to); } inline const MTPDcontacts_importedContacts &MTPcontacts_importedContacts::c_contacts_importedContacts() const { return queryData(); } inline MTPcontacts_importedContacts::MTPcontacts_importedContacts(const MTPDcontacts_importedContacts *data) : TypeDataOwner(data) { } inline MTPcontacts_importedContacts MTP_contacts_importedContacts(const MTPVector &_imported, const MTPVector &_retry_contacts, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_importedContacts(_imported, _retry_contacts, _users); } inline uint32 MTPcontacts_blocked::innerLength() const { switch (_type) { case mtpc_contacts_blocked: { const MTPDcontacts_blocked &v(c_contacts_blocked()); return v.vblocked.innerLength() + v.vusers.innerLength(); } case mtpc_contacts_blockedSlice: { const MTPDcontacts_blockedSlice &v(c_contacts_blockedSlice()); return v.vcount.innerLength() + v.vblocked.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPcontacts_blocked::type() const { t_assert(_type != 0); return _type; } inline void MTPcontacts_blocked::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_contacts_blocked: _type = cons; { auto v = new MTPDcontacts_blocked(); setData(v); v->vblocked.read(from, end); v->vusers.read(from, end); } break; case mtpc_contacts_blockedSlice: _type = cons; { auto v = new MTPDcontacts_blockedSlice(); setData(v); v->vcount.read(from, end); v->vblocked.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPcontacts_blocked"); } } inline void MTPcontacts_blocked::write(mtpBuffer &to) const { switch (_type) { case mtpc_contacts_blocked: { auto &v = c_contacts_blocked(); v.vblocked.write(to); v.vusers.write(to); } break; case mtpc_contacts_blockedSlice: { auto &v = c_contacts_blockedSlice(); v.vcount.write(to); v.vblocked.write(to); v.vusers.write(to); } break; } } inline MTPcontacts_blocked::MTPcontacts_blocked(mtpTypeId type) : _type(type) { switch (type) { case mtpc_contacts_blocked: setData(new MTPDcontacts_blocked()); break; case mtpc_contacts_blockedSlice: setData(new MTPDcontacts_blockedSlice()); break; default: throw mtpErrorBadTypeId(type, "MTPcontacts_blocked"); } } inline const MTPDcontacts_blocked &MTPcontacts_blocked::c_contacts_blocked() const { t_assert(_type == mtpc_contacts_blocked); return queryData(); } inline MTPcontacts_blocked::MTPcontacts_blocked(const MTPDcontacts_blocked *data) : TypeDataOwner(data), _type(mtpc_contacts_blocked) { } inline const MTPDcontacts_blockedSlice &MTPcontacts_blocked::c_contacts_blockedSlice() const { t_assert(_type == mtpc_contacts_blockedSlice); return queryData(); } inline MTPcontacts_blocked::MTPcontacts_blocked(const MTPDcontacts_blockedSlice *data) : TypeDataOwner(data), _type(mtpc_contacts_blockedSlice) { } inline MTPcontacts_blocked MTP_contacts_blocked(const MTPVector &_blocked, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_blocked(_blocked, _users); } inline MTPcontacts_blocked MTP_contacts_blockedSlice(MTPint _count, const MTPVector &_blocked, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_blockedSlice(_count, _blocked, _users); } inline uint32 MTPmessages_dialogs::innerLength() const { switch (_type) { case mtpc_messages_dialogs: { const MTPDmessages_dialogs &v(c_messages_dialogs()); return v.vdialogs.innerLength() + v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } case mtpc_messages_dialogsSlice: { const MTPDmessages_dialogsSlice &v(c_messages_dialogsSlice()); return v.vcount.innerLength() + v.vdialogs.innerLength() + v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_dialogs::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_dialogs::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_dialogs: _type = cons; { auto v = new MTPDmessages_dialogs(); setData(v); v->vdialogs.read(from, end); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; case mtpc_messages_dialogsSlice: _type = cons; { auto v = new MTPDmessages_dialogsSlice(); setData(v); v->vcount.read(from, end); v->vdialogs.read(from, end); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_dialogs"); } } inline void MTPmessages_dialogs::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_dialogs: { auto &v = c_messages_dialogs(); v.vdialogs.write(to); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; case mtpc_messages_dialogsSlice: { auto &v = c_messages_dialogsSlice(); v.vcount.write(to); v.vdialogs.write(to); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; } } inline MTPmessages_dialogs::MTPmessages_dialogs(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_dialogs: setData(new MTPDmessages_dialogs()); break; case mtpc_messages_dialogsSlice: setData(new MTPDmessages_dialogsSlice()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_dialogs"); } } inline const MTPDmessages_dialogs &MTPmessages_dialogs::c_messages_dialogs() const { t_assert(_type == mtpc_messages_dialogs); return queryData(); } inline MTPmessages_dialogs::MTPmessages_dialogs(const MTPDmessages_dialogs *data) : TypeDataOwner(data), _type(mtpc_messages_dialogs) { } inline const MTPDmessages_dialogsSlice &MTPmessages_dialogs::c_messages_dialogsSlice() const { t_assert(_type == mtpc_messages_dialogsSlice); return queryData(); } inline MTPmessages_dialogs::MTPmessages_dialogs(const MTPDmessages_dialogsSlice *data) : TypeDataOwner(data), _type(mtpc_messages_dialogsSlice) { } inline MTPmessages_dialogs MTP_messages_dialogs(const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_dialogs(_dialogs, _messages, _chats, _users); } inline MTPmessages_dialogs MTP_messages_dialogsSlice(MTPint _count, const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_dialogsSlice(_count, _dialogs, _messages, _chats, _users); } inline uint32 MTPmessages_messages::innerLength() const { switch (_type) { case mtpc_messages_messages: { const MTPDmessages_messages &v(c_messages_messages()); return v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } case mtpc_messages_messagesSlice: { const MTPDmessages_messagesSlice &v(c_messages_messagesSlice()); return v.vcount.innerLength() + v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } case mtpc_messages_channelMessages: { const MTPDmessages_channelMessages &v(c_messages_channelMessages()); return v.vflags.innerLength() + v.vpts.innerLength() + v.vcount.innerLength() + v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_messages::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_messages::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_messages: _type = cons; { auto v = new MTPDmessages_messages(); setData(v); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; case mtpc_messages_messagesSlice: _type = cons; { auto v = new MTPDmessages_messagesSlice(); setData(v); v->vcount.read(from, end); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; case mtpc_messages_channelMessages: _type = cons; { auto v = new MTPDmessages_channelMessages(); setData(v); v->vflags.read(from, end); v->vpts.read(from, end); v->vcount.read(from, end); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_messages"); } } inline void MTPmessages_messages::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_messages: { auto &v = c_messages_messages(); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; case mtpc_messages_messagesSlice: { auto &v = c_messages_messagesSlice(); v.vcount.write(to); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; case mtpc_messages_channelMessages: { auto &v = c_messages_channelMessages(); v.vflags.write(to); v.vpts.write(to); v.vcount.write(to); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; } } inline MTPmessages_messages::MTPmessages_messages(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_messages: setData(new MTPDmessages_messages()); break; case mtpc_messages_messagesSlice: setData(new MTPDmessages_messagesSlice()); break; case mtpc_messages_channelMessages: setData(new MTPDmessages_channelMessages()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_messages"); } } inline const MTPDmessages_messages &MTPmessages_messages::c_messages_messages() const { t_assert(_type == mtpc_messages_messages); return queryData(); } inline MTPmessages_messages::MTPmessages_messages(const MTPDmessages_messages *data) : TypeDataOwner(data), _type(mtpc_messages_messages) { } inline const MTPDmessages_messagesSlice &MTPmessages_messages::c_messages_messagesSlice() const { t_assert(_type == mtpc_messages_messagesSlice); return queryData(); } inline MTPmessages_messages::MTPmessages_messages(const MTPDmessages_messagesSlice *data) : TypeDataOwner(data), _type(mtpc_messages_messagesSlice) { } inline const MTPDmessages_channelMessages &MTPmessages_messages::c_messages_channelMessages() const { t_assert(_type == mtpc_messages_channelMessages); return queryData(); } inline MTPmessages_messages::MTPmessages_messages(const MTPDmessages_channelMessages *data) : TypeDataOwner(data), _type(mtpc_messages_channelMessages) { } inline MTPmessages_messages MTP_messages_messages(const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_messages(_messages, _chats, _users); } inline MTPmessages_messages MTP_messages_messagesSlice(MTPint _count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_messagesSlice(_count, _messages, _chats, _users); } inline MTPmessages_messages MTP_messages_channelMessages(const MTPflags &_flags, MTPint _pts, MTPint _count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_channelMessages(_flags, _pts, _count, _messages, _chats, _users); } inline uint32 MTPmessages_chats::innerLength() const { switch (_type) { case mtpc_messages_chats: { const MTPDmessages_chats &v(c_messages_chats()); return v.vchats.innerLength(); } case mtpc_messages_chatsSlice: { const MTPDmessages_chatsSlice &v(c_messages_chatsSlice()); return v.vcount.innerLength() + v.vchats.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_chats::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_chats::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_chats: _type = cons; { auto v = new MTPDmessages_chats(); setData(v); v->vchats.read(from, end); } break; case mtpc_messages_chatsSlice: _type = cons; { auto v = new MTPDmessages_chatsSlice(); setData(v); v->vcount.read(from, end); v->vchats.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_chats"); } } inline void MTPmessages_chats::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_chats: { auto &v = c_messages_chats(); v.vchats.write(to); } break; case mtpc_messages_chatsSlice: { auto &v = c_messages_chatsSlice(); v.vcount.write(to); v.vchats.write(to); } break; } } inline MTPmessages_chats::MTPmessages_chats(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_chats: setData(new MTPDmessages_chats()); break; case mtpc_messages_chatsSlice: setData(new MTPDmessages_chatsSlice()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_chats"); } } inline const MTPDmessages_chats &MTPmessages_chats::c_messages_chats() const { t_assert(_type == mtpc_messages_chats); return queryData(); } inline MTPmessages_chats::MTPmessages_chats(const MTPDmessages_chats *data) : TypeDataOwner(data), _type(mtpc_messages_chats) { } inline const MTPDmessages_chatsSlice &MTPmessages_chats::c_messages_chatsSlice() const { t_assert(_type == mtpc_messages_chatsSlice); return queryData(); } inline MTPmessages_chats::MTPmessages_chats(const MTPDmessages_chatsSlice *data) : TypeDataOwner(data), _type(mtpc_messages_chatsSlice) { } inline MTPmessages_chats MTP_messages_chats(const MTPVector &_chats) { return MTP::internal::TypeCreator::new_messages_chats(_chats); } inline MTPmessages_chats MTP_messages_chatsSlice(MTPint _count, const MTPVector &_chats) { return MTP::internal::TypeCreator::new_messages_chatsSlice(_count, _chats); } inline MTPmessages_chatFull::MTPmessages_chatFull() : TypeDataOwner(new MTPDmessages_chatFull()) { } inline uint32 MTPmessages_chatFull::innerLength() const { const MTPDmessages_chatFull &v(c_messages_chatFull()); return v.vfull_chat.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPmessages_chatFull::type() const { return mtpc_messages_chatFull; } inline void MTPmessages_chatFull::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_chatFull) throw mtpErrorUnexpected(cons, "MTPmessages_chatFull"); auto v = new MTPDmessages_chatFull(); setData(v); v->vfull_chat.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } inline void MTPmessages_chatFull::write(mtpBuffer &to) const { auto &v = c_messages_chatFull(); v.vfull_chat.write(to); v.vchats.write(to); v.vusers.write(to); } inline const MTPDmessages_chatFull &MTPmessages_chatFull::c_messages_chatFull() const { return queryData(); } inline MTPmessages_chatFull::MTPmessages_chatFull(const MTPDmessages_chatFull *data) : TypeDataOwner(data) { } inline MTPmessages_chatFull MTP_messages_chatFull(const MTPChatFull &_full_chat, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_chatFull(_full_chat, _chats, _users); } inline MTPmessages_affectedHistory::MTPmessages_affectedHistory() : TypeDataOwner(new MTPDmessages_affectedHistory()) { } inline uint32 MTPmessages_affectedHistory::innerLength() const { const MTPDmessages_affectedHistory &v(c_messages_affectedHistory()); return v.vpts.innerLength() + v.vpts_count.innerLength() + v.voffset.innerLength(); } inline mtpTypeId MTPmessages_affectedHistory::type() const { return mtpc_messages_affectedHistory; } inline void MTPmessages_affectedHistory::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_affectedHistory) throw mtpErrorUnexpected(cons, "MTPmessages_affectedHistory"); auto v = new MTPDmessages_affectedHistory(); setData(v); v->vpts.read(from, end); v->vpts_count.read(from, end); v->voffset.read(from, end); } inline void MTPmessages_affectedHistory::write(mtpBuffer &to) const { auto &v = c_messages_affectedHistory(); v.vpts.write(to); v.vpts_count.write(to); v.voffset.write(to); } inline const MTPDmessages_affectedHistory &MTPmessages_affectedHistory::c_messages_affectedHistory() const { return queryData(); } inline MTPmessages_affectedHistory::MTPmessages_affectedHistory(const MTPDmessages_affectedHistory *data) : TypeDataOwner(data) { } inline MTPmessages_affectedHistory MTP_messages_affectedHistory(MTPint _pts, MTPint _pts_count, MTPint _offset) { return MTP::internal::TypeCreator::new_messages_affectedHistory(_pts, _pts_count, _offset); } inline uint32 MTPmessagesFilter::innerLength() const { switch (_type) { case mtpc_inputMessagesFilterPhoneCalls: { const MTPDinputMessagesFilterPhoneCalls &v(c_inputMessagesFilterPhoneCalls()); return v.vflags.innerLength(); } } return 0; } inline mtpTypeId MTPmessagesFilter::type() const { t_assert(_type != 0); return _type; } inline void MTPmessagesFilter::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputMessagesFilterEmpty: _type = cons; break; case mtpc_inputMessagesFilterPhotos: _type = cons; break; case mtpc_inputMessagesFilterVideo: _type = cons; break; case mtpc_inputMessagesFilterPhotoVideo: _type = cons; break; case mtpc_inputMessagesFilterPhotoVideoDocuments: _type = cons; break; case mtpc_inputMessagesFilterDocument: _type = cons; break; case mtpc_inputMessagesFilterUrl: _type = cons; break; case mtpc_inputMessagesFilterGif: _type = cons; break; case mtpc_inputMessagesFilterVoice: _type = cons; break; case mtpc_inputMessagesFilterMusic: _type = cons; break; case mtpc_inputMessagesFilterChatPhotos: _type = cons; break; case mtpc_inputMessagesFilterPhoneCalls: _type = cons; { auto v = new MTPDinputMessagesFilterPhoneCalls(); setData(v); v->vflags.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessagesFilter"); } } inline void MTPmessagesFilter::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputMessagesFilterPhoneCalls: { auto &v = c_inputMessagesFilterPhoneCalls(); v.vflags.write(to); } break; } } inline MTPmessagesFilter::MTPmessagesFilter(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputMessagesFilterEmpty: break; case mtpc_inputMessagesFilterPhotos: break; case mtpc_inputMessagesFilterVideo: break; case mtpc_inputMessagesFilterPhotoVideo: break; case mtpc_inputMessagesFilterPhotoVideoDocuments: break; case mtpc_inputMessagesFilterDocument: break; case mtpc_inputMessagesFilterUrl: break; case mtpc_inputMessagesFilterGif: break; case mtpc_inputMessagesFilterVoice: break; case mtpc_inputMessagesFilterMusic: break; case mtpc_inputMessagesFilterChatPhotos: break; case mtpc_inputMessagesFilterPhoneCalls: setData(new MTPDinputMessagesFilterPhoneCalls()); break; default: throw mtpErrorBadTypeId(type, "MTPmessagesFilter"); } } inline const MTPDinputMessagesFilterPhoneCalls &MTPmessagesFilter::c_inputMessagesFilterPhoneCalls() const { t_assert(_type == mtpc_inputMessagesFilterPhoneCalls); return queryData(); } inline MTPmessagesFilter::MTPmessagesFilter(const MTPDinputMessagesFilterPhoneCalls *data) : TypeDataOwner(data), _type(mtpc_inputMessagesFilterPhoneCalls) { } inline MTPmessagesFilter MTP_inputMessagesFilterEmpty() { return MTP::internal::TypeCreator::new_inputMessagesFilterEmpty(); } inline MTPmessagesFilter MTP_inputMessagesFilterPhotos() { return MTP::internal::TypeCreator::new_inputMessagesFilterPhotos(); } inline MTPmessagesFilter MTP_inputMessagesFilterVideo() { return MTP::internal::TypeCreator::new_inputMessagesFilterVideo(); } inline MTPmessagesFilter MTP_inputMessagesFilterPhotoVideo() { return MTP::internal::TypeCreator::new_inputMessagesFilterPhotoVideo(); } inline MTPmessagesFilter MTP_inputMessagesFilterPhotoVideoDocuments() { return MTP::internal::TypeCreator::new_inputMessagesFilterPhotoVideoDocuments(); } inline MTPmessagesFilter MTP_inputMessagesFilterDocument() { return MTP::internal::TypeCreator::new_inputMessagesFilterDocument(); } inline MTPmessagesFilter MTP_inputMessagesFilterUrl() { return MTP::internal::TypeCreator::new_inputMessagesFilterUrl(); } inline MTPmessagesFilter MTP_inputMessagesFilterGif() { return MTP::internal::TypeCreator::new_inputMessagesFilterGif(); } inline MTPmessagesFilter MTP_inputMessagesFilterVoice() { return MTP::internal::TypeCreator::new_inputMessagesFilterVoice(); } inline MTPmessagesFilter MTP_inputMessagesFilterMusic() { return MTP::internal::TypeCreator::new_inputMessagesFilterMusic(); } inline MTPmessagesFilter MTP_inputMessagesFilterChatPhotos() { return MTP::internal::TypeCreator::new_inputMessagesFilterChatPhotos(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputMessagesFilterPhoneCalls::Flags) inline MTPmessagesFilter MTP_inputMessagesFilterPhoneCalls(const MTPflags &_flags) { return MTP::internal::TypeCreator::new_inputMessagesFilterPhoneCalls(_flags); } inline uint32 MTPupdate::innerLength() const { switch (_type) { case mtpc_updateNewMessage: { const MTPDupdateNewMessage &v(c_updateNewMessage()); return v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateMessageID: { const MTPDupdateMessageID &v(c_updateMessageID()); return v.vid.innerLength() + v.vrandom_id.innerLength(); } case mtpc_updateDeleteMessages: { const MTPDupdateDeleteMessages &v(c_updateDeleteMessages()); return v.vmessages.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateUserTyping: { const MTPDupdateUserTyping &v(c_updateUserTyping()); return v.vuser_id.innerLength() + v.vaction.innerLength(); } case mtpc_updateChatUserTyping: { const MTPDupdateChatUserTyping &v(c_updateChatUserTyping()); return v.vchat_id.innerLength() + v.vuser_id.innerLength() + v.vaction.innerLength(); } case mtpc_updateChatParticipants: { const MTPDupdateChatParticipants &v(c_updateChatParticipants()); return v.vparticipants.innerLength(); } case mtpc_updateUserStatus: { const MTPDupdateUserStatus &v(c_updateUserStatus()); return v.vuser_id.innerLength() + v.vstatus.innerLength(); } case mtpc_updateUserName: { const MTPDupdateUserName &v(c_updateUserName()); return v.vuser_id.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength() + v.vusername.innerLength(); } case mtpc_updateUserPhoto: { const MTPDupdateUserPhoto &v(c_updateUserPhoto()); return v.vuser_id.innerLength() + v.vdate.innerLength() + v.vphoto.innerLength() + v.vprevious.innerLength(); } case mtpc_updateContactRegistered: { const MTPDupdateContactRegistered &v(c_updateContactRegistered()); return v.vuser_id.innerLength() + v.vdate.innerLength(); } case mtpc_updateContactLink: { const MTPDupdateContactLink &v(c_updateContactLink()); return v.vuser_id.innerLength() + v.vmy_link.innerLength() + v.vforeign_link.innerLength(); } case mtpc_updateNewEncryptedMessage: { const MTPDupdateNewEncryptedMessage &v(c_updateNewEncryptedMessage()); return v.vmessage.innerLength() + v.vqts.innerLength(); } case mtpc_updateEncryptedChatTyping: { const MTPDupdateEncryptedChatTyping &v(c_updateEncryptedChatTyping()); return v.vchat_id.innerLength(); } case mtpc_updateEncryption: { const MTPDupdateEncryption &v(c_updateEncryption()); return v.vchat.innerLength() + v.vdate.innerLength(); } case mtpc_updateEncryptedMessagesRead: { const MTPDupdateEncryptedMessagesRead &v(c_updateEncryptedMessagesRead()); return v.vchat_id.innerLength() + v.vmax_date.innerLength() + v.vdate.innerLength(); } case mtpc_updateChatParticipantAdd: { const MTPDupdateChatParticipantAdd &v(c_updateChatParticipantAdd()); return v.vchat_id.innerLength() + v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vdate.innerLength() + v.vversion.innerLength(); } case mtpc_updateChatParticipantDelete: { const MTPDupdateChatParticipantDelete &v(c_updateChatParticipantDelete()); return v.vchat_id.innerLength() + v.vuser_id.innerLength() + v.vversion.innerLength(); } case mtpc_updateDcOptions: { const MTPDupdateDcOptions &v(c_updateDcOptions()); return v.vdc_options.innerLength(); } case mtpc_updateUserBlocked: { const MTPDupdateUserBlocked &v(c_updateUserBlocked()); return v.vuser_id.innerLength() + v.vblocked.innerLength(); } case mtpc_updateNotifySettings: { const MTPDupdateNotifySettings &v(c_updateNotifySettings()); return v.vpeer.innerLength() + v.vnotify_settings.innerLength(); } case mtpc_updateServiceNotification: { const MTPDupdateServiceNotification &v(c_updateServiceNotification()); return v.vflags.innerLength() + (v.has_inbox_date() ? v.vinbox_date.innerLength() : 0) + v.vtype.innerLength() + v.vmessage.innerLength() + v.vmedia.innerLength() + v.ventities.innerLength(); } case mtpc_updatePrivacy: { const MTPDupdatePrivacy &v(c_updatePrivacy()); return v.vkey.innerLength() + v.vrules.innerLength(); } case mtpc_updateUserPhone: { const MTPDupdateUserPhone &v(c_updateUserPhone()); return v.vuser_id.innerLength() + v.vphone.innerLength(); } case mtpc_updateReadHistoryInbox: { const MTPDupdateReadHistoryInbox &v(c_updateReadHistoryInbox()); return v.vpeer.innerLength() + v.vmax_id.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateReadHistoryOutbox: { const MTPDupdateReadHistoryOutbox &v(c_updateReadHistoryOutbox()); return v.vpeer.innerLength() + v.vmax_id.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateWebPage: { const MTPDupdateWebPage &v(c_updateWebPage()); return v.vwebpage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateReadMessagesContents: { const MTPDupdateReadMessagesContents &v(c_updateReadMessagesContents()); return v.vmessages.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateChannelTooLong: { const MTPDupdateChannelTooLong &v(c_updateChannelTooLong()); return v.vflags.innerLength() + v.vchannel_id.innerLength() + (v.has_pts() ? v.vpts.innerLength() : 0); } case mtpc_updateChannel: { const MTPDupdateChannel &v(c_updateChannel()); return v.vchannel_id.innerLength(); } case mtpc_updateNewChannelMessage: { const MTPDupdateNewChannelMessage &v(c_updateNewChannelMessage()); return v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateReadChannelInbox: { const MTPDupdateReadChannelInbox &v(c_updateReadChannelInbox()); return v.vchannel_id.innerLength() + v.vmax_id.innerLength(); } case mtpc_updateDeleteChannelMessages: { const MTPDupdateDeleteChannelMessages &v(c_updateDeleteChannelMessages()); return v.vchannel_id.innerLength() + v.vmessages.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateChannelMessageViews: { const MTPDupdateChannelMessageViews &v(c_updateChannelMessageViews()); return v.vchannel_id.innerLength() + v.vid.innerLength() + v.vviews.innerLength(); } case mtpc_updateChatAdmins: { const MTPDupdateChatAdmins &v(c_updateChatAdmins()); return v.vchat_id.innerLength() + v.venabled.innerLength() + v.vversion.innerLength(); } case mtpc_updateChatParticipantAdmin: { const MTPDupdateChatParticipantAdmin &v(c_updateChatParticipantAdmin()); return v.vchat_id.innerLength() + v.vuser_id.innerLength() + v.vis_admin.innerLength() + v.vversion.innerLength(); } case mtpc_updateNewStickerSet: { const MTPDupdateNewStickerSet &v(c_updateNewStickerSet()); return v.vstickerset.innerLength(); } case mtpc_updateStickerSetsOrder: { const MTPDupdateStickerSetsOrder &v(c_updateStickerSetsOrder()); return v.vflags.innerLength() + v.vorder.innerLength(); } case mtpc_updateBotInlineQuery: { const MTPDupdateBotInlineQuery &v(c_updateBotInlineQuery()); return v.vflags.innerLength() + v.vquery_id.innerLength() + v.vuser_id.innerLength() + v.vquery.innerLength() + (v.has_geo() ? v.vgeo.innerLength() : 0) + v.voffset.innerLength(); } case mtpc_updateBotInlineSend: { const MTPDupdateBotInlineSend &v(c_updateBotInlineSend()); return v.vflags.innerLength() + v.vuser_id.innerLength() + v.vquery.innerLength() + (v.has_geo() ? v.vgeo.innerLength() : 0) + v.vid.innerLength() + (v.has_msg_id() ? v.vmsg_id.innerLength() : 0); } case mtpc_updateEditChannelMessage: { const MTPDupdateEditChannelMessage &v(c_updateEditChannelMessage()); return v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateChannelPinnedMessage: { const MTPDupdateChannelPinnedMessage &v(c_updateChannelPinnedMessage()); return v.vchannel_id.innerLength() + v.vid.innerLength(); } case mtpc_updateBotCallbackQuery: { const MTPDupdateBotCallbackQuery &v(c_updateBotCallbackQuery()); return v.vflags.innerLength() + v.vquery_id.innerLength() + v.vuser_id.innerLength() + v.vpeer.innerLength() + v.vmsg_id.innerLength() + v.vchat_instance.innerLength() + (v.has_data() ? v.vdata.innerLength() : 0) + (v.has_game_short_name() ? v.vgame_short_name.innerLength() : 0); } case mtpc_updateEditMessage: { const MTPDupdateEditMessage &v(c_updateEditMessage()); return v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updateInlineBotCallbackQuery: { const MTPDupdateInlineBotCallbackQuery &v(c_updateInlineBotCallbackQuery()); return v.vflags.innerLength() + v.vquery_id.innerLength() + v.vuser_id.innerLength() + v.vmsg_id.innerLength() + v.vchat_instance.innerLength() + (v.has_data() ? v.vdata.innerLength() : 0) + (v.has_game_short_name() ? v.vgame_short_name.innerLength() : 0); } case mtpc_updateReadChannelOutbox: { const MTPDupdateReadChannelOutbox &v(c_updateReadChannelOutbox()); return v.vchannel_id.innerLength() + v.vmax_id.innerLength(); } case mtpc_updateDraftMessage: { const MTPDupdateDraftMessage &v(c_updateDraftMessage()); return v.vpeer.innerLength() + v.vdraft.innerLength(); } case mtpc_updateChannelWebPage: { const MTPDupdateChannelWebPage &v(c_updateChannelWebPage()); return v.vchannel_id.innerLength() + v.vwebpage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); } case mtpc_updatePhoneCall: { const MTPDupdatePhoneCall &v(c_updatePhoneCall()); return v.vphone_call.innerLength(); } case mtpc_updateDialogPinned: { const MTPDupdateDialogPinned &v(c_updateDialogPinned()); return v.vflags.innerLength() + v.vpeer.innerLength(); } case mtpc_updatePinnedDialogs: { const MTPDupdatePinnedDialogs &v(c_updatePinnedDialogs()); return v.vflags.innerLength() + (v.has_order() ? v.vorder.innerLength() : 0); } } return 0; } inline mtpTypeId MTPupdate::type() const { t_assert(_type != 0); return _type; } inline void MTPupdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_updateNewMessage: _type = cons; { auto v = new MTPDupdateNewMessage(); setData(v); v->vmessage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateMessageID: _type = cons; { auto v = new MTPDupdateMessageID(); setData(v); v->vid.read(from, end); v->vrandom_id.read(from, end); } break; case mtpc_updateDeleteMessages: _type = cons; { auto v = new MTPDupdateDeleteMessages(); setData(v); v->vmessages.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateUserTyping: _type = cons; { auto v = new MTPDupdateUserTyping(); setData(v); v->vuser_id.read(from, end); v->vaction.read(from, end); } break; case mtpc_updateChatUserTyping: _type = cons; { auto v = new MTPDupdateChatUserTyping(); setData(v); v->vchat_id.read(from, end); v->vuser_id.read(from, end); v->vaction.read(from, end); } break; case mtpc_updateChatParticipants: _type = cons; { auto v = new MTPDupdateChatParticipants(); setData(v); v->vparticipants.read(from, end); } break; case mtpc_updateUserStatus: _type = cons; { auto v = new MTPDupdateUserStatus(); setData(v); v->vuser_id.read(from, end); v->vstatus.read(from, end); } break; case mtpc_updateUserName: _type = cons; { auto v = new MTPDupdateUserName(); setData(v); v->vuser_id.read(from, end); v->vfirst_name.read(from, end); v->vlast_name.read(from, end); v->vusername.read(from, end); } break; case mtpc_updateUserPhoto: _type = cons; { auto v = new MTPDupdateUserPhoto(); setData(v); v->vuser_id.read(from, end); v->vdate.read(from, end); v->vphoto.read(from, end); v->vprevious.read(from, end); } break; case mtpc_updateContactRegistered: _type = cons; { auto v = new MTPDupdateContactRegistered(); setData(v); v->vuser_id.read(from, end); v->vdate.read(from, end); } break; case mtpc_updateContactLink: _type = cons; { auto v = new MTPDupdateContactLink(); setData(v); v->vuser_id.read(from, end); v->vmy_link.read(from, end); v->vforeign_link.read(from, end); } break; case mtpc_updateNewEncryptedMessage: _type = cons; { auto v = new MTPDupdateNewEncryptedMessage(); setData(v); v->vmessage.read(from, end); v->vqts.read(from, end); } break; case mtpc_updateEncryptedChatTyping: _type = cons; { auto v = new MTPDupdateEncryptedChatTyping(); setData(v); v->vchat_id.read(from, end); } break; case mtpc_updateEncryption: _type = cons; { auto v = new MTPDupdateEncryption(); setData(v); v->vchat.read(from, end); v->vdate.read(from, end); } break; case mtpc_updateEncryptedMessagesRead: _type = cons; { auto v = new MTPDupdateEncryptedMessagesRead(); setData(v); v->vchat_id.read(from, end); v->vmax_date.read(from, end); v->vdate.read(from, end); } break; case mtpc_updateChatParticipantAdd: _type = cons; { auto v = new MTPDupdateChatParticipantAdd(); setData(v); v->vchat_id.read(from, end); v->vuser_id.read(from, end); v->vinviter_id.read(from, end); v->vdate.read(from, end); v->vversion.read(from, end); } break; case mtpc_updateChatParticipantDelete: _type = cons; { auto v = new MTPDupdateChatParticipantDelete(); setData(v); v->vchat_id.read(from, end); v->vuser_id.read(from, end); v->vversion.read(from, end); } break; case mtpc_updateDcOptions: _type = cons; { auto v = new MTPDupdateDcOptions(); setData(v); v->vdc_options.read(from, end); } break; case mtpc_updateUserBlocked: _type = cons; { auto v = new MTPDupdateUserBlocked(); setData(v); v->vuser_id.read(from, end); v->vblocked.read(from, end); } break; case mtpc_updateNotifySettings: _type = cons; { auto v = new MTPDupdateNotifySettings(); setData(v); v->vpeer.read(from, end); v->vnotify_settings.read(from, end); } break; case mtpc_updateServiceNotification: _type = cons; { auto v = new MTPDupdateServiceNotification(); setData(v); v->vflags.read(from, end); if (v->has_inbox_date()) { v->vinbox_date.read(from, end); } else { v->vinbox_date = MTPint(); } v->vtype.read(from, end); v->vmessage.read(from, end); v->vmedia.read(from, end); v->ventities.read(from, end); } break; case mtpc_updatePrivacy: _type = cons; { auto v = new MTPDupdatePrivacy(); setData(v); v->vkey.read(from, end); v->vrules.read(from, end); } break; case mtpc_updateUserPhone: _type = cons; { auto v = new MTPDupdateUserPhone(); setData(v); v->vuser_id.read(from, end); v->vphone.read(from, end); } break; case mtpc_updateReadHistoryInbox: _type = cons; { auto v = new MTPDupdateReadHistoryInbox(); setData(v); v->vpeer.read(from, end); v->vmax_id.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateReadHistoryOutbox: _type = cons; { auto v = new MTPDupdateReadHistoryOutbox(); setData(v); v->vpeer.read(from, end); v->vmax_id.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateWebPage: _type = cons; { auto v = new MTPDupdateWebPage(); setData(v); v->vwebpage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateReadMessagesContents: _type = cons; { auto v = new MTPDupdateReadMessagesContents(); setData(v); v->vmessages.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateChannelTooLong: _type = cons; { auto v = new MTPDupdateChannelTooLong(); setData(v); v->vflags.read(from, end); v->vchannel_id.read(from, end); if (v->has_pts()) { v->vpts.read(from, end); } else { v->vpts = MTPint(); } } break; case mtpc_updateChannel: _type = cons; { auto v = new MTPDupdateChannel(); setData(v); v->vchannel_id.read(from, end); } break; case mtpc_updateNewChannelMessage: _type = cons; { auto v = new MTPDupdateNewChannelMessage(); setData(v); v->vmessage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateReadChannelInbox: _type = cons; { auto v = new MTPDupdateReadChannelInbox(); setData(v); v->vchannel_id.read(from, end); v->vmax_id.read(from, end); } break; case mtpc_updateDeleteChannelMessages: _type = cons; { auto v = new MTPDupdateDeleteChannelMessages(); setData(v); v->vchannel_id.read(from, end); v->vmessages.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateChannelMessageViews: _type = cons; { auto v = new MTPDupdateChannelMessageViews(); setData(v); v->vchannel_id.read(from, end); v->vid.read(from, end); v->vviews.read(from, end); } break; case mtpc_updateChatAdmins: _type = cons; { auto v = new MTPDupdateChatAdmins(); setData(v); v->vchat_id.read(from, end); v->venabled.read(from, end); v->vversion.read(from, end); } break; case mtpc_updateChatParticipantAdmin: _type = cons; { auto v = new MTPDupdateChatParticipantAdmin(); setData(v); v->vchat_id.read(from, end); v->vuser_id.read(from, end); v->vis_admin.read(from, end); v->vversion.read(from, end); } break; case mtpc_updateNewStickerSet: _type = cons; { auto v = new MTPDupdateNewStickerSet(); setData(v); v->vstickerset.read(from, end); } break; case mtpc_updateStickerSetsOrder: _type = cons; { auto v = new MTPDupdateStickerSetsOrder(); setData(v); v->vflags.read(from, end); v->vorder.read(from, end); } break; case mtpc_updateStickerSets: _type = cons; break; case mtpc_updateSavedGifs: _type = cons; break; case mtpc_updateBotInlineQuery: _type = cons; { auto v = new MTPDupdateBotInlineQuery(); setData(v); v->vflags.read(from, end); v->vquery_id.read(from, end); v->vuser_id.read(from, end); v->vquery.read(from, end); if (v->has_geo()) { v->vgeo.read(from, end); } else { v->vgeo = MTPGeoPoint(); } v->voffset.read(from, end); } break; case mtpc_updateBotInlineSend: _type = cons; { auto v = new MTPDupdateBotInlineSend(); setData(v); v->vflags.read(from, end); v->vuser_id.read(from, end); v->vquery.read(from, end); if (v->has_geo()) { v->vgeo.read(from, end); } else { v->vgeo = MTPGeoPoint(); } v->vid.read(from, end); if (v->has_msg_id()) { v->vmsg_id.read(from, end); } else { v->vmsg_id = MTPInputBotInlineMessageID(); } } break; case mtpc_updateEditChannelMessage: _type = cons; { auto v = new MTPDupdateEditChannelMessage(); setData(v); v->vmessage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateChannelPinnedMessage: _type = cons; { auto v = new MTPDupdateChannelPinnedMessage(); setData(v); v->vchannel_id.read(from, end); v->vid.read(from, end); } break; case mtpc_updateBotCallbackQuery: _type = cons; { auto v = new MTPDupdateBotCallbackQuery(); setData(v); v->vflags.read(from, end); v->vquery_id.read(from, end); v->vuser_id.read(from, end); v->vpeer.read(from, end); v->vmsg_id.read(from, end); v->vchat_instance.read(from, end); if (v->has_data()) { v->vdata.read(from, end); } else { v->vdata = MTPbytes(); } if (v->has_game_short_name()) { v->vgame_short_name.read(from, end); } else { v->vgame_short_name = MTPstring(); } } break; case mtpc_updateEditMessage: _type = cons; { auto v = new MTPDupdateEditMessage(); setData(v); v->vmessage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updateInlineBotCallbackQuery: _type = cons; { auto v = new MTPDupdateInlineBotCallbackQuery(); setData(v); v->vflags.read(from, end); v->vquery_id.read(from, end); v->vuser_id.read(from, end); v->vmsg_id.read(from, end); v->vchat_instance.read(from, end); if (v->has_data()) { v->vdata.read(from, end); } else { v->vdata = MTPbytes(); } if (v->has_game_short_name()) { v->vgame_short_name.read(from, end); } else { v->vgame_short_name = MTPstring(); } } break; case mtpc_updateReadChannelOutbox: _type = cons; { auto v = new MTPDupdateReadChannelOutbox(); setData(v); v->vchannel_id.read(from, end); v->vmax_id.read(from, end); } break; case mtpc_updateDraftMessage: _type = cons; { auto v = new MTPDupdateDraftMessage(); setData(v); v->vpeer.read(from, end); v->vdraft.read(from, end); } break; case mtpc_updateReadFeaturedStickers: _type = cons; break; case mtpc_updateRecentStickers: _type = cons; break; case mtpc_updateConfig: _type = cons; break; case mtpc_updatePtsChanged: _type = cons; break; case mtpc_updateChannelWebPage: _type = cons; { auto v = new MTPDupdateChannelWebPage(); setData(v); v->vchannel_id.read(from, end); v->vwebpage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); } break; case mtpc_updatePhoneCall: _type = cons; { auto v = new MTPDupdatePhoneCall(); setData(v); v->vphone_call.read(from, end); } break; case mtpc_updateDialogPinned: _type = cons; { auto v = new MTPDupdateDialogPinned(); setData(v); v->vflags.read(from, end); v->vpeer.read(from, end); } break; case mtpc_updatePinnedDialogs: _type = cons; { auto v = new MTPDupdatePinnedDialogs(); setData(v); v->vflags.read(from, end); if (v->has_order()) { v->vorder.read(from, end); } else { v->vorder = MTPVector(); } } break; default: throw mtpErrorUnexpected(cons, "MTPupdate"); } } inline void MTPupdate::write(mtpBuffer &to) const { switch (_type) { case mtpc_updateNewMessage: { auto &v = c_updateNewMessage(); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateMessageID: { auto &v = c_updateMessageID(); v.vid.write(to); v.vrandom_id.write(to); } break; case mtpc_updateDeleteMessages: { auto &v = c_updateDeleteMessages(); v.vmessages.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateUserTyping: { auto &v = c_updateUserTyping(); v.vuser_id.write(to); v.vaction.write(to); } break; case mtpc_updateChatUserTyping: { auto &v = c_updateChatUserTyping(); v.vchat_id.write(to); v.vuser_id.write(to); v.vaction.write(to); } break; case mtpc_updateChatParticipants: { auto &v = c_updateChatParticipants(); v.vparticipants.write(to); } break; case mtpc_updateUserStatus: { auto &v = c_updateUserStatus(); v.vuser_id.write(to); v.vstatus.write(to); } break; case mtpc_updateUserName: { auto &v = c_updateUserName(); v.vuser_id.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); v.vusername.write(to); } break; case mtpc_updateUserPhoto: { auto &v = c_updateUserPhoto(); v.vuser_id.write(to); v.vdate.write(to); v.vphoto.write(to); v.vprevious.write(to); } break; case mtpc_updateContactRegistered: { auto &v = c_updateContactRegistered(); v.vuser_id.write(to); v.vdate.write(to); } break; case mtpc_updateContactLink: { auto &v = c_updateContactLink(); v.vuser_id.write(to); v.vmy_link.write(to); v.vforeign_link.write(to); } break; case mtpc_updateNewEncryptedMessage: { auto &v = c_updateNewEncryptedMessage(); v.vmessage.write(to); v.vqts.write(to); } break; case mtpc_updateEncryptedChatTyping: { auto &v = c_updateEncryptedChatTyping(); v.vchat_id.write(to); } break; case mtpc_updateEncryption: { auto &v = c_updateEncryption(); v.vchat.write(to); v.vdate.write(to); } break; case mtpc_updateEncryptedMessagesRead: { auto &v = c_updateEncryptedMessagesRead(); v.vchat_id.write(to); v.vmax_date.write(to); v.vdate.write(to); } break; case mtpc_updateChatParticipantAdd: { auto &v = c_updateChatParticipantAdd(); v.vchat_id.write(to); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); v.vversion.write(to); } break; case mtpc_updateChatParticipantDelete: { auto &v = c_updateChatParticipantDelete(); v.vchat_id.write(to); v.vuser_id.write(to); v.vversion.write(to); } break; case mtpc_updateDcOptions: { auto &v = c_updateDcOptions(); v.vdc_options.write(to); } break; case mtpc_updateUserBlocked: { auto &v = c_updateUserBlocked(); v.vuser_id.write(to); v.vblocked.write(to); } break; case mtpc_updateNotifySettings: { auto &v = c_updateNotifySettings(); v.vpeer.write(to); v.vnotify_settings.write(to); } break; case mtpc_updateServiceNotification: { auto &v = c_updateServiceNotification(); v.vflags.write(to); if (v.has_inbox_date()) v.vinbox_date.write(to); v.vtype.write(to); v.vmessage.write(to); v.vmedia.write(to); v.ventities.write(to); } break; case mtpc_updatePrivacy: { auto &v = c_updatePrivacy(); v.vkey.write(to); v.vrules.write(to); } break; case mtpc_updateUserPhone: { auto &v = c_updateUserPhone(); v.vuser_id.write(to); v.vphone.write(to); } break; case mtpc_updateReadHistoryInbox: { auto &v = c_updateReadHistoryInbox(); v.vpeer.write(to); v.vmax_id.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateReadHistoryOutbox: { auto &v = c_updateReadHistoryOutbox(); v.vpeer.write(to); v.vmax_id.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateWebPage: { auto &v = c_updateWebPage(); v.vwebpage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateReadMessagesContents: { auto &v = c_updateReadMessagesContents(); v.vmessages.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateChannelTooLong: { auto &v = c_updateChannelTooLong(); v.vflags.write(to); v.vchannel_id.write(to); if (v.has_pts()) v.vpts.write(to); } break; case mtpc_updateChannel: { auto &v = c_updateChannel(); v.vchannel_id.write(to); } break; case mtpc_updateNewChannelMessage: { auto &v = c_updateNewChannelMessage(); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateReadChannelInbox: { auto &v = c_updateReadChannelInbox(); v.vchannel_id.write(to); v.vmax_id.write(to); } break; case mtpc_updateDeleteChannelMessages: { auto &v = c_updateDeleteChannelMessages(); v.vchannel_id.write(to); v.vmessages.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateChannelMessageViews: { auto &v = c_updateChannelMessageViews(); v.vchannel_id.write(to); v.vid.write(to); v.vviews.write(to); } break; case mtpc_updateChatAdmins: { auto &v = c_updateChatAdmins(); v.vchat_id.write(to); v.venabled.write(to); v.vversion.write(to); } break; case mtpc_updateChatParticipantAdmin: { auto &v = c_updateChatParticipantAdmin(); v.vchat_id.write(to); v.vuser_id.write(to); v.vis_admin.write(to); v.vversion.write(to); } break; case mtpc_updateNewStickerSet: { auto &v = c_updateNewStickerSet(); v.vstickerset.write(to); } break; case mtpc_updateStickerSetsOrder: { auto &v = c_updateStickerSetsOrder(); v.vflags.write(to); v.vorder.write(to); } break; case mtpc_updateBotInlineQuery: { auto &v = c_updateBotInlineQuery(); v.vflags.write(to); v.vquery_id.write(to); v.vuser_id.write(to); v.vquery.write(to); if (v.has_geo()) v.vgeo.write(to); v.voffset.write(to); } break; case mtpc_updateBotInlineSend: { auto &v = c_updateBotInlineSend(); v.vflags.write(to); v.vuser_id.write(to); v.vquery.write(to); if (v.has_geo()) v.vgeo.write(to); v.vid.write(to); if (v.has_msg_id()) v.vmsg_id.write(to); } break; case mtpc_updateEditChannelMessage: { auto &v = c_updateEditChannelMessage(); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateChannelPinnedMessage: { auto &v = c_updateChannelPinnedMessage(); v.vchannel_id.write(to); v.vid.write(to); } break; case mtpc_updateBotCallbackQuery: { auto &v = c_updateBotCallbackQuery(); v.vflags.write(to); v.vquery_id.write(to); v.vuser_id.write(to); v.vpeer.write(to); v.vmsg_id.write(to); v.vchat_instance.write(to); if (v.has_data()) v.vdata.write(to); if (v.has_game_short_name()) v.vgame_short_name.write(to); } break; case mtpc_updateEditMessage: { auto &v = c_updateEditMessage(); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateInlineBotCallbackQuery: { auto &v = c_updateInlineBotCallbackQuery(); v.vflags.write(to); v.vquery_id.write(to); v.vuser_id.write(to); v.vmsg_id.write(to); v.vchat_instance.write(to); if (v.has_data()) v.vdata.write(to); if (v.has_game_short_name()) v.vgame_short_name.write(to); } break; case mtpc_updateReadChannelOutbox: { auto &v = c_updateReadChannelOutbox(); v.vchannel_id.write(to); v.vmax_id.write(to); } break; case mtpc_updateDraftMessage: { auto &v = c_updateDraftMessage(); v.vpeer.write(to); v.vdraft.write(to); } break; case mtpc_updateChannelWebPage: { auto &v = c_updateChannelWebPage(); v.vchannel_id.write(to); v.vwebpage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updatePhoneCall: { auto &v = c_updatePhoneCall(); v.vphone_call.write(to); } break; case mtpc_updateDialogPinned: { auto &v = c_updateDialogPinned(); v.vflags.write(to); v.vpeer.write(to); } break; case mtpc_updatePinnedDialogs: { auto &v = c_updatePinnedDialogs(); v.vflags.write(to); if (v.has_order()) v.vorder.write(to); } break; } } inline MTPupdate::MTPupdate(mtpTypeId type) : _type(type) { switch (type) { case mtpc_updateNewMessage: setData(new MTPDupdateNewMessage()); break; case mtpc_updateMessageID: setData(new MTPDupdateMessageID()); break; case mtpc_updateDeleteMessages: setData(new MTPDupdateDeleteMessages()); break; case mtpc_updateUserTyping: setData(new MTPDupdateUserTyping()); break; case mtpc_updateChatUserTyping: setData(new MTPDupdateChatUserTyping()); break; case mtpc_updateChatParticipants: setData(new MTPDupdateChatParticipants()); break; case mtpc_updateUserStatus: setData(new MTPDupdateUserStatus()); break; case mtpc_updateUserName: setData(new MTPDupdateUserName()); break; case mtpc_updateUserPhoto: setData(new MTPDupdateUserPhoto()); break; case mtpc_updateContactRegistered: setData(new MTPDupdateContactRegistered()); break; case mtpc_updateContactLink: setData(new MTPDupdateContactLink()); break; case mtpc_updateNewEncryptedMessage: setData(new MTPDupdateNewEncryptedMessage()); break; case mtpc_updateEncryptedChatTyping: setData(new MTPDupdateEncryptedChatTyping()); break; case mtpc_updateEncryption: setData(new MTPDupdateEncryption()); break; case mtpc_updateEncryptedMessagesRead: setData(new MTPDupdateEncryptedMessagesRead()); break; case mtpc_updateChatParticipantAdd: setData(new MTPDupdateChatParticipantAdd()); break; case mtpc_updateChatParticipantDelete: setData(new MTPDupdateChatParticipantDelete()); break; case mtpc_updateDcOptions: setData(new MTPDupdateDcOptions()); break; case mtpc_updateUserBlocked: setData(new MTPDupdateUserBlocked()); break; case mtpc_updateNotifySettings: setData(new MTPDupdateNotifySettings()); break; case mtpc_updateServiceNotification: setData(new MTPDupdateServiceNotification()); break; case mtpc_updatePrivacy: setData(new MTPDupdatePrivacy()); break; case mtpc_updateUserPhone: setData(new MTPDupdateUserPhone()); break; case mtpc_updateReadHistoryInbox: setData(new MTPDupdateReadHistoryInbox()); break; case mtpc_updateReadHistoryOutbox: setData(new MTPDupdateReadHistoryOutbox()); break; case mtpc_updateWebPage: setData(new MTPDupdateWebPage()); break; case mtpc_updateReadMessagesContents: setData(new MTPDupdateReadMessagesContents()); break; case mtpc_updateChannelTooLong: setData(new MTPDupdateChannelTooLong()); break; case mtpc_updateChannel: setData(new MTPDupdateChannel()); break; case mtpc_updateNewChannelMessage: setData(new MTPDupdateNewChannelMessage()); break; case mtpc_updateReadChannelInbox: setData(new MTPDupdateReadChannelInbox()); break; case mtpc_updateDeleteChannelMessages: setData(new MTPDupdateDeleteChannelMessages()); break; case mtpc_updateChannelMessageViews: setData(new MTPDupdateChannelMessageViews()); break; case mtpc_updateChatAdmins: setData(new MTPDupdateChatAdmins()); break; case mtpc_updateChatParticipantAdmin: setData(new MTPDupdateChatParticipantAdmin()); break; case mtpc_updateNewStickerSet: setData(new MTPDupdateNewStickerSet()); break; case mtpc_updateStickerSetsOrder: setData(new MTPDupdateStickerSetsOrder()); break; case mtpc_updateStickerSets: break; case mtpc_updateSavedGifs: break; case mtpc_updateBotInlineQuery: setData(new MTPDupdateBotInlineQuery()); break; case mtpc_updateBotInlineSend: setData(new MTPDupdateBotInlineSend()); break; case mtpc_updateEditChannelMessage: setData(new MTPDupdateEditChannelMessage()); break; case mtpc_updateChannelPinnedMessage: setData(new MTPDupdateChannelPinnedMessage()); break; case mtpc_updateBotCallbackQuery: setData(new MTPDupdateBotCallbackQuery()); break; case mtpc_updateEditMessage: setData(new MTPDupdateEditMessage()); break; case mtpc_updateInlineBotCallbackQuery: setData(new MTPDupdateInlineBotCallbackQuery()); break; case mtpc_updateReadChannelOutbox: setData(new MTPDupdateReadChannelOutbox()); break; case mtpc_updateDraftMessage: setData(new MTPDupdateDraftMessage()); break; case mtpc_updateReadFeaturedStickers: break; case mtpc_updateRecentStickers: break; case mtpc_updateConfig: break; case mtpc_updatePtsChanged: break; case mtpc_updateChannelWebPage: setData(new MTPDupdateChannelWebPage()); break; case mtpc_updatePhoneCall: setData(new MTPDupdatePhoneCall()); break; case mtpc_updateDialogPinned: setData(new MTPDupdateDialogPinned()); break; case mtpc_updatePinnedDialogs: setData(new MTPDupdatePinnedDialogs()); break; default: throw mtpErrorBadTypeId(type, "MTPupdate"); } } inline const MTPDupdateNewMessage &MTPupdate::c_updateNewMessage() const { t_assert(_type == mtpc_updateNewMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateNewMessage *data) : TypeDataOwner(data), _type(mtpc_updateNewMessage) { } inline const MTPDupdateMessageID &MTPupdate::c_updateMessageID() const { t_assert(_type == mtpc_updateMessageID); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateMessageID *data) : TypeDataOwner(data), _type(mtpc_updateMessageID) { } inline const MTPDupdateDeleteMessages &MTPupdate::c_updateDeleteMessages() const { t_assert(_type == mtpc_updateDeleteMessages); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateDeleteMessages *data) : TypeDataOwner(data), _type(mtpc_updateDeleteMessages) { } inline const MTPDupdateUserTyping &MTPupdate::c_updateUserTyping() const { t_assert(_type == mtpc_updateUserTyping); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateUserTyping *data) : TypeDataOwner(data), _type(mtpc_updateUserTyping) { } inline const MTPDupdateChatUserTyping &MTPupdate::c_updateChatUserTyping() const { t_assert(_type == mtpc_updateChatUserTyping); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChatUserTyping *data) : TypeDataOwner(data), _type(mtpc_updateChatUserTyping) { } inline const MTPDupdateChatParticipants &MTPupdate::c_updateChatParticipants() const { t_assert(_type == mtpc_updateChatParticipants); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChatParticipants *data) : TypeDataOwner(data), _type(mtpc_updateChatParticipants) { } inline const MTPDupdateUserStatus &MTPupdate::c_updateUserStatus() const { t_assert(_type == mtpc_updateUserStatus); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateUserStatus *data) : TypeDataOwner(data), _type(mtpc_updateUserStatus) { } inline const MTPDupdateUserName &MTPupdate::c_updateUserName() const { t_assert(_type == mtpc_updateUserName); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateUserName *data) : TypeDataOwner(data), _type(mtpc_updateUserName) { } inline const MTPDupdateUserPhoto &MTPupdate::c_updateUserPhoto() const { t_assert(_type == mtpc_updateUserPhoto); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateUserPhoto *data) : TypeDataOwner(data), _type(mtpc_updateUserPhoto) { } inline const MTPDupdateContactRegistered &MTPupdate::c_updateContactRegistered() const { t_assert(_type == mtpc_updateContactRegistered); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateContactRegistered *data) : TypeDataOwner(data), _type(mtpc_updateContactRegistered) { } inline const MTPDupdateContactLink &MTPupdate::c_updateContactLink() const { t_assert(_type == mtpc_updateContactLink); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateContactLink *data) : TypeDataOwner(data), _type(mtpc_updateContactLink) { } inline const MTPDupdateNewEncryptedMessage &MTPupdate::c_updateNewEncryptedMessage() const { t_assert(_type == mtpc_updateNewEncryptedMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateNewEncryptedMessage *data) : TypeDataOwner(data), _type(mtpc_updateNewEncryptedMessage) { } inline const MTPDupdateEncryptedChatTyping &MTPupdate::c_updateEncryptedChatTyping() const { t_assert(_type == mtpc_updateEncryptedChatTyping); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateEncryptedChatTyping *data) : TypeDataOwner(data), _type(mtpc_updateEncryptedChatTyping) { } inline const MTPDupdateEncryption &MTPupdate::c_updateEncryption() const { t_assert(_type == mtpc_updateEncryption); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateEncryption *data) : TypeDataOwner(data), _type(mtpc_updateEncryption) { } inline const MTPDupdateEncryptedMessagesRead &MTPupdate::c_updateEncryptedMessagesRead() const { t_assert(_type == mtpc_updateEncryptedMessagesRead); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateEncryptedMessagesRead *data) : TypeDataOwner(data), _type(mtpc_updateEncryptedMessagesRead) { } inline const MTPDupdateChatParticipantAdd &MTPupdate::c_updateChatParticipantAdd() const { t_assert(_type == mtpc_updateChatParticipantAdd); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChatParticipantAdd *data) : TypeDataOwner(data), _type(mtpc_updateChatParticipantAdd) { } inline const MTPDupdateChatParticipantDelete &MTPupdate::c_updateChatParticipantDelete() const { t_assert(_type == mtpc_updateChatParticipantDelete); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChatParticipantDelete *data) : TypeDataOwner(data), _type(mtpc_updateChatParticipantDelete) { } inline const MTPDupdateDcOptions &MTPupdate::c_updateDcOptions() const { t_assert(_type == mtpc_updateDcOptions); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateDcOptions *data) : TypeDataOwner(data), _type(mtpc_updateDcOptions) { } inline const MTPDupdateUserBlocked &MTPupdate::c_updateUserBlocked() const { t_assert(_type == mtpc_updateUserBlocked); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateUserBlocked *data) : TypeDataOwner(data), _type(mtpc_updateUserBlocked) { } inline const MTPDupdateNotifySettings &MTPupdate::c_updateNotifySettings() const { t_assert(_type == mtpc_updateNotifySettings); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateNotifySettings *data) : TypeDataOwner(data), _type(mtpc_updateNotifySettings) { } inline const MTPDupdateServiceNotification &MTPupdate::c_updateServiceNotification() const { t_assert(_type == mtpc_updateServiceNotification); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateServiceNotification *data) : TypeDataOwner(data), _type(mtpc_updateServiceNotification) { } inline const MTPDupdatePrivacy &MTPupdate::c_updatePrivacy() const { t_assert(_type == mtpc_updatePrivacy); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdatePrivacy *data) : TypeDataOwner(data), _type(mtpc_updatePrivacy) { } inline const MTPDupdateUserPhone &MTPupdate::c_updateUserPhone() const { t_assert(_type == mtpc_updateUserPhone); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateUserPhone *data) : TypeDataOwner(data), _type(mtpc_updateUserPhone) { } inline const MTPDupdateReadHistoryInbox &MTPupdate::c_updateReadHistoryInbox() const { t_assert(_type == mtpc_updateReadHistoryInbox); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateReadHistoryInbox *data) : TypeDataOwner(data), _type(mtpc_updateReadHistoryInbox) { } inline const MTPDupdateReadHistoryOutbox &MTPupdate::c_updateReadHistoryOutbox() const { t_assert(_type == mtpc_updateReadHistoryOutbox); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateReadHistoryOutbox *data) : TypeDataOwner(data), _type(mtpc_updateReadHistoryOutbox) { } inline const MTPDupdateWebPage &MTPupdate::c_updateWebPage() const { t_assert(_type == mtpc_updateWebPage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateWebPage *data) : TypeDataOwner(data), _type(mtpc_updateWebPage) { } inline const MTPDupdateReadMessagesContents &MTPupdate::c_updateReadMessagesContents() const { t_assert(_type == mtpc_updateReadMessagesContents); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateReadMessagesContents *data) : TypeDataOwner(data), _type(mtpc_updateReadMessagesContents) { } inline const MTPDupdateChannelTooLong &MTPupdate::c_updateChannelTooLong() const { t_assert(_type == mtpc_updateChannelTooLong); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChannelTooLong *data) : TypeDataOwner(data), _type(mtpc_updateChannelTooLong) { } inline const MTPDupdateChannel &MTPupdate::c_updateChannel() const { t_assert(_type == mtpc_updateChannel); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChannel *data) : TypeDataOwner(data), _type(mtpc_updateChannel) { } inline const MTPDupdateNewChannelMessage &MTPupdate::c_updateNewChannelMessage() const { t_assert(_type == mtpc_updateNewChannelMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateNewChannelMessage *data) : TypeDataOwner(data), _type(mtpc_updateNewChannelMessage) { } inline const MTPDupdateReadChannelInbox &MTPupdate::c_updateReadChannelInbox() const { t_assert(_type == mtpc_updateReadChannelInbox); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateReadChannelInbox *data) : TypeDataOwner(data), _type(mtpc_updateReadChannelInbox) { } inline const MTPDupdateDeleteChannelMessages &MTPupdate::c_updateDeleteChannelMessages() const { t_assert(_type == mtpc_updateDeleteChannelMessages); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateDeleteChannelMessages *data) : TypeDataOwner(data), _type(mtpc_updateDeleteChannelMessages) { } inline const MTPDupdateChannelMessageViews &MTPupdate::c_updateChannelMessageViews() const { t_assert(_type == mtpc_updateChannelMessageViews); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChannelMessageViews *data) : TypeDataOwner(data), _type(mtpc_updateChannelMessageViews) { } inline const MTPDupdateChatAdmins &MTPupdate::c_updateChatAdmins() const { t_assert(_type == mtpc_updateChatAdmins); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChatAdmins *data) : TypeDataOwner(data), _type(mtpc_updateChatAdmins) { } inline const MTPDupdateChatParticipantAdmin &MTPupdate::c_updateChatParticipantAdmin() const { t_assert(_type == mtpc_updateChatParticipantAdmin); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChatParticipantAdmin *data) : TypeDataOwner(data), _type(mtpc_updateChatParticipantAdmin) { } inline const MTPDupdateNewStickerSet &MTPupdate::c_updateNewStickerSet() const { t_assert(_type == mtpc_updateNewStickerSet); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateNewStickerSet *data) : TypeDataOwner(data), _type(mtpc_updateNewStickerSet) { } inline const MTPDupdateStickerSetsOrder &MTPupdate::c_updateStickerSetsOrder() const { t_assert(_type == mtpc_updateStickerSetsOrder); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateStickerSetsOrder *data) : TypeDataOwner(data), _type(mtpc_updateStickerSetsOrder) { } inline const MTPDupdateBotInlineQuery &MTPupdate::c_updateBotInlineQuery() const { t_assert(_type == mtpc_updateBotInlineQuery); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateBotInlineQuery *data) : TypeDataOwner(data), _type(mtpc_updateBotInlineQuery) { } inline const MTPDupdateBotInlineSend &MTPupdate::c_updateBotInlineSend() const { t_assert(_type == mtpc_updateBotInlineSend); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateBotInlineSend *data) : TypeDataOwner(data), _type(mtpc_updateBotInlineSend) { } inline const MTPDupdateEditChannelMessage &MTPupdate::c_updateEditChannelMessage() const { t_assert(_type == mtpc_updateEditChannelMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateEditChannelMessage *data) : TypeDataOwner(data), _type(mtpc_updateEditChannelMessage) { } inline const MTPDupdateChannelPinnedMessage &MTPupdate::c_updateChannelPinnedMessage() const { t_assert(_type == mtpc_updateChannelPinnedMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChannelPinnedMessage *data) : TypeDataOwner(data), _type(mtpc_updateChannelPinnedMessage) { } inline const MTPDupdateBotCallbackQuery &MTPupdate::c_updateBotCallbackQuery() const { t_assert(_type == mtpc_updateBotCallbackQuery); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateBotCallbackQuery *data) : TypeDataOwner(data), _type(mtpc_updateBotCallbackQuery) { } inline const MTPDupdateEditMessage &MTPupdate::c_updateEditMessage() const { t_assert(_type == mtpc_updateEditMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateEditMessage *data) : TypeDataOwner(data), _type(mtpc_updateEditMessage) { } inline const MTPDupdateInlineBotCallbackQuery &MTPupdate::c_updateInlineBotCallbackQuery() const { t_assert(_type == mtpc_updateInlineBotCallbackQuery); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateInlineBotCallbackQuery *data) : TypeDataOwner(data), _type(mtpc_updateInlineBotCallbackQuery) { } inline const MTPDupdateReadChannelOutbox &MTPupdate::c_updateReadChannelOutbox() const { t_assert(_type == mtpc_updateReadChannelOutbox); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateReadChannelOutbox *data) : TypeDataOwner(data), _type(mtpc_updateReadChannelOutbox) { } inline const MTPDupdateDraftMessage &MTPupdate::c_updateDraftMessage() const { t_assert(_type == mtpc_updateDraftMessage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateDraftMessage *data) : TypeDataOwner(data), _type(mtpc_updateDraftMessage) { } inline const MTPDupdateChannelWebPage &MTPupdate::c_updateChannelWebPage() const { t_assert(_type == mtpc_updateChannelWebPage); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateChannelWebPage *data) : TypeDataOwner(data), _type(mtpc_updateChannelWebPage) { } inline const MTPDupdatePhoneCall &MTPupdate::c_updatePhoneCall() const { t_assert(_type == mtpc_updatePhoneCall); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdatePhoneCall *data) : TypeDataOwner(data), _type(mtpc_updatePhoneCall) { } inline const MTPDupdateDialogPinned &MTPupdate::c_updateDialogPinned() const { t_assert(_type == mtpc_updateDialogPinned); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdateDialogPinned *data) : TypeDataOwner(data), _type(mtpc_updateDialogPinned) { } inline const MTPDupdatePinnedDialogs &MTPupdate::c_updatePinnedDialogs() const { t_assert(_type == mtpc_updatePinnedDialogs); return queryData(); } inline MTPupdate::MTPupdate(const MTPDupdatePinnedDialogs *data) : TypeDataOwner(data), _type(mtpc_updatePinnedDialogs) { } inline MTPupdate MTP_updateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateNewMessage(_message, _pts, _pts_count); } inline MTPupdate MTP_updateMessageID(MTPint _id, const MTPlong &_random_id) { return MTP::internal::TypeCreator::new_updateMessageID(_id, _random_id); } inline MTPupdate MTP_updateDeleteMessages(const MTPVector &_messages, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateDeleteMessages(_messages, _pts, _pts_count); } inline MTPupdate MTP_updateUserTyping(MTPint _user_id, const MTPSendMessageAction &_action) { return MTP::internal::TypeCreator::new_updateUserTyping(_user_id, _action); } inline MTPupdate MTP_updateChatUserTyping(MTPint _chat_id, MTPint _user_id, const MTPSendMessageAction &_action) { return MTP::internal::TypeCreator::new_updateChatUserTyping(_chat_id, _user_id, _action); } inline MTPupdate MTP_updateChatParticipants(const MTPChatParticipants &_participants) { return MTP::internal::TypeCreator::new_updateChatParticipants(_participants); } inline MTPupdate MTP_updateUserStatus(MTPint _user_id, const MTPUserStatus &_status) { return MTP::internal::TypeCreator::new_updateUserStatus(_user_id, _status); } inline MTPupdate MTP_updateUserName(MTPint _user_id, const MTPstring &_first_name, const MTPstring &_last_name, const MTPstring &_username) { return MTP::internal::TypeCreator::new_updateUserName(_user_id, _first_name, _last_name, _username); } inline MTPupdate MTP_updateUserPhoto(MTPint _user_id, MTPint _date, const MTPUserProfilePhoto &_photo, MTPBool _previous) { return MTP::internal::TypeCreator::new_updateUserPhoto(_user_id, _date, _photo, _previous); } inline MTPupdate MTP_updateContactRegistered(MTPint _user_id, MTPint _date) { return MTP::internal::TypeCreator::new_updateContactRegistered(_user_id, _date); } inline MTPupdate MTP_updateContactLink(MTPint _user_id, const MTPContactLink &_my_link, const MTPContactLink &_foreign_link) { return MTP::internal::TypeCreator::new_updateContactLink(_user_id, _my_link, _foreign_link); } inline MTPupdate MTP_updateNewEncryptedMessage(const MTPEncryptedMessage &_message, MTPint _qts) { return MTP::internal::TypeCreator::new_updateNewEncryptedMessage(_message, _qts); } inline MTPupdate MTP_updateEncryptedChatTyping(MTPint _chat_id) { return MTP::internal::TypeCreator::new_updateEncryptedChatTyping(_chat_id); } inline MTPupdate MTP_updateEncryption(const MTPEncryptedChat &_chat, MTPint _date) { return MTP::internal::TypeCreator::new_updateEncryption(_chat, _date); } inline MTPupdate MTP_updateEncryptedMessagesRead(MTPint _chat_id, MTPint _max_date, MTPint _date) { return MTP::internal::TypeCreator::new_updateEncryptedMessagesRead(_chat_id, _max_date, _date); } inline MTPupdate MTP_updateChatParticipantAdd(MTPint _chat_id, MTPint _user_id, MTPint _inviter_id, MTPint _date, MTPint _version) { return MTP::internal::TypeCreator::new_updateChatParticipantAdd(_chat_id, _user_id, _inviter_id, _date, _version); } inline MTPupdate MTP_updateChatParticipantDelete(MTPint _chat_id, MTPint _user_id, MTPint _version) { return MTP::internal::TypeCreator::new_updateChatParticipantDelete(_chat_id, _user_id, _version); } inline MTPupdate MTP_updateDcOptions(const MTPVector &_dc_options) { return MTP::internal::TypeCreator::new_updateDcOptions(_dc_options); } inline MTPupdate MTP_updateUserBlocked(MTPint _user_id, MTPBool _blocked) { return MTP::internal::TypeCreator::new_updateUserBlocked(_user_id, _blocked); } inline MTPupdate MTP_updateNotifySettings(const MTPNotifyPeer &_peer, const MTPPeerNotifySettings &_notify_settings) { return MTP::internal::TypeCreator::new_updateNotifySettings(_peer, _notify_settings); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateServiceNotification::Flags) inline MTPupdate MTP_updateServiceNotification(const MTPflags &_flags, MTPint _inbox_date, const MTPstring &_type, const MTPstring &_message, const MTPMessageMedia &_media, const MTPVector &_entities) { return MTP::internal::TypeCreator::new_updateServiceNotification(_flags, _inbox_date, _type, _message, _media, _entities); } inline MTPupdate MTP_updatePrivacy(const MTPPrivacyKey &_key, const MTPVector &_rules) { return MTP::internal::TypeCreator::new_updatePrivacy(_key, _rules); } inline MTPupdate MTP_updateUserPhone(MTPint _user_id, const MTPstring &_phone) { return MTP::internal::TypeCreator::new_updateUserPhone(_user_id, _phone); } inline MTPupdate MTP_updateReadHistoryInbox(const MTPPeer &_peer, MTPint _max_id, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateReadHistoryInbox(_peer, _max_id, _pts, _pts_count); } inline MTPupdate MTP_updateReadHistoryOutbox(const MTPPeer &_peer, MTPint _max_id, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateReadHistoryOutbox(_peer, _max_id, _pts, _pts_count); } inline MTPupdate MTP_updateWebPage(const MTPWebPage &_webpage, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateWebPage(_webpage, _pts, _pts_count); } inline MTPupdate MTP_updateReadMessagesContents(const MTPVector &_messages, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateReadMessagesContents(_messages, _pts, _pts_count); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateChannelTooLong::Flags) inline MTPupdate MTP_updateChannelTooLong(const MTPflags &_flags, MTPint _channel_id, MTPint _pts) { return MTP::internal::TypeCreator::new_updateChannelTooLong(_flags, _channel_id, _pts); } inline MTPupdate MTP_updateChannel(MTPint _channel_id) { return MTP::internal::TypeCreator::new_updateChannel(_channel_id); } inline MTPupdate MTP_updateNewChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateNewChannelMessage(_message, _pts, _pts_count); } inline MTPupdate MTP_updateReadChannelInbox(MTPint _channel_id, MTPint _max_id) { return MTP::internal::TypeCreator::new_updateReadChannelInbox(_channel_id, _max_id); } inline MTPupdate MTP_updateDeleteChannelMessages(MTPint _channel_id, const MTPVector &_messages, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateDeleteChannelMessages(_channel_id, _messages, _pts, _pts_count); } inline MTPupdate MTP_updateChannelMessageViews(MTPint _channel_id, MTPint _id, MTPint _views) { return MTP::internal::TypeCreator::new_updateChannelMessageViews(_channel_id, _id, _views); } inline MTPupdate MTP_updateChatAdmins(MTPint _chat_id, MTPBool _enabled, MTPint _version) { return MTP::internal::TypeCreator::new_updateChatAdmins(_chat_id, _enabled, _version); } inline MTPupdate MTP_updateChatParticipantAdmin(MTPint _chat_id, MTPint _user_id, MTPBool _is_admin, MTPint _version) { return MTP::internal::TypeCreator::new_updateChatParticipantAdmin(_chat_id, _user_id, _is_admin, _version); } inline MTPupdate MTP_updateNewStickerSet(const MTPmessages_StickerSet &_stickerset) { return MTP::internal::TypeCreator::new_updateNewStickerSet(_stickerset); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateStickerSetsOrder::Flags) inline MTPupdate MTP_updateStickerSetsOrder(const MTPflags &_flags, const MTPVector &_order) { return MTP::internal::TypeCreator::new_updateStickerSetsOrder(_flags, _order); } inline MTPupdate MTP_updateStickerSets() { return MTP::internal::TypeCreator::new_updateStickerSets(); } inline MTPupdate MTP_updateSavedGifs() { return MTP::internal::TypeCreator::new_updateSavedGifs(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateBotInlineQuery::Flags) inline MTPupdate MTP_updateBotInlineQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPstring &_query, const MTPGeoPoint &_geo, const MTPstring &_offset) { return MTP::internal::TypeCreator::new_updateBotInlineQuery(_flags, _query_id, _user_id, _query, _geo, _offset); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateBotInlineSend::Flags) inline MTPupdate MTP_updateBotInlineSend(const MTPflags &_flags, MTPint _user_id, const MTPstring &_query, const MTPGeoPoint &_geo, const MTPstring &_id, const MTPInputBotInlineMessageID &_msg_id) { return MTP::internal::TypeCreator::new_updateBotInlineSend(_flags, _user_id, _query, _geo, _id, _msg_id); } inline MTPupdate MTP_updateEditChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateEditChannelMessage(_message, _pts, _pts_count); } inline MTPupdate MTP_updateChannelPinnedMessage(MTPint _channel_id, MTPint _id) { return MTP::internal::TypeCreator::new_updateChannelPinnedMessage(_channel_id, _id); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateBotCallbackQuery::Flags) inline MTPupdate MTP_updateBotCallbackQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPPeer &_peer, MTPint _msg_id, const MTPlong &_chat_instance, const MTPbytes &_data, const MTPstring &_game_short_name) { return MTP::internal::TypeCreator::new_updateBotCallbackQuery(_flags, _query_id, _user_id, _peer, _msg_id, _chat_instance, _data, _game_short_name); } inline MTPupdate MTP_updateEditMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateEditMessage(_message, _pts, _pts_count); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateInlineBotCallbackQuery::Flags) inline MTPupdate MTP_updateInlineBotCallbackQuery(const MTPflags &_flags, const MTPlong &_query_id, MTPint _user_id, const MTPInputBotInlineMessageID &_msg_id, const MTPlong &_chat_instance, const MTPbytes &_data, const MTPstring &_game_short_name) { return MTP::internal::TypeCreator::new_updateInlineBotCallbackQuery(_flags, _query_id, _user_id, _msg_id, _chat_instance, _data, _game_short_name); } inline MTPupdate MTP_updateReadChannelOutbox(MTPint _channel_id, MTPint _max_id) { return MTP::internal::TypeCreator::new_updateReadChannelOutbox(_channel_id, _max_id); } inline MTPupdate MTP_updateDraftMessage(const MTPPeer &_peer, const MTPDraftMessage &_draft) { return MTP::internal::TypeCreator::new_updateDraftMessage(_peer, _draft); } inline MTPupdate MTP_updateReadFeaturedStickers() { return MTP::internal::TypeCreator::new_updateReadFeaturedStickers(); } inline MTPupdate MTP_updateRecentStickers() { return MTP::internal::TypeCreator::new_updateRecentStickers(); } inline MTPupdate MTP_updateConfig() { return MTP::internal::TypeCreator::new_updateConfig(); } inline MTPupdate MTP_updatePtsChanged() { return MTP::internal::TypeCreator::new_updatePtsChanged(); } inline MTPupdate MTP_updateChannelWebPage(MTPint _channel_id, const MTPWebPage &_webpage, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateChannelWebPage(_channel_id, _webpage, _pts, _pts_count); } inline MTPupdate MTP_updatePhoneCall(const MTPPhoneCall &_phone_call) { return MTP::internal::TypeCreator::new_updatePhoneCall(_phone_call); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateDialogPinned::Flags) inline MTPupdate MTP_updateDialogPinned(const MTPflags &_flags, const MTPPeer &_peer) { return MTP::internal::TypeCreator::new_updateDialogPinned(_flags, _peer); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdatePinnedDialogs::Flags) inline MTPupdate MTP_updatePinnedDialogs(const MTPflags &_flags, const MTPVector &_order) { return MTP::internal::TypeCreator::new_updatePinnedDialogs(_flags, _order); } inline MTPupdates_state::MTPupdates_state() : TypeDataOwner(new MTPDupdates_state()) { } inline uint32 MTPupdates_state::innerLength() const { const MTPDupdates_state &v(c_updates_state()); return v.vpts.innerLength() + v.vqts.innerLength() + v.vdate.innerLength() + v.vseq.innerLength() + v.vunread_count.innerLength(); } inline mtpTypeId MTPupdates_state::type() const { return mtpc_updates_state; } inline void MTPupdates_state::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_updates_state) throw mtpErrorUnexpected(cons, "MTPupdates_state"); auto v = new MTPDupdates_state(); setData(v); v->vpts.read(from, end); v->vqts.read(from, end); v->vdate.read(from, end); v->vseq.read(from, end); v->vunread_count.read(from, end); } inline void MTPupdates_state::write(mtpBuffer &to) const { auto &v = c_updates_state(); v.vpts.write(to); v.vqts.write(to); v.vdate.write(to); v.vseq.write(to); v.vunread_count.write(to); } inline const MTPDupdates_state &MTPupdates_state::c_updates_state() const { return queryData(); } inline MTPupdates_state::MTPupdates_state(const MTPDupdates_state *data) : TypeDataOwner(data) { } inline MTPupdates_state MTP_updates_state(MTPint _pts, MTPint _qts, MTPint _date, MTPint _seq, MTPint _unread_count) { return MTP::internal::TypeCreator::new_updates_state(_pts, _qts, _date, _seq, _unread_count); } inline uint32 MTPupdates_difference::innerLength() const { switch (_type) { case mtpc_updates_differenceEmpty: { const MTPDupdates_differenceEmpty &v(c_updates_differenceEmpty()); return v.vdate.innerLength() + v.vseq.innerLength(); } case mtpc_updates_difference: { const MTPDupdates_difference &v(c_updates_difference()); return v.vnew_messages.innerLength() + v.vnew_encrypted_messages.innerLength() + v.vother_updates.innerLength() + v.vchats.innerLength() + v.vusers.innerLength() + v.vstate.innerLength(); } case mtpc_updates_differenceSlice: { const MTPDupdates_differenceSlice &v(c_updates_differenceSlice()); return v.vnew_messages.innerLength() + v.vnew_encrypted_messages.innerLength() + v.vother_updates.innerLength() + v.vchats.innerLength() + v.vusers.innerLength() + v.vintermediate_state.innerLength(); } case mtpc_updates_differenceTooLong: { const MTPDupdates_differenceTooLong &v(c_updates_differenceTooLong()); return v.vpts.innerLength(); } } return 0; } inline mtpTypeId MTPupdates_difference::type() const { t_assert(_type != 0); return _type; } inline void MTPupdates_difference::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_updates_differenceEmpty: _type = cons; { auto v = new MTPDupdates_differenceEmpty(); setData(v); v->vdate.read(from, end); v->vseq.read(from, end); } break; case mtpc_updates_difference: _type = cons; { auto v = new MTPDupdates_difference(); setData(v); v->vnew_messages.read(from, end); v->vnew_encrypted_messages.read(from, end); v->vother_updates.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); v->vstate.read(from, end); } break; case mtpc_updates_differenceSlice: _type = cons; { auto v = new MTPDupdates_differenceSlice(); setData(v); v->vnew_messages.read(from, end); v->vnew_encrypted_messages.read(from, end); v->vother_updates.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); v->vintermediate_state.read(from, end); } break; case mtpc_updates_differenceTooLong: _type = cons; { auto v = new MTPDupdates_differenceTooLong(); setData(v); v->vpts.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPupdates_difference"); } } inline void MTPupdates_difference::write(mtpBuffer &to) const { switch (_type) { case mtpc_updates_differenceEmpty: { auto &v = c_updates_differenceEmpty(); v.vdate.write(to); v.vseq.write(to); } break; case mtpc_updates_difference: { auto &v = c_updates_difference(); v.vnew_messages.write(to); v.vnew_encrypted_messages.write(to); v.vother_updates.write(to); v.vchats.write(to); v.vusers.write(to); v.vstate.write(to); } break; case mtpc_updates_differenceSlice: { auto &v = c_updates_differenceSlice(); v.vnew_messages.write(to); v.vnew_encrypted_messages.write(to); v.vother_updates.write(to); v.vchats.write(to); v.vusers.write(to); v.vintermediate_state.write(to); } break; case mtpc_updates_differenceTooLong: { auto &v = c_updates_differenceTooLong(); v.vpts.write(to); } break; } } inline MTPupdates_difference::MTPupdates_difference(mtpTypeId type) : _type(type) { switch (type) { case mtpc_updates_differenceEmpty: setData(new MTPDupdates_differenceEmpty()); break; case mtpc_updates_difference: setData(new MTPDupdates_difference()); break; case mtpc_updates_differenceSlice: setData(new MTPDupdates_differenceSlice()); break; case mtpc_updates_differenceTooLong: setData(new MTPDupdates_differenceTooLong()); break; default: throw mtpErrorBadTypeId(type, "MTPupdates_difference"); } } inline const MTPDupdates_differenceEmpty &MTPupdates_difference::c_updates_differenceEmpty() const { t_assert(_type == mtpc_updates_differenceEmpty); return queryData(); } inline MTPupdates_difference::MTPupdates_difference(const MTPDupdates_differenceEmpty *data) : TypeDataOwner(data), _type(mtpc_updates_differenceEmpty) { } inline const MTPDupdates_difference &MTPupdates_difference::c_updates_difference() const { t_assert(_type == mtpc_updates_difference); return queryData(); } inline MTPupdates_difference::MTPupdates_difference(const MTPDupdates_difference *data) : TypeDataOwner(data), _type(mtpc_updates_difference) { } inline const MTPDupdates_differenceSlice &MTPupdates_difference::c_updates_differenceSlice() const { t_assert(_type == mtpc_updates_differenceSlice); return queryData(); } inline MTPupdates_difference::MTPupdates_difference(const MTPDupdates_differenceSlice *data) : TypeDataOwner(data), _type(mtpc_updates_differenceSlice) { } inline const MTPDupdates_differenceTooLong &MTPupdates_difference::c_updates_differenceTooLong() const { t_assert(_type == mtpc_updates_differenceTooLong); return queryData(); } inline MTPupdates_difference::MTPupdates_difference(const MTPDupdates_differenceTooLong *data) : TypeDataOwner(data), _type(mtpc_updates_differenceTooLong) { } inline MTPupdates_difference MTP_updates_differenceEmpty(MTPint _date, MTPint _seq) { return MTP::internal::TypeCreator::new_updates_differenceEmpty(_date, _seq); } inline MTPupdates_difference MTP_updates_difference(const MTPVector &_new_messages, const MTPVector &_new_encrypted_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_state) { return MTP::internal::TypeCreator::new_updates_difference(_new_messages, _new_encrypted_messages, _other_updates, _chats, _users, _state); } inline MTPupdates_difference MTP_updates_differenceSlice(const MTPVector &_new_messages, const MTPVector &_new_encrypted_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_intermediate_state) { return MTP::internal::TypeCreator::new_updates_differenceSlice(_new_messages, _new_encrypted_messages, _other_updates, _chats, _users, _intermediate_state); } inline MTPupdates_difference MTP_updates_differenceTooLong(MTPint _pts) { return MTP::internal::TypeCreator::new_updates_differenceTooLong(_pts); } inline uint32 MTPupdates::innerLength() const { switch (_type) { case mtpc_updateShortMessage: { const MTPDupdateShortMessage &v(c_updateShortMessage()); return v.vflags.innerLength() + v.vid.innerLength() + v.vuser_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from() ? v.vfwd_from.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } case mtpc_updateShortChatMessage: { const MTPDupdateShortChatMessage &v(c_updateShortChatMessage()); return v.vflags.innerLength() + v.vid.innerLength() + v.vfrom_id.innerLength() + v.vchat_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from() ? v.vfwd_from.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } case mtpc_updateShort: { const MTPDupdateShort &v(c_updateShort()); return v.vupdate.innerLength() + v.vdate.innerLength(); } case mtpc_updatesCombined: { const MTPDupdatesCombined &v(c_updatesCombined()); return v.vupdates.innerLength() + v.vusers.innerLength() + v.vchats.innerLength() + v.vdate.innerLength() + v.vseq_start.innerLength() + v.vseq.innerLength(); } case mtpc_updates: { const MTPDupdates &v(c_updates()); return v.vupdates.innerLength() + v.vusers.innerLength() + v.vchats.innerLength() + v.vdate.innerLength() + v.vseq.innerLength(); } case mtpc_updateShortSentMessage: { const MTPDupdateShortSentMessage &v(c_updateShortSentMessage()); return v.vflags.innerLength() + v.vid.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_media() ? v.vmedia.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } } return 0; } inline mtpTypeId MTPupdates::type() const { t_assert(_type != 0); return _type; } inline void MTPupdates::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_updatesTooLong: _type = cons; break; case mtpc_updateShortMessage: _type = cons; { auto v = new MTPDupdateShortMessage(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vuser_id.read(from, end); v->vmessage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); v->vdate.read(from, end); if (v->has_fwd_from()) { v->vfwd_from.read(from, end); } else { v->vfwd_from = MTPMessageFwdHeader(); } if (v->has_via_bot_id()) { v->vvia_bot_id.read(from, end); } else { v->vvia_bot_id = MTPint(); } if (v->has_reply_to_msg_id()) { v->vreply_to_msg_id.read(from, end); } else { v->vreply_to_msg_id = MTPint(); } if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } } break; case mtpc_updateShortChatMessage: _type = cons; { auto v = new MTPDupdateShortChatMessage(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vfrom_id.read(from, end); v->vchat_id.read(from, end); v->vmessage.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); v->vdate.read(from, end); if (v->has_fwd_from()) { v->vfwd_from.read(from, end); } else { v->vfwd_from = MTPMessageFwdHeader(); } if (v->has_via_bot_id()) { v->vvia_bot_id.read(from, end); } else { v->vvia_bot_id = MTPint(); } if (v->has_reply_to_msg_id()) { v->vreply_to_msg_id.read(from, end); } else { v->vreply_to_msg_id = MTPint(); } if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } } break; case mtpc_updateShort: _type = cons; { auto v = new MTPDupdateShort(); setData(v); v->vupdate.read(from, end); v->vdate.read(from, end); } break; case mtpc_updatesCombined: _type = cons; { auto v = new MTPDupdatesCombined(); setData(v); v->vupdates.read(from, end); v->vusers.read(from, end); v->vchats.read(from, end); v->vdate.read(from, end); v->vseq_start.read(from, end); v->vseq.read(from, end); } break; case mtpc_updates: _type = cons; { auto v = new MTPDupdates(); setData(v); v->vupdates.read(from, end); v->vusers.read(from, end); v->vchats.read(from, end); v->vdate.read(from, end); v->vseq.read(from, end); } break; case mtpc_updateShortSentMessage: _type = cons; { auto v = new MTPDupdateShortSentMessage(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vpts.read(from, end); v->vpts_count.read(from, end); v->vdate.read(from, end); if (v->has_media()) { v->vmedia.read(from, end); } else { v->vmedia = MTPMessageMedia(); } if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } } break; default: throw mtpErrorUnexpected(cons, "MTPupdates"); } } inline void MTPupdates::write(mtpBuffer &to) const { switch (_type) { case mtpc_updateShortMessage: { auto &v = c_updateShortMessage(); v.vflags.write(to); v.vid.write(to); v.vuser_id.write(to); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); v.vdate.write(to); if (v.has_fwd_from()) v.vfwd_from.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); if (v.has_entities()) v.ventities.write(to); } break; case mtpc_updateShortChatMessage: { auto &v = c_updateShortChatMessage(); v.vflags.write(to); v.vid.write(to); v.vfrom_id.write(to); v.vchat_id.write(to); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); v.vdate.write(to); if (v.has_fwd_from()) v.vfwd_from.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); if (v.has_entities()) v.ventities.write(to); } break; case mtpc_updateShort: { auto &v = c_updateShort(); v.vupdate.write(to); v.vdate.write(to); } break; case mtpc_updatesCombined: { auto &v = c_updatesCombined(); v.vupdates.write(to); v.vusers.write(to); v.vchats.write(to); v.vdate.write(to); v.vseq_start.write(to); v.vseq.write(to); } break; case mtpc_updates: { auto &v = c_updates(); v.vupdates.write(to); v.vusers.write(to); v.vchats.write(to); v.vdate.write(to); v.vseq.write(to); } break; case mtpc_updateShortSentMessage: { auto &v = c_updateShortSentMessage(); v.vflags.write(to); v.vid.write(to); v.vpts.write(to); v.vpts_count.write(to); v.vdate.write(to); if (v.has_media()) v.vmedia.write(to); if (v.has_entities()) v.ventities.write(to); } break; } } inline MTPupdates::MTPupdates(mtpTypeId type) : _type(type) { switch (type) { case mtpc_updatesTooLong: break; case mtpc_updateShortMessage: setData(new MTPDupdateShortMessage()); break; case mtpc_updateShortChatMessage: setData(new MTPDupdateShortChatMessage()); break; case mtpc_updateShort: setData(new MTPDupdateShort()); break; case mtpc_updatesCombined: setData(new MTPDupdatesCombined()); break; case mtpc_updates: setData(new MTPDupdates()); break; case mtpc_updateShortSentMessage: setData(new MTPDupdateShortSentMessage()); break; default: throw mtpErrorBadTypeId(type, "MTPupdates"); } } inline const MTPDupdateShortMessage &MTPupdates::c_updateShortMessage() const { t_assert(_type == mtpc_updateShortMessage); return queryData(); } inline MTPupdates::MTPupdates(const MTPDupdateShortMessage *data) : TypeDataOwner(data), _type(mtpc_updateShortMessage) { } inline const MTPDupdateShortChatMessage &MTPupdates::c_updateShortChatMessage() const { t_assert(_type == mtpc_updateShortChatMessage); return queryData(); } inline MTPupdates::MTPupdates(const MTPDupdateShortChatMessage *data) : TypeDataOwner(data), _type(mtpc_updateShortChatMessage) { } inline const MTPDupdateShort &MTPupdates::c_updateShort() const { t_assert(_type == mtpc_updateShort); return queryData(); } inline MTPupdates::MTPupdates(const MTPDupdateShort *data) : TypeDataOwner(data), _type(mtpc_updateShort) { } inline const MTPDupdatesCombined &MTPupdates::c_updatesCombined() const { t_assert(_type == mtpc_updatesCombined); return queryData(); } inline MTPupdates::MTPupdates(const MTPDupdatesCombined *data) : TypeDataOwner(data), _type(mtpc_updatesCombined) { } inline const MTPDupdates &MTPupdates::c_updates() const { t_assert(_type == mtpc_updates); return queryData(); } inline MTPupdates::MTPupdates(const MTPDupdates *data) : TypeDataOwner(data), _type(mtpc_updates) { } inline const MTPDupdateShortSentMessage &MTPupdates::c_updateShortSentMessage() const { t_assert(_type == mtpc_updateShortSentMessage); return queryData(); } inline MTPupdates::MTPupdates(const MTPDupdateShortSentMessage *data) : TypeDataOwner(data), _type(mtpc_updateShortSentMessage) { } inline MTPupdates MTP_updatesTooLong() { return MTP::internal::TypeCreator::new_updatesTooLong(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateShortMessage::Flags) inline MTPupdates MTP_updateShortMessage(const MTPflags &_flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { return MTP::internal::TypeCreator::new_updateShortMessage(_flags, _id, _user_id, _message, _pts, _pts_count, _date, _fwd_from, _via_bot_id, _reply_to_msg_id, _entities); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateShortChatMessage::Flags) inline MTPupdates MTP_updateShortChatMessage(const MTPflags &_flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { return MTP::internal::TypeCreator::new_updateShortChatMessage(_flags, _id, _from_id, _chat_id, _message, _pts, _pts_count, _date, _fwd_from, _via_bot_id, _reply_to_msg_id, _entities); } inline MTPupdates MTP_updateShort(const MTPUpdate &_update, MTPint _date) { return MTP::internal::TypeCreator::new_updateShort(_update, _date); } inline MTPupdates MTP_updatesCombined(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq_start, MTPint _seq) { return MTP::internal::TypeCreator::new_updatesCombined(_updates, _users, _chats, _date, _seq_start, _seq); } inline MTPupdates MTP_updates(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq) { return MTP::internal::TypeCreator::new_updates(_updates, _users, _chats, _date, _seq); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdateShortSentMessage::Flags) inline MTPupdates MTP_updateShortSentMessage(const MTPflags &_flags, MTPint _id, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageMedia &_media, const MTPVector &_entities) { return MTP::internal::TypeCreator::new_updateShortSentMessage(_flags, _id, _pts, _pts_count, _date, _media, _entities); } inline uint32 MTPphotos_photos::innerLength() const { switch (_type) { case mtpc_photos_photos: { const MTPDphotos_photos &v(c_photos_photos()); return v.vphotos.innerLength() + v.vusers.innerLength(); } case mtpc_photos_photosSlice: { const MTPDphotos_photosSlice &v(c_photos_photosSlice()); return v.vcount.innerLength() + v.vphotos.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPphotos_photos::type() const { t_assert(_type != 0); return _type; } inline void MTPphotos_photos::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_photos_photos: _type = cons; { auto v = new MTPDphotos_photos(); setData(v); v->vphotos.read(from, end); v->vusers.read(from, end); } break; case mtpc_photos_photosSlice: _type = cons; { auto v = new MTPDphotos_photosSlice(); setData(v); v->vcount.read(from, end); v->vphotos.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPphotos_photos"); } } inline void MTPphotos_photos::write(mtpBuffer &to) const { switch (_type) { case mtpc_photos_photos: { auto &v = c_photos_photos(); v.vphotos.write(to); v.vusers.write(to); } break; case mtpc_photos_photosSlice: { auto &v = c_photos_photosSlice(); v.vcount.write(to); v.vphotos.write(to); v.vusers.write(to); } break; } } inline MTPphotos_photos::MTPphotos_photos(mtpTypeId type) : _type(type) { switch (type) { case mtpc_photos_photos: setData(new MTPDphotos_photos()); break; case mtpc_photos_photosSlice: setData(new MTPDphotos_photosSlice()); break; default: throw mtpErrorBadTypeId(type, "MTPphotos_photos"); } } inline const MTPDphotos_photos &MTPphotos_photos::c_photos_photos() const { t_assert(_type == mtpc_photos_photos); return queryData(); } inline MTPphotos_photos::MTPphotos_photos(const MTPDphotos_photos *data) : TypeDataOwner(data), _type(mtpc_photos_photos) { } inline const MTPDphotos_photosSlice &MTPphotos_photos::c_photos_photosSlice() const { t_assert(_type == mtpc_photos_photosSlice); return queryData(); } inline MTPphotos_photos::MTPphotos_photos(const MTPDphotos_photosSlice *data) : TypeDataOwner(data), _type(mtpc_photos_photosSlice) { } inline MTPphotos_photos MTP_photos_photos(const MTPVector &_photos, const MTPVector &_users) { return MTP::internal::TypeCreator::new_photos_photos(_photos, _users); } inline MTPphotos_photos MTP_photos_photosSlice(MTPint _count, const MTPVector &_photos, const MTPVector &_users) { return MTP::internal::TypeCreator::new_photos_photosSlice(_count, _photos, _users); } inline MTPphotos_photo::MTPphotos_photo() : TypeDataOwner(new MTPDphotos_photo()) { } inline uint32 MTPphotos_photo::innerLength() const { const MTPDphotos_photo &v(c_photos_photo()); return v.vphoto.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPphotos_photo::type() const { return mtpc_photos_photo; } inline void MTPphotos_photo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_photos_photo) throw mtpErrorUnexpected(cons, "MTPphotos_photo"); auto v = new MTPDphotos_photo(); setData(v); v->vphoto.read(from, end); v->vusers.read(from, end); } inline void MTPphotos_photo::write(mtpBuffer &to) const { auto &v = c_photos_photo(); v.vphoto.write(to); v.vusers.write(to); } inline const MTPDphotos_photo &MTPphotos_photo::c_photos_photo() const { return queryData(); } inline MTPphotos_photo::MTPphotos_photo(const MTPDphotos_photo *data) : TypeDataOwner(data) { } inline MTPphotos_photo MTP_photos_photo(const MTPPhoto &_photo, const MTPVector &_users) { return MTP::internal::TypeCreator::new_photos_photo(_photo, _users); } inline MTPupload_file::MTPupload_file() : TypeDataOwner(new MTPDupload_file()) { } inline uint32 MTPupload_file::innerLength() const { const MTPDupload_file &v(c_upload_file()); return v.vtype.innerLength() + v.vmtime.innerLength() + v.vbytes.innerLength(); } inline mtpTypeId MTPupload_file::type() const { return mtpc_upload_file; } inline void MTPupload_file::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_upload_file) throw mtpErrorUnexpected(cons, "MTPupload_file"); auto v = new MTPDupload_file(); setData(v); v->vtype.read(from, end); v->vmtime.read(from, end); v->vbytes.read(from, end); } inline void MTPupload_file::write(mtpBuffer &to) const { auto &v = c_upload_file(); v.vtype.write(to); v.vmtime.write(to); v.vbytes.write(to); } inline const MTPDupload_file &MTPupload_file::c_upload_file() const { return queryData(); } inline MTPupload_file::MTPupload_file(const MTPDupload_file *data) : TypeDataOwner(data) { } inline MTPupload_file MTP_upload_file(const MTPstorage_FileType &_type, MTPint _mtime, const MTPbytes &_bytes) { return MTP::internal::TypeCreator::new_upload_file(_type, _mtime, _bytes); } inline MTPdcOption::MTPdcOption() : TypeDataOwner(new MTPDdcOption()) { } inline uint32 MTPdcOption::innerLength() const { const MTPDdcOption &v(c_dcOption()); return v.vflags.innerLength() + v.vid.innerLength() + v.vip_address.innerLength() + v.vport.innerLength(); } inline mtpTypeId MTPdcOption::type() const { return mtpc_dcOption; } inline void MTPdcOption::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_dcOption) throw mtpErrorUnexpected(cons, "MTPdcOption"); auto v = new MTPDdcOption(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vip_address.read(from, end); v->vport.read(from, end); } inline void MTPdcOption::write(mtpBuffer &to) const { auto &v = c_dcOption(); v.vflags.write(to); v.vid.write(to); v.vip_address.write(to); v.vport.write(to); } inline const MTPDdcOption &MTPdcOption::c_dcOption() const { return queryData(); } inline MTPdcOption::MTPdcOption(const MTPDdcOption *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDdcOption::Flags) inline MTPdcOption MTP_dcOption(const MTPflags &_flags, MTPint _id, const MTPstring &_ip_address, MTPint _port) { return MTP::internal::TypeCreator::new_dcOption(_flags, _id, _ip_address, _port); } inline MTPconfig::MTPconfig() : TypeDataOwner(new MTPDconfig()) { } inline uint32 MTPconfig::innerLength() const { const MTPDconfig &v(c_config()); return v.vflags.innerLength() + v.vdate.innerLength() + v.vexpires.innerLength() + v.vtest_mode.innerLength() + v.vthis_dc.innerLength() + v.vdc_options.innerLength() + v.vchat_size_max.innerLength() + v.vmegagroup_size_max.innerLength() + v.vforwarded_count_max.innerLength() + v.vonline_update_period_ms.innerLength() + v.voffline_blur_timeout_ms.innerLength() + v.voffline_idle_timeout_ms.innerLength() + v.vonline_cloud_timeout_ms.innerLength() + v.vnotify_cloud_delay_ms.innerLength() + v.vnotify_default_delay_ms.innerLength() + v.vchat_big_size.innerLength() + v.vpush_chat_period_ms.innerLength() + v.vpush_chat_limit.innerLength() + v.vsaved_gifs_limit.innerLength() + v.vedit_time_limit.innerLength() + v.vrating_e_decay.innerLength() + v.vstickers_recent_limit.innerLength() + (v.has_tmp_sessions() ? v.vtmp_sessions.innerLength() : 0) + v.vpinned_dialogs_count_max.innerLength() + v.vcall_receive_timeout_ms.innerLength() + v.vcall_ring_timeout_ms.innerLength() + v.vcall_connect_timeout_ms.innerLength() + v.vcall_packet_timeout_ms.innerLength() + v.vdisabled_features.innerLength(); } inline mtpTypeId MTPconfig::type() const { return mtpc_config; } inline void MTPconfig::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_config) throw mtpErrorUnexpected(cons, "MTPconfig"); auto v = new MTPDconfig(); setData(v); v->vflags.read(from, end); v->vdate.read(from, end); v->vexpires.read(from, end); v->vtest_mode.read(from, end); v->vthis_dc.read(from, end); v->vdc_options.read(from, end); v->vchat_size_max.read(from, end); v->vmegagroup_size_max.read(from, end); v->vforwarded_count_max.read(from, end); v->vonline_update_period_ms.read(from, end); v->voffline_blur_timeout_ms.read(from, end); v->voffline_idle_timeout_ms.read(from, end); v->vonline_cloud_timeout_ms.read(from, end); v->vnotify_cloud_delay_ms.read(from, end); v->vnotify_default_delay_ms.read(from, end); v->vchat_big_size.read(from, end); v->vpush_chat_period_ms.read(from, end); v->vpush_chat_limit.read(from, end); v->vsaved_gifs_limit.read(from, end); v->vedit_time_limit.read(from, end); v->vrating_e_decay.read(from, end); v->vstickers_recent_limit.read(from, end); if (v->has_tmp_sessions()) { v->vtmp_sessions.read(from, end); } else { v->vtmp_sessions = MTPint(); } v->vpinned_dialogs_count_max.read(from, end); v->vcall_receive_timeout_ms.read(from, end); v->vcall_ring_timeout_ms.read(from, end); v->vcall_connect_timeout_ms.read(from, end); v->vcall_packet_timeout_ms.read(from, end); v->vdisabled_features.read(from, end); } inline void MTPconfig::write(mtpBuffer &to) const { auto &v = c_config(); v.vflags.write(to); v.vdate.write(to); v.vexpires.write(to); v.vtest_mode.write(to); v.vthis_dc.write(to); v.vdc_options.write(to); v.vchat_size_max.write(to); v.vmegagroup_size_max.write(to); v.vforwarded_count_max.write(to); v.vonline_update_period_ms.write(to); v.voffline_blur_timeout_ms.write(to); v.voffline_idle_timeout_ms.write(to); v.vonline_cloud_timeout_ms.write(to); v.vnotify_cloud_delay_ms.write(to); v.vnotify_default_delay_ms.write(to); v.vchat_big_size.write(to); v.vpush_chat_period_ms.write(to); v.vpush_chat_limit.write(to); v.vsaved_gifs_limit.write(to); v.vedit_time_limit.write(to); v.vrating_e_decay.write(to); v.vstickers_recent_limit.write(to); if (v.has_tmp_sessions()) v.vtmp_sessions.write(to); v.vpinned_dialogs_count_max.write(to); v.vcall_receive_timeout_ms.write(to); v.vcall_ring_timeout_ms.write(to); v.vcall_connect_timeout_ms.write(to); v.vcall_packet_timeout_ms.write(to); v.vdisabled_features.write(to); } inline const MTPDconfig &MTPconfig::c_config() const { return queryData(); } inline MTPconfig::MTPconfig(const MTPDconfig *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDconfig::Flags) inline MTPconfig MTP_config(const MTPflags &_flags, MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, MTPint _edit_time_limit, MTPint _rating_e_decay, MTPint _stickers_recent_limit, MTPint _tmp_sessions, MTPint _pinned_dialogs_count_max, MTPint _call_receive_timeout_ms, MTPint _call_ring_timeout_ms, MTPint _call_connect_timeout_ms, MTPint _call_packet_timeout_ms, const MTPVector &_disabled_features) { return MTP::internal::TypeCreator::new_config(_flags, _date, _expires, _test_mode, _this_dc, _dc_options, _chat_size_max, _megagroup_size_max, _forwarded_count_max, _online_update_period_ms, _offline_blur_timeout_ms, _offline_idle_timeout_ms, _online_cloud_timeout_ms, _notify_cloud_delay_ms, _notify_default_delay_ms, _chat_big_size, _push_chat_period_ms, _push_chat_limit, _saved_gifs_limit, _edit_time_limit, _rating_e_decay, _stickers_recent_limit, _tmp_sessions, _pinned_dialogs_count_max, _call_receive_timeout_ms, _call_ring_timeout_ms, _call_connect_timeout_ms, _call_packet_timeout_ms, _disabled_features); } inline MTPnearestDc::MTPnearestDc() : TypeDataOwner(new MTPDnearestDc()) { } inline uint32 MTPnearestDc::innerLength() const { const MTPDnearestDc &v(c_nearestDc()); return v.vcountry.innerLength() + v.vthis_dc.innerLength() + v.vnearest_dc.innerLength(); } inline mtpTypeId MTPnearestDc::type() const { return mtpc_nearestDc; } inline void MTPnearestDc::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_nearestDc) throw mtpErrorUnexpected(cons, "MTPnearestDc"); auto v = new MTPDnearestDc(); setData(v); v->vcountry.read(from, end); v->vthis_dc.read(from, end); v->vnearest_dc.read(from, end); } inline void MTPnearestDc::write(mtpBuffer &to) const { auto &v = c_nearestDc(); v.vcountry.write(to); v.vthis_dc.write(to); v.vnearest_dc.write(to); } inline const MTPDnearestDc &MTPnearestDc::c_nearestDc() const { return queryData(); } inline MTPnearestDc::MTPnearestDc(const MTPDnearestDc *data) : TypeDataOwner(data) { } inline MTPnearestDc MTP_nearestDc(const MTPstring &_country, MTPint _this_dc, MTPint _nearest_dc) { return MTP::internal::TypeCreator::new_nearestDc(_country, _this_dc, _nearest_dc); } inline uint32 MTPhelp_appUpdate::innerLength() const { switch (_type) { case mtpc_help_appUpdate: { const MTPDhelp_appUpdate &v(c_help_appUpdate()); return v.vid.innerLength() + v.vcritical.innerLength() + v.vurl.innerLength() + v.vtext.innerLength(); } } return 0; } inline mtpTypeId MTPhelp_appUpdate::type() const { t_assert(_type != 0); return _type; } inline void MTPhelp_appUpdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_help_appUpdate: _type = cons; { auto v = new MTPDhelp_appUpdate(); setData(v); v->vid.read(from, end); v->vcritical.read(from, end); v->vurl.read(from, end); v->vtext.read(from, end); } break; case mtpc_help_noAppUpdate: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPhelp_appUpdate"); } } inline void MTPhelp_appUpdate::write(mtpBuffer &to) const { switch (_type) { case mtpc_help_appUpdate: { auto &v = c_help_appUpdate(); v.vid.write(to); v.vcritical.write(to); v.vurl.write(to); v.vtext.write(to); } break; } } inline MTPhelp_appUpdate::MTPhelp_appUpdate(mtpTypeId type) : _type(type) { switch (type) { case mtpc_help_appUpdate: setData(new MTPDhelp_appUpdate()); break; case mtpc_help_noAppUpdate: break; default: throw mtpErrorBadTypeId(type, "MTPhelp_appUpdate"); } } inline const MTPDhelp_appUpdate &MTPhelp_appUpdate::c_help_appUpdate() const { t_assert(_type == mtpc_help_appUpdate); return queryData(); } inline MTPhelp_appUpdate::MTPhelp_appUpdate(const MTPDhelp_appUpdate *data) : TypeDataOwner(data), _type(mtpc_help_appUpdate) { } inline MTPhelp_appUpdate MTP_help_appUpdate(MTPint _id, MTPBool _critical, const MTPstring &_url, const MTPstring &_text) { return MTP::internal::TypeCreator::new_help_appUpdate(_id, _critical, _url, _text); } inline MTPhelp_appUpdate MTP_help_noAppUpdate() { return MTP::internal::TypeCreator::new_help_noAppUpdate(); } inline MTPhelp_inviteText::MTPhelp_inviteText() : TypeDataOwner(new MTPDhelp_inviteText()) { } inline uint32 MTPhelp_inviteText::innerLength() const { const MTPDhelp_inviteText &v(c_help_inviteText()); return v.vmessage.innerLength(); } inline mtpTypeId MTPhelp_inviteText::type() const { return mtpc_help_inviteText; } inline void MTPhelp_inviteText::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_help_inviteText) throw mtpErrorUnexpected(cons, "MTPhelp_inviteText"); auto v = new MTPDhelp_inviteText(); setData(v); v->vmessage.read(from, end); } inline void MTPhelp_inviteText::write(mtpBuffer &to) const { auto &v = c_help_inviteText(); v.vmessage.write(to); } inline const MTPDhelp_inviteText &MTPhelp_inviteText::c_help_inviteText() const { return queryData(); } inline MTPhelp_inviteText::MTPhelp_inviteText(const MTPDhelp_inviteText *data) : TypeDataOwner(data) { } inline MTPhelp_inviteText MTP_help_inviteText(const MTPstring &_message) { return MTP::internal::TypeCreator::new_help_inviteText(_message); } inline uint32 MTPencryptedChat::innerLength() const { switch (_type) { case mtpc_encryptedChatEmpty: { const MTPDencryptedChatEmpty &v(c_encryptedChatEmpty()); return v.vid.innerLength(); } case mtpc_encryptedChatWaiting: { const MTPDencryptedChatWaiting &v(c_encryptedChatWaiting()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vadmin_id.innerLength() + v.vparticipant_id.innerLength(); } case mtpc_encryptedChatRequested: { const MTPDencryptedChatRequested &v(c_encryptedChatRequested()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vadmin_id.innerLength() + v.vparticipant_id.innerLength() + v.vg_a.innerLength(); } case mtpc_encryptedChat: { const MTPDencryptedChat &v(c_encryptedChat()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vadmin_id.innerLength() + v.vparticipant_id.innerLength() + v.vg_a_or_b.innerLength() + v.vkey_fingerprint.innerLength(); } case mtpc_encryptedChatDiscarded: { const MTPDencryptedChatDiscarded &v(c_encryptedChatDiscarded()); return v.vid.innerLength(); } } return 0; } inline mtpTypeId MTPencryptedChat::type() const { t_assert(_type != 0); return _type; } inline void MTPencryptedChat::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_encryptedChatEmpty: _type = cons; { auto v = new MTPDencryptedChatEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_encryptedChatWaiting: _type = cons; { auto v = new MTPDencryptedChatWaiting(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vadmin_id.read(from, end); v->vparticipant_id.read(from, end); } break; case mtpc_encryptedChatRequested: _type = cons; { auto v = new MTPDencryptedChatRequested(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vadmin_id.read(from, end); v->vparticipant_id.read(from, end); v->vg_a.read(from, end); } break; case mtpc_encryptedChat: _type = cons; { auto v = new MTPDencryptedChat(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vadmin_id.read(from, end); v->vparticipant_id.read(from, end); v->vg_a_or_b.read(from, end); v->vkey_fingerprint.read(from, end); } break; case mtpc_encryptedChatDiscarded: _type = cons; { auto v = new MTPDencryptedChatDiscarded(); setData(v); v->vid.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPencryptedChat"); } } inline void MTPencryptedChat::write(mtpBuffer &to) const { switch (_type) { case mtpc_encryptedChatEmpty: { auto &v = c_encryptedChatEmpty(); v.vid.write(to); } break; case mtpc_encryptedChatWaiting: { auto &v = c_encryptedChatWaiting(); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vadmin_id.write(to); v.vparticipant_id.write(to); } break; case mtpc_encryptedChatRequested: { auto &v = c_encryptedChatRequested(); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vadmin_id.write(to); v.vparticipant_id.write(to); v.vg_a.write(to); } break; case mtpc_encryptedChat: { auto &v = c_encryptedChat(); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vadmin_id.write(to); v.vparticipant_id.write(to); v.vg_a_or_b.write(to); v.vkey_fingerprint.write(to); } break; case mtpc_encryptedChatDiscarded: { auto &v = c_encryptedChatDiscarded(); v.vid.write(to); } break; } } inline MTPencryptedChat::MTPencryptedChat(mtpTypeId type) : _type(type) { switch (type) { case mtpc_encryptedChatEmpty: setData(new MTPDencryptedChatEmpty()); break; case mtpc_encryptedChatWaiting: setData(new MTPDencryptedChatWaiting()); break; case mtpc_encryptedChatRequested: setData(new MTPDencryptedChatRequested()); break; case mtpc_encryptedChat: setData(new MTPDencryptedChat()); break; case mtpc_encryptedChatDiscarded: setData(new MTPDencryptedChatDiscarded()); break; default: throw mtpErrorBadTypeId(type, "MTPencryptedChat"); } } inline const MTPDencryptedChatEmpty &MTPencryptedChat::c_encryptedChatEmpty() const { t_assert(_type == mtpc_encryptedChatEmpty); return queryData(); } inline MTPencryptedChat::MTPencryptedChat(const MTPDencryptedChatEmpty *data) : TypeDataOwner(data), _type(mtpc_encryptedChatEmpty) { } inline const MTPDencryptedChatWaiting &MTPencryptedChat::c_encryptedChatWaiting() const { t_assert(_type == mtpc_encryptedChatWaiting); return queryData(); } inline MTPencryptedChat::MTPencryptedChat(const MTPDencryptedChatWaiting *data) : TypeDataOwner(data), _type(mtpc_encryptedChatWaiting) { } inline const MTPDencryptedChatRequested &MTPencryptedChat::c_encryptedChatRequested() const { t_assert(_type == mtpc_encryptedChatRequested); return queryData(); } inline MTPencryptedChat::MTPencryptedChat(const MTPDencryptedChatRequested *data) : TypeDataOwner(data), _type(mtpc_encryptedChatRequested) { } inline const MTPDencryptedChat &MTPencryptedChat::c_encryptedChat() const { t_assert(_type == mtpc_encryptedChat); return queryData(); } inline MTPencryptedChat::MTPencryptedChat(const MTPDencryptedChat *data) : TypeDataOwner(data), _type(mtpc_encryptedChat) { } inline const MTPDencryptedChatDiscarded &MTPencryptedChat::c_encryptedChatDiscarded() const { t_assert(_type == mtpc_encryptedChatDiscarded); return queryData(); } inline MTPencryptedChat::MTPencryptedChat(const MTPDencryptedChatDiscarded *data) : TypeDataOwner(data), _type(mtpc_encryptedChatDiscarded) { } inline MTPencryptedChat MTP_encryptedChatEmpty(MTPint _id) { return MTP::internal::TypeCreator::new_encryptedChatEmpty(_id); } inline MTPencryptedChat MTP_encryptedChatWaiting(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id) { return MTP::internal::TypeCreator::new_encryptedChatWaiting(_id, _access_hash, _date, _admin_id, _participant_id); } inline MTPencryptedChat MTP_encryptedChatRequested(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a) { return MTP::internal::TypeCreator::new_encryptedChatRequested(_id, _access_hash, _date, _admin_id, _participant_id, _g_a); } inline MTPencryptedChat MTP_encryptedChat(MTPint _id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a_or_b, const MTPlong &_key_fingerprint) { return MTP::internal::TypeCreator::new_encryptedChat(_id, _access_hash, _date, _admin_id, _participant_id, _g_a_or_b, _key_fingerprint); } inline MTPencryptedChat MTP_encryptedChatDiscarded(MTPint _id) { return MTP::internal::TypeCreator::new_encryptedChatDiscarded(_id); } inline MTPinputEncryptedChat::MTPinputEncryptedChat() : TypeDataOwner(new MTPDinputEncryptedChat()) { } inline uint32 MTPinputEncryptedChat::innerLength() const { const MTPDinputEncryptedChat &v(c_inputEncryptedChat()); return v.vchat_id.innerLength() + v.vaccess_hash.innerLength(); } inline mtpTypeId MTPinputEncryptedChat::type() const { return mtpc_inputEncryptedChat; } inline void MTPinputEncryptedChat::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inputEncryptedChat) throw mtpErrorUnexpected(cons, "MTPinputEncryptedChat"); auto v = new MTPDinputEncryptedChat(); setData(v); v->vchat_id.read(from, end); v->vaccess_hash.read(from, end); } inline void MTPinputEncryptedChat::write(mtpBuffer &to) const { auto &v = c_inputEncryptedChat(); v.vchat_id.write(to); v.vaccess_hash.write(to); } inline const MTPDinputEncryptedChat &MTPinputEncryptedChat::c_inputEncryptedChat() const { return queryData(); } inline MTPinputEncryptedChat::MTPinputEncryptedChat(const MTPDinputEncryptedChat *data) : TypeDataOwner(data) { } inline MTPinputEncryptedChat MTP_inputEncryptedChat(MTPint _chat_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputEncryptedChat(_chat_id, _access_hash); } inline uint32 MTPencryptedFile::innerLength() const { switch (_type) { case mtpc_encryptedFile: { const MTPDencryptedFile &v(c_encryptedFile()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vsize.innerLength() + v.vdc_id.innerLength() + v.vkey_fingerprint.innerLength(); } } return 0; } inline mtpTypeId MTPencryptedFile::type() const { t_assert(_type != 0); return _type; } inline void MTPencryptedFile::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_encryptedFileEmpty: _type = cons; break; case mtpc_encryptedFile: _type = cons; { auto v = new MTPDencryptedFile(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vsize.read(from, end); v->vdc_id.read(from, end); v->vkey_fingerprint.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPencryptedFile"); } } inline void MTPencryptedFile::write(mtpBuffer &to) const { switch (_type) { case mtpc_encryptedFile: { auto &v = c_encryptedFile(); v.vid.write(to); v.vaccess_hash.write(to); v.vsize.write(to); v.vdc_id.write(to); v.vkey_fingerprint.write(to); } break; } } inline MTPencryptedFile::MTPencryptedFile(mtpTypeId type) : _type(type) { switch (type) { case mtpc_encryptedFileEmpty: break; case mtpc_encryptedFile: setData(new MTPDencryptedFile()); break; default: throw mtpErrorBadTypeId(type, "MTPencryptedFile"); } } inline const MTPDencryptedFile &MTPencryptedFile::c_encryptedFile() const { t_assert(_type == mtpc_encryptedFile); return queryData(); } inline MTPencryptedFile::MTPencryptedFile(const MTPDencryptedFile *data) : TypeDataOwner(data), _type(mtpc_encryptedFile) { } inline MTPencryptedFile MTP_encryptedFileEmpty() { return MTP::internal::TypeCreator::new_encryptedFileEmpty(); } inline MTPencryptedFile MTP_encryptedFile(const MTPlong &_id, const MTPlong &_access_hash, MTPint _size, MTPint _dc_id, MTPint _key_fingerprint) { return MTP::internal::TypeCreator::new_encryptedFile(_id, _access_hash, _size, _dc_id, _key_fingerprint); } inline uint32 MTPinputEncryptedFile::innerLength() const { switch (_type) { case mtpc_inputEncryptedFileUploaded: { const MTPDinputEncryptedFileUploaded &v(c_inputEncryptedFileUploaded()); return v.vid.innerLength() + v.vparts.innerLength() + v.vmd5_checksum.innerLength() + v.vkey_fingerprint.innerLength(); } case mtpc_inputEncryptedFile: { const MTPDinputEncryptedFile &v(c_inputEncryptedFile()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } case mtpc_inputEncryptedFileBigUploaded: { const MTPDinputEncryptedFileBigUploaded &v(c_inputEncryptedFileBigUploaded()); return v.vid.innerLength() + v.vparts.innerLength() + v.vkey_fingerprint.innerLength(); } } return 0; } inline mtpTypeId MTPinputEncryptedFile::type() const { t_assert(_type != 0); return _type; } inline void MTPinputEncryptedFile::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputEncryptedFileEmpty: _type = cons; break; case mtpc_inputEncryptedFileUploaded: _type = cons; { auto v = new MTPDinputEncryptedFileUploaded(); setData(v); v->vid.read(from, end); v->vparts.read(from, end); v->vmd5_checksum.read(from, end); v->vkey_fingerprint.read(from, end); } break; case mtpc_inputEncryptedFile: _type = cons; { auto v = new MTPDinputEncryptedFile(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } break; case mtpc_inputEncryptedFileBigUploaded: _type = cons; { auto v = new MTPDinputEncryptedFileBigUploaded(); setData(v); v->vid.read(from, end); v->vparts.read(from, end); v->vkey_fingerprint.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputEncryptedFile"); } } inline void MTPinputEncryptedFile::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputEncryptedFileUploaded: { auto &v = c_inputEncryptedFileUploaded(); v.vid.write(to); v.vparts.write(to); v.vmd5_checksum.write(to); v.vkey_fingerprint.write(to); } break; case mtpc_inputEncryptedFile: { auto &v = c_inputEncryptedFile(); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputEncryptedFileBigUploaded: { auto &v = c_inputEncryptedFileBigUploaded(); v.vid.write(to); v.vparts.write(to); v.vkey_fingerprint.write(to); } break; } } inline MTPinputEncryptedFile::MTPinputEncryptedFile(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputEncryptedFileEmpty: break; case mtpc_inputEncryptedFileUploaded: setData(new MTPDinputEncryptedFileUploaded()); break; case mtpc_inputEncryptedFile: setData(new MTPDinputEncryptedFile()); break; case mtpc_inputEncryptedFileBigUploaded: setData(new MTPDinputEncryptedFileBigUploaded()); break; default: throw mtpErrorBadTypeId(type, "MTPinputEncryptedFile"); } } inline const MTPDinputEncryptedFileUploaded &MTPinputEncryptedFile::c_inputEncryptedFileUploaded() const { t_assert(_type == mtpc_inputEncryptedFileUploaded); return queryData(); } inline MTPinputEncryptedFile::MTPinputEncryptedFile(const MTPDinputEncryptedFileUploaded *data) : TypeDataOwner(data), _type(mtpc_inputEncryptedFileUploaded) { } inline const MTPDinputEncryptedFile &MTPinputEncryptedFile::c_inputEncryptedFile() const { t_assert(_type == mtpc_inputEncryptedFile); return queryData(); } inline MTPinputEncryptedFile::MTPinputEncryptedFile(const MTPDinputEncryptedFile *data) : TypeDataOwner(data), _type(mtpc_inputEncryptedFile) { } inline const MTPDinputEncryptedFileBigUploaded &MTPinputEncryptedFile::c_inputEncryptedFileBigUploaded() const { t_assert(_type == mtpc_inputEncryptedFileBigUploaded); return queryData(); } inline MTPinputEncryptedFile::MTPinputEncryptedFile(const MTPDinputEncryptedFileBigUploaded *data) : TypeDataOwner(data), _type(mtpc_inputEncryptedFileBigUploaded) { } inline MTPinputEncryptedFile MTP_inputEncryptedFileEmpty() { return MTP::internal::TypeCreator::new_inputEncryptedFileEmpty(); } inline MTPinputEncryptedFile MTP_inputEncryptedFileUploaded(const MTPlong &_id, MTPint _parts, const MTPstring &_md5_checksum, MTPint _key_fingerprint) { return MTP::internal::TypeCreator::new_inputEncryptedFileUploaded(_id, _parts, _md5_checksum, _key_fingerprint); } inline MTPinputEncryptedFile MTP_inputEncryptedFile(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputEncryptedFile(_id, _access_hash); } inline MTPinputEncryptedFile MTP_inputEncryptedFileBigUploaded(const MTPlong &_id, MTPint _parts, MTPint _key_fingerprint) { return MTP::internal::TypeCreator::new_inputEncryptedFileBigUploaded(_id, _parts, _key_fingerprint); } inline uint32 MTPencryptedMessage::innerLength() const { switch (_type) { case mtpc_encryptedMessage: { const MTPDencryptedMessage &v(c_encryptedMessage()); return v.vrandom_id.innerLength() + v.vchat_id.innerLength() + v.vdate.innerLength() + v.vbytes.innerLength() + v.vfile.innerLength(); } case mtpc_encryptedMessageService: { const MTPDencryptedMessageService &v(c_encryptedMessageService()); return v.vrandom_id.innerLength() + v.vchat_id.innerLength() + v.vdate.innerLength() + v.vbytes.innerLength(); } } return 0; } inline mtpTypeId MTPencryptedMessage::type() const { t_assert(_type != 0); return _type; } inline void MTPencryptedMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_encryptedMessage: _type = cons; { auto v = new MTPDencryptedMessage(); setData(v); v->vrandom_id.read(from, end); v->vchat_id.read(from, end); v->vdate.read(from, end); v->vbytes.read(from, end); v->vfile.read(from, end); } break; case mtpc_encryptedMessageService: _type = cons; { auto v = new MTPDencryptedMessageService(); setData(v); v->vrandom_id.read(from, end); v->vchat_id.read(from, end); v->vdate.read(from, end); v->vbytes.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPencryptedMessage"); } } inline void MTPencryptedMessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_encryptedMessage: { auto &v = c_encryptedMessage(); v.vrandom_id.write(to); v.vchat_id.write(to); v.vdate.write(to); v.vbytes.write(to); v.vfile.write(to); } break; case mtpc_encryptedMessageService: { auto &v = c_encryptedMessageService(); v.vrandom_id.write(to); v.vchat_id.write(to); v.vdate.write(to); v.vbytes.write(to); } break; } } inline MTPencryptedMessage::MTPencryptedMessage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_encryptedMessage: setData(new MTPDencryptedMessage()); break; case mtpc_encryptedMessageService: setData(new MTPDencryptedMessageService()); break; default: throw mtpErrorBadTypeId(type, "MTPencryptedMessage"); } } inline const MTPDencryptedMessage &MTPencryptedMessage::c_encryptedMessage() const { t_assert(_type == mtpc_encryptedMessage); return queryData(); } inline MTPencryptedMessage::MTPencryptedMessage(const MTPDencryptedMessage *data) : TypeDataOwner(data), _type(mtpc_encryptedMessage) { } inline const MTPDencryptedMessageService &MTPencryptedMessage::c_encryptedMessageService() const { t_assert(_type == mtpc_encryptedMessageService); return queryData(); } inline MTPencryptedMessage::MTPencryptedMessage(const MTPDencryptedMessageService *data) : TypeDataOwner(data), _type(mtpc_encryptedMessageService) { } inline MTPencryptedMessage MTP_encryptedMessage(const MTPlong &_random_id, MTPint _chat_id, MTPint _date, const MTPbytes &_bytes, const MTPEncryptedFile &_file) { return MTP::internal::TypeCreator::new_encryptedMessage(_random_id, _chat_id, _date, _bytes, _file); } inline MTPencryptedMessage MTP_encryptedMessageService(const MTPlong &_random_id, MTPint _chat_id, MTPint _date, const MTPbytes &_bytes) { return MTP::internal::TypeCreator::new_encryptedMessageService(_random_id, _chat_id, _date, _bytes); } inline uint32 MTPmessages_dhConfig::innerLength() const { switch (_type) { case mtpc_messages_dhConfigNotModified: { const MTPDmessages_dhConfigNotModified &v(c_messages_dhConfigNotModified()); return v.vrandom.innerLength(); } case mtpc_messages_dhConfig: { const MTPDmessages_dhConfig &v(c_messages_dhConfig()); return v.vg.innerLength() + v.vp.innerLength() + v.vversion.innerLength() + v.vrandom.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_dhConfig::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_dhConfig::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_dhConfigNotModified: _type = cons; { auto v = new MTPDmessages_dhConfigNotModified(); setData(v); v->vrandom.read(from, end); } break; case mtpc_messages_dhConfig: _type = cons; { auto v = new MTPDmessages_dhConfig(); setData(v); v->vg.read(from, end); v->vp.read(from, end); v->vversion.read(from, end); v->vrandom.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_dhConfig"); } } inline void MTPmessages_dhConfig::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_dhConfigNotModified: { auto &v = c_messages_dhConfigNotModified(); v.vrandom.write(to); } break; case mtpc_messages_dhConfig: { auto &v = c_messages_dhConfig(); v.vg.write(to); v.vp.write(to); v.vversion.write(to); v.vrandom.write(to); } break; } } inline MTPmessages_dhConfig::MTPmessages_dhConfig(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_dhConfigNotModified: setData(new MTPDmessages_dhConfigNotModified()); break; case mtpc_messages_dhConfig: setData(new MTPDmessages_dhConfig()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_dhConfig"); } } inline const MTPDmessages_dhConfigNotModified &MTPmessages_dhConfig::c_messages_dhConfigNotModified() const { t_assert(_type == mtpc_messages_dhConfigNotModified); return queryData(); } inline MTPmessages_dhConfig::MTPmessages_dhConfig(const MTPDmessages_dhConfigNotModified *data) : TypeDataOwner(data), _type(mtpc_messages_dhConfigNotModified) { } inline const MTPDmessages_dhConfig &MTPmessages_dhConfig::c_messages_dhConfig() const { t_assert(_type == mtpc_messages_dhConfig); return queryData(); } inline MTPmessages_dhConfig::MTPmessages_dhConfig(const MTPDmessages_dhConfig *data) : TypeDataOwner(data), _type(mtpc_messages_dhConfig) { } inline MTPmessages_dhConfig MTP_messages_dhConfigNotModified(const MTPbytes &_random) { return MTP::internal::TypeCreator::new_messages_dhConfigNotModified(_random); } inline MTPmessages_dhConfig MTP_messages_dhConfig(MTPint _g, const MTPbytes &_p, MTPint _version, const MTPbytes &_random) { return MTP::internal::TypeCreator::new_messages_dhConfig(_g, _p, _version, _random); } inline uint32 MTPmessages_sentEncryptedMessage::innerLength() const { switch (_type) { case mtpc_messages_sentEncryptedMessage: { const MTPDmessages_sentEncryptedMessage &v(c_messages_sentEncryptedMessage()); return v.vdate.innerLength(); } case mtpc_messages_sentEncryptedFile: { const MTPDmessages_sentEncryptedFile &v(c_messages_sentEncryptedFile()); return v.vdate.innerLength() + v.vfile.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_sentEncryptedMessage::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_sentEncryptedMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_sentEncryptedMessage: _type = cons; { auto v = new MTPDmessages_sentEncryptedMessage(); setData(v); v->vdate.read(from, end); } break; case mtpc_messages_sentEncryptedFile: _type = cons; { auto v = new MTPDmessages_sentEncryptedFile(); setData(v); v->vdate.read(from, end); v->vfile.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_sentEncryptedMessage"); } } inline void MTPmessages_sentEncryptedMessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_sentEncryptedMessage: { auto &v = c_messages_sentEncryptedMessage(); v.vdate.write(to); } break; case mtpc_messages_sentEncryptedFile: { auto &v = c_messages_sentEncryptedFile(); v.vdate.write(to); v.vfile.write(to); } break; } } inline MTPmessages_sentEncryptedMessage::MTPmessages_sentEncryptedMessage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_sentEncryptedMessage: setData(new MTPDmessages_sentEncryptedMessage()); break; case mtpc_messages_sentEncryptedFile: setData(new MTPDmessages_sentEncryptedFile()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_sentEncryptedMessage"); } } inline const MTPDmessages_sentEncryptedMessage &MTPmessages_sentEncryptedMessage::c_messages_sentEncryptedMessage() const { t_assert(_type == mtpc_messages_sentEncryptedMessage); return queryData(); } inline MTPmessages_sentEncryptedMessage::MTPmessages_sentEncryptedMessage(const MTPDmessages_sentEncryptedMessage *data) : TypeDataOwner(data), _type(mtpc_messages_sentEncryptedMessage) { } inline const MTPDmessages_sentEncryptedFile &MTPmessages_sentEncryptedMessage::c_messages_sentEncryptedFile() const { t_assert(_type == mtpc_messages_sentEncryptedFile); return queryData(); } inline MTPmessages_sentEncryptedMessage::MTPmessages_sentEncryptedMessage(const MTPDmessages_sentEncryptedFile *data) : TypeDataOwner(data), _type(mtpc_messages_sentEncryptedFile) { } inline MTPmessages_sentEncryptedMessage MTP_messages_sentEncryptedMessage(MTPint _date) { return MTP::internal::TypeCreator::new_messages_sentEncryptedMessage(_date); } inline MTPmessages_sentEncryptedMessage MTP_messages_sentEncryptedFile(MTPint _date, const MTPEncryptedFile &_file) { return MTP::internal::TypeCreator::new_messages_sentEncryptedFile(_date, _file); } inline uint32 MTPinputDocument::innerLength() const { switch (_type) { case mtpc_inputDocument: { const MTPDinputDocument &v(c_inputDocument()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } } return 0; } inline mtpTypeId MTPinputDocument::type() const { t_assert(_type != 0); return _type; } inline void MTPinputDocument::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputDocumentEmpty: _type = cons; break; case mtpc_inputDocument: _type = cons; { auto v = new MTPDinputDocument(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputDocument"); } } inline void MTPinputDocument::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputDocument: { auto &v = c_inputDocument(); v.vid.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputDocument::MTPinputDocument(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputDocumentEmpty: break; case mtpc_inputDocument: setData(new MTPDinputDocument()); break; default: throw mtpErrorBadTypeId(type, "MTPinputDocument"); } } inline const MTPDinputDocument &MTPinputDocument::c_inputDocument() const { t_assert(_type == mtpc_inputDocument); return queryData(); } inline MTPinputDocument::MTPinputDocument(const MTPDinputDocument *data) : TypeDataOwner(data), _type(mtpc_inputDocument) { } inline MTPinputDocument MTP_inputDocumentEmpty() { return MTP::internal::TypeCreator::new_inputDocumentEmpty(); } inline MTPinputDocument MTP_inputDocument(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputDocument(_id, _access_hash); } inline uint32 MTPdocument::innerLength() const { switch (_type) { case mtpc_documentEmpty: { const MTPDdocumentEmpty &v(c_documentEmpty()); return v.vid.innerLength(); } case mtpc_document: { const MTPDdocument &v(c_document()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vmime_type.innerLength() + v.vsize.innerLength() + v.vthumb.innerLength() + v.vdc_id.innerLength() + v.vversion.innerLength() + v.vattributes.innerLength(); } } return 0; } inline mtpTypeId MTPdocument::type() const { t_assert(_type != 0); return _type; } inline void MTPdocument::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_documentEmpty: _type = cons; { auto v = new MTPDdocumentEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_document: _type = cons; { auto v = new MTPDdocument(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vmime_type.read(from, end); v->vsize.read(from, end); v->vthumb.read(from, end); v->vdc_id.read(from, end); v->vversion.read(from, end); v->vattributes.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPdocument"); } } inline void MTPdocument::write(mtpBuffer &to) const { switch (_type) { case mtpc_documentEmpty: { auto &v = c_documentEmpty(); v.vid.write(to); } break; case mtpc_document: { auto &v = c_document(); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vmime_type.write(to); v.vsize.write(to); v.vthumb.write(to); v.vdc_id.write(to); v.vversion.write(to); v.vattributes.write(to); } break; } } inline MTPdocument::MTPdocument(mtpTypeId type) : _type(type) { switch (type) { case mtpc_documentEmpty: setData(new MTPDdocumentEmpty()); break; case mtpc_document: setData(new MTPDdocument()); break; default: throw mtpErrorBadTypeId(type, "MTPdocument"); } } inline const MTPDdocumentEmpty &MTPdocument::c_documentEmpty() const { t_assert(_type == mtpc_documentEmpty); return queryData(); } inline MTPdocument::MTPdocument(const MTPDdocumentEmpty *data) : TypeDataOwner(data), _type(mtpc_documentEmpty) { } inline const MTPDdocument &MTPdocument::c_document() const { t_assert(_type == mtpc_document); return queryData(); } inline MTPdocument::MTPdocument(const MTPDdocument *data) : TypeDataOwner(data), _type(mtpc_document) { } inline MTPdocument MTP_documentEmpty(const MTPlong &_id) { return MTP::internal::TypeCreator::new_documentEmpty(_id); } inline MTPdocument MTP_document(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPstring &_mime_type, MTPint _size, const MTPPhotoSize &_thumb, MTPint _dc_id, MTPint _version, const MTPVector &_attributes) { return MTP::internal::TypeCreator::new_document(_id, _access_hash, _date, _mime_type, _size, _thumb, _dc_id, _version, _attributes); } inline MTPhelp_support::MTPhelp_support() : TypeDataOwner(new MTPDhelp_support()) { } inline uint32 MTPhelp_support::innerLength() const { const MTPDhelp_support &v(c_help_support()); return v.vphone_number.innerLength() + v.vuser.innerLength(); } inline mtpTypeId MTPhelp_support::type() const { return mtpc_help_support; } inline void MTPhelp_support::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_help_support) throw mtpErrorUnexpected(cons, "MTPhelp_support"); auto v = new MTPDhelp_support(); setData(v); v->vphone_number.read(from, end); v->vuser.read(from, end); } inline void MTPhelp_support::write(mtpBuffer &to) const { auto &v = c_help_support(); v.vphone_number.write(to); v.vuser.write(to); } inline const MTPDhelp_support &MTPhelp_support::c_help_support() const { return queryData(); } inline MTPhelp_support::MTPhelp_support(const MTPDhelp_support *data) : TypeDataOwner(data) { } inline MTPhelp_support MTP_help_support(const MTPstring &_phone_number, const MTPUser &_user) { return MTP::internal::TypeCreator::new_help_support(_phone_number, _user); } inline uint32 MTPnotifyPeer::innerLength() const { switch (_type) { case mtpc_notifyPeer: { const MTPDnotifyPeer &v(c_notifyPeer()); return v.vpeer.innerLength(); } } return 0; } inline mtpTypeId MTPnotifyPeer::type() const { t_assert(_type != 0); return _type; } inline void MTPnotifyPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_notifyPeer: _type = cons; { auto v = new MTPDnotifyPeer(); setData(v); v->vpeer.read(from, end); } break; case mtpc_notifyUsers: _type = cons; break; case mtpc_notifyChats: _type = cons; break; case mtpc_notifyAll: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPnotifyPeer"); } } inline void MTPnotifyPeer::write(mtpBuffer &to) const { switch (_type) { case mtpc_notifyPeer: { auto &v = c_notifyPeer(); v.vpeer.write(to); } break; } } inline MTPnotifyPeer::MTPnotifyPeer(mtpTypeId type) : _type(type) { switch (type) { case mtpc_notifyPeer: setData(new MTPDnotifyPeer()); break; case mtpc_notifyUsers: break; case mtpc_notifyChats: break; case mtpc_notifyAll: break; default: throw mtpErrorBadTypeId(type, "MTPnotifyPeer"); } } inline const MTPDnotifyPeer &MTPnotifyPeer::c_notifyPeer() const { t_assert(_type == mtpc_notifyPeer); return queryData(); } inline MTPnotifyPeer::MTPnotifyPeer(const MTPDnotifyPeer *data) : TypeDataOwner(data), _type(mtpc_notifyPeer) { } inline MTPnotifyPeer MTP_notifyPeer(const MTPPeer &_peer) { return MTP::internal::TypeCreator::new_notifyPeer(_peer); } inline MTPnotifyPeer MTP_notifyUsers() { return MTP::internal::TypeCreator::new_notifyUsers(); } inline MTPnotifyPeer MTP_notifyChats() { return MTP::internal::TypeCreator::new_notifyChats(); } inline MTPnotifyPeer MTP_notifyAll() { return MTP::internal::TypeCreator::new_notifyAll(); } inline uint32 MTPsendMessageAction::innerLength() const { switch (_type) { case mtpc_sendMessageUploadVideoAction: { const MTPDsendMessageUploadVideoAction &v(c_sendMessageUploadVideoAction()); return v.vprogress.innerLength(); } case mtpc_sendMessageUploadAudioAction: { const MTPDsendMessageUploadAudioAction &v(c_sendMessageUploadAudioAction()); return v.vprogress.innerLength(); } case mtpc_sendMessageUploadPhotoAction: { const MTPDsendMessageUploadPhotoAction &v(c_sendMessageUploadPhotoAction()); return v.vprogress.innerLength(); } case mtpc_sendMessageUploadDocumentAction: { const MTPDsendMessageUploadDocumentAction &v(c_sendMessageUploadDocumentAction()); return v.vprogress.innerLength(); } } return 0; } inline mtpTypeId MTPsendMessageAction::type() const { t_assert(_type != 0); return _type; } inline void MTPsendMessageAction::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_sendMessageTypingAction: _type = cons; break; case mtpc_sendMessageCancelAction: _type = cons; break; case mtpc_sendMessageRecordVideoAction: _type = cons; break; case mtpc_sendMessageUploadVideoAction: _type = cons; { auto v = new MTPDsendMessageUploadVideoAction(); setData(v); v->vprogress.read(from, end); } break; case mtpc_sendMessageRecordAudioAction: _type = cons; break; case mtpc_sendMessageUploadAudioAction: _type = cons; { auto v = new MTPDsendMessageUploadAudioAction(); setData(v); v->vprogress.read(from, end); } break; case mtpc_sendMessageUploadPhotoAction: _type = cons; { auto v = new MTPDsendMessageUploadPhotoAction(); setData(v); v->vprogress.read(from, end); } break; case mtpc_sendMessageUploadDocumentAction: _type = cons; { auto v = new MTPDsendMessageUploadDocumentAction(); setData(v); v->vprogress.read(from, end); } break; case mtpc_sendMessageGeoLocationAction: _type = cons; break; case mtpc_sendMessageChooseContactAction: _type = cons; break; case mtpc_sendMessageGamePlayAction: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPsendMessageAction"); } } inline void MTPsendMessageAction::write(mtpBuffer &to) const { switch (_type) { case mtpc_sendMessageUploadVideoAction: { auto &v = c_sendMessageUploadVideoAction(); v.vprogress.write(to); } break; case mtpc_sendMessageUploadAudioAction: { auto &v = c_sendMessageUploadAudioAction(); v.vprogress.write(to); } break; case mtpc_sendMessageUploadPhotoAction: { auto &v = c_sendMessageUploadPhotoAction(); v.vprogress.write(to); } break; case mtpc_sendMessageUploadDocumentAction: { auto &v = c_sendMessageUploadDocumentAction(); v.vprogress.write(to); } break; } } inline MTPsendMessageAction::MTPsendMessageAction(mtpTypeId type) : _type(type) { switch (type) { case mtpc_sendMessageTypingAction: break; case mtpc_sendMessageCancelAction: break; case mtpc_sendMessageRecordVideoAction: break; case mtpc_sendMessageUploadVideoAction: setData(new MTPDsendMessageUploadVideoAction()); break; case mtpc_sendMessageRecordAudioAction: break; case mtpc_sendMessageUploadAudioAction: setData(new MTPDsendMessageUploadAudioAction()); break; case mtpc_sendMessageUploadPhotoAction: setData(new MTPDsendMessageUploadPhotoAction()); break; case mtpc_sendMessageUploadDocumentAction: setData(new MTPDsendMessageUploadDocumentAction()); break; case mtpc_sendMessageGeoLocationAction: break; case mtpc_sendMessageChooseContactAction: break; case mtpc_sendMessageGamePlayAction: break; default: throw mtpErrorBadTypeId(type, "MTPsendMessageAction"); } } inline const MTPDsendMessageUploadVideoAction &MTPsendMessageAction::c_sendMessageUploadVideoAction() const { t_assert(_type == mtpc_sendMessageUploadVideoAction); return queryData(); } inline MTPsendMessageAction::MTPsendMessageAction(const MTPDsendMessageUploadVideoAction *data) : TypeDataOwner(data), _type(mtpc_sendMessageUploadVideoAction) { } inline const MTPDsendMessageUploadAudioAction &MTPsendMessageAction::c_sendMessageUploadAudioAction() const { t_assert(_type == mtpc_sendMessageUploadAudioAction); return queryData(); } inline MTPsendMessageAction::MTPsendMessageAction(const MTPDsendMessageUploadAudioAction *data) : TypeDataOwner(data), _type(mtpc_sendMessageUploadAudioAction) { } inline const MTPDsendMessageUploadPhotoAction &MTPsendMessageAction::c_sendMessageUploadPhotoAction() const { t_assert(_type == mtpc_sendMessageUploadPhotoAction); return queryData(); } inline MTPsendMessageAction::MTPsendMessageAction(const MTPDsendMessageUploadPhotoAction *data) : TypeDataOwner(data), _type(mtpc_sendMessageUploadPhotoAction) { } inline const MTPDsendMessageUploadDocumentAction &MTPsendMessageAction::c_sendMessageUploadDocumentAction() const { t_assert(_type == mtpc_sendMessageUploadDocumentAction); return queryData(); } inline MTPsendMessageAction::MTPsendMessageAction(const MTPDsendMessageUploadDocumentAction *data) : TypeDataOwner(data), _type(mtpc_sendMessageUploadDocumentAction) { } inline MTPsendMessageAction MTP_sendMessageTypingAction() { return MTP::internal::TypeCreator::new_sendMessageTypingAction(); } inline MTPsendMessageAction MTP_sendMessageCancelAction() { return MTP::internal::TypeCreator::new_sendMessageCancelAction(); } inline MTPsendMessageAction MTP_sendMessageRecordVideoAction() { return MTP::internal::TypeCreator::new_sendMessageRecordVideoAction(); } inline MTPsendMessageAction MTP_sendMessageUploadVideoAction(MTPint _progress) { return MTP::internal::TypeCreator::new_sendMessageUploadVideoAction(_progress); } inline MTPsendMessageAction MTP_sendMessageRecordAudioAction() { return MTP::internal::TypeCreator::new_sendMessageRecordAudioAction(); } inline MTPsendMessageAction MTP_sendMessageUploadAudioAction(MTPint _progress) { return MTP::internal::TypeCreator::new_sendMessageUploadAudioAction(_progress); } inline MTPsendMessageAction MTP_sendMessageUploadPhotoAction(MTPint _progress) { return MTP::internal::TypeCreator::new_sendMessageUploadPhotoAction(_progress); } inline MTPsendMessageAction MTP_sendMessageUploadDocumentAction(MTPint _progress) { return MTP::internal::TypeCreator::new_sendMessageUploadDocumentAction(_progress); } inline MTPsendMessageAction MTP_sendMessageGeoLocationAction() { return MTP::internal::TypeCreator::new_sendMessageGeoLocationAction(); } inline MTPsendMessageAction MTP_sendMessageChooseContactAction() { return MTP::internal::TypeCreator::new_sendMessageChooseContactAction(); } inline MTPsendMessageAction MTP_sendMessageGamePlayAction() { return MTP::internal::TypeCreator::new_sendMessageGamePlayAction(); } inline MTPcontacts_found::MTPcontacts_found() : TypeDataOwner(new MTPDcontacts_found()) { } inline uint32 MTPcontacts_found::innerLength() const { const MTPDcontacts_found &v(c_contacts_found()); return v.vresults.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPcontacts_found::type() const { return mtpc_contacts_found; } inline void MTPcontacts_found::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contacts_found) throw mtpErrorUnexpected(cons, "MTPcontacts_found"); auto v = new MTPDcontacts_found(); setData(v); v->vresults.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } inline void MTPcontacts_found::write(mtpBuffer &to) const { auto &v = c_contacts_found(); v.vresults.write(to); v.vchats.write(to); v.vusers.write(to); } inline const MTPDcontacts_found &MTPcontacts_found::c_contacts_found() const { return queryData(); } inline MTPcontacts_found::MTPcontacts_found(const MTPDcontacts_found *data) : TypeDataOwner(data) { } inline MTPcontacts_found MTP_contacts_found(const MTPVector &_results, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_found(_results, _chats, _users); } inline uint32 MTPinputPrivacyKey::innerLength() const { return 0; } inline mtpTypeId MTPinputPrivacyKey::type() const { t_assert(_type != 0); return _type; } inline void MTPinputPrivacyKey::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputPrivacyKeyStatusTimestamp: _type = cons; break; case mtpc_inputPrivacyKeyChatInvite: _type = cons; break; case mtpc_inputPrivacyKeyPhoneCall: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPinputPrivacyKey"); } } inline void MTPinputPrivacyKey::write(mtpBuffer &to) const { } inline MTPinputPrivacyKey::MTPinputPrivacyKey(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputPrivacyKeyStatusTimestamp: break; case mtpc_inputPrivacyKeyChatInvite: break; case mtpc_inputPrivacyKeyPhoneCall: break; default: throw mtpErrorBadTypeId(type, "MTPinputPrivacyKey"); } } inline MTPinputPrivacyKey MTP_inputPrivacyKeyStatusTimestamp() { return MTP::internal::TypeCreator::new_inputPrivacyKeyStatusTimestamp(); } inline MTPinputPrivacyKey MTP_inputPrivacyKeyChatInvite() { return MTP::internal::TypeCreator::new_inputPrivacyKeyChatInvite(); } inline MTPinputPrivacyKey MTP_inputPrivacyKeyPhoneCall() { return MTP::internal::TypeCreator::new_inputPrivacyKeyPhoneCall(); } inline uint32 MTPprivacyKey::innerLength() const { return 0; } inline mtpTypeId MTPprivacyKey::type() const { t_assert(_type != 0); return _type; } inline void MTPprivacyKey::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_privacyKeyStatusTimestamp: _type = cons; break; case mtpc_privacyKeyChatInvite: _type = cons; break; case mtpc_privacyKeyPhoneCall: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPprivacyKey"); } } inline void MTPprivacyKey::write(mtpBuffer &to) const { } inline MTPprivacyKey::MTPprivacyKey(mtpTypeId type) : _type(type) { switch (type) { case mtpc_privacyKeyStatusTimestamp: break; case mtpc_privacyKeyChatInvite: break; case mtpc_privacyKeyPhoneCall: break; default: throw mtpErrorBadTypeId(type, "MTPprivacyKey"); } } inline MTPprivacyKey MTP_privacyKeyStatusTimestamp() { return MTP::internal::TypeCreator::new_privacyKeyStatusTimestamp(); } inline MTPprivacyKey MTP_privacyKeyChatInvite() { return MTP::internal::TypeCreator::new_privacyKeyChatInvite(); } inline MTPprivacyKey MTP_privacyKeyPhoneCall() { return MTP::internal::TypeCreator::new_privacyKeyPhoneCall(); } inline uint32 MTPinputPrivacyRule::innerLength() const { switch (_type) { case mtpc_inputPrivacyValueAllowUsers: { const MTPDinputPrivacyValueAllowUsers &v(c_inputPrivacyValueAllowUsers()); return v.vusers.innerLength(); } case mtpc_inputPrivacyValueDisallowUsers: { const MTPDinputPrivacyValueDisallowUsers &v(c_inputPrivacyValueDisallowUsers()); return v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPinputPrivacyRule::type() const { t_assert(_type != 0); return _type; } inline void MTPinputPrivacyRule::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputPrivacyValueAllowContacts: _type = cons; break; case mtpc_inputPrivacyValueAllowAll: _type = cons; break; case mtpc_inputPrivacyValueAllowUsers: _type = cons; { auto v = new MTPDinputPrivacyValueAllowUsers(); setData(v); v->vusers.read(from, end); } break; case mtpc_inputPrivacyValueDisallowContacts: _type = cons; break; case mtpc_inputPrivacyValueDisallowAll: _type = cons; break; case mtpc_inputPrivacyValueDisallowUsers: _type = cons; { auto v = new MTPDinputPrivacyValueDisallowUsers(); setData(v); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputPrivacyRule"); } } inline void MTPinputPrivacyRule::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputPrivacyValueAllowUsers: { auto &v = c_inputPrivacyValueAllowUsers(); v.vusers.write(to); } break; case mtpc_inputPrivacyValueDisallowUsers: { auto &v = c_inputPrivacyValueDisallowUsers(); v.vusers.write(to); } break; } } inline MTPinputPrivacyRule::MTPinputPrivacyRule(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputPrivacyValueAllowContacts: break; case mtpc_inputPrivacyValueAllowAll: break; case mtpc_inputPrivacyValueAllowUsers: setData(new MTPDinputPrivacyValueAllowUsers()); break; case mtpc_inputPrivacyValueDisallowContacts: break; case mtpc_inputPrivacyValueDisallowAll: break; case mtpc_inputPrivacyValueDisallowUsers: setData(new MTPDinputPrivacyValueDisallowUsers()); break; default: throw mtpErrorBadTypeId(type, "MTPinputPrivacyRule"); } } inline const MTPDinputPrivacyValueAllowUsers &MTPinputPrivacyRule::c_inputPrivacyValueAllowUsers() const { t_assert(_type == mtpc_inputPrivacyValueAllowUsers); return queryData(); } inline MTPinputPrivacyRule::MTPinputPrivacyRule(const MTPDinputPrivacyValueAllowUsers *data) : TypeDataOwner(data), _type(mtpc_inputPrivacyValueAllowUsers) { } inline const MTPDinputPrivacyValueDisallowUsers &MTPinputPrivacyRule::c_inputPrivacyValueDisallowUsers() const { t_assert(_type == mtpc_inputPrivacyValueDisallowUsers); return queryData(); } inline MTPinputPrivacyRule::MTPinputPrivacyRule(const MTPDinputPrivacyValueDisallowUsers *data) : TypeDataOwner(data), _type(mtpc_inputPrivacyValueDisallowUsers) { } inline MTPinputPrivacyRule MTP_inputPrivacyValueAllowContacts() { return MTP::internal::TypeCreator::new_inputPrivacyValueAllowContacts(); } inline MTPinputPrivacyRule MTP_inputPrivacyValueAllowAll() { return MTP::internal::TypeCreator::new_inputPrivacyValueAllowAll(); } inline MTPinputPrivacyRule MTP_inputPrivacyValueAllowUsers(const MTPVector &_users) { return MTP::internal::TypeCreator::new_inputPrivacyValueAllowUsers(_users); } inline MTPinputPrivacyRule MTP_inputPrivacyValueDisallowContacts() { return MTP::internal::TypeCreator::new_inputPrivacyValueDisallowContacts(); } inline MTPinputPrivacyRule MTP_inputPrivacyValueDisallowAll() { return MTP::internal::TypeCreator::new_inputPrivacyValueDisallowAll(); } inline MTPinputPrivacyRule MTP_inputPrivacyValueDisallowUsers(const MTPVector &_users) { return MTP::internal::TypeCreator::new_inputPrivacyValueDisallowUsers(_users); } inline uint32 MTPprivacyRule::innerLength() const { switch (_type) { case mtpc_privacyValueAllowUsers: { const MTPDprivacyValueAllowUsers &v(c_privacyValueAllowUsers()); return v.vusers.innerLength(); } case mtpc_privacyValueDisallowUsers: { const MTPDprivacyValueDisallowUsers &v(c_privacyValueDisallowUsers()); return v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPprivacyRule::type() const { t_assert(_type != 0); return _type; } inline void MTPprivacyRule::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_privacyValueAllowContacts: _type = cons; break; case mtpc_privacyValueAllowAll: _type = cons; break; case mtpc_privacyValueAllowUsers: _type = cons; { auto v = new MTPDprivacyValueAllowUsers(); setData(v); v->vusers.read(from, end); } break; case mtpc_privacyValueDisallowContacts: _type = cons; break; case mtpc_privacyValueDisallowAll: _type = cons; break; case mtpc_privacyValueDisallowUsers: _type = cons; { auto v = new MTPDprivacyValueDisallowUsers(); setData(v); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPprivacyRule"); } } inline void MTPprivacyRule::write(mtpBuffer &to) const { switch (_type) { case mtpc_privacyValueAllowUsers: { auto &v = c_privacyValueAllowUsers(); v.vusers.write(to); } break; case mtpc_privacyValueDisallowUsers: { auto &v = c_privacyValueDisallowUsers(); v.vusers.write(to); } break; } } inline MTPprivacyRule::MTPprivacyRule(mtpTypeId type) : _type(type) { switch (type) { case mtpc_privacyValueAllowContacts: break; case mtpc_privacyValueAllowAll: break; case mtpc_privacyValueAllowUsers: setData(new MTPDprivacyValueAllowUsers()); break; case mtpc_privacyValueDisallowContacts: break; case mtpc_privacyValueDisallowAll: break; case mtpc_privacyValueDisallowUsers: setData(new MTPDprivacyValueDisallowUsers()); break; default: throw mtpErrorBadTypeId(type, "MTPprivacyRule"); } } inline const MTPDprivacyValueAllowUsers &MTPprivacyRule::c_privacyValueAllowUsers() const { t_assert(_type == mtpc_privacyValueAllowUsers); return queryData(); } inline MTPprivacyRule::MTPprivacyRule(const MTPDprivacyValueAllowUsers *data) : TypeDataOwner(data), _type(mtpc_privacyValueAllowUsers) { } inline const MTPDprivacyValueDisallowUsers &MTPprivacyRule::c_privacyValueDisallowUsers() const { t_assert(_type == mtpc_privacyValueDisallowUsers); return queryData(); } inline MTPprivacyRule::MTPprivacyRule(const MTPDprivacyValueDisallowUsers *data) : TypeDataOwner(data), _type(mtpc_privacyValueDisallowUsers) { } inline MTPprivacyRule MTP_privacyValueAllowContacts() { return MTP::internal::TypeCreator::new_privacyValueAllowContacts(); } inline MTPprivacyRule MTP_privacyValueAllowAll() { return MTP::internal::TypeCreator::new_privacyValueAllowAll(); } inline MTPprivacyRule MTP_privacyValueAllowUsers(const MTPVector &_users) { return MTP::internal::TypeCreator::new_privacyValueAllowUsers(_users); } inline MTPprivacyRule MTP_privacyValueDisallowContacts() { return MTP::internal::TypeCreator::new_privacyValueDisallowContacts(); } inline MTPprivacyRule MTP_privacyValueDisallowAll() { return MTP::internal::TypeCreator::new_privacyValueDisallowAll(); } inline MTPprivacyRule MTP_privacyValueDisallowUsers(const MTPVector &_users) { return MTP::internal::TypeCreator::new_privacyValueDisallowUsers(_users); } inline MTPaccount_privacyRules::MTPaccount_privacyRules() : TypeDataOwner(new MTPDaccount_privacyRules()) { } inline uint32 MTPaccount_privacyRules::innerLength() const { const MTPDaccount_privacyRules &v(c_account_privacyRules()); return v.vrules.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPaccount_privacyRules::type() const { return mtpc_account_privacyRules; } inline void MTPaccount_privacyRules::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_account_privacyRules) throw mtpErrorUnexpected(cons, "MTPaccount_privacyRules"); auto v = new MTPDaccount_privacyRules(); setData(v); v->vrules.read(from, end); v->vusers.read(from, end); } inline void MTPaccount_privacyRules::write(mtpBuffer &to) const { auto &v = c_account_privacyRules(); v.vrules.write(to); v.vusers.write(to); } inline const MTPDaccount_privacyRules &MTPaccount_privacyRules::c_account_privacyRules() const { return queryData(); } inline MTPaccount_privacyRules::MTPaccount_privacyRules(const MTPDaccount_privacyRules *data) : TypeDataOwner(data) { } inline MTPaccount_privacyRules MTP_account_privacyRules(const MTPVector &_rules, const MTPVector &_users) { return MTP::internal::TypeCreator::new_account_privacyRules(_rules, _users); } inline MTPaccountDaysTTL::MTPaccountDaysTTL() : TypeDataOwner(new MTPDaccountDaysTTL()) { } inline uint32 MTPaccountDaysTTL::innerLength() const { const MTPDaccountDaysTTL &v(c_accountDaysTTL()); return v.vdays.innerLength(); } inline mtpTypeId MTPaccountDaysTTL::type() const { return mtpc_accountDaysTTL; } inline void MTPaccountDaysTTL::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_accountDaysTTL) throw mtpErrorUnexpected(cons, "MTPaccountDaysTTL"); auto v = new MTPDaccountDaysTTL(); setData(v); v->vdays.read(from, end); } inline void MTPaccountDaysTTL::write(mtpBuffer &to) const { auto &v = c_accountDaysTTL(); v.vdays.write(to); } inline const MTPDaccountDaysTTL &MTPaccountDaysTTL::c_accountDaysTTL() const { return queryData(); } inline MTPaccountDaysTTL::MTPaccountDaysTTL(const MTPDaccountDaysTTL *data) : TypeDataOwner(data) { } inline MTPaccountDaysTTL MTP_accountDaysTTL(MTPint _days) { return MTP::internal::TypeCreator::new_accountDaysTTL(_days); } inline uint32 MTPdocumentAttribute::innerLength() const { switch (_type) { case mtpc_documentAttributeImageSize: { const MTPDdocumentAttributeImageSize &v(c_documentAttributeImageSize()); return v.vw.innerLength() + v.vh.innerLength(); } case mtpc_documentAttributeSticker: { const MTPDdocumentAttributeSticker &v(c_documentAttributeSticker()); return v.vflags.innerLength() + v.valt.innerLength() + v.vstickerset.innerLength() + (v.has_mask_coords() ? v.vmask_coords.innerLength() : 0); } case mtpc_documentAttributeVideo: { const MTPDdocumentAttributeVideo &v(c_documentAttributeVideo()); return v.vduration.innerLength() + v.vw.innerLength() + v.vh.innerLength(); } case mtpc_documentAttributeAudio: { const MTPDdocumentAttributeAudio &v(c_documentAttributeAudio()); return v.vflags.innerLength() + v.vduration.innerLength() + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_performer() ? v.vperformer.innerLength() : 0) + (v.has_waveform() ? v.vwaveform.innerLength() : 0); } case mtpc_documentAttributeFilename: { const MTPDdocumentAttributeFilename &v(c_documentAttributeFilename()); return v.vfile_name.innerLength(); } } return 0; } inline mtpTypeId MTPdocumentAttribute::type() const { t_assert(_type != 0); return _type; } inline void MTPdocumentAttribute::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_documentAttributeImageSize: _type = cons; { auto v = new MTPDdocumentAttributeImageSize(); setData(v); v->vw.read(from, end); v->vh.read(from, end); } break; case mtpc_documentAttributeAnimated: _type = cons; break; case mtpc_documentAttributeSticker: _type = cons; { auto v = new MTPDdocumentAttributeSticker(); setData(v); v->vflags.read(from, end); v->valt.read(from, end); v->vstickerset.read(from, end); if (v->has_mask_coords()) { v->vmask_coords.read(from, end); } else { v->vmask_coords = MTPMaskCoords(); } } break; case mtpc_documentAttributeVideo: _type = cons; { auto v = new MTPDdocumentAttributeVideo(); setData(v); v->vduration.read(from, end); v->vw.read(from, end); v->vh.read(from, end); } break; case mtpc_documentAttributeAudio: _type = cons; { auto v = new MTPDdocumentAttributeAudio(); setData(v); v->vflags.read(from, end); v->vduration.read(from, end); if (v->has_title()) { v->vtitle.read(from, end); } else { v->vtitle = MTPstring(); } if (v->has_performer()) { v->vperformer.read(from, end); } else { v->vperformer = MTPstring(); } if (v->has_waveform()) { v->vwaveform.read(from, end); } else { v->vwaveform = MTPbytes(); } } break; case mtpc_documentAttributeFilename: _type = cons; { auto v = new MTPDdocumentAttributeFilename(); setData(v); v->vfile_name.read(from, end); } break; case mtpc_documentAttributeHasStickers: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPdocumentAttribute"); } } inline void MTPdocumentAttribute::write(mtpBuffer &to) const { switch (_type) { case mtpc_documentAttributeImageSize: { auto &v = c_documentAttributeImageSize(); v.vw.write(to); v.vh.write(to); } break; case mtpc_documentAttributeSticker: { auto &v = c_documentAttributeSticker(); v.vflags.write(to); v.valt.write(to); v.vstickerset.write(to); if (v.has_mask_coords()) v.vmask_coords.write(to); } break; case mtpc_documentAttributeVideo: { auto &v = c_documentAttributeVideo(); v.vduration.write(to); v.vw.write(to); v.vh.write(to); } break; case mtpc_documentAttributeAudio: { auto &v = c_documentAttributeAudio(); v.vflags.write(to); v.vduration.write(to); if (v.has_title()) v.vtitle.write(to); if (v.has_performer()) v.vperformer.write(to); if (v.has_waveform()) v.vwaveform.write(to); } break; case mtpc_documentAttributeFilename: { auto &v = c_documentAttributeFilename(); v.vfile_name.write(to); } break; } } inline MTPdocumentAttribute::MTPdocumentAttribute(mtpTypeId type) : _type(type) { switch (type) { case mtpc_documentAttributeImageSize: setData(new MTPDdocumentAttributeImageSize()); break; case mtpc_documentAttributeAnimated: break; case mtpc_documentAttributeSticker: setData(new MTPDdocumentAttributeSticker()); break; case mtpc_documentAttributeVideo: setData(new MTPDdocumentAttributeVideo()); break; case mtpc_documentAttributeAudio: setData(new MTPDdocumentAttributeAudio()); break; case mtpc_documentAttributeFilename: setData(new MTPDdocumentAttributeFilename()); break; case mtpc_documentAttributeHasStickers: break; default: throw mtpErrorBadTypeId(type, "MTPdocumentAttribute"); } } inline const MTPDdocumentAttributeImageSize &MTPdocumentAttribute::c_documentAttributeImageSize() const { t_assert(_type == mtpc_documentAttributeImageSize); return queryData(); } inline MTPdocumentAttribute::MTPdocumentAttribute(const MTPDdocumentAttributeImageSize *data) : TypeDataOwner(data), _type(mtpc_documentAttributeImageSize) { } inline const MTPDdocumentAttributeSticker &MTPdocumentAttribute::c_documentAttributeSticker() const { t_assert(_type == mtpc_documentAttributeSticker); return queryData(); } inline MTPdocumentAttribute::MTPdocumentAttribute(const MTPDdocumentAttributeSticker *data) : TypeDataOwner(data), _type(mtpc_documentAttributeSticker) { } inline const MTPDdocumentAttributeVideo &MTPdocumentAttribute::c_documentAttributeVideo() const { t_assert(_type == mtpc_documentAttributeVideo); return queryData(); } inline MTPdocumentAttribute::MTPdocumentAttribute(const MTPDdocumentAttributeVideo *data) : TypeDataOwner(data), _type(mtpc_documentAttributeVideo) { } inline const MTPDdocumentAttributeAudio &MTPdocumentAttribute::c_documentAttributeAudio() const { t_assert(_type == mtpc_documentAttributeAudio); return queryData(); } inline MTPdocumentAttribute::MTPdocumentAttribute(const MTPDdocumentAttributeAudio *data) : TypeDataOwner(data), _type(mtpc_documentAttributeAudio) { } inline const MTPDdocumentAttributeFilename &MTPdocumentAttribute::c_documentAttributeFilename() const { t_assert(_type == mtpc_documentAttributeFilename); return queryData(); } inline MTPdocumentAttribute::MTPdocumentAttribute(const MTPDdocumentAttributeFilename *data) : TypeDataOwner(data), _type(mtpc_documentAttributeFilename) { } inline MTPdocumentAttribute MTP_documentAttributeImageSize(MTPint _w, MTPint _h) { return MTP::internal::TypeCreator::new_documentAttributeImageSize(_w, _h); } inline MTPdocumentAttribute MTP_documentAttributeAnimated() { return MTP::internal::TypeCreator::new_documentAttributeAnimated(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDdocumentAttributeSticker::Flags) inline MTPdocumentAttribute MTP_documentAttributeSticker(const MTPflags &_flags, const MTPstring &_alt, const MTPInputStickerSet &_stickerset, const MTPMaskCoords &_mask_coords) { return MTP::internal::TypeCreator::new_documentAttributeSticker(_flags, _alt, _stickerset, _mask_coords); } inline MTPdocumentAttribute MTP_documentAttributeVideo(MTPint _duration, MTPint _w, MTPint _h) { return MTP::internal::TypeCreator::new_documentAttributeVideo(_duration, _w, _h); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDdocumentAttributeAudio::Flags) inline MTPdocumentAttribute MTP_documentAttributeAudio(const MTPflags &_flags, MTPint _duration, const MTPstring &_title, const MTPstring &_performer, const MTPbytes &_waveform) { return MTP::internal::TypeCreator::new_documentAttributeAudio(_flags, _duration, _title, _performer, _waveform); } inline MTPdocumentAttribute MTP_documentAttributeFilename(const MTPstring &_file_name) { return MTP::internal::TypeCreator::new_documentAttributeFilename(_file_name); } inline MTPdocumentAttribute MTP_documentAttributeHasStickers() { return MTP::internal::TypeCreator::new_documentAttributeHasStickers(); } inline uint32 MTPmessages_stickers::innerLength() const { switch (_type) { case mtpc_messages_stickers: { const MTPDmessages_stickers &v(c_messages_stickers()); return v.vhash.innerLength() + v.vstickers.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_stickers::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_stickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_stickersNotModified: _type = cons; break; case mtpc_messages_stickers: _type = cons; { auto v = new MTPDmessages_stickers(); setData(v); v->vhash.read(from, end); v->vstickers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_stickers"); } } inline void MTPmessages_stickers::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_stickers: { auto &v = c_messages_stickers(); v.vhash.write(to); v.vstickers.write(to); } break; } } inline MTPmessages_stickers::MTPmessages_stickers(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_stickersNotModified: break; case mtpc_messages_stickers: setData(new MTPDmessages_stickers()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_stickers"); } } inline const MTPDmessages_stickers &MTPmessages_stickers::c_messages_stickers() const { t_assert(_type == mtpc_messages_stickers); return queryData(); } inline MTPmessages_stickers::MTPmessages_stickers(const MTPDmessages_stickers *data) : TypeDataOwner(data), _type(mtpc_messages_stickers) { } inline MTPmessages_stickers MTP_messages_stickersNotModified() { return MTP::internal::TypeCreator::new_messages_stickersNotModified(); } inline MTPmessages_stickers MTP_messages_stickers(const MTPstring &_hash, const MTPVector &_stickers) { return MTP::internal::TypeCreator::new_messages_stickers(_hash, _stickers); } inline MTPstickerPack::MTPstickerPack() : TypeDataOwner(new MTPDstickerPack()) { } inline uint32 MTPstickerPack::innerLength() const { const MTPDstickerPack &v(c_stickerPack()); return v.vemoticon.innerLength() + v.vdocuments.innerLength(); } inline mtpTypeId MTPstickerPack::type() const { return mtpc_stickerPack; } inline void MTPstickerPack::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_stickerPack) throw mtpErrorUnexpected(cons, "MTPstickerPack"); auto v = new MTPDstickerPack(); setData(v); v->vemoticon.read(from, end); v->vdocuments.read(from, end); } inline void MTPstickerPack::write(mtpBuffer &to) const { auto &v = c_stickerPack(); v.vemoticon.write(to); v.vdocuments.write(to); } inline const MTPDstickerPack &MTPstickerPack::c_stickerPack() const { return queryData(); } inline MTPstickerPack::MTPstickerPack(const MTPDstickerPack *data) : TypeDataOwner(data) { } inline MTPstickerPack MTP_stickerPack(const MTPstring &_emoticon, const MTPVector &_documents) { return MTP::internal::TypeCreator::new_stickerPack(_emoticon, _documents); } inline uint32 MTPmessages_allStickers::innerLength() const { switch (_type) { case mtpc_messages_allStickers: { const MTPDmessages_allStickers &v(c_messages_allStickers()); return v.vhash.innerLength() + v.vsets.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_allStickers::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_allStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_allStickersNotModified: _type = cons; break; case mtpc_messages_allStickers: _type = cons; { auto v = new MTPDmessages_allStickers(); setData(v); v->vhash.read(from, end); v->vsets.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_allStickers"); } } inline void MTPmessages_allStickers::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_allStickers: { auto &v = c_messages_allStickers(); v.vhash.write(to); v.vsets.write(to); } break; } } inline MTPmessages_allStickers::MTPmessages_allStickers(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_allStickersNotModified: break; case mtpc_messages_allStickers: setData(new MTPDmessages_allStickers()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_allStickers"); } } inline const MTPDmessages_allStickers &MTPmessages_allStickers::c_messages_allStickers() const { t_assert(_type == mtpc_messages_allStickers); return queryData(); } inline MTPmessages_allStickers::MTPmessages_allStickers(const MTPDmessages_allStickers *data) : TypeDataOwner(data), _type(mtpc_messages_allStickers) { } inline MTPmessages_allStickers MTP_messages_allStickersNotModified() { return MTP::internal::TypeCreator::new_messages_allStickersNotModified(); } inline MTPmessages_allStickers MTP_messages_allStickers(MTPint _hash, const MTPVector &_sets) { return MTP::internal::TypeCreator::new_messages_allStickers(_hash, _sets); } inline MTPdisabledFeature::MTPdisabledFeature() : TypeDataOwner(new MTPDdisabledFeature()) { } inline uint32 MTPdisabledFeature::innerLength() const { const MTPDdisabledFeature &v(c_disabledFeature()); return v.vfeature.innerLength() + v.vdescription.innerLength(); } inline mtpTypeId MTPdisabledFeature::type() const { return mtpc_disabledFeature; } inline void MTPdisabledFeature::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_disabledFeature) throw mtpErrorUnexpected(cons, "MTPdisabledFeature"); auto v = new MTPDdisabledFeature(); setData(v); v->vfeature.read(from, end); v->vdescription.read(from, end); } inline void MTPdisabledFeature::write(mtpBuffer &to) const { auto &v = c_disabledFeature(); v.vfeature.write(to); v.vdescription.write(to); } inline const MTPDdisabledFeature &MTPdisabledFeature::c_disabledFeature() const { return queryData(); } inline MTPdisabledFeature::MTPdisabledFeature(const MTPDdisabledFeature *data) : TypeDataOwner(data) { } inline MTPdisabledFeature MTP_disabledFeature(const MTPstring &_feature, const MTPstring &_description) { return MTP::internal::TypeCreator::new_disabledFeature(_feature, _description); } inline MTPmessages_affectedMessages::MTPmessages_affectedMessages() : TypeDataOwner(new MTPDmessages_affectedMessages()) { } inline uint32 MTPmessages_affectedMessages::innerLength() const { const MTPDmessages_affectedMessages &v(c_messages_affectedMessages()); return v.vpts.innerLength() + v.vpts_count.innerLength(); } inline mtpTypeId MTPmessages_affectedMessages::type() const { return mtpc_messages_affectedMessages; } inline void MTPmessages_affectedMessages::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_affectedMessages) throw mtpErrorUnexpected(cons, "MTPmessages_affectedMessages"); auto v = new MTPDmessages_affectedMessages(); setData(v); v->vpts.read(from, end); v->vpts_count.read(from, end); } inline void MTPmessages_affectedMessages::write(mtpBuffer &to) const { auto &v = c_messages_affectedMessages(); v.vpts.write(to); v.vpts_count.write(to); } inline const MTPDmessages_affectedMessages &MTPmessages_affectedMessages::c_messages_affectedMessages() const { return queryData(); } inline MTPmessages_affectedMessages::MTPmessages_affectedMessages(const MTPDmessages_affectedMessages *data) : TypeDataOwner(data) { } inline MTPmessages_affectedMessages MTP_messages_affectedMessages(MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_messages_affectedMessages(_pts, _pts_count); } inline uint32 MTPcontactLink::innerLength() const { return 0; } inline mtpTypeId MTPcontactLink::type() const { t_assert(_type != 0); return _type; } inline void MTPcontactLink::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_contactLinkUnknown: _type = cons; break; case mtpc_contactLinkNone: _type = cons; break; case mtpc_contactLinkHasPhone: _type = cons; break; case mtpc_contactLinkContact: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPcontactLink"); } } inline void MTPcontactLink::write(mtpBuffer &to) const { } inline MTPcontactLink::MTPcontactLink(mtpTypeId type) : _type(type) { switch (type) { case mtpc_contactLinkUnknown: break; case mtpc_contactLinkNone: break; case mtpc_contactLinkHasPhone: break; case mtpc_contactLinkContact: break; default: throw mtpErrorBadTypeId(type, "MTPcontactLink"); } } inline MTPcontactLink MTP_contactLinkUnknown() { return MTP::internal::TypeCreator::new_contactLinkUnknown(); } inline MTPcontactLink MTP_contactLinkNone() { return MTP::internal::TypeCreator::new_contactLinkNone(); } inline MTPcontactLink MTP_contactLinkHasPhone() { return MTP::internal::TypeCreator::new_contactLinkHasPhone(); } inline MTPcontactLink MTP_contactLinkContact() { return MTP::internal::TypeCreator::new_contactLinkContact(); } inline uint32 MTPwebPage::innerLength() const { switch (_type) { case mtpc_webPageEmpty: { const MTPDwebPageEmpty &v(c_webPageEmpty()); return v.vid.innerLength(); } case mtpc_webPagePending: { const MTPDwebPagePending &v(c_webPagePending()); return v.vid.innerLength() + v.vdate.innerLength(); } case mtpc_webPage: { const MTPDwebPage &v(c_webPage()); return v.vflags.innerLength() + v.vid.innerLength() + v.vurl.innerLength() + v.vdisplay_url.innerLength() + v.vhash.innerLength() + (v.has_type() ? v.vtype.innerLength() : 0) + (v.has_site_name() ? v.vsite_name.innerLength() : 0) + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_description() ? v.vdescription.innerLength() : 0) + (v.has_photo() ? v.vphoto.innerLength() : 0) + (v.has_embed_url() ? v.vembed_url.innerLength() : 0) + (v.has_embed_type() ? v.vembed_type.innerLength() : 0) + (v.has_embed_width() ? v.vembed_width.innerLength() : 0) + (v.has_embed_height() ? v.vembed_height.innerLength() : 0) + (v.has_duration() ? v.vduration.innerLength() : 0) + (v.has_author() ? v.vauthor.innerLength() : 0) + (v.has_document() ? v.vdocument.innerLength() : 0) + (v.has_cached_page() ? v.vcached_page.innerLength() : 0); } } return 0; } inline mtpTypeId MTPwebPage::type() const { t_assert(_type != 0); return _type; } inline void MTPwebPage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_webPageEmpty: _type = cons; { auto v = new MTPDwebPageEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_webPagePending: _type = cons; { auto v = new MTPDwebPagePending(); setData(v); v->vid.read(from, end); v->vdate.read(from, end); } break; case mtpc_webPage: _type = cons; { auto v = new MTPDwebPage(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vurl.read(from, end); v->vdisplay_url.read(from, end); v->vhash.read(from, end); if (v->has_type()) { v->vtype.read(from, end); } else { v->vtype = MTPstring(); } if (v->has_site_name()) { v->vsite_name.read(from, end); } else { v->vsite_name = MTPstring(); } if (v->has_title()) { v->vtitle.read(from, end); } else { v->vtitle = MTPstring(); } if (v->has_description()) { v->vdescription.read(from, end); } else { v->vdescription = MTPstring(); } if (v->has_photo()) { v->vphoto.read(from, end); } else { v->vphoto = MTPPhoto(); } if (v->has_embed_url()) { v->vembed_url.read(from, end); } else { v->vembed_url = MTPstring(); } if (v->has_embed_type()) { v->vembed_type.read(from, end); } else { v->vembed_type = MTPstring(); } if (v->has_embed_width()) { v->vembed_width.read(from, end); } else { v->vembed_width = MTPint(); } if (v->has_embed_height()) { v->vembed_height.read(from, end); } else { v->vembed_height = MTPint(); } if (v->has_duration()) { v->vduration.read(from, end); } else { v->vduration = MTPint(); } if (v->has_author()) { v->vauthor.read(from, end); } else { v->vauthor = MTPstring(); } if (v->has_document()) { v->vdocument.read(from, end); } else { v->vdocument = MTPDocument(); } if (v->has_cached_page()) { v->vcached_page.read(from, end); } else { v->vcached_page = MTPPage(); } } break; case mtpc_webPageNotModified: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPwebPage"); } } inline void MTPwebPage::write(mtpBuffer &to) const { switch (_type) { case mtpc_webPageEmpty: { auto &v = c_webPageEmpty(); v.vid.write(to); } break; case mtpc_webPagePending: { auto &v = c_webPagePending(); v.vid.write(to); v.vdate.write(to); } break; case mtpc_webPage: { auto &v = c_webPage(); v.vflags.write(to); v.vid.write(to); v.vurl.write(to); v.vdisplay_url.write(to); v.vhash.write(to); if (v.has_type()) v.vtype.write(to); if (v.has_site_name()) v.vsite_name.write(to); if (v.has_title()) v.vtitle.write(to); if (v.has_description()) v.vdescription.write(to); if (v.has_photo()) v.vphoto.write(to); if (v.has_embed_url()) v.vembed_url.write(to); if (v.has_embed_type()) v.vembed_type.write(to); if (v.has_embed_width()) v.vembed_width.write(to); if (v.has_embed_height()) v.vembed_height.write(to); if (v.has_duration()) v.vduration.write(to); if (v.has_author()) v.vauthor.write(to); if (v.has_document()) v.vdocument.write(to); if (v.has_cached_page()) v.vcached_page.write(to); } break; } } inline MTPwebPage::MTPwebPage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_webPageEmpty: setData(new MTPDwebPageEmpty()); break; case mtpc_webPagePending: setData(new MTPDwebPagePending()); break; case mtpc_webPage: setData(new MTPDwebPage()); break; case mtpc_webPageNotModified: break; default: throw mtpErrorBadTypeId(type, "MTPwebPage"); } } inline const MTPDwebPageEmpty &MTPwebPage::c_webPageEmpty() const { t_assert(_type == mtpc_webPageEmpty); return queryData(); } inline MTPwebPage::MTPwebPage(const MTPDwebPageEmpty *data) : TypeDataOwner(data), _type(mtpc_webPageEmpty) { } inline const MTPDwebPagePending &MTPwebPage::c_webPagePending() const { t_assert(_type == mtpc_webPagePending); return queryData(); } inline MTPwebPage::MTPwebPage(const MTPDwebPagePending *data) : TypeDataOwner(data), _type(mtpc_webPagePending) { } inline const MTPDwebPage &MTPwebPage::c_webPage() const { t_assert(_type == mtpc_webPage); return queryData(); } inline MTPwebPage::MTPwebPage(const MTPDwebPage *data) : TypeDataOwner(data), _type(mtpc_webPage) { } inline MTPwebPage MTP_webPageEmpty(const MTPlong &_id) { return MTP::internal::TypeCreator::new_webPageEmpty(_id); } inline MTPwebPage MTP_webPagePending(const MTPlong &_id, MTPint _date) { return MTP::internal::TypeCreator::new_webPagePending(_id, _date); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDwebPage::Flags) inline MTPwebPage MTP_webPage(const MTPflags &_flags, const MTPlong &_id, const MTPstring &_url, const MTPstring &_display_url, MTPint _hash, const MTPstring &_type, const MTPstring &_site_name, const MTPstring &_title, const MTPstring &_description, const MTPPhoto &_photo, const MTPstring &_embed_url, const MTPstring &_embed_type, MTPint _embed_width, MTPint _embed_height, MTPint _duration, const MTPstring &_author, const MTPDocument &_document, const MTPPage &_cached_page) { return MTP::internal::TypeCreator::new_webPage(_flags, _id, _url, _display_url, _hash, _type, _site_name, _title, _description, _photo, _embed_url, _embed_type, _embed_width, _embed_height, _duration, _author, _document, _cached_page); } inline MTPwebPage MTP_webPageNotModified() { return MTP::internal::TypeCreator::new_webPageNotModified(); } inline MTPauthorization::MTPauthorization() : TypeDataOwner(new MTPDauthorization()) { } inline uint32 MTPauthorization::innerLength() const { const MTPDauthorization &v(c_authorization()); return v.vhash.innerLength() + v.vflags.innerLength() + v.vdevice_model.innerLength() + v.vplatform.innerLength() + v.vsystem_version.innerLength() + v.vapi_id.innerLength() + v.vapp_name.innerLength() + v.vapp_version.innerLength() + v.vdate_created.innerLength() + v.vdate_active.innerLength() + v.vip.innerLength() + v.vcountry.innerLength() + v.vregion.innerLength(); } inline mtpTypeId MTPauthorization::type() const { return mtpc_authorization; } inline void MTPauthorization::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_authorization) throw mtpErrorUnexpected(cons, "MTPauthorization"); auto v = new MTPDauthorization(); setData(v); v->vhash.read(from, end); v->vflags.read(from, end); v->vdevice_model.read(from, end); v->vplatform.read(from, end); v->vsystem_version.read(from, end); v->vapi_id.read(from, end); v->vapp_name.read(from, end); v->vapp_version.read(from, end); v->vdate_created.read(from, end); v->vdate_active.read(from, end); v->vip.read(from, end); v->vcountry.read(from, end); v->vregion.read(from, end); } inline void MTPauthorization::write(mtpBuffer &to) const { auto &v = c_authorization(); v.vhash.write(to); v.vflags.write(to); v.vdevice_model.write(to); v.vplatform.write(to); v.vsystem_version.write(to); v.vapi_id.write(to); v.vapp_name.write(to); v.vapp_version.write(to); v.vdate_created.write(to); v.vdate_active.write(to); v.vip.write(to); v.vcountry.write(to); v.vregion.write(to); } inline const MTPDauthorization &MTPauthorization::c_authorization() const { return queryData(); } inline MTPauthorization::MTPauthorization(const MTPDauthorization *data) : TypeDataOwner(data) { } inline MTPauthorization MTP_authorization(const MTPlong &_hash, MTPint _flags, const MTPstring &_device_model, const MTPstring &_platform, const MTPstring &_system_version, MTPint _api_id, const MTPstring &_app_name, const MTPstring &_app_version, MTPint _date_created, MTPint _date_active, const MTPstring &_ip, const MTPstring &_country, const MTPstring &_region) { return MTP::internal::TypeCreator::new_authorization(_hash, _flags, _device_model, _platform, _system_version, _api_id, _app_name, _app_version, _date_created, _date_active, _ip, _country, _region); } inline MTPaccount_authorizations::MTPaccount_authorizations() : TypeDataOwner(new MTPDaccount_authorizations()) { } inline uint32 MTPaccount_authorizations::innerLength() const { const MTPDaccount_authorizations &v(c_account_authorizations()); return v.vauthorizations.innerLength(); } inline mtpTypeId MTPaccount_authorizations::type() const { return mtpc_account_authorizations; } inline void MTPaccount_authorizations::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_account_authorizations) throw mtpErrorUnexpected(cons, "MTPaccount_authorizations"); auto v = new MTPDaccount_authorizations(); setData(v); v->vauthorizations.read(from, end); } inline void MTPaccount_authorizations::write(mtpBuffer &to) const { auto &v = c_account_authorizations(); v.vauthorizations.write(to); } inline const MTPDaccount_authorizations &MTPaccount_authorizations::c_account_authorizations() const { return queryData(); } inline MTPaccount_authorizations::MTPaccount_authorizations(const MTPDaccount_authorizations *data) : TypeDataOwner(data) { } inline MTPaccount_authorizations MTP_account_authorizations(const MTPVector &_authorizations) { return MTP::internal::TypeCreator::new_account_authorizations(_authorizations); } inline uint32 MTPaccount_password::innerLength() const { switch (_type) { case mtpc_account_noPassword: { const MTPDaccount_noPassword &v(c_account_noPassword()); return v.vnew_salt.innerLength() + v.vemail_unconfirmed_pattern.innerLength(); } case mtpc_account_password: { const MTPDaccount_password &v(c_account_password()); return v.vcurrent_salt.innerLength() + v.vnew_salt.innerLength() + v.vhint.innerLength() + v.vhas_recovery.innerLength() + v.vemail_unconfirmed_pattern.innerLength(); } } return 0; } inline mtpTypeId MTPaccount_password::type() const { t_assert(_type != 0); return _type; } inline void MTPaccount_password::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_account_noPassword: _type = cons; { auto v = new MTPDaccount_noPassword(); setData(v); v->vnew_salt.read(from, end); v->vemail_unconfirmed_pattern.read(from, end); } break; case mtpc_account_password: _type = cons; { auto v = new MTPDaccount_password(); setData(v); v->vcurrent_salt.read(from, end); v->vnew_salt.read(from, end); v->vhint.read(from, end); v->vhas_recovery.read(from, end); v->vemail_unconfirmed_pattern.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPaccount_password"); } } inline void MTPaccount_password::write(mtpBuffer &to) const { switch (_type) { case mtpc_account_noPassword: { auto &v = c_account_noPassword(); v.vnew_salt.write(to); v.vemail_unconfirmed_pattern.write(to); } break; case mtpc_account_password: { auto &v = c_account_password(); v.vcurrent_salt.write(to); v.vnew_salt.write(to); v.vhint.write(to); v.vhas_recovery.write(to); v.vemail_unconfirmed_pattern.write(to); } break; } } inline MTPaccount_password::MTPaccount_password(mtpTypeId type) : _type(type) { switch (type) { case mtpc_account_noPassword: setData(new MTPDaccount_noPassword()); break; case mtpc_account_password: setData(new MTPDaccount_password()); break; default: throw mtpErrorBadTypeId(type, "MTPaccount_password"); } } inline const MTPDaccount_noPassword &MTPaccount_password::c_account_noPassword() const { t_assert(_type == mtpc_account_noPassword); return queryData(); } inline MTPaccount_password::MTPaccount_password(const MTPDaccount_noPassword *data) : TypeDataOwner(data), _type(mtpc_account_noPassword) { } inline const MTPDaccount_password &MTPaccount_password::c_account_password() const { t_assert(_type == mtpc_account_password); return queryData(); } inline MTPaccount_password::MTPaccount_password(const MTPDaccount_password *data) : TypeDataOwner(data), _type(mtpc_account_password) { } inline MTPaccount_password MTP_account_noPassword(const MTPbytes &_new_salt, const MTPstring &_email_unconfirmed_pattern) { return MTP::internal::TypeCreator::new_account_noPassword(_new_salt, _email_unconfirmed_pattern); } inline MTPaccount_password MTP_account_password(const MTPbytes &_current_salt, const MTPbytes &_new_salt, const MTPstring &_hint, MTPBool _has_recovery, const MTPstring &_email_unconfirmed_pattern) { return MTP::internal::TypeCreator::new_account_password(_current_salt, _new_salt, _hint, _has_recovery, _email_unconfirmed_pattern); } inline MTPaccount_passwordSettings::MTPaccount_passwordSettings() : TypeDataOwner(new MTPDaccount_passwordSettings()) { } inline uint32 MTPaccount_passwordSettings::innerLength() const { const MTPDaccount_passwordSettings &v(c_account_passwordSettings()); return v.vemail.innerLength(); } inline mtpTypeId MTPaccount_passwordSettings::type() const { return mtpc_account_passwordSettings; } inline void MTPaccount_passwordSettings::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_account_passwordSettings) throw mtpErrorUnexpected(cons, "MTPaccount_passwordSettings"); auto v = new MTPDaccount_passwordSettings(); setData(v); v->vemail.read(from, end); } inline void MTPaccount_passwordSettings::write(mtpBuffer &to) const { auto &v = c_account_passwordSettings(); v.vemail.write(to); } inline const MTPDaccount_passwordSettings &MTPaccount_passwordSettings::c_account_passwordSettings() const { return queryData(); } inline MTPaccount_passwordSettings::MTPaccount_passwordSettings(const MTPDaccount_passwordSettings *data) : TypeDataOwner(data) { } inline MTPaccount_passwordSettings MTP_account_passwordSettings(const MTPstring &_email) { return MTP::internal::TypeCreator::new_account_passwordSettings(_email); } inline MTPaccount_passwordInputSettings::MTPaccount_passwordInputSettings() : TypeDataOwner(new MTPDaccount_passwordInputSettings()) { } inline uint32 MTPaccount_passwordInputSettings::innerLength() const { const MTPDaccount_passwordInputSettings &v(c_account_passwordInputSettings()); return v.vflags.innerLength() + (v.has_new_salt() ? v.vnew_salt.innerLength() : 0) + (v.has_new_password_hash() ? v.vnew_password_hash.innerLength() : 0) + (v.has_hint() ? v.vhint.innerLength() : 0) + (v.has_email() ? v.vemail.innerLength() : 0); } inline mtpTypeId MTPaccount_passwordInputSettings::type() const { return mtpc_account_passwordInputSettings; } inline void MTPaccount_passwordInputSettings::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_account_passwordInputSettings) throw mtpErrorUnexpected(cons, "MTPaccount_passwordInputSettings"); auto v = new MTPDaccount_passwordInputSettings(); setData(v); v->vflags.read(from, end); if (v->has_new_salt()) { v->vnew_salt.read(from, end); } else { v->vnew_salt = MTPbytes(); } if (v->has_new_password_hash()) { v->vnew_password_hash.read(from, end); } else { v->vnew_password_hash = MTPbytes(); } if (v->has_hint()) { v->vhint.read(from, end); } else { v->vhint = MTPstring(); } if (v->has_email()) { v->vemail.read(from, end); } else { v->vemail = MTPstring(); } } inline void MTPaccount_passwordInputSettings::write(mtpBuffer &to) const { auto &v = c_account_passwordInputSettings(); v.vflags.write(to); if (v.has_new_salt()) v.vnew_salt.write(to); if (v.has_new_password_hash()) v.vnew_password_hash.write(to); if (v.has_hint()) v.vhint.write(to); if (v.has_email()) v.vemail.write(to); } inline const MTPDaccount_passwordInputSettings &MTPaccount_passwordInputSettings::c_account_passwordInputSettings() const { return queryData(); } inline MTPaccount_passwordInputSettings::MTPaccount_passwordInputSettings(const MTPDaccount_passwordInputSettings *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDaccount_passwordInputSettings::Flags) inline MTPaccount_passwordInputSettings MTP_account_passwordInputSettings(const MTPflags &_flags, const MTPbytes &_new_salt, const MTPbytes &_new_password_hash, const MTPstring &_hint, const MTPstring &_email) { return MTP::internal::TypeCreator::new_account_passwordInputSettings(_flags, _new_salt, _new_password_hash, _hint, _email); } inline MTPauth_passwordRecovery::MTPauth_passwordRecovery() : TypeDataOwner(new MTPDauth_passwordRecovery()) { } inline uint32 MTPauth_passwordRecovery::innerLength() const { const MTPDauth_passwordRecovery &v(c_auth_passwordRecovery()); return v.vemail_pattern.innerLength(); } inline mtpTypeId MTPauth_passwordRecovery::type() const { return mtpc_auth_passwordRecovery; } inline void MTPauth_passwordRecovery::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_auth_passwordRecovery) throw mtpErrorUnexpected(cons, "MTPauth_passwordRecovery"); auto v = new MTPDauth_passwordRecovery(); setData(v); v->vemail_pattern.read(from, end); } inline void MTPauth_passwordRecovery::write(mtpBuffer &to) const { auto &v = c_auth_passwordRecovery(); v.vemail_pattern.write(to); } inline const MTPDauth_passwordRecovery &MTPauth_passwordRecovery::c_auth_passwordRecovery() const { return queryData(); } inline MTPauth_passwordRecovery::MTPauth_passwordRecovery(const MTPDauth_passwordRecovery *data) : TypeDataOwner(data) { } inline MTPauth_passwordRecovery MTP_auth_passwordRecovery(const MTPstring &_email_pattern) { return MTP::internal::TypeCreator::new_auth_passwordRecovery(_email_pattern); } inline MTPreceivedNotifyMessage::MTPreceivedNotifyMessage() : TypeDataOwner(new MTPDreceivedNotifyMessage()) { } inline uint32 MTPreceivedNotifyMessage::innerLength() const { const MTPDreceivedNotifyMessage &v(c_receivedNotifyMessage()); return v.vid.innerLength() + v.vflags.innerLength(); } inline mtpTypeId MTPreceivedNotifyMessage::type() const { return mtpc_receivedNotifyMessage; } inline void MTPreceivedNotifyMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_receivedNotifyMessage) throw mtpErrorUnexpected(cons, "MTPreceivedNotifyMessage"); auto v = new MTPDreceivedNotifyMessage(); setData(v); v->vid.read(from, end); v->vflags.read(from, end); } inline void MTPreceivedNotifyMessage::write(mtpBuffer &to) const { auto &v = c_receivedNotifyMessage(); v.vid.write(to); v.vflags.write(to); } inline const MTPDreceivedNotifyMessage &MTPreceivedNotifyMessage::c_receivedNotifyMessage() const { return queryData(); } inline MTPreceivedNotifyMessage::MTPreceivedNotifyMessage(const MTPDreceivedNotifyMessage *data) : TypeDataOwner(data) { } inline MTPreceivedNotifyMessage MTP_receivedNotifyMessage(MTPint _id, MTPint _flags) { return MTP::internal::TypeCreator::new_receivedNotifyMessage(_id, _flags); } inline uint32 MTPexportedChatInvite::innerLength() const { switch (_type) { case mtpc_chatInviteExported: { const MTPDchatInviteExported &v(c_chatInviteExported()); return v.vlink.innerLength(); } } return 0; } inline mtpTypeId MTPexportedChatInvite::type() const { t_assert(_type != 0); return _type; } inline void MTPexportedChatInvite::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatInviteEmpty: _type = cons; break; case mtpc_chatInviteExported: _type = cons; { auto v = new MTPDchatInviteExported(); setData(v); v->vlink.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPexportedChatInvite"); } } inline void MTPexportedChatInvite::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatInviteExported: { auto &v = c_chatInviteExported(); v.vlink.write(to); } break; } } inline MTPexportedChatInvite::MTPexportedChatInvite(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatInviteEmpty: break; case mtpc_chatInviteExported: setData(new MTPDchatInviteExported()); break; default: throw mtpErrorBadTypeId(type, "MTPexportedChatInvite"); } } inline const MTPDchatInviteExported &MTPexportedChatInvite::c_chatInviteExported() const { t_assert(_type == mtpc_chatInviteExported); return queryData(); } inline MTPexportedChatInvite::MTPexportedChatInvite(const MTPDchatInviteExported *data) : TypeDataOwner(data), _type(mtpc_chatInviteExported) { } inline MTPexportedChatInvite MTP_chatInviteEmpty() { return MTP::internal::TypeCreator::new_chatInviteEmpty(); } inline MTPexportedChatInvite MTP_chatInviteExported(const MTPstring &_link) { return MTP::internal::TypeCreator::new_chatInviteExported(_link); } inline uint32 MTPchatInvite::innerLength() const { switch (_type) { case mtpc_chatInviteAlready: { const MTPDchatInviteAlready &v(c_chatInviteAlready()); return v.vchat.innerLength(); } case mtpc_chatInvite: { const MTPDchatInvite &v(c_chatInvite()); return v.vflags.innerLength() + v.vtitle.innerLength() + v.vphoto.innerLength() + v.vparticipants_count.innerLength() + (v.has_participants() ? v.vparticipants.innerLength() : 0); } } return 0; } inline mtpTypeId MTPchatInvite::type() const { t_assert(_type != 0); return _type; } inline void MTPchatInvite::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_chatInviteAlready: _type = cons; { auto v = new MTPDchatInviteAlready(); setData(v); v->vchat.read(from, end); } break; case mtpc_chatInvite: _type = cons; { auto v = new MTPDchatInvite(); setData(v); v->vflags.read(from, end); v->vtitle.read(from, end); v->vphoto.read(from, end); v->vparticipants_count.read(from, end); if (v->has_participants()) { v->vparticipants.read(from, end); } else { v->vparticipants = MTPVector(); } } break; default: throw mtpErrorUnexpected(cons, "MTPchatInvite"); } } inline void MTPchatInvite::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatInviteAlready: { auto &v = c_chatInviteAlready(); v.vchat.write(to); } break; case mtpc_chatInvite: { auto &v = c_chatInvite(); v.vflags.write(to); v.vtitle.write(to); v.vphoto.write(to); v.vparticipants_count.write(to); if (v.has_participants()) v.vparticipants.write(to); } break; } } inline MTPchatInvite::MTPchatInvite(mtpTypeId type) : _type(type) { switch (type) { case mtpc_chatInviteAlready: setData(new MTPDchatInviteAlready()); break; case mtpc_chatInvite: setData(new MTPDchatInvite()); break; default: throw mtpErrorBadTypeId(type, "MTPchatInvite"); } } inline const MTPDchatInviteAlready &MTPchatInvite::c_chatInviteAlready() const { t_assert(_type == mtpc_chatInviteAlready); return queryData(); } inline MTPchatInvite::MTPchatInvite(const MTPDchatInviteAlready *data) : TypeDataOwner(data), _type(mtpc_chatInviteAlready) { } inline const MTPDchatInvite &MTPchatInvite::c_chatInvite() const { t_assert(_type == mtpc_chatInvite); return queryData(); } inline MTPchatInvite::MTPchatInvite(const MTPDchatInvite *data) : TypeDataOwner(data), _type(mtpc_chatInvite) { } inline MTPchatInvite MTP_chatInviteAlready(const MTPChat &_chat) { return MTP::internal::TypeCreator::new_chatInviteAlready(_chat); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchatInvite::Flags) inline MTPchatInvite MTP_chatInvite(const MTPflags &_flags, const MTPstring &_title, const MTPChatPhoto &_photo, MTPint _participants_count, const MTPVector &_participants) { return MTP::internal::TypeCreator::new_chatInvite(_flags, _title, _photo, _participants_count, _participants); } inline uint32 MTPinputStickerSet::innerLength() const { switch (_type) { case mtpc_inputStickerSetID: { const MTPDinputStickerSetID &v(c_inputStickerSetID()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } case mtpc_inputStickerSetShortName: { const MTPDinputStickerSetShortName &v(c_inputStickerSetShortName()); return v.vshort_name.innerLength(); } } return 0; } inline mtpTypeId MTPinputStickerSet::type() const { t_assert(_type != 0); return _type; } inline void MTPinputStickerSet::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputStickerSetEmpty: _type = cons; break; case mtpc_inputStickerSetID: _type = cons; { auto v = new MTPDinputStickerSetID(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } break; case mtpc_inputStickerSetShortName: _type = cons; { auto v = new MTPDinputStickerSetShortName(); setData(v); v->vshort_name.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputStickerSet"); } } inline void MTPinputStickerSet::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputStickerSetID: { auto &v = c_inputStickerSetID(); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputStickerSetShortName: { auto &v = c_inputStickerSetShortName(); v.vshort_name.write(to); } break; } } inline MTPinputStickerSet::MTPinputStickerSet(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputStickerSetEmpty: break; case mtpc_inputStickerSetID: setData(new MTPDinputStickerSetID()); break; case mtpc_inputStickerSetShortName: setData(new MTPDinputStickerSetShortName()); break; default: throw mtpErrorBadTypeId(type, "MTPinputStickerSet"); } } inline const MTPDinputStickerSetID &MTPinputStickerSet::c_inputStickerSetID() const { t_assert(_type == mtpc_inputStickerSetID); return queryData(); } inline MTPinputStickerSet::MTPinputStickerSet(const MTPDinputStickerSetID *data) : TypeDataOwner(data), _type(mtpc_inputStickerSetID) { } inline const MTPDinputStickerSetShortName &MTPinputStickerSet::c_inputStickerSetShortName() const { t_assert(_type == mtpc_inputStickerSetShortName); return queryData(); } inline MTPinputStickerSet::MTPinputStickerSet(const MTPDinputStickerSetShortName *data) : TypeDataOwner(data), _type(mtpc_inputStickerSetShortName) { } inline MTPinputStickerSet MTP_inputStickerSetEmpty() { return MTP::internal::TypeCreator::new_inputStickerSetEmpty(); } inline MTPinputStickerSet MTP_inputStickerSetID(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputStickerSetID(_id, _access_hash); } inline MTPinputStickerSet MTP_inputStickerSetShortName(const MTPstring &_short_name) { return MTP::internal::TypeCreator::new_inputStickerSetShortName(_short_name); } inline MTPstickerSet::MTPstickerSet() : TypeDataOwner(new MTPDstickerSet()) { } inline uint32 MTPstickerSet::innerLength() const { const MTPDstickerSet &v(c_stickerSet()); return v.vflags.innerLength() + v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vtitle.innerLength() + v.vshort_name.innerLength() + v.vcount.innerLength() + v.vhash.innerLength(); } inline mtpTypeId MTPstickerSet::type() const { return mtpc_stickerSet; } inline void MTPstickerSet::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_stickerSet) throw mtpErrorUnexpected(cons, "MTPstickerSet"); auto v = new MTPDstickerSet(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vtitle.read(from, end); v->vshort_name.read(from, end); v->vcount.read(from, end); v->vhash.read(from, end); } inline void MTPstickerSet::write(mtpBuffer &to) const { auto &v = c_stickerSet(); v.vflags.write(to); v.vid.write(to); v.vaccess_hash.write(to); v.vtitle.write(to); v.vshort_name.write(to); v.vcount.write(to); v.vhash.write(to); } inline const MTPDstickerSet &MTPstickerSet::c_stickerSet() const { return queryData(); } inline MTPstickerSet::MTPstickerSet(const MTPDstickerSet *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDstickerSet::Flags) inline MTPstickerSet MTP_stickerSet(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, const MTPstring &_title, const MTPstring &_short_name, MTPint _count, MTPint _hash) { return MTP::internal::TypeCreator::new_stickerSet(_flags, _id, _access_hash, _title, _short_name, _count, _hash); } inline MTPmessages_stickerSet::MTPmessages_stickerSet() : TypeDataOwner(new MTPDmessages_stickerSet()) { } inline uint32 MTPmessages_stickerSet::innerLength() const { const MTPDmessages_stickerSet &v(c_messages_stickerSet()); return v.vset.innerLength() + v.vpacks.innerLength() + v.vdocuments.innerLength(); } inline mtpTypeId MTPmessages_stickerSet::type() const { return mtpc_messages_stickerSet; } inline void MTPmessages_stickerSet::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_stickerSet) throw mtpErrorUnexpected(cons, "MTPmessages_stickerSet"); auto v = new MTPDmessages_stickerSet(); setData(v); v->vset.read(from, end); v->vpacks.read(from, end); v->vdocuments.read(from, end); } inline void MTPmessages_stickerSet::write(mtpBuffer &to) const { auto &v = c_messages_stickerSet(); v.vset.write(to); v.vpacks.write(to); v.vdocuments.write(to); } inline const MTPDmessages_stickerSet &MTPmessages_stickerSet::c_messages_stickerSet() const { return queryData(); } inline MTPmessages_stickerSet::MTPmessages_stickerSet(const MTPDmessages_stickerSet *data) : TypeDataOwner(data) { } inline MTPmessages_stickerSet MTP_messages_stickerSet(const MTPStickerSet &_set, const MTPVector &_packs, const MTPVector &_documents) { return MTP::internal::TypeCreator::new_messages_stickerSet(_set, _packs, _documents); } inline MTPbotCommand::MTPbotCommand() : TypeDataOwner(new MTPDbotCommand()) { } inline uint32 MTPbotCommand::innerLength() const { const MTPDbotCommand &v(c_botCommand()); return v.vcommand.innerLength() + v.vdescription.innerLength(); } inline mtpTypeId MTPbotCommand::type() const { return mtpc_botCommand; } inline void MTPbotCommand::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_botCommand) throw mtpErrorUnexpected(cons, "MTPbotCommand"); auto v = new MTPDbotCommand(); setData(v); v->vcommand.read(from, end); v->vdescription.read(from, end); } inline void MTPbotCommand::write(mtpBuffer &to) const { auto &v = c_botCommand(); v.vcommand.write(to); v.vdescription.write(to); } inline const MTPDbotCommand &MTPbotCommand::c_botCommand() const { return queryData(); } inline MTPbotCommand::MTPbotCommand(const MTPDbotCommand *data) : TypeDataOwner(data) { } inline MTPbotCommand MTP_botCommand(const MTPstring &_command, const MTPstring &_description) { return MTP::internal::TypeCreator::new_botCommand(_command, _description); } inline MTPbotInfo::MTPbotInfo() : TypeDataOwner(new MTPDbotInfo()) { } inline uint32 MTPbotInfo::innerLength() const { const MTPDbotInfo &v(c_botInfo()); return v.vuser_id.innerLength() + v.vdescription.innerLength() + v.vcommands.innerLength(); } inline mtpTypeId MTPbotInfo::type() const { return mtpc_botInfo; } inline void MTPbotInfo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_botInfo) throw mtpErrorUnexpected(cons, "MTPbotInfo"); auto v = new MTPDbotInfo(); setData(v); v->vuser_id.read(from, end); v->vdescription.read(from, end); v->vcommands.read(from, end); } inline void MTPbotInfo::write(mtpBuffer &to) const { auto &v = c_botInfo(); v.vuser_id.write(to); v.vdescription.write(to); v.vcommands.write(to); } inline const MTPDbotInfo &MTPbotInfo::c_botInfo() const { return queryData(); } inline MTPbotInfo::MTPbotInfo(const MTPDbotInfo *data) : TypeDataOwner(data) { } inline MTPbotInfo MTP_botInfo(MTPint _user_id, const MTPstring &_description, const MTPVector &_commands) { return MTP::internal::TypeCreator::new_botInfo(_user_id, _description, _commands); } inline uint32 MTPkeyboardButton::innerLength() const { switch (_type) { case mtpc_keyboardButton: { const MTPDkeyboardButton &v(c_keyboardButton()); return v.vtext.innerLength(); } case mtpc_keyboardButtonUrl: { const MTPDkeyboardButtonUrl &v(c_keyboardButtonUrl()); return v.vtext.innerLength() + v.vurl.innerLength(); } case mtpc_keyboardButtonCallback: { const MTPDkeyboardButtonCallback &v(c_keyboardButtonCallback()); return v.vtext.innerLength() + v.vdata.innerLength(); } case mtpc_keyboardButtonRequestPhone: { const MTPDkeyboardButtonRequestPhone &v(c_keyboardButtonRequestPhone()); return v.vtext.innerLength(); } case mtpc_keyboardButtonRequestGeoLocation: { const MTPDkeyboardButtonRequestGeoLocation &v(c_keyboardButtonRequestGeoLocation()); return v.vtext.innerLength(); } case mtpc_keyboardButtonSwitchInline: { const MTPDkeyboardButtonSwitchInline &v(c_keyboardButtonSwitchInline()); return v.vflags.innerLength() + v.vtext.innerLength() + v.vquery.innerLength(); } case mtpc_keyboardButtonGame: { const MTPDkeyboardButtonGame &v(c_keyboardButtonGame()); return v.vtext.innerLength(); } } return 0; } inline mtpTypeId MTPkeyboardButton::type() const { t_assert(_type != 0); return _type; } inline void MTPkeyboardButton::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_keyboardButton: _type = cons; { auto v = new MTPDkeyboardButton(); setData(v); v->vtext.read(from, end); } break; case mtpc_keyboardButtonUrl: _type = cons; { auto v = new MTPDkeyboardButtonUrl(); setData(v); v->vtext.read(from, end); v->vurl.read(from, end); } break; case mtpc_keyboardButtonCallback: _type = cons; { auto v = new MTPDkeyboardButtonCallback(); setData(v); v->vtext.read(from, end); v->vdata.read(from, end); } break; case mtpc_keyboardButtonRequestPhone: _type = cons; { auto v = new MTPDkeyboardButtonRequestPhone(); setData(v); v->vtext.read(from, end); } break; case mtpc_keyboardButtonRequestGeoLocation: _type = cons; { auto v = new MTPDkeyboardButtonRequestGeoLocation(); setData(v); v->vtext.read(from, end); } break; case mtpc_keyboardButtonSwitchInline: _type = cons; { auto v = new MTPDkeyboardButtonSwitchInline(); setData(v); v->vflags.read(from, end); v->vtext.read(from, end); v->vquery.read(from, end); } break; case mtpc_keyboardButtonGame: _type = cons; { auto v = new MTPDkeyboardButtonGame(); setData(v); v->vtext.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPkeyboardButton"); } } inline void MTPkeyboardButton::write(mtpBuffer &to) const { switch (_type) { case mtpc_keyboardButton: { auto &v = c_keyboardButton(); v.vtext.write(to); } break; case mtpc_keyboardButtonUrl: { auto &v = c_keyboardButtonUrl(); v.vtext.write(to); v.vurl.write(to); } break; case mtpc_keyboardButtonCallback: { auto &v = c_keyboardButtonCallback(); v.vtext.write(to); v.vdata.write(to); } break; case mtpc_keyboardButtonRequestPhone: { auto &v = c_keyboardButtonRequestPhone(); v.vtext.write(to); } break; case mtpc_keyboardButtonRequestGeoLocation: { auto &v = c_keyboardButtonRequestGeoLocation(); v.vtext.write(to); } break; case mtpc_keyboardButtonSwitchInline: { auto &v = c_keyboardButtonSwitchInline(); v.vflags.write(to); v.vtext.write(to); v.vquery.write(to); } break; case mtpc_keyboardButtonGame: { auto &v = c_keyboardButtonGame(); v.vtext.write(to); } break; } } inline MTPkeyboardButton::MTPkeyboardButton(mtpTypeId type) : _type(type) { switch (type) { case mtpc_keyboardButton: setData(new MTPDkeyboardButton()); break; case mtpc_keyboardButtonUrl: setData(new MTPDkeyboardButtonUrl()); break; case mtpc_keyboardButtonCallback: setData(new MTPDkeyboardButtonCallback()); break; case mtpc_keyboardButtonRequestPhone: setData(new MTPDkeyboardButtonRequestPhone()); break; case mtpc_keyboardButtonRequestGeoLocation: setData(new MTPDkeyboardButtonRequestGeoLocation()); break; case mtpc_keyboardButtonSwitchInline: setData(new MTPDkeyboardButtonSwitchInline()); break; case mtpc_keyboardButtonGame: setData(new MTPDkeyboardButtonGame()); break; default: throw mtpErrorBadTypeId(type, "MTPkeyboardButton"); } } inline const MTPDkeyboardButton &MTPkeyboardButton::c_keyboardButton() const { t_assert(_type == mtpc_keyboardButton); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButton *data) : TypeDataOwner(data), _type(mtpc_keyboardButton) { } inline const MTPDkeyboardButtonUrl &MTPkeyboardButton::c_keyboardButtonUrl() const { t_assert(_type == mtpc_keyboardButtonUrl); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButtonUrl *data) : TypeDataOwner(data), _type(mtpc_keyboardButtonUrl) { } inline const MTPDkeyboardButtonCallback &MTPkeyboardButton::c_keyboardButtonCallback() const { t_assert(_type == mtpc_keyboardButtonCallback); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButtonCallback *data) : TypeDataOwner(data), _type(mtpc_keyboardButtonCallback) { } inline const MTPDkeyboardButtonRequestPhone &MTPkeyboardButton::c_keyboardButtonRequestPhone() const { t_assert(_type == mtpc_keyboardButtonRequestPhone); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButtonRequestPhone *data) : TypeDataOwner(data), _type(mtpc_keyboardButtonRequestPhone) { } inline const MTPDkeyboardButtonRequestGeoLocation &MTPkeyboardButton::c_keyboardButtonRequestGeoLocation() const { t_assert(_type == mtpc_keyboardButtonRequestGeoLocation); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButtonRequestGeoLocation *data) : TypeDataOwner(data), _type(mtpc_keyboardButtonRequestGeoLocation) { } inline const MTPDkeyboardButtonSwitchInline &MTPkeyboardButton::c_keyboardButtonSwitchInline() const { t_assert(_type == mtpc_keyboardButtonSwitchInline); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButtonSwitchInline *data) : TypeDataOwner(data), _type(mtpc_keyboardButtonSwitchInline) { } inline const MTPDkeyboardButtonGame &MTPkeyboardButton::c_keyboardButtonGame() const { t_assert(_type == mtpc_keyboardButtonGame); return queryData(); } inline MTPkeyboardButton::MTPkeyboardButton(const MTPDkeyboardButtonGame *data) : TypeDataOwner(data), _type(mtpc_keyboardButtonGame) { } inline MTPkeyboardButton MTP_keyboardButton(const MTPstring &_text) { return MTP::internal::TypeCreator::new_keyboardButton(_text); } inline MTPkeyboardButton MTP_keyboardButtonUrl(const MTPstring &_text, const MTPstring &_url) { return MTP::internal::TypeCreator::new_keyboardButtonUrl(_text, _url); } inline MTPkeyboardButton MTP_keyboardButtonCallback(const MTPstring &_text, const MTPbytes &_data) { return MTP::internal::TypeCreator::new_keyboardButtonCallback(_text, _data); } inline MTPkeyboardButton MTP_keyboardButtonRequestPhone(const MTPstring &_text) { return MTP::internal::TypeCreator::new_keyboardButtonRequestPhone(_text); } inline MTPkeyboardButton MTP_keyboardButtonRequestGeoLocation(const MTPstring &_text) { return MTP::internal::TypeCreator::new_keyboardButtonRequestGeoLocation(_text); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDkeyboardButtonSwitchInline::Flags) inline MTPkeyboardButton MTP_keyboardButtonSwitchInline(const MTPflags &_flags, const MTPstring &_text, const MTPstring &_query) { return MTP::internal::TypeCreator::new_keyboardButtonSwitchInline(_flags, _text, _query); } inline MTPkeyboardButton MTP_keyboardButtonGame(const MTPstring &_text) { return MTP::internal::TypeCreator::new_keyboardButtonGame(_text); } inline MTPkeyboardButtonRow::MTPkeyboardButtonRow() : TypeDataOwner(new MTPDkeyboardButtonRow()) { } inline uint32 MTPkeyboardButtonRow::innerLength() const { const MTPDkeyboardButtonRow &v(c_keyboardButtonRow()); return v.vbuttons.innerLength(); } inline mtpTypeId MTPkeyboardButtonRow::type() const { return mtpc_keyboardButtonRow; } inline void MTPkeyboardButtonRow::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_keyboardButtonRow) throw mtpErrorUnexpected(cons, "MTPkeyboardButtonRow"); auto v = new MTPDkeyboardButtonRow(); setData(v); v->vbuttons.read(from, end); } inline void MTPkeyboardButtonRow::write(mtpBuffer &to) const { auto &v = c_keyboardButtonRow(); v.vbuttons.write(to); } inline const MTPDkeyboardButtonRow &MTPkeyboardButtonRow::c_keyboardButtonRow() const { return queryData(); } inline MTPkeyboardButtonRow::MTPkeyboardButtonRow(const MTPDkeyboardButtonRow *data) : TypeDataOwner(data) { } inline MTPkeyboardButtonRow MTP_keyboardButtonRow(const MTPVector &_buttons) { return MTP::internal::TypeCreator::new_keyboardButtonRow(_buttons); } inline uint32 MTPreplyMarkup::innerLength() const { switch (_type) { case mtpc_replyKeyboardHide: { const MTPDreplyKeyboardHide &v(c_replyKeyboardHide()); return v.vflags.innerLength(); } case mtpc_replyKeyboardForceReply: { const MTPDreplyKeyboardForceReply &v(c_replyKeyboardForceReply()); return v.vflags.innerLength(); } case mtpc_replyKeyboardMarkup: { const MTPDreplyKeyboardMarkup &v(c_replyKeyboardMarkup()); return v.vflags.innerLength() + v.vrows.innerLength(); } case mtpc_replyInlineMarkup: { const MTPDreplyInlineMarkup &v(c_replyInlineMarkup()); return v.vrows.innerLength(); } } return 0; } inline mtpTypeId MTPreplyMarkup::type() const { t_assert(_type != 0); return _type; } inline void MTPreplyMarkup::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_replyKeyboardHide: _type = cons; { auto v = new MTPDreplyKeyboardHide(); setData(v); v->vflags.read(from, end); } break; case mtpc_replyKeyboardForceReply: _type = cons; { auto v = new MTPDreplyKeyboardForceReply(); setData(v); v->vflags.read(from, end); } break; case mtpc_replyKeyboardMarkup: _type = cons; { auto v = new MTPDreplyKeyboardMarkup(); setData(v); v->vflags.read(from, end); v->vrows.read(from, end); } break; case mtpc_replyInlineMarkup: _type = cons; { auto v = new MTPDreplyInlineMarkup(); setData(v); v->vrows.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPreplyMarkup"); } } inline void MTPreplyMarkup::write(mtpBuffer &to) const { switch (_type) { case mtpc_replyKeyboardHide: { auto &v = c_replyKeyboardHide(); v.vflags.write(to); } break; case mtpc_replyKeyboardForceReply: { auto &v = c_replyKeyboardForceReply(); v.vflags.write(to); } break; case mtpc_replyKeyboardMarkup: { auto &v = c_replyKeyboardMarkup(); v.vflags.write(to); v.vrows.write(to); } break; case mtpc_replyInlineMarkup: { auto &v = c_replyInlineMarkup(); v.vrows.write(to); } break; } } inline MTPreplyMarkup::MTPreplyMarkup(mtpTypeId type) : _type(type) { switch (type) { case mtpc_replyKeyboardHide: setData(new MTPDreplyKeyboardHide()); break; case mtpc_replyKeyboardForceReply: setData(new MTPDreplyKeyboardForceReply()); break; case mtpc_replyKeyboardMarkup: setData(new MTPDreplyKeyboardMarkup()); break; case mtpc_replyInlineMarkup: setData(new MTPDreplyInlineMarkup()); break; default: throw mtpErrorBadTypeId(type, "MTPreplyMarkup"); } } inline const MTPDreplyKeyboardHide &MTPreplyMarkup::c_replyKeyboardHide() const { t_assert(_type == mtpc_replyKeyboardHide); return queryData(); } inline MTPreplyMarkup::MTPreplyMarkup(const MTPDreplyKeyboardHide *data) : TypeDataOwner(data), _type(mtpc_replyKeyboardHide) { } inline const MTPDreplyKeyboardForceReply &MTPreplyMarkup::c_replyKeyboardForceReply() const { t_assert(_type == mtpc_replyKeyboardForceReply); return queryData(); } inline MTPreplyMarkup::MTPreplyMarkup(const MTPDreplyKeyboardForceReply *data) : TypeDataOwner(data), _type(mtpc_replyKeyboardForceReply) { } inline const MTPDreplyKeyboardMarkup &MTPreplyMarkup::c_replyKeyboardMarkup() const { t_assert(_type == mtpc_replyKeyboardMarkup); return queryData(); } inline MTPreplyMarkup::MTPreplyMarkup(const MTPDreplyKeyboardMarkup *data) : TypeDataOwner(data), _type(mtpc_replyKeyboardMarkup) { } inline const MTPDreplyInlineMarkup &MTPreplyMarkup::c_replyInlineMarkup() const { t_assert(_type == mtpc_replyInlineMarkup); return queryData(); } inline MTPreplyMarkup::MTPreplyMarkup(const MTPDreplyInlineMarkup *data) : TypeDataOwner(data), _type(mtpc_replyInlineMarkup) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDreplyKeyboardHide::Flags) inline MTPreplyMarkup MTP_replyKeyboardHide(const MTPflags &_flags) { return MTP::internal::TypeCreator::new_replyKeyboardHide(_flags); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDreplyKeyboardForceReply::Flags) inline MTPreplyMarkup MTP_replyKeyboardForceReply(const MTPflags &_flags) { return MTP::internal::TypeCreator::new_replyKeyboardForceReply(_flags); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDreplyKeyboardMarkup::Flags) inline MTPreplyMarkup MTP_replyKeyboardMarkup(const MTPflags &_flags, const MTPVector &_rows) { return MTP::internal::TypeCreator::new_replyKeyboardMarkup(_flags, _rows); } inline MTPreplyMarkup MTP_replyInlineMarkup(const MTPVector &_rows) { return MTP::internal::TypeCreator::new_replyInlineMarkup(_rows); } inline uint32 MTPhelp_appChangelog::innerLength() const { switch (_type) { case mtpc_help_appChangelog: { const MTPDhelp_appChangelog &v(c_help_appChangelog()); return v.vmessage.innerLength() + v.vmedia.innerLength() + v.ventities.innerLength(); } } return 0; } inline mtpTypeId MTPhelp_appChangelog::type() const { t_assert(_type != 0); return _type; } inline void MTPhelp_appChangelog::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_help_appChangelogEmpty: _type = cons; break; case mtpc_help_appChangelog: _type = cons; { auto v = new MTPDhelp_appChangelog(); setData(v); v->vmessage.read(from, end); v->vmedia.read(from, end); v->ventities.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPhelp_appChangelog"); } } inline void MTPhelp_appChangelog::write(mtpBuffer &to) const { switch (_type) { case mtpc_help_appChangelog: { auto &v = c_help_appChangelog(); v.vmessage.write(to); v.vmedia.write(to); v.ventities.write(to); } break; } } inline MTPhelp_appChangelog::MTPhelp_appChangelog(mtpTypeId type) : _type(type) { switch (type) { case mtpc_help_appChangelogEmpty: break; case mtpc_help_appChangelog: setData(new MTPDhelp_appChangelog()); break; default: throw mtpErrorBadTypeId(type, "MTPhelp_appChangelog"); } } inline const MTPDhelp_appChangelog &MTPhelp_appChangelog::c_help_appChangelog() const { t_assert(_type == mtpc_help_appChangelog); return queryData(); } inline MTPhelp_appChangelog::MTPhelp_appChangelog(const MTPDhelp_appChangelog *data) : TypeDataOwner(data), _type(mtpc_help_appChangelog) { } inline MTPhelp_appChangelog MTP_help_appChangelogEmpty() { return MTP::internal::TypeCreator::new_help_appChangelogEmpty(); } inline MTPhelp_appChangelog MTP_help_appChangelog(const MTPstring &_message, const MTPMessageMedia &_media, const MTPVector &_entities) { return MTP::internal::TypeCreator::new_help_appChangelog(_message, _media, _entities); } inline uint32 MTPmessageEntity::innerLength() const { switch (_type) { case mtpc_messageEntityUnknown: { const MTPDmessageEntityUnknown &v(c_messageEntityUnknown()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityMention: { const MTPDmessageEntityMention &v(c_messageEntityMention()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityHashtag: { const MTPDmessageEntityHashtag &v(c_messageEntityHashtag()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityBotCommand: { const MTPDmessageEntityBotCommand &v(c_messageEntityBotCommand()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityUrl: { const MTPDmessageEntityUrl &v(c_messageEntityUrl()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityEmail: { const MTPDmessageEntityEmail &v(c_messageEntityEmail()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityBold: { const MTPDmessageEntityBold &v(c_messageEntityBold()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityItalic: { const MTPDmessageEntityItalic &v(c_messageEntityItalic()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityCode: { const MTPDmessageEntityCode &v(c_messageEntityCode()); return v.voffset.innerLength() + v.vlength.innerLength(); } case mtpc_messageEntityPre: { const MTPDmessageEntityPre &v(c_messageEntityPre()); return v.voffset.innerLength() + v.vlength.innerLength() + v.vlanguage.innerLength(); } case mtpc_messageEntityTextUrl: { const MTPDmessageEntityTextUrl &v(c_messageEntityTextUrl()); return v.voffset.innerLength() + v.vlength.innerLength() + v.vurl.innerLength(); } case mtpc_messageEntityMentionName: { const MTPDmessageEntityMentionName &v(c_messageEntityMentionName()); return v.voffset.innerLength() + v.vlength.innerLength() + v.vuser_id.innerLength(); } case mtpc_inputMessageEntityMentionName: { const MTPDinputMessageEntityMentionName &v(c_inputMessageEntityMentionName()); return v.voffset.innerLength() + v.vlength.innerLength() + v.vuser_id.innerLength(); } } return 0; } inline mtpTypeId MTPmessageEntity::type() const { t_assert(_type != 0); return _type; } inline void MTPmessageEntity::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messageEntityUnknown: _type = cons; { auto v = new MTPDmessageEntityUnknown(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityMention: _type = cons; { auto v = new MTPDmessageEntityMention(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityHashtag: _type = cons; { auto v = new MTPDmessageEntityHashtag(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityBotCommand: _type = cons; { auto v = new MTPDmessageEntityBotCommand(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityUrl: _type = cons; { auto v = new MTPDmessageEntityUrl(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityEmail: _type = cons; { auto v = new MTPDmessageEntityEmail(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityBold: _type = cons; { auto v = new MTPDmessageEntityBold(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityItalic: _type = cons; { auto v = new MTPDmessageEntityItalic(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityCode: _type = cons; { auto v = new MTPDmessageEntityCode(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); } break; case mtpc_messageEntityPre: _type = cons; { auto v = new MTPDmessageEntityPre(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); v->vlanguage.read(from, end); } break; case mtpc_messageEntityTextUrl: _type = cons; { auto v = new MTPDmessageEntityTextUrl(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); v->vurl.read(from, end); } break; case mtpc_messageEntityMentionName: _type = cons; { auto v = new MTPDmessageEntityMentionName(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); v->vuser_id.read(from, end); } break; case mtpc_inputMessageEntityMentionName: _type = cons; { auto v = new MTPDinputMessageEntityMentionName(); setData(v); v->voffset.read(from, end); v->vlength.read(from, end); v->vuser_id.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessageEntity"); } } inline void MTPmessageEntity::write(mtpBuffer &to) const { switch (_type) { case mtpc_messageEntityUnknown: { auto &v = c_messageEntityUnknown(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityMention: { auto &v = c_messageEntityMention(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityHashtag: { auto &v = c_messageEntityHashtag(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityBotCommand: { auto &v = c_messageEntityBotCommand(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityUrl: { auto &v = c_messageEntityUrl(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityEmail: { auto &v = c_messageEntityEmail(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityBold: { auto &v = c_messageEntityBold(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityItalic: { auto &v = c_messageEntityItalic(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityCode: { auto &v = c_messageEntityCode(); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityPre: { auto &v = c_messageEntityPre(); v.voffset.write(to); v.vlength.write(to); v.vlanguage.write(to); } break; case mtpc_messageEntityTextUrl: { auto &v = c_messageEntityTextUrl(); v.voffset.write(to); v.vlength.write(to); v.vurl.write(to); } break; case mtpc_messageEntityMentionName: { auto &v = c_messageEntityMentionName(); v.voffset.write(to); v.vlength.write(to); v.vuser_id.write(to); } break; case mtpc_inputMessageEntityMentionName: { auto &v = c_inputMessageEntityMentionName(); v.voffset.write(to); v.vlength.write(to); v.vuser_id.write(to); } break; } } inline MTPmessageEntity::MTPmessageEntity(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messageEntityUnknown: setData(new MTPDmessageEntityUnknown()); break; case mtpc_messageEntityMention: setData(new MTPDmessageEntityMention()); break; case mtpc_messageEntityHashtag: setData(new MTPDmessageEntityHashtag()); break; case mtpc_messageEntityBotCommand: setData(new MTPDmessageEntityBotCommand()); break; case mtpc_messageEntityUrl: setData(new MTPDmessageEntityUrl()); break; case mtpc_messageEntityEmail: setData(new MTPDmessageEntityEmail()); break; case mtpc_messageEntityBold: setData(new MTPDmessageEntityBold()); break; case mtpc_messageEntityItalic: setData(new MTPDmessageEntityItalic()); break; case mtpc_messageEntityCode: setData(new MTPDmessageEntityCode()); break; case mtpc_messageEntityPre: setData(new MTPDmessageEntityPre()); break; case mtpc_messageEntityTextUrl: setData(new MTPDmessageEntityTextUrl()); break; case mtpc_messageEntityMentionName: setData(new MTPDmessageEntityMentionName()); break; case mtpc_inputMessageEntityMentionName: setData(new MTPDinputMessageEntityMentionName()); break; default: throw mtpErrorBadTypeId(type, "MTPmessageEntity"); } } inline const MTPDmessageEntityUnknown &MTPmessageEntity::c_messageEntityUnknown() const { t_assert(_type == mtpc_messageEntityUnknown); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityUnknown *data) : TypeDataOwner(data), _type(mtpc_messageEntityUnknown) { } inline const MTPDmessageEntityMention &MTPmessageEntity::c_messageEntityMention() const { t_assert(_type == mtpc_messageEntityMention); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityMention *data) : TypeDataOwner(data), _type(mtpc_messageEntityMention) { } inline const MTPDmessageEntityHashtag &MTPmessageEntity::c_messageEntityHashtag() const { t_assert(_type == mtpc_messageEntityHashtag); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityHashtag *data) : TypeDataOwner(data), _type(mtpc_messageEntityHashtag) { } inline const MTPDmessageEntityBotCommand &MTPmessageEntity::c_messageEntityBotCommand() const { t_assert(_type == mtpc_messageEntityBotCommand); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityBotCommand *data) : TypeDataOwner(data), _type(mtpc_messageEntityBotCommand) { } inline const MTPDmessageEntityUrl &MTPmessageEntity::c_messageEntityUrl() const { t_assert(_type == mtpc_messageEntityUrl); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityUrl *data) : TypeDataOwner(data), _type(mtpc_messageEntityUrl) { } inline const MTPDmessageEntityEmail &MTPmessageEntity::c_messageEntityEmail() const { t_assert(_type == mtpc_messageEntityEmail); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityEmail *data) : TypeDataOwner(data), _type(mtpc_messageEntityEmail) { } inline const MTPDmessageEntityBold &MTPmessageEntity::c_messageEntityBold() const { t_assert(_type == mtpc_messageEntityBold); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityBold *data) : TypeDataOwner(data), _type(mtpc_messageEntityBold) { } inline const MTPDmessageEntityItalic &MTPmessageEntity::c_messageEntityItalic() const { t_assert(_type == mtpc_messageEntityItalic); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityItalic *data) : TypeDataOwner(data), _type(mtpc_messageEntityItalic) { } inline const MTPDmessageEntityCode &MTPmessageEntity::c_messageEntityCode() const { t_assert(_type == mtpc_messageEntityCode); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityCode *data) : TypeDataOwner(data), _type(mtpc_messageEntityCode) { } inline const MTPDmessageEntityPre &MTPmessageEntity::c_messageEntityPre() const { t_assert(_type == mtpc_messageEntityPre); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityPre *data) : TypeDataOwner(data), _type(mtpc_messageEntityPre) { } inline const MTPDmessageEntityTextUrl &MTPmessageEntity::c_messageEntityTextUrl() const { t_assert(_type == mtpc_messageEntityTextUrl); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityTextUrl *data) : TypeDataOwner(data), _type(mtpc_messageEntityTextUrl) { } inline const MTPDmessageEntityMentionName &MTPmessageEntity::c_messageEntityMentionName() const { t_assert(_type == mtpc_messageEntityMentionName); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDmessageEntityMentionName *data) : TypeDataOwner(data), _type(mtpc_messageEntityMentionName) { } inline const MTPDinputMessageEntityMentionName &MTPmessageEntity::c_inputMessageEntityMentionName() const { t_assert(_type == mtpc_inputMessageEntityMentionName); return queryData(); } inline MTPmessageEntity::MTPmessageEntity(const MTPDinputMessageEntityMentionName *data) : TypeDataOwner(data), _type(mtpc_inputMessageEntityMentionName) { } inline MTPmessageEntity MTP_messageEntityUnknown(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityUnknown(_offset, _length); } inline MTPmessageEntity MTP_messageEntityMention(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityMention(_offset, _length); } inline MTPmessageEntity MTP_messageEntityHashtag(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityHashtag(_offset, _length); } inline MTPmessageEntity MTP_messageEntityBotCommand(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityBotCommand(_offset, _length); } inline MTPmessageEntity MTP_messageEntityUrl(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityUrl(_offset, _length); } inline MTPmessageEntity MTP_messageEntityEmail(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityEmail(_offset, _length); } inline MTPmessageEntity MTP_messageEntityBold(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityBold(_offset, _length); } inline MTPmessageEntity MTP_messageEntityItalic(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityItalic(_offset, _length); } inline MTPmessageEntity MTP_messageEntityCode(MTPint _offset, MTPint _length) { return MTP::internal::TypeCreator::new_messageEntityCode(_offset, _length); } inline MTPmessageEntity MTP_messageEntityPre(MTPint _offset, MTPint _length, const MTPstring &_language) { return MTP::internal::TypeCreator::new_messageEntityPre(_offset, _length, _language); } inline MTPmessageEntity MTP_messageEntityTextUrl(MTPint _offset, MTPint _length, const MTPstring &_url) { return MTP::internal::TypeCreator::new_messageEntityTextUrl(_offset, _length, _url); } inline MTPmessageEntity MTP_messageEntityMentionName(MTPint _offset, MTPint _length, MTPint _user_id) { return MTP::internal::TypeCreator::new_messageEntityMentionName(_offset, _length, _user_id); } inline MTPmessageEntity MTP_inputMessageEntityMentionName(MTPint _offset, MTPint _length, const MTPInputUser &_user_id) { return MTP::internal::TypeCreator::new_inputMessageEntityMentionName(_offset, _length, _user_id); } inline uint32 MTPinputChannel::innerLength() const { switch (_type) { case mtpc_inputChannel: { const MTPDinputChannel &v(c_inputChannel()); return v.vchannel_id.innerLength() + v.vaccess_hash.innerLength(); } } return 0; } inline mtpTypeId MTPinputChannel::type() const { t_assert(_type != 0); return _type; } inline void MTPinputChannel::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputChannelEmpty: _type = cons; break; case mtpc_inputChannel: _type = cons; { auto v = new MTPDinputChannel(); setData(v); v->vchannel_id.read(from, end); v->vaccess_hash.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputChannel"); } } inline void MTPinputChannel::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputChannel: { auto &v = c_inputChannel(); v.vchannel_id.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputChannel::MTPinputChannel(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputChannelEmpty: break; case mtpc_inputChannel: setData(new MTPDinputChannel()); break; default: throw mtpErrorBadTypeId(type, "MTPinputChannel"); } } inline const MTPDinputChannel &MTPinputChannel::c_inputChannel() const { t_assert(_type == mtpc_inputChannel); return queryData(); } inline MTPinputChannel::MTPinputChannel(const MTPDinputChannel *data) : TypeDataOwner(data), _type(mtpc_inputChannel) { } inline MTPinputChannel MTP_inputChannelEmpty() { return MTP::internal::TypeCreator::new_inputChannelEmpty(); } inline MTPinputChannel MTP_inputChannel(MTPint _channel_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputChannel(_channel_id, _access_hash); } inline MTPcontacts_resolvedPeer::MTPcontacts_resolvedPeer() : TypeDataOwner(new MTPDcontacts_resolvedPeer()) { } inline uint32 MTPcontacts_resolvedPeer::innerLength() const { const MTPDcontacts_resolvedPeer &v(c_contacts_resolvedPeer()); return v.vpeer.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPcontacts_resolvedPeer::type() const { return mtpc_contacts_resolvedPeer; } inline void MTPcontacts_resolvedPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_contacts_resolvedPeer) throw mtpErrorUnexpected(cons, "MTPcontacts_resolvedPeer"); auto v = new MTPDcontacts_resolvedPeer(); setData(v); v->vpeer.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } inline void MTPcontacts_resolvedPeer::write(mtpBuffer &to) const { auto &v = c_contacts_resolvedPeer(); v.vpeer.write(to); v.vchats.write(to); v.vusers.write(to); } inline const MTPDcontacts_resolvedPeer &MTPcontacts_resolvedPeer::c_contacts_resolvedPeer() const { return queryData(); } inline MTPcontacts_resolvedPeer::MTPcontacts_resolvedPeer(const MTPDcontacts_resolvedPeer *data) : TypeDataOwner(data) { } inline MTPcontacts_resolvedPeer MTP_contacts_resolvedPeer(const MTPPeer &_peer, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_resolvedPeer(_peer, _chats, _users); } inline MTPmessageRange::MTPmessageRange() : TypeDataOwner(new MTPDmessageRange()) { } inline uint32 MTPmessageRange::innerLength() const { const MTPDmessageRange &v(c_messageRange()); return v.vmin_id.innerLength() + v.vmax_id.innerLength(); } inline mtpTypeId MTPmessageRange::type() const { return mtpc_messageRange; } inline void MTPmessageRange::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messageRange) throw mtpErrorUnexpected(cons, "MTPmessageRange"); auto v = new MTPDmessageRange(); setData(v); v->vmin_id.read(from, end); v->vmax_id.read(from, end); } inline void MTPmessageRange::write(mtpBuffer &to) const { auto &v = c_messageRange(); v.vmin_id.write(to); v.vmax_id.write(to); } inline const MTPDmessageRange &MTPmessageRange::c_messageRange() const { return queryData(); } inline MTPmessageRange::MTPmessageRange(const MTPDmessageRange *data) : TypeDataOwner(data) { } inline MTPmessageRange MTP_messageRange(MTPint _min_id, MTPint _max_id) { return MTP::internal::TypeCreator::new_messageRange(_min_id, _max_id); } inline uint32 MTPupdates_channelDifference::innerLength() const { switch (_type) { case mtpc_updates_channelDifferenceEmpty: { const MTPDupdates_channelDifferenceEmpty &v(c_updates_channelDifferenceEmpty()); return v.vflags.innerLength() + v.vpts.innerLength() + (v.has_timeout() ? v.vtimeout.innerLength() : 0); } case mtpc_updates_channelDifferenceTooLong: { const MTPDupdates_channelDifferenceTooLong &v(c_updates_channelDifferenceTooLong()); return v.vflags.innerLength() + v.vpts.innerLength() + (v.has_timeout() ? v.vtimeout.innerLength() : 0) + v.vtop_message.innerLength() + v.vread_inbox_max_id.innerLength() + v.vread_outbox_max_id.innerLength() + v.vunread_count.innerLength() + v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } case mtpc_updates_channelDifference: { const MTPDupdates_channelDifference &v(c_updates_channelDifference()); return v.vflags.innerLength() + v.vpts.innerLength() + (v.has_timeout() ? v.vtimeout.innerLength() : 0) + v.vnew_messages.innerLength() + v.vother_updates.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPupdates_channelDifference::type() const { t_assert(_type != 0); return _type; } inline void MTPupdates_channelDifference::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_updates_channelDifferenceEmpty: _type = cons; { auto v = new MTPDupdates_channelDifferenceEmpty(); setData(v); v->vflags.read(from, end); v->vpts.read(from, end); if (v->has_timeout()) { v->vtimeout.read(from, end); } else { v->vtimeout = MTPint(); } } break; case mtpc_updates_channelDifferenceTooLong: _type = cons; { auto v = new MTPDupdates_channelDifferenceTooLong(); setData(v); v->vflags.read(from, end); v->vpts.read(from, end); if (v->has_timeout()) { v->vtimeout.read(from, end); } else { v->vtimeout = MTPint(); } v->vtop_message.read(from, end); v->vread_inbox_max_id.read(from, end); v->vread_outbox_max_id.read(from, end); v->vunread_count.read(from, end); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; case mtpc_updates_channelDifference: _type = cons; { auto v = new MTPDupdates_channelDifference(); setData(v); v->vflags.read(from, end); v->vpts.read(from, end); if (v->has_timeout()) { v->vtimeout.read(from, end); } else { v->vtimeout = MTPint(); } v->vnew_messages.read(from, end); v->vother_updates.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPupdates_channelDifference"); } } inline void MTPupdates_channelDifference::write(mtpBuffer &to) const { switch (_type) { case mtpc_updates_channelDifferenceEmpty: { auto &v = c_updates_channelDifferenceEmpty(); v.vflags.write(to); v.vpts.write(to); if (v.has_timeout()) v.vtimeout.write(to); } break; case mtpc_updates_channelDifferenceTooLong: { auto &v = c_updates_channelDifferenceTooLong(); v.vflags.write(to); v.vpts.write(to); if (v.has_timeout()) v.vtimeout.write(to); v.vtop_message.write(to); v.vread_inbox_max_id.write(to); v.vread_outbox_max_id.write(to); v.vunread_count.write(to); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; case mtpc_updates_channelDifference: { auto &v = c_updates_channelDifference(); v.vflags.write(to); v.vpts.write(to); if (v.has_timeout()) v.vtimeout.write(to); v.vnew_messages.write(to); v.vother_updates.write(to); v.vchats.write(to); v.vusers.write(to); } break; } } inline MTPupdates_channelDifference::MTPupdates_channelDifference(mtpTypeId type) : _type(type) { switch (type) { case mtpc_updates_channelDifferenceEmpty: setData(new MTPDupdates_channelDifferenceEmpty()); break; case mtpc_updates_channelDifferenceTooLong: setData(new MTPDupdates_channelDifferenceTooLong()); break; case mtpc_updates_channelDifference: setData(new MTPDupdates_channelDifference()); break; default: throw mtpErrorBadTypeId(type, "MTPupdates_channelDifference"); } } inline const MTPDupdates_channelDifferenceEmpty &MTPupdates_channelDifference::c_updates_channelDifferenceEmpty() const { t_assert(_type == mtpc_updates_channelDifferenceEmpty); return queryData(); } inline MTPupdates_channelDifference::MTPupdates_channelDifference(const MTPDupdates_channelDifferenceEmpty *data) : TypeDataOwner(data), _type(mtpc_updates_channelDifferenceEmpty) { } inline const MTPDupdates_channelDifferenceTooLong &MTPupdates_channelDifference::c_updates_channelDifferenceTooLong() const { t_assert(_type == mtpc_updates_channelDifferenceTooLong); return queryData(); } inline MTPupdates_channelDifference::MTPupdates_channelDifference(const MTPDupdates_channelDifferenceTooLong *data) : TypeDataOwner(data), _type(mtpc_updates_channelDifferenceTooLong) { } inline const MTPDupdates_channelDifference &MTPupdates_channelDifference::c_updates_channelDifference() const { t_assert(_type == mtpc_updates_channelDifference); return queryData(); } inline MTPupdates_channelDifference::MTPupdates_channelDifference(const MTPDupdates_channelDifference *data) : TypeDataOwner(data), _type(mtpc_updates_channelDifference) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdates_channelDifferenceEmpty::Flags) inline MTPupdates_channelDifference MTP_updates_channelDifferenceEmpty(const MTPflags &_flags, MTPint _pts, MTPint _timeout) { return MTP::internal::TypeCreator::new_updates_channelDifferenceEmpty(_flags, _pts, _timeout); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdates_channelDifferenceTooLong::Flags) inline MTPupdates_channelDifference MTP_updates_channelDifferenceTooLong(const MTPflags &_flags, MTPint _pts, MTPint _timeout, MTPint _top_message, MTPint _read_inbox_max_id, MTPint _read_outbox_max_id, MTPint _unread_count, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_updates_channelDifferenceTooLong(_flags, _pts, _timeout, _top_message, _read_inbox_max_id, _read_outbox_max_id, _unread_count, _messages, _chats, _users); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDupdates_channelDifference::Flags) inline MTPupdates_channelDifference MTP_updates_channelDifference(const MTPflags &_flags, MTPint _pts, MTPint _timeout, const MTPVector &_new_messages, const MTPVector &_other_updates, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_updates_channelDifference(_flags, _pts, _timeout, _new_messages, _other_updates, _chats, _users); } inline uint32 MTPchannelMessagesFilter::innerLength() const { switch (_type) { case mtpc_channelMessagesFilter: { const MTPDchannelMessagesFilter &v(c_channelMessagesFilter()); return v.vflags.innerLength() + v.vranges.innerLength(); } } return 0; } inline mtpTypeId MTPchannelMessagesFilter::type() const { t_assert(_type != 0); return _type; } inline void MTPchannelMessagesFilter::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_channelMessagesFilterEmpty: _type = cons; break; case mtpc_channelMessagesFilter: _type = cons; { auto v = new MTPDchannelMessagesFilter(); setData(v); v->vflags.read(from, end); v->vranges.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchannelMessagesFilter"); } } inline void MTPchannelMessagesFilter::write(mtpBuffer &to) const { switch (_type) { case mtpc_channelMessagesFilter: { auto &v = c_channelMessagesFilter(); v.vflags.write(to); v.vranges.write(to); } break; } } inline MTPchannelMessagesFilter::MTPchannelMessagesFilter(mtpTypeId type) : _type(type) { switch (type) { case mtpc_channelMessagesFilterEmpty: break; case mtpc_channelMessagesFilter: setData(new MTPDchannelMessagesFilter()); break; default: throw mtpErrorBadTypeId(type, "MTPchannelMessagesFilter"); } } inline const MTPDchannelMessagesFilter &MTPchannelMessagesFilter::c_channelMessagesFilter() const { t_assert(_type == mtpc_channelMessagesFilter); return queryData(); } inline MTPchannelMessagesFilter::MTPchannelMessagesFilter(const MTPDchannelMessagesFilter *data) : TypeDataOwner(data), _type(mtpc_channelMessagesFilter) { } inline MTPchannelMessagesFilter MTP_channelMessagesFilterEmpty() { return MTP::internal::TypeCreator::new_channelMessagesFilterEmpty(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDchannelMessagesFilter::Flags) inline MTPchannelMessagesFilter MTP_channelMessagesFilter(const MTPflags &_flags, const MTPVector &_ranges) { return MTP::internal::TypeCreator::new_channelMessagesFilter(_flags, _ranges); } inline uint32 MTPchannelParticipant::innerLength() const { switch (_type) { case mtpc_channelParticipant: { const MTPDchannelParticipant &v(c_channelParticipant()); return v.vuser_id.innerLength() + v.vdate.innerLength(); } case mtpc_channelParticipantSelf: { const MTPDchannelParticipantSelf &v(c_channelParticipantSelf()); return v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vdate.innerLength(); } case mtpc_channelParticipantModerator: { const MTPDchannelParticipantModerator &v(c_channelParticipantModerator()); return v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vdate.innerLength(); } case mtpc_channelParticipantEditor: { const MTPDchannelParticipantEditor &v(c_channelParticipantEditor()); return v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vdate.innerLength(); } case mtpc_channelParticipantKicked: { const MTPDchannelParticipantKicked &v(c_channelParticipantKicked()); return v.vuser_id.innerLength() + v.vkicked_by.innerLength() + v.vdate.innerLength(); } case mtpc_channelParticipantCreator: { const MTPDchannelParticipantCreator &v(c_channelParticipantCreator()); return v.vuser_id.innerLength(); } } return 0; } inline mtpTypeId MTPchannelParticipant::type() const { t_assert(_type != 0); return _type; } inline void MTPchannelParticipant::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_channelParticipant: _type = cons; { auto v = new MTPDchannelParticipant(); setData(v); v->vuser_id.read(from, end); v->vdate.read(from, end); } break; case mtpc_channelParticipantSelf: _type = cons; { auto v = new MTPDchannelParticipantSelf(); setData(v); v->vuser_id.read(from, end); v->vinviter_id.read(from, end); v->vdate.read(from, end); } break; case mtpc_channelParticipantModerator: _type = cons; { auto v = new MTPDchannelParticipantModerator(); setData(v); v->vuser_id.read(from, end); v->vinviter_id.read(from, end); v->vdate.read(from, end); } break; case mtpc_channelParticipantEditor: _type = cons; { auto v = new MTPDchannelParticipantEditor(); setData(v); v->vuser_id.read(from, end); v->vinviter_id.read(from, end); v->vdate.read(from, end); } break; case mtpc_channelParticipantKicked: _type = cons; { auto v = new MTPDchannelParticipantKicked(); setData(v); v->vuser_id.read(from, end); v->vkicked_by.read(from, end); v->vdate.read(from, end); } break; case mtpc_channelParticipantCreator: _type = cons; { auto v = new MTPDchannelParticipantCreator(); setData(v); v->vuser_id.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchannelParticipant"); } } inline void MTPchannelParticipant::write(mtpBuffer &to) const { switch (_type) { case mtpc_channelParticipant: { auto &v = c_channelParticipant(); v.vuser_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantSelf: { auto &v = c_channelParticipantSelf(); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantModerator: { auto &v = c_channelParticipantModerator(); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantEditor: { auto &v = c_channelParticipantEditor(); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantKicked: { auto &v = c_channelParticipantKicked(); v.vuser_id.write(to); v.vkicked_by.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantCreator: { auto &v = c_channelParticipantCreator(); v.vuser_id.write(to); } break; } } inline MTPchannelParticipant::MTPchannelParticipant(mtpTypeId type) : _type(type) { switch (type) { case mtpc_channelParticipant: setData(new MTPDchannelParticipant()); break; case mtpc_channelParticipantSelf: setData(new MTPDchannelParticipantSelf()); break; case mtpc_channelParticipantModerator: setData(new MTPDchannelParticipantModerator()); break; case mtpc_channelParticipantEditor: setData(new MTPDchannelParticipantEditor()); break; case mtpc_channelParticipantKicked: setData(new MTPDchannelParticipantKicked()); break; case mtpc_channelParticipantCreator: setData(new MTPDchannelParticipantCreator()); break; default: throw mtpErrorBadTypeId(type, "MTPchannelParticipant"); } } inline const MTPDchannelParticipant &MTPchannelParticipant::c_channelParticipant() const { t_assert(_type == mtpc_channelParticipant); return queryData(); } inline MTPchannelParticipant::MTPchannelParticipant(const MTPDchannelParticipant *data) : TypeDataOwner(data), _type(mtpc_channelParticipant) { } inline const MTPDchannelParticipantSelf &MTPchannelParticipant::c_channelParticipantSelf() const { t_assert(_type == mtpc_channelParticipantSelf); return queryData(); } inline MTPchannelParticipant::MTPchannelParticipant(const MTPDchannelParticipantSelf *data) : TypeDataOwner(data), _type(mtpc_channelParticipantSelf) { } inline const MTPDchannelParticipantModerator &MTPchannelParticipant::c_channelParticipantModerator() const { t_assert(_type == mtpc_channelParticipantModerator); return queryData(); } inline MTPchannelParticipant::MTPchannelParticipant(const MTPDchannelParticipantModerator *data) : TypeDataOwner(data), _type(mtpc_channelParticipantModerator) { } inline const MTPDchannelParticipantEditor &MTPchannelParticipant::c_channelParticipantEditor() const { t_assert(_type == mtpc_channelParticipantEditor); return queryData(); } inline MTPchannelParticipant::MTPchannelParticipant(const MTPDchannelParticipantEditor *data) : TypeDataOwner(data), _type(mtpc_channelParticipantEditor) { } inline const MTPDchannelParticipantKicked &MTPchannelParticipant::c_channelParticipantKicked() const { t_assert(_type == mtpc_channelParticipantKicked); return queryData(); } inline MTPchannelParticipant::MTPchannelParticipant(const MTPDchannelParticipantKicked *data) : TypeDataOwner(data), _type(mtpc_channelParticipantKicked) { } inline const MTPDchannelParticipantCreator &MTPchannelParticipant::c_channelParticipantCreator() const { t_assert(_type == mtpc_channelParticipantCreator); return queryData(); } inline MTPchannelParticipant::MTPchannelParticipant(const MTPDchannelParticipantCreator *data) : TypeDataOwner(data), _type(mtpc_channelParticipantCreator) { } inline MTPchannelParticipant MTP_channelParticipant(MTPint _user_id, MTPint _date) { return MTP::internal::TypeCreator::new_channelParticipant(_user_id, _date); } inline MTPchannelParticipant MTP_channelParticipantSelf(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTP::internal::TypeCreator::new_channelParticipantSelf(_user_id, _inviter_id, _date); } inline MTPchannelParticipant MTP_channelParticipantModerator(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTP::internal::TypeCreator::new_channelParticipantModerator(_user_id, _inviter_id, _date); } inline MTPchannelParticipant MTP_channelParticipantEditor(MTPint _user_id, MTPint _inviter_id, MTPint _date) { return MTP::internal::TypeCreator::new_channelParticipantEditor(_user_id, _inviter_id, _date); } inline MTPchannelParticipant MTP_channelParticipantKicked(MTPint _user_id, MTPint _kicked_by, MTPint _date) { return MTP::internal::TypeCreator::new_channelParticipantKicked(_user_id, _kicked_by, _date); } inline MTPchannelParticipant MTP_channelParticipantCreator(MTPint _user_id) { return MTP::internal::TypeCreator::new_channelParticipantCreator(_user_id); } inline uint32 MTPchannelParticipantsFilter::innerLength() const { return 0; } inline mtpTypeId MTPchannelParticipantsFilter::type() const { t_assert(_type != 0); return _type; } inline void MTPchannelParticipantsFilter::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_channelParticipantsRecent: _type = cons; break; case mtpc_channelParticipantsAdmins: _type = cons; break; case mtpc_channelParticipantsKicked: _type = cons; break; case mtpc_channelParticipantsBots: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPchannelParticipantsFilter"); } } inline void MTPchannelParticipantsFilter::write(mtpBuffer &to) const { } inline MTPchannelParticipantsFilter::MTPchannelParticipantsFilter(mtpTypeId type) : _type(type) { switch (type) { case mtpc_channelParticipantsRecent: break; case mtpc_channelParticipantsAdmins: break; case mtpc_channelParticipantsKicked: break; case mtpc_channelParticipantsBots: break; default: throw mtpErrorBadTypeId(type, "MTPchannelParticipantsFilter"); } } inline MTPchannelParticipantsFilter MTP_channelParticipantsRecent() { return MTP::internal::TypeCreator::new_channelParticipantsRecent(); } inline MTPchannelParticipantsFilter MTP_channelParticipantsAdmins() { return MTP::internal::TypeCreator::new_channelParticipantsAdmins(); } inline MTPchannelParticipantsFilter MTP_channelParticipantsKicked() { return MTP::internal::TypeCreator::new_channelParticipantsKicked(); } inline MTPchannelParticipantsFilter MTP_channelParticipantsBots() { return MTP::internal::TypeCreator::new_channelParticipantsBots(); } inline uint32 MTPchannelParticipantRole::innerLength() const { return 0; } inline mtpTypeId MTPchannelParticipantRole::type() const { t_assert(_type != 0); return _type; } inline void MTPchannelParticipantRole::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_channelRoleEmpty: _type = cons; break; case mtpc_channelRoleModerator: _type = cons; break; case mtpc_channelRoleEditor: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPchannelParticipantRole"); } } inline void MTPchannelParticipantRole::write(mtpBuffer &to) const { } inline MTPchannelParticipantRole::MTPchannelParticipantRole(mtpTypeId type) : _type(type) { switch (type) { case mtpc_channelRoleEmpty: break; case mtpc_channelRoleModerator: break; case mtpc_channelRoleEditor: break; default: throw mtpErrorBadTypeId(type, "MTPchannelParticipantRole"); } } inline MTPchannelParticipantRole MTP_channelRoleEmpty() { return MTP::internal::TypeCreator::new_channelRoleEmpty(); } inline MTPchannelParticipantRole MTP_channelRoleModerator() { return MTP::internal::TypeCreator::new_channelRoleModerator(); } inline MTPchannelParticipantRole MTP_channelRoleEditor() { return MTP::internal::TypeCreator::new_channelRoleEditor(); } inline MTPchannels_channelParticipants::MTPchannels_channelParticipants() : TypeDataOwner(new MTPDchannels_channelParticipants()) { } inline uint32 MTPchannels_channelParticipants::innerLength() const { const MTPDchannels_channelParticipants &v(c_channels_channelParticipants()); return v.vcount.innerLength() + v.vparticipants.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPchannels_channelParticipants::type() const { return mtpc_channels_channelParticipants; } inline void MTPchannels_channelParticipants::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_channels_channelParticipants) throw mtpErrorUnexpected(cons, "MTPchannels_channelParticipants"); auto v = new MTPDchannels_channelParticipants(); setData(v); v->vcount.read(from, end); v->vparticipants.read(from, end); v->vusers.read(from, end); } inline void MTPchannels_channelParticipants::write(mtpBuffer &to) const { auto &v = c_channels_channelParticipants(); v.vcount.write(to); v.vparticipants.write(to); v.vusers.write(to); } inline const MTPDchannels_channelParticipants &MTPchannels_channelParticipants::c_channels_channelParticipants() const { return queryData(); } inline MTPchannels_channelParticipants::MTPchannels_channelParticipants(const MTPDchannels_channelParticipants *data) : TypeDataOwner(data) { } inline MTPchannels_channelParticipants MTP_channels_channelParticipants(MTPint _count, const MTPVector &_participants, const MTPVector &_users) { return MTP::internal::TypeCreator::new_channels_channelParticipants(_count, _participants, _users); } inline MTPchannels_channelParticipant::MTPchannels_channelParticipant() : TypeDataOwner(new MTPDchannels_channelParticipant()) { } inline uint32 MTPchannels_channelParticipant::innerLength() const { const MTPDchannels_channelParticipant &v(c_channels_channelParticipant()); return v.vparticipant.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPchannels_channelParticipant::type() const { return mtpc_channels_channelParticipant; } inline void MTPchannels_channelParticipant::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_channels_channelParticipant) throw mtpErrorUnexpected(cons, "MTPchannels_channelParticipant"); auto v = new MTPDchannels_channelParticipant(); setData(v); v->vparticipant.read(from, end); v->vusers.read(from, end); } inline void MTPchannels_channelParticipant::write(mtpBuffer &to) const { auto &v = c_channels_channelParticipant(); v.vparticipant.write(to); v.vusers.write(to); } inline const MTPDchannels_channelParticipant &MTPchannels_channelParticipant::c_channels_channelParticipant() const { return queryData(); } inline MTPchannels_channelParticipant::MTPchannels_channelParticipant(const MTPDchannels_channelParticipant *data) : TypeDataOwner(data) { } inline MTPchannels_channelParticipant MTP_channels_channelParticipant(const MTPChannelParticipant &_participant, const MTPVector &_users) { return MTP::internal::TypeCreator::new_channels_channelParticipant(_participant, _users); } inline MTPhelp_termsOfService::MTPhelp_termsOfService() : TypeDataOwner(new MTPDhelp_termsOfService()) { } inline uint32 MTPhelp_termsOfService::innerLength() const { const MTPDhelp_termsOfService &v(c_help_termsOfService()); return v.vtext.innerLength(); } inline mtpTypeId MTPhelp_termsOfService::type() const { return mtpc_help_termsOfService; } inline void MTPhelp_termsOfService::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_help_termsOfService) throw mtpErrorUnexpected(cons, "MTPhelp_termsOfService"); auto v = new MTPDhelp_termsOfService(); setData(v); v->vtext.read(from, end); } inline void MTPhelp_termsOfService::write(mtpBuffer &to) const { auto &v = c_help_termsOfService(); v.vtext.write(to); } inline const MTPDhelp_termsOfService &MTPhelp_termsOfService::c_help_termsOfService() const { return queryData(); } inline MTPhelp_termsOfService::MTPhelp_termsOfService(const MTPDhelp_termsOfService *data) : TypeDataOwner(data) { } inline MTPhelp_termsOfService MTP_help_termsOfService(const MTPstring &_text) { return MTP::internal::TypeCreator::new_help_termsOfService(_text); } inline uint32 MTPfoundGif::innerLength() const { switch (_type) { case mtpc_foundGif: { const MTPDfoundGif &v(c_foundGif()); return v.vurl.innerLength() + v.vthumb_url.innerLength() + v.vcontent_url.innerLength() + v.vcontent_type.innerLength() + v.vw.innerLength() + v.vh.innerLength(); } case mtpc_foundGifCached: { const MTPDfoundGifCached &v(c_foundGifCached()); return v.vurl.innerLength() + v.vphoto.innerLength() + v.vdocument.innerLength(); } } return 0; } inline mtpTypeId MTPfoundGif::type() const { t_assert(_type != 0); return _type; } inline void MTPfoundGif::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_foundGif: _type = cons; { auto v = new MTPDfoundGif(); setData(v); v->vurl.read(from, end); v->vthumb_url.read(from, end); v->vcontent_url.read(from, end); v->vcontent_type.read(from, end); v->vw.read(from, end); v->vh.read(from, end); } break; case mtpc_foundGifCached: _type = cons; { auto v = new MTPDfoundGifCached(); setData(v); v->vurl.read(from, end); v->vphoto.read(from, end); v->vdocument.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPfoundGif"); } } inline void MTPfoundGif::write(mtpBuffer &to) const { switch (_type) { case mtpc_foundGif: { auto &v = c_foundGif(); v.vurl.write(to); v.vthumb_url.write(to); v.vcontent_url.write(to); v.vcontent_type.write(to); v.vw.write(to); v.vh.write(to); } break; case mtpc_foundGifCached: { auto &v = c_foundGifCached(); v.vurl.write(to); v.vphoto.write(to); v.vdocument.write(to); } break; } } inline MTPfoundGif::MTPfoundGif(mtpTypeId type) : _type(type) { switch (type) { case mtpc_foundGif: setData(new MTPDfoundGif()); break; case mtpc_foundGifCached: setData(new MTPDfoundGifCached()); break; default: throw mtpErrorBadTypeId(type, "MTPfoundGif"); } } inline const MTPDfoundGif &MTPfoundGif::c_foundGif() const { t_assert(_type == mtpc_foundGif); return queryData(); } inline MTPfoundGif::MTPfoundGif(const MTPDfoundGif *data) : TypeDataOwner(data), _type(mtpc_foundGif) { } inline const MTPDfoundGifCached &MTPfoundGif::c_foundGifCached() const { t_assert(_type == mtpc_foundGifCached); return queryData(); } inline MTPfoundGif::MTPfoundGif(const MTPDfoundGifCached *data) : TypeDataOwner(data), _type(mtpc_foundGifCached) { } inline MTPfoundGif MTP_foundGif(const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h) { return MTP::internal::TypeCreator::new_foundGif(_url, _thumb_url, _content_url, _content_type, _w, _h); } inline MTPfoundGif MTP_foundGifCached(const MTPstring &_url, const MTPPhoto &_photo, const MTPDocument &_document) { return MTP::internal::TypeCreator::new_foundGifCached(_url, _photo, _document); } inline MTPmessages_foundGifs::MTPmessages_foundGifs() : TypeDataOwner(new MTPDmessages_foundGifs()) { } inline uint32 MTPmessages_foundGifs::innerLength() const { const MTPDmessages_foundGifs &v(c_messages_foundGifs()); return v.vnext_offset.innerLength() + v.vresults.innerLength(); } inline mtpTypeId MTPmessages_foundGifs::type() const { return mtpc_messages_foundGifs; } inline void MTPmessages_foundGifs::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_foundGifs) throw mtpErrorUnexpected(cons, "MTPmessages_foundGifs"); auto v = new MTPDmessages_foundGifs(); setData(v); v->vnext_offset.read(from, end); v->vresults.read(from, end); } inline void MTPmessages_foundGifs::write(mtpBuffer &to) const { auto &v = c_messages_foundGifs(); v.vnext_offset.write(to); v.vresults.write(to); } inline const MTPDmessages_foundGifs &MTPmessages_foundGifs::c_messages_foundGifs() const { return queryData(); } inline MTPmessages_foundGifs::MTPmessages_foundGifs(const MTPDmessages_foundGifs *data) : TypeDataOwner(data) { } inline MTPmessages_foundGifs MTP_messages_foundGifs(MTPint _next_offset, const MTPVector &_results) { return MTP::internal::TypeCreator::new_messages_foundGifs(_next_offset, _results); } inline uint32 MTPmessages_savedGifs::innerLength() const { switch (_type) { case mtpc_messages_savedGifs: { const MTPDmessages_savedGifs &v(c_messages_savedGifs()); return v.vhash.innerLength() + v.vgifs.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_savedGifs::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_savedGifs::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_savedGifsNotModified: _type = cons; break; case mtpc_messages_savedGifs: _type = cons; { auto v = new MTPDmessages_savedGifs(); setData(v); v->vhash.read(from, end); v->vgifs.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_savedGifs"); } } inline void MTPmessages_savedGifs::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_savedGifs: { auto &v = c_messages_savedGifs(); v.vhash.write(to); v.vgifs.write(to); } break; } } inline MTPmessages_savedGifs::MTPmessages_savedGifs(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_savedGifsNotModified: break; case mtpc_messages_savedGifs: setData(new MTPDmessages_savedGifs()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_savedGifs"); } } inline const MTPDmessages_savedGifs &MTPmessages_savedGifs::c_messages_savedGifs() const { t_assert(_type == mtpc_messages_savedGifs); return queryData(); } inline MTPmessages_savedGifs::MTPmessages_savedGifs(const MTPDmessages_savedGifs *data) : TypeDataOwner(data), _type(mtpc_messages_savedGifs) { } inline MTPmessages_savedGifs MTP_messages_savedGifsNotModified() { return MTP::internal::TypeCreator::new_messages_savedGifsNotModified(); } inline MTPmessages_savedGifs MTP_messages_savedGifs(MTPint _hash, const MTPVector &_gifs) { return MTP::internal::TypeCreator::new_messages_savedGifs(_hash, _gifs); } inline uint32 MTPinputBotInlineMessage::innerLength() const { switch (_type) { case mtpc_inputBotInlineMessageMediaAuto: { const MTPDinputBotInlineMessageMediaAuto &v(c_inputBotInlineMessageMediaAuto()); return v.vflags.innerLength() + v.vcaption.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_inputBotInlineMessageText: { const MTPDinputBotInlineMessageText &v(c_inputBotInlineMessageText()); return v.vflags.innerLength() + v.vmessage.innerLength() + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_inputBotInlineMessageMediaGeo: { const MTPDinputBotInlineMessageMediaGeo &v(c_inputBotInlineMessageMediaGeo()); return v.vflags.innerLength() + v.vgeo_point.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_inputBotInlineMessageMediaVenue: { const MTPDinputBotInlineMessageMediaVenue &v(c_inputBotInlineMessageMediaVenue()); return v.vflags.innerLength() + v.vgeo_point.innerLength() + v.vtitle.innerLength() + v.vaddress.innerLength() + v.vprovider.innerLength() + v.vvenue_id.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_inputBotInlineMessageMediaContact: { const MTPDinputBotInlineMessageMediaContact &v(c_inputBotInlineMessageMediaContact()); return v.vflags.innerLength() + v.vphone_number.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_inputBotInlineMessageGame: { const MTPDinputBotInlineMessageGame &v(c_inputBotInlineMessageGame()); return v.vflags.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } } return 0; } inline mtpTypeId MTPinputBotInlineMessage::type() const { t_assert(_type != 0); return _type; } inline void MTPinputBotInlineMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputBotInlineMessageMediaAuto: _type = cons; { auto v = new MTPDinputBotInlineMessageMediaAuto(); setData(v); v->vflags.read(from, end); v->vcaption.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_inputBotInlineMessageText: _type = cons; { auto v = new MTPDinputBotInlineMessageText(); setData(v); v->vflags.read(from, end); v->vmessage.read(from, end); if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_inputBotInlineMessageMediaGeo: _type = cons; { auto v = new MTPDinputBotInlineMessageMediaGeo(); setData(v); v->vflags.read(from, end); v->vgeo_point.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_inputBotInlineMessageMediaVenue: _type = cons; { auto v = new MTPDinputBotInlineMessageMediaVenue(); setData(v); v->vflags.read(from, end); v->vgeo_point.read(from, end); v->vtitle.read(from, end); v->vaddress.read(from, end); v->vprovider.read(from, end); v->vvenue_id.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_inputBotInlineMessageMediaContact: _type = cons; { auto v = new MTPDinputBotInlineMessageMediaContact(); setData(v); v->vflags.read(from, end); v->vphone_number.read(from, end); v->vfirst_name.read(from, end); v->vlast_name.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_inputBotInlineMessageGame: _type = cons; { auto v = new MTPDinputBotInlineMessageGame(); setData(v); v->vflags.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; default: throw mtpErrorUnexpected(cons, "MTPinputBotInlineMessage"); } } inline void MTPinputBotInlineMessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputBotInlineMessageMediaAuto: { auto &v = c_inputBotInlineMessageMediaAuto(); v.vflags.write(to); v.vcaption.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_inputBotInlineMessageText: { auto &v = c_inputBotInlineMessageText(); v.vflags.write(to); v.vmessage.write(to); if (v.has_entities()) v.ventities.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_inputBotInlineMessageMediaGeo: { auto &v = c_inputBotInlineMessageMediaGeo(); v.vflags.write(to); v.vgeo_point.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_inputBotInlineMessageMediaVenue: { auto &v = c_inputBotInlineMessageMediaVenue(); v.vflags.write(to); v.vgeo_point.write(to); v.vtitle.write(to); v.vaddress.write(to); v.vprovider.write(to); v.vvenue_id.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_inputBotInlineMessageMediaContact: { auto &v = c_inputBotInlineMessageMediaContact(); v.vflags.write(to); v.vphone_number.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_inputBotInlineMessageGame: { auto &v = c_inputBotInlineMessageGame(); v.vflags.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; } } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputBotInlineMessageMediaAuto: setData(new MTPDinputBotInlineMessageMediaAuto()); break; case mtpc_inputBotInlineMessageText: setData(new MTPDinputBotInlineMessageText()); break; case mtpc_inputBotInlineMessageMediaGeo: setData(new MTPDinputBotInlineMessageMediaGeo()); break; case mtpc_inputBotInlineMessageMediaVenue: setData(new MTPDinputBotInlineMessageMediaVenue()); break; case mtpc_inputBotInlineMessageMediaContact: setData(new MTPDinputBotInlineMessageMediaContact()); break; case mtpc_inputBotInlineMessageGame: setData(new MTPDinputBotInlineMessageGame()); break; default: throw mtpErrorBadTypeId(type, "MTPinputBotInlineMessage"); } } inline const MTPDinputBotInlineMessageMediaAuto &MTPinputBotInlineMessage::c_inputBotInlineMessageMediaAuto() const { t_assert(_type == mtpc_inputBotInlineMessageMediaAuto); return queryData(); } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaAuto *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineMessageMediaAuto) { } inline const MTPDinputBotInlineMessageText &MTPinputBotInlineMessage::c_inputBotInlineMessageText() const { t_assert(_type == mtpc_inputBotInlineMessageText); return queryData(); } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(const MTPDinputBotInlineMessageText *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineMessageText) { } inline const MTPDinputBotInlineMessageMediaGeo &MTPinputBotInlineMessage::c_inputBotInlineMessageMediaGeo() const { t_assert(_type == mtpc_inputBotInlineMessageMediaGeo); return queryData(); } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaGeo *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineMessageMediaGeo) { } inline const MTPDinputBotInlineMessageMediaVenue &MTPinputBotInlineMessage::c_inputBotInlineMessageMediaVenue() const { t_assert(_type == mtpc_inputBotInlineMessageMediaVenue); return queryData(); } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaVenue *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineMessageMediaVenue) { } inline const MTPDinputBotInlineMessageMediaContact &MTPinputBotInlineMessage::c_inputBotInlineMessageMediaContact() const { t_assert(_type == mtpc_inputBotInlineMessageMediaContact); return queryData(); } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(const MTPDinputBotInlineMessageMediaContact *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineMessageMediaContact) { } inline const MTPDinputBotInlineMessageGame &MTPinputBotInlineMessage::c_inputBotInlineMessageGame() const { t_assert(_type == mtpc_inputBotInlineMessageGame); return queryData(); } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(const MTPDinputBotInlineMessageGame *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineMessageGame) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineMessageMediaAuto::Flags) inline MTPinputBotInlineMessage MTP_inputBotInlineMessageMediaAuto(const MTPflags &_flags, const MTPstring &_caption, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_inputBotInlineMessageMediaAuto(_flags, _caption, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineMessageText::Flags) inline MTPinputBotInlineMessage MTP_inputBotInlineMessageText(const MTPflags &_flags, const MTPstring &_message, const MTPVector &_entities, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_inputBotInlineMessageText(_flags, _message, _entities, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineMessageMediaGeo::Flags) inline MTPinputBotInlineMessage MTP_inputBotInlineMessageMediaGeo(const MTPflags &_flags, const MTPInputGeoPoint &_geo_point, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_inputBotInlineMessageMediaGeo(_flags, _geo_point, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineMessageMediaVenue::Flags) inline MTPinputBotInlineMessage MTP_inputBotInlineMessageMediaVenue(const MTPflags &_flags, const MTPInputGeoPoint &_geo_point, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_inputBotInlineMessageMediaVenue(_flags, _geo_point, _title, _address, _provider, _venue_id, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineMessageMediaContact::Flags) inline MTPinputBotInlineMessage MTP_inputBotInlineMessageMediaContact(const MTPflags &_flags, const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_inputBotInlineMessageMediaContact(_flags, _phone_number, _first_name, _last_name, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineMessageGame::Flags) inline MTPinputBotInlineMessage MTP_inputBotInlineMessageGame(const MTPflags &_flags, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_inputBotInlineMessageGame(_flags, _reply_markup); } inline uint32 MTPinputBotInlineResult::innerLength() const { switch (_type) { case mtpc_inputBotInlineResult: { const MTPDinputBotInlineResult &v(c_inputBotInlineResult()); return v.vflags.innerLength() + v.vid.innerLength() + v.vtype.innerLength() + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_description() ? v.vdescription.innerLength() : 0) + (v.has_url() ? v.vurl.innerLength() : 0) + (v.has_thumb_url() ? v.vthumb_url.innerLength() : 0) + (v.has_content_url() ? v.vcontent_url.innerLength() : 0) + (v.has_content_type() ? v.vcontent_type.innerLength() : 0) + (v.has_w() ? v.vw.innerLength() : 0) + (v.has_h() ? v.vh.innerLength() : 0) + (v.has_duration() ? v.vduration.innerLength() : 0) + v.vsend_message.innerLength(); } case mtpc_inputBotInlineResultPhoto: { const MTPDinputBotInlineResultPhoto &v(c_inputBotInlineResultPhoto()); return v.vid.innerLength() + v.vtype.innerLength() + v.vphoto.innerLength() + v.vsend_message.innerLength(); } case mtpc_inputBotInlineResultDocument: { const MTPDinputBotInlineResultDocument &v(c_inputBotInlineResultDocument()); return v.vflags.innerLength() + v.vid.innerLength() + v.vtype.innerLength() + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_description() ? v.vdescription.innerLength() : 0) + v.vdocument.innerLength() + v.vsend_message.innerLength(); } case mtpc_inputBotInlineResultGame: { const MTPDinputBotInlineResultGame &v(c_inputBotInlineResultGame()); return v.vid.innerLength() + v.vshort_name.innerLength() + v.vsend_message.innerLength(); } } return 0; } inline mtpTypeId MTPinputBotInlineResult::type() const { t_assert(_type != 0); return _type; } inline void MTPinputBotInlineResult::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputBotInlineResult: _type = cons; { auto v = new MTPDinputBotInlineResult(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vtype.read(from, end); if (v->has_title()) { v->vtitle.read(from, end); } else { v->vtitle = MTPstring(); } if (v->has_description()) { v->vdescription.read(from, end); } else { v->vdescription = MTPstring(); } if (v->has_url()) { v->vurl.read(from, end); } else { v->vurl = MTPstring(); } if (v->has_thumb_url()) { v->vthumb_url.read(from, end); } else { v->vthumb_url = MTPstring(); } if (v->has_content_url()) { v->vcontent_url.read(from, end); } else { v->vcontent_url = MTPstring(); } if (v->has_content_type()) { v->vcontent_type.read(from, end); } else { v->vcontent_type = MTPstring(); } if (v->has_w()) { v->vw.read(from, end); } else { v->vw = MTPint(); } if (v->has_h()) { v->vh.read(from, end); } else { v->vh = MTPint(); } if (v->has_duration()) { v->vduration.read(from, end); } else { v->vduration = MTPint(); } v->vsend_message.read(from, end); } break; case mtpc_inputBotInlineResultPhoto: _type = cons; { auto v = new MTPDinputBotInlineResultPhoto(); setData(v); v->vid.read(from, end); v->vtype.read(from, end); v->vphoto.read(from, end); v->vsend_message.read(from, end); } break; case mtpc_inputBotInlineResultDocument: _type = cons; { auto v = new MTPDinputBotInlineResultDocument(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vtype.read(from, end); if (v->has_title()) { v->vtitle.read(from, end); } else { v->vtitle = MTPstring(); } if (v->has_description()) { v->vdescription.read(from, end); } else { v->vdescription = MTPstring(); } v->vdocument.read(from, end); v->vsend_message.read(from, end); } break; case mtpc_inputBotInlineResultGame: _type = cons; { auto v = new MTPDinputBotInlineResultGame(); setData(v); v->vid.read(from, end); v->vshort_name.read(from, end); v->vsend_message.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputBotInlineResult"); } } inline void MTPinputBotInlineResult::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputBotInlineResult: { auto &v = c_inputBotInlineResult(); v.vflags.write(to); v.vid.write(to); v.vtype.write(to); if (v.has_title()) v.vtitle.write(to); if (v.has_description()) v.vdescription.write(to); if (v.has_url()) v.vurl.write(to); if (v.has_thumb_url()) v.vthumb_url.write(to); if (v.has_content_url()) v.vcontent_url.write(to); if (v.has_content_type()) v.vcontent_type.write(to); if (v.has_w()) v.vw.write(to); if (v.has_h()) v.vh.write(to); if (v.has_duration()) v.vduration.write(to); v.vsend_message.write(to); } break; case mtpc_inputBotInlineResultPhoto: { auto &v = c_inputBotInlineResultPhoto(); v.vid.write(to); v.vtype.write(to); v.vphoto.write(to); v.vsend_message.write(to); } break; case mtpc_inputBotInlineResultDocument: { auto &v = c_inputBotInlineResultDocument(); v.vflags.write(to); v.vid.write(to); v.vtype.write(to); if (v.has_title()) v.vtitle.write(to); if (v.has_description()) v.vdescription.write(to); v.vdocument.write(to); v.vsend_message.write(to); } break; case mtpc_inputBotInlineResultGame: { auto &v = c_inputBotInlineResultGame(); v.vid.write(to); v.vshort_name.write(to); v.vsend_message.write(to); } break; } } inline MTPinputBotInlineResult::MTPinputBotInlineResult(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputBotInlineResult: setData(new MTPDinputBotInlineResult()); break; case mtpc_inputBotInlineResultPhoto: setData(new MTPDinputBotInlineResultPhoto()); break; case mtpc_inputBotInlineResultDocument: setData(new MTPDinputBotInlineResultDocument()); break; case mtpc_inputBotInlineResultGame: setData(new MTPDinputBotInlineResultGame()); break; default: throw mtpErrorBadTypeId(type, "MTPinputBotInlineResult"); } } inline const MTPDinputBotInlineResult &MTPinputBotInlineResult::c_inputBotInlineResult() const { t_assert(_type == mtpc_inputBotInlineResult); return queryData(); } inline MTPinputBotInlineResult::MTPinputBotInlineResult(const MTPDinputBotInlineResult *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineResult) { } inline const MTPDinputBotInlineResultPhoto &MTPinputBotInlineResult::c_inputBotInlineResultPhoto() const { t_assert(_type == mtpc_inputBotInlineResultPhoto); return queryData(); } inline MTPinputBotInlineResult::MTPinputBotInlineResult(const MTPDinputBotInlineResultPhoto *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineResultPhoto) { } inline const MTPDinputBotInlineResultDocument &MTPinputBotInlineResult::c_inputBotInlineResultDocument() const { t_assert(_type == mtpc_inputBotInlineResultDocument); return queryData(); } inline MTPinputBotInlineResult::MTPinputBotInlineResult(const MTPDinputBotInlineResultDocument *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineResultDocument) { } inline const MTPDinputBotInlineResultGame &MTPinputBotInlineResult::c_inputBotInlineResultGame() const { t_assert(_type == mtpc_inputBotInlineResultGame); return queryData(); } inline MTPinputBotInlineResult::MTPinputBotInlineResult(const MTPDinputBotInlineResultGame *data) : TypeDataOwner(data), _type(mtpc_inputBotInlineResultGame) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineResult::Flags) inline MTPinputBotInlineResult MTP_inputBotInlineResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h, MTPint _duration, const MTPInputBotInlineMessage &_send_message) { return MTP::internal::TypeCreator::new_inputBotInlineResult(_flags, _id, _type, _title, _description, _url, _thumb_url, _content_url, _content_type, _w, _h, _duration, _send_message); } inline MTPinputBotInlineResult MTP_inputBotInlineResultPhoto(const MTPstring &_id, const MTPstring &_type, const MTPInputPhoto &_photo, const MTPInputBotInlineMessage &_send_message) { return MTP::internal::TypeCreator::new_inputBotInlineResultPhoto(_id, _type, _photo, _send_message); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDinputBotInlineResultDocument::Flags) inline MTPinputBotInlineResult MTP_inputBotInlineResultDocument(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPInputDocument &_document, const MTPInputBotInlineMessage &_send_message) { return MTP::internal::TypeCreator::new_inputBotInlineResultDocument(_flags, _id, _type, _title, _description, _document, _send_message); } inline MTPinputBotInlineResult MTP_inputBotInlineResultGame(const MTPstring &_id, const MTPstring &_short_name, const MTPInputBotInlineMessage &_send_message) { return MTP::internal::TypeCreator::new_inputBotInlineResultGame(_id, _short_name, _send_message); } inline uint32 MTPbotInlineMessage::innerLength() const { switch (_type) { case mtpc_botInlineMessageMediaAuto: { const MTPDbotInlineMessageMediaAuto &v(c_botInlineMessageMediaAuto()); return v.vflags.innerLength() + v.vcaption.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_botInlineMessageText: { const MTPDbotInlineMessageText &v(c_botInlineMessageText()); return v.vflags.innerLength() + v.vmessage.innerLength() + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_botInlineMessageMediaGeo: { const MTPDbotInlineMessageMediaGeo &v(c_botInlineMessageMediaGeo()); return v.vflags.innerLength() + v.vgeo.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_botInlineMessageMediaVenue: { const MTPDbotInlineMessageMediaVenue &v(c_botInlineMessageMediaVenue()); return v.vflags.innerLength() + v.vgeo.innerLength() + v.vtitle.innerLength() + v.vaddress.innerLength() + v.vprovider.innerLength() + v.vvenue_id.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } case mtpc_botInlineMessageMediaContact: { const MTPDbotInlineMessageMediaContact &v(c_botInlineMessageMediaContact()); return v.vflags.innerLength() + v.vphone_number.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength() + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0); } } return 0; } inline mtpTypeId MTPbotInlineMessage::type() const { t_assert(_type != 0); return _type; } inline void MTPbotInlineMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_botInlineMessageMediaAuto: _type = cons; { auto v = new MTPDbotInlineMessageMediaAuto(); setData(v); v->vflags.read(from, end); v->vcaption.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_botInlineMessageText: _type = cons; { auto v = new MTPDbotInlineMessageText(); setData(v); v->vflags.read(from, end); v->vmessage.read(from, end); if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_botInlineMessageMediaGeo: _type = cons; { auto v = new MTPDbotInlineMessageMediaGeo(); setData(v); v->vflags.read(from, end); v->vgeo.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_botInlineMessageMediaVenue: _type = cons; { auto v = new MTPDbotInlineMessageMediaVenue(); setData(v); v->vflags.read(from, end); v->vgeo.read(from, end); v->vtitle.read(from, end); v->vaddress.read(from, end); v->vprovider.read(from, end); v->vvenue_id.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; case mtpc_botInlineMessageMediaContact: _type = cons; { auto v = new MTPDbotInlineMessageMediaContact(); setData(v); v->vflags.read(from, end); v->vphone_number.read(from, end); v->vfirst_name.read(from, end); v->vlast_name.read(from, end); if (v->has_reply_markup()) { v->vreply_markup.read(from, end); } else { v->vreply_markup = MTPReplyMarkup(); } } break; default: throw mtpErrorUnexpected(cons, "MTPbotInlineMessage"); } } inline void MTPbotInlineMessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_botInlineMessageMediaAuto: { auto &v = c_botInlineMessageMediaAuto(); v.vflags.write(to); v.vcaption.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_botInlineMessageText: { auto &v = c_botInlineMessageText(); v.vflags.write(to); v.vmessage.write(to); if (v.has_entities()) v.ventities.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_botInlineMessageMediaGeo: { auto &v = c_botInlineMessageMediaGeo(); v.vflags.write(to); v.vgeo.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_botInlineMessageMediaVenue: { auto &v = c_botInlineMessageMediaVenue(); v.vflags.write(to); v.vgeo.write(to); v.vtitle.write(to); v.vaddress.write(to); v.vprovider.write(to); v.vvenue_id.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; case mtpc_botInlineMessageMediaContact: { auto &v = c_botInlineMessageMediaContact(); v.vflags.write(to); v.vphone_number.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); if (v.has_reply_markup()) v.vreply_markup.write(to); } break; } } inline MTPbotInlineMessage::MTPbotInlineMessage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_botInlineMessageMediaAuto: setData(new MTPDbotInlineMessageMediaAuto()); break; case mtpc_botInlineMessageText: setData(new MTPDbotInlineMessageText()); break; case mtpc_botInlineMessageMediaGeo: setData(new MTPDbotInlineMessageMediaGeo()); break; case mtpc_botInlineMessageMediaVenue: setData(new MTPDbotInlineMessageMediaVenue()); break; case mtpc_botInlineMessageMediaContact: setData(new MTPDbotInlineMessageMediaContact()); break; default: throw mtpErrorBadTypeId(type, "MTPbotInlineMessage"); } } inline const MTPDbotInlineMessageMediaAuto &MTPbotInlineMessage::c_botInlineMessageMediaAuto() const { t_assert(_type == mtpc_botInlineMessageMediaAuto); return queryData(); } inline MTPbotInlineMessage::MTPbotInlineMessage(const MTPDbotInlineMessageMediaAuto *data) : TypeDataOwner(data), _type(mtpc_botInlineMessageMediaAuto) { } inline const MTPDbotInlineMessageText &MTPbotInlineMessage::c_botInlineMessageText() const { t_assert(_type == mtpc_botInlineMessageText); return queryData(); } inline MTPbotInlineMessage::MTPbotInlineMessage(const MTPDbotInlineMessageText *data) : TypeDataOwner(data), _type(mtpc_botInlineMessageText) { } inline const MTPDbotInlineMessageMediaGeo &MTPbotInlineMessage::c_botInlineMessageMediaGeo() const { t_assert(_type == mtpc_botInlineMessageMediaGeo); return queryData(); } inline MTPbotInlineMessage::MTPbotInlineMessage(const MTPDbotInlineMessageMediaGeo *data) : TypeDataOwner(data), _type(mtpc_botInlineMessageMediaGeo) { } inline const MTPDbotInlineMessageMediaVenue &MTPbotInlineMessage::c_botInlineMessageMediaVenue() const { t_assert(_type == mtpc_botInlineMessageMediaVenue); return queryData(); } inline MTPbotInlineMessage::MTPbotInlineMessage(const MTPDbotInlineMessageMediaVenue *data) : TypeDataOwner(data), _type(mtpc_botInlineMessageMediaVenue) { } inline const MTPDbotInlineMessageMediaContact &MTPbotInlineMessage::c_botInlineMessageMediaContact() const { t_assert(_type == mtpc_botInlineMessageMediaContact); return queryData(); } inline MTPbotInlineMessage::MTPbotInlineMessage(const MTPDbotInlineMessageMediaContact *data) : TypeDataOwner(data), _type(mtpc_botInlineMessageMediaContact) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineMessageMediaAuto::Flags) inline MTPbotInlineMessage MTP_botInlineMessageMediaAuto(const MTPflags &_flags, const MTPstring &_caption, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_botInlineMessageMediaAuto(_flags, _caption, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineMessageText::Flags) inline MTPbotInlineMessage MTP_botInlineMessageText(const MTPflags &_flags, const MTPstring &_message, const MTPVector &_entities, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_botInlineMessageText(_flags, _message, _entities, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineMessageMediaGeo::Flags) inline MTPbotInlineMessage MTP_botInlineMessageMediaGeo(const MTPflags &_flags, const MTPGeoPoint &_geo, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_botInlineMessageMediaGeo(_flags, _geo, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineMessageMediaVenue::Flags) inline MTPbotInlineMessage MTP_botInlineMessageMediaVenue(const MTPflags &_flags, const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_botInlineMessageMediaVenue(_flags, _geo, _title, _address, _provider, _venue_id, _reply_markup); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineMessageMediaContact::Flags) inline MTPbotInlineMessage MTP_botInlineMessageMediaContact(const MTPflags &_flags, const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, const MTPReplyMarkup &_reply_markup) { return MTP::internal::TypeCreator::new_botInlineMessageMediaContact(_flags, _phone_number, _first_name, _last_name, _reply_markup); } inline uint32 MTPbotInlineResult::innerLength() const { switch (_type) { case mtpc_botInlineResult: { const MTPDbotInlineResult &v(c_botInlineResult()); return v.vflags.innerLength() + v.vid.innerLength() + v.vtype.innerLength() + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_description() ? v.vdescription.innerLength() : 0) + (v.has_url() ? v.vurl.innerLength() : 0) + (v.has_thumb_url() ? v.vthumb_url.innerLength() : 0) + (v.has_content_url() ? v.vcontent_url.innerLength() : 0) + (v.has_content_type() ? v.vcontent_type.innerLength() : 0) + (v.has_w() ? v.vw.innerLength() : 0) + (v.has_h() ? v.vh.innerLength() : 0) + (v.has_duration() ? v.vduration.innerLength() : 0) + v.vsend_message.innerLength(); } case mtpc_botInlineMediaResult: { const MTPDbotInlineMediaResult &v(c_botInlineMediaResult()); return v.vflags.innerLength() + v.vid.innerLength() + v.vtype.innerLength() + (v.has_photo() ? v.vphoto.innerLength() : 0) + (v.has_document() ? v.vdocument.innerLength() : 0) + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_description() ? v.vdescription.innerLength() : 0) + v.vsend_message.innerLength(); } } return 0; } inline mtpTypeId MTPbotInlineResult::type() const { t_assert(_type != 0); return _type; } inline void MTPbotInlineResult::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_botInlineResult: _type = cons; { auto v = new MTPDbotInlineResult(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vtype.read(from, end); if (v->has_title()) { v->vtitle.read(from, end); } else { v->vtitle = MTPstring(); } if (v->has_description()) { v->vdescription.read(from, end); } else { v->vdescription = MTPstring(); } if (v->has_url()) { v->vurl.read(from, end); } else { v->vurl = MTPstring(); } if (v->has_thumb_url()) { v->vthumb_url.read(from, end); } else { v->vthumb_url = MTPstring(); } if (v->has_content_url()) { v->vcontent_url.read(from, end); } else { v->vcontent_url = MTPstring(); } if (v->has_content_type()) { v->vcontent_type.read(from, end); } else { v->vcontent_type = MTPstring(); } if (v->has_w()) { v->vw.read(from, end); } else { v->vw = MTPint(); } if (v->has_h()) { v->vh.read(from, end); } else { v->vh = MTPint(); } if (v->has_duration()) { v->vduration.read(from, end); } else { v->vduration = MTPint(); } v->vsend_message.read(from, end); } break; case mtpc_botInlineMediaResult: _type = cons; { auto v = new MTPDbotInlineMediaResult(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vtype.read(from, end); if (v->has_photo()) { v->vphoto.read(from, end); } else { v->vphoto = MTPPhoto(); } if (v->has_document()) { v->vdocument.read(from, end); } else { v->vdocument = MTPDocument(); } if (v->has_title()) { v->vtitle.read(from, end); } else { v->vtitle = MTPstring(); } if (v->has_description()) { v->vdescription.read(from, end); } else { v->vdescription = MTPstring(); } v->vsend_message.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPbotInlineResult"); } } inline void MTPbotInlineResult::write(mtpBuffer &to) const { switch (_type) { case mtpc_botInlineResult: { auto &v = c_botInlineResult(); v.vflags.write(to); v.vid.write(to); v.vtype.write(to); if (v.has_title()) v.vtitle.write(to); if (v.has_description()) v.vdescription.write(to); if (v.has_url()) v.vurl.write(to); if (v.has_thumb_url()) v.vthumb_url.write(to); if (v.has_content_url()) v.vcontent_url.write(to); if (v.has_content_type()) v.vcontent_type.write(to); if (v.has_w()) v.vw.write(to); if (v.has_h()) v.vh.write(to); if (v.has_duration()) v.vduration.write(to); v.vsend_message.write(to); } break; case mtpc_botInlineMediaResult: { auto &v = c_botInlineMediaResult(); v.vflags.write(to); v.vid.write(to); v.vtype.write(to); if (v.has_photo()) v.vphoto.write(to); if (v.has_document()) v.vdocument.write(to); if (v.has_title()) v.vtitle.write(to); if (v.has_description()) v.vdescription.write(to); v.vsend_message.write(to); } break; } } inline MTPbotInlineResult::MTPbotInlineResult(mtpTypeId type) : _type(type) { switch (type) { case mtpc_botInlineResult: setData(new MTPDbotInlineResult()); break; case mtpc_botInlineMediaResult: setData(new MTPDbotInlineMediaResult()); break; default: throw mtpErrorBadTypeId(type, "MTPbotInlineResult"); } } inline const MTPDbotInlineResult &MTPbotInlineResult::c_botInlineResult() const { t_assert(_type == mtpc_botInlineResult); return queryData(); } inline MTPbotInlineResult::MTPbotInlineResult(const MTPDbotInlineResult *data) : TypeDataOwner(data), _type(mtpc_botInlineResult) { } inline const MTPDbotInlineMediaResult &MTPbotInlineResult::c_botInlineMediaResult() const { t_assert(_type == mtpc_botInlineMediaResult); return queryData(); } inline MTPbotInlineResult::MTPbotInlineResult(const MTPDbotInlineMediaResult *data) : TypeDataOwner(data), _type(mtpc_botInlineMediaResult) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineResult::Flags) inline MTPbotInlineResult MTP_botInlineResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPstring &_title, const MTPstring &_description, const MTPstring &_url, const MTPstring &_thumb_url, const MTPstring &_content_url, const MTPstring &_content_type, MTPint _w, MTPint _h, MTPint _duration, const MTPBotInlineMessage &_send_message) { return MTP::internal::TypeCreator::new_botInlineResult(_flags, _id, _type, _title, _description, _url, _thumb_url, _content_url, _content_type, _w, _h, _duration, _send_message); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDbotInlineMediaResult::Flags) inline MTPbotInlineResult MTP_botInlineMediaResult(const MTPflags &_flags, const MTPstring &_id, const MTPstring &_type, const MTPPhoto &_photo, const MTPDocument &_document, const MTPstring &_title, const MTPstring &_description, const MTPBotInlineMessage &_send_message) { return MTP::internal::TypeCreator::new_botInlineMediaResult(_flags, _id, _type, _photo, _document, _title, _description, _send_message); } inline MTPmessages_botResults::MTPmessages_botResults() : TypeDataOwner(new MTPDmessages_botResults()) { } inline uint32 MTPmessages_botResults::innerLength() const { const MTPDmessages_botResults &v(c_messages_botResults()); return v.vflags.innerLength() + v.vquery_id.innerLength() + (v.has_next_offset() ? v.vnext_offset.innerLength() : 0) + (v.has_switch_pm() ? v.vswitch_pm.innerLength() : 0) + v.vresults.innerLength() + v.vcache_time.innerLength(); } inline mtpTypeId MTPmessages_botResults::type() const { return mtpc_messages_botResults; } inline void MTPmessages_botResults::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_botResults) throw mtpErrorUnexpected(cons, "MTPmessages_botResults"); auto v = new MTPDmessages_botResults(); setData(v); v->vflags.read(from, end); v->vquery_id.read(from, end); if (v->has_next_offset()) { v->vnext_offset.read(from, end); } else { v->vnext_offset = MTPstring(); } if (v->has_switch_pm()) { v->vswitch_pm.read(from, end); } else { v->vswitch_pm = MTPInlineBotSwitchPM(); } v->vresults.read(from, end); v->vcache_time.read(from, end); } inline void MTPmessages_botResults::write(mtpBuffer &to) const { auto &v = c_messages_botResults(); v.vflags.write(to); v.vquery_id.write(to); if (v.has_next_offset()) v.vnext_offset.write(to); if (v.has_switch_pm()) v.vswitch_pm.write(to); v.vresults.write(to); v.vcache_time.write(to); } inline const MTPDmessages_botResults &MTPmessages_botResults::c_messages_botResults() const { return queryData(); } inline MTPmessages_botResults::MTPmessages_botResults(const MTPDmessages_botResults *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessages_botResults::Flags) inline MTPmessages_botResults MTP_messages_botResults(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_next_offset, const MTPInlineBotSwitchPM &_switch_pm, const MTPVector &_results, MTPint _cache_time) { return MTP::internal::TypeCreator::new_messages_botResults(_flags, _query_id, _next_offset, _switch_pm, _results, _cache_time); } inline MTPexportedMessageLink::MTPexportedMessageLink() : TypeDataOwner(new MTPDexportedMessageLink()) { } inline uint32 MTPexportedMessageLink::innerLength() const { const MTPDexportedMessageLink &v(c_exportedMessageLink()); return v.vlink.innerLength(); } inline mtpTypeId MTPexportedMessageLink::type() const { return mtpc_exportedMessageLink; } inline void MTPexportedMessageLink::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_exportedMessageLink) throw mtpErrorUnexpected(cons, "MTPexportedMessageLink"); auto v = new MTPDexportedMessageLink(); setData(v); v->vlink.read(from, end); } inline void MTPexportedMessageLink::write(mtpBuffer &to) const { auto &v = c_exportedMessageLink(); v.vlink.write(to); } inline const MTPDexportedMessageLink &MTPexportedMessageLink::c_exportedMessageLink() const { return queryData(); } inline MTPexportedMessageLink::MTPexportedMessageLink(const MTPDexportedMessageLink *data) : TypeDataOwner(data) { } inline MTPexportedMessageLink MTP_exportedMessageLink(const MTPstring &_link) { return MTP::internal::TypeCreator::new_exportedMessageLink(_link); } inline MTPmessageFwdHeader::MTPmessageFwdHeader() : TypeDataOwner(new MTPDmessageFwdHeader()) { } inline uint32 MTPmessageFwdHeader::innerLength() const { const MTPDmessageFwdHeader &v(c_messageFwdHeader()); return v.vflags.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vdate.innerLength() + (v.has_channel_id() ? v.vchannel_id.innerLength() : 0) + (v.has_channel_post() ? v.vchannel_post.innerLength() : 0); } inline mtpTypeId MTPmessageFwdHeader::type() const { return mtpc_messageFwdHeader; } inline void MTPmessageFwdHeader::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messageFwdHeader) throw mtpErrorUnexpected(cons, "MTPmessageFwdHeader"); auto v = new MTPDmessageFwdHeader(); setData(v); v->vflags.read(from, end); if (v->has_from_id()) { v->vfrom_id.read(from, end); } else { v->vfrom_id = MTPint(); } v->vdate.read(from, end); if (v->has_channel_id()) { v->vchannel_id.read(from, end); } else { v->vchannel_id = MTPint(); } if (v->has_channel_post()) { v->vchannel_post.read(from, end); } else { v->vchannel_post = MTPint(); } } inline void MTPmessageFwdHeader::write(mtpBuffer &to) const { auto &v = c_messageFwdHeader(); v.vflags.write(to); if (v.has_from_id()) v.vfrom_id.write(to); v.vdate.write(to); if (v.has_channel_id()) v.vchannel_id.write(to); if (v.has_channel_post()) v.vchannel_post.write(to); } inline const MTPDmessageFwdHeader &MTPmessageFwdHeader::c_messageFwdHeader() const { return queryData(); } inline MTPmessageFwdHeader::MTPmessageFwdHeader(const MTPDmessageFwdHeader *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessageFwdHeader::Flags) inline MTPmessageFwdHeader MTP_messageFwdHeader(const MTPflags &_flags, MTPint _from_id, MTPint _date, MTPint _channel_id, MTPint _channel_post) { return MTP::internal::TypeCreator::new_messageFwdHeader(_flags, _from_id, _date, _channel_id, _channel_post); } inline uint32 MTPauth_codeType::innerLength() const { return 0; } inline mtpTypeId MTPauth_codeType::type() const { t_assert(_type != 0); return _type; } inline void MTPauth_codeType::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_auth_codeTypeSms: _type = cons; break; case mtpc_auth_codeTypeCall: _type = cons; break; case mtpc_auth_codeTypeFlashCall: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPauth_codeType"); } } inline void MTPauth_codeType::write(mtpBuffer &to) const { } inline MTPauth_codeType::MTPauth_codeType(mtpTypeId type) : _type(type) { switch (type) { case mtpc_auth_codeTypeSms: break; case mtpc_auth_codeTypeCall: break; case mtpc_auth_codeTypeFlashCall: break; default: throw mtpErrorBadTypeId(type, "MTPauth_codeType"); } } inline MTPauth_codeType MTP_auth_codeTypeSms() { return MTP::internal::TypeCreator::new_auth_codeTypeSms(); } inline MTPauth_codeType MTP_auth_codeTypeCall() { return MTP::internal::TypeCreator::new_auth_codeTypeCall(); } inline MTPauth_codeType MTP_auth_codeTypeFlashCall() { return MTP::internal::TypeCreator::new_auth_codeTypeFlashCall(); } inline uint32 MTPauth_sentCodeType::innerLength() const { switch (_type) { case mtpc_auth_sentCodeTypeApp: { const MTPDauth_sentCodeTypeApp &v(c_auth_sentCodeTypeApp()); return v.vlength.innerLength(); } case mtpc_auth_sentCodeTypeSms: { const MTPDauth_sentCodeTypeSms &v(c_auth_sentCodeTypeSms()); return v.vlength.innerLength(); } case mtpc_auth_sentCodeTypeCall: { const MTPDauth_sentCodeTypeCall &v(c_auth_sentCodeTypeCall()); return v.vlength.innerLength(); } case mtpc_auth_sentCodeTypeFlashCall: { const MTPDauth_sentCodeTypeFlashCall &v(c_auth_sentCodeTypeFlashCall()); return v.vpattern.innerLength(); } } return 0; } inline mtpTypeId MTPauth_sentCodeType::type() const { t_assert(_type != 0); return _type; } inline void MTPauth_sentCodeType::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_auth_sentCodeTypeApp: _type = cons; { auto v = new MTPDauth_sentCodeTypeApp(); setData(v); v->vlength.read(from, end); } break; case mtpc_auth_sentCodeTypeSms: _type = cons; { auto v = new MTPDauth_sentCodeTypeSms(); setData(v); v->vlength.read(from, end); } break; case mtpc_auth_sentCodeTypeCall: _type = cons; { auto v = new MTPDauth_sentCodeTypeCall(); setData(v); v->vlength.read(from, end); } break; case mtpc_auth_sentCodeTypeFlashCall: _type = cons; { auto v = new MTPDauth_sentCodeTypeFlashCall(); setData(v); v->vpattern.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPauth_sentCodeType"); } } inline void MTPauth_sentCodeType::write(mtpBuffer &to) const { switch (_type) { case mtpc_auth_sentCodeTypeApp: { auto &v = c_auth_sentCodeTypeApp(); v.vlength.write(to); } break; case mtpc_auth_sentCodeTypeSms: { auto &v = c_auth_sentCodeTypeSms(); v.vlength.write(to); } break; case mtpc_auth_sentCodeTypeCall: { auto &v = c_auth_sentCodeTypeCall(); v.vlength.write(to); } break; case mtpc_auth_sentCodeTypeFlashCall: { auto &v = c_auth_sentCodeTypeFlashCall(); v.vpattern.write(to); } break; } } inline MTPauth_sentCodeType::MTPauth_sentCodeType(mtpTypeId type) : _type(type) { switch (type) { case mtpc_auth_sentCodeTypeApp: setData(new MTPDauth_sentCodeTypeApp()); break; case mtpc_auth_sentCodeTypeSms: setData(new MTPDauth_sentCodeTypeSms()); break; case mtpc_auth_sentCodeTypeCall: setData(new MTPDauth_sentCodeTypeCall()); break; case mtpc_auth_sentCodeTypeFlashCall: setData(new MTPDauth_sentCodeTypeFlashCall()); break; default: throw mtpErrorBadTypeId(type, "MTPauth_sentCodeType"); } } inline const MTPDauth_sentCodeTypeApp &MTPauth_sentCodeType::c_auth_sentCodeTypeApp() const { t_assert(_type == mtpc_auth_sentCodeTypeApp); return queryData(); } inline MTPauth_sentCodeType::MTPauth_sentCodeType(const MTPDauth_sentCodeTypeApp *data) : TypeDataOwner(data), _type(mtpc_auth_sentCodeTypeApp) { } inline const MTPDauth_sentCodeTypeSms &MTPauth_sentCodeType::c_auth_sentCodeTypeSms() const { t_assert(_type == mtpc_auth_sentCodeTypeSms); return queryData(); } inline MTPauth_sentCodeType::MTPauth_sentCodeType(const MTPDauth_sentCodeTypeSms *data) : TypeDataOwner(data), _type(mtpc_auth_sentCodeTypeSms) { } inline const MTPDauth_sentCodeTypeCall &MTPauth_sentCodeType::c_auth_sentCodeTypeCall() const { t_assert(_type == mtpc_auth_sentCodeTypeCall); return queryData(); } inline MTPauth_sentCodeType::MTPauth_sentCodeType(const MTPDauth_sentCodeTypeCall *data) : TypeDataOwner(data), _type(mtpc_auth_sentCodeTypeCall) { } inline const MTPDauth_sentCodeTypeFlashCall &MTPauth_sentCodeType::c_auth_sentCodeTypeFlashCall() const { t_assert(_type == mtpc_auth_sentCodeTypeFlashCall); return queryData(); } inline MTPauth_sentCodeType::MTPauth_sentCodeType(const MTPDauth_sentCodeTypeFlashCall *data) : TypeDataOwner(data), _type(mtpc_auth_sentCodeTypeFlashCall) { } inline MTPauth_sentCodeType MTP_auth_sentCodeTypeApp(MTPint _length) { return MTP::internal::TypeCreator::new_auth_sentCodeTypeApp(_length); } inline MTPauth_sentCodeType MTP_auth_sentCodeTypeSms(MTPint _length) { return MTP::internal::TypeCreator::new_auth_sentCodeTypeSms(_length); } inline MTPauth_sentCodeType MTP_auth_sentCodeTypeCall(MTPint _length) { return MTP::internal::TypeCreator::new_auth_sentCodeTypeCall(_length); } inline MTPauth_sentCodeType MTP_auth_sentCodeTypeFlashCall(const MTPstring &_pattern) { return MTP::internal::TypeCreator::new_auth_sentCodeTypeFlashCall(_pattern); } inline MTPmessages_botCallbackAnswer::MTPmessages_botCallbackAnswer() : TypeDataOwner(new MTPDmessages_botCallbackAnswer()) { } inline uint32 MTPmessages_botCallbackAnswer::innerLength() const { const MTPDmessages_botCallbackAnswer &v(c_messages_botCallbackAnswer()); return v.vflags.innerLength() + (v.has_message() ? v.vmessage.innerLength() : 0) + (v.has_url() ? v.vurl.innerLength() : 0) + v.vcache_time.innerLength(); } inline mtpTypeId MTPmessages_botCallbackAnswer::type() const { return mtpc_messages_botCallbackAnswer; } inline void MTPmessages_botCallbackAnswer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_botCallbackAnswer) throw mtpErrorUnexpected(cons, "MTPmessages_botCallbackAnswer"); auto v = new MTPDmessages_botCallbackAnswer(); setData(v); v->vflags.read(from, end); if (v->has_message()) { v->vmessage.read(from, end); } else { v->vmessage = MTPstring(); } if (v->has_url()) { v->vurl.read(from, end); } else { v->vurl = MTPstring(); } v->vcache_time.read(from, end); } inline void MTPmessages_botCallbackAnswer::write(mtpBuffer &to) const { auto &v = c_messages_botCallbackAnswer(); v.vflags.write(to); if (v.has_message()) v.vmessage.write(to); if (v.has_url()) v.vurl.write(to); v.vcache_time.write(to); } inline const MTPDmessages_botCallbackAnswer &MTPmessages_botCallbackAnswer::c_messages_botCallbackAnswer() const { return queryData(); } inline MTPmessages_botCallbackAnswer::MTPmessages_botCallbackAnswer(const MTPDmessages_botCallbackAnswer *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessages_botCallbackAnswer::Flags) inline MTPmessages_botCallbackAnswer MTP_messages_botCallbackAnswer(const MTPflags &_flags, const MTPstring &_message, const MTPstring &_url, MTPint _cache_time) { return MTP::internal::TypeCreator::new_messages_botCallbackAnswer(_flags, _message, _url, _cache_time); } inline MTPmessages_messageEditData::MTPmessages_messageEditData() : TypeDataOwner(new MTPDmessages_messageEditData()) { } inline uint32 MTPmessages_messageEditData::innerLength() const { const MTPDmessages_messageEditData &v(c_messages_messageEditData()); return v.vflags.innerLength(); } inline mtpTypeId MTPmessages_messageEditData::type() const { return mtpc_messages_messageEditData; } inline void MTPmessages_messageEditData::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_messageEditData) throw mtpErrorUnexpected(cons, "MTPmessages_messageEditData"); auto v = new MTPDmessages_messageEditData(); setData(v); v->vflags.read(from, end); } inline void MTPmessages_messageEditData::write(mtpBuffer &to) const { auto &v = c_messages_messageEditData(); v.vflags.write(to); } inline const MTPDmessages_messageEditData &MTPmessages_messageEditData::c_messages_messageEditData() const { return queryData(); } inline MTPmessages_messageEditData::MTPmessages_messageEditData(const MTPDmessages_messageEditData *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessages_messageEditData::Flags) inline MTPmessages_messageEditData MTP_messages_messageEditData(const MTPflags &_flags) { return MTP::internal::TypeCreator::new_messages_messageEditData(_flags); } inline MTPinputBotInlineMessageID::MTPinputBotInlineMessageID() : TypeDataOwner(new MTPDinputBotInlineMessageID()) { } inline uint32 MTPinputBotInlineMessageID::innerLength() const { const MTPDinputBotInlineMessageID &v(c_inputBotInlineMessageID()); return v.vdc_id.innerLength() + v.vid.innerLength() + v.vaccess_hash.innerLength(); } inline mtpTypeId MTPinputBotInlineMessageID::type() const { return mtpc_inputBotInlineMessageID; } inline void MTPinputBotInlineMessageID::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inputBotInlineMessageID) throw mtpErrorUnexpected(cons, "MTPinputBotInlineMessageID"); auto v = new MTPDinputBotInlineMessageID(); setData(v); v->vdc_id.read(from, end); v->vid.read(from, end); v->vaccess_hash.read(from, end); } inline void MTPinputBotInlineMessageID::write(mtpBuffer &to) const { auto &v = c_inputBotInlineMessageID(); v.vdc_id.write(to); v.vid.write(to); v.vaccess_hash.write(to); } inline const MTPDinputBotInlineMessageID &MTPinputBotInlineMessageID::c_inputBotInlineMessageID() const { return queryData(); } inline MTPinputBotInlineMessageID::MTPinputBotInlineMessageID(const MTPDinputBotInlineMessageID *data) : TypeDataOwner(data) { } inline MTPinputBotInlineMessageID MTP_inputBotInlineMessageID(MTPint _dc_id, const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputBotInlineMessageID(_dc_id, _id, _access_hash); } inline MTPinlineBotSwitchPM::MTPinlineBotSwitchPM() : TypeDataOwner(new MTPDinlineBotSwitchPM()) { } inline uint32 MTPinlineBotSwitchPM::innerLength() const { const MTPDinlineBotSwitchPM &v(c_inlineBotSwitchPM()); return v.vtext.innerLength() + v.vstart_param.innerLength(); } inline mtpTypeId MTPinlineBotSwitchPM::type() const { return mtpc_inlineBotSwitchPM; } inline void MTPinlineBotSwitchPM::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inlineBotSwitchPM) throw mtpErrorUnexpected(cons, "MTPinlineBotSwitchPM"); auto v = new MTPDinlineBotSwitchPM(); setData(v); v->vtext.read(from, end); v->vstart_param.read(from, end); } inline void MTPinlineBotSwitchPM::write(mtpBuffer &to) const { auto &v = c_inlineBotSwitchPM(); v.vtext.write(to); v.vstart_param.write(to); } inline const MTPDinlineBotSwitchPM &MTPinlineBotSwitchPM::c_inlineBotSwitchPM() const { return queryData(); } inline MTPinlineBotSwitchPM::MTPinlineBotSwitchPM(const MTPDinlineBotSwitchPM *data) : TypeDataOwner(data) { } inline MTPinlineBotSwitchPM MTP_inlineBotSwitchPM(const MTPstring &_text, const MTPstring &_start_param) { return MTP::internal::TypeCreator::new_inlineBotSwitchPM(_text, _start_param); } inline MTPmessages_peerDialogs::MTPmessages_peerDialogs() : TypeDataOwner(new MTPDmessages_peerDialogs()) { } inline uint32 MTPmessages_peerDialogs::innerLength() const { const MTPDmessages_peerDialogs &v(c_messages_peerDialogs()); return v.vdialogs.innerLength() + v.vmessages.innerLength() + v.vchats.innerLength() + v.vusers.innerLength() + v.vstate.innerLength(); } inline mtpTypeId MTPmessages_peerDialogs::type() const { return mtpc_messages_peerDialogs; } inline void MTPmessages_peerDialogs::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_peerDialogs) throw mtpErrorUnexpected(cons, "MTPmessages_peerDialogs"); auto v = new MTPDmessages_peerDialogs(); setData(v); v->vdialogs.read(from, end); v->vmessages.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); v->vstate.read(from, end); } inline void MTPmessages_peerDialogs::write(mtpBuffer &to) const { auto &v = c_messages_peerDialogs(); v.vdialogs.write(to); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); v.vstate.write(to); } inline const MTPDmessages_peerDialogs &MTPmessages_peerDialogs::c_messages_peerDialogs() const { return queryData(); } inline MTPmessages_peerDialogs::MTPmessages_peerDialogs(const MTPDmessages_peerDialogs *data) : TypeDataOwner(data) { } inline MTPmessages_peerDialogs MTP_messages_peerDialogs(const MTPVector &_dialogs, const MTPVector &_messages, const MTPVector &_chats, const MTPVector &_users, const MTPupdates_State &_state) { return MTP::internal::TypeCreator::new_messages_peerDialogs(_dialogs, _messages, _chats, _users, _state); } inline MTPtopPeer::MTPtopPeer() : TypeDataOwner(new MTPDtopPeer()) { } inline uint32 MTPtopPeer::innerLength() const { const MTPDtopPeer &v(c_topPeer()); return v.vpeer.innerLength() + v.vrating.innerLength(); } inline mtpTypeId MTPtopPeer::type() const { return mtpc_topPeer; } inline void MTPtopPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_topPeer) throw mtpErrorUnexpected(cons, "MTPtopPeer"); auto v = new MTPDtopPeer(); setData(v); v->vpeer.read(from, end); v->vrating.read(from, end); } inline void MTPtopPeer::write(mtpBuffer &to) const { auto &v = c_topPeer(); v.vpeer.write(to); v.vrating.write(to); } inline const MTPDtopPeer &MTPtopPeer::c_topPeer() const { return queryData(); } inline MTPtopPeer::MTPtopPeer(const MTPDtopPeer *data) : TypeDataOwner(data) { } inline MTPtopPeer MTP_topPeer(const MTPPeer &_peer, const MTPdouble &_rating) { return MTP::internal::TypeCreator::new_topPeer(_peer, _rating); } inline uint32 MTPtopPeerCategory::innerLength() const { return 0; } inline mtpTypeId MTPtopPeerCategory::type() const { t_assert(_type != 0); return _type; } inline void MTPtopPeerCategory::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_topPeerCategoryBotsPM: _type = cons; break; case mtpc_topPeerCategoryBotsInline: _type = cons; break; case mtpc_topPeerCategoryCorrespondents: _type = cons; break; case mtpc_topPeerCategoryGroups: _type = cons; break; case mtpc_topPeerCategoryChannels: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPtopPeerCategory"); } } inline void MTPtopPeerCategory::write(mtpBuffer &to) const { } inline MTPtopPeerCategory::MTPtopPeerCategory(mtpTypeId type) : _type(type) { switch (type) { case mtpc_topPeerCategoryBotsPM: break; case mtpc_topPeerCategoryBotsInline: break; case mtpc_topPeerCategoryCorrespondents: break; case mtpc_topPeerCategoryGroups: break; case mtpc_topPeerCategoryChannels: break; default: throw mtpErrorBadTypeId(type, "MTPtopPeerCategory"); } } inline MTPtopPeerCategory MTP_topPeerCategoryBotsPM() { return MTP::internal::TypeCreator::new_topPeerCategoryBotsPM(); } inline MTPtopPeerCategory MTP_topPeerCategoryBotsInline() { return MTP::internal::TypeCreator::new_topPeerCategoryBotsInline(); } inline MTPtopPeerCategory MTP_topPeerCategoryCorrespondents() { return MTP::internal::TypeCreator::new_topPeerCategoryCorrespondents(); } inline MTPtopPeerCategory MTP_topPeerCategoryGroups() { return MTP::internal::TypeCreator::new_topPeerCategoryGroups(); } inline MTPtopPeerCategory MTP_topPeerCategoryChannels() { return MTP::internal::TypeCreator::new_topPeerCategoryChannels(); } inline MTPtopPeerCategoryPeers::MTPtopPeerCategoryPeers() : TypeDataOwner(new MTPDtopPeerCategoryPeers()) { } inline uint32 MTPtopPeerCategoryPeers::innerLength() const { const MTPDtopPeerCategoryPeers &v(c_topPeerCategoryPeers()); return v.vcategory.innerLength() + v.vcount.innerLength() + v.vpeers.innerLength(); } inline mtpTypeId MTPtopPeerCategoryPeers::type() const { return mtpc_topPeerCategoryPeers; } inline void MTPtopPeerCategoryPeers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_topPeerCategoryPeers) throw mtpErrorUnexpected(cons, "MTPtopPeerCategoryPeers"); auto v = new MTPDtopPeerCategoryPeers(); setData(v); v->vcategory.read(from, end); v->vcount.read(from, end); v->vpeers.read(from, end); } inline void MTPtopPeerCategoryPeers::write(mtpBuffer &to) const { auto &v = c_topPeerCategoryPeers(); v.vcategory.write(to); v.vcount.write(to); v.vpeers.write(to); } inline const MTPDtopPeerCategoryPeers &MTPtopPeerCategoryPeers::c_topPeerCategoryPeers() const { return queryData(); } inline MTPtopPeerCategoryPeers::MTPtopPeerCategoryPeers(const MTPDtopPeerCategoryPeers *data) : TypeDataOwner(data) { } inline MTPtopPeerCategoryPeers MTP_topPeerCategoryPeers(const MTPTopPeerCategory &_category, MTPint _count, const MTPVector &_peers) { return MTP::internal::TypeCreator::new_topPeerCategoryPeers(_category, _count, _peers); } inline uint32 MTPcontacts_topPeers::innerLength() const { switch (_type) { case mtpc_contacts_topPeers: { const MTPDcontacts_topPeers &v(c_contacts_topPeers()); return v.vcategories.innerLength() + v.vchats.innerLength() + v.vusers.innerLength(); } } return 0; } inline mtpTypeId MTPcontacts_topPeers::type() const { t_assert(_type != 0); return _type; } inline void MTPcontacts_topPeers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_contacts_topPeersNotModified: _type = cons; break; case mtpc_contacts_topPeers: _type = cons; { auto v = new MTPDcontacts_topPeers(); setData(v); v->vcategories.read(from, end); v->vchats.read(from, end); v->vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPcontacts_topPeers"); } } inline void MTPcontacts_topPeers::write(mtpBuffer &to) const { switch (_type) { case mtpc_contacts_topPeers: { auto &v = c_contacts_topPeers(); v.vcategories.write(to); v.vchats.write(to); v.vusers.write(to); } break; } } inline MTPcontacts_topPeers::MTPcontacts_topPeers(mtpTypeId type) : _type(type) { switch (type) { case mtpc_contacts_topPeersNotModified: break; case mtpc_contacts_topPeers: setData(new MTPDcontacts_topPeers()); break; default: throw mtpErrorBadTypeId(type, "MTPcontacts_topPeers"); } } inline const MTPDcontacts_topPeers &MTPcontacts_topPeers::c_contacts_topPeers() const { t_assert(_type == mtpc_contacts_topPeers); return queryData(); } inline MTPcontacts_topPeers::MTPcontacts_topPeers(const MTPDcontacts_topPeers *data) : TypeDataOwner(data), _type(mtpc_contacts_topPeers) { } inline MTPcontacts_topPeers MTP_contacts_topPeersNotModified() { return MTP::internal::TypeCreator::new_contacts_topPeersNotModified(); } inline MTPcontacts_topPeers MTP_contacts_topPeers(const MTPVector &_categories, const MTPVector &_chats, const MTPVector &_users) { return MTP::internal::TypeCreator::new_contacts_topPeers(_categories, _chats, _users); } inline uint32 MTPdraftMessage::innerLength() const { switch (_type) { case mtpc_draftMessage: { const MTPDdraftMessage &v(c_draftMessage()); return v.vflags.innerLength() + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vmessage.innerLength() + (v.has_entities() ? v.ventities.innerLength() : 0) + v.vdate.innerLength(); } } return 0; } inline mtpTypeId MTPdraftMessage::type() const { t_assert(_type != 0); return _type; } inline void MTPdraftMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_draftMessageEmpty: _type = cons; break; case mtpc_draftMessage: _type = cons; { auto v = new MTPDdraftMessage(); setData(v); v->vflags.read(from, end); if (v->has_reply_to_msg_id()) { v->vreply_to_msg_id.read(from, end); } else { v->vreply_to_msg_id = MTPint(); } v->vmessage.read(from, end); if (v->has_entities()) { v->ventities.read(from, end); } else { v->ventities = MTPVector(); } v->vdate.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPdraftMessage"); } } inline void MTPdraftMessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_draftMessage: { auto &v = c_draftMessage(); v.vflags.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); v.vmessage.write(to); if (v.has_entities()) v.ventities.write(to); v.vdate.write(to); } break; } } inline MTPdraftMessage::MTPdraftMessage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_draftMessageEmpty: break; case mtpc_draftMessage: setData(new MTPDdraftMessage()); break; default: throw mtpErrorBadTypeId(type, "MTPdraftMessage"); } } inline const MTPDdraftMessage &MTPdraftMessage::c_draftMessage() const { t_assert(_type == mtpc_draftMessage); return queryData(); } inline MTPdraftMessage::MTPdraftMessage(const MTPDdraftMessage *data) : TypeDataOwner(data), _type(mtpc_draftMessage) { } inline MTPdraftMessage MTP_draftMessageEmpty() { return MTP::internal::TypeCreator::new_draftMessageEmpty(); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDdraftMessage::Flags) inline MTPdraftMessage MTP_draftMessage(const MTPflags &_flags, MTPint _reply_to_msg_id, const MTPstring &_message, const MTPVector &_entities, MTPint _date) { return MTP::internal::TypeCreator::new_draftMessage(_flags, _reply_to_msg_id, _message, _entities, _date); } inline uint32 MTPmessages_featuredStickers::innerLength() const { switch (_type) { case mtpc_messages_featuredStickers: { const MTPDmessages_featuredStickers &v(c_messages_featuredStickers()); return v.vhash.innerLength() + v.vsets.innerLength() + v.vunread.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_featuredStickers::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_featuredStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_featuredStickersNotModified: _type = cons; break; case mtpc_messages_featuredStickers: _type = cons; { auto v = new MTPDmessages_featuredStickers(); setData(v); v->vhash.read(from, end); v->vsets.read(from, end); v->vunread.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_featuredStickers"); } } inline void MTPmessages_featuredStickers::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_featuredStickers: { auto &v = c_messages_featuredStickers(); v.vhash.write(to); v.vsets.write(to); v.vunread.write(to); } break; } } inline MTPmessages_featuredStickers::MTPmessages_featuredStickers(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_featuredStickersNotModified: break; case mtpc_messages_featuredStickers: setData(new MTPDmessages_featuredStickers()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_featuredStickers"); } } inline const MTPDmessages_featuredStickers &MTPmessages_featuredStickers::c_messages_featuredStickers() const { t_assert(_type == mtpc_messages_featuredStickers); return queryData(); } inline MTPmessages_featuredStickers::MTPmessages_featuredStickers(const MTPDmessages_featuredStickers *data) : TypeDataOwner(data), _type(mtpc_messages_featuredStickers) { } inline MTPmessages_featuredStickers MTP_messages_featuredStickersNotModified() { return MTP::internal::TypeCreator::new_messages_featuredStickersNotModified(); } inline MTPmessages_featuredStickers MTP_messages_featuredStickers(MTPint _hash, const MTPVector &_sets, const MTPVector &_unread) { return MTP::internal::TypeCreator::new_messages_featuredStickers(_hash, _sets, _unread); } inline uint32 MTPmessages_recentStickers::innerLength() const { switch (_type) { case mtpc_messages_recentStickers: { const MTPDmessages_recentStickers &v(c_messages_recentStickers()); return v.vhash.innerLength() + v.vstickers.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_recentStickers::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_recentStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_recentStickersNotModified: _type = cons; break; case mtpc_messages_recentStickers: _type = cons; { auto v = new MTPDmessages_recentStickers(); setData(v); v->vhash.read(from, end); v->vstickers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_recentStickers"); } } inline void MTPmessages_recentStickers::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_recentStickers: { auto &v = c_messages_recentStickers(); v.vhash.write(to); v.vstickers.write(to); } break; } } inline MTPmessages_recentStickers::MTPmessages_recentStickers(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_recentStickersNotModified: break; case mtpc_messages_recentStickers: setData(new MTPDmessages_recentStickers()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_recentStickers"); } } inline const MTPDmessages_recentStickers &MTPmessages_recentStickers::c_messages_recentStickers() const { t_assert(_type == mtpc_messages_recentStickers); return queryData(); } inline MTPmessages_recentStickers::MTPmessages_recentStickers(const MTPDmessages_recentStickers *data) : TypeDataOwner(data), _type(mtpc_messages_recentStickers) { } inline MTPmessages_recentStickers MTP_messages_recentStickersNotModified() { return MTP::internal::TypeCreator::new_messages_recentStickersNotModified(); } inline MTPmessages_recentStickers MTP_messages_recentStickers(MTPint _hash, const MTPVector &_stickers) { return MTP::internal::TypeCreator::new_messages_recentStickers(_hash, _stickers); } inline MTPmessages_archivedStickers::MTPmessages_archivedStickers() : TypeDataOwner(new MTPDmessages_archivedStickers()) { } inline uint32 MTPmessages_archivedStickers::innerLength() const { const MTPDmessages_archivedStickers &v(c_messages_archivedStickers()); return v.vcount.innerLength() + v.vsets.innerLength(); } inline mtpTypeId MTPmessages_archivedStickers::type() const { return mtpc_messages_archivedStickers; } inline void MTPmessages_archivedStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_archivedStickers) throw mtpErrorUnexpected(cons, "MTPmessages_archivedStickers"); auto v = new MTPDmessages_archivedStickers(); setData(v); v->vcount.read(from, end); v->vsets.read(from, end); } inline void MTPmessages_archivedStickers::write(mtpBuffer &to) const { auto &v = c_messages_archivedStickers(); v.vcount.write(to); v.vsets.write(to); } inline const MTPDmessages_archivedStickers &MTPmessages_archivedStickers::c_messages_archivedStickers() const { return queryData(); } inline MTPmessages_archivedStickers::MTPmessages_archivedStickers(const MTPDmessages_archivedStickers *data) : TypeDataOwner(data) { } inline MTPmessages_archivedStickers MTP_messages_archivedStickers(MTPint _count, const MTPVector &_sets) { return MTP::internal::TypeCreator::new_messages_archivedStickers(_count, _sets); } inline uint32 MTPmessages_stickerSetInstallResult::innerLength() const { switch (_type) { case mtpc_messages_stickerSetInstallResultArchive: { const MTPDmessages_stickerSetInstallResultArchive &v(c_messages_stickerSetInstallResultArchive()); return v.vsets.innerLength(); } } return 0; } inline mtpTypeId MTPmessages_stickerSetInstallResult::type() const { t_assert(_type != 0); return _type; } inline void MTPmessages_stickerSetInstallResult::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_messages_stickerSetInstallResultSuccess: _type = cons; break; case mtpc_messages_stickerSetInstallResultArchive: _type = cons; { auto v = new MTPDmessages_stickerSetInstallResultArchive(); setData(v); v->vsets.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPmessages_stickerSetInstallResult"); } } inline void MTPmessages_stickerSetInstallResult::write(mtpBuffer &to) const { switch (_type) { case mtpc_messages_stickerSetInstallResultArchive: { auto &v = c_messages_stickerSetInstallResultArchive(); v.vsets.write(to); } break; } } inline MTPmessages_stickerSetInstallResult::MTPmessages_stickerSetInstallResult(mtpTypeId type) : _type(type) { switch (type) { case mtpc_messages_stickerSetInstallResultSuccess: break; case mtpc_messages_stickerSetInstallResultArchive: setData(new MTPDmessages_stickerSetInstallResultArchive()); break; default: throw mtpErrorBadTypeId(type, "MTPmessages_stickerSetInstallResult"); } } inline const MTPDmessages_stickerSetInstallResultArchive &MTPmessages_stickerSetInstallResult::c_messages_stickerSetInstallResultArchive() const { t_assert(_type == mtpc_messages_stickerSetInstallResultArchive); return queryData(); } inline MTPmessages_stickerSetInstallResult::MTPmessages_stickerSetInstallResult(const MTPDmessages_stickerSetInstallResultArchive *data) : TypeDataOwner(data), _type(mtpc_messages_stickerSetInstallResultArchive) { } inline MTPmessages_stickerSetInstallResult MTP_messages_stickerSetInstallResultSuccess() { return MTP::internal::TypeCreator::new_messages_stickerSetInstallResultSuccess(); } inline MTPmessages_stickerSetInstallResult MTP_messages_stickerSetInstallResultArchive(const MTPVector &_sets) { return MTP::internal::TypeCreator::new_messages_stickerSetInstallResultArchive(_sets); } inline uint32 MTPstickerSetCovered::innerLength() const { switch (_type) { case mtpc_stickerSetCovered: { const MTPDstickerSetCovered &v(c_stickerSetCovered()); return v.vset.innerLength() + v.vcover.innerLength(); } case mtpc_stickerSetMultiCovered: { const MTPDstickerSetMultiCovered &v(c_stickerSetMultiCovered()); return v.vset.innerLength() + v.vcovers.innerLength(); } } return 0; } inline mtpTypeId MTPstickerSetCovered::type() const { t_assert(_type != 0); return _type; } inline void MTPstickerSetCovered::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_stickerSetCovered: _type = cons; { auto v = new MTPDstickerSetCovered(); setData(v); v->vset.read(from, end); v->vcover.read(from, end); } break; case mtpc_stickerSetMultiCovered: _type = cons; { auto v = new MTPDstickerSetMultiCovered(); setData(v); v->vset.read(from, end); v->vcovers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPstickerSetCovered"); } } inline void MTPstickerSetCovered::write(mtpBuffer &to) const { switch (_type) { case mtpc_stickerSetCovered: { auto &v = c_stickerSetCovered(); v.vset.write(to); v.vcover.write(to); } break; case mtpc_stickerSetMultiCovered: { auto &v = c_stickerSetMultiCovered(); v.vset.write(to); v.vcovers.write(to); } break; } } inline MTPstickerSetCovered::MTPstickerSetCovered(mtpTypeId type) : _type(type) { switch (type) { case mtpc_stickerSetCovered: setData(new MTPDstickerSetCovered()); break; case mtpc_stickerSetMultiCovered: setData(new MTPDstickerSetMultiCovered()); break; default: throw mtpErrorBadTypeId(type, "MTPstickerSetCovered"); } } inline const MTPDstickerSetCovered &MTPstickerSetCovered::c_stickerSetCovered() const { t_assert(_type == mtpc_stickerSetCovered); return queryData(); } inline MTPstickerSetCovered::MTPstickerSetCovered(const MTPDstickerSetCovered *data) : TypeDataOwner(data), _type(mtpc_stickerSetCovered) { } inline const MTPDstickerSetMultiCovered &MTPstickerSetCovered::c_stickerSetMultiCovered() const { t_assert(_type == mtpc_stickerSetMultiCovered); return queryData(); } inline MTPstickerSetCovered::MTPstickerSetCovered(const MTPDstickerSetMultiCovered *data) : TypeDataOwner(data), _type(mtpc_stickerSetMultiCovered) { } inline MTPstickerSetCovered MTP_stickerSetCovered(const MTPStickerSet &_set, const MTPDocument &_cover) { return MTP::internal::TypeCreator::new_stickerSetCovered(_set, _cover); } inline MTPstickerSetCovered MTP_stickerSetMultiCovered(const MTPStickerSet &_set, const MTPVector &_covers) { return MTP::internal::TypeCreator::new_stickerSetMultiCovered(_set, _covers); } inline MTPmaskCoords::MTPmaskCoords() : TypeDataOwner(new MTPDmaskCoords()) { } inline uint32 MTPmaskCoords::innerLength() const { const MTPDmaskCoords &v(c_maskCoords()); return v.vn.innerLength() + v.vx.innerLength() + v.vy.innerLength() + v.vzoom.innerLength(); } inline mtpTypeId MTPmaskCoords::type() const { return mtpc_maskCoords; } inline void MTPmaskCoords::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_maskCoords) throw mtpErrorUnexpected(cons, "MTPmaskCoords"); auto v = new MTPDmaskCoords(); setData(v); v->vn.read(from, end); v->vx.read(from, end); v->vy.read(from, end); v->vzoom.read(from, end); } inline void MTPmaskCoords::write(mtpBuffer &to) const { auto &v = c_maskCoords(); v.vn.write(to); v.vx.write(to); v.vy.write(to); v.vzoom.write(to); } inline const MTPDmaskCoords &MTPmaskCoords::c_maskCoords() const { return queryData(); } inline MTPmaskCoords::MTPmaskCoords(const MTPDmaskCoords *data) : TypeDataOwner(data) { } inline MTPmaskCoords MTP_maskCoords(MTPint _n, const MTPdouble &_x, const MTPdouble &_y, const MTPdouble &_zoom) { return MTP::internal::TypeCreator::new_maskCoords(_n, _x, _y, _zoom); } inline uint32 MTPinputStickeredMedia::innerLength() const { switch (_type) { case mtpc_inputStickeredMediaPhoto: { const MTPDinputStickeredMediaPhoto &v(c_inputStickeredMediaPhoto()); return v.vid.innerLength(); } case mtpc_inputStickeredMediaDocument: { const MTPDinputStickeredMediaDocument &v(c_inputStickeredMediaDocument()); return v.vid.innerLength(); } } return 0; } inline mtpTypeId MTPinputStickeredMedia::type() const { t_assert(_type != 0); return _type; } inline void MTPinputStickeredMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputStickeredMediaPhoto: _type = cons; { auto v = new MTPDinputStickeredMediaPhoto(); setData(v); v->vid.read(from, end); } break; case mtpc_inputStickeredMediaDocument: _type = cons; { auto v = new MTPDinputStickeredMediaDocument(); setData(v); v->vid.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputStickeredMedia"); } } inline void MTPinputStickeredMedia::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputStickeredMediaPhoto: { auto &v = c_inputStickeredMediaPhoto(); v.vid.write(to); } break; case mtpc_inputStickeredMediaDocument: { auto &v = c_inputStickeredMediaDocument(); v.vid.write(to); } break; } } inline MTPinputStickeredMedia::MTPinputStickeredMedia(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputStickeredMediaPhoto: setData(new MTPDinputStickeredMediaPhoto()); break; case mtpc_inputStickeredMediaDocument: setData(new MTPDinputStickeredMediaDocument()); break; default: throw mtpErrorBadTypeId(type, "MTPinputStickeredMedia"); } } inline const MTPDinputStickeredMediaPhoto &MTPinputStickeredMedia::c_inputStickeredMediaPhoto() const { t_assert(_type == mtpc_inputStickeredMediaPhoto); return queryData(); } inline MTPinputStickeredMedia::MTPinputStickeredMedia(const MTPDinputStickeredMediaPhoto *data) : TypeDataOwner(data), _type(mtpc_inputStickeredMediaPhoto) { } inline const MTPDinputStickeredMediaDocument &MTPinputStickeredMedia::c_inputStickeredMediaDocument() const { t_assert(_type == mtpc_inputStickeredMediaDocument); return queryData(); } inline MTPinputStickeredMedia::MTPinputStickeredMedia(const MTPDinputStickeredMediaDocument *data) : TypeDataOwner(data), _type(mtpc_inputStickeredMediaDocument) { } inline MTPinputStickeredMedia MTP_inputStickeredMediaPhoto(const MTPInputPhoto &_id) { return MTP::internal::TypeCreator::new_inputStickeredMediaPhoto(_id); } inline MTPinputStickeredMedia MTP_inputStickeredMediaDocument(const MTPInputDocument &_id) { return MTP::internal::TypeCreator::new_inputStickeredMediaDocument(_id); } inline MTPgame::MTPgame() : TypeDataOwner(new MTPDgame()) { } inline uint32 MTPgame::innerLength() const { const MTPDgame &v(c_game()); return v.vflags.innerLength() + v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vshort_name.innerLength() + v.vtitle.innerLength() + v.vdescription.innerLength() + v.vphoto.innerLength() + (v.has_document() ? v.vdocument.innerLength() : 0); } inline mtpTypeId MTPgame::type() const { return mtpc_game; } inline void MTPgame::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_game) throw mtpErrorUnexpected(cons, "MTPgame"); auto v = new MTPDgame(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vshort_name.read(from, end); v->vtitle.read(from, end); v->vdescription.read(from, end); v->vphoto.read(from, end); if (v->has_document()) { v->vdocument.read(from, end); } else { v->vdocument = MTPDocument(); } } inline void MTPgame::write(mtpBuffer &to) const { auto &v = c_game(); v.vflags.write(to); v.vid.write(to); v.vaccess_hash.write(to); v.vshort_name.write(to); v.vtitle.write(to); v.vdescription.write(to); v.vphoto.write(to); if (v.has_document()) v.vdocument.write(to); } inline const MTPDgame &MTPgame::c_game() const { return queryData(); } inline MTPgame::MTPgame(const MTPDgame *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDgame::Flags) inline MTPgame MTP_game(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, const MTPstring &_short_name, const MTPstring &_title, const MTPstring &_description, const MTPPhoto &_photo, const MTPDocument &_document) { return MTP::internal::TypeCreator::new_game(_flags, _id, _access_hash, _short_name, _title, _description, _photo, _document); } inline uint32 MTPinputGame::innerLength() const { switch (_type) { case mtpc_inputGameID: { const MTPDinputGameID &v(c_inputGameID()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } case mtpc_inputGameShortName: { const MTPDinputGameShortName &v(c_inputGameShortName()); return v.vbot_id.innerLength() + v.vshort_name.innerLength(); } } return 0; } inline mtpTypeId MTPinputGame::type() const { t_assert(_type != 0); return _type; } inline void MTPinputGame::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_inputGameID: _type = cons; { auto v = new MTPDinputGameID(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } break; case mtpc_inputGameShortName: _type = cons; { auto v = new MTPDinputGameShortName(); setData(v); v->vbot_id.read(from, end); v->vshort_name.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputGame"); } } inline void MTPinputGame::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputGameID: { auto &v = c_inputGameID(); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputGameShortName: { auto &v = c_inputGameShortName(); v.vbot_id.write(to); v.vshort_name.write(to); } break; } } inline MTPinputGame::MTPinputGame(mtpTypeId type) : _type(type) { switch (type) { case mtpc_inputGameID: setData(new MTPDinputGameID()); break; case mtpc_inputGameShortName: setData(new MTPDinputGameShortName()); break; default: throw mtpErrorBadTypeId(type, "MTPinputGame"); } } inline const MTPDinputGameID &MTPinputGame::c_inputGameID() const { t_assert(_type == mtpc_inputGameID); return queryData(); } inline MTPinputGame::MTPinputGame(const MTPDinputGameID *data) : TypeDataOwner(data), _type(mtpc_inputGameID) { } inline const MTPDinputGameShortName &MTPinputGame::c_inputGameShortName() const { t_assert(_type == mtpc_inputGameShortName); return queryData(); } inline MTPinputGame::MTPinputGame(const MTPDinputGameShortName *data) : TypeDataOwner(data), _type(mtpc_inputGameShortName) { } inline MTPinputGame MTP_inputGameID(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputGameID(_id, _access_hash); } inline MTPinputGame MTP_inputGameShortName(const MTPInputUser &_bot_id, const MTPstring &_short_name) { return MTP::internal::TypeCreator::new_inputGameShortName(_bot_id, _short_name); } inline MTPhighScore::MTPhighScore() : TypeDataOwner(new MTPDhighScore()) { } inline uint32 MTPhighScore::innerLength() const { const MTPDhighScore &v(c_highScore()); return v.vpos.innerLength() + v.vuser_id.innerLength() + v.vscore.innerLength(); } inline mtpTypeId MTPhighScore::type() const { return mtpc_highScore; } inline void MTPhighScore::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_highScore) throw mtpErrorUnexpected(cons, "MTPhighScore"); auto v = new MTPDhighScore(); setData(v); v->vpos.read(from, end); v->vuser_id.read(from, end); v->vscore.read(from, end); } inline void MTPhighScore::write(mtpBuffer &to) const { auto &v = c_highScore(); v.vpos.write(to); v.vuser_id.write(to); v.vscore.write(to); } inline const MTPDhighScore &MTPhighScore::c_highScore() const { return queryData(); } inline MTPhighScore::MTPhighScore(const MTPDhighScore *data) : TypeDataOwner(data) { } inline MTPhighScore MTP_highScore(MTPint _pos, MTPint _user_id, MTPint _score) { return MTP::internal::TypeCreator::new_highScore(_pos, _user_id, _score); } inline MTPmessages_highScores::MTPmessages_highScores() : TypeDataOwner(new MTPDmessages_highScores()) { } inline uint32 MTPmessages_highScores::innerLength() const { const MTPDmessages_highScores &v(c_messages_highScores()); return v.vscores.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPmessages_highScores::type() const { return mtpc_messages_highScores; } inline void MTPmessages_highScores::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_highScores) throw mtpErrorUnexpected(cons, "MTPmessages_highScores"); auto v = new MTPDmessages_highScores(); setData(v); v->vscores.read(from, end); v->vusers.read(from, end); } inline void MTPmessages_highScores::write(mtpBuffer &to) const { auto &v = c_messages_highScores(); v.vscores.write(to); v.vusers.write(to); } inline const MTPDmessages_highScores &MTPmessages_highScores::c_messages_highScores() const { return queryData(); } inline MTPmessages_highScores::MTPmessages_highScores(const MTPDmessages_highScores *data) : TypeDataOwner(data) { } inline MTPmessages_highScores MTP_messages_highScores(const MTPVector &_scores, const MTPVector &_users) { return MTP::internal::TypeCreator::new_messages_highScores(_scores, _users); } inline uint32 MTPrichText::innerLength() const { switch (_type) { case mtpc_textPlain: { const MTPDtextPlain &v(c_textPlain()); return v.vtext.innerLength(); } case mtpc_textBold: { const MTPDtextBold &v(c_textBold()); return v.vtext.innerLength(); } case mtpc_textItalic: { const MTPDtextItalic &v(c_textItalic()); return v.vtext.innerLength(); } case mtpc_textUnderline: { const MTPDtextUnderline &v(c_textUnderline()); return v.vtext.innerLength(); } case mtpc_textStrike: { const MTPDtextStrike &v(c_textStrike()); return v.vtext.innerLength(); } case mtpc_textFixed: { const MTPDtextFixed &v(c_textFixed()); return v.vtext.innerLength(); } case mtpc_textUrl: { const MTPDtextUrl &v(c_textUrl()); return v.vtext.innerLength() + v.vurl.innerLength() + v.vwebpage_id.innerLength(); } case mtpc_textEmail: { const MTPDtextEmail &v(c_textEmail()); return v.vtext.innerLength() + v.vemail.innerLength(); } case mtpc_textConcat: { const MTPDtextConcat &v(c_textConcat()); return v.vtexts.innerLength(); } } return 0; } inline mtpTypeId MTPrichText::type() const { t_assert(_type != 0); return _type; } inline void MTPrichText::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_textEmpty: _type = cons; break; case mtpc_textPlain: _type = cons; { auto v = new MTPDtextPlain(); setData(v); v->vtext.read(from, end); } break; case mtpc_textBold: _type = cons; { auto v = new MTPDtextBold(); setData(v); v->vtext.read(from, end); } break; case mtpc_textItalic: _type = cons; { auto v = new MTPDtextItalic(); setData(v); v->vtext.read(from, end); } break; case mtpc_textUnderline: _type = cons; { auto v = new MTPDtextUnderline(); setData(v); v->vtext.read(from, end); } break; case mtpc_textStrike: _type = cons; { auto v = new MTPDtextStrike(); setData(v); v->vtext.read(from, end); } break; case mtpc_textFixed: _type = cons; { auto v = new MTPDtextFixed(); setData(v); v->vtext.read(from, end); } break; case mtpc_textUrl: _type = cons; { auto v = new MTPDtextUrl(); setData(v); v->vtext.read(from, end); v->vurl.read(from, end); v->vwebpage_id.read(from, end); } break; case mtpc_textEmail: _type = cons; { auto v = new MTPDtextEmail(); setData(v); v->vtext.read(from, end); v->vemail.read(from, end); } break; case mtpc_textConcat: _type = cons; { auto v = new MTPDtextConcat(); setData(v); v->vtexts.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPrichText"); } } inline void MTPrichText::write(mtpBuffer &to) const { switch (_type) { case mtpc_textPlain: { auto &v = c_textPlain(); v.vtext.write(to); } break; case mtpc_textBold: { auto &v = c_textBold(); v.vtext.write(to); } break; case mtpc_textItalic: { auto &v = c_textItalic(); v.vtext.write(to); } break; case mtpc_textUnderline: { auto &v = c_textUnderline(); v.vtext.write(to); } break; case mtpc_textStrike: { auto &v = c_textStrike(); v.vtext.write(to); } break; case mtpc_textFixed: { auto &v = c_textFixed(); v.vtext.write(to); } break; case mtpc_textUrl: { auto &v = c_textUrl(); v.vtext.write(to); v.vurl.write(to); v.vwebpage_id.write(to); } break; case mtpc_textEmail: { auto &v = c_textEmail(); v.vtext.write(to); v.vemail.write(to); } break; case mtpc_textConcat: { auto &v = c_textConcat(); v.vtexts.write(to); } break; } } inline MTPrichText::MTPrichText(mtpTypeId type) : _type(type) { switch (type) { case mtpc_textEmpty: break; case mtpc_textPlain: setData(new MTPDtextPlain()); break; case mtpc_textBold: setData(new MTPDtextBold()); break; case mtpc_textItalic: setData(new MTPDtextItalic()); break; case mtpc_textUnderline: setData(new MTPDtextUnderline()); break; case mtpc_textStrike: setData(new MTPDtextStrike()); break; case mtpc_textFixed: setData(new MTPDtextFixed()); break; case mtpc_textUrl: setData(new MTPDtextUrl()); break; case mtpc_textEmail: setData(new MTPDtextEmail()); break; case mtpc_textConcat: setData(new MTPDtextConcat()); break; default: throw mtpErrorBadTypeId(type, "MTPrichText"); } } inline const MTPDtextPlain &MTPrichText::c_textPlain() const { t_assert(_type == mtpc_textPlain); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextPlain *data) : TypeDataOwner(data), _type(mtpc_textPlain) { } inline const MTPDtextBold &MTPrichText::c_textBold() const { t_assert(_type == mtpc_textBold); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextBold *data) : TypeDataOwner(data), _type(mtpc_textBold) { } inline const MTPDtextItalic &MTPrichText::c_textItalic() const { t_assert(_type == mtpc_textItalic); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextItalic *data) : TypeDataOwner(data), _type(mtpc_textItalic) { } inline const MTPDtextUnderline &MTPrichText::c_textUnderline() const { t_assert(_type == mtpc_textUnderline); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextUnderline *data) : TypeDataOwner(data), _type(mtpc_textUnderline) { } inline const MTPDtextStrike &MTPrichText::c_textStrike() const { t_assert(_type == mtpc_textStrike); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextStrike *data) : TypeDataOwner(data), _type(mtpc_textStrike) { } inline const MTPDtextFixed &MTPrichText::c_textFixed() const { t_assert(_type == mtpc_textFixed); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextFixed *data) : TypeDataOwner(data), _type(mtpc_textFixed) { } inline const MTPDtextUrl &MTPrichText::c_textUrl() const { t_assert(_type == mtpc_textUrl); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextUrl *data) : TypeDataOwner(data), _type(mtpc_textUrl) { } inline const MTPDtextEmail &MTPrichText::c_textEmail() const { t_assert(_type == mtpc_textEmail); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextEmail *data) : TypeDataOwner(data), _type(mtpc_textEmail) { } inline const MTPDtextConcat &MTPrichText::c_textConcat() const { t_assert(_type == mtpc_textConcat); return queryData(); } inline MTPrichText::MTPrichText(const MTPDtextConcat *data) : TypeDataOwner(data), _type(mtpc_textConcat) { } inline MTPrichText MTP_textEmpty() { return MTP::internal::TypeCreator::new_textEmpty(); } inline MTPrichText MTP_textPlain(const MTPstring &_text) { return MTP::internal::TypeCreator::new_textPlain(_text); } inline MTPrichText MTP_textBold(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_textBold(_text); } inline MTPrichText MTP_textItalic(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_textItalic(_text); } inline MTPrichText MTP_textUnderline(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_textUnderline(_text); } inline MTPrichText MTP_textStrike(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_textStrike(_text); } inline MTPrichText MTP_textFixed(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_textFixed(_text); } inline MTPrichText MTP_textUrl(const MTPRichText &_text, const MTPstring &_url, const MTPlong &_webpage_id) { return MTP::internal::TypeCreator::new_textUrl(_text, _url, _webpage_id); } inline MTPrichText MTP_textEmail(const MTPRichText &_text, const MTPstring &_email) { return MTP::internal::TypeCreator::new_textEmail(_text, _email); } inline MTPrichText MTP_textConcat(const MTPVector &_texts) { return MTP::internal::TypeCreator::new_textConcat(_texts); } inline uint32 MTPpageBlock::innerLength() const { switch (_type) { case mtpc_pageBlockTitle: { const MTPDpageBlockTitle &v(c_pageBlockTitle()); return v.vtext.innerLength(); } case mtpc_pageBlockSubtitle: { const MTPDpageBlockSubtitle &v(c_pageBlockSubtitle()); return v.vtext.innerLength(); } case mtpc_pageBlockAuthorDate: { const MTPDpageBlockAuthorDate &v(c_pageBlockAuthorDate()); return v.vauthor.innerLength() + v.vpublished_date.innerLength(); } case mtpc_pageBlockHeader: { const MTPDpageBlockHeader &v(c_pageBlockHeader()); return v.vtext.innerLength(); } case mtpc_pageBlockSubheader: { const MTPDpageBlockSubheader &v(c_pageBlockSubheader()); return v.vtext.innerLength(); } case mtpc_pageBlockParagraph: { const MTPDpageBlockParagraph &v(c_pageBlockParagraph()); return v.vtext.innerLength(); } case mtpc_pageBlockPreformatted: { const MTPDpageBlockPreformatted &v(c_pageBlockPreformatted()); return v.vtext.innerLength() + v.vlanguage.innerLength(); } case mtpc_pageBlockFooter: { const MTPDpageBlockFooter &v(c_pageBlockFooter()); return v.vtext.innerLength(); } case mtpc_pageBlockAnchor: { const MTPDpageBlockAnchor &v(c_pageBlockAnchor()); return v.vname.innerLength(); } case mtpc_pageBlockList: { const MTPDpageBlockList &v(c_pageBlockList()); return v.vordered.innerLength() + v.vitems.innerLength(); } case mtpc_pageBlockBlockquote: { const MTPDpageBlockBlockquote &v(c_pageBlockBlockquote()); return v.vtext.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockPullquote: { const MTPDpageBlockPullquote &v(c_pageBlockPullquote()); return v.vtext.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockPhoto: { const MTPDpageBlockPhoto &v(c_pageBlockPhoto()); return v.vphoto_id.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockVideo: { const MTPDpageBlockVideo &v(c_pageBlockVideo()); return v.vflags.innerLength() + v.vvideo_id.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockCover: { const MTPDpageBlockCover &v(c_pageBlockCover()); return v.vcover.innerLength(); } case mtpc_pageBlockEmbed: { const MTPDpageBlockEmbed &v(c_pageBlockEmbed()); return v.vflags.innerLength() + (v.has_url() ? v.vurl.innerLength() : 0) + (v.has_html() ? v.vhtml.innerLength() : 0) + (v.has_poster_photo_id() ? v.vposter_photo_id.innerLength() : 0) + v.vw.innerLength() + v.vh.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockEmbedPost: { const MTPDpageBlockEmbedPost &v(c_pageBlockEmbedPost()); return v.vurl.innerLength() + v.vwebpage_id.innerLength() + v.vauthor_photo_id.innerLength() + v.vauthor.innerLength() + v.vdate.innerLength() + v.vblocks.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockCollage: { const MTPDpageBlockCollage &v(c_pageBlockCollage()); return v.vitems.innerLength() + v.vcaption.innerLength(); } case mtpc_pageBlockSlideshow: { const MTPDpageBlockSlideshow &v(c_pageBlockSlideshow()); return v.vitems.innerLength() + v.vcaption.innerLength(); } } return 0; } inline mtpTypeId MTPpageBlock::type() const { t_assert(_type != 0); return _type; } inline void MTPpageBlock::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_pageBlockUnsupported: _type = cons; break; case mtpc_pageBlockTitle: _type = cons; { auto v = new MTPDpageBlockTitle(); setData(v); v->vtext.read(from, end); } break; case mtpc_pageBlockSubtitle: _type = cons; { auto v = new MTPDpageBlockSubtitle(); setData(v); v->vtext.read(from, end); } break; case mtpc_pageBlockAuthorDate: _type = cons; { auto v = new MTPDpageBlockAuthorDate(); setData(v); v->vauthor.read(from, end); v->vpublished_date.read(from, end); } break; case mtpc_pageBlockHeader: _type = cons; { auto v = new MTPDpageBlockHeader(); setData(v); v->vtext.read(from, end); } break; case mtpc_pageBlockSubheader: _type = cons; { auto v = new MTPDpageBlockSubheader(); setData(v); v->vtext.read(from, end); } break; case mtpc_pageBlockParagraph: _type = cons; { auto v = new MTPDpageBlockParagraph(); setData(v); v->vtext.read(from, end); } break; case mtpc_pageBlockPreformatted: _type = cons; { auto v = new MTPDpageBlockPreformatted(); setData(v); v->vtext.read(from, end); v->vlanguage.read(from, end); } break; case mtpc_pageBlockFooter: _type = cons; { auto v = new MTPDpageBlockFooter(); setData(v); v->vtext.read(from, end); } break; case mtpc_pageBlockDivider: _type = cons; break; case mtpc_pageBlockAnchor: _type = cons; { auto v = new MTPDpageBlockAnchor(); setData(v); v->vname.read(from, end); } break; case mtpc_pageBlockList: _type = cons; { auto v = new MTPDpageBlockList(); setData(v); v->vordered.read(from, end); v->vitems.read(from, end); } break; case mtpc_pageBlockBlockquote: _type = cons; { auto v = new MTPDpageBlockBlockquote(); setData(v); v->vtext.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockPullquote: _type = cons; { auto v = new MTPDpageBlockPullquote(); setData(v); v->vtext.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockPhoto: _type = cons; { auto v = new MTPDpageBlockPhoto(); setData(v); v->vphoto_id.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockVideo: _type = cons; { auto v = new MTPDpageBlockVideo(); setData(v); v->vflags.read(from, end); v->vvideo_id.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockCover: _type = cons; { auto v = new MTPDpageBlockCover(); setData(v); v->vcover.read(from, end); } break; case mtpc_pageBlockEmbed: _type = cons; { auto v = new MTPDpageBlockEmbed(); setData(v); v->vflags.read(from, end); if (v->has_url()) { v->vurl.read(from, end); } else { v->vurl = MTPstring(); } if (v->has_html()) { v->vhtml.read(from, end); } else { v->vhtml = MTPstring(); } if (v->has_poster_photo_id()) { v->vposter_photo_id.read(from, end); } else { v->vposter_photo_id = MTPlong(); } v->vw.read(from, end); v->vh.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockEmbedPost: _type = cons; { auto v = new MTPDpageBlockEmbedPost(); setData(v); v->vurl.read(from, end); v->vwebpage_id.read(from, end); v->vauthor_photo_id.read(from, end); v->vauthor.read(from, end); v->vdate.read(from, end); v->vblocks.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockCollage: _type = cons; { auto v = new MTPDpageBlockCollage(); setData(v); v->vitems.read(from, end); v->vcaption.read(from, end); } break; case mtpc_pageBlockSlideshow: _type = cons; { auto v = new MTPDpageBlockSlideshow(); setData(v); v->vitems.read(from, end); v->vcaption.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPpageBlock"); } } inline void MTPpageBlock::write(mtpBuffer &to) const { switch (_type) { case mtpc_pageBlockTitle: { auto &v = c_pageBlockTitle(); v.vtext.write(to); } break; case mtpc_pageBlockSubtitle: { auto &v = c_pageBlockSubtitle(); v.vtext.write(to); } break; case mtpc_pageBlockAuthorDate: { auto &v = c_pageBlockAuthorDate(); v.vauthor.write(to); v.vpublished_date.write(to); } break; case mtpc_pageBlockHeader: { auto &v = c_pageBlockHeader(); v.vtext.write(to); } break; case mtpc_pageBlockSubheader: { auto &v = c_pageBlockSubheader(); v.vtext.write(to); } break; case mtpc_pageBlockParagraph: { auto &v = c_pageBlockParagraph(); v.vtext.write(to); } break; case mtpc_pageBlockPreformatted: { auto &v = c_pageBlockPreformatted(); v.vtext.write(to); v.vlanguage.write(to); } break; case mtpc_pageBlockFooter: { auto &v = c_pageBlockFooter(); v.vtext.write(to); } break; case mtpc_pageBlockAnchor: { auto &v = c_pageBlockAnchor(); v.vname.write(to); } break; case mtpc_pageBlockList: { auto &v = c_pageBlockList(); v.vordered.write(to); v.vitems.write(to); } break; case mtpc_pageBlockBlockquote: { auto &v = c_pageBlockBlockquote(); v.vtext.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockPullquote: { auto &v = c_pageBlockPullquote(); v.vtext.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockPhoto: { auto &v = c_pageBlockPhoto(); v.vphoto_id.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockVideo: { auto &v = c_pageBlockVideo(); v.vflags.write(to); v.vvideo_id.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockCover: { auto &v = c_pageBlockCover(); v.vcover.write(to); } break; case mtpc_pageBlockEmbed: { auto &v = c_pageBlockEmbed(); v.vflags.write(to); if (v.has_url()) v.vurl.write(to); if (v.has_html()) v.vhtml.write(to); if (v.has_poster_photo_id()) v.vposter_photo_id.write(to); v.vw.write(to); v.vh.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockEmbedPost: { auto &v = c_pageBlockEmbedPost(); v.vurl.write(to); v.vwebpage_id.write(to); v.vauthor_photo_id.write(to); v.vauthor.write(to); v.vdate.write(to); v.vblocks.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockCollage: { auto &v = c_pageBlockCollage(); v.vitems.write(to); v.vcaption.write(to); } break; case mtpc_pageBlockSlideshow: { auto &v = c_pageBlockSlideshow(); v.vitems.write(to); v.vcaption.write(to); } break; } } inline MTPpageBlock::MTPpageBlock(mtpTypeId type) : _type(type) { switch (type) { case mtpc_pageBlockUnsupported: break; case mtpc_pageBlockTitle: setData(new MTPDpageBlockTitle()); break; case mtpc_pageBlockSubtitle: setData(new MTPDpageBlockSubtitle()); break; case mtpc_pageBlockAuthorDate: setData(new MTPDpageBlockAuthorDate()); break; case mtpc_pageBlockHeader: setData(new MTPDpageBlockHeader()); break; case mtpc_pageBlockSubheader: setData(new MTPDpageBlockSubheader()); break; case mtpc_pageBlockParagraph: setData(new MTPDpageBlockParagraph()); break; case mtpc_pageBlockPreformatted: setData(new MTPDpageBlockPreformatted()); break; case mtpc_pageBlockFooter: setData(new MTPDpageBlockFooter()); break; case mtpc_pageBlockDivider: break; case mtpc_pageBlockAnchor: setData(new MTPDpageBlockAnchor()); break; case mtpc_pageBlockList: setData(new MTPDpageBlockList()); break; case mtpc_pageBlockBlockquote: setData(new MTPDpageBlockBlockquote()); break; case mtpc_pageBlockPullquote: setData(new MTPDpageBlockPullquote()); break; case mtpc_pageBlockPhoto: setData(new MTPDpageBlockPhoto()); break; case mtpc_pageBlockVideo: setData(new MTPDpageBlockVideo()); break; case mtpc_pageBlockCover: setData(new MTPDpageBlockCover()); break; case mtpc_pageBlockEmbed: setData(new MTPDpageBlockEmbed()); break; case mtpc_pageBlockEmbedPost: setData(new MTPDpageBlockEmbedPost()); break; case mtpc_pageBlockCollage: setData(new MTPDpageBlockCollage()); break; case mtpc_pageBlockSlideshow: setData(new MTPDpageBlockSlideshow()); break; default: throw mtpErrorBadTypeId(type, "MTPpageBlock"); } } inline const MTPDpageBlockTitle &MTPpageBlock::c_pageBlockTitle() const { t_assert(_type == mtpc_pageBlockTitle); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockTitle *data) : TypeDataOwner(data), _type(mtpc_pageBlockTitle) { } inline const MTPDpageBlockSubtitle &MTPpageBlock::c_pageBlockSubtitle() const { t_assert(_type == mtpc_pageBlockSubtitle); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockSubtitle *data) : TypeDataOwner(data), _type(mtpc_pageBlockSubtitle) { } inline const MTPDpageBlockAuthorDate &MTPpageBlock::c_pageBlockAuthorDate() const { t_assert(_type == mtpc_pageBlockAuthorDate); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockAuthorDate *data) : TypeDataOwner(data), _type(mtpc_pageBlockAuthorDate) { } inline const MTPDpageBlockHeader &MTPpageBlock::c_pageBlockHeader() const { t_assert(_type == mtpc_pageBlockHeader); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockHeader *data) : TypeDataOwner(data), _type(mtpc_pageBlockHeader) { } inline const MTPDpageBlockSubheader &MTPpageBlock::c_pageBlockSubheader() const { t_assert(_type == mtpc_pageBlockSubheader); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockSubheader *data) : TypeDataOwner(data), _type(mtpc_pageBlockSubheader) { } inline const MTPDpageBlockParagraph &MTPpageBlock::c_pageBlockParagraph() const { t_assert(_type == mtpc_pageBlockParagraph); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockParagraph *data) : TypeDataOwner(data), _type(mtpc_pageBlockParagraph) { } inline const MTPDpageBlockPreformatted &MTPpageBlock::c_pageBlockPreformatted() const { t_assert(_type == mtpc_pageBlockPreformatted); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockPreformatted *data) : TypeDataOwner(data), _type(mtpc_pageBlockPreformatted) { } inline const MTPDpageBlockFooter &MTPpageBlock::c_pageBlockFooter() const { t_assert(_type == mtpc_pageBlockFooter); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockFooter *data) : TypeDataOwner(data), _type(mtpc_pageBlockFooter) { } inline const MTPDpageBlockAnchor &MTPpageBlock::c_pageBlockAnchor() const { t_assert(_type == mtpc_pageBlockAnchor); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockAnchor *data) : TypeDataOwner(data), _type(mtpc_pageBlockAnchor) { } inline const MTPDpageBlockList &MTPpageBlock::c_pageBlockList() const { t_assert(_type == mtpc_pageBlockList); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockList *data) : TypeDataOwner(data), _type(mtpc_pageBlockList) { } inline const MTPDpageBlockBlockquote &MTPpageBlock::c_pageBlockBlockquote() const { t_assert(_type == mtpc_pageBlockBlockquote); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockBlockquote *data) : TypeDataOwner(data), _type(mtpc_pageBlockBlockquote) { } inline const MTPDpageBlockPullquote &MTPpageBlock::c_pageBlockPullquote() const { t_assert(_type == mtpc_pageBlockPullquote); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockPullquote *data) : TypeDataOwner(data), _type(mtpc_pageBlockPullquote) { } inline const MTPDpageBlockPhoto &MTPpageBlock::c_pageBlockPhoto() const { t_assert(_type == mtpc_pageBlockPhoto); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockPhoto *data) : TypeDataOwner(data), _type(mtpc_pageBlockPhoto) { } inline const MTPDpageBlockVideo &MTPpageBlock::c_pageBlockVideo() const { t_assert(_type == mtpc_pageBlockVideo); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockVideo *data) : TypeDataOwner(data), _type(mtpc_pageBlockVideo) { } inline const MTPDpageBlockCover &MTPpageBlock::c_pageBlockCover() const { t_assert(_type == mtpc_pageBlockCover); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockCover *data) : TypeDataOwner(data), _type(mtpc_pageBlockCover) { } inline const MTPDpageBlockEmbed &MTPpageBlock::c_pageBlockEmbed() const { t_assert(_type == mtpc_pageBlockEmbed); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockEmbed *data) : TypeDataOwner(data), _type(mtpc_pageBlockEmbed) { } inline const MTPDpageBlockEmbedPost &MTPpageBlock::c_pageBlockEmbedPost() const { t_assert(_type == mtpc_pageBlockEmbedPost); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockEmbedPost *data) : TypeDataOwner(data), _type(mtpc_pageBlockEmbedPost) { } inline const MTPDpageBlockCollage &MTPpageBlock::c_pageBlockCollage() const { t_assert(_type == mtpc_pageBlockCollage); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockCollage *data) : TypeDataOwner(data), _type(mtpc_pageBlockCollage) { } inline const MTPDpageBlockSlideshow &MTPpageBlock::c_pageBlockSlideshow() const { t_assert(_type == mtpc_pageBlockSlideshow); return queryData(); } inline MTPpageBlock::MTPpageBlock(const MTPDpageBlockSlideshow *data) : TypeDataOwner(data), _type(mtpc_pageBlockSlideshow) { } inline MTPpageBlock MTP_pageBlockUnsupported() { return MTP::internal::TypeCreator::new_pageBlockUnsupported(); } inline MTPpageBlock MTP_pageBlockTitle(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_pageBlockTitle(_text); } inline MTPpageBlock MTP_pageBlockSubtitle(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_pageBlockSubtitle(_text); } inline MTPpageBlock MTP_pageBlockAuthorDate(const MTPRichText &_author, MTPint _published_date) { return MTP::internal::TypeCreator::new_pageBlockAuthorDate(_author, _published_date); } inline MTPpageBlock MTP_pageBlockHeader(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_pageBlockHeader(_text); } inline MTPpageBlock MTP_pageBlockSubheader(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_pageBlockSubheader(_text); } inline MTPpageBlock MTP_pageBlockParagraph(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_pageBlockParagraph(_text); } inline MTPpageBlock MTP_pageBlockPreformatted(const MTPRichText &_text, const MTPstring &_language) { return MTP::internal::TypeCreator::new_pageBlockPreformatted(_text, _language); } inline MTPpageBlock MTP_pageBlockFooter(const MTPRichText &_text) { return MTP::internal::TypeCreator::new_pageBlockFooter(_text); } inline MTPpageBlock MTP_pageBlockDivider() { return MTP::internal::TypeCreator::new_pageBlockDivider(); } inline MTPpageBlock MTP_pageBlockAnchor(const MTPstring &_name) { return MTP::internal::TypeCreator::new_pageBlockAnchor(_name); } inline MTPpageBlock MTP_pageBlockList(MTPBool _ordered, const MTPVector &_items) { return MTP::internal::TypeCreator::new_pageBlockList(_ordered, _items); } inline MTPpageBlock MTP_pageBlockBlockquote(const MTPRichText &_text, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockBlockquote(_text, _caption); } inline MTPpageBlock MTP_pageBlockPullquote(const MTPRichText &_text, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockPullquote(_text, _caption); } inline MTPpageBlock MTP_pageBlockPhoto(const MTPlong &_photo_id, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockPhoto(_photo_id, _caption); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDpageBlockVideo::Flags) inline MTPpageBlock MTP_pageBlockVideo(const MTPflags &_flags, const MTPlong &_video_id, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockVideo(_flags, _video_id, _caption); } inline MTPpageBlock MTP_pageBlockCover(const MTPPageBlock &_cover) { return MTP::internal::TypeCreator::new_pageBlockCover(_cover); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDpageBlockEmbed::Flags) inline MTPpageBlock MTP_pageBlockEmbed(const MTPflags &_flags, const MTPstring &_url, const MTPstring &_html, const MTPlong &_poster_photo_id, MTPint _w, MTPint _h, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockEmbed(_flags, _url, _html, _poster_photo_id, _w, _h, _caption); } inline MTPpageBlock MTP_pageBlockEmbedPost(const MTPstring &_url, const MTPlong &_webpage_id, const MTPlong &_author_photo_id, const MTPstring &_author, MTPint _date, const MTPVector &_blocks, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockEmbedPost(_url, _webpage_id, _author_photo_id, _author, _date, _blocks, _caption); } inline MTPpageBlock MTP_pageBlockCollage(const MTPVector &_items, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockCollage(_items, _caption); } inline MTPpageBlock MTP_pageBlockSlideshow(const MTPVector &_items, const MTPRichText &_caption) { return MTP::internal::TypeCreator::new_pageBlockSlideshow(_items, _caption); } inline uint32 MTPpage::innerLength() const { switch (_type) { case mtpc_pagePart: { const MTPDpagePart &v(c_pagePart()); return v.vblocks.innerLength() + v.vphotos.innerLength() + v.vvideos.innerLength(); } case mtpc_pageFull: { const MTPDpageFull &v(c_pageFull()); return v.vblocks.innerLength() + v.vphotos.innerLength() + v.vvideos.innerLength(); } } return 0; } inline mtpTypeId MTPpage::type() const { t_assert(_type != 0); return _type; } inline void MTPpage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_pagePart: _type = cons; { auto v = new MTPDpagePart(); setData(v); v->vblocks.read(from, end); v->vphotos.read(from, end); v->vvideos.read(from, end); } break; case mtpc_pageFull: _type = cons; { auto v = new MTPDpageFull(); setData(v); v->vblocks.read(from, end); v->vphotos.read(from, end); v->vvideos.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPpage"); } } inline void MTPpage::write(mtpBuffer &to) const { switch (_type) { case mtpc_pagePart: { auto &v = c_pagePart(); v.vblocks.write(to); v.vphotos.write(to); v.vvideos.write(to); } break; case mtpc_pageFull: { auto &v = c_pageFull(); v.vblocks.write(to); v.vphotos.write(to); v.vvideos.write(to); } break; } } inline MTPpage::MTPpage(mtpTypeId type) : _type(type) { switch (type) { case mtpc_pagePart: setData(new MTPDpagePart()); break; case mtpc_pageFull: setData(new MTPDpageFull()); break; default: throw mtpErrorBadTypeId(type, "MTPpage"); } } inline const MTPDpagePart &MTPpage::c_pagePart() const { t_assert(_type == mtpc_pagePart); return queryData(); } inline MTPpage::MTPpage(const MTPDpagePart *data) : TypeDataOwner(data), _type(mtpc_pagePart) { } inline const MTPDpageFull &MTPpage::c_pageFull() const { t_assert(_type == mtpc_pageFull); return queryData(); } inline MTPpage::MTPpage(const MTPDpageFull *data) : TypeDataOwner(data), _type(mtpc_pageFull) { } inline MTPpage MTP_pagePart(const MTPVector &_blocks, const MTPVector &_photos, const MTPVector &_videos) { return MTP::internal::TypeCreator::new_pagePart(_blocks, _photos, _videos); } inline MTPpage MTP_pageFull(const MTPVector &_blocks, const MTPVector &_photos, const MTPVector &_videos) { return MTP::internal::TypeCreator::new_pageFull(_blocks, _photos, _videos); } inline MTPinputPhoneCall::MTPinputPhoneCall() : TypeDataOwner(new MTPDinputPhoneCall()) { } inline uint32 MTPinputPhoneCall::innerLength() const { const MTPDinputPhoneCall &v(c_inputPhoneCall()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } inline mtpTypeId MTPinputPhoneCall::type() const { return mtpc_inputPhoneCall; } inline void MTPinputPhoneCall::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_inputPhoneCall) throw mtpErrorUnexpected(cons, "MTPinputPhoneCall"); auto v = new MTPDinputPhoneCall(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); } inline void MTPinputPhoneCall::write(mtpBuffer &to) const { auto &v = c_inputPhoneCall(); v.vid.write(to); v.vaccess_hash.write(to); } inline const MTPDinputPhoneCall &MTPinputPhoneCall::c_inputPhoneCall() const { return queryData(); } inline MTPinputPhoneCall::MTPinputPhoneCall(const MTPDinputPhoneCall *data) : TypeDataOwner(data) { } inline MTPinputPhoneCall MTP_inputPhoneCall(const MTPlong &_id, const MTPlong &_access_hash) { return MTP::internal::TypeCreator::new_inputPhoneCall(_id, _access_hash); } inline uint32 MTPphoneCall::innerLength() const { switch (_type) { case mtpc_phoneCallEmpty: { const MTPDphoneCallEmpty &v(c_phoneCallEmpty()); return v.vid.innerLength(); } case mtpc_phoneCallWaiting: { const MTPDphoneCallWaiting &v(c_phoneCallWaiting()); return v.vflags.innerLength() + v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vadmin_id.innerLength() + v.vparticipant_id.innerLength() + v.vprotocol.innerLength() + (v.has_receive_date() ? v.vreceive_date.innerLength() : 0); } case mtpc_phoneCallRequested: { const MTPDphoneCallRequested &v(c_phoneCallRequested()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vadmin_id.innerLength() + v.vparticipant_id.innerLength() + v.vg_a.innerLength() + v.vprotocol.innerLength(); } case mtpc_phoneCall: { const MTPDphoneCall &v(c_phoneCall()); return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vadmin_id.innerLength() + v.vparticipant_id.innerLength() + v.vg_a_or_b.innerLength() + v.vkey_fingerprint.innerLength() + v.vprotocol.innerLength() + v.vconnection.innerLength() + v.valternative_connections.innerLength() + v.vstart_date.innerLength(); } case mtpc_phoneCallDiscarded: { const MTPDphoneCallDiscarded &v(c_phoneCallDiscarded()); return v.vflags.innerLength() + v.vid.innerLength() + (v.has_reason() ? v.vreason.innerLength() : 0) + (v.has_duration() ? v.vduration.innerLength() : 0); } } return 0; } inline mtpTypeId MTPphoneCall::type() const { t_assert(_type != 0); return _type; } inline void MTPphoneCall::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_phoneCallEmpty: _type = cons; { auto v = new MTPDphoneCallEmpty(); setData(v); v->vid.read(from, end); } break; case mtpc_phoneCallWaiting: _type = cons; { auto v = new MTPDphoneCallWaiting(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vadmin_id.read(from, end); v->vparticipant_id.read(from, end); v->vprotocol.read(from, end); if (v->has_receive_date()) { v->vreceive_date.read(from, end); } else { v->vreceive_date = MTPint(); } } break; case mtpc_phoneCallRequested: _type = cons; { auto v = new MTPDphoneCallRequested(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vadmin_id.read(from, end); v->vparticipant_id.read(from, end); v->vg_a.read(from, end); v->vprotocol.read(from, end); } break; case mtpc_phoneCall: _type = cons; { auto v = new MTPDphoneCall(); setData(v); v->vid.read(from, end); v->vaccess_hash.read(from, end); v->vdate.read(from, end); v->vadmin_id.read(from, end); v->vparticipant_id.read(from, end); v->vg_a_or_b.read(from, end); v->vkey_fingerprint.read(from, end); v->vprotocol.read(from, end); v->vconnection.read(from, end); v->valternative_connections.read(from, end); v->vstart_date.read(from, end); } break; case mtpc_phoneCallDiscarded: _type = cons; { auto v = new MTPDphoneCallDiscarded(); setData(v); v->vflags.read(from, end); v->vid.read(from, end); if (v->has_reason()) { v->vreason.read(from, end); } else { v->vreason = MTPPhoneCallDiscardReason(); } if (v->has_duration()) { v->vduration.read(from, end); } else { v->vduration = MTPint(); } } break; default: throw mtpErrorUnexpected(cons, "MTPphoneCall"); } } inline void MTPphoneCall::write(mtpBuffer &to) const { switch (_type) { case mtpc_phoneCallEmpty: { auto &v = c_phoneCallEmpty(); v.vid.write(to); } break; case mtpc_phoneCallWaiting: { auto &v = c_phoneCallWaiting(); v.vflags.write(to); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vadmin_id.write(to); v.vparticipant_id.write(to); v.vprotocol.write(to); if (v.has_receive_date()) v.vreceive_date.write(to); } break; case mtpc_phoneCallRequested: { auto &v = c_phoneCallRequested(); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vadmin_id.write(to); v.vparticipant_id.write(to); v.vg_a.write(to); v.vprotocol.write(to); } break; case mtpc_phoneCall: { auto &v = c_phoneCall(); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vadmin_id.write(to); v.vparticipant_id.write(to); v.vg_a_or_b.write(to); v.vkey_fingerprint.write(to); v.vprotocol.write(to); v.vconnection.write(to); v.valternative_connections.write(to); v.vstart_date.write(to); } break; case mtpc_phoneCallDiscarded: { auto &v = c_phoneCallDiscarded(); v.vflags.write(to); v.vid.write(to); if (v.has_reason()) v.vreason.write(to); if (v.has_duration()) v.vduration.write(to); } break; } } inline MTPphoneCall::MTPphoneCall(mtpTypeId type) : _type(type) { switch (type) { case mtpc_phoneCallEmpty: setData(new MTPDphoneCallEmpty()); break; case mtpc_phoneCallWaiting: setData(new MTPDphoneCallWaiting()); break; case mtpc_phoneCallRequested: setData(new MTPDphoneCallRequested()); break; case mtpc_phoneCall: setData(new MTPDphoneCall()); break; case mtpc_phoneCallDiscarded: setData(new MTPDphoneCallDiscarded()); break; default: throw mtpErrorBadTypeId(type, "MTPphoneCall"); } } inline const MTPDphoneCallEmpty &MTPphoneCall::c_phoneCallEmpty() const { t_assert(_type == mtpc_phoneCallEmpty); return queryData(); } inline MTPphoneCall::MTPphoneCall(const MTPDphoneCallEmpty *data) : TypeDataOwner(data), _type(mtpc_phoneCallEmpty) { } inline const MTPDphoneCallWaiting &MTPphoneCall::c_phoneCallWaiting() const { t_assert(_type == mtpc_phoneCallWaiting); return queryData(); } inline MTPphoneCall::MTPphoneCall(const MTPDphoneCallWaiting *data) : TypeDataOwner(data), _type(mtpc_phoneCallWaiting) { } inline const MTPDphoneCallRequested &MTPphoneCall::c_phoneCallRequested() const { t_assert(_type == mtpc_phoneCallRequested); return queryData(); } inline MTPphoneCall::MTPphoneCall(const MTPDphoneCallRequested *data) : TypeDataOwner(data), _type(mtpc_phoneCallRequested) { } inline const MTPDphoneCall &MTPphoneCall::c_phoneCall() const { t_assert(_type == mtpc_phoneCall); return queryData(); } inline MTPphoneCall::MTPphoneCall(const MTPDphoneCall *data) : TypeDataOwner(data), _type(mtpc_phoneCall) { } inline const MTPDphoneCallDiscarded &MTPphoneCall::c_phoneCallDiscarded() const { t_assert(_type == mtpc_phoneCallDiscarded); return queryData(); } inline MTPphoneCall::MTPphoneCall(const MTPDphoneCallDiscarded *data) : TypeDataOwner(data), _type(mtpc_phoneCallDiscarded) { } inline MTPphoneCall MTP_phoneCallEmpty(const MTPlong &_id) { return MTP::internal::TypeCreator::new_phoneCallEmpty(_id); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDphoneCallWaiting::Flags) inline MTPphoneCall MTP_phoneCallWaiting(const MTPflags &_flags, const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPPhoneCallProtocol &_protocol, MTPint _receive_date) { return MTP::internal::TypeCreator::new_phoneCallWaiting(_flags, _id, _access_hash, _date, _admin_id, _participant_id, _protocol, _receive_date); } inline MTPphoneCall MTP_phoneCallRequested(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a, const MTPPhoneCallProtocol &_protocol) { return MTP::internal::TypeCreator::new_phoneCallRequested(_id, _access_hash, _date, _admin_id, _participant_id, _g_a, _protocol); } inline MTPphoneCall MTP_phoneCall(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _admin_id, MTPint _participant_id, const MTPbytes &_g_a_or_b, const MTPlong &_key_fingerprint, const MTPPhoneCallProtocol &_protocol, const MTPPhoneConnection &_connection, const MTPVector &_alternative_connections, MTPint _start_date) { return MTP::internal::TypeCreator::new_phoneCall(_id, _access_hash, _date, _admin_id, _participant_id, _g_a_or_b, _key_fingerprint, _protocol, _connection, _alternative_connections, _start_date); } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDphoneCallDiscarded::Flags) inline MTPphoneCall MTP_phoneCallDiscarded(const MTPflags &_flags, const MTPlong &_id, const MTPPhoneCallDiscardReason &_reason, MTPint _duration) { return MTP::internal::TypeCreator::new_phoneCallDiscarded(_flags, _id, _reason, _duration); } inline MTPphoneConnection::MTPphoneConnection() : TypeDataOwner(new MTPDphoneConnection()) { } inline uint32 MTPphoneConnection::innerLength() const { const MTPDphoneConnection &v(c_phoneConnection()); return v.vid.innerLength() + v.vip.innerLength() + v.vipv6.innerLength() + v.vport.innerLength() + v.vpeer_tag.innerLength(); } inline mtpTypeId MTPphoneConnection::type() const { return mtpc_phoneConnection; } inline void MTPphoneConnection::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_phoneConnection) throw mtpErrorUnexpected(cons, "MTPphoneConnection"); auto v = new MTPDphoneConnection(); setData(v); v->vid.read(from, end); v->vip.read(from, end); v->vipv6.read(from, end); v->vport.read(from, end); v->vpeer_tag.read(from, end); } inline void MTPphoneConnection::write(mtpBuffer &to) const { auto &v = c_phoneConnection(); v.vid.write(to); v.vip.write(to); v.vipv6.write(to); v.vport.write(to); v.vpeer_tag.write(to); } inline const MTPDphoneConnection &MTPphoneConnection::c_phoneConnection() const { return queryData(); } inline MTPphoneConnection::MTPphoneConnection(const MTPDphoneConnection *data) : TypeDataOwner(data) { } inline MTPphoneConnection MTP_phoneConnection(const MTPlong &_id, const MTPstring &_ip, const MTPstring &_ipv6, MTPint _port, const MTPbytes &_peer_tag) { return MTP::internal::TypeCreator::new_phoneConnection(_id, _ip, _ipv6, _port, _peer_tag); } inline MTPphoneCallProtocol::MTPphoneCallProtocol() : TypeDataOwner(new MTPDphoneCallProtocol()) { } inline uint32 MTPphoneCallProtocol::innerLength() const { const MTPDphoneCallProtocol &v(c_phoneCallProtocol()); return v.vflags.innerLength() + v.vmin_layer.innerLength() + v.vmax_layer.innerLength(); } inline mtpTypeId MTPphoneCallProtocol::type() const { return mtpc_phoneCallProtocol; } inline void MTPphoneCallProtocol::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_phoneCallProtocol) throw mtpErrorUnexpected(cons, "MTPphoneCallProtocol"); auto v = new MTPDphoneCallProtocol(); setData(v); v->vflags.read(from, end); v->vmin_layer.read(from, end); v->vmax_layer.read(from, end); } inline void MTPphoneCallProtocol::write(mtpBuffer &to) const { auto &v = c_phoneCallProtocol(); v.vflags.write(to); v.vmin_layer.write(to); v.vmax_layer.write(to); } inline const MTPDphoneCallProtocol &MTPphoneCallProtocol::c_phoneCallProtocol() const { return queryData(); } inline MTPphoneCallProtocol::MTPphoneCallProtocol(const MTPDphoneCallProtocol *data) : TypeDataOwner(data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDphoneCallProtocol::Flags) inline MTPphoneCallProtocol MTP_phoneCallProtocol(const MTPflags &_flags, MTPint _min_layer, MTPint _max_layer) { return MTP::internal::TypeCreator::new_phoneCallProtocol(_flags, _min_layer, _max_layer); } inline MTPphone_phoneCall::MTPphone_phoneCall() : TypeDataOwner(new MTPDphone_phoneCall()) { } inline uint32 MTPphone_phoneCall::innerLength() const { const MTPDphone_phoneCall &v(c_phone_phoneCall()); return v.vphone_call.innerLength() + v.vusers.innerLength(); } inline mtpTypeId MTPphone_phoneCall::type() const { return mtpc_phone_phoneCall; } inline void MTPphone_phoneCall::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_phone_phoneCall) throw mtpErrorUnexpected(cons, "MTPphone_phoneCall"); auto v = new MTPDphone_phoneCall(); setData(v); v->vphone_call.read(from, end); v->vusers.read(from, end); } inline void MTPphone_phoneCall::write(mtpBuffer &to) const { auto &v = c_phone_phoneCall(); v.vphone_call.write(to); v.vusers.write(to); } inline const MTPDphone_phoneCall &MTPphone_phoneCall::c_phone_phoneCall() const { return queryData(); } inline MTPphone_phoneCall::MTPphone_phoneCall(const MTPDphone_phoneCall *data) : TypeDataOwner(data) { } inline MTPphone_phoneCall MTP_phone_phoneCall(const MTPPhoneCall &_phone_call, const MTPVector &_users) { return MTP::internal::TypeCreator::new_phone_phoneCall(_phone_call, _users); } inline uint32 MTPphoneCallDiscardReason::innerLength() const { return 0; } inline mtpTypeId MTPphoneCallDiscardReason::type() const { t_assert(_type != 0); return _type; } inline void MTPphoneCallDiscardReason::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { switch (cons) { case mtpc_phoneCallDiscardReasonMissed: _type = cons; break; case mtpc_phoneCallDiscardReasonDisconnect: _type = cons; break; case mtpc_phoneCallDiscardReasonHangup: _type = cons; break; case mtpc_phoneCallDiscardReasonBusy: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPphoneCallDiscardReason"); } } inline void MTPphoneCallDiscardReason::write(mtpBuffer &to) const { } inline MTPphoneCallDiscardReason::MTPphoneCallDiscardReason(mtpTypeId type) : _type(type) { switch (type) { case mtpc_phoneCallDiscardReasonMissed: break; case mtpc_phoneCallDiscardReasonDisconnect: break; case mtpc_phoneCallDiscardReasonHangup: break; case mtpc_phoneCallDiscardReasonBusy: break; default: throw mtpErrorBadTypeId(type, "MTPphoneCallDiscardReason"); } } inline MTPphoneCallDiscardReason MTP_phoneCallDiscardReasonMissed() { return MTP::internal::TypeCreator::new_phoneCallDiscardReasonMissed(); } inline MTPphoneCallDiscardReason MTP_phoneCallDiscardReasonDisconnect() { return MTP::internal::TypeCreator::new_phoneCallDiscardReasonDisconnect(); } inline MTPphoneCallDiscardReason MTP_phoneCallDiscardReasonHangup() { return MTP::internal::TypeCreator::new_phoneCallDiscardReasonHangup(); } inline MTPphoneCallDiscardReason MTP_phoneCallDiscardReasonBusy() { return MTP::internal::TypeCreator::new_phoneCallDiscardReasonBusy(); } inline MTPDmessage::Flags mtpCastFlags(MTPDmessageService::Flags flags) { return MTPDmessage::Flags(QFlag(flags)); } inline MTPDmessage::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDmessage::Flags mtpCastFlags(MTPDupdateShortMessage::Flags flags) { return MTPDmessage::Flags(QFlag(flags)); } inline MTPDmessage::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDmessage::Flags mtpCastFlags(MTPDupdateShortChatMessage::Flags flags) { return MTPDmessage::Flags(QFlag(flags)); } inline MTPDmessage::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDmessage::Flags mtpCastFlags(MTPDupdateShortSentMessage::Flags flags) { return MTPDmessage::Flags(QFlag(flags)); } inline MTPDmessage::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDreplyKeyboardMarkup::Flags mtpCastFlags(MTPDreplyKeyboardHide::Flags flags) { return MTPDreplyKeyboardMarkup::Flags(QFlag(flags)); } inline MTPDreplyKeyboardMarkup::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDreplyKeyboardMarkup::Flags mtpCastFlags(MTPDreplyKeyboardForceReply::Flags flags) { return MTPDreplyKeyboardMarkup::Flags(QFlag(flags)); } inline MTPDreplyKeyboardMarkup::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDpeerNotifySettings::Flags mtpCastFlags(MTPDinputPeerNotifySettings::Flags flags) { return MTPDpeerNotifySettings::Flags(QFlag(flags)); } inline MTPDpeerNotifySettings::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDinputPeerNotifySettings::Flags mtpCastFlags(MTPDpeerNotifySettings::Flags flags) { return MTPDinputPeerNotifySettings::Flags(QFlag(flags)); } inline MTPDinputPeerNotifySettings::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } inline MTPDchannel::Flags mtpCastFlags(MTPDchannelForbidden::Flags flags) { return MTPDchannel::Flags(QFlag(flags)); } inline MTPDchannel::Flags mtpCastFlags(MTPflags flags) { return mtpCastFlags(flags.v); } // Human-readable text serialization void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpPrime *end, mtpPrime cons, uint32 level, mtpPrime vcons);