/* 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 = 55; 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_req_pq = 0x60469778, mtpc_req_DH_params = 0xd712e4be, mtpc_set_client_DH_params = 0xf5045f1f, 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 = 0xf7aff1c0, mtpc_inputMediaPhoto = 0xe9bfb4f3, mtpc_inputMediaGeoPoint = 0xf9c44144, mtpc_inputMediaContact = 0xa6e45987, mtpc_inputMediaUploadedDocument = 0x1d89306d, mtpc_inputMediaUploadedThumbDocument = 0xad613491, mtpc_inputMediaDocument = 0x1a77f29c, mtpc_inputMediaVenue = 0x2827a81a, mtpc_inputMediaGifExternal = 0x4843b0fd, mtpc_inputMediaPhotoExternal = 0xb55f4f18, mtpc_inputMediaDocumentExternal = 0xe5e9607c, mtpc_inputChatPhotoEmpty = 0x1ca48f57, mtpc_inputChatUploadedPhoto = 0x94254732, mtpc_inputChatPhoto = 0xb2e1bf08, mtpc_inputGeoPointEmpty = 0xe4c123d6, mtpc_inputGeoPoint = 0xf3b7acc9, mtpc_inputPhotoEmpty = 0x1cd7bf0d, mtpc_inputPhoto = 0xfb95c6c4, mtpc_inputFileLocation = 0x14637196, mtpc_inputEncryptedFileLocation = 0xf5235d55, mtpc_inputDocumentFileLocation = 0x430f0724, mtpc_inputPhotoCropAuto = 0xade6b004, mtpc_inputPhotoCrop = 0xd9915325, 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_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_dialog = 0x66ffba14, mtpc_photoEmpty = 0x2331b22d, mtpc_photo = 0xcded42fe, 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 = 0x5932fc03, 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_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_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_updateNewAuthorization = 0x8f06529a, 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 = 0x382dd3e4, 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 = 0xf0dfb451, mtpc_updateStickerSets = 0x43ae3dec, mtpc_updateSavedGifs = 0x9375341e, mtpc_updateBotInlineQuery = 0x54826690, mtpc_updateBotInlineSend = 0xe48f964, mtpc_updateEditChannelMessage = 0x1b3f4df7, mtpc_updateChannelPinnedMessage = 0x98592475, mtpc_updateBotCallbackQuery = 0xa68c688c, mtpc_updateEditMessage = 0xe40370a3, mtpc_updateInlineBotCallbackQuery = 0x2cbd95af, mtpc_updateReadChannelOutbox = 0x25d6c9c7, mtpc_updateDraftMessage = 0xee2bb969, mtpc_updateReadFeaturedStickers = 0x571d2742, mtpc_updateRecentStickers = 0x9a422c20, mtpc_updateConfig = 0xa229dd06, mtpc_updatePtsChanged = 0x3354678f, mtpc_updates_state = 0xa56c2a3e, mtpc_updates_differenceEmpty = 0x5d75a138, mtpc_updates_difference = 0xf49ca0, mtpc_updates_differenceSlice = 0xa8fb1981, 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 = 0x9a6b2e2a, 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_contacts_found = 0x1aa1f784, mtpc_inputPrivacyKeyStatusTimestamp = 0x4f96cb18, mtpc_inputPrivacyKeyChatInvite = 0xbdfb0426, mtpc_privacyKeyStatusTimestamp = 0xbc2eab30, mtpc_privacyKeyChatInvite = 0x500e6dfa, 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 = 0x3a556302, mtpc_documentAttributeVideo = 0x5910cccb, mtpc_documentAttributeAudio = 0x9852f9c6, mtpc_documentAttributeFilename = 0x15590068, 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 = 0xca820ed7, 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_keyboardButtonRow = 0x77608b83, mtpc_replyKeyboardHide = 0xa03e5b85, mtpc_replyKeyboardForceReply = 0xf4108aa0, mtpc_replyKeyboardMarkup = 0x3502758c, mtpc_replyInlineMarkup = 0x48a30254, mtpc_help_appChangelogEmpty = 0xaf7e0394, mtpc_help_appChangelog = 0x4668e6bd, 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_inputBotInlineResult = 0x2cbbe15a, mtpc_inputBotInlineResultPhoto = 0xa8d864a7, mtpc_inputBotInlineResultDocument = 0xfff8fdc4, mtpc_botInlineMessageMediaAuto = 0xa74b15b, mtpc_botInlineMessageText = 0x8c7f65e2, mtpc_botInlineMessageMediaGeo = 0x3a8fd8b8, mtpc_botInlineMessageMediaVenue = 0x4366232e, mtpc_botInlineMessageMediaContact = 0x35edb4d4, mtpc_botInlineResult = 0x9bebaeb9, mtpc_botInlineMediaResult = 0x17db940b, mtpc_messages_botResults = 0x256709a6, 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 = 0xb10df1fb, 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_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_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 = 0x6b47f94d, mtpc_messages_getHistory = 0xafa92846, mtpc_messages_search = 0xd4569248, mtpc_messages_readHistory = 0xe306d3a, mtpc_messages_deleteHistory = 0x1c015b09, mtpc_messages_deleteMessages = 0xa5f18925, 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_readMessageContents = 0x36a73f77, mtpc_messages_getStickers = 0xae22e045, 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 = 0x9fcfbc30, 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 = 0xa6e94f04, mtpc_messages_setBotCallbackAnswer = 0xc927d44b, mtpc_messages_getPeerDialogs = 0x2d9776b9, mtpc_messages_saveDraft = 0xbc39e14b, mtpc_messages_getAllDrafts = 0x6a3f8d65, mtpc_messages_getFeaturedStickers = 0x2dacca4f, mtpc_messages_readFeaturedStickers = 0xe21cbb, mtpc_messages_getRecentStickers = 0x99197c2c, mtpc_messages_saveRecentSticker = 0x348e39bf, mtpc_messages_clearRecentStickers = 0xab02e5d2, mtpc_messages_getUnusedStickers = 0x4309d65b, mtpc_messages_getArchivedStickers = 0x906e241f, mtpc_updates_getState = 0xedd4882a, mtpc_updates_getDifference = 0xa041495, mtpc_updates_getChannelDifference = 0xbb32d7c0, mtpc_photos_updateProfilePhoto = 0xeef579a0, mtpc_photos_uploadProfilePhoto = 0xd50f9c88, 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_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 }; // 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 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 MTPinputChatPhoto; class MTPDinputChatUploadedPhoto; class MTPDinputChatPhoto; class MTPinputGeoPoint; class MTPDinputGeoPoint; class MTPinputPhoto; class MTPDinputPhoto; class MTPinputFileLocation; class MTPDinputFileLocation; class MTPDinputEncryptedFileLocation; class MTPDinputDocumentFileLocation; class MTPinputPhotoCrop; class MTPDinputPhotoCrop; 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 MTPmessageAction; class MTPDmessageActionChatCreate; class MTPDmessageActionChatEditTitle; class MTPDmessageActionChatEditPhoto; class MTPDmessageActionChatAddUser; class MTPDmessageActionChatDeleteUser; class MTPDmessageActionChatJoinedByLink; class MTPDmessageActionChannelCreate; class MTPDmessageActionChatMigrateTo; class MTPDmessageActionChannelMigrateFrom; 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 MTPmessages_chatFull; class MTPDmessages_chatFull; class MTPmessages_affectedHistory; class MTPDmessages_affectedHistory; class MTPmessagesFilter; 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 MTPDupdateNewAuthorization; 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 MTPupdates_state; class MTPDupdates_state; class MTPupdates_difference; class MTPDupdates_differenceEmpty; class MTPDupdates_difference; class MTPDupdates_differenceSlice; 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 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 MTPinputBotInlineResult; class MTPDinputBotInlineResult; class MTPDinputBotInlineResultPhoto; class MTPDinputBotInlineResultDocument; 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; // 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 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 MTPInputPhotoCrop; 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; // Type classes definitions class MTPresPQ : private mtpDataOwner { public: MTPresPQ(); MTPresPQ(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_resPQ) : mtpDataOwner(0) { read(from, end, cons); } MTPDresPQ &_resPQ() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDresPQ*)data; } const MTPDresPQ &c_resPQ() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDresPQ*)data; } 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(MTPDresPQ *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPResPQ; class MTPp_Q_inner_data : private mtpDataOwner { public: MTPp_Q_inner_data(); MTPp_Q_inner_data(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_p_q_inner_data) : mtpDataOwner(0) { read(from, end, cons); } MTPDp_q_inner_data &_p_q_inner_data() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDp_q_inner_data*)data; } const MTPDp_q_inner_data &c_p_q_inner_data() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDp_q_inner_data*)data; } 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(MTPDp_q_inner_data *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPP_Q_inner_data; class MTPserver_DH_Params : private mtpDataOwner { public: MTPserver_DH_Params() : mtpDataOwner(0), _type(0) { } MTPserver_DH_Params(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDserver_DH_params_fail &_server_DH_params_fail() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_server_DH_params_fail) throw mtpErrorWrongTypeId(_type, mtpc_server_DH_params_fail); split(); return *(MTPDserver_DH_params_fail*)data; } const MTPDserver_DH_params_fail &c_server_DH_params_fail() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_server_DH_params_fail) throw mtpErrorWrongTypeId(_type, mtpc_server_DH_params_fail); return *(const MTPDserver_DH_params_fail*)data; } MTPDserver_DH_params_ok &_server_DH_params_ok() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_server_DH_params_ok) throw mtpErrorWrongTypeId(_type, mtpc_server_DH_params_ok); split(); return *(MTPDserver_DH_params_ok*)data; } const MTPDserver_DH_params_ok &c_server_DH_params_ok() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_server_DH_params_ok) throw mtpErrorWrongTypeId(_type, mtpc_server_DH_params_ok); return *(const MTPDserver_DH_params_ok*)data; } 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(MTPDserver_DH_params_fail *_data); explicit MTPserver_DH_Params(MTPDserver_DH_params_ok *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPServer_DH_Params; class MTPserver_DH_inner_data : private mtpDataOwner { public: MTPserver_DH_inner_data(); MTPserver_DH_inner_data(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_server_DH_inner_data) : mtpDataOwner(0) { read(from, end, cons); } MTPDserver_DH_inner_data &_server_DH_inner_data() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDserver_DH_inner_data*)data; } const MTPDserver_DH_inner_data &c_server_DH_inner_data() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDserver_DH_inner_data*)data; } 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(MTPDserver_DH_inner_data *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPServer_DH_inner_data; class MTPclient_DH_Inner_Data : private mtpDataOwner { public: MTPclient_DH_Inner_Data(); MTPclient_DH_Inner_Data(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_client_DH_inner_data) : mtpDataOwner(0) { read(from, end, cons); } MTPDclient_DH_inner_data &_client_DH_inner_data() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDclient_DH_inner_data*)data; } const MTPDclient_DH_inner_data &c_client_DH_inner_data() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDclient_DH_inner_data*)data; } 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(MTPDclient_DH_inner_data *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPClient_DH_Inner_Data; class MTPset_client_DH_params_answer : private mtpDataOwner { public: MTPset_client_DH_params_answer() : mtpDataOwner(0), _type(0) { } MTPset_client_DH_params_answer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDdh_gen_ok &_dh_gen_ok() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_dh_gen_ok) throw mtpErrorWrongTypeId(_type, mtpc_dh_gen_ok); split(); return *(MTPDdh_gen_ok*)data; } const MTPDdh_gen_ok &c_dh_gen_ok() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_dh_gen_ok) throw mtpErrorWrongTypeId(_type, mtpc_dh_gen_ok); return *(const MTPDdh_gen_ok*)data; } MTPDdh_gen_retry &_dh_gen_retry() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_dh_gen_retry) throw mtpErrorWrongTypeId(_type, mtpc_dh_gen_retry); split(); return *(MTPDdh_gen_retry*)data; } const MTPDdh_gen_retry &c_dh_gen_retry() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_dh_gen_retry) throw mtpErrorWrongTypeId(_type, mtpc_dh_gen_retry); return *(const MTPDdh_gen_retry*)data; } MTPDdh_gen_fail &_dh_gen_fail() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_dh_gen_fail) throw mtpErrorWrongTypeId(_type, mtpc_dh_gen_fail); split(); return *(MTPDdh_gen_fail*)data; } const MTPDdh_gen_fail &c_dh_gen_fail() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_dh_gen_fail) throw mtpErrorWrongTypeId(_type, mtpc_dh_gen_fail); return *(const MTPDdh_gen_fail*)data; } 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(MTPDdh_gen_ok *_data); explicit MTPset_client_DH_params_answer(MTPDdh_gen_retry *_data); explicit MTPset_client_DH_params_answer(MTPDdh_gen_fail *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPSet_client_DH_params_answer; class MTPmsgsAck : private mtpDataOwner { public: MTPmsgsAck(); MTPmsgsAck(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_ack) : mtpDataOwner(0) { read(from, end, cons); } MTPDmsgs_ack &_msgs_ack() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmsgs_ack*)data; } const MTPDmsgs_ack &c_msgs_ack() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmsgs_ack*)data; } 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(MTPDmsgs_ack *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsAck; class MTPbadMsgNotification : private mtpDataOwner { public: MTPbadMsgNotification() : mtpDataOwner(0), _type(0) { } MTPbadMsgNotification(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDbad_msg_notification &_bad_msg_notification() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_bad_msg_notification) throw mtpErrorWrongTypeId(_type, mtpc_bad_msg_notification); split(); return *(MTPDbad_msg_notification*)data; } const MTPDbad_msg_notification &c_bad_msg_notification() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_bad_msg_notification) throw mtpErrorWrongTypeId(_type, mtpc_bad_msg_notification); return *(const MTPDbad_msg_notification*)data; } MTPDbad_server_salt &_bad_server_salt() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_bad_server_salt) throw mtpErrorWrongTypeId(_type, mtpc_bad_server_salt); split(); return *(MTPDbad_server_salt*)data; } const MTPDbad_server_salt &c_bad_server_salt() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_bad_server_salt) throw mtpErrorWrongTypeId(_type, mtpc_bad_server_salt); return *(const MTPDbad_server_salt*)data; } 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(MTPDbad_msg_notification *_data); explicit MTPbadMsgNotification(MTPDbad_server_salt *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPBadMsgNotification; class MTPmsgsStateReq : private mtpDataOwner { public: MTPmsgsStateReq(); MTPmsgsStateReq(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_state_req) : mtpDataOwner(0) { read(from, end, cons); } MTPDmsgs_state_req &_msgs_state_req() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmsgs_state_req*)data; } const MTPDmsgs_state_req &c_msgs_state_req() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmsgs_state_req*)data; } 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(MTPDmsgs_state_req *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsStateReq; class MTPmsgsStateInfo : private mtpDataOwner { public: MTPmsgsStateInfo(); MTPmsgsStateInfo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_state_info) : mtpDataOwner(0) { read(from, end, cons); } MTPDmsgs_state_info &_msgs_state_info() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmsgs_state_info*)data; } const MTPDmsgs_state_info &c_msgs_state_info() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmsgs_state_info*)data; } 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(MTPDmsgs_state_info *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsStateInfo; class MTPmsgsAllInfo : private mtpDataOwner { public: MTPmsgsAllInfo(); MTPmsgsAllInfo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msgs_all_info) : mtpDataOwner(0) { read(from, end, cons); } MTPDmsgs_all_info &_msgs_all_info() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmsgs_all_info*)data; } const MTPDmsgs_all_info &c_msgs_all_info() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmsgs_all_info*)data; } 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(MTPDmsgs_all_info *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgsAllInfo; class MTPmsgDetailedInfo : private mtpDataOwner { public: MTPmsgDetailedInfo() : mtpDataOwner(0), _type(0) { } MTPmsgDetailedInfo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmsg_detailed_info &_msg_detailed_info() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_msg_detailed_info) throw mtpErrorWrongTypeId(_type, mtpc_msg_detailed_info); split(); return *(MTPDmsg_detailed_info*)data; } const MTPDmsg_detailed_info &c_msg_detailed_info() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_msg_detailed_info) throw mtpErrorWrongTypeId(_type, mtpc_msg_detailed_info); return *(const MTPDmsg_detailed_info*)data; } MTPDmsg_new_detailed_info &_msg_new_detailed_info() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_msg_new_detailed_info) throw mtpErrorWrongTypeId(_type, mtpc_msg_new_detailed_info); split(); return *(MTPDmsg_new_detailed_info*)data; } const MTPDmsg_new_detailed_info &c_msg_new_detailed_info() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_msg_new_detailed_info) throw mtpErrorWrongTypeId(_type, mtpc_msg_new_detailed_info); return *(const MTPDmsg_new_detailed_info*)data; } 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(MTPDmsg_detailed_info *_data); explicit MTPmsgDetailedInfo(MTPDmsg_new_detailed_info *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPMsgDetailedInfo; class MTPmsgResendReq : private mtpDataOwner { public: MTPmsgResendReq(); MTPmsgResendReq(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_msg_resend_req) : mtpDataOwner(0) { read(from, end, cons); } MTPDmsg_resend_req &_msg_resend_req() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmsg_resend_req*)data; } const MTPDmsg_resend_req &c_msg_resend_req() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmsg_resend_req*)data; } 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(MTPDmsg_resend_req *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMsgResendReq; class MTPrpcError : private mtpDataOwner { public: MTPrpcError(); MTPrpcError(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_rpc_error) : mtpDataOwner(0) { read(from, end, cons); } MTPDrpc_error &_rpc_error() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDrpc_error*)data; } const MTPDrpc_error &c_rpc_error() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDrpc_error*)data; } 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(MTPDrpc_error *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPRpcError; class MTPrpcDropAnswer : private mtpDataOwner { public: MTPrpcDropAnswer() : mtpDataOwner(0), _type(0) { } MTPrpcDropAnswer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDrpc_answer_dropped &_rpc_answer_dropped() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_rpc_answer_dropped) throw mtpErrorWrongTypeId(_type, mtpc_rpc_answer_dropped); split(); return *(MTPDrpc_answer_dropped*)data; } const MTPDrpc_answer_dropped &c_rpc_answer_dropped() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_rpc_answer_dropped) throw mtpErrorWrongTypeId(_type, mtpc_rpc_answer_dropped); return *(const MTPDrpc_answer_dropped*)data; } 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(MTPDrpc_answer_dropped *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPRpcDropAnswer; class MTPfutureSalt : private mtpDataOwner { public: MTPfutureSalt(); MTPfutureSalt(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_future_salt) : mtpDataOwner(0) { read(from, end, cons); } MTPDfuture_salt &_future_salt() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDfuture_salt*)data; } const MTPDfuture_salt &c_future_salt() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDfuture_salt*)data; } 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(MTPDfuture_salt *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPFutureSalt; class MTPfutureSalts : private mtpDataOwner { public: MTPfutureSalts(); MTPfutureSalts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_future_salts) : mtpDataOwner(0) { read(from, end, cons); } MTPDfuture_salts &_future_salts() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDfuture_salts*)data; } const MTPDfuture_salts &c_future_salts() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDfuture_salts*)data; } 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(MTPDfuture_salts *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPFutureSalts; class MTPpong : private mtpDataOwner { public: MTPpong(); MTPpong(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_pong) : mtpDataOwner(0) { read(from, end, cons); } MTPDpong &_pong() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDpong*)data; } const MTPDpong &c_pong() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDpong*)data; } 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(MTPDpong *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPPong; class MTPdestroySessionRes : private mtpDataOwner { public: MTPdestroySessionRes() : mtpDataOwner(0), _type(0) { } MTPdestroySessionRes(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDdestroy_session_ok &_destroy_session_ok() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_destroy_session_ok) throw mtpErrorWrongTypeId(_type, mtpc_destroy_session_ok); split(); return *(MTPDdestroy_session_ok*)data; } const MTPDdestroy_session_ok &c_destroy_session_ok() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_destroy_session_ok) throw mtpErrorWrongTypeId(_type, mtpc_destroy_session_ok); return *(const MTPDdestroy_session_ok*)data; } MTPDdestroy_session_none &_destroy_session_none() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_destroy_session_none) throw mtpErrorWrongTypeId(_type, mtpc_destroy_session_none); split(); return *(MTPDdestroy_session_none*)data; } const MTPDdestroy_session_none &c_destroy_session_none() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_destroy_session_none) throw mtpErrorWrongTypeId(_type, mtpc_destroy_session_none); return *(const MTPDdestroy_session_none*)data; } 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(MTPDdestroy_session_ok *_data); explicit MTPdestroySessionRes(MTPDdestroy_session_none *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPDestroySessionRes; class MTPnewSession : private mtpDataOwner { public: MTPnewSession(); MTPnewSession(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_new_session_created) : mtpDataOwner(0) { read(from, end, cons); } MTPDnew_session_created &_new_session_created() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDnew_session_created*)data; } const MTPDnew_session_created &c_new_session_created() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDnew_session_created*)data; } 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(MTPDnew_session_created *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPNewSession; class MTPhttpWait : private mtpDataOwner { public: MTPhttpWait(); MTPhttpWait(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_http_wait) : mtpDataOwner(0) { read(from, end, cons); } MTPDhttp_wait &_http_wait() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDhttp_wait*)data; } const MTPDhttp_wait &c_http_wait() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDhttp_wait*)data; } 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(MTPDhttp_wait *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPHttpWait; class MTPbool { public: MTPbool() : _type(0) { } MTPbool(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPBool; class MTPtrue { public: MTPtrue() { } MTPtrue(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_true) { read(from, end, cons); } 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 mtpDataOwner { public: MTPerror(); MTPerror(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_error) : mtpDataOwner(0) { read(from, end, cons); } MTPDerror &_error() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDerror*)data; } const MTPDerror &c_error() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDerror*)data; } 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(MTPDerror *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPError; class MTPnull { public: MTPnull() { } MTPnull(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_null) { read(from, end, cons); } 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 mtpDataOwner { public: MTPinputPeer() : mtpDataOwner(0), _type(0) { } MTPinputPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputPeerChat &_inputPeerChat() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPeerChat) throw mtpErrorWrongTypeId(_type, mtpc_inputPeerChat); split(); return *(MTPDinputPeerChat*)data; } const MTPDinputPeerChat &c_inputPeerChat() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPeerChat) throw mtpErrorWrongTypeId(_type, mtpc_inputPeerChat); return *(const MTPDinputPeerChat*)data; } MTPDinputPeerUser &_inputPeerUser() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPeerUser) throw mtpErrorWrongTypeId(_type, mtpc_inputPeerUser); split(); return *(MTPDinputPeerUser*)data; } const MTPDinputPeerUser &c_inputPeerUser() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPeerUser) throw mtpErrorWrongTypeId(_type, mtpc_inputPeerUser); return *(const MTPDinputPeerUser*)data; } MTPDinputPeerChannel &_inputPeerChannel() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPeerChannel) throw mtpErrorWrongTypeId(_type, mtpc_inputPeerChannel); split(); return *(MTPDinputPeerChannel*)data; } const MTPDinputPeerChannel &c_inputPeerChannel() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPeerChannel) throw mtpErrorWrongTypeId(_type, mtpc_inputPeerChannel); return *(const MTPDinputPeerChannel*)data; } 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(MTPDinputPeerChat *_data); explicit MTPinputPeer(MTPDinputPeerUser *_data); explicit MTPinputPeer(MTPDinputPeerChannel *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputPeer; class MTPinputUser : private mtpDataOwner { public: MTPinputUser() : mtpDataOwner(0), _type(0) { } MTPinputUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputUser &_inputUser() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputUser) throw mtpErrorWrongTypeId(_type, mtpc_inputUser); split(); return *(MTPDinputUser*)data; } const MTPDinputUser &c_inputUser() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputUser) throw mtpErrorWrongTypeId(_type, mtpc_inputUser); return *(const MTPDinputUser*)data; } 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(MTPDinputUser *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputUser; class MTPinputContact : private mtpDataOwner { public: MTPinputContact(); MTPinputContact(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPhoneContact) : mtpDataOwner(0) { read(from, end, cons); } MTPDinputPhoneContact &_inputPhoneContact() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDinputPhoneContact*)data; } const MTPDinputPhoneContact &c_inputPhoneContact() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDinputPhoneContact*)data; } 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(MTPDinputPhoneContact *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputContact; class MTPinputFile : private mtpDataOwner { public: MTPinputFile() : mtpDataOwner(0), _type(0) { } MTPinputFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputFile &_inputFile() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputFile) throw mtpErrorWrongTypeId(_type, mtpc_inputFile); split(); return *(MTPDinputFile*)data; } const MTPDinputFile &c_inputFile() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputFile) throw mtpErrorWrongTypeId(_type, mtpc_inputFile); return *(const MTPDinputFile*)data; } MTPDinputFileBig &_inputFileBig() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputFileBig) throw mtpErrorWrongTypeId(_type, mtpc_inputFileBig); split(); return *(MTPDinputFileBig*)data; } const MTPDinputFileBig &c_inputFileBig() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputFileBig) throw mtpErrorWrongTypeId(_type, mtpc_inputFileBig); return *(const MTPDinputFileBig*)data; } 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(MTPDinputFile *_data); explicit MTPinputFile(MTPDinputFileBig *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputFile; class MTPinputMedia : private mtpDataOwner { public: MTPinputMedia() : mtpDataOwner(0), _type(0) { } MTPinputMedia(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputMediaUploadedPhoto &_inputMediaUploadedPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedPhoto); split(); return *(MTPDinputMediaUploadedPhoto*)data; } const MTPDinputMediaUploadedPhoto &c_inputMediaUploadedPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedPhoto); return *(const MTPDinputMediaUploadedPhoto*)data; } MTPDinputMediaPhoto &_inputMediaPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaPhoto); split(); return *(MTPDinputMediaPhoto*)data; } const MTPDinputMediaPhoto &c_inputMediaPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaPhoto); return *(const MTPDinputMediaPhoto*)data; } MTPDinputMediaGeoPoint &_inputMediaGeoPoint() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaGeoPoint) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaGeoPoint); split(); return *(MTPDinputMediaGeoPoint*)data; } const MTPDinputMediaGeoPoint &c_inputMediaGeoPoint() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaGeoPoint) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaGeoPoint); return *(const MTPDinputMediaGeoPoint*)data; } MTPDinputMediaContact &_inputMediaContact() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaContact); split(); return *(MTPDinputMediaContact*)data; } const MTPDinputMediaContact &c_inputMediaContact() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaContact); return *(const MTPDinputMediaContact*)data; } MTPDinputMediaUploadedDocument &_inputMediaUploadedDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedDocument); split(); return *(MTPDinputMediaUploadedDocument*)data; } const MTPDinputMediaUploadedDocument &c_inputMediaUploadedDocument() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedDocument); return *(const MTPDinputMediaUploadedDocument*)data; } MTPDinputMediaUploadedThumbDocument &_inputMediaUploadedThumbDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedThumbDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedThumbDocument); split(); return *(MTPDinputMediaUploadedThumbDocument*)data; } const MTPDinputMediaUploadedThumbDocument &c_inputMediaUploadedThumbDocument() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedThumbDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedThumbDocument); return *(const MTPDinputMediaUploadedThumbDocument*)data; } MTPDinputMediaDocument &_inputMediaDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaDocument); split(); return *(MTPDinputMediaDocument*)data; } const MTPDinputMediaDocument &c_inputMediaDocument() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaDocument); return *(const MTPDinputMediaDocument*)data; } MTPDinputMediaVenue &_inputMediaVenue() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaVenue); split(); return *(MTPDinputMediaVenue*)data; } const MTPDinputMediaVenue &c_inputMediaVenue() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaVenue); return *(const MTPDinputMediaVenue*)data; } MTPDinputMediaGifExternal &_inputMediaGifExternal() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaGifExternal) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaGifExternal); split(); return *(MTPDinputMediaGifExternal*)data; } const MTPDinputMediaGifExternal &c_inputMediaGifExternal() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaGifExternal) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaGifExternal); return *(const MTPDinputMediaGifExternal*)data; } MTPDinputMediaPhotoExternal &_inputMediaPhotoExternal() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaPhotoExternal) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaPhotoExternal); split(); return *(MTPDinputMediaPhotoExternal*)data; } const MTPDinputMediaPhotoExternal &c_inputMediaPhotoExternal() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaPhotoExternal) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaPhotoExternal); return *(const MTPDinputMediaPhotoExternal*)data; } MTPDinputMediaDocumentExternal &_inputMediaDocumentExternal() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaDocumentExternal) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaDocumentExternal); split(); return *(MTPDinputMediaDocumentExternal*)data; } const MTPDinputMediaDocumentExternal &c_inputMediaDocumentExternal() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaDocumentExternal) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaDocumentExternal); return *(const MTPDinputMediaDocumentExternal*)data; } 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(MTPDinputMediaUploadedPhoto *_data); explicit MTPinputMedia(MTPDinputMediaPhoto *_data); explicit MTPinputMedia(MTPDinputMediaGeoPoint *_data); explicit MTPinputMedia(MTPDinputMediaContact *_data); explicit MTPinputMedia(MTPDinputMediaUploadedDocument *_data); explicit MTPinputMedia(MTPDinputMediaUploadedThumbDocument *_data); explicit MTPinputMedia(MTPDinputMediaDocument *_data); explicit MTPinputMedia(MTPDinputMediaVenue *_data); explicit MTPinputMedia(MTPDinputMediaGifExternal *_data); explicit MTPinputMedia(MTPDinputMediaPhotoExternal *_data); explicit MTPinputMedia(MTPDinputMediaDocumentExternal *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputMedia; class MTPinputChatPhoto : private mtpDataOwner { public: MTPinputChatPhoto() : mtpDataOwner(0), _type(0) { } MTPinputChatPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputChatUploadedPhoto &_inputChatUploadedPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputChatUploadedPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputChatUploadedPhoto); split(); return *(MTPDinputChatUploadedPhoto*)data; } const MTPDinputChatUploadedPhoto &c_inputChatUploadedPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputChatUploadedPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputChatUploadedPhoto); return *(const MTPDinputChatUploadedPhoto*)data; } MTPDinputChatPhoto &_inputChatPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputChatPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputChatPhoto); split(); return *(MTPDinputChatPhoto*)data; } const MTPDinputChatPhoto &c_inputChatPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputChatPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputChatPhoto); return *(const MTPDinputChatPhoto*)data; } 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(MTPDinputChatUploadedPhoto *_data); explicit MTPinputChatPhoto(MTPDinputChatPhoto *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputChatPhoto; class MTPinputGeoPoint : private mtpDataOwner { public: MTPinputGeoPoint() : mtpDataOwner(0), _type(0) { } MTPinputGeoPoint(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputGeoPoint &_inputGeoPoint() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputGeoPoint) throw mtpErrorWrongTypeId(_type, mtpc_inputGeoPoint); split(); return *(MTPDinputGeoPoint*)data; } const MTPDinputGeoPoint &c_inputGeoPoint() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputGeoPoint) throw mtpErrorWrongTypeId(_type, mtpc_inputGeoPoint); return *(const MTPDinputGeoPoint*)data; } 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(MTPDinputGeoPoint *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputGeoPoint; class MTPinputPhoto : private mtpDataOwner { public: MTPinputPhoto() : mtpDataOwner(0), _type(0) { } MTPinputPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputPhoto &_inputPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputPhoto); split(); return *(MTPDinputPhoto*)data; } const MTPDinputPhoto &c_inputPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputPhoto); return *(const MTPDinputPhoto*)data; } 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(MTPDinputPhoto *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputPhoto; class MTPinputFileLocation : private mtpDataOwner { public: MTPinputFileLocation() : mtpDataOwner(0), _type(0) { } MTPinputFileLocation(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputFileLocation &_inputFileLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputFileLocation); split(); return *(MTPDinputFileLocation*)data; } const MTPDinputFileLocation &c_inputFileLocation() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputFileLocation); return *(const MTPDinputFileLocation*)data; } MTPDinputEncryptedFileLocation &_inputEncryptedFileLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileLocation); split(); return *(MTPDinputEncryptedFileLocation*)data; } const MTPDinputEncryptedFileLocation &c_inputEncryptedFileLocation() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileLocation); return *(const MTPDinputEncryptedFileLocation*)data; } MTPDinputDocumentFileLocation &_inputDocumentFileLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputDocumentFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputDocumentFileLocation); split(); return *(MTPDinputDocumentFileLocation*)data; } const MTPDinputDocumentFileLocation &c_inputDocumentFileLocation() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputDocumentFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputDocumentFileLocation); return *(const MTPDinputDocumentFileLocation*)data; } 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(MTPDinputFileLocation *_data); explicit MTPinputFileLocation(MTPDinputEncryptedFileLocation *_data); explicit MTPinputFileLocation(MTPDinputDocumentFileLocation *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputFileLocation; class MTPinputPhotoCrop : private mtpDataOwner { public: MTPinputPhotoCrop() : mtpDataOwner(0), _type(0) { } MTPinputPhotoCrop(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputPhotoCrop &_inputPhotoCrop() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPhotoCrop) throw mtpErrorWrongTypeId(_type, mtpc_inputPhotoCrop); split(); return *(MTPDinputPhotoCrop*)data; } const MTPDinputPhotoCrop &c_inputPhotoCrop() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPhotoCrop) throw mtpErrorWrongTypeId(_type, mtpc_inputPhotoCrop); return *(const MTPDinputPhotoCrop*)data; } 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 MTPinputPhotoCrop(mtpTypeId type); explicit MTPinputPhotoCrop(MTPDinputPhotoCrop *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputPhotoCrop; class MTPinputAppEvent : private mtpDataOwner { public: MTPinputAppEvent(); MTPinputAppEvent(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputAppEvent) : mtpDataOwner(0) { read(from, end, cons); } MTPDinputAppEvent &_inputAppEvent() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDinputAppEvent*)data; } const MTPDinputAppEvent &c_inputAppEvent() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDinputAppEvent*)data; } 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(MTPDinputAppEvent *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputAppEvent; class MTPpeer : private mtpDataOwner { public: MTPpeer() : mtpDataOwner(0), _type(0) { } MTPpeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDpeerUser &_peerUser() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerUser) throw mtpErrorWrongTypeId(_type, mtpc_peerUser); split(); return *(MTPDpeerUser*)data; } const MTPDpeerUser &c_peerUser() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerUser) throw mtpErrorWrongTypeId(_type, mtpc_peerUser); return *(const MTPDpeerUser*)data; } MTPDpeerChat &_peerChat() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerChat) throw mtpErrorWrongTypeId(_type, mtpc_peerChat); split(); return *(MTPDpeerChat*)data; } const MTPDpeerChat &c_peerChat() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerChat) throw mtpErrorWrongTypeId(_type, mtpc_peerChat); return *(const MTPDpeerChat*)data; } MTPDpeerChannel &_peerChannel() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerChannel) throw mtpErrorWrongTypeId(_type, mtpc_peerChannel); split(); return *(MTPDpeerChannel*)data; } const MTPDpeerChannel &c_peerChannel() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerChannel) throw mtpErrorWrongTypeId(_type, mtpc_peerChannel); return *(const MTPDpeerChannel*)data; } 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(MTPDpeerUser *_data); explicit MTPpeer(MTPDpeerChat *_data); explicit MTPpeer(MTPDpeerChannel *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPPeer; class MTPstorage_fileType { public: MTPstorage_fileType() : _type(0) { } MTPstorage_fileType(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPstorage_FileType; class MTPfileLocation : private mtpDataOwner { public: MTPfileLocation() : mtpDataOwner(0), _type(0) { } MTPfileLocation(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDfileLocationUnavailable &_fileLocationUnavailable() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_fileLocationUnavailable) throw mtpErrorWrongTypeId(_type, mtpc_fileLocationUnavailable); split(); return *(MTPDfileLocationUnavailable*)data; } const MTPDfileLocationUnavailable &c_fileLocationUnavailable() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_fileLocationUnavailable) throw mtpErrorWrongTypeId(_type, mtpc_fileLocationUnavailable); return *(const MTPDfileLocationUnavailable*)data; } MTPDfileLocation &_fileLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_fileLocation) throw mtpErrorWrongTypeId(_type, mtpc_fileLocation); split(); return *(MTPDfileLocation*)data; } const MTPDfileLocation &c_fileLocation() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_fileLocation) throw mtpErrorWrongTypeId(_type, mtpc_fileLocation); return *(const MTPDfileLocation*)data; } 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(MTPDfileLocationUnavailable *_data); explicit MTPfileLocation(MTPDfileLocation *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPFileLocation; class MTPuser : private mtpDataOwner { public: MTPuser() : mtpDataOwner(0), _type(0) { } MTPuser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDuserEmpty &_userEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userEmpty) throw mtpErrorWrongTypeId(_type, mtpc_userEmpty); split(); return *(MTPDuserEmpty*)data; } const MTPDuserEmpty &c_userEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userEmpty) throw mtpErrorWrongTypeId(_type, mtpc_userEmpty); return *(const MTPDuserEmpty*)data; } MTPDuser &_user() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_user) throw mtpErrorWrongTypeId(_type, mtpc_user); split(); return *(MTPDuser*)data; } const MTPDuser &c_user() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_user) throw mtpErrorWrongTypeId(_type, mtpc_user); return *(const MTPDuser*)data; } 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(MTPDuserEmpty *_data); explicit MTPuser(MTPDuser *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPUser; class MTPuserProfilePhoto : private mtpDataOwner { public: MTPuserProfilePhoto() : mtpDataOwner(0), _type(0) { } MTPuserProfilePhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDuserProfilePhoto &_userProfilePhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userProfilePhoto) throw mtpErrorWrongTypeId(_type, mtpc_userProfilePhoto); split(); return *(MTPDuserProfilePhoto*)data; } const MTPDuserProfilePhoto &c_userProfilePhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userProfilePhoto) throw mtpErrorWrongTypeId(_type, mtpc_userProfilePhoto); return *(const MTPDuserProfilePhoto*)data; } 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(MTPDuserProfilePhoto *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPUserProfilePhoto; class MTPuserStatus : private mtpDataOwner { public: MTPuserStatus() : mtpDataOwner(0), _type(0) { } MTPuserStatus(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDuserStatusOnline &_userStatusOnline() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userStatusOnline) throw mtpErrorWrongTypeId(_type, mtpc_userStatusOnline); split(); return *(MTPDuserStatusOnline*)data; } const MTPDuserStatusOnline &c_userStatusOnline() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userStatusOnline) throw mtpErrorWrongTypeId(_type, mtpc_userStatusOnline); return *(const MTPDuserStatusOnline*)data; } MTPDuserStatusOffline &_userStatusOffline() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userStatusOffline) throw mtpErrorWrongTypeId(_type, mtpc_userStatusOffline); split(); return *(MTPDuserStatusOffline*)data; } const MTPDuserStatusOffline &c_userStatusOffline() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_userStatusOffline) throw mtpErrorWrongTypeId(_type, mtpc_userStatusOffline); return *(const MTPDuserStatusOffline*)data; } 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(MTPDuserStatusOnline *_data); explicit MTPuserStatus(MTPDuserStatusOffline *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPUserStatus; class MTPchat : private mtpDataOwner { public: MTPchat() : mtpDataOwner(0), _type(0) { } MTPchat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatEmpty &_chatEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatEmpty) throw mtpErrorWrongTypeId(_type, mtpc_chatEmpty); split(); return *(MTPDchatEmpty*)data; } const MTPDchatEmpty &c_chatEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatEmpty) throw mtpErrorWrongTypeId(_type, mtpc_chatEmpty); return *(const MTPDchatEmpty*)data; } MTPDchat &_chat() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chat) throw mtpErrorWrongTypeId(_type, mtpc_chat); split(); return *(MTPDchat*)data; } const MTPDchat &c_chat() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chat) throw mtpErrorWrongTypeId(_type, mtpc_chat); return *(const MTPDchat*)data; } MTPDchatForbidden &_chatForbidden() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatForbidden) throw mtpErrorWrongTypeId(_type, mtpc_chatForbidden); split(); return *(MTPDchatForbidden*)data; } const MTPDchatForbidden &c_chatForbidden() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatForbidden) throw mtpErrorWrongTypeId(_type, mtpc_chatForbidden); return *(const MTPDchatForbidden*)data; } MTPDchannel &_channel() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channel) throw mtpErrorWrongTypeId(_type, mtpc_channel); split(); return *(MTPDchannel*)data; } const MTPDchannel &c_channel() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channel) throw mtpErrorWrongTypeId(_type, mtpc_channel); return *(const MTPDchannel*)data; } MTPDchannelForbidden &_channelForbidden() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelForbidden) throw mtpErrorWrongTypeId(_type, mtpc_channelForbidden); split(); return *(MTPDchannelForbidden*)data; } const MTPDchannelForbidden &c_channelForbidden() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelForbidden) throw mtpErrorWrongTypeId(_type, mtpc_channelForbidden); return *(const MTPDchannelForbidden*)data; } 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(MTPDchatEmpty *_data); explicit MTPchat(MTPDchat *_data); explicit MTPchat(MTPDchatForbidden *_data); explicit MTPchat(MTPDchannel *_data); explicit MTPchat(MTPDchannelForbidden *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChat; class MTPchatFull : private mtpDataOwner { public: MTPchatFull() : mtpDataOwner(0), _type(0) { } MTPchatFull(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatFull &_chatFull() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatFull) throw mtpErrorWrongTypeId(_type, mtpc_chatFull); split(); return *(MTPDchatFull*)data; } const MTPDchatFull &c_chatFull() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatFull) throw mtpErrorWrongTypeId(_type, mtpc_chatFull); return *(const MTPDchatFull*)data; } MTPDchannelFull &_channelFull() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelFull) throw mtpErrorWrongTypeId(_type, mtpc_channelFull); split(); return *(MTPDchannelFull*)data; } const MTPDchannelFull &c_channelFull() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelFull) throw mtpErrorWrongTypeId(_type, mtpc_channelFull); return *(const MTPDchannelFull*)data; } 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(MTPDchatFull *_data); explicit MTPchatFull(MTPDchannelFull *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChatFull; class MTPchatParticipant : private mtpDataOwner { public: MTPchatParticipant() : mtpDataOwner(0), _type(0) { } MTPchatParticipant(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatParticipant &_chatParticipant() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipant) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipant); split(); return *(MTPDchatParticipant*)data; } const MTPDchatParticipant &c_chatParticipant() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipant) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipant); return *(const MTPDchatParticipant*)data; } MTPDchatParticipantCreator &_chatParticipantCreator() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipantCreator) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipantCreator); split(); return *(MTPDchatParticipantCreator*)data; } const MTPDchatParticipantCreator &c_chatParticipantCreator() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipantCreator) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipantCreator); return *(const MTPDchatParticipantCreator*)data; } MTPDchatParticipantAdmin &_chatParticipantAdmin() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipantAdmin) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipantAdmin); split(); return *(MTPDchatParticipantAdmin*)data; } const MTPDchatParticipantAdmin &c_chatParticipantAdmin() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipantAdmin) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipantAdmin); return *(const MTPDchatParticipantAdmin*)data; } 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(MTPDchatParticipant *_data); explicit MTPchatParticipant(MTPDchatParticipantCreator *_data); explicit MTPchatParticipant(MTPDchatParticipantAdmin *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChatParticipant; class MTPchatParticipants : private mtpDataOwner { public: MTPchatParticipants() : mtpDataOwner(0), _type(0) { } MTPchatParticipants(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatParticipantsForbidden &_chatParticipantsForbidden() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipantsForbidden) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipantsForbidden); split(); return *(MTPDchatParticipantsForbidden*)data; } const MTPDchatParticipantsForbidden &c_chatParticipantsForbidden() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipantsForbidden) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipantsForbidden); return *(const MTPDchatParticipantsForbidden*)data; } MTPDchatParticipants &_chatParticipants() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipants) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipants); split(); return *(MTPDchatParticipants*)data; } const MTPDchatParticipants &c_chatParticipants() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatParticipants) throw mtpErrorWrongTypeId(_type, mtpc_chatParticipants); return *(const MTPDchatParticipants*)data; } 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(MTPDchatParticipantsForbidden *_data); explicit MTPchatParticipants(MTPDchatParticipants *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChatParticipants; class MTPchatPhoto : private mtpDataOwner { public: MTPchatPhoto() : mtpDataOwner(0), _type(0) { } MTPchatPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatPhoto &_chatPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatPhoto) throw mtpErrorWrongTypeId(_type, mtpc_chatPhoto); split(); return *(MTPDchatPhoto*)data; } const MTPDchatPhoto &c_chatPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatPhoto) throw mtpErrorWrongTypeId(_type, mtpc_chatPhoto); return *(const MTPDchatPhoto*)data; } 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(MTPDchatPhoto *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChatPhoto; class MTPmessage : private mtpDataOwner { public: MTPmessage() : mtpDataOwner(0), _type(0) { } MTPmessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessageEmpty &_messageEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEmpty) throw mtpErrorWrongTypeId(_type, mtpc_messageEmpty); split(); return *(MTPDmessageEmpty*)data; } const MTPDmessageEmpty &c_messageEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEmpty) throw mtpErrorWrongTypeId(_type, mtpc_messageEmpty); return *(const MTPDmessageEmpty*)data; } MTPDmessage &_message() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_message) throw mtpErrorWrongTypeId(_type, mtpc_message); split(); return *(MTPDmessage*)data; } const MTPDmessage &c_message() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_message) throw mtpErrorWrongTypeId(_type, mtpc_message); return *(const MTPDmessage*)data; } MTPDmessageService &_messageService() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageService) throw mtpErrorWrongTypeId(_type, mtpc_messageService); split(); return *(MTPDmessageService*)data; } const MTPDmessageService &c_messageService() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageService) throw mtpErrorWrongTypeId(_type, mtpc_messageService); return *(const MTPDmessageService*)data; } 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(MTPDmessageEmpty *_data); explicit MTPmessage(MTPDmessage *_data); explicit MTPmessage(MTPDmessageService *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPMessage; class MTPmessageMedia : private mtpDataOwner { public: MTPmessageMedia() : mtpDataOwner(0), _type(0) { } MTPmessageMedia(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessageMediaPhoto &_messageMediaPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaPhoto) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaPhoto); split(); return *(MTPDmessageMediaPhoto*)data; } const MTPDmessageMediaPhoto &c_messageMediaPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaPhoto) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaPhoto); return *(const MTPDmessageMediaPhoto*)data; } MTPDmessageMediaGeo &_messageMediaGeo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaGeo); split(); return *(MTPDmessageMediaGeo*)data; } const MTPDmessageMediaGeo &c_messageMediaGeo() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaGeo); return *(const MTPDmessageMediaGeo*)data; } MTPDmessageMediaContact &_messageMediaContact() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaContact); split(); return *(MTPDmessageMediaContact*)data; } const MTPDmessageMediaContact &c_messageMediaContact() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaContact); return *(const MTPDmessageMediaContact*)data; } MTPDmessageMediaDocument &_messageMediaDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaDocument) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaDocument); split(); return *(MTPDmessageMediaDocument*)data; } const MTPDmessageMediaDocument &c_messageMediaDocument() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaDocument) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaDocument); return *(const MTPDmessageMediaDocument*)data; } MTPDmessageMediaWebPage &_messageMediaWebPage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaWebPage) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaWebPage); split(); return *(MTPDmessageMediaWebPage*)data; } const MTPDmessageMediaWebPage &c_messageMediaWebPage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaWebPage) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaWebPage); return *(const MTPDmessageMediaWebPage*)data; } MTPDmessageMediaVenue &_messageMediaVenue() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaVenue); split(); return *(MTPDmessageMediaVenue*)data; } const MTPDmessageMediaVenue &c_messageMediaVenue() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaVenue); return *(const MTPDmessageMediaVenue*)data; } 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(MTPDmessageMediaPhoto *_data); explicit MTPmessageMedia(MTPDmessageMediaGeo *_data); explicit MTPmessageMedia(MTPDmessageMediaContact *_data); explicit MTPmessageMedia(MTPDmessageMediaDocument *_data); explicit MTPmessageMedia(MTPDmessageMediaWebPage *_data); explicit MTPmessageMedia(MTPDmessageMediaVenue *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPMessageMedia; class MTPmessageAction : private mtpDataOwner { public: MTPmessageAction() : mtpDataOwner(0), _type(0) { } MTPmessageAction(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessageActionChatCreate &_messageActionChatCreate() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatCreate) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatCreate); split(); return *(MTPDmessageActionChatCreate*)data; } const MTPDmessageActionChatCreate &c_messageActionChatCreate() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatCreate) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatCreate); return *(const MTPDmessageActionChatCreate*)data; } MTPDmessageActionChatEditTitle &_messageActionChatEditTitle() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatEditTitle) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatEditTitle); split(); return *(MTPDmessageActionChatEditTitle*)data; } const MTPDmessageActionChatEditTitle &c_messageActionChatEditTitle() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatEditTitle) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatEditTitle); return *(const MTPDmessageActionChatEditTitle*)data; } MTPDmessageActionChatEditPhoto &_messageActionChatEditPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatEditPhoto) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatEditPhoto); split(); return *(MTPDmessageActionChatEditPhoto*)data; } const MTPDmessageActionChatEditPhoto &c_messageActionChatEditPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatEditPhoto) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatEditPhoto); return *(const MTPDmessageActionChatEditPhoto*)data; } MTPDmessageActionChatAddUser &_messageActionChatAddUser() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatAddUser) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatAddUser); split(); return *(MTPDmessageActionChatAddUser*)data; } const MTPDmessageActionChatAddUser &c_messageActionChatAddUser() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatAddUser) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatAddUser); return *(const MTPDmessageActionChatAddUser*)data; } MTPDmessageActionChatDeleteUser &_messageActionChatDeleteUser() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatDeleteUser) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatDeleteUser); split(); return *(MTPDmessageActionChatDeleteUser*)data; } const MTPDmessageActionChatDeleteUser &c_messageActionChatDeleteUser() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatDeleteUser) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatDeleteUser); return *(const MTPDmessageActionChatDeleteUser*)data; } MTPDmessageActionChatJoinedByLink &_messageActionChatJoinedByLink() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatJoinedByLink) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatJoinedByLink); split(); return *(MTPDmessageActionChatJoinedByLink*)data; } const MTPDmessageActionChatJoinedByLink &c_messageActionChatJoinedByLink() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatJoinedByLink) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatJoinedByLink); return *(const MTPDmessageActionChatJoinedByLink*)data; } MTPDmessageActionChannelCreate &_messageActionChannelCreate() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChannelCreate) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChannelCreate); split(); return *(MTPDmessageActionChannelCreate*)data; } const MTPDmessageActionChannelCreate &c_messageActionChannelCreate() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChannelCreate) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChannelCreate); return *(const MTPDmessageActionChannelCreate*)data; } MTPDmessageActionChatMigrateTo &_messageActionChatMigrateTo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatMigrateTo) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatMigrateTo); split(); return *(MTPDmessageActionChatMigrateTo*)data; } const MTPDmessageActionChatMigrateTo &c_messageActionChatMigrateTo() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChatMigrateTo) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChatMigrateTo); return *(const MTPDmessageActionChatMigrateTo*)data; } MTPDmessageActionChannelMigrateFrom &_messageActionChannelMigrateFrom() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChannelMigrateFrom) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChannelMigrateFrom); split(); return *(MTPDmessageActionChannelMigrateFrom*)data; } const MTPDmessageActionChannelMigrateFrom &c_messageActionChannelMigrateFrom() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageActionChannelMigrateFrom) throw mtpErrorWrongTypeId(_type, mtpc_messageActionChannelMigrateFrom); return *(const MTPDmessageActionChannelMigrateFrom*)data; } 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(MTPDmessageActionChatCreate *_data); explicit MTPmessageAction(MTPDmessageActionChatEditTitle *_data); explicit MTPmessageAction(MTPDmessageActionChatEditPhoto *_data); explicit MTPmessageAction(MTPDmessageActionChatAddUser *_data); explicit MTPmessageAction(MTPDmessageActionChatDeleteUser *_data); explicit MTPmessageAction(MTPDmessageActionChatJoinedByLink *_data); explicit MTPmessageAction(MTPDmessageActionChannelCreate *_data); explicit MTPmessageAction(MTPDmessageActionChatMigrateTo *_data); explicit MTPmessageAction(MTPDmessageActionChannelMigrateFrom *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPMessageAction; class MTPdialog : private mtpDataOwner { public: MTPdialog(); MTPdialog(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_dialog) : mtpDataOwner(0) { read(from, end, cons); } MTPDdialog &_dialog() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDdialog*)data; } const MTPDdialog &c_dialog() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDdialog*)data; } 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(MTPDdialog *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPDialog; class MTPphoto : private mtpDataOwner { public: MTPphoto() : mtpDataOwner(0), _type(0) { } MTPphoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDphotoEmpty &_photoEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoEmpty) throw mtpErrorWrongTypeId(_type, mtpc_photoEmpty); split(); return *(MTPDphotoEmpty*)data; } const MTPDphotoEmpty &c_photoEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoEmpty) throw mtpErrorWrongTypeId(_type, mtpc_photoEmpty); return *(const MTPDphotoEmpty*)data; } MTPDphoto &_photo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photo) throw mtpErrorWrongTypeId(_type, mtpc_photo); split(); return *(MTPDphoto*)data; } const MTPDphoto &c_photo() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photo) throw mtpErrorWrongTypeId(_type, mtpc_photo); return *(const MTPDphoto*)data; } 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(MTPDphotoEmpty *_data); explicit MTPphoto(MTPDphoto *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPPhoto; class MTPphotoSize : private mtpDataOwner { public: MTPphotoSize() : mtpDataOwner(0), _type(0) { } MTPphotoSize(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDphotoSizeEmpty &_photoSizeEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoSizeEmpty) throw mtpErrorWrongTypeId(_type, mtpc_photoSizeEmpty); split(); return *(MTPDphotoSizeEmpty*)data; } const MTPDphotoSizeEmpty &c_photoSizeEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoSizeEmpty) throw mtpErrorWrongTypeId(_type, mtpc_photoSizeEmpty); return *(const MTPDphotoSizeEmpty*)data; } MTPDphotoSize &_photoSize() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoSize) throw mtpErrorWrongTypeId(_type, mtpc_photoSize); split(); return *(MTPDphotoSize*)data; } const MTPDphotoSize &c_photoSize() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoSize) throw mtpErrorWrongTypeId(_type, mtpc_photoSize); return *(const MTPDphotoSize*)data; } MTPDphotoCachedSize &_photoCachedSize() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoCachedSize) throw mtpErrorWrongTypeId(_type, mtpc_photoCachedSize); split(); return *(MTPDphotoCachedSize*)data; } const MTPDphotoCachedSize &c_photoCachedSize() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photoCachedSize) throw mtpErrorWrongTypeId(_type, mtpc_photoCachedSize); return *(const MTPDphotoCachedSize*)data; } 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(MTPDphotoSizeEmpty *_data); explicit MTPphotoSize(MTPDphotoSize *_data); explicit MTPphotoSize(MTPDphotoCachedSize *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPPhotoSize; class MTPgeoPoint : private mtpDataOwner { public: MTPgeoPoint() : mtpDataOwner(0), _type(0) { } MTPgeoPoint(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDgeoPoint &_geoPoint() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_geoPoint) throw mtpErrorWrongTypeId(_type, mtpc_geoPoint); split(); return *(MTPDgeoPoint*)data; } const MTPDgeoPoint &c_geoPoint() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_geoPoint) throw mtpErrorWrongTypeId(_type, mtpc_geoPoint); return *(const MTPDgeoPoint*)data; } 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(MTPDgeoPoint *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPGeoPoint; class MTPauth_checkedPhone : private mtpDataOwner { public: MTPauth_checkedPhone(); MTPauth_checkedPhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_checkedPhone) : mtpDataOwner(0) { read(from, end, cons); } MTPDauth_checkedPhone &_auth_checkedPhone() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDauth_checkedPhone*)data; } const MTPDauth_checkedPhone &c_auth_checkedPhone() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDauth_checkedPhone*)data; } 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(MTPDauth_checkedPhone *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_CheckedPhone; class MTPauth_sentCode : private mtpDataOwner { public: MTPauth_sentCode(); MTPauth_sentCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sentCode) : mtpDataOwner(0) { read(from, end, cons); } MTPDauth_sentCode &_auth_sentCode() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDauth_sentCode*)data; } const MTPDauth_sentCode &c_auth_sentCode() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDauth_sentCode*)data; } 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(MTPDauth_sentCode *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_SentCode; class MTPauth_authorization : private mtpDataOwner { public: MTPauth_authorization(); MTPauth_authorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_authorization) : mtpDataOwner(0) { read(from, end, cons); } MTPDauth_authorization &_auth_authorization() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDauth_authorization*)data; } const MTPDauth_authorization &c_auth_authorization() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDauth_authorization*)data; } 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(MTPDauth_authorization *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_Authorization; class MTPauth_exportedAuthorization : private mtpDataOwner { public: MTPauth_exportedAuthorization(); MTPauth_exportedAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_exportedAuthorization) : mtpDataOwner(0) { read(from, end, cons); } MTPDauth_exportedAuthorization &_auth_exportedAuthorization() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDauth_exportedAuthorization*)data; } const MTPDauth_exportedAuthorization &c_auth_exportedAuthorization() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDauth_exportedAuthorization*)data; } 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(MTPDauth_exportedAuthorization *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_ExportedAuthorization; class MTPinputNotifyPeer : private mtpDataOwner { public: MTPinputNotifyPeer() : mtpDataOwner(0), _type(0) { } MTPinputNotifyPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputNotifyPeer &_inputNotifyPeer() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputNotifyPeer) throw mtpErrorWrongTypeId(_type, mtpc_inputNotifyPeer); split(); return *(MTPDinputNotifyPeer*)data; } const MTPDinputNotifyPeer &c_inputNotifyPeer() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputNotifyPeer) throw mtpErrorWrongTypeId(_type, mtpc_inputNotifyPeer); return *(const MTPDinputNotifyPeer*)data; } 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(MTPDinputNotifyPeer *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputNotifyPeer; class MTPinputPeerNotifyEvents { public: MTPinputPeerNotifyEvents() : _type(0) { } MTPinputPeerNotifyEvents(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPInputPeerNotifyEvents; class MTPinputPeerNotifySettings : private mtpDataOwner { public: MTPinputPeerNotifySettings(); MTPinputPeerNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPeerNotifySettings) : mtpDataOwner(0) { read(from, end, cons); } MTPDinputPeerNotifySettings &_inputPeerNotifySettings() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDinputPeerNotifySettings*)data; } const MTPDinputPeerNotifySettings &c_inputPeerNotifySettings() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDinputPeerNotifySettings*)data; } 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(MTPDinputPeerNotifySettings *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputPeerNotifySettings; class MTPpeerNotifyEvents { public: MTPpeerNotifyEvents() : _type(0) { } MTPpeerNotifyEvents(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPPeerNotifyEvents; class MTPpeerNotifySettings : private mtpDataOwner { public: MTPpeerNotifySettings() : mtpDataOwner(0), _type(0) { } MTPpeerNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDpeerNotifySettings &_peerNotifySettings() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerNotifySettings) throw mtpErrorWrongTypeId(_type, mtpc_peerNotifySettings); split(); return *(MTPDpeerNotifySettings*)data; } const MTPDpeerNotifySettings &c_peerNotifySettings() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_peerNotifySettings) throw mtpErrorWrongTypeId(_type, mtpc_peerNotifySettings); return *(const MTPDpeerNotifySettings*)data; } 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(MTPDpeerNotifySettings *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPPeerNotifySettings; class MTPpeerSettings : private mtpDataOwner { public: MTPpeerSettings(); MTPpeerSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_peerSettings) : mtpDataOwner(0) { read(from, end, cons); } MTPDpeerSettings &_peerSettings() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDpeerSettings*)data; } const MTPDpeerSettings &c_peerSettings() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDpeerSettings*)data; } 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(MTPDpeerSettings *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPPeerSettings; class MTPwallPaper : private mtpDataOwner { public: MTPwallPaper() : mtpDataOwner(0), _type(0) { } MTPwallPaper(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDwallPaper &_wallPaper() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_wallPaper) throw mtpErrorWrongTypeId(_type, mtpc_wallPaper); split(); return *(MTPDwallPaper*)data; } const MTPDwallPaper &c_wallPaper() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_wallPaper) throw mtpErrorWrongTypeId(_type, mtpc_wallPaper); return *(const MTPDwallPaper*)data; } MTPDwallPaperSolid &_wallPaperSolid() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_wallPaperSolid) throw mtpErrorWrongTypeId(_type, mtpc_wallPaperSolid); split(); return *(MTPDwallPaperSolid*)data; } const MTPDwallPaperSolid &c_wallPaperSolid() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_wallPaperSolid) throw mtpErrorWrongTypeId(_type, mtpc_wallPaperSolid); return *(const MTPDwallPaperSolid*)data; } 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(MTPDwallPaper *_data); explicit MTPwallPaper(MTPDwallPaperSolid *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPWallPaper; class MTPreportReason : private mtpDataOwner { public: MTPreportReason() : mtpDataOwner(0), _type(0) { } MTPreportReason(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputReportReasonOther &_inputReportReasonOther() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputReportReasonOther) throw mtpErrorWrongTypeId(_type, mtpc_inputReportReasonOther); split(); return *(MTPDinputReportReasonOther*)data; } const MTPDinputReportReasonOther &c_inputReportReasonOther() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputReportReasonOther) throw mtpErrorWrongTypeId(_type, mtpc_inputReportReasonOther); return *(const MTPDinputReportReasonOther*)data; } 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(MTPDinputReportReasonOther *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPReportReason; class MTPuserFull : private mtpDataOwner { public: MTPuserFull(); MTPuserFull(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_userFull) : mtpDataOwner(0) { read(from, end, cons); } MTPDuserFull &_userFull() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDuserFull*)data; } const MTPDuserFull &c_userFull() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDuserFull*)data; } 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(MTPDuserFull *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPUserFull; class MTPcontact : private mtpDataOwner { public: MTPcontact(); MTPcontact(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contact) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontact &_contact() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontact*)data; } const MTPDcontact &c_contact() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontact*)data; } 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(MTPDcontact *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPContact; class MTPimportedContact : private mtpDataOwner { public: MTPimportedContact(); MTPimportedContact(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_importedContact) : mtpDataOwner(0) { read(from, end, cons); } MTPDimportedContact &_importedContact() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDimportedContact*)data; } const MTPDimportedContact &c_importedContact() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDimportedContact*)data; } 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(MTPDimportedContact *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPImportedContact; class MTPcontactBlocked : private mtpDataOwner { public: MTPcontactBlocked(); MTPcontactBlocked(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contactBlocked) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontactBlocked &_contactBlocked() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontactBlocked*)data; } const MTPDcontactBlocked &c_contactBlocked() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontactBlocked*)data; } 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(MTPDcontactBlocked *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPContactBlocked; class MTPcontactStatus : private mtpDataOwner { public: MTPcontactStatus(); MTPcontactStatus(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contactStatus) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontactStatus &_contactStatus() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontactStatus*)data; } const MTPDcontactStatus &c_contactStatus() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontactStatus*)data; } 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(MTPDcontactStatus *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPContactStatus; class MTPcontacts_link : private mtpDataOwner { public: MTPcontacts_link(); MTPcontacts_link(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_link) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontacts_link &_contacts_link() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontacts_link*)data; } const MTPDcontacts_link &c_contacts_link() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontacts_link*)data; } 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(MTPDcontacts_link *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_Link; class MTPcontacts_contacts : private mtpDataOwner { public: MTPcontacts_contacts() : mtpDataOwner(0), _type(0) { } MTPcontacts_contacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDcontacts_contacts &_contacts_contacts() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_contacts) throw mtpErrorWrongTypeId(_type, mtpc_contacts_contacts); split(); return *(MTPDcontacts_contacts*)data; } const MTPDcontacts_contacts &c_contacts_contacts() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_contacts) throw mtpErrorWrongTypeId(_type, mtpc_contacts_contacts); return *(const MTPDcontacts_contacts*)data; } 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(MTPDcontacts_contacts *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPcontacts_Contacts; class MTPcontacts_importedContacts : private mtpDataOwner { public: MTPcontacts_importedContacts(); MTPcontacts_importedContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_importedContacts) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontacts_importedContacts &_contacts_importedContacts() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontacts_importedContacts*)data; } const MTPDcontacts_importedContacts &c_contacts_importedContacts() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontacts_importedContacts*)data; } 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(MTPDcontacts_importedContacts *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_ImportedContacts; class MTPcontacts_blocked : private mtpDataOwner { public: MTPcontacts_blocked() : mtpDataOwner(0), _type(0) { } MTPcontacts_blocked(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDcontacts_blocked &_contacts_blocked() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_blocked) throw mtpErrorWrongTypeId(_type, mtpc_contacts_blocked); split(); return *(MTPDcontacts_blocked*)data; } const MTPDcontacts_blocked &c_contacts_blocked() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_blocked) throw mtpErrorWrongTypeId(_type, mtpc_contacts_blocked); return *(const MTPDcontacts_blocked*)data; } MTPDcontacts_blockedSlice &_contacts_blockedSlice() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_blockedSlice) throw mtpErrorWrongTypeId(_type, mtpc_contacts_blockedSlice); split(); return *(MTPDcontacts_blockedSlice*)data; } const MTPDcontacts_blockedSlice &c_contacts_blockedSlice() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_blockedSlice) throw mtpErrorWrongTypeId(_type, mtpc_contacts_blockedSlice); return *(const MTPDcontacts_blockedSlice*)data; } 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(MTPDcontacts_blocked *_data); explicit MTPcontacts_blocked(MTPDcontacts_blockedSlice *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPcontacts_Blocked; class MTPmessages_dialogs : private mtpDataOwner { public: MTPmessages_dialogs() : mtpDataOwner(0), _type(0) { } MTPmessages_dialogs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_dialogs &_messages_dialogs() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dialogs) throw mtpErrorWrongTypeId(_type, mtpc_messages_dialogs); split(); return *(MTPDmessages_dialogs*)data; } const MTPDmessages_dialogs &c_messages_dialogs() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dialogs) throw mtpErrorWrongTypeId(_type, mtpc_messages_dialogs); return *(const MTPDmessages_dialogs*)data; } MTPDmessages_dialogsSlice &_messages_dialogsSlice() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dialogsSlice) throw mtpErrorWrongTypeId(_type, mtpc_messages_dialogsSlice); split(); return *(MTPDmessages_dialogsSlice*)data; } const MTPDmessages_dialogsSlice &c_messages_dialogsSlice() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dialogsSlice) throw mtpErrorWrongTypeId(_type, mtpc_messages_dialogsSlice); return *(const MTPDmessages_dialogsSlice*)data; } 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(MTPDmessages_dialogs *_data); explicit MTPmessages_dialogs(MTPDmessages_dialogsSlice *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_Dialogs; class MTPmessages_messages : private mtpDataOwner { public: MTPmessages_messages() : mtpDataOwner(0), _type(0) { } MTPmessages_messages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_messages &_messages_messages() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_messages) throw mtpErrorWrongTypeId(_type, mtpc_messages_messages); split(); return *(MTPDmessages_messages*)data; } const MTPDmessages_messages &c_messages_messages() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_messages) throw mtpErrorWrongTypeId(_type, mtpc_messages_messages); return *(const MTPDmessages_messages*)data; } MTPDmessages_messagesSlice &_messages_messagesSlice() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_messagesSlice) throw mtpErrorWrongTypeId(_type, mtpc_messages_messagesSlice); split(); return *(MTPDmessages_messagesSlice*)data; } const MTPDmessages_messagesSlice &c_messages_messagesSlice() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_messagesSlice) throw mtpErrorWrongTypeId(_type, mtpc_messages_messagesSlice); return *(const MTPDmessages_messagesSlice*)data; } MTPDmessages_channelMessages &_messages_channelMessages() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_channelMessages) throw mtpErrorWrongTypeId(_type, mtpc_messages_channelMessages); split(); return *(MTPDmessages_channelMessages*)data; } const MTPDmessages_channelMessages &c_messages_channelMessages() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_channelMessages) throw mtpErrorWrongTypeId(_type, mtpc_messages_channelMessages); return *(const MTPDmessages_channelMessages*)data; } 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(MTPDmessages_messages *_data); explicit MTPmessages_messages(MTPDmessages_messagesSlice *_data); explicit MTPmessages_messages(MTPDmessages_channelMessages *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_Messages; class MTPmessages_chats : private mtpDataOwner { public: MTPmessages_chats(); MTPmessages_chats(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_chats) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_chats &_messages_chats() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_chats*)data; } const MTPDmessages_chats &c_messages_chats() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_chats*)data; } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_chats); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPmessages_chats(MTPDmessages_chats *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_Chats; class MTPmessages_chatFull : private mtpDataOwner { public: MTPmessages_chatFull(); MTPmessages_chatFull(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_chatFull) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_chatFull &_messages_chatFull() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_chatFull*)data; } const MTPDmessages_chatFull &c_messages_chatFull() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_chatFull*)data; } 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(MTPDmessages_chatFull *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_ChatFull; class MTPmessages_affectedHistory : private mtpDataOwner { public: MTPmessages_affectedHistory(); MTPmessages_affectedHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_affectedHistory) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_affectedHistory &_messages_affectedHistory() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_affectedHistory*)data; } const MTPDmessages_affectedHistory &c_messages_affectedHistory() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_affectedHistory*)data; } 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(MTPDmessages_affectedHistory *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_AffectedHistory; class MTPmessagesFilter { public: MTPmessagesFilter() : _type(0) { } MTPmessagesFilter(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPMessagesFilter; class MTPupdate : private mtpDataOwner { public: MTPupdate() : mtpDataOwner(0), _type(0) { } MTPupdate(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDupdateNewMessage &_updateNewMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateNewMessage); split(); return *(MTPDupdateNewMessage*)data; } const MTPDupdateNewMessage &c_updateNewMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateNewMessage); return *(const MTPDupdateNewMessage*)data; } MTPDupdateMessageID &_updateMessageID() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateMessageID) throw mtpErrorWrongTypeId(_type, mtpc_updateMessageID); split(); return *(MTPDupdateMessageID*)data; } const MTPDupdateMessageID &c_updateMessageID() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateMessageID) throw mtpErrorWrongTypeId(_type, mtpc_updateMessageID); return *(const MTPDupdateMessageID*)data; } MTPDupdateDeleteMessages &_updateDeleteMessages() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDeleteMessages) throw mtpErrorWrongTypeId(_type, mtpc_updateDeleteMessages); split(); return *(MTPDupdateDeleteMessages*)data; } const MTPDupdateDeleteMessages &c_updateDeleteMessages() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDeleteMessages) throw mtpErrorWrongTypeId(_type, mtpc_updateDeleteMessages); return *(const MTPDupdateDeleteMessages*)data; } MTPDupdateUserTyping &_updateUserTyping() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserTyping) throw mtpErrorWrongTypeId(_type, mtpc_updateUserTyping); split(); return *(MTPDupdateUserTyping*)data; } const MTPDupdateUserTyping &c_updateUserTyping() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserTyping) throw mtpErrorWrongTypeId(_type, mtpc_updateUserTyping); return *(const MTPDupdateUserTyping*)data; } MTPDupdateChatUserTyping &_updateChatUserTyping() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatUserTyping) throw mtpErrorWrongTypeId(_type, mtpc_updateChatUserTyping); split(); return *(MTPDupdateChatUserTyping*)data; } const MTPDupdateChatUserTyping &c_updateChatUserTyping() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatUserTyping) throw mtpErrorWrongTypeId(_type, mtpc_updateChatUserTyping); return *(const MTPDupdateChatUserTyping*)data; } MTPDupdateChatParticipants &_updateChatParticipants() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipants) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipants); split(); return *(MTPDupdateChatParticipants*)data; } const MTPDupdateChatParticipants &c_updateChatParticipants() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipants) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipants); return *(const MTPDupdateChatParticipants*)data; } MTPDupdateUserStatus &_updateUserStatus() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserStatus) throw mtpErrorWrongTypeId(_type, mtpc_updateUserStatus); split(); return *(MTPDupdateUserStatus*)data; } const MTPDupdateUserStatus &c_updateUserStatus() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserStatus) throw mtpErrorWrongTypeId(_type, mtpc_updateUserStatus); return *(const MTPDupdateUserStatus*)data; } MTPDupdateUserName &_updateUserName() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserName) throw mtpErrorWrongTypeId(_type, mtpc_updateUserName); split(); return *(MTPDupdateUserName*)data; } const MTPDupdateUserName &c_updateUserName() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserName) throw mtpErrorWrongTypeId(_type, mtpc_updateUserName); return *(const MTPDupdateUserName*)data; } MTPDupdateUserPhoto &_updateUserPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserPhoto) throw mtpErrorWrongTypeId(_type, mtpc_updateUserPhoto); split(); return *(MTPDupdateUserPhoto*)data; } const MTPDupdateUserPhoto &c_updateUserPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserPhoto) throw mtpErrorWrongTypeId(_type, mtpc_updateUserPhoto); return *(const MTPDupdateUserPhoto*)data; } MTPDupdateContactRegistered &_updateContactRegistered() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateContactRegistered) throw mtpErrorWrongTypeId(_type, mtpc_updateContactRegistered); split(); return *(MTPDupdateContactRegistered*)data; } const MTPDupdateContactRegistered &c_updateContactRegistered() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateContactRegistered) throw mtpErrorWrongTypeId(_type, mtpc_updateContactRegistered); return *(const MTPDupdateContactRegistered*)data; } MTPDupdateContactLink &_updateContactLink() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateContactLink) throw mtpErrorWrongTypeId(_type, mtpc_updateContactLink); split(); return *(MTPDupdateContactLink*)data; } const MTPDupdateContactLink &c_updateContactLink() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateContactLink) throw mtpErrorWrongTypeId(_type, mtpc_updateContactLink); return *(const MTPDupdateContactLink*)data; } MTPDupdateNewAuthorization &_updateNewAuthorization() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewAuthorization) throw mtpErrorWrongTypeId(_type, mtpc_updateNewAuthorization); split(); return *(MTPDupdateNewAuthorization*)data; } const MTPDupdateNewAuthorization &c_updateNewAuthorization() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewAuthorization) throw mtpErrorWrongTypeId(_type, mtpc_updateNewAuthorization); return *(const MTPDupdateNewAuthorization*)data; } MTPDupdateNewEncryptedMessage &_updateNewEncryptedMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewEncryptedMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateNewEncryptedMessage); split(); return *(MTPDupdateNewEncryptedMessage*)data; } const MTPDupdateNewEncryptedMessage &c_updateNewEncryptedMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewEncryptedMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateNewEncryptedMessage); return *(const MTPDupdateNewEncryptedMessage*)data; } MTPDupdateEncryptedChatTyping &_updateEncryptedChatTyping() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEncryptedChatTyping) throw mtpErrorWrongTypeId(_type, mtpc_updateEncryptedChatTyping); split(); return *(MTPDupdateEncryptedChatTyping*)data; } const MTPDupdateEncryptedChatTyping &c_updateEncryptedChatTyping() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEncryptedChatTyping) throw mtpErrorWrongTypeId(_type, mtpc_updateEncryptedChatTyping); return *(const MTPDupdateEncryptedChatTyping*)data; } MTPDupdateEncryption &_updateEncryption() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEncryption) throw mtpErrorWrongTypeId(_type, mtpc_updateEncryption); split(); return *(MTPDupdateEncryption*)data; } const MTPDupdateEncryption &c_updateEncryption() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEncryption) throw mtpErrorWrongTypeId(_type, mtpc_updateEncryption); return *(const MTPDupdateEncryption*)data; } MTPDupdateEncryptedMessagesRead &_updateEncryptedMessagesRead() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEncryptedMessagesRead) throw mtpErrorWrongTypeId(_type, mtpc_updateEncryptedMessagesRead); split(); return *(MTPDupdateEncryptedMessagesRead*)data; } const MTPDupdateEncryptedMessagesRead &c_updateEncryptedMessagesRead() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEncryptedMessagesRead) throw mtpErrorWrongTypeId(_type, mtpc_updateEncryptedMessagesRead); return *(const MTPDupdateEncryptedMessagesRead*)data; } MTPDupdateChatParticipantAdd &_updateChatParticipantAdd() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipantAdd) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipantAdd); split(); return *(MTPDupdateChatParticipantAdd*)data; } const MTPDupdateChatParticipantAdd &c_updateChatParticipantAdd() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipantAdd) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipantAdd); return *(const MTPDupdateChatParticipantAdd*)data; } MTPDupdateChatParticipantDelete &_updateChatParticipantDelete() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipantDelete) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipantDelete); split(); return *(MTPDupdateChatParticipantDelete*)data; } const MTPDupdateChatParticipantDelete &c_updateChatParticipantDelete() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipantDelete) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipantDelete); return *(const MTPDupdateChatParticipantDelete*)data; } MTPDupdateDcOptions &_updateDcOptions() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDcOptions) throw mtpErrorWrongTypeId(_type, mtpc_updateDcOptions); split(); return *(MTPDupdateDcOptions*)data; } const MTPDupdateDcOptions &c_updateDcOptions() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDcOptions) throw mtpErrorWrongTypeId(_type, mtpc_updateDcOptions); return *(const MTPDupdateDcOptions*)data; } MTPDupdateUserBlocked &_updateUserBlocked() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserBlocked) throw mtpErrorWrongTypeId(_type, mtpc_updateUserBlocked); split(); return *(MTPDupdateUserBlocked*)data; } const MTPDupdateUserBlocked &c_updateUserBlocked() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserBlocked) throw mtpErrorWrongTypeId(_type, mtpc_updateUserBlocked); return *(const MTPDupdateUserBlocked*)data; } MTPDupdateNotifySettings &_updateNotifySettings() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNotifySettings) throw mtpErrorWrongTypeId(_type, mtpc_updateNotifySettings); split(); return *(MTPDupdateNotifySettings*)data; } const MTPDupdateNotifySettings &c_updateNotifySettings() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNotifySettings) throw mtpErrorWrongTypeId(_type, mtpc_updateNotifySettings); return *(const MTPDupdateNotifySettings*)data; } MTPDupdateServiceNotification &_updateServiceNotification() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateServiceNotification) throw mtpErrorWrongTypeId(_type, mtpc_updateServiceNotification); split(); return *(MTPDupdateServiceNotification*)data; } const MTPDupdateServiceNotification &c_updateServiceNotification() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateServiceNotification) throw mtpErrorWrongTypeId(_type, mtpc_updateServiceNotification); return *(const MTPDupdateServiceNotification*)data; } MTPDupdatePrivacy &_updatePrivacy() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updatePrivacy) throw mtpErrorWrongTypeId(_type, mtpc_updatePrivacy); split(); return *(MTPDupdatePrivacy*)data; } const MTPDupdatePrivacy &c_updatePrivacy() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updatePrivacy) throw mtpErrorWrongTypeId(_type, mtpc_updatePrivacy); return *(const MTPDupdatePrivacy*)data; } MTPDupdateUserPhone &_updateUserPhone() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserPhone) throw mtpErrorWrongTypeId(_type, mtpc_updateUserPhone); split(); return *(MTPDupdateUserPhone*)data; } const MTPDupdateUserPhone &c_updateUserPhone() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateUserPhone) throw mtpErrorWrongTypeId(_type, mtpc_updateUserPhone); return *(const MTPDupdateUserPhone*)data; } MTPDupdateReadHistoryInbox &_updateReadHistoryInbox() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadHistoryInbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadHistoryInbox); split(); return *(MTPDupdateReadHistoryInbox*)data; } const MTPDupdateReadHistoryInbox &c_updateReadHistoryInbox() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadHistoryInbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadHistoryInbox); return *(const MTPDupdateReadHistoryInbox*)data; } MTPDupdateReadHistoryOutbox &_updateReadHistoryOutbox() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadHistoryOutbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadHistoryOutbox); split(); return *(MTPDupdateReadHistoryOutbox*)data; } const MTPDupdateReadHistoryOutbox &c_updateReadHistoryOutbox() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadHistoryOutbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadHistoryOutbox); return *(const MTPDupdateReadHistoryOutbox*)data; } MTPDupdateWebPage &_updateWebPage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateWebPage) throw mtpErrorWrongTypeId(_type, mtpc_updateWebPage); split(); return *(MTPDupdateWebPage*)data; } const MTPDupdateWebPage &c_updateWebPage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateWebPage) throw mtpErrorWrongTypeId(_type, mtpc_updateWebPage); return *(const MTPDupdateWebPage*)data; } MTPDupdateReadMessagesContents &_updateReadMessagesContents() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadMessagesContents) throw mtpErrorWrongTypeId(_type, mtpc_updateReadMessagesContents); split(); return *(MTPDupdateReadMessagesContents*)data; } const MTPDupdateReadMessagesContents &c_updateReadMessagesContents() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadMessagesContents) throw mtpErrorWrongTypeId(_type, mtpc_updateReadMessagesContents); return *(const MTPDupdateReadMessagesContents*)data; } MTPDupdateChannelTooLong &_updateChannelTooLong() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannelTooLong) throw mtpErrorWrongTypeId(_type, mtpc_updateChannelTooLong); split(); return *(MTPDupdateChannelTooLong*)data; } const MTPDupdateChannelTooLong &c_updateChannelTooLong() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannelTooLong) throw mtpErrorWrongTypeId(_type, mtpc_updateChannelTooLong); return *(const MTPDupdateChannelTooLong*)data; } MTPDupdateChannel &_updateChannel() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannel) throw mtpErrorWrongTypeId(_type, mtpc_updateChannel); split(); return *(MTPDupdateChannel*)data; } const MTPDupdateChannel &c_updateChannel() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannel) throw mtpErrorWrongTypeId(_type, mtpc_updateChannel); return *(const MTPDupdateChannel*)data; } MTPDupdateNewChannelMessage &_updateNewChannelMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewChannelMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateNewChannelMessage); split(); return *(MTPDupdateNewChannelMessage*)data; } const MTPDupdateNewChannelMessage &c_updateNewChannelMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewChannelMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateNewChannelMessage); return *(const MTPDupdateNewChannelMessage*)data; } MTPDupdateReadChannelInbox &_updateReadChannelInbox() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadChannelInbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadChannelInbox); split(); return *(MTPDupdateReadChannelInbox*)data; } const MTPDupdateReadChannelInbox &c_updateReadChannelInbox() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadChannelInbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadChannelInbox); return *(const MTPDupdateReadChannelInbox*)data; } MTPDupdateDeleteChannelMessages &_updateDeleteChannelMessages() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDeleteChannelMessages) throw mtpErrorWrongTypeId(_type, mtpc_updateDeleteChannelMessages); split(); return *(MTPDupdateDeleteChannelMessages*)data; } const MTPDupdateDeleteChannelMessages &c_updateDeleteChannelMessages() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDeleteChannelMessages) throw mtpErrorWrongTypeId(_type, mtpc_updateDeleteChannelMessages); return *(const MTPDupdateDeleteChannelMessages*)data; } MTPDupdateChannelMessageViews &_updateChannelMessageViews() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannelMessageViews) throw mtpErrorWrongTypeId(_type, mtpc_updateChannelMessageViews); split(); return *(MTPDupdateChannelMessageViews*)data; } const MTPDupdateChannelMessageViews &c_updateChannelMessageViews() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannelMessageViews) throw mtpErrorWrongTypeId(_type, mtpc_updateChannelMessageViews); return *(const MTPDupdateChannelMessageViews*)data; } MTPDupdateChatAdmins &_updateChatAdmins() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatAdmins) throw mtpErrorWrongTypeId(_type, mtpc_updateChatAdmins); split(); return *(MTPDupdateChatAdmins*)data; } const MTPDupdateChatAdmins &c_updateChatAdmins() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatAdmins) throw mtpErrorWrongTypeId(_type, mtpc_updateChatAdmins); return *(const MTPDupdateChatAdmins*)data; } MTPDupdateChatParticipantAdmin &_updateChatParticipantAdmin() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipantAdmin) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipantAdmin); split(); return *(MTPDupdateChatParticipantAdmin*)data; } const MTPDupdateChatParticipantAdmin &c_updateChatParticipantAdmin() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChatParticipantAdmin) throw mtpErrorWrongTypeId(_type, mtpc_updateChatParticipantAdmin); return *(const MTPDupdateChatParticipantAdmin*)data; } MTPDupdateNewStickerSet &_updateNewStickerSet() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewStickerSet) throw mtpErrorWrongTypeId(_type, mtpc_updateNewStickerSet); split(); return *(MTPDupdateNewStickerSet*)data; } const MTPDupdateNewStickerSet &c_updateNewStickerSet() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateNewStickerSet) throw mtpErrorWrongTypeId(_type, mtpc_updateNewStickerSet); return *(const MTPDupdateNewStickerSet*)data; } MTPDupdateStickerSetsOrder &_updateStickerSetsOrder() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateStickerSetsOrder) throw mtpErrorWrongTypeId(_type, mtpc_updateStickerSetsOrder); split(); return *(MTPDupdateStickerSetsOrder*)data; } const MTPDupdateStickerSetsOrder &c_updateStickerSetsOrder() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateStickerSetsOrder) throw mtpErrorWrongTypeId(_type, mtpc_updateStickerSetsOrder); return *(const MTPDupdateStickerSetsOrder*)data; } MTPDupdateBotInlineQuery &_updateBotInlineQuery() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateBotInlineQuery) throw mtpErrorWrongTypeId(_type, mtpc_updateBotInlineQuery); split(); return *(MTPDupdateBotInlineQuery*)data; } const MTPDupdateBotInlineQuery &c_updateBotInlineQuery() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateBotInlineQuery) throw mtpErrorWrongTypeId(_type, mtpc_updateBotInlineQuery); return *(const MTPDupdateBotInlineQuery*)data; } MTPDupdateBotInlineSend &_updateBotInlineSend() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateBotInlineSend) throw mtpErrorWrongTypeId(_type, mtpc_updateBotInlineSend); split(); return *(MTPDupdateBotInlineSend*)data; } const MTPDupdateBotInlineSend &c_updateBotInlineSend() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateBotInlineSend) throw mtpErrorWrongTypeId(_type, mtpc_updateBotInlineSend); return *(const MTPDupdateBotInlineSend*)data; } MTPDupdateEditChannelMessage &_updateEditChannelMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEditChannelMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateEditChannelMessage); split(); return *(MTPDupdateEditChannelMessage*)data; } const MTPDupdateEditChannelMessage &c_updateEditChannelMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEditChannelMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateEditChannelMessage); return *(const MTPDupdateEditChannelMessage*)data; } MTPDupdateChannelPinnedMessage &_updateChannelPinnedMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannelPinnedMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateChannelPinnedMessage); split(); return *(MTPDupdateChannelPinnedMessage*)data; } const MTPDupdateChannelPinnedMessage &c_updateChannelPinnedMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateChannelPinnedMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateChannelPinnedMessage); return *(const MTPDupdateChannelPinnedMessage*)data; } MTPDupdateBotCallbackQuery &_updateBotCallbackQuery() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateBotCallbackQuery) throw mtpErrorWrongTypeId(_type, mtpc_updateBotCallbackQuery); split(); return *(MTPDupdateBotCallbackQuery*)data; } const MTPDupdateBotCallbackQuery &c_updateBotCallbackQuery() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateBotCallbackQuery) throw mtpErrorWrongTypeId(_type, mtpc_updateBotCallbackQuery); return *(const MTPDupdateBotCallbackQuery*)data; } MTPDupdateEditMessage &_updateEditMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEditMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateEditMessage); split(); return *(MTPDupdateEditMessage*)data; } const MTPDupdateEditMessage &c_updateEditMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateEditMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateEditMessage); return *(const MTPDupdateEditMessage*)data; } MTPDupdateInlineBotCallbackQuery &_updateInlineBotCallbackQuery() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateInlineBotCallbackQuery) throw mtpErrorWrongTypeId(_type, mtpc_updateInlineBotCallbackQuery); split(); return *(MTPDupdateInlineBotCallbackQuery*)data; } const MTPDupdateInlineBotCallbackQuery &c_updateInlineBotCallbackQuery() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateInlineBotCallbackQuery) throw mtpErrorWrongTypeId(_type, mtpc_updateInlineBotCallbackQuery); return *(const MTPDupdateInlineBotCallbackQuery*)data; } MTPDupdateReadChannelOutbox &_updateReadChannelOutbox() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadChannelOutbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadChannelOutbox); split(); return *(MTPDupdateReadChannelOutbox*)data; } const MTPDupdateReadChannelOutbox &c_updateReadChannelOutbox() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateReadChannelOutbox) throw mtpErrorWrongTypeId(_type, mtpc_updateReadChannelOutbox); return *(const MTPDupdateReadChannelOutbox*)data; } MTPDupdateDraftMessage &_updateDraftMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDraftMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateDraftMessage); split(); return *(MTPDupdateDraftMessage*)data; } const MTPDupdateDraftMessage &c_updateDraftMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateDraftMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateDraftMessage); return *(const MTPDupdateDraftMessage*)data; } 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(MTPDupdateNewMessage *_data); explicit MTPupdate(MTPDupdateMessageID *_data); explicit MTPupdate(MTPDupdateDeleteMessages *_data); explicit MTPupdate(MTPDupdateUserTyping *_data); explicit MTPupdate(MTPDupdateChatUserTyping *_data); explicit MTPupdate(MTPDupdateChatParticipants *_data); explicit MTPupdate(MTPDupdateUserStatus *_data); explicit MTPupdate(MTPDupdateUserName *_data); explicit MTPupdate(MTPDupdateUserPhoto *_data); explicit MTPupdate(MTPDupdateContactRegistered *_data); explicit MTPupdate(MTPDupdateContactLink *_data); explicit MTPupdate(MTPDupdateNewAuthorization *_data); explicit MTPupdate(MTPDupdateNewEncryptedMessage *_data); explicit MTPupdate(MTPDupdateEncryptedChatTyping *_data); explicit MTPupdate(MTPDupdateEncryption *_data); explicit MTPupdate(MTPDupdateEncryptedMessagesRead *_data); explicit MTPupdate(MTPDupdateChatParticipantAdd *_data); explicit MTPupdate(MTPDupdateChatParticipantDelete *_data); explicit MTPupdate(MTPDupdateDcOptions *_data); explicit MTPupdate(MTPDupdateUserBlocked *_data); explicit MTPupdate(MTPDupdateNotifySettings *_data); explicit MTPupdate(MTPDupdateServiceNotification *_data); explicit MTPupdate(MTPDupdatePrivacy *_data); explicit MTPupdate(MTPDupdateUserPhone *_data); explicit MTPupdate(MTPDupdateReadHistoryInbox *_data); explicit MTPupdate(MTPDupdateReadHistoryOutbox *_data); explicit MTPupdate(MTPDupdateWebPage *_data); explicit MTPupdate(MTPDupdateReadMessagesContents *_data); explicit MTPupdate(MTPDupdateChannelTooLong *_data); explicit MTPupdate(MTPDupdateChannel *_data); explicit MTPupdate(MTPDupdateNewChannelMessage *_data); explicit MTPupdate(MTPDupdateReadChannelInbox *_data); explicit MTPupdate(MTPDupdateDeleteChannelMessages *_data); explicit MTPupdate(MTPDupdateChannelMessageViews *_data); explicit MTPupdate(MTPDupdateChatAdmins *_data); explicit MTPupdate(MTPDupdateChatParticipantAdmin *_data); explicit MTPupdate(MTPDupdateNewStickerSet *_data); explicit MTPupdate(MTPDupdateStickerSetsOrder *_data); explicit MTPupdate(MTPDupdateBotInlineQuery *_data); explicit MTPupdate(MTPDupdateBotInlineSend *_data); explicit MTPupdate(MTPDupdateEditChannelMessage *_data); explicit MTPupdate(MTPDupdateChannelPinnedMessage *_data); explicit MTPupdate(MTPDupdateBotCallbackQuery *_data); explicit MTPupdate(MTPDupdateEditMessage *_data); explicit MTPupdate(MTPDupdateInlineBotCallbackQuery *_data); explicit MTPupdate(MTPDupdateReadChannelOutbox *_data); explicit MTPupdate(MTPDupdateDraftMessage *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPUpdate; class MTPupdates_state : private mtpDataOwner { public: MTPupdates_state(); MTPupdates_state(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_state) : mtpDataOwner(0) { read(from, end, cons); } MTPDupdates_state &_updates_state() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDupdates_state*)data; } const MTPDupdates_state &c_updates_state() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDupdates_state*)data; } 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(MTPDupdates_state *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPupdates_State; class MTPupdates_difference : private mtpDataOwner { public: MTPupdates_difference() : mtpDataOwner(0), _type(0) { } MTPupdates_difference(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDupdates_differenceEmpty &_updates_differenceEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_differenceEmpty) throw mtpErrorWrongTypeId(_type, mtpc_updates_differenceEmpty); split(); return *(MTPDupdates_differenceEmpty*)data; } const MTPDupdates_differenceEmpty &c_updates_differenceEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_differenceEmpty) throw mtpErrorWrongTypeId(_type, mtpc_updates_differenceEmpty); return *(const MTPDupdates_differenceEmpty*)data; } MTPDupdates_difference &_updates_difference() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_difference) throw mtpErrorWrongTypeId(_type, mtpc_updates_difference); split(); return *(MTPDupdates_difference*)data; } const MTPDupdates_difference &c_updates_difference() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_difference) throw mtpErrorWrongTypeId(_type, mtpc_updates_difference); return *(const MTPDupdates_difference*)data; } MTPDupdates_differenceSlice &_updates_differenceSlice() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_differenceSlice) throw mtpErrorWrongTypeId(_type, mtpc_updates_differenceSlice); split(); return *(MTPDupdates_differenceSlice*)data; } const MTPDupdates_differenceSlice &c_updates_differenceSlice() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_differenceSlice) throw mtpErrorWrongTypeId(_type, mtpc_updates_differenceSlice); return *(const MTPDupdates_differenceSlice*)data; } 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(MTPDupdates_differenceEmpty *_data); explicit MTPupdates_difference(MTPDupdates_difference *_data); explicit MTPupdates_difference(MTPDupdates_differenceSlice *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPupdates_Difference; class MTPupdates : private mtpDataOwner { public: MTPupdates() : mtpDataOwner(0), _type(0) { } MTPupdates(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDupdateShortMessage &_updateShortMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShortMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateShortMessage); split(); return *(MTPDupdateShortMessage*)data; } const MTPDupdateShortMessage &c_updateShortMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShortMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateShortMessage); return *(const MTPDupdateShortMessage*)data; } MTPDupdateShortChatMessage &_updateShortChatMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShortChatMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateShortChatMessage); split(); return *(MTPDupdateShortChatMessage*)data; } const MTPDupdateShortChatMessage &c_updateShortChatMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShortChatMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateShortChatMessage); return *(const MTPDupdateShortChatMessage*)data; } MTPDupdateShort &_updateShort() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShort) throw mtpErrorWrongTypeId(_type, mtpc_updateShort); split(); return *(MTPDupdateShort*)data; } const MTPDupdateShort &c_updateShort() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShort) throw mtpErrorWrongTypeId(_type, mtpc_updateShort); return *(const MTPDupdateShort*)data; } MTPDupdatesCombined &_updatesCombined() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updatesCombined) throw mtpErrorWrongTypeId(_type, mtpc_updatesCombined); split(); return *(MTPDupdatesCombined*)data; } const MTPDupdatesCombined &c_updatesCombined() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updatesCombined) throw mtpErrorWrongTypeId(_type, mtpc_updatesCombined); return *(const MTPDupdatesCombined*)data; } MTPDupdates &_updates() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates) throw mtpErrorWrongTypeId(_type, mtpc_updates); split(); return *(MTPDupdates*)data; } const MTPDupdates &c_updates() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates) throw mtpErrorWrongTypeId(_type, mtpc_updates); return *(const MTPDupdates*)data; } MTPDupdateShortSentMessage &_updateShortSentMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShortSentMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateShortSentMessage); split(); return *(MTPDupdateShortSentMessage*)data; } const MTPDupdateShortSentMessage &c_updateShortSentMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updateShortSentMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateShortSentMessage); return *(const MTPDupdateShortSentMessage*)data; } 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(MTPDupdateShortMessage *_data); explicit MTPupdates(MTPDupdateShortChatMessage *_data); explicit MTPupdates(MTPDupdateShort *_data); explicit MTPupdates(MTPDupdatesCombined *_data); explicit MTPupdates(MTPDupdates *_data); explicit MTPupdates(MTPDupdateShortSentMessage *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPUpdates; class MTPphotos_photos : private mtpDataOwner { public: MTPphotos_photos() : mtpDataOwner(0), _type(0) { } MTPphotos_photos(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDphotos_photos &_photos_photos() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photos_photos) throw mtpErrorWrongTypeId(_type, mtpc_photos_photos); split(); return *(MTPDphotos_photos*)data; } const MTPDphotos_photos &c_photos_photos() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photos_photos) throw mtpErrorWrongTypeId(_type, mtpc_photos_photos); return *(const MTPDphotos_photos*)data; } MTPDphotos_photosSlice &_photos_photosSlice() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photos_photosSlice) throw mtpErrorWrongTypeId(_type, mtpc_photos_photosSlice); split(); return *(MTPDphotos_photosSlice*)data; } const MTPDphotos_photosSlice &c_photos_photosSlice() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_photos_photosSlice) throw mtpErrorWrongTypeId(_type, mtpc_photos_photosSlice); return *(const MTPDphotos_photosSlice*)data; } 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(MTPDphotos_photos *_data); explicit MTPphotos_photos(MTPDphotos_photosSlice *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPphotos_Photos; class MTPphotos_photo : private mtpDataOwner { public: MTPphotos_photo(); MTPphotos_photo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_photo) : mtpDataOwner(0) { read(from, end, cons); } MTPDphotos_photo &_photos_photo() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDphotos_photo*)data; } const MTPDphotos_photo &c_photos_photo() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDphotos_photo*)data; } 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(MTPDphotos_photo *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPphotos_Photo; class MTPupload_file : private mtpDataOwner { public: MTPupload_file(); MTPupload_file(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_file) : mtpDataOwner(0) { read(from, end, cons); } MTPDupload_file &_upload_file() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDupload_file*)data; } const MTPDupload_file &c_upload_file() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDupload_file*)data; } 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(MTPDupload_file *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPupload_File; class MTPdcOption : private mtpDataOwner { public: MTPdcOption(); MTPdcOption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_dcOption) : mtpDataOwner(0) { read(from, end, cons); } MTPDdcOption &_dcOption() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDdcOption*)data; } const MTPDdcOption &c_dcOption() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDdcOption*)data; } 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(MTPDdcOption *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPDcOption; class MTPconfig : private mtpDataOwner { public: MTPconfig(); MTPconfig(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_config) : mtpDataOwner(0) { read(from, end, cons); } MTPDconfig &_config() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDconfig*)data; } const MTPDconfig &c_config() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDconfig*)data; } 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(MTPDconfig *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPConfig; class MTPnearestDc : private mtpDataOwner { public: MTPnearestDc(); MTPnearestDc(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_nearestDc) : mtpDataOwner(0) { read(from, end, cons); } MTPDnearestDc &_nearestDc() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDnearestDc*)data; } const MTPDnearestDc &c_nearestDc() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDnearestDc*)data; } 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(MTPDnearestDc *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPNearestDc; class MTPhelp_appUpdate : private mtpDataOwner { public: MTPhelp_appUpdate() : mtpDataOwner(0), _type(0) { } MTPhelp_appUpdate(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDhelp_appUpdate &_help_appUpdate() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_help_appUpdate) throw mtpErrorWrongTypeId(_type, mtpc_help_appUpdate); split(); return *(MTPDhelp_appUpdate*)data; } const MTPDhelp_appUpdate &c_help_appUpdate() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_help_appUpdate) throw mtpErrorWrongTypeId(_type, mtpc_help_appUpdate); return *(const MTPDhelp_appUpdate*)data; } 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(MTPDhelp_appUpdate *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPhelp_AppUpdate; class MTPhelp_inviteText : private mtpDataOwner { public: MTPhelp_inviteText(); MTPhelp_inviteText(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_inviteText) : mtpDataOwner(0) { read(from, end, cons); } MTPDhelp_inviteText &_help_inviteText() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDhelp_inviteText*)data; } const MTPDhelp_inviteText &c_help_inviteText() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDhelp_inviteText*)data; } 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(MTPDhelp_inviteText *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPhelp_InviteText; class MTPencryptedChat : private mtpDataOwner { public: MTPencryptedChat() : mtpDataOwner(0), _type(0) { } MTPencryptedChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDencryptedChatEmpty &_encryptedChatEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatEmpty) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatEmpty); split(); return *(MTPDencryptedChatEmpty*)data; } const MTPDencryptedChatEmpty &c_encryptedChatEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatEmpty) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatEmpty); return *(const MTPDencryptedChatEmpty*)data; } MTPDencryptedChatWaiting &_encryptedChatWaiting() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatWaiting) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatWaiting); split(); return *(MTPDencryptedChatWaiting*)data; } const MTPDencryptedChatWaiting &c_encryptedChatWaiting() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatWaiting) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatWaiting); return *(const MTPDencryptedChatWaiting*)data; } MTPDencryptedChatRequested &_encryptedChatRequested() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatRequested) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatRequested); split(); return *(MTPDencryptedChatRequested*)data; } const MTPDencryptedChatRequested &c_encryptedChatRequested() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatRequested) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatRequested); return *(const MTPDencryptedChatRequested*)data; } MTPDencryptedChat &_encryptedChat() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChat) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChat); split(); return *(MTPDencryptedChat*)data; } const MTPDencryptedChat &c_encryptedChat() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChat) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChat); return *(const MTPDencryptedChat*)data; } MTPDencryptedChatDiscarded &_encryptedChatDiscarded() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatDiscarded) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatDiscarded); split(); return *(MTPDencryptedChatDiscarded*)data; } const MTPDencryptedChatDiscarded &c_encryptedChatDiscarded() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedChatDiscarded) throw mtpErrorWrongTypeId(_type, mtpc_encryptedChatDiscarded); return *(const MTPDencryptedChatDiscarded*)data; } 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(MTPDencryptedChatEmpty *_data); explicit MTPencryptedChat(MTPDencryptedChatWaiting *_data); explicit MTPencryptedChat(MTPDencryptedChatRequested *_data); explicit MTPencryptedChat(MTPDencryptedChat *_data); explicit MTPencryptedChat(MTPDencryptedChatDiscarded *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPEncryptedChat; class MTPinputEncryptedChat : private mtpDataOwner { public: MTPinputEncryptedChat(); MTPinputEncryptedChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputEncryptedChat) : mtpDataOwner(0) { read(from, end, cons); } MTPDinputEncryptedChat &_inputEncryptedChat() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDinputEncryptedChat*)data; } const MTPDinputEncryptedChat &c_inputEncryptedChat() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDinputEncryptedChat*)data; } 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(MTPDinputEncryptedChat *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputEncryptedChat; class MTPencryptedFile : private mtpDataOwner { public: MTPencryptedFile() : mtpDataOwner(0), _type(0) { } MTPencryptedFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDencryptedFile &_encryptedFile() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedFile) throw mtpErrorWrongTypeId(_type, mtpc_encryptedFile); split(); return *(MTPDencryptedFile*)data; } const MTPDencryptedFile &c_encryptedFile() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedFile) throw mtpErrorWrongTypeId(_type, mtpc_encryptedFile); return *(const MTPDencryptedFile*)data; } 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(MTPDencryptedFile *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPEncryptedFile; class MTPinputEncryptedFile : private mtpDataOwner { public: MTPinputEncryptedFile() : mtpDataOwner(0), _type(0) { } MTPinputEncryptedFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputEncryptedFileUploaded &_inputEncryptedFileUploaded() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileUploaded) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileUploaded); split(); return *(MTPDinputEncryptedFileUploaded*)data; } const MTPDinputEncryptedFileUploaded &c_inputEncryptedFileUploaded() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileUploaded) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileUploaded); return *(const MTPDinputEncryptedFileUploaded*)data; } MTPDinputEncryptedFile &_inputEncryptedFile() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFile) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFile); split(); return *(MTPDinputEncryptedFile*)data; } const MTPDinputEncryptedFile &c_inputEncryptedFile() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFile) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFile); return *(const MTPDinputEncryptedFile*)data; } MTPDinputEncryptedFileBigUploaded &_inputEncryptedFileBigUploaded() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileBigUploaded) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileBigUploaded); split(); return *(MTPDinputEncryptedFileBigUploaded*)data; } const MTPDinputEncryptedFileBigUploaded &c_inputEncryptedFileBigUploaded() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileBigUploaded) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileBigUploaded); return *(const MTPDinputEncryptedFileBigUploaded*)data; } 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(MTPDinputEncryptedFileUploaded *_data); explicit MTPinputEncryptedFile(MTPDinputEncryptedFile *_data); explicit MTPinputEncryptedFile(MTPDinputEncryptedFileBigUploaded *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputEncryptedFile; class MTPencryptedMessage : private mtpDataOwner { public: MTPencryptedMessage() : mtpDataOwner(0), _type(0) { } MTPencryptedMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDencryptedMessage &_encryptedMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedMessage) throw mtpErrorWrongTypeId(_type, mtpc_encryptedMessage); split(); return *(MTPDencryptedMessage*)data; } const MTPDencryptedMessage &c_encryptedMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedMessage) throw mtpErrorWrongTypeId(_type, mtpc_encryptedMessage); return *(const MTPDencryptedMessage*)data; } MTPDencryptedMessageService &_encryptedMessageService() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedMessageService) throw mtpErrorWrongTypeId(_type, mtpc_encryptedMessageService); split(); return *(MTPDencryptedMessageService*)data; } const MTPDencryptedMessageService &c_encryptedMessageService() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_encryptedMessageService) throw mtpErrorWrongTypeId(_type, mtpc_encryptedMessageService); return *(const MTPDencryptedMessageService*)data; } 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(MTPDencryptedMessage *_data); explicit MTPencryptedMessage(MTPDencryptedMessageService *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPEncryptedMessage; class MTPmessages_dhConfig : private mtpDataOwner { public: MTPmessages_dhConfig() : mtpDataOwner(0), _type(0) { } MTPmessages_dhConfig(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_dhConfigNotModified &_messages_dhConfigNotModified() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dhConfigNotModified) throw mtpErrorWrongTypeId(_type, mtpc_messages_dhConfigNotModified); split(); return *(MTPDmessages_dhConfigNotModified*)data; } const MTPDmessages_dhConfigNotModified &c_messages_dhConfigNotModified() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dhConfigNotModified) throw mtpErrorWrongTypeId(_type, mtpc_messages_dhConfigNotModified); return *(const MTPDmessages_dhConfigNotModified*)data; } MTPDmessages_dhConfig &_messages_dhConfig() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dhConfig) throw mtpErrorWrongTypeId(_type, mtpc_messages_dhConfig); split(); return *(MTPDmessages_dhConfig*)data; } const MTPDmessages_dhConfig &c_messages_dhConfig() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_dhConfig) throw mtpErrorWrongTypeId(_type, mtpc_messages_dhConfig); return *(const MTPDmessages_dhConfig*)data; } 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(MTPDmessages_dhConfigNotModified *_data); explicit MTPmessages_dhConfig(MTPDmessages_dhConfig *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_DhConfig; class MTPmessages_sentEncryptedMessage : private mtpDataOwner { public: MTPmessages_sentEncryptedMessage() : mtpDataOwner(0), _type(0) { } MTPmessages_sentEncryptedMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_sentEncryptedMessage &_messages_sentEncryptedMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_sentEncryptedMessage) throw mtpErrorWrongTypeId(_type, mtpc_messages_sentEncryptedMessage); split(); return *(MTPDmessages_sentEncryptedMessage*)data; } const MTPDmessages_sentEncryptedMessage &c_messages_sentEncryptedMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_sentEncryptedMessage) throw mtpErrorWrongTypeId(_type, mtpc_messages_sentEncryptedMessage); return *(const MTPDmessages_sentEncryptedMessage*)data; } MTPDmessages_sentEncryptedFile &_messages_sentEncryptedFile() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_sentEncryptedFile) throw mtpErrorWrongTypeId(_type, mtpc_messages_sentEncryptedFile); split(); return *(MTPDmessages_sentEncryptedFile*)data; } const MTPDmessages_sentEncryptedFile &c_messages_sentEncryptedFile() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_sentEncryptedFile) throw mtpErrorWrongTypeId(_type, mtpc_messages_sentEncryptedFile); return *(const MTPDmessages_sentEncryptedFile*)data; } 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(MTPDmessages_sentEncryptedMessage *_data); explicit MTPmessages_sentEncryptedMessage(MTPDmessages_sentEncryptedFile *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_SentEncryptedMessage; class MTPinputDocument : private mtpDataOwner { public: MTPinputDocument() : mtpDataOwner(0), _type(0) { } MTPinputDocument(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputDocument &_inputDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputDocument); split(); return *(MTPDinputDocument*)data; } const MTPDinputDocument &c_inputDocument() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputDocument); return *(const MTPDinputDocument*)data; } 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(MTPDinputDocument *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputDocument; class MTPdocument : private mtpDataOwner { public: MTPdocument() : mtpDataOwner(0), _type(0) { } MTPdocument(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDdocumentEmpty &_documentEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentEmpty) throw mtpErrorWrongTypeId(_type, mtpc_documentEmpty); split(); return *(MTPDdocumentEmpty*)data; } const MTPDdocumentEmpty &c_documentEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentEmpty) throw mtpErrorWrongTypeId(_type, mtpc_documentEmpty); return *(const MTPDdocumentEmpty*)data; } MTPDdocument &_document() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_document) throw mtpErrorWrongTypeId(_type, mtpc_document); split(); return *(MTPDdocument*)data; } const MTPDdocument &c_document() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_document) throw mtpErrorWrongTypeId(_type, mtpc_document); return *(const MTPDdocument*)data; } 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(MTPDdocumentEmpty *_data); explicit MTPdocument(MTPDdocument *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPDocument; class MTPhelp_support : private mtpDataOwner { public: MTPhelp_support(); MTPhelp_support(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_support) : mtpDataOwner(0) { read(from, end, cons); } MTPDhelp_support &_help_support() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDhelp_support*)data; } const MTPDhelp_support &c_help_support() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDhelp_support*)data; } 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(MTPDhelp_support *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPhelp_Support; class MTPnotifyPeer : private mtpDataOwner { public: MTPnotifyPeer() : mtpDataOwner(0), _type(0) { } MTPnotifyPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDnotifyPeer &_notifyPeer() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_notifyPeer) throw mtpErrorWrongTypeId(_type, mtpc_notifyPeer); split(); return *(MTPDnotifyPeer*)data; } const MTPDnotifyPeer &c_notifyPeer() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_notifyPeer) throw mtpErrorWrongTypeId(_type, mtpc_notifyPeer); return *(const MTPDnotifyPeer*)data; } 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(MTPDnotifyPeer *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPNotifyPeer; class MTPsendMessageAction : private mtpDataOwner { public: MTPsendMessageAction() : mtpDataOwner(0), _type(0) { } MTPsendMessageAction(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDsendMessageUploadVideoAction &_sendMessageUploadVideoAction() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadVideoAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadVideoAction); split(); return *(MTPDsendMessageUploadVideoAction*)data; } const MTPDsendMessageUploadVideoAction &c_sendMessageUploadVideoAction() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadVideoAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadVideoAction); return *(const MTPDsendMessageUploadVideoAction*)data; } MTPDsendMessageUploadAudioAction &_sendMessageUploadAudioAction() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadAudioAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadAudioAction); split(); return *(MTPDsendMessageUploadAudioAction*)data; } const MTPDsendMessageUploadAudioAction &c_sendMessageUploadAudioAction() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadAudioAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadAudioAction); return *(const MTPDsendMessageUploadAudioAction*)data; } MTPDsendMessageUploadPhotoAction &_sendMessageUploadPhotoAction() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadPhotoAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadPhotoAction); split(); return *(MTPDsendMessageUploadPhotoAction*)data; } const MTPDsendMessageUploadPhotoAction &c_sendMessageUploadPhotoAction() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadPhotoAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadPhotoAction); return *(const MTPDsendMessageUploadPhotoAction*)data; } MTPDsendMessageUploadDocumentAction &_sendMessageUploadDocumentAction() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadDocumentAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadDocumentAction); split(); return *(MTPDsendMessageUploadDocumentAction*)data; } const MTPDsendMessageUploadDocumentAction &c_sendMessageUploadDocumentAction() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_sendMessageUploadDocumentAction) throw mtpErrorWrongTypeId(_type, mtpc_sendMessageUploadDocumentAction); return *(const MTPDsendMessageUploadDocumentAction*)data; } 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(MTPDsendMessageUploadVideoAction *_data); explicit MTPsendMessageAction(MTPDsendMessageUploadAudioAction *_data); explicit MTPsendMessageAction(MTPDsendMessageUploadPhotoAction *_data); explicit MTPsendMessageAction(MTPDsendMessageUploadDocumentAction *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPSendMessageAction; class MTPcontacts_found : private mtpDataOwner { public: MTPcontacts_found(); MTPcontacts_found(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_found) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontacts_found &_contacts_found() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontacts_found*)data; } const MTPDcontacts_found &c_contacts_found() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontacts_found*)data; } 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(MTPDcontacts_found *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_Found; class MTPinputPrivacyKey { public: MTPinputPrivacyKey() : _type(0) { } MTPinputPrivacyKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPInputPrivacyKey; class MTPprivacyKey { public: MTPprivacyKey() : _type(0) { } MTPprivacyKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPPrivacyKey; class MTPinputPrivacyRule : private mtpDataOwner { public: MTPinputPrivacyRule() : mtpDataOwner(0), _type(0) { } MTPinputPrivacyRule(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputPrivacyValueAllowUsers &_inputPrivacyValueAllowUsers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPrivacyValueAllowUsers) throw mtpErrorWrongTypeId(_type, mtpc_inputPrivacyValueAllowUsers); split(); return *(MTPDinputPrivacyValueAllowUsers*)data; } const MTPDinputPrivacyValueAllowUsers &c_inputPrivacyValueAllowUsers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPrivacyValueAllowUsers) throw mtpErrorWrongTypeId(_type, mtpc_inputPrivacyValueAllowUsers); return *(const MTPDinputPrivacyValueAllowUsers*)data; } MTPDinputPrivacyValueDisallowUsers &_inputPrivacyValueDisallowUsers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPrivacyValueDisallowUsers) throw mtpErrorWrongTypeId(_type, mtpc_inputPrivacyValueDisallowUsers); split(); return *(MTPDinputPrivacyValueDisallowUsers*)data; } const MTPDinputPrivacyValueDisallowUsers &c_inputPrivacyValueDisallowUsers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputPrivacyValueDisallowUsers) throw mtpErrorWrongTypeId(_type, mtpc_inputPrivacyValueDisallowUsers); return *(const MTPDinputPrivacyValueDisallowUsers*)data; } 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(MTPDinputPrivacyValueAllowUsers *_data); explicit MTPinputPrivacyRule(MTPDinputPrivacyValueDisallowUsers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputPrivacyRule; class MTPprivacyRule : private mtpDataOwner { public: MTPprivacyRule() : mtpDataOwner(0), _type(0) { } MTPprivacyRule(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDprivacyValueAllowUsers &_privacyValueAllowUsers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_privacyValueAllowUsers) throw mtpErrorWrongTypeId(_type, mtpc_privacyValueAllowUsers); split(); return *(MTPDprivacyValueAllowUsers*)data; } const MTPDprivacyValueAllowUsers &c_privacyValueAllowUsers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_privacyValueAllowUsers) throw mtpErrorWrongTypeId(_type, mtpc_privacyValueAllowUsers); return *(const MTPDprivacyValueAllowUsers*)data; } MTPDprivacyValueDisallowUsers &_privacyValueDisallowUsers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_privacyValueDisallowUsers) throw mtpErrorWrongTypeId(_type, mtpc_privacyValueDisallowUsers); split(); return *(MTPDprivacyValueDisallowUsers*)data; } const MTPDprivacyValueDisallowUsers &c_privacyValueDisallowUsers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_privacyValueDisallowUsers) throw mtpErrorWrongTypeId(_type, mtpc_privacyValueDisallowUsers); return *(const MTPDprivacyValueDisallowUsers*)data; } 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(MTPDprivacyValueAllowUsers *_data); explicit MTPprivacyRule(MTPDprivacyValueDisallowUsers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPPrivacyRule; class MTPaccount_privacyRules : private mtpDataOwner { public: MTPaccount_privacyRules(); MTPaccount_privacyRules(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_privacyRules) : mtpDataOwner(0) { read(from, end, cons); } MTPDaccount_privacyRules &_account_privacyRules() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDaccount_privacyRules*)data; } const MTPDaccount_privacyRules &c_account_privacyRules() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDaccount_privacyRules*)data; } 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(MTPDaccount_privacyRules *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_PrivacyRules; class MTPaccountDaysTTL : private mtpDataOwner { public: MTPaccountDaysTTL(); MTPaccountDaysTTL(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_accountDaysTTL) : mtpDataOwner(0) { read(from, end, cons); } MTPDaccountDaysTTL &_accountDaysTTL() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDaccountDaysTTL*)data; } const MTPDaccountDaysTTL &c_accountDaysTTL() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDaccountDaysTTL*)data; } 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(MTPDaccountDaysTTL *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPAccountDaysTTL; class MTPdocumentAttribute : private mtpDataOwner { public: MTPdocumentAttribute() : mtpDataOwner(0), _type(0) { } MTPdocumentAttribute(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDdocumentAttributeImageSize &_documentAttributeImageSize() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeImageSize) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeImageSize); split(); return *(MTPDdocumentAttributeImageSize*)data; } const MTPDdocumentAttributeImageSize &c_documentAttributeImageSize() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeImageSize) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeImageSize); return *(const MTPDdocumentAttributeImageSize*)data; } MTPDdocumentAttributeSticker &_documentAttributeSticker() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeSticker) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeSticker); split(); return *(MTPDdocumentAttributeSticker*)data; } const MTPDdocumentAttributeSticker &c_documentAttributeSticker() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeSticker) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeSticker); return *(const MTPDdocumentAttributeSticker*)data; } MTPDdocumentAttributeVideo &_documentAttributeVideo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeVideo) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeVideo); split(); return *(MTPDdocumentAttributeVideo*)data; } const MTPDdocumentAttributeVideo &c_documentAttributeVideo() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeVideo) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeVideo); return *(const MTPDdocumentAttributeVideo*)data; } MTPDdocumentAttributeAudio &_documentAttributeAudio() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeAudio) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeAudio); split(); return *(MTPDdocumentAttributeAudio*)data; } const MTPDdocumentAttributeAudio &c_documentAttributeAudio() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeAudio) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeAudio); return *(const MTPDdocumentAttributeAudio*)data; } MTPDdocumentAttributeFilename &_documentAttributeFilename() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeFilename) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeFilename); split(); return *(MTPDdocumentAttributeFilename*)data; } const MTPDdocumentAttributeFilename &c_documentAttributeFilename() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_documentAttributeFilename) throw mtpErrorWrongTypeId(_type, mtpc_documentAttributeFilename); return *(const MTPDdocumentAttributeFilename*)data; } 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(MTPDdocumentAttributeImageSize *_data); explicit MTPdocumentAttribute(MTPDdocumentAttributeSticker *_data); explicit MTPdocumentAttribute(MTPDdocumentAttributeVideo *_data); explicit MTPdocumentAttribute(MTPDdocumentAttributeAudio *_data); explicit MTPdocumentAttribute(MTPDdocumentAttributeFilename *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPDocumentAttribute; class MTPmessages_stickers : private mtpDataOwner { public: MTPmessages_stickers() : mtpDataOwner(0), _type(0) { } MTPmessages_stickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_stickers &_messages_stickers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_stickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_stickers); split(); return *(MTPDmessages_stickers*)data; } const MTPDmessages_stickers &c_messages_stickers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_stickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_stickers); return *(const MTPDmessages_stickers*)data; } 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(MTPDmessages_stickers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_Stickers; class MTPstickerPack : private mtpDataOwner { public: MTPstickerPack(); MTPstickerPack(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_stickerPack) : mtpDataOwner(0) { read(from, end, cons); } MTPDstickerPack &_stickerPack() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDstickerPack*)data; } const MTPDstickerPack &c_stickerPack() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDstickerPack*)data; } 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(MTPDstickerPack *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPStickerPack; class MTPmessages_allStickers : private mtpDataOwner { public: MTPmessages_allStickers() : mtpDataOwner(0), _type(0) { } MTPmessages_allStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_allStickers &_messages_allStickers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_allStickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_allStickers); split(); return *(MTPDmessages_allStickers*)data; } const MTPDmessages_allStickers &c_messages_allStickers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_allStickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_allStickers); return *(const MTPDmessages_allStickers*)data; } 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(MTPDmessages_allStickers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_AllStickers; class MTPdisabledFeature : private mtpDataOwner { public: MTPdisabledFeature(); MTPdisabledFeature(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_disabledFeature) : mtpDataOwner(0) { read(from, end, cons); } MTPDdisabledFeature &_disabledFeature() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDdisabledFeature*)data; } const MTPDdisabledFeature &c_disabledFeature() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDdisabledFeature*)data; } 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(MTPDdisabledFeature *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPDisabledFeature; class MTPmessages_affectedMessages : private mtpDataOwner { public: MTPmessages_affectedMessages(); MTPmessages_affectedMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_affectedMessages) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_affectedMessages &_messages_affectedMessages() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_affectedMessages*)data; } const MTPDmessages_affectedMessages &c_messages_affectedMessages() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_affectedMessages*)data; } 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(MTPDmessages_affectedMessages *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_AffectedMessages; class MTPcontactLink { public: MTPcontactLink() : _type(0) { } MTPcontactLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPContactLink; class MTPwebPage : private mtpDataOwner { public: MTPwebPage() : mtpDataOwner(0), _type(0) { } MTPwebPage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDwebPageEmpty &_webPageEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_webPageEmpty) throw mtpErrorWrongTypeId(_type, mtpc_webPageEmpty); split(); return *(MTPDwebPageEmpty*)data; } const MTPDwebPageEmpty &c_webPageEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_webPageEmpty) throw mtpErrorWrongTypeId(_type, mtpc_webPageEmpty); return *(const MTPDwebPageEmpty*)data; } MTPDwebPagePending &_webPagePending() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_webPagePending) throw mtpErrorWrongTypeId(_type, mtpc_webPagePending); split(); return *(MTPDwebPagePending*)data; } const MTPDwebPagePending &c_webPagePending() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_webPagePending) throw mtpErrorWrongTypeId(_type, mtpc_webPagePending); return *(const MTPDwebPagePending*)data; } MTPDwebPage &_webPage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_webPage) throw mtpErrorWrongTypeId(_type, mtpc_webPage); split(); return *(MTPDwebPage*)data; } const MTPDwebPage &c_webPage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_webPage) throw mtpErrorWrongTypeId(_type, mtpc_webPage); return *(const MTPDwebPage*)data; } 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(MTPDwebPageEmpty *_data); explicit MTPwebPage(MTPDwebPagePending *_data); explicit MTPwebPage(MTPDwebPage *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPWebPage; class MTPauthorization : private mtpDataOwner { public: MTPauthorization(); MTPauthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_authorization) : mtpDataOwner(0) { read(from, end, cons); } MTPDauthorization &_authorization() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDauthorization*)data; } const MTPDauthorization &c_authorization() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDauthorization*)data; } 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(MTPDauthorization *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPAuthorization; class MTPaccount_authorizations : private mtpDataOwner { public: MTPaccount_authorizations(); MTPaccount_authorizations(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_authorizations) : mtpDataOwner(0) { read(from, end, cons); } MTPDaccount_authorizations &_account_authorizations() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDaccount_authorizations*)data; } const MTPDaccount_authorizations &c_account_authorizations() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDaccount_authorizations*)data; } 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(MTPDaccount_authorizations *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_Authorizations; class MTPaccount_password : private mtpDataOwner { public: MTPaccount_password() : mtpDataOwner(0), _type(0) { } MTPaccount_password(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDaccount_noPassword &_account_noPassword() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_account_noPassword) throw mtpErrorWrongTypeId(_type, mtpc_account_noPassword); split(); return *(MTPDaccount_noPassword*)data; } const MTPDaccount_noPassword &c_account_noPassword() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_account_noPassword) throw mtpErrorWrongTypeId(_type, mtpc_account_noPassword); return *(const MTPDaccount_noPassword*)data; } MTPDaccount_password &_account_password() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_account_password) throw mtpErrorWrongTypeId(_type, mtpc_account_password); split(); return *(MTPDaccount_password*)data; } const MTPDaccount_password &c_account_password() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_account_password) throw mtpErrorWrongTypeId(_type, mtpc_account_password); return *(const MTPDaccount_password*)data; } 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(MTPDaccount_noPassword *_data); explicit MTPaccount_password(MTPDaccount_password *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPaccount_Password; class MTPaccount_passwordSettings : private mtpDataOwner { public: MTPaccount_passwordSettings(); MTPaccount_passwordSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_passwordSettings) : mtpDataOwner(0) { read(from, end, cons); } MTPDaccount_passwordSettings &_account_passwordSettings() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDaccount_passwordSettings*)data; } const MTPDaccount_passwordSettings &c_account_passwordSettings() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDaccount_passwordSettings*)data; } 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(MTPDaccount_passwordSettings *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_PasswordSettings; class MTPaccount_passwordInputSettings : private mtpDataOwner { public: MTPaccount_passwordInputSettings(); MTPaccount_passwordInputSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_passwordInputSettings) : mtpDataOwner(0) { read(from, end, cons); } MTPDaccount_passwordInputSettings &_account_passwordInputSettings() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDaccount_passwordInputSettings*)data; } const MTPDaccount_passwordInputSettings &c_account_passwordInputSettings() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDaccount_passwordInputSettings*)data; } 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(MTPDaccount_passwordInputSettings *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPaccount_PasswordInputSettings; class MTPauth_passwordRecovery : private mtpDataOwner { public: MTPauth_passwordRecovery(); MTPauth_passwordRecovery(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_passwordRecovery) : mtpDataOwner(0) { read(from, end, cons); } MTPDauth_passwordRecovery &_auth_passwordRecovery() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDauth_passwordRecovery*)data; } const MTPDauth_passwordRecovery &c_auth_passwordRecovery() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDauth_passwordRecovery*)data; } 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(MTPDauth_passwordRecovery *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPauth_PasswordRecovery; class MTPreceivedNotifyMessage : private mtpDataOwner { public: MTPreceivedNotifyMessage(); MTPreceivedNotifyMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_receivedNotifyMessage) : mtpDataOwner(0) { read(from, end, cons); } MTPDreceivedNotifyMessage &_receivedNotifyMessage() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDreceivedNotifyMessage*)data; } const MTPDreceivedNotifyMessage &c_receivedNotifyMessage() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDreceivedNotifyMessage*)data; } 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(MTPDreceivedNotifyMessage *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPReceivedNotifyMessage; class MTPexportedChatInvite : private mtpDataOwner { public: MTPexportedChatInvite() : mtpDataOwner(0), _type(0) { } MTPexportedChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatInviteExported &_chatInviteExported() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatInviteExported) throw mtpErrorWrongTypeId(_type, mtpc_chatInviteExported); split(); return *(MTPDchatInviteExported*)data; } const MTPDchatInviteExported &c_chatInviteExported() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatInviteExported) throw mtpErrorWrongTypeId(_type, mtpc_chatInviteExported); return *(const MTPDchatInviteExported*)data; } 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(MTPDchatInviteExported *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPExportedChatInvite; class MTPchatInvite : private mtpDataOwner { public: MTPchatInvite() : mtpDataOwner(0), _type(0) { } MTPchatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchatInviteAlready &_chatInviteAlready() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatInviteAlready) throw mtpErrorWrongTypeId(_type, mtpc_chatInviteAlready); split(); return *(MTPDchatInviteAlready*)data; } const MTPDchatInviteAlready &c_chatInviteAlready() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatInviteAlready) throw mtpErrorWrongTypeId(_type, mtpc_chatInviteAlready); return *(const MTPDchatInviteAlready*)data; } MTPDchatInvite &_chatInvite() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatInvite) throw mtpErrorWrongTypeId(_type, mtpc_chatInvite); split(); return *(MTPDchatInvite*)data; } const MTPDchatInvite &c_chatInvite() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_chatInvite) throw mtpErrorWrongTypeId(_type, mtpc_chatInvite); return *(const MTPDchatInvite*)data; } 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(MTPDchatInviteAlready *_data); explicit MTPchatInvite(MTPDchatInvite *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChatInvite; class MTPinputStickerSet : private mtpDataOwner { public: MTPinputStickerSet() : mtpDataOwner(0), _type(0) { } MTPinputStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputStickerSetID &_inputStickerSetID() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputStickerSetID) throw mtpErrorWrongTypeId(_type, mtpc_inputStickerSetID); split(); return *(MTPDinputStickerSetID*)data; } const MTPDinputStickerSetID &c_inputStickerSetID() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputStickerSetID) throw mtpErrorWrongTypeId(_type, mtpc_inputStickerSetID); return *(const MTPDinputStickerSetID*)data; } MTPDinputStickerSetShortName &_inputStickerSetShortName() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputStickerSetShortName) throw mtpErrorWrongTypeId(_type, mtpc_inputStickerSetShortName); split(); return *(MTPDinputStickerSetShortName*)data; } const MTPDinputStickerSetShortName &c_inputStickerSetShortName() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputStickerSetShortName) throw mtpErrorWrongTypeId(_type, mtpc_inputStickerSetShortName); return *(const MTPDinputStickerSetShortName*)data; } 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(MTPDinputStickerSetID *_data); explicit MTPinputStickerSet(MTPDinputStickerSetShortName *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputStickerSet; class MTPstickerSet : private mtpDataOwner { public: MTPstickerSet(); MTPstickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_stickerSet) : mtpDataOwner(0) { read(from, end, cons); } MTPDstickerSet &_stickerSet() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDstickerSet*)data; } const MTPDstickerSet &c_stickerSet() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDstickerSet*)data; } 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(MTPDstickerSet *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPStickerSet; class MTPmessages_stickerSet : private mtpDataOwner { public: MTPmessages_stickerSet(); MTPmessages_stickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_stickerSet) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_stickerSet &_messages_stickerSet() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_stickerSet*)data; } const MTPDmessages_stickerSet &c_messages_stickerSet() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_stickerSet*)data; } 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(MTPDmessages_stickerSet *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_StickerSet; class MTPbotCommand : private mtpDataOwner { public: MTPbotCommand(); MTPbotCommand(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_botCommand) : mtpDataOwner(0) { read(from, end, cons); } MTPDbotCommand &_botCommand() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDbotCommand*)data; } const MTPDbotCommand &c_botCommand() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDbotCommand*)data; } 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(MTPDbotCommand *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPBotCommand; class MTPbotInfo : private mtpDataOwner { public: MTPbotInfo(); MTPbotInfo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_botInfo) : mtpDataOwner(0) { read(from, end, cons); } MTPDbotInfo &_botInfo() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDbotInfo*)data; } const MTPDbotInfo &c_botInfo() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDbotInfo*)data; } 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(MTPDbotInfo *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPBotInfo; class MTPkeyboardButton : private mtpDataOwner { public: MTPkeyboardButton() : mtpDataOwner(0), _type(0) { } MTPkeyboardButton(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDkeyboardButton &_keyboardButton() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButton) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButton); split(); return *(MTPDkeyboardButton*)data; } const MTPDkeyboardButton &c_keyboardButton() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButton) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButton); return *(const MTPDkeyboardButton*)data; } MTPDkeyboardButtonUrl &_keyboardButtonUrl() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonUrl) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonUrl); split(); return *(MTPDkeyboardButtonUrl*)data; } const MTPDkeyboardButtonUrl &c_keyboardButtonUrl() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonUrl) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonUrl); return *(const MTPDkeyboardButtonUrl*)data; } MTPDkeyboardButtonCallback &_keyboardButtonCallback() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonCallback) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonCallback); split(); return *(MTPDkeyboardButtonCallback*)data; } const MTPDkeyboardButtonCallback &c_keyboardButtonCallback() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonCallback) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonCallback); return *(const MTPDkeyboardButtonCallback*)data; } MTPDkeyboardButtonRequestPhone &_keyboardButtonRequestPhone() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonRequestPhone) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonRequestPhone); split(); return *(MTPDkeyboardButtonRequestPhone*)data; } const MTPDkeyboardButtonRequestPhone &c_keyboardButtonRequestPhone() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonRequestPhone) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonRequestPhone); return *(const MTPDkeyboardButtonRequestPhone*)data; } MTPDkeyboardButtonRequestGeoLocation &_keyboardButtonRequestGeoLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonRequestGeoLocation) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonRequestGeoLocation); split(); return *(MTPDkeyboardButtonRequestGeoLocation*)data; } const MTPDkeyboardButtonRequestGeoLocation &c_keyboardButtonRequestGeoLocation() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonRequestGeoLocation) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonRequestGeoLocation); return *(const MTPDkeyboardButtonRequestGeoLocation*)data; } MTPDkeyboardButtonSwitchInline &_keyboardButtonSwitchInline() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonSwitchInline) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonSwitchInline); split(); return *(MTPDkeyboardButtonSwitchInline*)data; } const MTPDkeyboardButtonSwitchInline &c_keyboardButtonSwitchInline() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_keyboardButtonSwitchInline) throw mtpErrorWrongTypeId(_type, mtpc_keyboardButtonSwitchInline); return *(const MTPDkeyboardButtonSwitchInline*)data; } 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(MTPDkeyboardButton *_data); explicit MTPkeyboardButton(MTPDkeyboardButtonUrl *_data); explicit MTPkeyboardButton(MTPDkeyboardButtonCallback *_data); explicit MTPkeyboardButton(MTPDkeyboardButtonRequestPhone *_data); explicit MTPkeyboardButton(MTPDkeyboardButtonRequestGeoLocation *_data); explicit MTPkeyboardButton(MTPDkeyboardButtonSwitchInline *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPKeyboardButton; class MTPkeyboardButtonRow : private mtpDataOwner { public: MTPkeyboardButtonRow(); MTPkeyboardButtonRow(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_keyboardButtonRow) : mtpDataOwner(0) { read(from, end, cons); } MTPDkeyboardButtonRow &_keyboardButtonRow() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDkeyboardButtonRow*)data; } const MTPDkeyboardButtonRow &c_keyboardButtonRow() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDkeyboardButtonRow*)data; } 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(MTPDkeyboardButtonRow *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPKeyboardButtonRow; class MTPreplyMarkup : private mtpDataOwner { public: MTPreplyMarkup() : mtpDataOwner(0), _type(0) { } MTPreplyMarkup(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDreplyKeyboardHide &_replyKeyboardHide() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyKeyboardHide) throw mtpErrorWrongTypeId(_type, mtpc_replyKeyboardHide); split(); return *(MTPDreplyKeyboardHide*)data; } const MTPDreplyKeyboardHide &c_replyKeyboardHide() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyKeyboardHide) throw mtpErrorWrongTypeId(_type, mtpc_replyKeyboardHide); return *(const MTPDreplyKeyboardHide*)data; } MTPDreplyKeyboardForceReply &_replyKeyboardForceReply() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyKeyboardForceReply) throw mtpErrorWrongTypeId(_type, mtpc_replyKeyboardForceReply); split(); return *(MTPDreplyKeyboardForceReply*)data; } const MTPDreplyKeyboardForceReply &c_replyKeyboardForceReply() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyKeyboardForceReply) throw mtpErrorWrongTypeId(_type, mtpc_replyKeyboardForceReply); return *(const MTPDreplyKeyboardForceReply*)data; } MTPDreplyKeyboardMarkup &_replyKeyboardMarkup() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyKeyboardMarkup) throw mtpErrorWrongTypeId(_type, mtpc_replyKeyboardMarkup); split(); return *(MTPDreplyKeyboardMarkup*)data; } const MTPDreplyKeyboardMarkup &c_replyKeyboardMarkup() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyKeyboardMarkup) throw mtpErrorWrongTypeId(_type, mtpc_replyKeyboardMarkup); return *(const MTPDreplyKeyboardMarkup*)data; } MTPDreplyInlineMarkup &_replyInlineMarkup() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyInlineMarkup) throw mtpErrorWrongTypeId(_type, mtpc_replyInlineMarkup); split(); return *(MTPDreplyInlineMarkup*)data; } const MTPDreplyInlineMarkup &c_replyInlineMarkup() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_replyInlineMarkup) throw mtpErrorWrongTypeId(_type, mtpc_replyInlineMarkup); return *(const MTPDreplyInlineMarkup*)data; } 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(MTPDreplyKeyboardHide *_data); explicit MTPreplyMarkup(MTPDreplyKeyboardForceReply *_data); explicit MTPreplyMarkup(MTPDreplyKeyboardMarkup *_data); explicit MTPreplyMarkup(MTPDreplyInlineMarkup *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPReplyMarkup; class MTPhelp_appChangelog : private mtpDataOwner { public: MTPhelp_appChangelog() : mtpDataOwner(0), _type(0) { } MTPhelp_appChangelog(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDhelp_appChangelog &_help_appChangelog() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_help_appChangelog) throw mtpErrorWrongTypeId(_type, mtpc_help_appChangelog); split(); return *(MTPDhelp_appChangelog*)data; } const MTPDhelp_appChangelog &c_help_appChangelog() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_help_appChangelog) throw mtpErrorWrongTypeId(_type, mtpc_help_appChangelog); return *(const MTPDhelp_appChangelog*)data; } 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(MTPDhelp_appChangelog *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPhelp_AppChangelog; class MTPmessageEntity : private mtpDataOwner { public: MTPmessageEntity() : mtpDataOwner(0), _type(0) { } MTPmessageEntity(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessageEntityUnknown &_messageEntityUnknown() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityUnknown) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityUnknown); split(); return *(MTPDmessageEntityUnknown*)data; } const MTPDmessageEntityUnknown &c_messageEntityUnknown() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityUnknown) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityUnknown); return *(const MTPDmessageEntityUnknown*)data; } MTPDmessageEntityMention &_messageEntityMention() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityMention) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityMention); split(); return *(MTPDmessageEntityMention*)data; } const MTPDmessageEntityMention &c_messageEntityMention() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityMention) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityMention); return *(const MTPDmessageEntityMention*)data; } MTPDmessageEntityHashtag &_messageEntityHashtag() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityHashtag) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityHashtag); split(); return *(MTPDmessageEntityHashtag*)data; } const MTPDmessageEntityHashtag &c_messageEntityHashtag() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityHashtag) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityHashtag); return *(const MTPDmessageEntityHashtag*)data; } MTPDmessageEntityBotCommand &_messageEntityBotCommand() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityBotCommand) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityBotCommand); split(); return *(MTPDmessageEntityBotCommand*)data; } const MTPDmessageEntityBotCommand &c_messageEntityBotCommand() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityBotCommand) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityBotCommand); return *(const MTPDmessageEntityBotCommand*)data; } MTPDmessageEntityUrl &_messageEntityUrl() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityUrl) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityUrl); split(); return *(MTPDmessageEntityUrl*)data; } const MTPDmessageEntityUrl &c_messageEntityUrl() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityUrl) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityUrl); return *(const MTPDmessageEntityUrl*)data; } MTPDmessageEntityEmail &_messageEntityEmail() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityEmail) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityEmail); split(); return *(MTPDmessageEntityEmail*)data; } const MTPDmessageEntityEmail &c_messageEntityEmail() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityEmail) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityEmail); return *(const MTPDmessageEntityEmail*)data; } MTPDmessageEntityBold &_messageEntityBold() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityBold) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityBold); split(); return *(MTPDmessageEntityBold*)data; } const MTPDmessageEntityBold &c_messageEntityBold() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityBold) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityBold); return *(const MTPDmessageEntityBold*)data; } MTPDmessageEntityItalic &_messageEntityItalic() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityItalic) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityItalic); split(); return *(MTPDmessageEntityItalic*)data; } const MTPDmessageEntityItalic &c_messageEntityItalic() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityItalic) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityItalic); return *(const MTPDmessageEntityItalic*)data; } MTPDmessageEntityCode &_messageEntityCode() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityCode) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityCode); split(); return *(MTPDmessageEntityCode*)data; } const MTPDmessageEntityCode &c_messageEntityCode() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityCode) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityCode); return *(const MTPDmessageEntityCode*)data; } MTPDmessageEntityPre &_messageEntityPre() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityPre) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityPre); split(); return *(MTPDmessageEntityPre*)data; } const MTPDmessageEntityPre &c_messageEntityPre() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityPre) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityPre); return *(const MTPDmessageEntityPre*)data; } MTPDmessageEntityTextUrl &_messageEntityTextUrl() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityTextUrl) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityTextUrl); split(); return *(MTPDmessageEntityTextUrl*)data; } const MTPDmessageEntityTextUrl &c_messageEntityTextUrl() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityTextUrl) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityTextUrl); return *(const MTPDmessageEntityTextUrl*)data; } MTPDmessageEntityMentionName &_messageEntityMentionName() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityMentionName) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityMentionName); split(); return *(MTPDmessageEntityMentionName*)data; } const MTPDmessageEntityMentionName &c_messageEntityMentionName() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageEntityMentionName) throw mtpErrorWrongTypeId(_type, mtpc_messageEntityMentionName); return *(const MTPDmessageEntityMentionName*)data; } MTPDinputMessageEntityMentionName &_inputMessageEntityMentionName() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMessageEntityMentionName) throw mtpErrorWrongTypeId(_type, mtpc_inputMessageEntityMentionName); split(); return *(MTPDinputMessageEntityMentionName*)data; } const MTPDinputMessageEntityMentionName &c_inputMessageEntityMentionName() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMessageEntityMentionName) throw mtpErrorWrongTypeId(_type, mtpc_inputMessageEntityMentionName); return *(const MTPDinputMessageEntityMentionName*)data; } 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(MTPDmessageEntityUnknown *_data); explicit MTPmessageEntity(MTPDmessageEntityMention *_data); explicit MTPmessageEntity(MTPDmessageEntityHashtag *_data); explicit MTPmessageEntity(MTPDmessageEntityBotCommand *_data); explicit MTPmessageEntity(MTPDmessageEntityUrl *_data); explicit MTPmessageEntity(MTPDmessageEntityEmail *_data); explicit MTPmessageEntity(MTPDmessageEntityBold *_data); explicit MTPmessageEntity(MTPDmessageEntityItalic *_data); explicit MTPmessageEntity(MTPDmessageEntityCode *_data); explicit MTPmessageEntity(MTPDmessageEntityPre *_data); explicit MTPmessageEntity(MTPDmessageEntityTextUrl *_data); explicit MTPmessageEntity(MTPDmessageEntityMentionName *_data); explicit MTPmessageEntity(MTPDinputMessageEntityMentionName *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPMessageEntity; class MTPinputChannel : private mtpDataOwner { public: MTPinputChannel() : mtpDataOwner(0), _type(0) { } MTPinputChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputChannel &_inputChannel() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputChannel) throw mtpErrorWrongTypeId(_type, mtpc_inputChannel); split(); return *(MTPDinputChannel*)data; } const MTPDinputChannel &c_inputChannel() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputChannel) throw mtpErrorWrongTypeId(_type, mtpc_inputChannel); return *(const MTPDinputChannel*)data; } 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(MTPDinputChannel *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputChannel; class MTPcontacts_resolvedPeer : private mtpDataOwner { public: MTPcontacts_resolvedPeer(); MTPcontacts_resolvedPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_resolvedPeer) : mtpDataOwner(0) { read(from, end, cons); } MTPDcontacts_resolvedPeer &_contacts_resolvedPeer() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDcontacts_resolvedPeer*)data; } const MTPDcontacts_resolvedPeer &c_contacts_resolvedPeer() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDcontacts_resolvedPeer*)data; } 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(MTPDcontacts_resolvedPeer *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPcontacts_ResolvedPeer; class MTPmessageRange : private mtpDataOwner { public: MTPmessageRange(); MTPmessageRange(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messageRange) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessageRange &_messageRange() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessageRange*)data; } const MTPDmessageRange &c_messageRange() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessageRange*)data; } 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(MTPDmessageRange *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMessageRange; class MTPupdates_channelDifference : private mtpDataOwner { public: MTPupdates_channelDifference() : mtpDataOwner(0), _type(0) { } MTPupdates_channelDifference(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDupdates_channelDifferenceEmpty &_updates_channelDifferenceEmpty() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_channelDifferenceEmpty) throw mtpErrorWrongTypeId(_type, mtpc_updates_channelDifferenceEmpty); split(); return *(MTPDupdates_channelDifferenceEmpty*)data; } const MTPDupdates_channelDifferenceEmpty &c_updates_channelDifferenceEmpty() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_channelDifferenceEmpty) throw mtpErrorWrongTypeId(_type, mtpc_updates_channelDifferenceEmpty); return *(const MTPDupdates_channelDifferenceEmpty*)data; } MTPDupdates_channelDifferenceTooLong &_updates_channelDifferenceTooLong() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_channelDifferenceTooLong) throw mtpErrorWrongTypeId(_type, mtpc_updates_channelDifferenceTooLong); split(); return *(MTPDupdates_channelDifferenceTooLong*)data; } const MTPDupdates_channelDifferenceTooLong &c_updates_channelDifferenceTooLong() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_channelDifferenceTooLong) throw mtpErrorWrongTypeId(_type, mtpc_updates_channelDifferenceTooLong); return *(const MTPDupdates_channelDifferenceTooLong*)data; } MTPDupdates_channelDifference &_updates_channelDifference() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_channelDifference) throw mtpErrorWrongTypeId(_type, mtpc_updates_channelDifference); split(); return *(MTPDupdates_channelDifference*)data; } const MTPDupdates_channelDifference &c_updates_channelDifference() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_updates_channelDifference) throw mtpErrorWrongTypeId(_type, mtpc_updates_channelDifference); return *(const MTPDupdates_channelDifference*)data; } 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(MTPDupdates_channelDifferenceEmpty *_data); explicit MTPupdates_channelDifference(MTPDupdates_channelDifferenceTooLong *_data); explicit MTPupdates_channelDifference(MTPDupdates_channelDifference *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPupdates_ChannelDifference; class MTPchannelMessagesFilter : private mtpDataOwner { public: MTPchannelMessagesFilter() : mtpDataOwner(0), _type(0) { } MTPchannelMessagesFilter(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchannelMessagesFilter &_channelMessagesFilter() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelMessagesFilter) throw mtpErrorWrongTypeId(_type, mtpc_channelMessagesFilter); split(); return *(MTPDchannelMessagesFilter*)data; } const MTPDchannelMessagesFilter &c_channelMessagesFilter() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelMessagesFilter) throw mtpErrorWrongTypeId(_type, mtpc_channelMessagesFilter); return *(const MTPDchannelMessagesFilter*)data; } 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(MTPDchannelMessagesFilter *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChannelMessagesFilter; class MTPchannelParticipant : private mtpDataOwner { public: MTPchannelParticipant() : mtpDataOwner(0), _type(0) { } MTPchannelParticipant(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDchannelParticipant &_channelParticipant() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipant) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipant); split(); return *(MTPDchannelParticipant*)data; } const MTPDchannelParticipant &c_channelParticipant() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipant) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipant); return *(const MTPDchannelParticipant*)data; } MTPDchannelParticipantSelf &_channelParticipantSelf() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantSelf) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantSelf); split(); return *(MTPDchannelParticipantSelf*)data; } const MTPDchannelParticipantSelf &c_channelParticipantSelf() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantSelf) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantSelf); return *(const MTPDchannelParticipantSelf*)data; } MTPDchannelParticipantModerator &_channelParticipantModerator() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantModerator) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantModerator); split(); return *(MTPDchannelParticipantModerator*)data; } const MTPDchannelParticipantModerator &c_channelParticipantModerator() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantModerator) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantModerator); return *(const MTPDchannelParticipantModerator*)data; } MTPDchannelParticipantEditor &_channelParticipantEditor() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantEditor) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantEditor); split(); return *(MTPDchannelParticipantEditor*)data; } const MTPDchannelParticipantEditor &c_channelParticipantEditor() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantEditor) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantEditor); return *(const MTPDchannelParticipantEditor*)data; } MTPDchannelParticipantKicked &_channelParticipantKicked() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantKicked) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantKicked); split(); return *(MTPDchannelParticipantKicked*)data; } const MTPDchannelParticipantKicked &c_channelParticipantKicked() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantKicked) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantKicked); return *(const MTPDchannelParticipantKicked*)data; } MTPDchannelParticipantCreator &_channelParticipantCreator() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantCreator) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantCreator); split(); return *(MTPDchannelParticipantCreator*)data; } const MTPDchannelParticipantCreator &c_channelParticipantCreator() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_channelParticipantCreator) throw mtpErrorWrongTypeId(_type, mtpc_channelParticipantCreator); return *(const MTPDchannelParticipantCreator*)data; } 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(MTPDchannelParticipant *_data); explicit MTPchannelParticipant(MTPDchannelParticipantSelf *_data); explicit MTPchannelParticipant(MTPDchannelParticipantModerator *_data); explicit MTPchannelParticipant(MTPDchannelParticipantEditor *_data); explicit MTPchannelParticipant(MTPDchannelParticipantKicked *_data); explicit MTPchannelParticipant(MTPDchannelParticipantCreator *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPChannelParticipant; class MTPchannelParticipantsFilter { public: MTPchannelParticipantsFilter() : _type(0) { } MTPchannelParticipantsFilter(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPChannelParticipantsFilter; class MTPchannelParticipantRole { public: MTPchannelParticipantRole() : _type(0) { } MTPchannelParticipantRole(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPChannelParticipantRole; class MTPchannels_channelParticipants : private mtpDataOwner { public: MTPchannels_channelParticipants(); MTPchannels_channelParticipants(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_channelParticipants) : mtpDataOwner(0) { read(from, end, cons); } MTPDchannels_channelParticipants &_channels_channelParticipants() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDchannels_channelParticipants*)data; } const MTPDchannels_channelParticipants &c_channels_channelParticipants() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDchannels_channelParticipants*)data; } 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(MTPDchannels_channelParticipants *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPchannels_ChannelParticipants; class MTPchannels_channelParticipant : private mtpDataOwner { public: MTPchannels_channelParticipant(); MTPchannels_channelParticipant(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_channelParticipant) : mtpDataOwner(0) { read(from, end, cons); } MTPDchannels_channelParticipant &_channels_channelParticipant() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDchannels_channelParticipant*)data; } const MTPDchannels_channelParticipant &c_channels_channelParticipant() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDchannels_channelParticipant*)data; } 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(MTPDchannels_channelParticipant *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPchannels_ChannelParticipant; class MTPhelp_termsOfService : private mtpDataOwner { public: MTPhelp_termsOfService(); MTPhelp_termsOfService(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_termsOfService) : mtpDataOwner(0) { read(from, end, cons); } MTPDhelp_termsOfService &_help_termsOfService() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDhelp_termsOfService*)data; } const MTPDhelp_termsOfService &c_help_termsOfService() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDhelp_termsOfService*)data; } 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(MTPDhelp_termsOfService *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPhelp_TermsOfService; class MTPfoundGif : private mtpDataOwner { public: MTPfoundGif() : mtpDataOwner(0), _type(0) { } MTPfoundGif(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDfoundGif &_foundGif() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_foundGif) throw mtpErrorWrongTypeId(_type, mtpc_foundGif); split(); return *(MTPDfoundGif*)data; } const MTPDfoundGif &c_foundGif() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_foundGif) throw mtpErrorWrongTypeId(_type, mtpc_foundGif); return *(const MTPDfoundGif*)data; } MTPDfoundGifCached &_foundGifCached() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_foundGifCached) throw mtpErrorWrongTypeId(_type, mtpc_foundGifCached); split(); return *(MTPDfoundGifCached*)data; } const MTPDfoundGifCached &c_foundGifCached() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_foundGifCached) throw mtpErrorWrongTypeId(_type, mtpc_foundGifCached); return *(const MTPDfoundGifCached*)data; } 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(MTPDfoundGif *_data); explicit MTPfoundGif(MTPDfoundGifCached *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPFoundGif; class MTPmessages_foundGifs : private mtpDataOwner { public: MTPmessages_foundGifs(); MTPmessages_foundGifs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_foundGifs) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_foundGifs &_messages_foundGifs() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_foundGifs*)data; } const MTPDmessages_foundGifs &c_messages_foundGifs() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_foundGifs*)data; } 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(MTPDmessages_foundGifs *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_FoundGifs; class MTPmessages_savedGifs : private mtpDataOwner { public: MTPmessages_savedGifs() : mtpDataOwner(0), _type(0) { } MTPmessages_savedGifs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_savedGifs &_messages_savedGifs() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_savedGifs) throw mtpErrorWrongTypeId(_type, mtpc_messages_savedGifs); split(); return *(MTPDmessages_savedGifs*)data; } const MTPDmessages_savedGifs &c_messages_savedGifs() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_savedGifs) throw mtpErrorWrongTypeId(_type, mtpc_messages_savedGifs); return *(const MTPDmessages_savedGifs*)data; } 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(MTPDmessages_savedGifs *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_SavedGifs; class MTPinputBotInlineMessage : private mtpDataOwner { public: MTPinputBotInlineMessage() : mtpDataOwner(0), _type(0) { } MTPinputBotInlineMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputBotInlineMessageMediaAuto &_inputBotInlineMessageMediaAuto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaAuto) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaAuto); split(); return *(MTPDinputBotInlineMessageMediaAuto*)data; } const MTPDinputBotInlineMessageMediaAuto &c_inputBotInlineMessageMediaAuto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaAuto) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaAuto); return *(const MTPDinputBotInlineMessageMediaAuto*)data; } MTPDinputBotInlineMessageText &_inputBotInlineMessageText() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageText) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageText); split(); return *(MTPDinputBotInlineMessageText*)data; } const MTPDinputBotInlineMessageText &c_inputBotInlineMessageText() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageText) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageText); return *(const MTPDinputBotInlineMessageText*)data; } MTPDinputBotInlineMessageMediaGeo &_inputBotInlineMessageMediaGeo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaGeo); split(); return *(MTPDinputBotInlineMessageMediaGeo*)data; } const MTPDinputBotInlineMessageMediaGeo &c_inputBotInlineMessageMediaGeo() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaGeo); return *(const MTPDinputBotInlineMessageMediaGeo*)data; } MTPDinputBotInlineMessageMediaVenue &_inputBotInlineMessageMediaVenue() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaVenue); split(); return *(MTPDinputBotInlineMessageMediaVenue*)data; } const MTPDinputBotInlineMessageMediaVenue &c_inputBotInlineMessageMediaVenue() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaVenue); return *(const MTPDinputBotInlineMessageMediaVenue*)data; } MTPDinputBotInlineMessageMediaContact &_inputBotInlineMessageMediaContact() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaContact); split(); return *(MTPDinputBotInlineMessageMediaContact*)data; } const MTPDinputBotInlineMessageMediaContact &c_inputBotInlineMessageMediaContact() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineMessageMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineMessageMediaContact); return *(const MTPDinputBotInlineMessageMediaContact*)data; } 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(MTPDinputBotInlineMessageMediaAuto *_data); explicit MTPinputBotInlineMessage(MTPDinputBotInlineMessageText *_data); explicit MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaGeo *_data); explicit MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaVenue *_data); explicit MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaContact *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputBotInlineMessage; class MTPinputBotInlineResult : private mtpDataOwner { public: MTPinputBotInlineResult() : mtpDataOwner(0), _type(0) { } MTPinputBotInlineResult(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDinputBotInlineResult &_inputBotInlineResult() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineResult) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineResult); split(); return *(MTPDinputBotInlineResult*)data; } const MTPDinputBotInlineResult &c_inputBotInlineResult() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineResult) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineResult); return *(const MTPDinputBotInlineResult*)data; } MTPDinputBotInlineResultPhoto &_inputBotInlineResultPhoto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineResultPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineResultPhoto); split(); return *(MTPDinputBotInlineResultPhoto*)data; } const MTPDinputBotInlineResultPhoto &c_inputBotInlineResultPhoto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineResultPhoto) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineResultPhoto); return *(const MTPDinputBotInlineResultPhoto*)data; } MTPDinputBotInlineResultDocument &_inputBotInlineResultDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineResultDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineResultDocument); split(); return *(MTPDinputBotInlineResultDocument*)data; } const MTPDinputBotInlineResultDocument &c_inputBotInlineResultDocument() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputBotInlineResultDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputBotInlineResultDocument); return *(const MTPDinputBotInlineResultDocument*)data; } 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(MTPDinputBotInlineResult *_data); explicit MTPinputBotInlineResult(MTPDinputBotInlineResultPhoto *_data); explicit MTPinputBotInlineResult(MTPDinputBotInlineResultDocument *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPInputBotInlineResult; class MTPbotInlineMessage : private mtpDataOwner { public: MTPbotInlineMessage() : mtpDataOwner(0), _type(0) { } MTPbotInlineMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDbotInlineMessageMediaAuto &_botInlineMessageMediaAuto() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaAuto) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaAuto); split(); return *(MTPDbotInlineMessageMediaAuto*)data; } const MTPDbotInlineMessageMediaAuto &c_botInlineMessageMediaAuto() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaAuto) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaAuto); return *(const MTPDbotInlineMessageMediaAuto*)data; } MTPDbotInlineMessageText &_botInlineMessageText() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageText) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageText); split(); return *(MTPDbotInlineMessageText*)data; } const MTPDbotInlineMessageText &c_botInlineMessageText() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageText) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageText); return *(const MTPDbotInlineMessageText*)data; } MTPDbotInlineMessageMediaGeo &_botInlineMessageMediaGeo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaGeo); split(); return *(MTPDbotInlineMessageMediaGeo*)data; } const MTPDbotInlineMessageMediaGeo &c_botInlineMessageMediaGeo() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaGeo); return *(const MTPDbotInlineMessageMediaGeo*)data; } MTPDbotInlineMessageMediaVenue &_botInlineMessageMediaVenue() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaVenue); split(); return *(MTPDbotInlineMessageMediaVenue*)data; } const MTPDbotInlineMessageMediaVenue &c_botInlineMessageMediaVenue() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaVenue) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaVenue); return *(const MTPDbotInlineMessageMediaVenue*)data; } MTPDbotInlineMessageMediaContact &_botInlineMessageMediaContact() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaContact); split(); return *(MTPDbotInlineMessageMediaContact*)data; } const MTPDbotInlineMessageMediaContact &c_botInlineMessageMediaContact() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMessageMediaContact) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMessageMediaContact); return *(const MTPDbotInlineMessageMediaContact*)data; } 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(MTPDbotInlineMessageMediaAuto *_data); explicit MTPbotInlineMessage(MTPDbotInlineMessageText *_data); explicit MTPbotInlineMessage(MTPDbotInlineMessageMediaGeo *_data); explicit MTPbotInlineMessage(MTPDbotInlineMessageMediaVenue *_data); explicit MTPbotInlineMessage(MTPDbotInlineMessageMediaContact *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPBotInlineMessage; class MTPbotInlineResult : private mtpDataOwner { public: MTPbotInlineResult() : mtpDataOwner(0), _type(0) { } MTPbotInlineResult(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDbotInlineResult &_botInlineResult() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineResult) throw mtpErrorWrongTypeId(_type, mtpc_botInlineResult); split(); return *(MTPDbotInlineResult*)data; } const MTPDbotInlineResult &c_botInlineResult() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineResult) throw mtpErrorWrongTypeId(_type, mtpc_botInlineResult); return *(const MTPDbotInlineResult*)data; } MTPDbotInlineMediaResult &_botInlineMediaResult() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMediaResult) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMediaResult); split(); return *(MTPDbotInlineMediaResult*)data; } const MTPDbotInlineMediaResult &c_botInlineMediaResult() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_botInlineMediaResult) throw mtpErrorWrongTypeId(_type, mtpc_botInlineMediaResult); return *(const MTPDbotInlineMediaResult*)data; } 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(MTPDbotInlineResult *_data); explicit MTPbotInlineResult(MTPDbotInlineMediaResult *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPBotInlineResult; class MTPmessages_botResults : private mtpDataOwner { public: MTPmessages_botResults(); MTPmessages_botResults(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_botResults) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_botResults &_messages_botResults() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_botResults*)data; } const MTPDmessages_botResults &c_messages_botResults() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_botResults*)data; } 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(MTPDmessages_botResults *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_BotResults; class MTPexportedMessageLink : private mtpDataOwner { public: MTPexportedMessageLink(); MTPexportedMessageLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_exportedMessageLink) : mtpDataOwner(0) { read(from, end, cons); } MTPDexportedMessageLink &_exportedMessageLink() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDexportedMessageLink*)data; } const MTPDexportedMessageLink &c_exportedMessageLink() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDexportedMessageLink*)data; } 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(MTPDexportedMessageLink *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPExportedMessageLink; class MTPmessageFwdHeader : private mtpDataOwner { public: MTPmessageFwdHeader(); MTPmessageFwdHeader(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messageFwdHeader) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessageFwdHeader &_messageFwdHeader() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessageFwdHeader*)data; } const MTPDmessageFwdHeader &c_messageFwdHeader() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessageFwdHeader*)data; } 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(MTPDmessageFwdHeader *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPMessageFwdHeader; class MTPauth_codeType { public: MTPauth_codeType() : _type(0) { } MTPauth_codeType(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPauth_CodeType; class MTPauth_sentCodeType : private mtpDataOwner { public: MTPauth_sentCodeType() : mtpDataOwner(0), _type(0) { } MTPauth_sentCodeType(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDauth_sentCodeTypeApp &_auth_sentCodeTypeApp() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeApp) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeApp); split(); return *(MTPDauth_sentCodeTypeApp*)data; } const MTPDauth_sentCodeTypeApp &c_auth_sentCodeTypeApp() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeApp) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeApp); return *(const MTPDauth_sentCodeTypeApp*)data; } MTPDauth_sentCodeTypeSms &_auth_sentCodeTypeSms() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeSms) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeSms); split(); return *(MTPDauth_sentCodeTypeSms*)data; } const MTPDauth_sentCodeTypeSms &c_auth_sentCodeTypeSms() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeSms) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeSms); return *(const MTPDauth_sentCodeTypeSms*)data; } MTPDauth_sentCodeTypeCall &_auth_sentCodeTypeCall() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeCall) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeCall); split(); return *(MTPDauth_sentCodeTypeCall*)data; } const MTPDauth_sentCodeTypeCall &c_auth_sentCodeTypeCall() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeCall) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeCall); return *(const MTPDauth_sentCodeTypeCall*)data; } MTPDauth_sentCodeTypeFlashCall &_auth_sentCodeTypeFlashCall() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeFlashCall) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeFlashCall); split(); return *(MTPDauth_sentCodeTypeFlashCall*)data; } const MTPDauth_sentCodeTypeFlashCall &c_auth_sentCodeTypeFlashCall() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_auth_sentCodeTypeFlashCall) throw mtpErrorWrongTypeId(_type, mtpc_auth_sentCodeTypeFlashCall); return *(const MTPDauth_sentCodeTypeFlashCall*)data; } 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(MTPDauth_sentCodeTypeApp *_data); explicit MTPauth_sentCodeType(MTPDauth_sentCodeTypeSms *_data); explicit MTPauth_sentCodeType(MTPDauth_sentCodeTypeCall *_data); explicit MTPauth_sentCodeType(MTPDauth_sentCodeTypeFlashCall *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPauth_SentCodeType; class MTPmessages_botCallbackAnswer : private mtpDataOwner { public: MTPmessages_botCallbackAnswer(); MTPmessages_botCallbackAnswer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_botCallbackAnswer) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_botCallbackAnswer &_messages_botCallbackAnswer() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_botCallbackAnswer*)data; } const MTPDmessages_botCallbackAnswer &c_messages_botCallbackAnswer() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_botCallbackAnswer*)data; } 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(MTPDmessages_botCallbackAnswer *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_BotCallbackAnswer; class MTPmessages_messageEditData : private mtpDataOwner { public: MTPmessages_messageEditData(); MTPmessages_messageEditData(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_messageEditData) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_messageEditData &_messages_messageEditData() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_messageEditData*)data; } const MTPDmessages_messageEditData &c_messages_messageEditData() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_messageEditData*)data; } 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(MTPDmessages_messageEditData *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_MessageEditData; class MTPinputBotInlineMessageID : private mtpDataOwner { public: MTPinputBotInlineMessageID(); MTPinputBotInlineMessageID(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputBotInlineMessageID) : mtpDataOwner(0) { read(from, end, cons); } MTPDinputBotInlineMessageID &_inputBotInlineMessageID() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDinputBotInlineMessageID*)data; } const MTPDinputBotInlineMessageID &c_inputBotInlineMessageID() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDinputBotInlineMessageID*)data; } 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(MTPDinputBotInlineMessageID *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInputBotInlineMessageID; class MTPinlineBotSwitchPM : private mtpDataOwner { public: MTPinlineBotSwitchPM(); MTPinlineBotSwitchPM(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inlineBotSwitchPM) : mtpDataOwner(0) { read(from, end, cons); } MTPDinlineBotSwitchPM &_inlineBotSwitchPM() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDinlineBotSwitchPM*)data; } const MTPDinlineBotSwitchPM &c_inlineBotSwitchPM() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDinlineBotSwitchPM*)data; } 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(MTPDinlineBotSwitchPM *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPInlineBotSwitchPM; class MTPmessages_peerDialogs : private mtpDataOwner { public: MTPmessages_peerDialogs(); MTPmessages_peerDialogs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_peerDialogs) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_peerDialogs &_messages_peerDialogs() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_peerDialogs*)data; } const MTPDmessages_peerDialogs &c_messages_peerDialogs() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_peerDialogs*)data; } 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(MTPDmessages_peerDialogs *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_PeerDialogs; class MTPtopPeer : private mtpDataOwner { public: MTPtopPeer(); MTPtopPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_topPeer) : mtpDataOwner(0) { read(from, end, cons); } MTPDtopPeer &_topPeer() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDtopPeer*)data; } const MTPDtopPeer &c_topPeer() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDtopPeer*)data; } 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(MTPDtopPeer *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPTopPeer; class MTPtopPeerCategory { public: MTPtopPeerCategory() : _type(0) { } MTPtopPeerCategory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } 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; }; typedef MTPBoxed MTPTopPeerCategory; class MTPtopPeerCategoryPeers : private mtpDataOwner { public: MTPtopPeerCategoryPeers(); MTPtopPeerCategoryPeers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_topPeerCategoryPeers) : mtpDataOwner(0) { read(from, end, cons); } MTPDtopPeerCategoryPeers &_topPeerCategoryPeers() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDtopPeerCategoryPeers*)data; } const MTPDtopPeerCategoryPeers &c_topPeerCategoryPeers() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDtopPeerCategoryPeers*)data; } 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(MTPDtopPeerCategoryPeers *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPTopPeerCategoryPeers; class MTPcontacts_topPeers : private mtpDataOwner { public: MTPcontacts_topPeers() : mtpDataOwner(0), _type(0) { } MTPcontacts_topPeers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDcontacts_topPeers &_contacts_topPeers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_topPeers) throw mtpErrorWrongTypeId(_type, mtpc_contacts_topPeers); split(); return *(MTPDcontacts_topPeers*)data; } const MTPDcontacts_topPeers &c_contacts_topPeers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_contacts_topPeers) throw mtpErrorWrongTypeId(_type, mtpc_contacts_topPeers); return *(const MTPDcontacts_topPeers*)data; } 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(MTPDcontacts_topPeers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPcontacts_TopPeers; class MTPdraftMessage : private mtpDataOwner { public: MTPdraftMessage() : mtpDataOwner(0), _type(0) { } MTPdraftMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDdraftMessage &_draftMessage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_draftMessage) throw mtpErrorWrongTypeId(_type, mtpc_draftMessage); split(); return *(MTPDdraftMessage*)data; } const MTPDdraftMessage &c_draftMessage() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_draftMessage) throw mtpErrorWrongTypeId(_type, mtpc_draftMessage); return *(const MTPDdraftMessage*)data; } 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(MTPDdraftMessage *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPDraftMessage; class MTPmessages_featuredStickers : private mtpDataOwner { public: MTPmessages_featuredStickers() : mtpDataOwner(0), _type(0) { } MTPmessages_featuredStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_featuredStickers &_messages_featuredStickers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_featuredStickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_featuredStickers); split(); return *(MTPDmessages_featuredStickers*)data; } const MTPDmessages_featuredStickers &c_messages_featuredStickers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_featuredStickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_featuredStickers); return *(const MTPDmessages_featuredStickers*)data; } 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(MTPDmessages_featuredStickers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_FeaturedStickers; class MTPmessages_recentStickers : private mtpDataOwner { public: MTPmessages_recentStickers() : mtpDataOwner(0), _type(0) { } MTPmessages_recentStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_recentStickers &_messages_recentStickers() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_recentStickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_recentStickers); split(); return *(MTPDmessages_recentStickers*)data; } const MTPDmessages_recentStickers &c_messages_recentStickers() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_recentStickers) throw mtpErrorWrongTypeId(_type, mtpc_messages_recentStickers); return *(const MTPDmessages_recentStickers*)data; } 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(MTPDmessages_recentStickers *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_RecentStickers; class MTPmessages_archivedStickers : private mtpDataOwner { public: MTPmessages_archivedStickers(); MTPmessages_archivedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_archivedStickers) : mtpDataOwner(0) { read(from, end, cons); } MTPDmessages_archivedStickers &_messages_archivedStickers() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDmessages_archivedStickers*)data; } const MTPDmessages_archivedStickers &c_messages_archivedStickers() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDmessages_archivedStickers*)data; } 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(MTPDmessages_archivedStickers *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPmessages_ArchivedStickers; class MTPmessages_stickerSetInstallResult : private mtpDataOwner { public: MTPmessages_stickerSetInstallResult() : mtpDataOwner(0), _type(0) { } MTPmessages_stickerSetInstallResult(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { read(from, end, cons); } MTPDmessages_stickerSetInstallResultArchive &_messages_stickerSetInstallResultArchive() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_stickerSetInstallResultArchive) throw mtpErrorWrongTypeId(_type, mtpc_messages_stickerSetInstallResultArchive); split(); return *(MTPDmessages_stickerSetInstallResultArchive*)data; } const MTPDmessages_stickerSetInstallResultArchive &c_messages_stickerSetInstallResultArchive() const { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messages_stickerSetInstallResultArchive) throw mtpErrorWrongTypeId(_type, mtpc_messages_stickerSetInstallResultArchive); return *(const MTPDmessages_stickerSetInstallResultArchive*)data; } 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(MTPDmessages_stickerSetInstallResultArchive *_data); friend class MTP::internal::TypeCreator; mtpTypeId _type; }; typedef MTPBoxed MTPmessages_StickerSetInstallResult; class MTPstickerSetCovered : private mtpDataOwner { public: MTPstickerSetCovered(); MTPstickerSetCovered(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_stickerSetCovered) : mtpDataOwner(0) { read(from, end, cons); } MTPDstickerSetCovered &_stickerSetCovered() { if (!data) throw mtpErrorUninitialized(); split(); return *(MTPDstickerSetCovered*)data; } const MTPDstickerSetCovered &c_stickerSetCovered() const { if (!data) throw mtpErrorUninitialized(); return *(const MTPDstickerSetCovered*)data; } uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_stickerSetCovered); void write(mtpBuffer &to) const; typedef void ResponseType; private: explicit MTPstickerSetCovered(MTPDstickerSetCovered *_data); friend class MTP::internal::TypeCreator; }; typedef MTPBoxed MTPStickerSetCovered; // Type constructors with data class MTPDresPQ : public mtpDataImpl { public: MTPDresPQ() { } 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 mtpDataImpl { public: MTPDp_q_inner_data() { } 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 mtpDataImpl { public: MTPDserver_DH_params_fail() { } 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 mtpDataImpl { public: MTPDserver_DH_params_ok() { } 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 mtpDataImpl { public: MTPDserver_DH_inner_data() { } 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 mtpDataImpl { public: MTPDclient_DH_inner_data() { } 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 mtpDataImpl { public: MTPDdh_gen_ok() { } 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 mtpDataImpl { public: MTPDdh_gen_retry() { } 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 mtpDataImpl { public: MTPDdh_gen_fail() { } 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 mtpDataImpl { public: MTPDmsgs_ack() { } MTPDmsgs_ack(const MTPVector &_msg_ids) : vmsg_ids(_msg_ids) { } MTPVector vmsg_ids; }; class MTPDbad_msg_notification : public mtpDataImpl { public: MTPDbad_msg_notification() { } 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 mtpDataImpl { public: MTPDbad_server_salt() { } 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 mtpDataImpl { public: MTPDmsgs_state_req() { } MTPDmsgs_state_req(const MTPVector &_msg_ids) : vmsg_ids(_msg_ids) { } MTPVector vmsg_ids; }; class MTPDmsgs_state_info : public mtpDataImpl { public: MTPDmsgs_state_info() { } 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 mtpDataImpl { public: MTPDmsgs_all_info() { } 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 mtpDataImpl { public: MTPDmsg_detailed_info() { } 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 mtpDataImpl { public: MTPDmsg_new_detailed_info() { } 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 mtpDataImpl { public: MTPDmsg_resend_req() { } MTPDmsg_resend_req(const MTPVector &_msg_ids) : vmsg_ids(_msg_ids) { } MTPVector vmsg_ids; }; class MTPDrpc_error : public mtpDataImpl { public: MTPDrpc_error() { } 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 mtpDataImpl { public: MTPDrpc_answer_dropped() { } 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 mtpDataImpl { public: MTPDfuture_salt() { } 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 mtpDataImpl { public: MTPDfuture_salts() { } 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 mtpDataImpl { public: MTPDpong() { } 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 mtpDataImpl { public: MTPDdestroy_session_ok() { } MTPDdestroy_session_ok(const MTPlong &_session_id) : vsession_id(_session_id) { } MTPlong vsession_id; }; class MTPDdestroy_session_none : public mtpDataImpl { public: MTPDdestroy_session_none() { } MTPDdestroy_session_none(const MTPlong &_session_id) : vsession_id(_session_id) { } MTPlong vsession_id; }; class MTPDnew_session_created : public mtpDataImpl { public: MTPDnew_session_created() { } 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 mtpDataImpl { public: MTPDhttp_wait() { } 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 mtpDataImpl { public: MTPDerror() { } MTPDerror(MTPint _code, const MTPstring &_text) : vcode(_code), vtext(_text) { } MTPint vcode; MTPstring vtext; }; class MTPDinputPeerChat : public mtpDataImpl { public: MTPDinputPeerChat() { } MTPDinputPeerChat(MTPint _chat_id) : vchat_id(_chat_id) { } MTPint vchat_id; }; class MTPDinputPeerUser : public mtpDataImpl { public: MTPDinputPeerUser() { } 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 mtpDataImpl { public: MTPDinputPeerChannel() { } 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 mtpDataImpl { public: MTPDinputUser() { } 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 mtpDataImpl { public: MTPDinputPhoneContact() { } 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 mtpDataImpl { public: MTPDinputFile() { } 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 mtpDataImpl { public: MTPDinputFileBig() { } MTPDinputFileBig(const MTPlong &_id, MTPint _parts, const MTPstring &_name) : vid(_id), vparts(_parts), vname(_name) { } MTPlong vid; MTPint vparts; MTPstring vname; }; class MTPDinputMediaUploadedPhoto : public mtpDataImpl { public: MTPDinputMediaUploadedPhoto() { } MTPDinputMediaUploadedPhoto(const MTPInputFile &_file, const MTPstring &_caption) : vfile(_file), vcaption(_caption) { } MTPInputFile vfile; MTPstring vcaption; }; class MTPDinputMediaPhoto : public mtpDataImpl { public: MTPDinputMediaPhoto() { } MTPDinputMediaPhoto(const MTPInputPhoto &_id, const MTPstring &_caption) : vid(_id), vcaption(_caption) { } MTPInputPhoto vid; MTPstring vcaption; }; class MTPDinputMediaGeoPoint : public mtpDataImpl { public: MTPDinputMediaGeoPoint() { } MTPDinputMediaGeoPoint(const MTPInputGeoPoint &_geo_point) : vgeo_point(_geo_point) { } MTPInputGeoPoint vgeo_point; }; class MTPDinputMediaContact : public mtpDataImpl { public: MTPDinputMediaContact() { } 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 mtpDataImpl { public: MTPDinputMediaUploadedDocument() { } MTPDinputMediaUploadedDocument(const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) : vfile(_file), vmime_type(_mime_type), vattributes(_attributes), vcaption(_caption) { } MTPInputFile vfile; MTPstring vmime_type; MTPVector vattributes; MTPstring vcaption; }; class MTPDinputMediaUploadedThumbDocument : public mtpDataImpl { public: MTPDinputMediaUploadedThumbDocument() { } MTPDinputMediaUploadedThumbDocument(const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) : vfile(_file), vthumb(_thumb), vmime_type(_mime_type), vattributes(_attributes), vcaption(_caption) { } MTPInputFile vfile; MTPInputFile vthumb; MTPstring vmime_type; MTPVector vattributes; MTPstring vcaption; }; class MTPDinputMediaDocument : public mtpDataImpl { public: MTPDinputMediaDocument() { } MTPDinputMediaDocument(const MTPInputDocument &_id, const MTPstring &_caption) : vid(_id), vcaption(_caption) { } MTPInputDocument vid; MTPstring vcaption; }; class MTPDinputMediaVenue : public mtpDataImpl { public: MTPDinputMediaVenue() { } 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 mtpDataImpl { public: MTPDinputMediaGifExternal() { } MTPDinputMediaGifExternal(const MTPstring &_url, const MTPstring &_q) : vurl(_url), vq(_q) { } MTPstring vurl; MTPstring vq; }; class MTPDinputMediaPhotoExternal : public mtpDataImpl { public: MTPDinputMediaPhotoExternal() { } MTPDinputMediaPhotoExternal(const MTPstring &_url, const MTPstring &_caption) : vurl(_url), vcaption(_caption) { } MTPstring vurl; MTPstring vcaption; }; class MTPDinputMediaDocumentExternal : public mtpDataImpl { public: MTPDinputMediaDocumentExternal() { } MTPDinputMediaDocumentExternal(const MTPstring &_url, const MTPstring &_caption) : vurl(_url), vcaption(_caption) { } MTPstring vurl; MTPstring vcaption; }; class MTPDinputChatUploadedPhoto : public mtpDataImpl { public: MTPDinputChatUploadedPhoto() { } MTPDinputChatUploadedPhoto(const MTPInputFile &_file, const MTPInputPhotoCrop &_crop) : vfile(_file), vcrop(_crop) { } MTPInputFile vfile; MTPInputPhotoCrop vcrop; }; class MTPDinputChatPhoto : public mtpDataImpl { public: MTPDinputChatPhoto() { } MTPDinputChatPhoto(const MTPInputPhoto &_id, const MTPInputPhotoCrop &_crop) : vid(_id), vcrop(_crop) { } MTPInputPhoto vid; MTPInputPhotoCrop vcrop; }; class MTPDinputGeoPoint : public mtpDataImpl { public: MTPDinputGeoPoint() { } MTPDinputGeoPoint(const MTPdouble &_lat, const MTPdouble &_long) : vlat(_lat), vlong(_long) { } MTPdouble vlat; MTPdouble vlong; }; class MTPDinputPhoto : public mtpDataImpl { public: MTPDinputPhoto() { } MTPDinputPhoto(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputFileLocation : public mtpDataImpl { public: MTPDinputFileLocation() { } 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 mtpDataImpl { public: MTPDinputEncryptedFileLocation() { } MTPDinputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputDocumentFileLocation : public mtpDataImpl { public: MTPDinputDocumentFileLocation() { } 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 MTPDinputPhotoCrop : public mtpDataImpl { public: MTPDinputPhotoCrop() { } MTPDinputPhotoCrop(const MTPdouble &_crop_left, const MTPdouble &_crop_top, const MTPdouble &_crop_width) : vcrop_left(_crop_left), vcrop_top(_crop_top), vcrop_width(_crop_width) { } MTPdouble vcrop_left; MTPdouble vcrop_top; MTPdouble vcrop_width; }; class MTPDinputAppEvent : public mtpDataImpl { public: MTPDinputAppEvent() { } 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 mtpDataImpl { public: MTPDpeerUser() { } MTPDpeerUser(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDpeerChat : public mtpDataImpl { public: MTPDpeerChat() { } MTPDpeerChat(MTPint _chat_id) : vchat_id(_chat_id) { } MTPint vchat_id; }; class MTPDpeerChannel : public mtpDataImpl { public: MTPDpeerChannel() { } MTPDpeerChannel(MTPint _channel_id) : vchannel_id(_channel_id) { } MTPint vchannel_id; }; class MTPDfileLocationUnavailable : public mtpDataImpl { public: MTPDfileLocationUnavailable() { } 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 mtpDataImpl { public: MTPDfileLocation() { } 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 mtpDataImpl { public: MTPDuserEmpty() { } MTPDuserEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDuser : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDuserProfilePhoto() { } 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 mtpDataImpl { public: MTPDuserStatusOnline() { } MTPDuserStatusOnline(MTPint _expires) : vexpires(_expires) { } MTPint vexpires; }; class MTPDuserStatusOffline : public mtpDataImpl { public: MTPDuserStatusOffline() { } MTPDuserStatusOffline(MTPint _was_online) : vwas_online(_was_online) { } MTPint vwas_online; }; class MTPDchatEmpty : public mtpDataImpl { public: MTPDchatEmpty() { } MTPDchatEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDchat : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDchatForbidden() { } MTPDchatForbidden(MTPint _id, const MTPstring &_title) : vid(_id), vtitle(_title) { } MTPint vid; MTPstring vtitle; }; class MTPDchannel : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDchatFull() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDchatParticipant() { } 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 mtpDataImpl { public: MTPDchatParticipantCreator() { } MTPDchatParticipantCreator(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDchatParticipantAdmin : public mtpDataImpl { public: MTPDchatParticipantAdmin() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDchatParticipants() { } 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 mtpDataImpl { public: MTPDchatPhoto() { } 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 mtpDataImpl { public: MTPDmessageEmpty() { } MTPDmessageEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDmessage : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDmessageMediaPhoto() { } MTPDmessageMediaPhoto(const MTPPhoto &_photo, const MTPstring &_caption) : vphoto(_photo), vcaption(_caption) { } MTPPhoto vphoto; MTPstring vcaption; }; class MTPDmessageMediaGeo : public mtpDataImpl { public: MTPDmessageMediaGeo() { } MTPDmessageMediaGeo(const MTPGeoPoint &_geo) : vgeo(_geo) { } MTPGeoPoint vgeo; }; class MTPDmessageMediaContact : public mtpDataImpl { public: MTPDmessageMediaContact() { } 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 mtpDataImpl { public: MTPDmessageMediaDocument() { } MTPDmessageMediaDocument(const MTPDocument &_document, const MTPstring &_caption) : vdocument(_document), vcaption(_caption) { } MTPDocument vdocument; MTPstring vcaption; }; class MTPDmessageMediaWebPage : public mtpDataImpl { public: MTPDmessageMediaWebPage() { } MTPDmessageMediaWebPage(const MTPWebPage &_webpage) : vwebpage(_webpage) { } MTPWebPage vwebpage; }; class MTPDmessageMediaVenue : public mtpDataImpl { public: MTPDmessageMediaVenue() { } 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 MTPDmessageActionChatCreate : public mtpDataImpl { public: MTPDmessageActionChatCreate() { } MTPDmessageActionChatCreate(const MTPstring &_title, const MTPVector &_users) : vtitle(_title), vusers(_users) { } MTPstring vtitle; MTPVector vusers; }; class MTPDmessageActionChatEditTitle : public mtpDataImpl { public: MTPDmessageActionChatEditTitle() { } MTPDmessageActionChatEditTitle(const MTPstring &_title) : vtitle(_title) { } MTPstring vtitle; }; class MTPDmessageActionChatEditPhoto : public mtpDataImpl { public: MTPDmessageActionChatEditPhoto() { } MTPDmessageActionChatEditPhoto(const MTPPhoto &_photo) : vphoto(_photo) { } MTPPhoto vphoto; }; class MTPDmessageActionChatAddUser : public mtpDataImpl { public: MTPDmessageActionChatAddUser() { } MTPDmessageActionChatAddUser(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDmessageActionChatDeleteUser : public mtpDataImpl { public: MTPDmessageActionChatDeleteUser() { } MTPDmessageActionChatDeleteUser(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDmessageActionChatJoinedByLink : public mtpDataImpl { public: MTPDmessageActionChatJoinedByLink() { } MTPDmessageActionChatJoinedByLink(MTPint _inviter_id) : vinviter_id(_inviter_id) { } MTPint vinviter_id; }; class MTPDmessageActionChannelCreate : public mtpDataImpl { public: MTPDmessageActionChannelCreate() { } MTPDmessageActionChannelCreate(const MTPstring &_title) : vtitle(_title) { } MTPstring vtitle; }; class MTPDmessageActionChatMigrateTo : public mtpDataImpl { public: MTPDmessageActionChatMigrateTo() { } MTPDmessageActionChatMigrateTo(MTPint _channel_id) : vchannel_id(_channel_id) { } MTPint vchannel_id; }; class MTPDmessageActionChannelMigrateFrom : public mtpDataImpl { public: MTPDmessageActionChannelMigrateFrom() { } MTPDmessageActionChannelMigrateFrom(const MTPstring &_title, MTPint _chat_id) : vtitle(_title), vchat_id(_chat_id) { } MTPstring vtitle; MTPint vchat_id; }; class MTPDdialog : public mtpDataImpl { public: enum class Flag : int32 { f_pts = (1 << 0), f_draft = (1 << 1), MAX_FIELD = (1 << 1), }; 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; } bool has_draft() const { return vflags.v & Flag::f_draft; } MTPDdialog() { } 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 mtpDataImpl { public: MTPDphotoEmpty() { } MTPDphotoEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDphoto : public mtpDataImpl { public: MTPDphoto() { } MTPDphoto(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPVector &_sizes) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vsizes(_sizes) { } MTPlong vid; MTPlong vaccess_hash; MTPint vdate; MTPVector vsizes; }; class MTPDphotoSizeEmpty : public mtpDataImpl { public: MTPDphotoSizeEmpty() { } MTPDphotoSizeEmpty(const MTPstring &_type) : vtype(_type) { } MTPstring vtype; }; class MTPDphotoSize : public mtpDataImpl { public: MTPDphotoSize() { } 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 mtpDataImpl { public: MTPDphotoCachedSize() { } 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 mtpDataImpl { public: MTPDgeoPoint() { } MTPDgeoPoint(const MTPdouble &_long, const MTPdouble &_lat) : vlong(_long), vlat(_lat) { } MTPdouble vlong; MTPdouble vlat; }; class MTPDauth_checkedPhone : public mtpDataImpl { public: MTPDauth_checkedPhone() { } MTPDauth_checkedPhone(MTPBool _phone_registered) : vphone_registered(_phone_registered) { } MTPBool vphone_registered; }; class MTPDauth_sentCode : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDauth_exportedAuthorization() { } MTPDauth_exportedAuthorization(MTPint _id, const MTPbytes &_bytes) : vid(_id), vbytes(_bytes) { } MTPint vid; MTPbytes vbytes; }; class MTPDinputNotifyPeer : public mtpDataImpl { public: MTPDinputNotifyPeer() { } MTPDinputNotifyPeer(const MTPInputPeer &_peer) : vpeer(_peer) { } MTPInputPeer vpeer; }; class MTPDinputPeerNotifySettings : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } MTPDpeerSettings(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDwallPaper : public mtpDataImpl { public: MTPDwallPaper() { } 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 mtpDataImpl { public: MTPDwallPaperSolid() { } 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 mtpDataImpl { public: MTPDinputReportReasonOther() { } MTPDinputReportReasonOther(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDuserFull : public mtpDataImpl { public: enum class Flag : int32 { f_blocked = (1 << 0), f_about = (1 << 1), f_profile_photo = (1 << 2), f_bot_info = (1 << 3), MAX_FIELD = (1 << 3), }; 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 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() { } 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) : vflags(_flags), vuser(_user), vabout(_about), vlink(_link), vprofile_photo(_profile_photo), vnotify_settings(_notify_settings), vbot_info(_bot_info) { } MTPflags vflags; MTPUser vuser; MTPstring vabout; MTPcontacts_Link vlink; MTPPhoto vprofile_photo; MTPPeerNotifySettings vnotify_settings; MTPBotInfo vbot_info; }; class MTPDcontact : public mtpDataImpl { public: MTPDcontact() { } MTPDcontact(MTPint _user_id, MTPBool _mutual) : vuser_id(_user_id), vmutual(_mutual) { } MTPint vuser_id; MTPBool vmutual; }; class MTPDimportedContact : public mtpDataImpl { public: MTPDimportedContact() { } 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 mtpDataImpl { public: MTPDcontactBlocked() { } MTPDcontactBlocked(MTPint _user_id, MTPint _date) : vuser_id(_user_id), vdate(_date) { } MTPint vuser_id; MTPint vdate; }; class MTPDcontactStatus : public mtpDataImpl { public: MTPDcontactStatus() { } MTPDcontactStatus(MTPint _user_id, const MTPUserStatus &_status) : vuser_id(_user_id), vstatus(_status) { } MTPint vuser_id; MTPUserStatus vstatus; }; class MTPDcontacts_link : public mtpDataImpl { public: MTPDcontacts_link() { } 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 mtpDataImpl { public: MTPDcontacts_contacts() { } MTPDcontacts_contacts(const MTPVector &_contacts, const MTPVector &_users) : vcontacts(_contacts), vusers(_users) { } MTPVector vcontacts; MTPVector vusers; }; class MTPDcontacts_importedContacts : public mtpDataImpl { public: MTPDcontacts_importedContacts() { } 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 mtpDataImpl { public: MTPDcontacts_blocked() { } MTPDcontacts_blocked(const MTPVector &_blocked, const MTPVector &_users) : vblocked(_blocked), vusers(_users) { } MTPVector vblocked; MTPVector vusers; }; class MTPDcontacts_blockedSlice : public mtpDataImpl { public: MTPDcontacts_blockedSlice() { } 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 mtpDataImpl { public: MTPDmessages_dialogs() { } 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 mtpDataImpl { public: MTPDmessages_dialogsSlice() { } 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 mtpDataImpl { public: MTPDmessages_messages() { } 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 mtpDataImpl { public: MTPDmessages_messagesSlice() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDmessages_chats() { } MTPDmessages_chats(const MTPVector &_chats) : vchats(_chats) { } MTPVector vchats; }; class MTPDmessages_chatFull : public mtpDataImpl { public: MTPDmessages_chatFull() { } 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 mtpDataImpl { public: MTPDmessages_affectedHistory() { } 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 MTPDupdateNewMessage : public mtpDataImpl { public: MTPDupdateNewMessage() { } 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 mtpDataImpl { public: MTPDupdateMessageID() { } MTPDupdateMessageID(MTPint _id, const MTPlong &_random_id) : vid(_id), vrandom_id(_random_id) { } MTPint vid; MTPlong vrandom_id; }; class MTPDupdateDeleteMessages : public mtpDataImpl { public: MTPDupdateDeleteMessages() { } 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 mtpDataImpl { public: MTPDupdateUserTyping() { } MTPDupdateUserTyping(MTPint _user_id, const MTPSendMessageAction &_action) : vuser_id(_user_id), vaction(_action) { } MTPint vuser_id; MTPSendMessageAction vaction; }; class MTPDupdateChatUserTyping : public mtpDataImpl { public: MTPDupdateChatUserTyping() { } 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 mtpDataImpl { public: MTPDupdateChatParticipants() { } MTPDupdateChatParticipants(const MTPChatParticipants &_participants) : vparticipants(_participants) { } MTPChatParticipants vparticipants; }; class MTPDupdateUserStatus : public mtpDataImpl { public: MTPDupdateUserStatus() { } MTPDupdateUserStatus(MTPint _user_id, const MTPUserStatus &_status) : vuser_id(_user_id), vstatus(_status) { } MTPint vuser_id; MTPUserStatus vstatus; }; class MTPDupdateUserName : public mtpDataImpl { public: MTPDupdateUserName() { } 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 mtpDataImpl { public: MTPDupdateUserPhoto() { } 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 mtpDataImpl { public: MTPDupdateContactRegistered() { } MTPDupdateContactRegistered(MTPint _user_id, MTPint _date) : vuser_id(_user_id), vdate(_date) { } MTPint vuser_id; MTPint vdate; }; class MTPDupdateContactLink : public mtpDataImpl { public: MTPDupdateContactLink() { } 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 MTPDupdateNewAuthorization : public mtpDataImpl { public: MTPDupdateNewAuthorization() { } MTPDupdateNewAuthorization(const MTPlong &_auth_key_id, MTPint _date, const MTPstring &_device, const MTPstring &_location) : vauth_key_id(_auth_key_id), vdate(_date), vdevice(_device), vlocation(_location) { } MTPlong vauth_key_id; MTPint vdate; MTPstring vdevice; MTPstring vlocation; }; class MTPDupdateNewEncryptedMessage : public mtpDataImpl { public: MTPDupdateNewEncryptedMessage() { } MTPDupdateNewEncryptedMessage(const MTPEncryptedMessage &_message, MTPint _qts) : vmessage(_message), vqts(_qts) { } MTPEncryptedMessage vmessage; MTPint vqts; }; class MTPDupdateEncryptedChatTyping : public mtpDataImpl { public: MTPDupdateEncryptedChatTyping() { } MTPDupdateEncryptedChatTyping(MTPint _chat_id) : vchat_id(_chat_id) { } MTPint vchat_id; }; class MTPDupdateEncryption : public mtpDataImpl { public: MTPDupdateEncryption() { } MTPDupdateEncryption(const MTPEncryptedChat &_chat, MTPint _date) : vchat(_chat), vdate(_date) { } MTPEncryptedChat vchat; MTPint vdate; }; class MTPDupdateEncryptedMessagesRead : public mtpDataImpl { public: MTPDupdateEncryptedMessagesRead() { } 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 mtpDataImpl { public: MTPDupdateChatParticipantAdd() { } 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 mtpDataImpl { public: MTPDupdateChatParticipantDelete() { } 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 mtpDataImpl { public: MTPDupdateDcOptions() { } MTPDupdateDcOptions(const MTPVector &_dc_options) : vdc_options(_dc_options) { } MTPVector vdc_options; }; class MTPDupdateUserBlocked : public mtpDataImpl { public: MTPDupdateUserBlocked() { } MTPDupdateUserBlocked(MTPint _user_id, MTPBool _blocked) : vuser_id(_user_id), vblocked(_blocked) { } MTPint vuser_id; MTPBool vblocked; }; class MTPDupdateNotifySettings : public mtpDataImpl { public: MTPDupdateNotifySettings() { } MTPDupdateNotifySettings(const MTPNotifyPeer &_peer, const MTPPeerNotifySettings &_notify_settings) : vpeer(_peer), vnotify_settings(_notify_settings) { } MTPNotifyPeer vpeer; MTPPeerNotifySettings vnotify_settings; }; class MTPDupdateServiceNotification : public mtpDataImpl { public: MTPDupdateServiceNotification() { } MTPDupdateServiceNotification(const MTPstring &_type, const MTPstring &_message, const MTPMessageMedia &_media, MTPBool _popup) : vtype(_type), vmessage(_message), vmedia(_media), vpopup(_popup) { } MTPstring vtype; MTPstring vmessage; MTPMessageMedia vmedia; MTPBool vpopup; }; class MTPDupdatePrivacy : public mtpDataImpl { public: MTPDupdatePrivacy() { } MTPDupdatePrivacy(const MTPPrivacyKey &_key, const MTPVector &_rules) : vkey(_key), vrules(_rules) { } MTPPrivacyKey vkey; MTPVector vrules; }; class MTPDupdateUserPhone : public mtpDataImpl { public: MTPDupdateUserPhone() { } MTPDupdateUserPhone(MTPint _user_id, const MTPstring &_phone) : vuser_id(_user_id), vphone(_phone) { } MTPint vuser_id; MTPstring vphone; }; class MTPDupdateReadHistoryInbox : public mtpDataImpl { public: MTPDupdateReadHistoryInbox() { } 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 mtpDataImpl { public: MTPDupdateReadHistoryOutbox() { } 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 mtpDataImpl { public: MTPDupdateWebPage() { } 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 mtpDataImpl { public: MTPDupdateReadMessagesContents() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDupdateChannel() { } MTPDupdateChannel(MTPint _channel_id) : vchannel_id(_channel_id) { } MTPint vchannel_id; }; class MTPDupdateNewChannelMessage : public mtpDataImpl { public: MTPDupdateNewChannelMessage() { } 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 mtpDataImpl { public: MTPDupdateReadChannelInbox() { } MTPDupdateReadChannelInbox(MTPint _channel_id, MTPint _max_id) : vchannel_id(_channel_id), vmax_id(_max_id) { } MTPint vchannel_id; MTPint vmax_id; }; class MTPDupdateDeleteChannelMessages : public mtpDataImpl { public: MTPDupdateDeleteChannelMessages() { } 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 mtpDataImpl { public: MTPDupdateChannelMessageViews() { } 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 mtpDataImpl { public: MTPDupdateChatAdmins() { } 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 mtpDataImpl { public: MTPDupdateChatParticipantAdmin() { } 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 mtpDataImpl { public: MTPDupdateNewStickerSet() { } MTPDupdateNewStickerSet(const MTPmessages_StickerSet &_stickerset) : vstickerset(_stickerset) { } MTPmessages_StickerSet vstickerset; }; class MTPDupdateStickerSetsOrder : public mtpDataImpl { public: MTPDupdateStickerSetsOrder() { } MTPDupdateStickerSetsOrder(const MTPVector &_order) : vorder(_order) { } MTPVector vorder; }; class MTPDupdateBotInlineQuery : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDupdateEditChannelMessage() { } 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 mtpDataImpl { public: MTPDupdateChannelPinnedMessage() { } MTPDupdateChannelPinnedMessage(MTPint _channel_id, MTPint _id) : vchannel_id(_channel_id), vid(_id) { } MTPint vchannel_id; MTPint vid; }; class MTPDupdateBotCallbackQuery : public mtpDataImpl { public: MTPDupdateBotCallbackQuery() { } MTPDupdateBotCallbackQuery(const MTPlong &_query_id, MTPint _user_id, const MTPPeer &_peer, MTPint _msg_id, const MTPbytes &_data) : vquery_id(_query_id), vuser_id(_user_id), vpeer(_peer), vmsg_id(_msg_id), vdata(_data) { } MTPlong vquery_id; MTPint vuser_id; MTPPeer vpeer; MTPint vmsg_id; MTPbytes vdata; }; class MTPDupdateEditMessage : public mtpDataImpl { public: MTPDupdateEditMessage() { } 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 mtpDataImpl { public: MTPDupdateInlineBotCallbackQuery() { } MTPDupdateInlineBotCallbackQuery(const MTPlong &_query_id, MTPint _user_id, const MTPInputBotInlineMessageID &_msg_id, const MTPbytes &_data) : vquery_id(_query_id), vuser_id(_user_id), vmsg_id(_msg_id), vdata(_data) { } MTPlong vquery_id; MTPint vuser_id; MTPInputBotInlineMessageID vmsg_id; MTPbytes vdata; }; class MTPDupdateReadChannelOutbox : public mtpDataImpl { public: MTPDupdateReadChannelOutbox() { } MTPDupdateReadChannelOutbox(MTPint _channel_id, MTPint _max_id) : vchannel_id(_channel_id), vmax_id(_max_id) { } MTPint vchannel_id; MTPint vmax_id; }; class MTPDupdateDraftMessage : public mtpDataImpl { public: MTPDupdateDraftMessage() { } MTPDupdateDraftMessage(const MTPPeer &_peer, const MTPDraftMessage &_draft) : vpeer(_peer), vdraft(_draft) { } MTPPeer vpeer; MTPDraftMessage vdraft; }; class MTPDupdates_state : public mtpDataImpl { public: MTPDupdates_state() { } 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 mtpDataImpl { public: MTPDupdates_differenceEmpty() { } MTPDupdates_differenceEmpty(MTPint _date, MTPint _seq) : vdate(_date), vseq(_seq) { } MTPint vdate; MTPint vseq; }; class MTPDupdates_difference : public mtpDataImpl { public: MTPDupdates_difference() { } 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 mtpDataImpl { public: MTPDupdates_differenceSlice() { } 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 MTPDupdateShortMessage : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDupdateShort() { } MTPDupdateShort(const MTPUpdate &_update, MTPint _date) : vupdate(_update), vdate(_date) { } MTPUpdate vupdate; MTPint vdate; }; class MTPDupdatesCombined : public mtpDataImpl { public: MTPDupdatesCombined() { } 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 mtpDataImpl { public: MTPDupdates() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDphotos_photos() { } MTPDphotos_photos(const MTPVector &_photos, const MTPVector &_users) : vphotos(_photos), vusers(_users) { } MTPVector vphotos; MTPVector vusers; }; class MTPDphotos_photosSlice : public mtpDataImpl { public: MTPDphotos_photosSlice() { } 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 mtpDataImpl { public: MTPDphotos_photo() { } MTPDphotos_photo(const MTPPhoto &_photo, const MTPVector &_users) : vphoto(_photo), vusers(_users) { } MTPPhoto vphoto; MTPVector vusers; }; class MTPDupload_file : public mtpDataImpl { public: MTPDupload_file() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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; } MTPDconfig() { } 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, 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), 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; MTPVector vdisabled_features; }; class MTPDnearestDc : public mtpDataImpl { public: MTPDnearestDc() { } 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 mtpDataImpl { public: MTPDhelp_appUpdate() { } 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 mtpDataImpl { public: MTPDhelp_inviteText() { } MTPDhelp_inviteText(const MTPstring &_message) : vmessage(_message) { } MTPstring vmessage; }; class MTPDencryptedChatEmpty : public mtpDataImpl { public: MTPDencryptedChatEmpty() { } MTPDencryptedChatEmpty(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDencryptedChatWaiting : public mtpDataImpl { public: MTPDencryptedChatWaiting() { } 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 mtpDataImpl { public: MTPDencryptedChatRequested() { } 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 mtpDataImpl { public: MTPDencryptedChat() { } 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 mtpDataImpl { public: MTPDencryptedChatDiscarded() { } MTPDencryptedChatDiscarded(MTPint _id) : vid(_id) { } MTPint vid; }; class MTPDinputEncryptedChat : public mtpDataImpl { public: MTPDinputEncryptedChat() { } 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 mtpDataImpl { public: MTPDencryptedFile() { } 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 mtpDataImpl { public: MTPDinputEncryptedFileUploaded() { } 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 mtpDataImpl { public: MTPDinputEncryptedFile() { } MTPDinputEncryptedFile(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputEncryptedFileBigUploaded : public mtpDataImpl { public: MTPDinputEncryptedFileBigUploaded() { } 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 mtpDataImpl { public: MTPDencryptedMessage() { } 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 mtpDataImpl { public: MTPDencryptedMessageService() { } 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 mtpDataImpl { public: MTPDmessages_dhConfigNotModified() { } MTPDmessages_dhConfigNotModified(const MTPbytes &_random) : vrandom(_random) { } MTPbytes vrandom; }; class MTPDmessages_dhConfig : public mtpDataImpl { public: MTPDmessages_dhConfig() { } 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 mtpDataImpl { public: MTPDmessages_sentEncryptedMessage() { } MTPDmessages_sentEncryptedMessage(MTPint _date) : vdate(_date) { } MTPint vdate; }; class MTPDmessages_sentEncryptedFile : public mtpDataImpl { public: MTPDmessages_sentEncryptedFile() { } MTPDmessages_sentEncryptedFile(MTPint _date, const MTPEncryptedFile &_file) : vdate(_date), vfile(_file) { } MTPint vdate; MTPEncryptedFile vfile; }; class MTPDinputDocument : public mtpDataImpl { public: MTPDinputDocument() { } MTPDinputDocument(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDdocumentEmpty : public mtpDataImpl { public: MTPDdocumentEmpty() { } MTPDdocumentEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDdocument : public mtpDataImpl { public: MTPDdocument() { } 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 mtpDataImpl { public: MTPDhelp_support() { } MTPDhelp_support(const MTPstring &_phone_number, const MTPUser &_user) : vphone_number(_phone_number), vuser(_user) { } MTPstring vphone_number; MTPUser vuser; }; class MTPDnotifyPeer : public mtpDataImpl { public: MTPDnotifyPeer() { } MTPDnotifyPeer(const MTPPeer &_peer) : vpeer(_peer) { } MTPPeer vpeer; }; class MTPDsendMessageUploadVideoAction : public mtpDataImpl { public: MTPDsendMessageUploadVideoAction() { } MTPDsendMessageUploadVideoAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDsendMessageUploadAudioAction : public mtpDataImpl { public: MTPDsendMessageUploadAudioAction() { } MTPDsendMessageUploadAudioAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDsendMessageUploadPhotoAction : public mtpDataImpl { public: MTPDsendMessageUploadPhotoAction() { } MTPDsendMessageUploadPhotoAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDsendMessageUploadDocumentAction : public mtpDataImpl { public: MTPDsendMessageUploadDocumentAction() { } MTPDsendMessageUploadDocumentAction(MTPint _progress) : vprogress(_progress) { } MTPint vprogress; }; class MTPDcontacts_found : public mtpDataImpl { public: MTPDcontacts_found() { } 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 mtpDataImpl { public: MTPDinputPrivacyValueAllowUsers() { } MTPDinputPrivacyValueAllowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDinputPrivacyValueDisallowUsers : public mtpDataImpl { public: MTPDinputPrivacyValueDisallowUsers() { } MTPDinputPrivacyValueDisallowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDprivacyValueAllowUsers : public mtpDataImpl { public: MTPDprivacyValueAllowUsers() { } MTPDprivacyValueAllowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDprivacyValueDisallowUsers : public mtpDataImpl { public: MTPDprivacyValueDisallowUsers() { } MTPDprivacyValueDisallowUsers(const MTPVector &_users) : vusers(_users) { } MTPVector vusers; }; class MTPDaccount_privacyRules : public mtpDataImpl { public: MTPDaccount_privacyRules() { } MTPDaccount_privacyRules(const MTPVector &_rules, const MTPVector &_users) : vrules(_rules), vusers(_users) { } MTPVector vrules; MTPVector vusers; }; class MTPDaccountDaysTTL : public mtpDataImpl { public: MTPDaccountDaysTTL() { } MTPDaccountDaysTTL(MTPint _days) : vdays(_days) { } MTPint vdays; }; class MTPDdocumentAttributeImageSize : public mtpDataImpl { public: MTPDdocumentAttributeImageSize() { } MTPDdocumentAttributeImageSize(MTPint _w, MTPint _h) : vw(_w), vh(_h) { } MTPint vw; MTPint vh; }; class MTPDdocumentAttributeSticker : public mtpDataImpl { public: MTPDdocumentAttributeSticker() { } MTPDdocumentAttributeSticker(const MTPstring &_alt, const MTPInputStickerSet &_stickerset) : valt(_alt), vstickerset(_stickerset) { } MTPstring valt; MTPInputStickerSet vstickerset; }; class MTPDdocumentAttributeVideo : public mtpDataImpl { public: MTPDdocumentAttributeVideo() { } MTPDdocumentAttributeVideo(MTPint _duration, MTPint _w, MTPint _h) : vduration(_duration), vw(_w), vh(_h) { } MTPint vduration; MTPint vw; MTPint vh; }; class MTPDdocumentAttributeAudio : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDdocumentAttributeFilename() { } MTPDdocumentAttributeFilename(const MTPstring &_file_name) : vfile_name(_file_name) { } MTPstring vfile_name; }; class MTPDmessages_stickers : public mtpDataImpl { public: MTPDmessages_stickers() { } MTPDmessages_stickers(const MTPstring &_hash, const MTPVector &_stickers) : vhash(_hash), vstickers(_stickers) { } MTPstring vhash; MTPVector vstickers; }; class MTPDstickerPack : public mtpDataImpl { public: MTPDstickerPack() { } MTPDstickerPack(const MTPstring &_emoticon, const MTPVector &_documents) : vemoticon(_emoticon), vdocuments(_documents) { } MTPstring vemoticon; MTPVector vdocuments; }; class MTPDmessages_allStickers : public mtpDataImpl { public: MTPDmessages_allStickers() { } MTPDmessages_allStickers(MTPint _hash, const MTPVector &_sets) : vhash(_hash), vsets(_sets) { } MTPint vhash; MTPVector vsets; }; class MTPDdisabledFeature : public mtpDataImpl { public: MTPDdisabledFeature() { } MTPDdisabledFeature(const MTPstring &_feature, const MTPstring &_description) : vfeature(_feature), vdescription(_description) { } MTPstring vfeature; MTPstring vdescription; }; class MTPDmessages_affectedMessages : public mtpDataImpl { public: MTPDmessages_affectedMessages() { } MTPDmessages_affectedMessages(MTPint _pts, MTPint _pts_count) : vpts(_pts), vpts_count(_pts_count) { } MTPint vpts; MTPint vpts_count; }; class MTPDwebPageEmpty : public mtpDataImpl { public: MTPDwebPageEmpty() { } MTPDwebPageEmpty(const MTPlong &_id) : vid(_id) { } MTPlong vid; }; class MTPDwebPagePending : public mtpDataImpl { public: MTPDwebPagePending() { } MTPDwebPagePending(const MTPlong &_id, MTPint _date) : vid(_id), vdate(_date) { } MTPlong vid; MTPint vdate; }; class MTPDwebPage : public mtpDataImpl { 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), MAX_FIELD = (1 << 9), }; 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; } MTPDwebPage() { } MTPDwebPage(const MTPflags &_flags, const MTPlong &_id, const MTPstring &_url, const MTPstring &_display_url, 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) : vflags(_flags), vid(_id), vurl(_url), vdisplay_url(_display_url), 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) { } MTPflags vflags; MTPlong vid; MTPstring vurl; MTPstring vdisplay_url; 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; }; class MTPDauthorization : public mtpDataImpl { public: MTPDauthorization() { } 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 mtpDataImpl { public: MTPDaccount_authorizations() { } MTPDaccount_authorizations(const MTPVector &_authorizations) : vauthorizations(_authorizations) { } MTPVector vauthorizations; }; class MTPDaccount_noPassword : public mtpDataImpl { public: MTPDaccount_noPassword() { } 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 mtpDataImpl { public: MTPDaccount_password() { } 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 mtpDataImpl { public: MTPDaccount_passwordSettings() { } MTPDaccount_passwordSettings(const MTPstring &_email) : vemail(_email) { } MTPstring vemail; }; class MTPDaccount_passwordInputSettings : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDauth_passwordRecovery() { } MTPDauth_passwordRecovery(const MTPstring &_email_pattern) : vemail_pattern(_email_pattern) { } MTPstring vemail_pattern; }; class MTPDreceivedNotifyMessage : public mtpDataImpl { public: MTPDreceivedNotifyMessage() { } MTPDreceivedNotifyMessage(MTPint _id, MTPint _flags) : vid(_id), vflags(_flags) { } MTPint vid; MTPint vflags; }; class MTPDchatInviteExported : public mtpDataImpl { public: MTPDchatInviteExported() { } MTPDchatInviteExported(const MTPstring &_link) : vlink(_link) { } MTPstring vlink; }; class MTPDchatInviteAlready : public mtpDataImpl { public: MTPDchatInviteAlready() { } MTPDchatInviteAlready(const MTPChat &_chat) : vchat(_chat) { } MTPChat vchat; }; class MTPDchatInvite : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDinputStickerSetID() { } MTPDinputStickerSetID(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { } MTPlong vid; MTPlong vaccess_hash; }; class MTPDinputStickerSetShortName : public mtpDataImpl { public: MTPDinputStickerSetShortName() { } MTPDinputStickerSetShortName(const MTPstring &_short_name) : vshort_name(_short_name) { } MTPstring vshort_name; }; class MTPDstickerSet : public mtpDataImpl { public: enum class Flag : int32 { f_installed = (1 << 0), f_archived = (1 << 1), f_official = (1 << 2), MAX_FIELD = (1 << 2), }; 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; } MTPDstickerSet() { } 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 mtpDataImpl { public: MTPDmessages_stickerSet() { } 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 mtpDataImpl { public: MTPDbotCommand() { } MTPDbotCommand(const MTPstring &_command, const MTPstring &_description) : vcommand(_command), vdescription(_description) { } MTPstring vcommand; MTPstring vdescription; }; class MTPDbotInfo : public mtpDataImpl { public: MTPDbotInfo() { } 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 mtpDataImpl { public: MTPDkeyboardButton() { } MTPDkeyboardButton(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonUrl : public mtpDataImpl { public: MTPDkeyboardButtonUrl() { } MTPDkeyboardButtonUrl(const MTPstring &_text, const MTPstring &_url) : vtext(_text), vurl(_url) { } MTPstring vtext; MTPstring vurl; }; class MTPDkeyboardButtonCallback : public mtpDataImpl { public: MTPDkeyboardButtonCallback() { } MTPDkeyboardButtonCallback(const MTPstring &_text, const MTPbytes &_data) : vtext(_text), vdata(_data) { } MTPstring vtext; MTPbytes vdata; }; class MTPDkeyboardButtonRequestPhone : public mtpDataImpl { public: MTPDkeyboardButtonRequestPhone() { } MTPDkeyboardButtonRequestPhone(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonRequestGeoLocation : public mtpDataImpl { public: MTPDkeyboardButtonRequestGeoLocation() { } MTPDkeyboardButtonRequestGeoLocation(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDkeyboardButtonSwitchInline : public mtpDataImpl { 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() { } MTPDkeyboardButtonSwitchInline(const MTPflags &_flags, const MTPstring &_text, const MTPstring &_query) : vflags(_flags), vtext(_text), vquery(_query) { } MTPflags vflags; MTPstring vtext; MTPstring vquery; }; class MTPDkeyboardButtonRow : public mtpDataImpl { public: MTPDkeyboardButtonRow() { } MTPDkeyboardButtonRow(const MTPVector &_buttons) : vbuttons(_buttons) { } MTPVector vbuttons; }; class MTPDreplyKeyboardHide : public mtpDataImpl { 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() { } MTPDreplyKeyboardHide(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDreplyKeyboardForceReply : public mtpDataImpl { 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() { } MTPDreplyKeyboardForceReply(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDreplyKeyboardMarkup : public mtpDataImpl { 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() { } MTPDreplyKeyboardMarkup(const MTPflags &_flags, const MTPVector &_rows) : vflags(_flags), vrows(_rows) { } MTPflags vflags; MTPVector vrows; }; class MTPDreplyInlineMarkup : public mtpDataImpl { public: MTPDreplyInlineMarkup() { } MTPDreplyInlineMarkup(const MTPVector &_rows) : vrows(_rows) { } MTPVector vrows; }; class MTPDhelp_appChangelog : public mtpDataImpl { public: MTPDhelp_appChangelog() { } MTPDhelp_appChangelog(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDmessageEntityUnknown : public mtpDataImpl { public: MTPDmessageEntityUnknown() { } MTPDmessageEntityUnknown(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityMention : public mtpDataImpl { public: MTPDmessageEntityMention() { } MTPDmessageEntityMention(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityHashtag : public mtpDataImpl { public: MTPDmessageEntityHashtag() { } MTPDmessageEntityHashtag(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityBotCommand : public mtpDataImpl { public: MTPDmessageEntityBotCommand() { } MTPDmessageEntityBotCommand(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityUrl : public mtpDataImpl { public: MTPDmessageEntityUrl() { } MTPDmessageEntityUrl(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityEmail : public mtpDataImpl { public: MTPDmessageEntityEmail() { } MTPDmessageEntityEmail(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityBold : public mtpDataImpl { public: MTPDmessageEntityBold() { } MTPDmessageEntityBold(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityItalic : public mtpDataImpl { public: MTPDmessageEntityItalic() { } MTPDmessageEntityItalic(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityCode : public mtpDataImpl { public: MTPDmessageEntityCode() { } MTPDmessageEntityCode(MTPint _offset, MTPint _length) : voffset(_offset), vlength(_length) { } MTPint voffset; MTPint vlength; }; class MTPDmessageEntityPre : public mtpDataImpl { public: MTPDmessageEntityPre() { } MTPDmessageEntityPre(MTPint _offset, MTPint _length, const MTPstring &_language) : voffset(_offset), vlength(_length), vlanguage(_language) { } MTPint voffset; MTPint vlength; MTPstring vlanguage; }; class MTPDmessageEntityTextUrl : public mtpDataImpl { public: MTPDmessageEntityTextUrl() { } MTPDmessageEntityTextUrl(MTPint _offset, MTPint _length, const MTPstring &_url) : voffset(_offset), vlength(_length), vurl(_url) { } MTPint voffset; MTPint vlength; MTPstring vurl; }; class MTPDmessageEntityMentionName : public mtpDataImpl { public: MTPDmessageEntityMentionName() { } 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 mtpDataImpl { public: MTPDinputMessageEntityMentionName() { } 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 mtpDataImpl { public: MTPDinputChannel() { } 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 mtpDataImpl { public: MTPDcontacts_resolvedPeer() { } 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 mtpDataImpl { public: MTPDmessageRange() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } MTPDchannelMessagesFilter(const MTPflags &_flags, const MTPVector &_ranges) : vflags(_flags), vranges(_ranges) { } MTPflags vflags; MTPVector vranges; }; class MTPDchannelParticipant : public mtpDataImpl { public: MTPDchannelParticipant() { } MTPDchannelParticipant(MTPint _user_id, MTPint _date) : vuser_id(_user_id), vdate(_date) { } MTPint vuser_id; MTPint vdate; }; class MTPDchannelParticipantSelf : public mtpDataImpl { public: MTPDchannelParticipantSelf() { } 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 mtpDataImpl { public: MTPDchannelParticipantModerator() { } 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 mtpDataImpl { public: MTPDchannelParticipantEditor() { } 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 mtpDataImpl { public: MTPDchannelParticipantKicked() { } 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 mtpDataImpl { public: MTPDchannelParticipantCreator() { } MTPDchannelParticipantCreator(MTPint _user_id) : vuser_id(_user_id) { } MTPint vuser_id; }; class MTPDchannels_channelParticipants : public mtpDataImpl { public: MTPDchannels_channelParticipants() { } 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 mtpDataImpl { public: MTPDchannels_channelParticipant() { } MTPDchannels_channelParticipant(const MTPChannelParticipant &_participant, const MTPVector &_users) : vparticipant(_participant), vusers(_users) { } MTPChannelParticipant vparticipant; MTPVector vusers; }; class MTPDhelp_termsOfService : public mtpDataImpl { public: MTPDhelp_termsOfService() { } MTPDhelp_termsOfService(const MTPstring &_text) : vtext(_text) { } MTPstring vtext; }; class MTPDfoundGif : public mtpDataImpl { public: MTPDfoundGif() { } 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 mtpDataImpl { public: MTPDfoundGifCached() { } 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 mtpDataImpl { public: MTPDmessages_foundGifs() { } MTPDmessages_foundGifs(MTPint _next_offset, const MTPVector &_results) : vnext_offset(_next_offset), vresults(_results) { } MTPint vnext_offset; MTPVector vresults; }; class MTPDmessages_savedGifs : public mtpDataImpl { public: MTPDmessages_savedGifs() { } MTPDmessages_savedGifs(MTPint _hash, const MTPVector &_gifs) : vhash(_hash), vgifs(_gifs) { } MTPint vhash; MTPVector vgifs; }; class MTPDinputBotInlineMessageMediaAuto : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 MTPDinputBotInlineResult : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDinputBotInlineResultPhoto() { } 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 mtpDataImpl { 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() { } 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 MTPDbotInlineMessageMediaAuto : public mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { 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() { } MTPDmessages_botResults(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_next_offset, const MTPInlineBotSwitchPM &_switch_pm, const MTPVector &_results) : vflags(_flags), vquery_id(_query_id), vnext_offset(_next_offset), vswitch_pm(_switch_pm), vresults(_results) { } MTPflags vflags; MTPlong vquery_id; MTPstring vnext_offset; MTPInlineBotSwitchPM vswitch_pm; MTPVector vresults; }; class MTPDexportedMessageLink : public mtpDataImpl { public: MTPDexportedMessageLink() { } MTPDexportedMessageLink(const MTPstring &_link) : vlink(_link) { } MTPstring vlink; }; class MTPDmessageFwdHeader : public mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDauth_sentCodeTypeApp() { } MTPDauth_sentCodeTypeApp(MTPint _length) : vlength(_length) { } MTPint vlength; }; class MTPDauth_sentCodeTypeSms : public mtpDataImpl { public: MTPDauth_sentCodeTypeSms() { } MTPDauth_sentCodeTypeSms(MTPint _length) : vlength(_length) { } MTPint vlength; }; class MTPDauth_sentCodeTypeCall : public mtpDataImpl { public: MTPDauth_sentCodeTypeCall() { } MTPDauth_sentCodeTypeCall(MTPint _length) : vlength(_length) { } MTPint vlength; }; class MTPDauth_sentCodeTypeFlashCall : public mtpDataImpl { public: MTPDauth_sentCodeTypeFlashCall() { } MTPDauth_sentCodeTypeFlashCall(const MTPstring &_pattern) : vpattern(_pattern) { } MTPstring vpattern; }; class MTPDmessages_botCallbackAnswer : public mtpDataImpl { 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() { } MTPDmessages_botCallbackAnswer(const MTPflags &_flags, const MTPstring &_message, const MTPstring &_url) : vflags(_flags), vmessage(_message), vurl(_url) { } MTPflags vflags; MTPstring vmessage; MTPstring vurl; }; class MTPDmessages_messageEditData : public mtpDataImpl { 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() { } MTPDmessages_messageEditData(const MTPflags &_flags) : vflags(_flags) { } MTPflags vflags; }; class MTPDinputBotInlineMessageID : public mtpDataImpl { public: MTPDinputBotInlineMessageID() { } 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 mtpDataImpl { public: MTPDinlineBotSwitchPM() { } MTPDinlineBotSwitchPM(const MTPstring &_text, const MTPstring &_start_param) : vtext(_text), vstart_param(_start_param) { } MTPstring vtext; MTPstring vstart_param; }; class MTPDmessages_peerDialogs : public mtpDataImpl { public: MTPDmessages_peerDialogs() { } 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 mtpDataImpl { public: MTPDtopPeer() { } MTPDtopPeer(const MTPPeer &_peer, const MTPdouble &_rating) : vpeer(_peer), vrating(_rating) { } MTPPeer vpeer; MTPdouble vrating; }; class MTPDtopPeerCategoryPeers : public mtpDataImpl { public: MTPDtopPeerCategoryPeers() { } 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 mtpDataImpl { public: MTPDcontacts_topPeers() { } 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 mtpDataImpl { 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() { } 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 mtpDataImpl { public: MTPDmessages_featuredStickers() { } 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 mtpDataImpl { public: MTPDmessages_recentStickers() { } MTPDmessages_recentStickers(MTPint _hash, const MTPVector &_stickers) : vhash(_hash), vstickers(_stickers) { } MTPint vhash; MTPVector vstickers; }; class MTPDmessages_archivedStickers : public mtpDataImpl { public: MTPDmessages_archivedStickers() { } MTPDmessages_archivedStickers(MTPint _count, const MTPVector &_sets) : vcount(_count), vsets(_sets) { } MTPint vcount; MTPVector vsets; }; class MTPDmessages_stickerSetInstallResultArchive : public mtpDataImpl { public: MTPDmessages_stickerSetInstallResultArchive() { } MTPDmessages_stickerSetInstallResultArchive(const MTPVector &_sets) : vsets(_sets) { } MTPVector vsets; }; class MTPDstickerSetCovered : public mtpDataImpl { public: MTPDstickerSetCovered() { } MTPDstickerSetCovered(const MTPStickerSet &_set, const MTPDocument &_cover) : vset(_set), vcover(_cover) { } MTPStickerSet vset; MTPDocument vcover; }; // RPC methods class MTPreq_pq { // RPC method 'req_pq' public: MTPint128 vnonce; MTPreq_pq() { } MTPreq_pq(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_req_pq) { read(from, end, cons); } 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() { } MTPReq_pq(const MTPreq_pq &v) : MTPBoxed(v) { } MTPReq_pq(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPreq_DH_params(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_req_DH_params) { read(from, end, cons); } 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() { } MTPReq_DH_params(const MTPreq_DH_params &v) : MTPBoxed(v) { } MTPReq_DH_params(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPset_client_DH_params(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_set_client_DH_params) { read(from, end, cons); } 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() { } MTPSet_client_DH_params(const MTPset_client_DH_params &v) : MTPBoxed(v) { } MTPSet_client_DH_params(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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 MTPrpc_drop_answer { // RPC method 'rpc_drop_answer' public: MTPlong vreq_msg_id; MTPrpc_drop_answer() { } MTPrpc_drop_answer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_rpc_drop_answer) { read(from, end, cons); } 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() { } MTPRpc_drop_answer(const MTPrpc_drop_answer &v) : MTPBoxed(v) { } MTPRpc_drop_answer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPget_future_salts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_get_future_salts) { read(from, end, cons); } 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() { } MTPGet_future_salts(const MTPget_future_salts &v) : MTPBoxed(v) { } MTPGet_future_salts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPGet_future_salts(MTPint _num) : MTPBoxed(MTPget_future_salts(_num)) { } }; class MTPping { // RPC method 'ping' public: MTPlong vping_id; MTPping() { } MTPping(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_ping) { read(from, end, cons); } 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() { } MTPPing(const MTPping &v) : MTPBoxed(v) { } MTPPing(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPping_delay_disconnect(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_ping_delay_disconnect) { read(from, end, cons); } 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() { } MTPPing_delay_disconnect(const MTPping_delay_disconnect &v) : MTPBoxed(v) { } MTPPing_delay_disconnect(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPdestroy_session(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_destroy_session) { read(from, end, cons); } 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() { } MTPDestroy_session(const MTPdestroy_session &v) : MTPBoxed(v) { } MTPDestroy_session(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPcontest_saveDeveloperInfo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contest_saveDeveloperInfo) { read(from, end, cons); } 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() { } MTPcontest_SaveDeveloperInfo(const MTPcontest_saveDeveloperInfo &v) : MTPBoxed(v) { } MTPcontest_SaveDeveloperInfo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPinvokeAfterMsg(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeAfterMsg) { read(from, end, cons); } 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() { } 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() { } MTPinvokeAfterMsgs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeAfterMsgs) { read(from, end, cons); } 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() { } 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() { } MTPinitConnection(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_initConnection) { read(from, end, cons); } 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() { } 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() { } MTPinvokeWithLayer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeWithLayer) { read(from, end, cons); } 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() { } 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() { } MTPinvokeWithoutUpdates(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_invokeWithoutUpdates) { read(from, end, cons); } 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() { } 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() { } MTPauth_checkPhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_checkPhone) { read(from, end, cons); } 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() { } MTPauth_CheckPhone(const MTPauth_checkPhone &v) : MTPBoxed(v) { } MTPauth_CheckPhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_sendCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendCode) { read(from, end, cons); } 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() { } MTPauth_SendCode(const MTPauth_sendCode &v) : MTPBoxed(v) { } MTPauth_SendCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_signUp(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_signUp) { read(from, end, cons); } 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() { } MTPauth_SignUp(const MTPauth_signUp &v) : MTPBoxed(v) { } MTPauth_SignUp(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_signIn(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_signIn) { read(from, end, cons); } 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() { } MTPauth_SignIn(const MTPauth_signIn &v) : MTPBoxed(v) { } MTPauth_SignIn(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_logOut(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_logOut) { read(from, end, cons); } 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() { } MTPauth_LogOut(const MTPauth_logOut &v) : MTPBoxed(v) { } MTPauth_LogOut(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPauth_resetAuthorizations { // RPC method 'auth.resetAuthorizations' public: MTPauth_resetAuthorizations() { } MTPauth_resetAuthorizations(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_resetAuthorizations) { read(from, end, cons); } 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() { } MTPauth_ResetAuthorizations(const MTPauth_resetAuthorizations &v) : MTPBoxed(v) { } MTPauth_ResetAuthorizations(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPauth_sendInvites { // RPC method 'auth.sendInvites' public: MTPVector vphone_numbers; MTPstring vmessage; MTPauth_sendInvites() { } MTPauth_sendInvites(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendInvites) { read(from, end, cons); } 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() { } MTPauth_SendInvites(const MTPauth_sendInvites &v) : MTPBoxed(v) { } MTPauth_SendInvites(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_exportAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_exportAuthorization) { read(from, end, cons); } 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() { } MTPauth_ExportAuthorization(const MTPauth_exportAuthorization &v) : MTPBoxed(v) { } MTPauth_ExportAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPauth_ExportAuthorization(MTPint _dc_id) : MTPBoxed(MTPauth_exportAuthorization(_dc_id)) { } }; class MTPauth_importAuthorization { // RPC method 'auth.importAuthorization' public: MTPint vid; MTPbytes vbytes; MTPauth_importAuthorization() { } MTPauth_importAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_importAuthorization) { read(from, end, cons); } 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() { } MTPauth_ImportAuthorization(const MTPauth_importAuthorization &v) : MTPBoxed(v) { } MTPauth_ImportAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_bindTempAuthKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_bindTempAuthKey) { read(from, end, cons); } 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() { } MTPauth_BindTempAuthKey(const MTPauth_bindTempAuthKey &v) : MTPBoxed(v) { } MTPauth_BindTempAuthKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_importBotAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_importBotAuthorization) { read(from, end, cons); } 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() { } MTPauth_ImportBotAuthorization(const MTPauth_importBotAuthorization &v) : MTPBoxed(v) { } MTPauth_ImportBotAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_checkPassword(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_checkPassword) { read(from, end, cons); } 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() { } MTPauth_CheckPassword(const MTPauth_checkPassword &v) : MTPBoxed(v) { } MTPauth_CheckPassword(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPauth_CheckPassword(const MTPbytes &_password_hash) : MTPBoxed(MTPauth_checkPassword(_password_hash)) { } }; class MTPauth_requestPasswordRecovery { // RPC method 'auth.requestPasswordRecovery' public: MTPauth_requestPasswordRecovery() { } MTPauth_requestPasswordRecovery(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_requestPasswordRecovery) { read(from, end, cons); } 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() { } MTPauth_RequestPasswordRecovery(const MTPauth_requestPasswordRecovery &v) : MTPBoxed(v) { } MTPauth_RequestPasswordRecovery(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPauth_recoverPassword { // RPC method 'auth.recoverPassword' public: MTPstring vcode; MTPauth_recoverPassword() { } MTPauth_recoverPassword(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_recoverPassword) { read(from, end, cons); } 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() { } MTPauth_RecoverPassword(const MTPauth_recoverPassword &v) : MTPBoxed(v) { } MTPauth_RecoverPassword(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_resendCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_resendCode) { read(from, end, cons); } 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() { } MTPauth_ResendCode(const MTPauth_resendCode &v) : MTPBoxed(v) { } MTPauth_ResendCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPauth_cancelCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_cancelCode) { read(from, end, cons); } 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() { } MTPauth_CancelCode(const MTPauth_cancelCode &v) : MTPBoxed(v) { } MTPauth_CancelCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPauth_CancelCode(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : MTPBoxed(MTPauth_cancelCode(_phone_number, _phone_code_hash)) { } }; class MTPaccount_registerDevice { // RPC method 'account.registerDevice' public: MTPint vtoken_type; MTPstring vtoken; MTPaccount_registerDevice() { } MTPaccount_registerDevice(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_registerDevice) { read(from, end, cons); } 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() { } MTPaccount_RegisterDevice(const MTPaccount_registerDevice &v) : MTPBoxed(v) { } MTPaccount_RegisterDevice(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_unregisterDevice(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_unregisterDevice) { read(from, end, cons); } 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() { } MTPaccount_UnregisterDevice(const MTPaccount_unregisterDevice &v) : MTPBoxed(v) { } MTPaccount_UnregisterDevice(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_updateNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateNotifySettings) { read(from, end, cons); } 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() { } MTPaccount_UpdateNotifySettings(const MTPaccount_updateNotifySettings &v) : MTPBoxed(v) { } MTPaccount_UpdateNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_getNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getNotifySettings) { read(from, end, cons); } 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() { } MTPaccount_GetNotifySettings(const MTPaccount_getNotifySettings &v) : MTPBoxed(v) { } MTPaccount_GetNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_GetNotifySettings(const MTPInputNotifyPeer &_peer) : MTPBoxed(MTPaccount_getNotifySettings(_peer)) { } }; class MTPaccount_resetNotifySettings { // RPC method 'account.resetNotifySettings' public: MTPaccount_resetNotifySettings() { } MTPaccount_resetNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_resetNotifySettings) { read(from, end, cons); } 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() { } MTPaccount_ResetNotifySettings(const MTPaccount_resetNotifySettings &v) : MTPBoxed(v) { } MTPaccount_ResetNotifySettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; 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() { } MTPaccount_updateProfile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateProfile) { read(from, end, cons); } 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() { } MTPaccount_UpdateProfile(const MTPaccount_updateProfile &v) : MTPBoxed(v) { } MTPaccount_UpdateProfile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_updateStatus(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateStatus) { read(from, end, cons); } 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() { } MTPaccount_UpdateStatus(const MTPaccount_updateStatus &v) : MTPBoxed(v) { } MTPaccount_UpdateStatus(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_UpdateStatus(MTPBool _offline) : MTPBoxed(MTPaccount_updateStatus(_offline)) { } }; class MTPaccount_getWallPapers { // RPC method 'account.getWallPapers' public: MTPaccount_getWallPapers() { } MTPaccount_getWallPapers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getWallPapers) { read(from, end, cons); } 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() { } MTPaccount_GetWallPapers(const MTPaccount_getWallPapers &v) : MTPBoxed(v) { } MTPaccount_GetWallPapers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPaccount_reportPeer { // RPC method 'account.reportPeer' public: MTPInputPeer vpeer; MTPReportReason vreason; MTPaccount_reportPeer() { } MTPaccount_reportPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_reportPeer) { read(from, end, cons); } 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() { } MTPaccount_ReportPeer(const MTPaccount_reportPeer &v) : MTPBoxed(v) { } MTPaccount_ReportPeer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_checkUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_checkUsername) { read(from, end, cons); } 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() { } MTPaccount_CheckUsername(const MTPaccount_checkUsername &v) : MTPBoxed(v) { } MTPaccount_CheckUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_CheckUsername(const MTPstring &_username) : MTPBoxed(MTPaccount_checkUsername(_username)) { } }; class MTPaccount_updateUsername { // RPC method 'account.updateUsername' public: MTPstring vusername; MTPaccount_updateUsername() { } MTPaccount_updateUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateUsername) { read(from, end, cons); } 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() { } MTPaccount_UpdateUsername(const MTPaccount_updateUsername &v) : MTPBoxed(v) { } MTPaccount_UpdateUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_UpdateUsername(const MTPstring &_username) : MTPBoxed(MTPaccount_updateUsername(_username)) { } }; class MTPaccount_getPrivacy { // RPC method 'account.getPrivacy' public: MTPInputPrivacyKey vkey; MTPaccount_getPrivacy() { } MTPaccount_getPrivacy(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getPrivacy) { read(from, end, cons); } 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() { } MTPaccount_GetPrivacy(const MTPaccount_getPrivacy &v) : MTPBoxed(v) { } MTPaccount_GetPrivacy(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_GetPrivacy(const MTPInputPrivacyKey &_key) : MTPBoxed(MTPaccount_getPrivacy(_key)) { } }; class MTPaccount_setPrivacy { // RPC method 'account.setPrivacy' public: MTPInputPrivacyKey vkey; MTPVector vrules; MTPaccount_setPrivacy() { } MTPaccount_setPrivacy(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_setPrivacy) { read(from, end, cons); } 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() { } MTPaccount_SetPrivacy(const MTPaccount_setPrivacy &v) : MTPBoxed(v) { } MTPaccount_SetPrivacy(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_deleteAccount(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_deleteAccount) { read(from, end, cons); } 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() { } MTPaccount_DeleteAccount(const MTPaccount_deleteAccount &v) : MTPBoxed(v) { } MTPaccount_DeleteAccount(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_DeleteAccount(const MTPstring &_reason) : MTPBoxed(MTPaccount_deleteAccount(_reason)) { } }; class MTPaccount_getAccountTTL { // RPC method 'account.getAccountTTL' public: MTPaccount_getAccountTTL() { } MTPaccount_getAccountTTL(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getAccountTTL) { read(from, end, cons); } 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() { } MTPaccount_GetAccountTTL(const MTPaccount_getAccountTTL &v) : MTPBoxed(v) { } MTPaccount_GetAccountTTL(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPaccount_setAccountTTL { // RPC method 'account.setAccountTTL' public: MTPAccountDaysTTL vttl; MTPaccount_setAccountTTL() { } MTPaccount_setAccountTTL(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_setAccountTTL) { read(from, end, cons); } 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() { } MTPaccount_SetAccountTTL(const MTPaccount_setAccountTTL &v) : MTPBoxed(v) { } MTPaccount_SetAccountTTL(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_sendChangePhoneCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendChangePhoneCode) { read(from, end, cons); } 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() { } MTPaccount_SendChangePhoneCode(const MTPaccount_sendChangePhoneCode &v) : MTPBoxed(v) { } MTPaccount_SendChangePhoneCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_changePhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_changePhone) { read(from, end, cons); } 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() { } MTPaccount_ChangePhone(const MTPaccount_changePhone &v) : MTPBoxed(v) { } MTPaccount_ChangePhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_updateDeviceLocked(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updateDeviceLocked) { read(from, end, cons); } 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() { } MTPaccount_UpdateDeviceLocked(const MTPaccount_updateDeviceLocked &v) : MTPBoxed(v) { } MTPaccount_UpdateDeviceLocked(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_UpdateDeviceLocked(MTPint _period) : MTPBoxed(MTPaccount_updateDeviceLocked(_period)) { } }; class MTPaccount_getAuthorizations { // RPC method 'account.getAuthorizations' public: MTPaccount_getAuthorizations() { } MTPaccount_getAuthorizations(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getAuthorizations) { read(from, end, cons); } 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() { } MTPaccount_GetAuthorizations(const MTPaccount_getAuthorizations &v) : MTPBoxed(v) { } MTPaccount_GetAuthorizations(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPaccount_resetAuthorization { // RPC method 'account.resetAuthorization' public: MTPlong vhash; MTPaccount_resetAuthorization() { } MTPaccount_resetAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_resetAuthorization) { read(from, end, cons); } 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() { } MTPaccount_ResetAuthorization(const MTPaccount_resetAuthorization &v) : MTPBoxed(v) { } MTPaccount_ResetAuthorization(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPaccount_ResetAuthorization(const MTPlong &_hash) : MTPBoxed(MTPaccount_resetAuthorization(_hash)) { } }; class MTPaccount_getPassword { // RPC method 'account.getPassword' public: MTPaccount_getPassword() { } MTPaccount_getPassword(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getPassword) { read(from, end, cons); } 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() { } MTPaccount_GetPassword(const MTPaccount_getPassword &v) : MTPBoxed(v) { } MTPaccount_GetPassword(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPaccount_getPasswordSettings { // RPC method 'account.getPasswordSettings' public: MTPbytes vcurrent_password_hash; MTPaccount_getPasswordSettings() { } MTPaccount_getPasswordSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_getPasswordSettings) { read(from, end, cons); } 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() { } MTPaccount_GetPasswordSettings(const MTPaccount_getPasswordSettings &v) : MTPBoxed(v) { } MTPaccount_GetPasswordSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_updatePasswordSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_updatePasswordSettings) { read(from, end, cons); } 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() { } MTPaccount_UpdatePasswordSettings(const MTPaccount_updatePasswordSettings &v) : MTPBoxed(v) { } MTPaccount_UpdatePasswordSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_sendConfirmPhoneCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendConfirmPhoneCode) { read(from, end, cons); } 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() { } MTPaccount_SendConfirmPhoneCode(const MTPaccount_sendConfirmPhoneCode &v) : MTPBoxed(v) { } MTPaccount_SendConfirmPhoneCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPaccount_confirmPhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_confirmPhone) { read(from, end, cons); } 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() { } MTPaccount_ConfirmPhone(const MTPaccount_confirmPhone &v) : MTPBoxed(v) { } MTPaccount_ConfirmPhone(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPusers_getUsers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_users_getUsers) { read(from, end, cons); } 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() { } MTPusers_GetUsers(const MTPusers_getUsers &v) : MTPBoxed(v) { } MTPusers_GetUsers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPusers_GetUsers(const MTPVector &_id) : MTPBoxed(MTPusers_getUsers(_id)) { } }; class MTPusers_getFullUser { // RPC method 'users.getFullUser' public: MTPInputUser vid; MTPusers_getFullUser() { } MTPusers_getFullUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_users_getFullUser) { read(from, end, cons); } 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() { } MTPusers_GetFullUser(const MTPusers_getFullUser &v) : MTPBoxed(v) { } MTPusers_GetFullUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPusers_GetFullUser(const MTPInputUser &_id) : MTPBoxed(MTPusers_getFullUser(_id)) { } }; class MTPcontacts_getStatuses { // RPC method 'contacts.getStatuses' public: MTPcontacts_getStatuses() { } MTPcontacts_getStatuses(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getStatuses) { read(from, end, cons); } 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() { } MTPcontacts_GetStatuses(const MTPcontacts_getStatuses &v) : MTPBoxed(v) { } MTPcontacts_GetStatuses(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPcontacts_getContacts { // RPC method 'contacts.getContacts' public: MTPstring vhash; MTPcontacts_getContacts() { } MTPcontacts_getContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getContacts) { read(from, end, cons); } 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() { } MTPcontacts_GetContacts(const MTPcontacts_getContacts &v) : MTPBoxed(v) { } MTPcontacts_GetContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_GetContacts(const MTPstring &_hash) : MTPBoxed(MTPcontacts_getContacts(_hash)) { } }; class MTPcontacts_importContacts { // RPC method 'contacts.importContacts' public: MTPVector vcontacts; MTPBool vreplace; MTPcontacts_importContacts() { } MTPcontacts_importContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_importContacts) { read(from, end, cons); } 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() { } MTPcontacts_ImportContacts(const MTPcontacts_importContacts &v) : MTPBoxed(v) { } MTPcontacts_ImportContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_ImportContacts(const MTPVector &_contacts, MTPBool _replace) : MTPBoxed(MTPcontacts_importContacts(_contacts, _replace)) { } }; class MTPcontacts_deleteContact { // RPC method 'contacts.deleteContact' public: MTPInputUser vid; MTPcontacts_deleteContact() { } MTPcontacts_deleteContact(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_deleteContact) { read(from, end, cons); } 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() { } MTPcontacts_DeleteContact(const MTPcontacts_deleteContact &v) : MTPBoxed(v) { } MTPcontacts_DeleteContact(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_DeleteContact(const MTPInputUser &_id) : MTPBoxed(MTPcontacts_deleteContact(_id)) { } }; class MTPcontacts_deleteContacts { // RPC method 'contacts.deleteContacts' public: MTPVector vid; MTPcontacts_deleteContacts() { } MTPcontacts_deleteContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_deleteContacts) { read(from, end, cons); } 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() { } MTPcontacts_DeleteContacts(const MTPcontacts_deleteContacts &v) : MTPBoxed(v) { } MTPcontacts_DeleteContacts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_DeleteContacts(const MTPVector &_id) : MTPBoxed(MTPcontacts_deleteContacts(_id)) { } }; class MTPcontacts_block { // RPC method 'contacts.block' public: MTPInputUser vid; MTPcontacts_block() { } MTPcontacts_block(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_block) { read(from, end, cons); } 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() { } MTPcontacts_Block(const MTPcontacts_block &v) : MTPBoxed(v) { } MTPcontacts_Block(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_Block(const MTPInputUser &_id) : MTPBoxed(MTPcontacts_block(_id)) { } }; class MTPcontacts_unblock { // RPC method 'contacts.unblock' public: MTPInputUser vid; MTPcontacts_unblock() { } MTPcontacts_unblock(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_unblock) { read(from, end, cons); } 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() { } MTPcontacts_Unblock(const MTPcontacts_unblock &v) : MTPBoxed(v) { } MTPcontacts_Unblock(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_Unblock(const MTPInputUser &_id) : MTPBoxed(MTPcontacts_unblock(_id)) { } }; class MTPcontacts_getBlocked { // RPC method 'contacts.getBlocked' public: MTPint voffset; MTPint vlimit; MTPcontacts_getBlocked() { } MTPcontacts_getBlocked(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getBlocked) { read(from, end, cons); } 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() { } MTPcontacts_GetBlocked(const MTPcontacts_getBlocked &v) : MTPBoxed(v) { } MTPcontacts_GetBlocked(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_GetBlocked(MTPint _offset, MTPint _limit) : MTPBoxed(MTPcontacts_getBlocked(_offset, _limit)) { } }; class MTPcontacts_exportCard { // RPC method 'contacts.exportCard' public: MTPcontacts_exportCard() { } MTPcontacts_exportCard(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_exportCard) { read(from, end, cons); } 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() { } MTPcontacts_ExportCard(const MTPcontacts_exportCard &v) : MTPBoxed(v) { } MTPcontacts_ExportCard(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPcontacts_importCard { // RPC method 'contacts.importCard' public: MTPVector vexport_card; MTPcontacts_importCard() { } MTPcontacts_importCard(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_importCard) { read(from, end, cons); } 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() { } MTPcontacts_ImportCard(const MTPcontacts_importCard &v) : MTPBoxed(v) { } MTPcontacts_ImportCard(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPcontacts_search(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_search) { read(from, end, cons); } 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() { } MTPcontacts_Search(const MTPcontacts_search &v) : MTPBoxed(v) { } MTPcontacts_Search(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPcontacts_Search(const MTPstring &_q, MTPint _limit) : MTPBoxed(MTPcontacts_search(_q, _limit)) { } }; class MTPcontacts_resolveUsername { // RPC method 'contacts.resolveUsername' public: MTPstring vusername; MTPcontacts_resolveUsername() { } MTPcontacts_resolveUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_resolveUsername) { read(from, end, cons); } 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() { } MTPcontacts_ResolveUsername(const MTPcontacts_resolveUsername &v) : MTPBoxed(v) { } MTPcontacts_ResolveUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPcontacts_getTopPeers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getTopPeers) { read(from, end, cons); } 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() { } MTPcontacts_GetTopPeers(const MTPcontacts_getTopPeers &v) : MTPBoxed(v) { } MTPcontacts_GetTopPeers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPcontacts_resetTopPeerRating(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_resetTopPeerRating) { read(from, end, cons); } 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() { } MTPcontacts_ResetTopPeerRating(const MTPcontacts_resetTopPeerRating &v) : MTPBoxed(v) { } MTPcontacts_ResetTopPeerRating(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_getMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMessages) { read(from, end, cons); } 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() { } MTPmessages_GetMessages(const MTPmessages_getMessages &v) : MTPBoxed(v) { } MTPmessages_GetMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetMessages(const MTPVector &_id) : MTPBoxed(MTPmessages_getMessages(_id)) { } }; class MTPmessages_getDialogs { // RPC method 'messages.getDialogs' public: MTPint voffset_date; MTPint voffset_id; MTPInputPeer voffset_peer; MTPint vlimit; MTPmessages_getDialogs() { } MTPmessages_getDialogs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getDialogs) { read(from, end, cons); } MTPmessages_getDialogs(MTPint _offset_date, MTPint _offset_id, const MTPInputPeer &_offset_peer, MTPint _limit) : voffset_date(_offset_date), voffset_id(_offset_id), voffset_peer(_offset_peer), vlimit(_limit) { } uint32 innerLength() const { return 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) { voffset_date.read(from, end); voffset_id.read(from, end); voffset_peer.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { voffset_date.write(to); voffset_id.write(to); voffset_peer.write(to); vlimit.write(to); } typedef MTPmessages_Dialogs ResponseType; }; class MTPmessages_GetDialogs : public MTPBoxed { public: MTPmessages_GetDialogs() { } MTPmessages_GetDialogs(const MTPmessages_getDialogs &v) : MTPBoxed(v) { } MTPmessages_GetDialogs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetDialogs(MTPint _offset_date, MTPint _offset_id, const MTPInputPeer &_offset_peer, MTPint _limit) : MTPBoxed(MTPmessages_getDialogs(_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() { } MTPmessages_getHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getHistory) { read(from, end, cons); } 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() { } MTPmessages_GetHistory(const MTPmessages_getHistory &v) : MTPBoxed(v) { } MTPmessages_GetHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_search(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_search) { read(from, end, cons); } 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() { } MTPmessages_Search(const MTPmessages_search &v) : MTPBoxed(v) { } MTPmessages_Search(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_readHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readHistory) { read(from, end, cons); } 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() { } MTPmessages_ReadHistory(const MTPmessages_readHistory &v) : MTPBoxed(v) { } MTPmessages_ReadHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_deleteHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteHistory) { read(from, end, cons); } 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() { } MTPmessages_DeleteHistory(const MTPmessages_deleteHistory &v) : MTPBoxed(v) { } MTPmessages_DeleteHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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: MTPVector vid; MTPmessages_deleteMessages() { } MTPmessages_deleteMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteMessages) { read(from, end, cons); } MTPmessages_deleteMessages(const MTPVector &_id) : vid(_id) { } uint32 innerLength() const { return vid.innerLength(); } mtpTypeId type() const { return mtpc_messages_deleteMessages; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteMessages) { vid.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); } typedef MTPmessages_AffectedMessages ResponseType; }; class MTPmessages_DeleteMessages : public MTPBoxed { public: MTPmessages_DeleteMessages() { } MTPmessages_DeleteMessages(const MTPmessages_deleteMessages &v) : MTPBoxed(v) { } MTPmessages_DeleteMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_DeleteMessages(const MTPVector &_id) : MTPBoxed(MTPmessages_deleteMessages(_id)) { } }; class MTPmessages_receivedMessages { // RPC method 'messages.receivedMessages' public: MTPint vmax_id; MTPmessages_receivedMessages() { } MTPmessages_receivedMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_receivedMessages) { read(from, end, cons); } 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() { } MTPmessages_ReceivedMessages(const MTPmessages_receivedMessages &v) : MTPBoxed(v) { } MTPmessages_ReceivedMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ReceivedMessages(MTPint _max_id) : MTPBoxed(MTPmessages_receivedMessages(_max_id)) { } }; class MTPmessages_setTyping { // RPC method 'messages.setTyping' public: MTPInputPeer vpeer; MTPSendMessageAction vaction; MTPmessages_setTyping() { } MTPmessages_setTyping(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setTyping) { read(from, end, cons); } 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() { } MTPmessages_SetTyping(const MTPmessages_setTyping &v) : MTPBoxed(v) { } MTPmessages_SetTyping(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_sendMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendMessage) { read(from, end, cons); } 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() { } MTPmessages_SendMessage(const MTPmessages_sendMessage &v) : MTPBoxed(v) { } MTPmessages_SendMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_sendMedia(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendMedia) { read(from, end, cons); } 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() { } MTPmessages_SendMedia(const MTPmessages_sendMedia &v) : MTPBoxed(v) { } MTPmessages_SendMedia(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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), MAX_FIELD = (1 << 6), }; 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; } MTPflags vflags; MTPInputPeer vfrom_peer; MTPVector vid; MTPVector vrandom_id; MTPInputPeer vto_peer; MTPmessages_forwardMessages() { } MTPmessages_forwardMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_forwardMessages) { read(from, end, cons); } 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() { } MTPmessages_ForwardMessages(const MTPmessages_forwardMessages &v) : MTPBoxed(v) { } MTPmessages_ForwardMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_reportSpam(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reportSpam) { read(from, end, cons); } 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() { } MTPmessages_ReportSpam(const MTPmessages_reportSpam &v) : MTPBoxed(v) { } MTPmessages_ReportSpam(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ReportSpam(const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_reportSpam(_peer)) { } }; class MTPmessages_hideReportSpam { // RPC method 'messages.hideReportSpam' public: MTPInputPeer vpeer; MTPmessages_hideReportSpam() { } MTPmessages_hideReportSpam(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_hideReportSpam) { read(from, end, cons); } 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() { } MTPmessages_HideReportSpam(const MTPmessages_hideReportSpam &v) : MTPBoxed(v) { } MTPmessages_HideReportSpam(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_HideReportSpam(const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_hideReportSpam(_peer)) { } }; class MTPmessages_getPeerSettings { // RPC method 'messages.getPeerSettings' public: MTPInputPeer vpeer; MTPmessages_getPeerSettings() { } MTPmessages_getPeerSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getPeerSettings) { read(from, end, cons); } 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() { } MTPmessages_GetPeerSettings(const MTPmessages_getPeerSettings &v) : MTPBoxed(v) { } MTPmessages_GetPeerSettings(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetPeerSettings(const MTPInputPeer &_peer) : MTPBoxed(MTPmessages_getPeerSettings(_peer)) { } }; class MTPmessages_getChats { // RPC method 'messages.getChats' public: MTPVector vid; MTPmessages_getChats() { } MTPmessages_getChats(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getChats) { read(from, end, cons); } 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() { } MTPmessages_GetChats(const MTPmessages_getChats &v) : MTPBoxed(v) { } MTPmessages_GetChats(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetChats(const MTPVector &_id) : MTPBoxed(MTPmessages_getChats(_id)) { } }; class MTPmessages_getFullChat { // RPC method 'messages.getFullChat' public: MTPint vchat_id; MTPmessages_getFullChat() { } MTPmessages_getFullChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getFullChat) { read(from, end, cons); } 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() { } MTPmessages_GetFullChat(const MTPmessages_getFullChat &v) : MTPBoxed(v) { } MTPmessages_GetFullChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_editChatTitle(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editChatTitle) { read(from, end, cons); } 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() { } MTPmessages_EditChatTitle(const MTPmessages_editChatTitle &v) : MTPBoxed(v) { } MTPmessages_EditChatTitle(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_editChatPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editChatPhoto) { read(from, end, cons); } 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() { } MTPmessages_EditChatPhoto(const MTPmessages_editChatPhoto &v) : MTPBoxed(v) { } MTPmessages_EditChatPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_addChatUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_addChatUser) { read(from, end, cons); } 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() { } MTPmessages_AddChatUser(const MTPmessages_addChatUser &v) : MTPBoxed(v) { } MTPmessages_AddChatUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_deleteChatUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_deleteChatUser) { read(from, end, cons); } 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() { } MTPmessages_DeleteChatUser(const MTPmessages_deleteChatUser &v) : MTPBoxed(v) { } MTPmessages_DeleteChatUser(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_createChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_createChat) { read(from, end, cons); } 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() { } MTPmessages_CreateChat(const MTPmessages_createChat &v) : MTPBoxed(v) { } MTPmessages_CreateChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_forwardMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_forwardMessage) { read(from, end, cons); } 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() { } MTPmessages_ForwardMessage(const MTPmessages_forwardMessage &v) : MTPBoxed(v) { } MTPmessages_ForwardMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_getDhConfig(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getDhConfig) { read(from, end, cons); } 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() { } MTPmessages_GetDhConfig(const MTPmessages_getDhConfig &v) : MTPBoxed(v) { } MTPmessages_GetDhConfig(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_requestEncryption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_requestEncryption) { read(from, end, cons); } 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() { } MTPmessages_RequestEncryption(const MTPmessages_requestEncryption &v) : MTPBoxed(v) { } MTPmessages_RequestEncryption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_acceptEncryption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_acceptEncryption) { read(from, end, cons); } 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() { } MTPmessages_AcceptEncryption(const MTPmessages_acceptEncryption &v) : MTPBoxed(v) { } MTPmessages_AcceptEncryption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_discardEncryption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_discardEncryption) { read(from, end, cons); } 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() { } MTPmessages_DiscardEncryption(const MTPmessages_discardEncryption &v) : MTPBoxed(v) { } MTPmessages_DiscardEncryption(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_DiscardEncryption(MTPint _chat_id) : MTPBoxed(MTPmessages_discardEncryption(_chat_id)) { } }; class MTPmessages_setEncryptedTyping { // RPC method 'messages.setEncryptedTyping' public: MTPInputEncryptedChat vpeer; MTPBool vtyping; MTPmessages_setEncryptedTyping() { } MTPmessages_setEncryptedTyping(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setEncryptedTyping) { read(from, end, cons); } 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() { } MTPmessages_SetEncryptedTyping(const MTPmessages_setEncryptedTyping &v) : MTPBoxed(v) { } MTPmessages_SetEncryptedTyping(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_readEncryptedHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readEncryptedHistory) { read(from, end, cons); } 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() { } MTPmessages_ReadEncryptedHistory(const MTPmessages_readEncryptedHistory &v) : MTPBoxed(v) { } MTPmessages_ReadEncryptedHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_sendEncrypted(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendEncrypted) { read(from, end, cons); } 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() { } MTPmessages_SendEncrypted(const MTPmessages_sendEncrypted &v) : MTPBoxed(v) { } MTPmessages_SendEncrypted(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_sendEncryptedFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendEncryptedFile) { read(from, end, cons); } 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() { } MTPmessages_SendEncryptedFile(const MTPmessages_sendEncryptedFile &v) : MTPBoxed(v) { } MTPmessages_SendEncryptedFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_sendEncryptedService(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendEncryptedService) { read(from, end, cons); } 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() { } MTPmessages_SendEncryptedService(const MTPmessages_sendEncryptedService &v) : MTPBoxed(v) { } MTPmessages_SendEncryptedService(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_receivedQueue(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_receivedQueue) { read(from, end, cons); } 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() { } MTPmessages_ReceivedQueue(const MTPmessages_receivedQueue &v) : MTPBoxed(v) { } MTPmessages_ReceivedQueue(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ReceivedQueue(MTPint _max_qts) : MTPBoxed(MTPmessages_receivedQueue(_max_qts)) { } }; class MTPmessages_readMessageContents { // RPC method 'messages.readMessageContents' public: MTPVector vid; MTPmessages_readMessageContents() { } MTPmessages_readMessageContents(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readMessageContents) { read(from, end, cons); } 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() { } MTPmessages_ReadMessageContents(const MTPmessages_readMessageContents &v) : MTPBoxed(v) { } MTPmessages_ReadMessageContents(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ReadMessageContents(const MTPVector &_id) : MTPBoxed(MTPmessages_readMessageContents(_id)) { } }; class MTPmessages_getStickers { // RPC method 'messages.getStickers' public: MTPstring vemoticon; MTPstring vhash; MTPmessages_getStickers() { } MTPmessages_getStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getStickers) { read(from, end, cons); } MTPmessages_getStickers(const MTPstring &_emoticon, const MTPstring &_hash) : vemoticon(_emoticon), vhash(_hash) { } uint32 innerLength() const { return vemoticon.innerLength() + vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getStickers) { vemoticon.read(from, end); vhash.read(from, end); } void write(mtpBuffer &to) const { vemoticon.write(to); vhash.write(to); } typedef MTPmessages_Stickers ResponseType; }; class MTPmessages_GetStickers : public MTPBoxed { public: MTPmessages_GetStickers() { } MTPmessages_GetStickers(const MTPmessages_getStickers &v) : MTPBoxed(v) { } MTPmessages_GetStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetStickers(const MTPstring &_emoticon, const MTPstring &_hash) : MTPBoxed(MTPmessages_getStickers(_emoticon, _hash)) { } }; class MTPmessages_getAllStickers { // RPC method 'messages.getAllStickers' public: MTPint vhash; MTPmessages_getAllStickers() { } MTPmessages_getAllStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getAllStickers) { read(from, end, cons); } 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() { } MTPmessages_GetAllStickers(const MTPmessages_getAllStickers &v) : MTPBoxed(v) { } MTPmessages_GetAllStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetAllStickers(MTPint _hash) : MTPBoxed(MTPmessages_getAllStickers(_hash)) { } }; class MTPmessages_getWebPagePreview { // RPC method 'messages.getWebPagePreview' public: MTPstring vmessage; MTPmessages_getWebPagePreview() { } MTPmessages_getWebPagePreview(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getWebPagePreview) { read(from, end, cons); } 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() { } MTPmessages_GetWebPagePreview(const MTPmessages_getWebPagePreview &v) : MTPBoxed(v) { } MTPmessages_GetWebPagePreview(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetWebPagePreview(const MTPstring &_message) : MTPBoxed(MTPmessages_getWebPagePreview(_message)) { } }; class MTPmessages_exportChatInvite { // RPC method 'messages.exportChatInvite' public: MTPint vchat_id; MTPmessages_exportChatInvite() { } MTPmessages_exportChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_exportChatInvite) { read(from, end, cons); } 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() { } MTPmessages_ExportChatInvite(const MTPmessages_exportChatInvite &v) : MTPBoxed(v) { } MTPmessages_ExportChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ExportChatInvite(MTPint _chat_id) : MTPBoxed(MTPmessages_exportChatInvite(_chat_id)) { } }; class MTPmessages_checkChatInvite { // RPC method 'messages.checkChatInvite' public: MTPstring vhash; MTPmessages_checkChatInvite() { } MTPmessages_checkChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_checkChatInvite) { read(from, end, cons); } 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() { } MTPmessages_CheckChatInvite(const MTPmessages_checkChatInvite &v) : MTPBoxed(v) { } MTPmessages_CheckChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_CheckChatInvite(const MTPstring &_hash) : MTPBoxed(MTPmessages_checkChatInvite(_hash)) { } }; class MTPmessages_importChatInvite { // RPC method 'messages.importChatInvite' public: MTPstring vhash; MTPmessages_importChatInvite() { } MTPmessages_importChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_importChatInvite) { read(from, end, cons); } 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() { } MTPmessages_ImportChatInvite(const MTPmessages_importChatInvite &v) : MTPBoxed(v) { } MTPmessages_ImportChatInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ImportChatInvite(const MTPstring &_hash) : MTPBoxed(MTPmessages_importChatInvite(_hash)) { } }; class MTPmessages_getStickerSet { // RPC method 'messages.getStickerSet' public: MTPInputStickerSet vstickerset; MTPmessages_getStickerSet() { } MTPmessages_getStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getStickerSet) { read(from, end, cons); } 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() { } MTPmessages_GetStickerSet(const MTPmessages_getStickerSet &v) : MTPBoxed(v) { } MTPmessages_GetStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetStickerSet(const MTPInputStickerSet &_stickerset) : MTPBoxed(MTPmessages_getStickerSet(_stickerset)) { } }; class MTPmessages_installStickerSet { // RPC method 'messages.installStickerSet' public: MTPInputStickerSet vstickerset; MTPBool varchived; MTPmessages_installStickerSet() { } MTPmessages_installStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_installStickerSet) { read(from, end, cons); } 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() { } MTPmessages_InstallStickerSet(const MTPmessages_installStickerSet &v) : MTPBoxed(v) { } MTPmessages_InstallStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_InstallStickerSet(const MTPInputStickerSet &_stickerset, MTPBool _archived) : MTPBoxed(MTPmessages_installStickerSet(_stickerset, _archived)) { } }; class MTPmessages_uninstallStickerSet { // RPC method 'messages.uninstallStickerSet' public: MTPInputStickerSet vstickerset; MTPmessages_uninstallStickerSet() { } MTPmessages_uninstallStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_uninstallStickerSet) { read(from, end, cons); } 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() { } MTPmessages_UninstallStickerSet(const MTPmessages_uninstallStickerSet &v) : MTPBoxed(v) { } MTPmessages_UninstallStickerSet(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_startBot(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_startBot) { read(from, end, cons); } 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() { } MTPmessages_StartBot(const MTPmessages_startBot &v) : MTPBoxed(v) { } MTPmessages_StartBot(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_getMessagesViews(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMessagesViews) { read(from, end, cons); } 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() { } MTPmessages_GetMessagesViews(const MTPmessages_getMessagesViews &v) : MTPBoxed(v) { } MTPmessages_GetMessagesViews(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_toggleChatAdmins(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_toggleChatAdmins) { read(from, end, cons); } 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() { } MTPmessages_ToggleChatAdmins(const MTPmessages_toggleChatAdmins &v) : MTPBoxed(v) { } MTPmessages_ToggleChatAdmins(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_editChatAdmin(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editChatAdmin) { read(from, end, cons); } 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() { } MTPmessages_EditChatAdmin(const MTPmessages_editChatAdmin &v) : MTPBoxed(v) { } MTPmessages_EditChatAdmin(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_migrateChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_migrateChat) { read(from, end, cons); } 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() { } MTPmessages_MigrateChat(const MTPmessages_migrateChat &v) : MTPBoxed(v) { } MTPmessages_MigrateChat(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_searchGlobal(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_searchGlobal) { read(from, end, cons); } 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() { } MTPmessages_SearchGlobal(const MTPmessages_searchGlobal &v) : MTPBoxed(v) { } MTPmessages_SearchGlobal(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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: MTPVector vorder; MTPmessages_reorderStickerSets() { } MTPmessages_reorderStickerSets(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reorderStickerSets) { read(from, end, cons); } MTPmessages_reorderStickerSets(const MTPVector &_order) : vorder(_order) { } uint32 innerLength() const { return vorder.innerLength(); } mtpTypeId type() const { return mtpc_messages_reorderStickerSets; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_reorderStickerSets) { vorder.read(from, end); } void write(mtpBuffer &to) const { vorder.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_ReorderStickerSets : public MTPBoxed { public: MTPmessages_ReorderStickerSets() { } MTPmessages_ReorderStickerSets(const MTPmessages_reorderStickerSets &v) : MTPBoxed(v) { } MTPmessages_ReorderStickerSets(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_ReorderStickerSets(const MTPVector &_order) : MTPBoxed(MTPmessages_reorderStickerSets(_order)) { } }; class MTPmessages_getDocumentByHash { // RPC method 'messages.getDocumentByHash' public: MTPbytes vsha256; MTPint vsize; MTPstring vmime_type; MTPmessages_getDocumentByHash() { } MTPmessages_getDocumentByHash(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getDocumentByHash) { read(from, end, cons); } 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() { } MTPmessages_GetDocumentByHash(const MTPmessages_getDocumentByHash &v) : MTPBoxed(v) { } MTPmessages_GetDocumentByHash(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_searchGifs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_searchGifs) { read(from, end, cons); } 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() { } MTPmessages_SearchGifs(const MTPmessages_searchGifs &v) : MTPBoxed(v) { } MTPmessages_SearchGifs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_SearchGifs(const MTPstring &_q, MTPint _offset) : MTPBoxed(MTPmessages_searchGifs(_q, _offset)) { } }; class MTPmessages_getSavedGifs { // RPC method 'messages.getSavedGifs' public: MTPint vhash; MTPmessages_getSavedGifs() { } MTPmessages_getSavedGifs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getSavedGifs) { read(from, end, cons); } 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() { } MTPmessages_GetSavedGifs(const MTPmessages_getSavedGifs &v) : MTPBoxed(v) { } MTPmessages_GetSavedGifs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetSavedGifs(MTPint _hash) : MTPBoxed(MTPmessages_getSavedGifs(_hash)) { } }; class MTPmessages_saveGif { // RPC method 'messages.saveGif' public: MTPInputDocument vid; MTPBool vunsave; MTPmessages_saveGif() { } MTPmessages_saveGif(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveGif) { read(from, end, cons); } 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() { } MTPmessages_SaveGif(const MTPmessages_saveGif &v) : MTPBoxed(v) { } MTPmessages_SaveGif(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_getInlineBotResults(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getInlineBotResults) { read(from, end, cons); } 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() { } MTPmessages_GetInlineBotResults(const MTPmessages_getInlineBotResults &v) : MTPBoxed(v) { } MTPmessages_GetInlineBotResults(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_setInlineBotResults(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setInlineBotResults) { read(from, end, cons); } 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() { } MTPmessages_SetInlineBotResults(const MTPmessages_setInlineBotResults &v) : MTPBoxed(v) { } MTPmessages_SetInlineBotResults(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_sendInlineBotResult(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_sendInlineBotResult) { read(from, end, cons); } 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() { } MTPmessages_SendInlineBotResult(const MTPmessages_sendInlineBotResult &v) : MTPBoxed(v) { } MTPmessages_SendInlineBotResult(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_getMessageEditData(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getMessageEditData) { read(from, end, cons); } 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() { } MTPmessages_GetMessageEditData(const MTPmessages_getMessageEditData &v) : MTPBoxed(v) { } MTPmessages_GetMessageEditData(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_editMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editMessage) { read(from, end, cons); } 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() { } MTPmessages_EditMessage(const MTPmessages_editMessage &v) : MTPBoxed(v) { } MTPmessages_EditMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_editInlineBotMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_editInlineBotMessage) { read(from, end, cons); } 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() { } MTPmessages_EditInlineBotMessage(const MTPmessages_editInlineBotMessage &v) : MTPBoxed(v) { } MTPmessages_EditInlineBotMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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: MTPInputPeer vpeer; MTPint vmsg_id; MTPbytes vdata; MTPmessages_getBotCallbackAnswer() { } MTPmessages_getBotCallbackAnswer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getBotCallbackAnswer) { read(from, end, cons); } MTPmessages_getBotCallbackAnswer(const MTPInputPeer &_peer, MTPint _msg_id, const MTPbytes &_data) : vpeer(_peer), vmsg_id(_msg_id), vdata(_data) { } uint32 innerLength() const { return vpeer.innerLength() + vmsg_id.innerLength() + vdata.innerLength(); } mtpTypeId type() const { return mtpc_messages_getBotCallbackAnswer; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getBotCallbackAnswer) { vpeer.read(from, end); vmsg_id.read(from, end); vdata.read(from, end); } void write(mtpBuffer &to) const { vpeer.write(to); vmsg_id.write(to); vdata.write(to); } typedef MTPmessages_BotCallbackAnswer ResponseType; }; class MTPmessages_GetBotCallbackAnswer : public MTPBoxed { public: MTPmessages_GetBotCallbackAnswer() { } MTPmessages_GetBotCallbackAnswer(const MTPmessages_getBotCallbackAnswer &v) : MTPBoxed(v) { } MTPmessages_GetBotCallbackAnswer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetBotCallbackAnswer(const MTPInputPeer &_peer, MTPint _msg_id, const MTPbytes &_data) : MTPBoxed(MTPmessages_getBotCallbackAnswer(_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; MTPmessages_setBotCallbackAnswer() { } MTPmessages_setBotCallbackAnswer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_setBotCallbackAnswer) { read(from, end, cons); } MTPmessages_setBotCallbackAnswer(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_message, const MTPstring &_url) : vflags(_flags), vquery_id(_query_id), vmessage(_message), vurl(_url) { } uint32 innerLength() const { return vflags.innerLength() + vquery_id.innerLength() + (has_message() ? vmessage.innerLength() : 0) + (has_url() ? vurl.innerLength() : 0); } 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(); } } void write(mtpBuffer &to) const { vflags.write(to); vquery_id.write(to); if (has_message()) vmessage.write(to); if (has_url()) vurl.write(to); } typedef MTPBool ResponseType; }; Q_DECLARE_OPERATORS_FOR_FLAGS(MTPmessages_setBotCallbackAnswer::Flags) class MTPmessages_SetBotCallbackAnswer : public MTPBoxed { public: MTPmessages_SetBotCallbackAnswer() { } MTPmessages_SetBotCallbackAnswer(const MTPmessages_setBotCallbackAnswer &v) : MTPBoxed(v) { } MTPmessages_SetBotCallbackAnswer(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_SetBotCallbackAnswer(const MTPflags &_flags, const MTPlong &_query_id, const MTPstring &_message, const MTPstring &_url) : MTPBoxed(MTPmessages_setBotCallbackAnswer(_flags, _query_id, _message, _url)) { } }; class MTPmessages_getPeerDialogs { // RPC method 'messages.getPeerDialogs' public: MTPVector vpeers; MTPmessages_getPeerDialogs() { } MTPmessages_getPeerDialogs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getPeerDialogs) { read(from, end, cons); } 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() { } MTPmessages_GetPeerDialogs(const MTPmessages_getPeerDialogs &v) : MTPBoxed(v) { } MTPmessages_GetPeerDialogs(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_saveDraft(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveDraft) { read(from, end, cons); } 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() { } MTPmessages_SaveDraft(const MTPmessages_saveDraft &v) : MTPBoxed(v) { } MTPmessages_SaveDraft(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPmessages_getAllDrafts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getAllDrafts) { read(from, end, cons); } 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() { } MTPmessages_GetAllDrafts(const MTPmessages_getAllDrafts &v) : MTPBoxed(v) { } MTPmessages_GetAllDrafts(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPmessages_getFeaturedStickers { // RPC method 'messages.getFeaturedStickers' public: MTPint vhash; MTPmessages_getFeaturedStickers() { } MTPmessages_getFeaturedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getFeaturedStickers) { read(from, end, cons); } 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() { } MTPmessages_GetFeaturedStickers(const MTPmessages_getFeaturedStickers &v) : MTPBoxed(v) { } MTPmessages_GetFeaturedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetFeaturedStickers(MTPint _hash) : MTPBoxed(MTPmessages_getFeaturedStickers(_hash)) { } }; class MTPmessages_readFeaturedStickers { // RPC method 'messages.readFeaturedStickers' public: MTPmessages_readFeaturedStickers() { } MTPmessages_readFeaturedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readFeaturedStickers) { read(from, end, cons); } uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_messages_readFeaturedStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_readFeaturedStickers) { } void write(mtpBuffer &to) const { } typedef MTPBool ResponseType; }; class MTPmessages_ReadFeaturedStickers : public MTPBoxed { public: MTPmessages_ReadFeaturedStickers() { } MTPmessages_ReadFeaturedStickers(const MTPmessages_readFeaturedStickers &v) : MTPBoxed(v) { } MTPmessages_ReadFeaturedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPmessages_getRecentStickers { // RPC method 'messages.getRecentStickers' public: MTPint vhash; MTPmessages_getRecentStickers() { } MTPmessages_getRecentStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getRecentStickers) { read(from, end, cons); } MTPmessages_getRecentStickers(MTPint _hash) : vhash(_hash) { } uint32 innerLength() const { return vhash.innerLength(); } mtpTypeId type() const { return mtpc_messages_getRecentStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getRecentStickers) { vhash.read(from, end); } void write(mtpBuffer &to) const { vhash.write(to); } typedef MTPmessages_RecentStickers ResponseType; }; class MTPmessages_GetRecentStickers : public MTPBoxed { public: MTPmessages_GetRecentStickers() { } MTPmessages_GetRecentStickers(const MTPmessages_getRecentStickers &v) : MTPBoxed(v) { } MTPmessages_GetRecentStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetRecentStickers(MTPint _hash) : MTPBoxed(MTPmessages_getRecentStickers(_hash)) { } }; class MTPmessages_saveRecentSticker { // RPC method 'messages.saveRecentSticker' public: MTPInputDocument vid; MTPBool vunsave; MTPmessages_saveRecentSticker() { } MTPmessages_saveRecentSticker(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveRecentSticker) { read(from, end, cons); } MTPmessages_saveRecentSticker(const MTPInputDocument &_id, MTPBool _unsave) : vid(_id), vunsave(_unsave) { } uint32 innerLength() const { return vid.innerLength() + vunsave.innerLength(); } mtpTypeId type() const { return mtpc_messages_saveRecentSticker; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_saveRecentSticker) { vid.read(from, end); vunsave.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); vunsave.write(to); } typedef MTPBool ResponseType; }; class MTPmessages_SaveRecentSticker : public MTPBoxed { public: MTPmessages_SaveRecentSticker() { } MTPmessages_SaveRecentSticker(const MTPmessages_saveRecentSticker &v) : MTPBoxed(v) { } MTPmessages_SaveRecentSticker(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_SaveRecentSticker(const MTPInputDocument &_id, MTPBool _unsave) : MTPBoxed(MTPmessages_saveRecentSticker(_id, _unsave)) { } }; class MTPmessages_clearRecentStickers { // RPC method 'messages.clearRecentStickers' public: MTPmessages_clearRecentStickers() { } MTPmessages_clearRecentStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_clearRecentStickers) { read(from, end, cons); } uint32 innerLength() const { return 0; } mtpTypeId type() const { return mtpc_messages_clearRecentStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_clearRecentStickers) { } void write(mtpBuffer &to) const { } typedef MTPBool ResponseType; }; class MTPmessages_ClearRecentStickers : public MTPBoxed { public: MTPmessages_ClearRecentStickers() { } MTPmessages_ClearRecentStickers(const MTPmessages_clearRecentStickers &v) : MTPBoxed(v) { } MTPmessages_ClearRecentStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPmessages_getUnusedStickers { // RPC method 'messages.getUnusedStickers' public: MTPint vlimit; MTPmessages_getUnusedStickers() { } MTPmessages_getUnusedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getUnusedStickers) { read(from, end, cons); } MTPmessages_getUnusedStickers(MTPint _limit) : vlimit(_limit) { } uint32 innerLength() const { return vlimit.innerLength(); } mtpTypeId type() const { return mtpc_messages_getUnusedStickers; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getUnusedStickers) { vlimit.read(from, end); } void write(mtpBuffer &to) const { vlimit.write(to); } typedef MTPVector ResponseType; }; class MTPmessages_GetUnusedStickers : public MTPBoxed { public: MTPmessages_GetUnusedStickers() { } MTPmessages_GetUnusedStickers(const MTPmessages_getUnusedStickers &v) : MTPBoxed(v) { } MTPmessages_GetUnusedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetUnusedStickers(MTPint _limit) : MTPBoxed(MTPmessages_getUnusedStickers(_limit)) { } }; class MTPmessages_getArchivedStickers { // RPC method 'messages.getArchivedStickers' public: MTPlong voffset_id; MTPint vlimit; MTPmessages_getArchivedStickers() { } MTPmessages_getArchivedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getArchivedStickers) { read(from, end, cons); } MTPmessages_getArchivedStickers(const MTPlong &_offset_id, MTPint _limit) : voffset_id(_offset_id), vlimit(_limit) { } uint32 innerLength() const { return 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) { voffset_id.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { voffset_id.write(to); vlimit.write(to); } typedef MTPmessages_ArchivedStickers ResponseType; }; class MTPmessages_GetArchivedStickers : public MTPBoxed { public: MTPmessages_GetArchivedStickers() { } MTPmessages_GetArchivedStickers(const MTPmessages_getArchivedStickers &v) : MTPBoxed(v) { } MTPmessages_GetArchivedStickers(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPmessages_GetArchivedStickers(const MTPlong &_offset_id, MTPint _limit) : MTPBoxed(MTPmessages_getArchivedStickers(_offset_id, _limit)) { } }; class MTPupdates_getState { // RPC method 'updates.getState' public: MTPupdates_getState() { } MTPupdates_getState(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getState) { read(from, end, cons); } 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() { } MTPupdates_GetState(const MTPupdates_getState &v) : MTPBoxed(v) { } MTPupdates_GetState(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPupdates_getDifference { // RPC method 'updates.getDifference' public: MTPint vpts; MTPint vdate; MTPint vqts; MTPupdates_getDifference() { } MTPupdates_getDifference(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getDifference) { read(from, end, cons); } MTPupdates_getDifference(MTPint _pts, MTPint _date, MTPint _qts) : vpts(_pts), vdate(_date), vqts(_qts) { } uint32 innerLength() const { return vpts.innerLength() + vdate.innerLength() + vqts.innerLength(); } mtpTypeId type() const { return mtpc_updates_getDifference; } void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getDifference) { vpts.read(from, end); vdate.read(from, end); vqts.read(from, end); } void write(mtpBuffer &to) const { vpts.write(to); vdate.write(to); vqts.write(to); } typedef MTPupdates_Difference ResponseType; }; class MTPupdates_GetDifference : public MTPBoxed { public: MTPupdates_GetDifference() { } MTPupdates_GetDifference(const MTPupdates_getDifference &v) : MTPBoxed(v) { } MTPupdates_GetDifference(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPupdates_GetDifference(MTPint _pts, MTPint _date, MTPint _qts) : MTPBoxed(MTPupdates_getDifference(_pts, _date, _qts)) { } }; class MTPupdates_getChannelDifference { // RPC method 'updates.getChannelDifference' public: MTPInputChannel vchannel; MTPChannelMessagesFilter vfilter; MTPint vpts; MTPint vlimit; MTPupdates_getChannelDifference() { } MTPupdates_getChannelDifference(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_updates_getChannelDifference) { read(from, end, cons); } MTPupdates_getChannelDifference(const MTPInputChannel &_channel, const MTPChannelMessagesFilter &_filter, MTPint _pts, MTPint _limit) : vchannel(_channel), vfilter(_filter), vpts(_pts), vlimit(_limit) { } uint32 innerLength() const { return 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) { vchannel.read(from, end); vfilter.read(from, end); vpts.read(from, end); vlimit.read(from, end); } void write(mtpBuffer &to) const { vchannel.write(to); vfilter.write(to); vpts.write(to); vlimit.write(to); } typedef MTPupdates_ChannelDifference ResponseType; }; class MTPupdates_GetChannelDifference : public MTPBoxed { public: MTPupdates_GetChannelDifference() { } MTPupdates_GetChannelDifference(const MTPupdates_getChannelDifference &v) : MTPBoxed(v) { } MTPupdates_GetChannelDifference(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPupdates_GetChannelDifference(const MTPInputChannel &_channel, const MTPChannelMessagesFilter &_filter, MTPint _pts, MTPint _limit) : MTPBoxed(MTPupdates_getChannelDifference(_channel, _filter, _pts, _limit)) { } }; class MTPphotos_updateProfilePhoto { // RPC method 'photos.updateProfilePhoto' public: MTPInputPhoto vid; MTPInputPhotoCrop vcrop; MTPphotos_updateProfilePhoto() { } MTPphotos_updateProfilePhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_updateProfilePhoto) { read(from, end, cons); } MTPphotos_updateProfilePhoto(const MTPInputPhoto &_id, const MTPInputPhotoCrop &_crop) : vid(_id), vcrop(_crop) { } uint32 innerLength() const { return vid.innerLength() + vcrop.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); vcrop.read(from, end); } void write(mtpBuffer &to) const { vid.write(to); vcrop.write(to); } typedef MTPUserProfilePhoto ResponseType; }; class MTPphotos_UpdateProfilePhoto : public MTPBoxed { public: MTPphotos_UpdateProfilePhoto() { } MTPphotos_UpdateProfilePhoto(const MTPphotos_updateProfilePhoto &v) : MTPBoxed(v) { } MTPphotos_UpdateProfilePhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPphotos_UpdateProfilePhoto(const MTPInputPhoto &_id, const MTPInputPhotoCrop &_crop) : MTPBoxed(MTPphotos_updateProfilePhoto(_id, _crop)) { } }; class MTPphotos_uploadProfilePhoto { // RPC method 'photos.uploadProfilePhoto' public: MTPInputFile vfile; MTPstring vcaption; MTPInputGeoPoint vgeo_point; MTPInputPhotoCrop vcrop; MTPphotos_uploadProfilePhoto() { } MTPphotos_uploadProfilePhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_uploadProfilePhoto) { read(from, end, cons); } MTPphotos_uploadProfilePhoto(const MTPInputFile &_file, const MTPstring &_caption, const MTPInputGeoPoint &_geo_point, const MTPInputPhotoCrop &_crop) : vfile(_file), vcaption(_caption), vgeo_point(_geo_point), vcrop(_crop) { } uint32 innerLength() const { return vfile.innerLength() + vcaption.innerLength() + vgeo_point.innerLength() + vcrop.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); vcaption.read(from, end); vgeo_point.read(from, end); vcrop.read(from, end); } void write(mtpBuffer &to) const { vfile.write(to); vcaption.write(to); vgeo_point.write(to); vcrop.write(to); } typedef MTPphotos_Photo ResponseType; }; class MTPphotos_UploadProfilePhoto : public MTPBoxed { public: MTPphotos_UploadProfilePhoto() { } MTPphotos_UploadProfilePhoto(const MTPphotos_uploadProfilePhoto &v) : MTPBoxed(v) { } MTPphotos_UploadProfilePhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPphotos_UploadProfilePhoto(const MTPInputFile &_file, const MTPstring &_caption, const MTPInputGeoPoint &_geo_point, const MTPInputPhotoCrop &_crop) : MTPBoxed(MTPphotos_uploadProfilePhoto(_file, _caption, _geo_point, _crop)) { } }; class MTPphotos_deletePhotos { // RPC method 'photos.deletePhotos' public: MTPVector vid; MTPphotos_deletePhotos() { } MTPphotos_deletePhotos(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_deletePhotos) { read(from, end, cons); } 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() { } MTPphotos_DeletePhotos(const MTPphotos_deletePhotos &v) : MTPBoxed(v) { } MTPphotos_DeletePhotos(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPphotos_getUserPhotos(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_photos_getUserPhotos) { read(from, end, cons); } 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() { } MTPphotos_GetUserPhotos(const MTPphotos_getUserPhotos &v) : MTPBoxed(v) { } MTPphotos_GetUserPhotos(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPupload_saveFilePart(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_saveFilePart) { read(from, end, cons); } 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() { } MTPupload_SaveFilePart(const MTPupload_saveFilePart &v) : MTPBoxed(v) { } MTPupload_SaveFilePart(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPupload_getFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_getFile) { read(from, end, cons); } 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() { } MTPupload_GetFile(const MTPupload_getFile &v) : MTPBoxed(v) { } MTPupload_GetFile(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPupload_saveBigFilePart(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_upload_saveBigFilePart) { read(from, end, cons); } 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() { } MTPupload_SaveBigFilePart(const MTPupload_saveBigFilePart &v) : MTPBoxed(v) { } MTPupload_SaveBigFilePart(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPhelp_getConfig(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getConfig) { read(from, end, cons); } 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() { } MTPhelp_GetConfig(const MTPhelp_getConfig &v) : MTPBoxed(v) { } MTPhelp_GetConfig(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPhelp_getNearestDc { // RPC method 'help.getNearestDc' public: MTPhelp_getNearestDc() { } MTPhelp_getNearestDc(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getNearestDc) { read(from, end, cons); } 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() { } MTPhelp_GetNearestDc(const MTPhelp_getNearestDc &v) : MTPBoxed(v) { } MTPhelp_GetNearestDc(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPhelp_getAppUpdate { // RPC method 'help.getAppUpdate' public: MTPhelp_getAppUpdate() { } MTPhelp_getAppUpdate(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppUpdate) { read(from, end, cons); } 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() { } MTPhelp_GetAppUpdate(const MTPhelp_getAppUpdate &v) : MTPBoxed(v) { } MTPhelp_GetAppUpdate(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPhelp_saveAppLog { // RPC method 'help.saveAppLog' public: MTPVector vevents; MTPhelp_saveAppLog() { } MTPhelp_saveAppLog(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_saveAppLog) { read(from, end, cons); } 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() { } MTPhelp_SaveAppLog(const MTPhelp_saveAppLog &v) : MTPBoxed(v) { } MTPhelp_SaveAppLog(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPhelp_SaveAppLog(const MTPVector &_events) : MTPBoxed(MTPhelp_saveAppLog(_events)) { } }; class MTPhelp_getInviteText { // RPC method 'help.getInviteText' public: MTPhelp_getInviteText() { } MTPhelp_getInviteText(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getInviteText) { read(from, end, cons); } 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() { } MTPhelp_GetInviteText(const MTPhelp_getInviteText &v) : MTPBoxed(v) { } MTPhelp_GetInviteText(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPhelp_getSupport { // RPC method 'help.getSupport' public: MTPhelp_getSupport() { } MTPhelp_getSupport(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getSupport) { read(from, end, cons); } 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() { } MTPhelp_GetSupport(const MTPhelp_getSupport &v) : MTPBoxed(v) { } MTPhelp_GetSupport(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPhelp_getAppChangelog { // RPC method 'help.getAppChangelog' public: MTPhelp_getAppChangelog() { } MTPhelp_getAppChangelog(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppChangelog) { read(from, end, cons); } 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() { } MTPhelp_GetAppChangelog(const MTPhelp_getAppChangelog &v) : MTPBoxed(v) { } MTPhelp_GetAppChangelog(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPhelp_getTermsOfService { // RPC method 'help.getTermsOfService' public: MTPhelp_getTermsOfService() { } MTPhelp_getTermsOfService(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getTermsOfService) { read(from, end, cons); } 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() { } MTPhelp_GetTermsOfService(const MTPhelp_getTermsOfService &v) : MTPBoxed(v) { } MTPhelp_GetTermsOfService(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; class MTPchannels_readHistory { // RPC method 'channels.readHistory' public: MTPInputChannel vchannel; MTPint vmax_id; MTPchannels_readHistory() { } MTPchannels_readHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_readHistory) { read(from, end, cons); } 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() { } MTPchannels_ReadHistory(const MTPchannels_readHistory &v) : MTPBoxed(v) { } MTPchannels_ReadHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_deleteMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_deleteMessages) { read(from, end, cons); } 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() { } MTPchannels_DeleteMessages(const MTPchannels_deleteMessages &v) : MTPBoxed(v) { } MTPchannels_DeleteMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_deleteUserHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_deleteUserHistory) { read(from, end, cons); } 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() { } MTPchannels_DeleteUserHistory(const MTPchannels_deleteUserHistory &v) : MTPBoxed(v) { } MTPchannels_DeleteUserHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_reportSpam(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_reportSpam) { read(from, end, cons); } 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() { } MTPchannels_ReportSpam(const MTPchannels_reportSpam &v) : MTPBoxed(v) { } MTPchannels_ReportSpam(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_getMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getMessages) { read(from, end, cons); } 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() { } MTPchannels_GetMessages(const MTPchannels_getMessages &v) : MTPBoxed(v) { } MTPchannels_GetMessages(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_getParticipants(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getParticipants) { read(from, end, cons); } 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() { } MTPchannels_GetParticipants(const MTPchannels_getParticipants &v) : MTPBoxed(v) { } MTPchannels_GetParticipants(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_getParticipant(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getParticipant) { read(from, end, cons); } 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() { } MTPchannels_GetParticipant(const MTPchannels_getParticipant &v) : MTPBoxed(v) { } MTPchannels_GetParticipant(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_getChannels(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getChannels) { read(from, end, cons); } 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() { } MTPchannels_GetChannels(const MTPchannels_getChannels &v) : MTPBoxed(v) { } MTPchannels_GetChannels(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPchannels_GetChannels(const MTPVector &_id) : MTPBoxed(MTPchannels_getChannels(_id)) { } }; class MTPchannels_getFullChannel { // RPC method 'channels.getFullChannel' public: MTPInputChannel vchannel; MTPchannels_getFullChannel() { } MTPchannels_getFullChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getFullChannel) { read(from, end, cons); } 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() { } MTPchannels_GetFullChannel(const MTPchannels_getFullChannel &v) : MTPBoxed(v) { } MTPchannels_GetFullChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_createChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_createChannel) { read(from, end, cons); } 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() { } MTPchannels_CreateChannel(const MTPchannels_createChannel &v) : MTPBoxed(v) { } MTPchannels_CreateChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_editAbout(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editAbout) { read(from, end, cons); } 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() { } MTPchannels_EditAbout(const MTPchannels_editAbout &v) : MTPBoxed(v) { } MTPchannels_EditAbout(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_editAdmin(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editAdmin) { read(from, end, cons); } 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() { } MTPchannels_EditAdmin(const MTPchannels_editAdmin &v) : MTPBoxed(v) { } MTPchannels_EditAdmin(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_editTitle(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editTitle) { read(from, end, cons); } 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() { } MTPchannels_EditTitle(const MTPchannels_editTitle &v) : MTPBoxed(v) { } MTPchannels_EditTitle(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_editPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editPhoto) { read(from, end, cons); } 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() { } MTPchannels_EditPhoto(const MTPchannels_editPhoto &v) : MTPBoxed(v) { } MTPchannels_EditPhoto(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_checkUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_checkUsername) { read(from, end, cons); } 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() { } MTPchannels_CheckUsername(const MTPchannels_checkUsername &v) : MTPBoxed(v) { } MTPchannels_CheckUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_updateUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_updateUsername) { read(from, end, cons); } 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() { } MTPchannels_UpdateUsername(const MTPchannels_updateUsername &v) : MTPBoxed(v) { } MTPchannels_UpdateUsername(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_joinChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_joinChannel) { read(from, end, cons); } 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() { } MTPchannels_JoinChannel(const MTPchannels_joinChannel &v) : MTPBoxed(v) { } MTPchannels_JoinChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPchannels_JoinChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_joinChannel(_channel)) { } }; class MTPchannels_leaveChannel { // RPC method 'channels.leaveChannel' public: MTPInputChannel vchannel; MTPchannels_leaveChannel() { } MTPchannels_leaveChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_leaveChannel) { read(from, end, cons); } 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() { } MTPchannels_LeaveChannel(const MTPchannels_leaveChannel &v) : MTPBoxed(v) { } MTPchannels_LeaveChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPchannels_LeaveChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_leaveChannel(_channel)) { } }; class MTPchannels_inviteToChannel { // RPC method 'channels.inviteToChannel' public: MTPInputChannel vchannel; MTPVector vusers; MTPchannels_inviteToChannel() { } MTPchannels_inviteToChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_inviteToChannel) { read(from, end, cons); } 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() { } MTPchannels_InviteToChannel(const MTPchannels_inviteToChannel &v) : MTPBoxed(v) { } MTPchannels_InviteToChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_kickFromChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_kickFromChannel) { read(from, end, cons); } 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() { } MTPchannels_KickFromChannel(const MTPchannels_kickFromChannel &v) : MTPBoxed(v) { } MTPchannels_KickFromChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_exportInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_exportInvite) { read(from, end, cons); } 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() { } MTPchannels_ExportInvite(const MTPchannels_exportInvite &v) : MTPBoxed(v) { } MTPchannels_ExportInvite(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPchannels_ExportInvite(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_exportInvite(_channel)) { } }; class MTPchannels_deleteChannel { // RPC method 'channels.deleteChannel' public: MTPInputChannel vchannel; MTPchannels_deleteChannel() { } MTPchannels_deleteChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_deleteChannel) { read(from, end, cons); } 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() { } MTPchannels_DeleteChannel(const MTPchannels_deleteChannel &v) : MTPBoxed(v) { } MTPchannels_DeleteChannel(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } MTPchannels_DeleteChannel(const MTPInputChannel &_channel) : MTPBoxed(MTPchannels_deleteChannel(_channel)) { } }; class MTPchannels_toggleInvites { // RPC method 'channels.toggleInvites' public: MTPInputChannel vchannel; MTPBool venabled; MTPchannels_toggleInvites() { } MTPchannels_toggleInvites(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleInvites) { read(from, end, cons); } 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() { } MTPchannels_ToggleInvites(const MTPchannels_toggleInvites &v) : MTPBoxed(v) { } MTPchannels_ToggleInvites(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_exportMessageLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_exportMessageLink) { read(from, end, cons); } 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() { } MTPchannels_ExportMessageLink(const MTPchannels_exportMessageLink &v) : MTPBoxed(v) { } MTPchannels_ExportMessageLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_toggleSignatures(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleSignatures) { read(from, end, cons); } 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() { } MTPchannels_ToggleSignatures(const MTPchannels_toggleSignatures &v) : MTPBoxed(v) { } MTPchannels_ToggleSignatures(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_updatePinnedMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_updatePinnedMessage) { read(from, end, cons); } 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() { } MTPchannels_UpdatePinnedMessage(const MTPchannels_updatePinnedMessage &v) : MTPBoxed(v) { } MTPchannels_UpdatePinnedMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } 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() { } MTPchannels_getAdminedPublicChannels(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getAdminedPublicChannels) { read(from, end, cons); } 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() { } MTPchannels_GetAdminedPublicChannels(const MTPchannels_getAdminedPublicChannels &v) : MTPBoxed(v) { } MTPchannels_GetAdminedPublicChannels(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } }; // 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 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 MTPInputFile &_file, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaUploadedPhoto(_file, _caption)); } 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 MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaUploadedDocument(_file, _mime_type, _attributes, _caption)); } inline static MTPinputMedia new_inputMediaUploadedThumbDocument(const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaUploadedThumbDocument(_file, _thumb, _mime_type, _attributes, _caption)); } 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 MTPinputChatPhoto new_inputChatPhotoEmpty() { return MTPinputChatPhoto(mtpc_inputChatPhotoEmpty); } inline static MTPinputChatPhoto new_inputChatUploadedPhoto(const MTPInputFile &_file, const MTPInputPhotoCrop &_crop) { return MTPinputChatPhoto(new MTPDinputChatUploadedPhoto(_file, _crop)); } inline static MTPinputChatPhoto new_inputChatPhoto(const MTPInputPhoto &_id, const MTPInputPhotoCrop &_crop) { return MTPinputChatPhoto(new MTPDinputChatPhoto(_id, _crop)); } 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 MTPinputPhotoCrop new_inputPhotoCropAuto() { return MTPinputPhotoCrop(mtpc_inputPhotoCropAuto); } inline static MTPinputPhotoCrop new_inputPhotoCrop(const MTPdouble &_crop_left, const MTPdouble &_crop_top, const MTPdouble &_crop_width) { return MTPinputPhotoCrop(new MTPDinputPhotoCrop(_crop_left, _crop_top, _crop_width)); } 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 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 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 MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPVector &_sizes) { return MTPphoto(new MTPDphoto(_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) { return MTPuserFull(new MTPDuserFull(_flags, _user, _about, _link, _profile_photo, _notify_settings, _bot_info)); } 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_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 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_updateNewAuthorization(const MTPlong &_auth_key_id, MTPint _date, const MTPstring &_device, const MTPstring &_location) { return MTPupdate(new MTPDupdateNewAuthorization(_auth_key_id, _date, _device, _location)); } 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 MTPstring &_type, const MTPstring &_message, const MTPMessageMedia &_media, MTPBool _popup) { return MTPupdate(new MTPDupdateServiceNotification(_type, _message, _media, _popup)); } 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 MTPVector &_order) { return MTPupdate(new MTPDupdateStickerSetsOrder(_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 MTPlong &_query_id, MTPint _user_id, const MTPPeer &_peer, MTPint _msg_id, const MTPbytes &_data) { return MTPupdate(new MTPDupdateBotCallbackQuery(_query_id, _user_id, _peer, _msg_id, _data)); } 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 MTPlong &_query_id, MTPint _user_id, const MTPInputBotInlineMessageID &_msg_id, const MTPbytes &_data) { return MTPupdate(new MTPDupdateInlineBotCallbackQuery(_query_id, _user_id, _msg_id, _data)); } 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 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 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, 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, _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 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 MTPprivacyKey new_privacyKeyStatusTimestamp() { return MTPprivacyKey(mtpc_privacyKeyStatusTimestamp); } inline static MTPprivacyKey new_privacyKeyChatInvite() { return MTPprivacyKey(mtpc_privacyKeyChatInvite); } 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 MTPstring &_alt, const MTPInputStickerSet &_stickerset) { return MTPdocumentAttribute(new MTPDdocumentAttributeSticker(_alt, _stickerset)); } 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 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, 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) { return MTPwebPage(new MTPDwebPage(_flags, _id, _url, _display_url, _type, _site_name, _title, _description, _photo, _embed_url, _embed_type, _embed_width, _embed_height, _duration, _author, _document)); } 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 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 &_text) { return MTPhelp_appChangelog(new MTPDhelp_appChangelog(_text)); } 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 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 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) { return MTPmessages_botResults(new MTPDmessages_botResults(_flags, _query_id, _next_offset, _switch_pm, _results)); } 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) { return MTPmessages_botCallbackAnswer(new MTPDmessages_botCallbackAnswer(_flags, _message, _url)); } 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)); } }; } // namespace internal } // namespace MTP // Inline methods definition inline MTPresPQ::MTPresPQ() : mtpDataOwner(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"); if (!data) setData(new MTPDresPQ()); MTPDresPQ &v(_resPQ()); 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 { const MTPDresPQ &v(c_resPQ()); v.vnonce.write(to); v.vserver_nonce.write(to); v.vpq.write(to); v.vserver_public_key_fingerprints.write(to); } inline MTPresPQ::MTPresPQ(MTPDresPQ *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDp_q_inner_data()); MTPDp_q_inner_data &v(_p_q_inner_data()); 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 { const MTPDp_q_inner_data &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 MTPp_Q_inner_data::MTPp_Q_inner_data(MTPDp_q_inner_data *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPserver_DH_Params::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_server_DH_params_fail: _type = cons; { if (!data) setData(new MTPDserver_DH_params_fail()); MTPDserver_DH_params_fail &v(_server_DH_params_fail()); 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; { if (!data) setData(new MTPDserver_DH_params_ok()); MTPDserver_DH_params_ok &v(_server_DH_params_ok()); 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: { const MTPDserver_DH_params_fail &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: { const MTPDserver_DH_params_ok &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) : mtpDataOwner(0), _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 MTPserver_DH_Params::MTPserver_DH_Params(MTPDserver_DH_params_fail *_data) : mtpDataOwner(_data), _type(mtpc_server_DH_params_fail) { } inline MTPserver_DH_Params::MTPserver_DH_Params(MTPDserver_DH_params_ok *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDserver_DH_inner_data()); MTPDserver_DH_inner_data &v(_server_DH_inner_data()); 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 { const MTPDserver_DH_inner_data &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 MTPserver_DH_inner_data::MTPserver_DH_inner_data(MTPDserver_DH_inner_data *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDclient_DH_inner_data()); MTPDclient_DH_inner_data &v(_client_DH_inner_data()); 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 { const MTPDclient_DH_inner_data &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 MTPclient_DH_Inner_Data::MTPclient_DH_Inner_Data(MTPDclient_DH_inner_data *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPset_client_DH_params_answer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_dh_gen_ok: _type = cons; { if (!data) setData(new MTPDdh_gen_ok()); MTPDdh_gen_ok &v(_dh_gen_ok()); 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; { if (!data) setData(new MTPDdh_gen_retry()); MTPDdh_gen_retry &v(_dh_gen_retry()); 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; { if (!data) setData(new MTPDdh_gen_fail()); MTPDdh_gen_fail &v(_dh_gen_fail()); 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: { const MTPDdh_gen_ok &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: { const MTPDdh_gen_retry &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: { const MTPDdh_gen_fail &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) : mtpDataOwner(0), _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 MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(MTPDdh_gen_ok *_data) : mtpDataOwner(_data), _type(mtpc_dh_gen_ok) { } inline MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(MTPDdh_gen_retry *_data) : mtpDataOwner(_data), _type(mtpc_dh_gen_retry) { } inline MTPset_client_DH_params_answer::MTPset_client_DH_params_answer(MTPDdh_gen_fail *_data) : mtpDataOwner(_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 MTPmsgsAck::MTPmsgsAck() : mtpDataOwner(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"); if (!data) setData(new MTPDmsgs_ack()); MTPDmsgs_ack &v(_msgs_ack()); v.vmsg_ids.read(from, end); } inline void MTPmsgsAck::write(mtpBuffer &to) const { const MTPDmsgs_ack &v(c_msgs_ack()); v.vmsg_ids.write(to); } inline MTPmsgsAck::MTPmsgsAck(MTPDmsgs_ack *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPbadMsgNotification::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_bad_msg_notification: _type = cons; { if (!data) setData(new MTPDbad_msg_notification()); MTPDbad_msg_notification &v(_bad_msg_notification()); 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; { if (!data) setData(new MTPDbad_server_salt()); MTPDbad_server_salt &v(_bad_server_salt()); 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: { const MTPDbad_msg_notification &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: { const MTPDbad_server_salt &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) : mtpDataOwner(0), _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 MTPbadMsgNotification::MTPbadMsgNotification(MTPDbad_msg_notification *_data) : mtpDataOwner(_data), _type(mtpc_bad_msg_notification) { } inline MTPbadMsgNotification::MTPbadMsgNotification(MTPDbad_server_salt *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmsgs_state_req()); MTPDmsgs_state_req &v(_msgs_state_req()); v.vmsg_ids.read(from, end); } inline void MTPmsgsStateReq::write(mtpBuffer &to) const { const MTPDmsgs_state_req &v(c_msgs_state_req()); v.vmsg_ids.write(to); } inline MTPmsgsStateReq::MTPmsgsStateReq(MTPDmsgs_state_req *_data) : mtpDataOwner(_data) { } inline MTPmsgsStateReq MTP_msgs_state_req(const MTPVector &_msg_ids) { return MTP::internal::TypeCreator::new_msgs_state_req(_msg_ids); } inline MTPmsgsStateInfo::MTPmsgsStateInfo() : mtpDataOwner(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"); if (!data) setData(new MTPDmsgs_state_info()); MTPDmsgs_state_info &v(_msgs_state_info()); v.vreq_msg_id.read(from, end); v.vinfo.read(from, end); } inline void MTPmsgsStateInfo::write(mtpBuffer &to) const { const MTPDmsgs_state_info &v(c_msgs_state_info()); v.vreq_msg_id.write(to); v.vinfo.write(to); } inline MTPmsgsStateInfo::MTPmsgsStateInfo(MTPDmsgs_state_info *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmsgs_all_info()); MTPDmsgs_all_info &v(_msgs_all_info()); v.vmsg_ids.read(from, end); v.vinfo.read(from, end); } inline void MTPmsgsAllInfo::write(mtpBuffer &to) const { const MTPDmsgs_all_info &v(c_msgs_all_info()); v.vmsg_ids.write(to); v.vinfo.write(to); } inline MTPmsgsAllInfo::MTPmsgsAllInfo(MTPDmsgs_all_info *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmsgDetailedInfo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_msg_detailed_info: _type = cons; { if (!data) setData(new MTPDmsg_detailed_info()); MTPDmsg_detailed_info &v(_msg_detailed_info()); 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; { if (!data) setData(new MTPDmsg_new_detailed_info()); MTPDmsg_new_detailed_info &v(_msg_new_detailed_info()); 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: { const MTPDmsg_detailed_info &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: { const MTPDmsg_new_detailed_info &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) : mtpDataOwner(0), _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 MTPmsgDetailedInfo::MTPmsgDetailedInfo(MTPDmsg_detailed_info *_data) : mtpDataOwner(_data), _type(mtpc_msg_detailed_info) { } inline MTPmsgDetailedInfo::MTPmsgDetailedInfo(MTPDmsg_new_detailed_info *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmsg_resend_req()); MTPDmsg_resend_req &v(_msg_resend_req()); v.vmsg_ids.read(from, end); } inline void MTPmsgResendReq::write(mtpBuffer &to) const { const MTPDmsg_resend_req &v(c_msg_resend_req()); v.vmsg_ids.write(to); } inline MTPmsgResendReq::MTPmsgResendReq(MTPDmsg_resend_req *_data) : mtpDataOwner(_data) { } inline MTPmsgResendReq MTP_msg_resend_req(const MTPVector &_msg_ids) { return MTP::internal::TypeCreator::new_msg_resend_req(_msg_ids); } inline MTPrpcError::MTPrpcError() : mtpDataOwner(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"); if (!data) setData(new MTPDrpc_error()); MTPDrpc_error &v(_rpc_error()); v.verror_code.read(from, end); v.verror_message.read(from, end); } inline void MTPrpcError::write(mtpBuffer &to) const { const MTPDrpc_error &v(c_rpc_error()); v.verror_code.write(to); v.verror_message.write(to); } inline MTPrpcError::MTPrpcError(MTPDrpc_error *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPrpcDropAnswer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); 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; { if (!data) setData(new MTPDrpc_answer_dropped()); MTPDrpc_answer_dropped &v(_rpc_answer_dropped()); 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: { const MTPDrpc_answer_dropped &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) : mtpDataOwner(0), _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 MTPrpcDropAnswer::MTPrpcDropAnswer(MTPDrpc_answer_dropped *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDfuture_salt()); MTPDfuture_salt &v(_future_salt()); v.vvalid_since.read(from, end); v.vvalid_until.read(from, end); v.vsalt.read(from, end); } inline void MTPfutureSalt::write(mtpBuffer &to) const { const MTPDfuture_salt &v(c_future_salt()); v.vvalid_since.write(to); v.vvalid_until.write(to); v.vsalt.write(to); } inline MTPfutureSalt::MTPfutureSalt(MTPDfuture_salt *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDfuture_salts()); MTPDfuture_salts &v(_future_salts()); v.vreq_msg_id.read(from, end); v.vnow.read(from, end); v.vsalts.read(from, end); } inline void MTPfutureSalts::write(mtpBuffer &to) const { const MTPDfuture_salts &v(c_future_salts()); v.vreq_msg_id.write(to); v.vnow.write(to); v.vsalts.write(to); } inline MTPfutureSalts::MTPfutureSalts(MTPDfuture_salts *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDpong()); MTPDpong &v(_pong()); v.vmsg_id.read(from, end); v.vping_id.read(from, end); } inline void MTPpong::write(mtpBuffer &to) const { const MTPDpong &v(c_pong()); v.vmsg_id.write(to); v.vping_id.write(to); } inline MTPpong::MTPpong(MTPDpong *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPdestroySessionRes::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_destroy_session_ok: _type = cons; { if (!data) setData(new MTPDdestroy_session_ok()); MTPDdestroy_session_ok &v(_destroy_session_ok()); v.vsession_id.read(from, end); } break; case mtpc_destroy_session_none: _type = cons; { if (!data) setData(new MTPDdestroy_session_none()); MTPDdestroy_session_none &v(_destroy_session_none()); 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: { const MTPDdestroy_session_ok &v(c_destroy_session_ok()); v.vsession_id.write(to); } break; case mtpc_destroy_session_none: { const MTPDdestroy_session_none &v(c_destroy_session_none()); v.vsession_id.write(to); } break; } } inline MTPdestroySessionRes::MTPdestroySessionRes(mtpTypeId type) : mtpDataOwner(0), _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 MTPdestroySessionRes::MTPdestroySessionRes(MTPDdestroy_session_ok *_data) : mtpDataOwner(_data), _type(mtpc_destroy_session_ok) { } inline MTPdestroySessionRes::MTPdestroySessionRes(MTPDdestroy_session_none *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDnew_session_created()); MTPDnew_session_created &v(_new_session_created()); 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 { const MTPDnew_session_created &v(c_new_session_created()); v.vfirst_msg_id.write(to); v.vunique_id.write(to); v.vserver_salt.write(to); } inline MTPnewSession::MTPnewSession(MTPDnew_session_created *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDhttp_wait()); MTPDhttp_wait &v(_http_wait()); 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 { const MTPDhttp_wait &v(c_http_wait()); v.vmax_delay.write(to); v.vwait_after.write(to); v.vmax_wait.write(to); } inline MTPhttpWait::MTPhttpWait(MTPDhttp_wait *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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() : mtpDataOwner(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"); if (!data) setData(new MTPDerror()); MTPDerror &v(_error()); v.vcode.read(from, end); v.vtext.read(from, end); } inline void MTPerror::write(mtpBuffer &to) const { const MTPDerror &v(c_error()); v.vcode.write(to); v.vtext.write(to); } inline MTPerror::MTPerror(MTPDerror *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputPeerEmpty: _type = cons; break; case mtpc_inputPeerSelf: _type = cons; break; case mtpc_inputPeerChat: _type = cons; { if (!data) setData(new MTPDinputPeerChat()); MTPDinputPeerChat &v(_inputPeerChat()); v.vchat_id.read(from, end); } break; case mtpc_inputPeerUser: _type = cons; { if (!data) setData(new MTPDinputPeerUser()); MTPDinputPeerUser &v(_inputPeerUser()); v.vuser_id.read(from, end); v.vaccess_hash.read(from, end); } break; case mtpc_inputPeerChannel: _type = cons; { if (!data) setData(new MTPDinputPeerChannel()); MTPDinputPeerChannel &v(_inputPeerChannel()); 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: { const MTPDinputPeerChat &v(c_inputPeerChat()); v.vchat_id.write(to); } break; case mtpc_inputPeerUser: { const MTPDinputPeerUser &v(c_inputPeerUser()); v.vuser_id.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputPeerChannel: { const MTPDinputPeerChannel &v(c_inputPeerChannel()); v.vchannel_id.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputPeer::MTPinputPeer(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputPeer::MTPinputPeer(MTPDinputPeerChat *_data) : mtpDataOwner(_data), _type(mtpc_inputPeerChat) { } inline MTPinputPeer::MTPinputPeer(MTPDinputPeerUser *_data) : mtpDataOwner(_data), _type(mtpc_inputPeerUser) { } inline MTPinputPeer::MTPinputPeer(MTPDinputPeerChannel *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputUser::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputUserEmpty: _type = cons; break; case mtpc_inputUserSelf: _type = cons; break; case mtpc_inputUser: _type = cons; { if (!data) setData(new MTPDinputUser()); MTPDinputUser &v(_inputUser()); 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: { const MTPDinputUser &v(c_inputUser()); v.vuser_id.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputUser::MTPinputUser(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputUser::MTPinputUser(MTPDinputUser *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDinputPhoneContact()); MTPDinputPhoneContact &v(_inputPhoneContact()); 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 { const MTPDinputPhoneContact &v(c_inputPhoneContact()); v.vclient_id.write(to); v.vphone.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); } inline MTPinputContact::MTPinputContact(MTPDinputPhoneContact *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputFile::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputFile: _type = cons; { if (!data) setData(new MTPDinputFile()); MTPDinputFile &v(_inputFile()); 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; { if (!data) setData(new MTPDinputFileBig()); MTPDinputFileBig &v(_inputFileBig()); 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: { const MTPDinputFile &v(c_inputFile()); v.vid.write(to); v.vparts.write(to); v.vname.write(to); v.vmd5_checksum.write(to); } break; case mtpc_inputFileBig: { const MTPDinputFileBig &v(c_inputFileBig()); v.vid.write(to); v.vparts.write(to); v.vname.write(to); } break; } } inline MTPinputFile::MTPinputFile(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputFile: setData(new MTPDinputFile()); break; case mtpc_inputFileBig: setData(new MTPDinputFileBig()); break; default: throw mtpErrorBadTypeId(type, "MTPinputFile"); } } inline MTPinputFile::MTPinputFile(MTPDinputFile *_data) : mtpDataOwner(_data), _type(mtpc_inputFile) { } inline MTPinputFile::MTPinputFile(MTPDinputFileBig *_data) : mtpDataOwner(_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.vfile.innerLength() + v.vcaption.innerLength(); } 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.vfile.innerLength() + v.vmime_type.innerLength() + v.vattributes.innerLength() + v.vcaption.innerLength(); } case mtpc_inputMediaUploadedThumbDocument: { const MTPDinputMediaUploadedThumbDocument &v(c_inputMediaUploadedThumbDocument()); return v.vfile.innerLength() + v.vthumb.innerLength() + v.vmime_type.innerLength() + v.vattributes.innerLength() + v.vcaption.innerLength(); } 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(); } } return 0; } inline mtpTypeId MTPinputMedia::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputMediaEmpty: _type = cons; break; case mtpc_inputMediaUploadedPhoto: _type = cons; { if (!data) setData(new MTPDinputMediaUploadedPhoto()); MTPDinputMediaUploadedPhoto &v(_inputMediaUploadedPhoto()); v.vfile.read(from, end); v.vcaption.read(from, end); } break; case mtpc_inputMediaPhoto: _type = cons; { if (!data) setData(new MTPDinputMediaPhoto()); MTPDinputMediaPhoto &v(_inputMediaPhoto()); v.vid.read(from, end); v.vcaption.read(from, end); } break; case mtpc_inputMediaGeoPoint: _type = cons; { if (!data) setData(new MTPDinputMediaGeoPoint()); MTPDinputMediaGeoPoint &v(_inputMediaGeoPoint()); v.vgeo_point.read(from, end); } break; case mtpc_inputMediaContact: _type = cons; { if (!data) setData(new MTPDinputMediaContact()); MTPDinputMediaContact &v(_inputMediaContact()); v.vphone_number.read(from, end); v.vfirst_name.read(from, end); v.vlast_name.read(from, end); } break; case mtpc_inputMediaUploadedDocument: _type = cons; { if (!data) setData(new MTPDinputMediaUploadedDocument()); MTPDinputMediaUploadedDocument &v(_inputMediaUploadedDocument()); v.vfile.read(from, end); v.vmime_type.read(from, end); v.vattributes.read(from, end); v.vcaption.read(from, end); } break; case mtpc_inputMediaUploadedThumbDocument: _type = cons; { if (!data) setData(new MTPDinputMediaUploadedThumbDocument()); MTPDinputMediaUploadedThumbDocument &v(_inputMediaUploadedThumbDocument()); 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); } break; case mtpc_inputMediaDocument: _type = cons; { if (!data) setData(new MTPDinputMediaDocument()); MTPDinputMediaDocument &v(_inputMediaDocument()); v.vid.read(from, end); v.vcaption.read(from, end); } break; case mtpc_inputMediaVenue: _type = cons; { if (!data) setData(new MTPDinputMediaVenue()); MTPDinputMediaVenue &v(_inputMediaVenue()); 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; { if (!data) setData(new MTPDinputMediaGifExternal()); MTPDinputMediaGifExternal &v(_inputMediaGifExternal()); v.vurl.read(from, end); v.vq.read(from, end); } break; case mtpc_inputMediaPhotoExternal: _type = cons; { if (!data) setData(new MTPDinputMediaPhotoExternal()); MTPDinputMediaPhotoExternal &v(_inputMediaPhotoExternal()); v.vurl.read(from, end); v.vcaption.read(from, end); } break; case mtpc_inputMediaDocumentExternal: _type = cons; { if (!data) setData(new MTPDinputMediaDocumentExternal()); MTPDinputMediaDocumentExternal &v(_inputMediaDocumentExternal()); v.vurl.read(from, end); v.vcaption.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputMedia"); } } inline void MTPinputMedia::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputMediaUploadedPhoto: { const MTPDinputMediaUploadedPhoto &v(c_inputMediaUploadedPhoto()); v.vfile.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaPhoto: { const MTPDinputMediaPhoto &v(c_inputMediaPhoto()); v.vid.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaGeoPoint: { const MTPDinputMediaGeoPoint &v(c_inputMediaGeoPoint()); v.vgeo_point.write(to); } break; case mtpc_inputMediaContact: { const MTPDinputMediaContact &v(c_inputMediaContact()); v.vphone_number.write(to); v.vfirst_name.write(to); v.vlast_name.write(to); } break; case mtpc_inputMediaUploadedDocument: { const MTPDinputMediaUploadedDocument &v(c_inputMediaUploadedDocument()); v.vfile.write(to); v.vmime_type.write(to); v.vattributes.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaUploadedThumbDocument: { const MTPDinputMediaUploadedThumbDocument &v(c_inputMediaUploadedThumbDocument()); v.vfile.write(to); v.vthumb.write(to); v.vmime_type.write(to); v.vattributes.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaDocument: { const MTPDinputMediaDocument &v(c_inputMediaDocument()); v.vid.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaVenue: { const MTPDinputMediaVenue &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: { const MTPDinputMediaGifExternal &v(c_inputMediaGifExternal()); v.vurl.write(to); v.vq.write(to); } break; case mtpc_inputMediaPhotoExternal: { const MTPDinputMediaPhotoExternal &v(c_inputMediaPhotoExternal()); v.vurl.write(to); v.vcaption.write(to); } break; case mtpc_inputMediaDocumentExternal: { const MTPDinputMediaDocumentExternal &v(c_inputMediaDocumentExternal()); v.vurl.write(to); v.vcaption.write(to); } break; } } inline MTPinputMedia::MTPinputMedia(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPinputMedia"); } } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedPhoto *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedPhoto) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaPhoto *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaPhoto) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaGeoPoint *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaGeoPoint) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaContact *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaContact) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedDocument) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedThumbDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedThumbDocument) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaDocument) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaVenue *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaVenue) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaGifExternal *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaGifExternal) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaPhotoExternal *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaPhotoExternal) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaDocumentExternal *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaDocumentExternal) { } inline MTPinputMedia MTP_inputMediaEmpty() { return MTP::internal::TypeCreator::new_inputMediaEmpty(); } inline MTPinputMedia MTP_inputMediaUploadedPhoto(const MTPInputFile &_file, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaUploadedPhoto(_file, _caption); } 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); } inline MTPinputMedia MTP_inputMediaUploadedDocument(const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaUploadedDocument(_file, _mime_type, _attributes, _caption); } inline MTPinputMedia MTP_inputMediaUploadedThumbDocument(const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) { return MTP::internal::TypeCreator::new_inputMediaUploadedThumbDocument(_file, _thumb, _mime_type, _attributes, _caption); } 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 uint32 MTPinputChatPhoto::innerLength() const { switch (_type) { case mtpc_inputChatUploadedPhoto: { const MTPDinputChatUploadedPhoto &v(c_inputChatUploadedPhoto()); return v.vfile.innerLength() + v.vcrop.innerLength(); } case mtpc_inputChatPhoto: { const MTPDinputChatPhoto &v(c_inputChatPhoto()); return v.vid.innerLength() + v.vcrop.innerLength(); } } return 0; } inline mtpTypeId MTPinputChatPhoto::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputChatPhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputChatPhotoEmpty: _type = cons; break; case mtpc_inputChatUploadedPhoto: _type = cons; { if (!data) setData(new MTPDinputChatUploadedPhoto()); MTPDinputChatUploadedPhoto &v(_inputChatUploadedPhoto()); v.vfile.read(from, end); v.vcrop.read(from, end); } break; case mtpc_inputChatPhoto: _type = cons; { if (!data) setData(new MTPDinputChatPhoto()); MTPDinputChatPhoto &v(_inputChatPhoto()); v.vid.read(from, end); v.vcrop.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputChatPhoto"); } } inline void MTPinputChatPhoto::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputChatUploadedPhoto: { const MTPDinputChatUploadedPhoto &v(c_inputChatUploadedPhoto()); v.vfile.write(to); v.vcrop.write(to); } break; case mtpc_inputChatPhoto: { const MTPDinputChatPhoto &v(c_inputChatPhoto()); v.vid.write(to); v.vcrop.write(to); } break; } } inline MTPinputChatPhoto::MTPinputChatPhoto(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputChatPhoto::MTPinputChatPhoto(MTPDinputChatUploadedPhoto *_data) : mtpDataOwner(_data), _type(mtpc_inputChatUploadedPhoto) { } inline MTPinputChatPhoto::MTPinputChatPhoto(MTPDinputChatPhoto *_data) : mtpDataOwner(_data), _type(mtpc_inputChatPhoto) { } inline MTPinputChatPhoto MTP_inputChatPhotoEmpty() { return MTP::internal::TypeCreator::new_inputChatPhotoEmpty(); } inline MTPinputChatPhoto MTP_inputChatUploadedPhoto(const MTPInputFile &_file, const MTPInputPhotoCrop &_crop) { return MTP::internal::TypeCreator::new_inputChatUploadedPhoto(_file, _crop); } inline MTPinputChatPhoto MTP_inputChatPhoto(const MTPInputPhoto &_id, const MTPInputPhotoCrop &_crop) { return MTP::internal::TypeCreator::new_inputChatPhoto(_id, _crop); } 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputGeoPoint::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputGeoPointEmpty: _type = cons; break; case mtpc_inputGeoPoint: _type = cons; { if (!data) setData(new MTPDinputGeoPoint()); MTPDinputGeoPoint &v(_inputGeoPoint()); 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: { const MTPDinputGeoPoint &v(c_inputGeoPoint()); v.vlat.write(to); v.vlong.write(to); } break; } } inline MTPinputGeoPoint::MTPinputGeoPoint(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputGeoPointEmpty: break; case mtpc_inputGeoPoint: setData(new MTPDinputGeoPoint()); break; default: throw mtpErrorBadTypeId(type, "MTPinputGeoPoint"); } } inline MTPinputGeoPoint::MTPinputGeoPoint(MTPDinputGeoPoint *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputPhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputPhotoEmpty: _type = cons; break; case mtpc_inputPhoto: _type = cons; { if (!data) setData(new MTPDinputPhoto()); MTPDinputPhoto &v(_inputPhoto()); 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: { const MTPDinputPhoto &v(c_inputPhoto()); v.vid.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputPhoto::MTPinputPhoto(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputPhotoEmpty: break; case mtpc_inputPhoto: setData(new MTPDinputPhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPinputPhoto"); } } inline MTPinputPhoto::MTPinputPhoto(MTPDinputPhoto *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputFileLocation::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputFileLocation: _type = cons; { if (!data) setData(new MTPDinputFileLocation()); MTPDinputFileLocation &v(_inputFileLocation()); v.vvolume_id.read(from, end); v.vlocal_id.read(from, end); v.vsecret.read(from, end); } break; case mtpc_inputEncryptedFileLocation: _type = cons; { if (!data) setData(new MTPDinputEncryptedFileLocation()); MTPDinputEncryptedFileLocation &v(_inputEncryptedFileLocation()); v.vid.read(from, end); v.vaccess_hash.read(from, end); } break; case mtpc_inputDocumentFileLocation: _type = cons; { if (!data) setData(new MTPDinputDocumentFileLocation()); MTPDinputDocumentFileLocation &v(_inputDocumentFileLocation()); 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: { const MTPDinputFileLocation &v(c_inputFileLocation()); v.vvolume_id.write(to); v.vlocal_id.write(to); v.vsecret.write(to); } break; case mtpc_inputEncryptedFileLocation: { const MTPDinputEncryptedFileLocation &v(c_inputEncryptedFileLocation()); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputDocumentFileLocation: { const MTPDinputDocumentFileLocation &v(c_inputDocumentFileLocation()); v.vid.write(to); v.vaccess_hash.write(to); v.vversion.write(to); } break; } } inline MTPinputFileLocation::MTPinputFileLocation(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputFileLocation::MTPinputFileLocation(MTPDinputFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputFileLocation) { } inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputEncryptedFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputEncryptedFileLocation) { } inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputDocumentFileLocation *_data) : mtpDataOwner(_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 uint32 MTPinputPhotoCrop::innerLength() const { switch (_type) { case mtpc_inputPhotoCrop: { const MTPDinputPhotoCrop &v(c_inputPhotoCrop()); return v.vcrop_left.innerLength() + v.vcrop_top.innerLength() + v.vcrop_width.innerLength(); } } return 0; } inline mtpTypeId MTPinputPhotoCrop::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputPhotoCrop::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputPhotoCropAuto: _type = cons; break; case mtpc_inputPhotoCrop: _type = cons; { if (!data) setData(new MTPDinputPhotoCrop()); MTPDinputPhotoCrop &v(_inputPhotoCrop()); v.vcrop_left.read(from, end); v.vcrop_top.read(from, end); v.vcrop_width.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputPhotoCrop"); } } inline void MTPinputPhotoCrop::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputPhotoCrop: { const MTPDinputPhotoCrop &v(c_inputPhotoCrop()); v.vcrop_left.write(to); v.vcrop_top.write(to); v.vcrop_width.write(to); } break; } } inline MTPinputPhotoCrop::MTPinputPhotoCrop(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputPhotoCropAuto: break; case mtpc_inputPhotoCrop: setData(new MTPDinputPhotoCrop()); break; default: throw mtpErrorBadTypeId(type, "MTPinputPhotoCrop"); } } inline MTPinputPhotoCrop::MTPinputPhotoCrop(MTPDinputPhotoCrop *_data) : mtpDataOwner(_data), _type(mtpc_inputPhotoCrop) { } inline MTPinputPhotoCrop MTP_inputPhotoCropAuto() { return MTP::internal::TypeCreator::new_inputPhotoCropAuto(); } inline MTPinputPhotoCrop MTP_inputPhotoCrop(const MTPdouble &_crop_left, const MTPdouble &_crop_top, const MTPdouble &_crop_width) { return MTP::internal::TypeCreator::new_inputPhotoCrop(_crop_left, _crop_top, _crop_width); } inline MTPinputAppEvent::MTPinputAppEvent() : mtpDataOwner(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"); if (!data) setData(new MTPDinputAppEvent()); MTPDinputAppEvent &v(_inputAppEvent()); 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 { const MTPDinputAppEvent &v(c_inputAppEvent()); v.vtime.write(to); v.vtype.write(to); v.vpeer.write(to); v.vdata.write(to); } inline MTPinputAppEvent::MTPinputAppEvent(MTPDinputAppEvent *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPpeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_peerUser: _type = cons; { if (!data) setData(new MTPDpeerUser()); MTPDpeerUser &v(_peerUser()); v.vuser_id.read(from, end); } break; case mtpc_peerChat: _type = cons; { if (!data) setData(new MTPDpeerChat()); MTPDpeerChat &v(_peerChat()); v.vchat_id.read(from, end); } break; case mtpc_peerChannel: _type = cons; { if (!data) setData(new MTPDpeerChannel()); MTPDpeerChannel &v(_peerChannel()); v.vchannel_id.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPpeer"); } } inline void MTPpeer::write(mtpBuffer &to) const { switch (_type) { case mtpc_peerUser: { const MTPDpeerUser &v(c_peerUser()); v.vuser_id.write(to); } break; case mtpc_peerChat: { const MTPDpeerChat &v(c_peerChat()); v.vchat_id.write(to); } break; case mtpc_peerChannel: { const MTPDpeerChannel &v(c_peerChannel()); v.vchannel_id.write(to); } break; } } inline MTPpeer::MTPpeer(mtpTypeId type) : mtpDataOwner(0), _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 MTPpeer::MTPpeer(MTPDpeerUser *_data) : mtpDataOwner(_data), _type(mtpc_peerUser) { } inline MTPpeer::MTPpeer(MTPDpeerChat *_data) : mtpDataOwner(_data), _type(mtpc_peerChat) { } inline MTPpeer::MTPpeer(MTPDpeerChannel *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPfileLocation::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_fileLocationUnavailable: _type = cons; { if (!data) setData(new MTPDfileLocationUnavailable()); MTPDfileLocationUnavailable &v(_fileLocationUnavailable()); v.vvolume_id.read(from, end); v.vlocal_id.read(from, end); v.vsecret.read(from, end); } break; case mtpc_fileLocation: _type = cons; { if (!data) setData(new MTPDfileLocation()); MTPDfileLocation &v(_fileLocation()); 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: { const MTPDfileLocationUnavailable &v(c_fileLocationUnavailable()); v.vvolume_id.write(to); v.vlocal_id.write(to); v.vsecret.write(to); } break; case mtpc_fileLocation: { const MTPDfileLocation &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_fileLocationUnavailable: setData(new MTPDfileLocationUnavailable()); break; case mtpc_fileLocation: setData(new MTPDfileLocation()); break; default: throw mtpErrorBadTypeId(type, "MTPfileLocation"); } } inline MTPfileLocation::MTPfileLocation(MTPDfileLocationUnavailable *_data) : mtpDataOwner(_data), _type(mtpc_fileLocationUnavailable) { } inline MTPfileLocation::MTPfileLocation(MTPDfileLocation *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPuser::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_userEmpty: _type = cons; { if (!data) setData(new MTPDuserEmpty()); MTPDuserEmpty &v(_userEmpty()); v.vid.read(from, end); } break; case mtpc_user: _type = cons; { if (!data) setData(new MTPDuser()); MTPDuser &v(_user()); 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: { const MTPDuserEmpty &v(c_userEmpty()); v.vid.write(to); } break; case mtpc_user: { const MTPDuser &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_userEmpty: setData(new MTPDuserEmpty()); break; case mtpc_user: setData(new MTPDuser()); break; default: throw mtpErrorBadTypeId(type, "MTPuser"); } } inline MTPuser::MTPuser(MTPDuserEmpty *_data) : mtpDataOwner(_data), _type(mtpc_userEmpty) { } inline MTPuser::MTPuser(MTPDuser *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPuserProfilePhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_userProfilePhotoEmpty: _type = cons; break; case mtpc_userProfilePhoto: _type = cons; { if (!data) setData(new MTPDuserProfilePhoto()); MTPDuserProfilePhoto &v(_userProfilePhoto()); 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: { const MTPDuserProfilePhoto &v(c_userProfilePhoto()); v.vphoto_id.write(to); v.vphoto_small.write(to); v.vphoto_big.write(to); } break; } } inline MTPuserProfilePhoto::MTPuserProfilePhoto(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_userProfilePhotoEmpty: break; case mtpc_userProfilePhoto: setData(new MTPDuserProfilePhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPuserProfilePhoto"); } } inline MTPuserProfilePhoto::MTPuserProfilePhoto(MTPDuserProfilePhoto *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPuserStatus::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_userStatusEmpty: _type = cons; break; case mtpc_userStatusOnline: _type = cons; { if (!data) setData(new MTPDuserStatusOnline()); MTPDuserStatusOnline &v(_userStatusOnline()); v.vexpires.read(from, end); } break; case mtpc_userStatusOffline: _type = cons; { if (!data) setData(new MTPDuserStatusOffline()); MTPDuserStatusOffline &v(_userStatusOffline()); 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: { const MTPDuserStatusOnline &v(c_userStatusOnline()); v.vexpires.write(to); } break; case mtpc_userStatusOffline: { const MTPDuserStatusOffline &v(c_userStatusOffline()); v.vwas_online.write(to); } break; } } inline MTPuserStatus::MTPuserStatus(mtpTypeId type) : mtpDataOwner(0), _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 MTPuserStatus::MTPuserStatus(MTPDuserStatusOnline *_data) : mtpDataOwner(_data), _type(mtpc_userStatusOnline) { } inline MTPuserStatus::MTPuserStatus(MTPDuserStatusOffline *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchat::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatEmpty: _type = cons; { if (!data) setData(new MTPDchatEmpty()); MTPDchatEmpty &v(_chatEmpty()); v.vid.read(from, end); } break; case mtpc_chat: _type = cons; { if (!data) setData(new MTPDchat()); MTPDchat &v(_chat()); 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; { if (!data) setData(new MTPDchatForbidden()); MTPDchatForbidden &v(_chatForbidden()); v.vid.read(from, end); v.vtitle.read(from, end); } break; case mtpc_channel: _type = cons; { if (!data) setData(new MTPDchannel()); MTPDchannel &v(_channel()); 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; { if (!data) setData(new MTPDchannelForbidden()); MTPDchannelForbidden &v(_channelForbidden()); 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: { const MTPDchatEmpty &v(c_chatEmpty()); v.vid.write(to); } break; case mtpc_chat: { const MTPDchat &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: { const MTPDchatForbidden &v(c_chatForbidden()); v.vid.write(to); v.vtitle.write(to); } break; case mtpc_channel: { const MTPDchannel &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: { const MTPDchannelForbidden &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) : mtpDataOwner(0), _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 MTPchat::MTPchat(MTPDchatEmpty *_data) : mtpDataOwner(_data), _type(mtpc_chatEmpty) { } inline MTPchat::MTPchat(MTPDchat *_data) : mtpDataOwner(_data), _type(mtpc_chat) { } inline MTPchat::MTPchat(MTPDchatForbidden *_data) : mtpDataOwner(_data), _type(mtpc_chatForbidden) { } inline MTPchat::MTPchat(MTPDchannel *_data) : mtpDataOwner(_data), _type(mtpc_channel) { } inline MTPchat::MTPchat(MTPDchannelForbidden *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchatFull::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatFull: _type = cons; { if (!data) setData(new MTPDchatFull()); MTPDchatFull &v(_chatFull()); 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; { if (!data) setData(new MTPDchannelFull()); MTPDchannelFull &v(_channelFull()); 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: { const MTPDchatFull &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: { const MTPDchannelFull &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_chatFull: setData(new MTPDchatFull()); break; case mtpc_channelFull: setData(new MTPDchannelFull()); break; default: throw mtpErrorBadTypeId(type, "MTPchatFull"); } } inline MTPchatFull::MTPchatFull(MTPDchatFull *_data) : mtpDataOwner(_data), _type(mtpc_chatFull) { } inline MTPchatFull::MTPchatFull(MTPDchannelFull *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchatParticipant::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatParticipant: _type = cons; { if (!data) setData(new MTPDchatParticipant()); MTPDchatParticipant &v(_chatParticipant()); v.vuser_id.read(from, end); v.vinviter_id.read(from, end); v.vdate.read(from, end); } break; case mtpc_chatParticipantCreator: _type = cons; { if (!data) setData(new MTPDchatParticipantCreator()); MTPDchatParticipantCreator &v(_chatParticipantCreator()); v.vuser_id.read(from, end); } break; case mtpc_chatParticipantAdmin: _type = cons; { if (!data) setData(new MTPDchatParticipantAdmin()); MTPDchatParticipantAdmin &v(_chatParticipantAdmin()); 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: { const MTPDchatParticipant &v(c_chatParticipant()); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_chatParticipantCreator: { const MTPDchatParticipantCreator &v(c_chatParticipantCreator()); v.vuser_id.write(to); } break; case mtpc_chatParticipantAdmin: { const MTPDchatParticipantAdmin &v(c_chatParticipantAdmin()); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; } } inline MTPchatParticipant::MTPchatParticipant(mtpTypeId type) : mtpDataOwner(0), _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 MTPchatParticipant::MTPchatParticipant(MTPDchatParticipant *_data) : mtpDataOwner(_data), _type(mtpc_chatParticipant) { } inline MTPchatParticipant::MTPchatParticipant(MTPDchatParticipantCreator *_data) : mtpDataOwner(_data), _type(mtpc_chatParticipantCreator) { } inline MTPchatParticipant::MTPchatParticipant(MTPDchatParticipantAdmin *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchatParticipants::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatParticipantsForbidden: _type = cons; { if (!data) setData(new MTPDchatParticipantsForbidden()); MTPDchatParticipantsForbidden &v(_chatParticipantsForbidden()); 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; { if (!data) setData(new MTPDchatParticipants()); MTPDchatParticipants &v(_chatParticipants()); 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: { const MTPDchatParticipantsForbidden &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: { const MTPDchatParticipants &v(c_chatParticipants()); v.vchat_id.write(to); v.vparticipants.write(to); v.vversion.write(to); } break; } } inline MTPchatParticipants::MTPchatParticipants(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_chatParticipantsForbidden: setData(new MTPDchatParticipantsForbidden()); break; case mtpc_chatParticipants: setData(new MTPDchatParticipants()); break; default: throw mtpErrorBadTypeId(type, "MTPchatParticipants"); } } inline MTPchatParticipants::MTPchatParticipants(MTPDchatParticipantsForbidden *_data) : mtpDataOwner(_data), _type(mtpc_chatParticipantsForbidden) { } inline MTPchatParticipants::MTPchatParticipants(MTPDchatParticipants *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchatPhoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatPhotoEmpty: _type = cons; break; case mtpc_chatPhoto: _type = cons; { if (!data) setData(new MTPDchatPhoto()); MTPDchatPhoto &v(_chatPhoto()); 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: { const MTPDchatPhoto &v(c_chatPhoto()); v.vphoto_small.write(to); v.vphoto_big.write(to); } break; } } inline MTPchatPhoto::MTPchatPhoto(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_chatPhotoEmpty: break; case mtpc_chatPhoto: setData(new MTPDchatPhoto()); break; default: throw mtpErrorBadTypeId(type, "MTPchatPhoto"); } } inline MTPchatPhoto::MTPchatPhoto(MTPDchatPhoto *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messageEmpty: _type = cons; { if (!data) setData(new MTPDmessageEmpty()); MTPDmessageEmpty &v(_messageEmpty()); v.vid.read(from, end); } break; case mtpc_message: _type = cons; { if (!data) setData(new MTPDmessage()); MTPDmessage &v(_message()); 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; { if (!data) setData(new MTPDmessageService()); MTPDmessageService &v(_messageService()); 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: { const MTPDmessageEmpty &v(c_messageEmpty()); v.vid.write(to); } break; case mtpc_message: { const MTPDmessage &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: { const MTPDmessageService &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) : mtpDataOwner(0), _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 MTPmessage::MTPmessage(MTPDmessageEmpty *_data) : mtpDataOwner(_data), _type(mtpc_messageEmpty) { } inline MTPmessage::MTPmessage(MTPDmessage *_data) : mtpDataOwner(_data), _type(mtpc_message) { } inline MTPmessage::MTPmessage(MTPDmessageService *_data) : mtpDataOwner(_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(); } } return 0; } inline mtpTypeId MTPmessageMedia::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessageMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messageMediaEmpty: _type = cons; break; case mtpc_messageMediaPhoto: _type = cons; { if (!data) setData(new MTPDmessageMediaPhoto()); MTPDmessageMediaPhoto &v(_messageMediaPhoto()); v.vphoto.read(from, end); v.vcaption.read(from, end); } break; case mtpc_messageMediaGeo: _type = cons; { if (!data) setData(new MTPDmessageMediaGeo()); MTPDmessageMediaGeo &v(_messageMediaGeo()); v.vgeo.read(from, end); } break; case mtpc_messageMediaContact: _type = cons; { if (!data) setData(new MTPDmessageMediaContact()); MTPDmessageMediaContact &v(_messageMediaContact()); 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; { if (!data) setData(new MTPDmessageMediaDocument()); MTPDmessageMediaDocument &v(_messageMediaDocument()); v.vdocument.read(from, end); v.vcaption.read(from, end); } break; case mtpc_messageMediaWebPage: _type = cons; { if (!data) setData(new MTPDmessageMediaWebPage()); MTPDmessageMediaWebPage &v(_messageMediaWebPage()); v.vwebpage.read(from, end); } break; case mtpc_messageMediaVenue: _type = cons; { if (!data) setData(new MTPDmessageMediaVenue()); MTPDmessageMediaVenue &v(_messageMediaVenue()); 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; default: throw mtpErrorUnexpected(cons, "MTPmessageMedia"); } } inline void MTPmessageMedia::write(mtpBuffer &to) const { switch (_type) { case mtpc_messageMediaPhoto: { const MTPDmessageMediaPhoto &v(c_messageMediaPhoto()); v.vphoto.write(to); v.vcaption.write(to); } break; case mtpc_messageMediaGeo: { const MTPDmessageMediaGeo &v(c_messageMediaGeo()); v.vgeo.write(to); } break; case mtpc_messageMediaContact: { const MTPDmessageMediaContact &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: { const MTPDmessageMediaDocument &v(c_messageMediaDocument()); v.vdocument.write(to); v.vcaption.write(to); } break; case mtpc_messageMediaWebPage: { const MTPDmessageMediaWebPage &v(c_messageMediaWebPage()); v.vwebpage.write(to); } break; case mtpc_messageMediaVenue: { const MTPDmessageMediaVenue &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; } } inline MTPmessageMedia::MTPmessageMedia(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPmessageMedia"); } } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaPhoto *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaPhoto) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaGeo *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaGeo) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaContact *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaContact) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaDocument *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaDocument) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaWebPage *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaWebPage) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaVenue *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaVenue) { } 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 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(); } } return 0; } inline mtpTypeId MTPmessageAction::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessageAction::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messageActionEmpty: _type = cons; break; case mtpc_messageActionChatCreate: _type = cons; { if (!data) setData(new MTPDmessageActionChatCreate()); MTPDmessageActionChatCreate &v(_messageActionChatCreate()); v.vtitle.read(from, end); v.vusers.read(from, end); } break; case mtpc_messageActionChatEditTitle: _type = cons; { if (!data) setData(new MTPDmessageActionChatEditTitle()); MTPDmessageActionChatEditTitle &v(_messageActionChatEditTitle()); v.vtitle.read(from, end); } break; case mtpc_messageActionChatEditPhoto: _type = cons; { if (!data) setData(new MTPDmessageActionChatEditPhoto()); MTPDmessageActionChatEditPhoto &v(_messageActionChatEditPhoto()); v.vphoto.read(from, end); } break; case mtpc_messageActionChatDeletePhoto: _type = cons; break; case mtpc_messageActionChatAddUser: _type = cons; { if (!data) setData(new MTPDmessageActionChatAddUser()); MTPDmessageActionChatAddUser &v(_messageActionChatAddUser()); v.vusers.read(from, end); } break; case mtpc_messageActionChatDeleteUser: _type = cons; { if (!data) setData(new MTPDmessageActionChatDeleteUser()); MTPDmessageActionChatDeleteUser &v(_messageActionChatDeleteUser()); v.vuser_id.read(from, end); } break; case mtpc_messageActionChatJoinedByLink: _type = cons; { if (!data) setData(new MTPDmessageActionChatJoinedByLink()); MTPDmessageActionChatJoinedByLink &v(_messageActionChatJoinedByLink()); v.vinviter_id.read(from, end); } break; case mtpc_messageActionChannelCreate: _type = cons; { if (!data) setData(new MTPDmessageActionChannelCreate()); MTPDmessageActionChannelCreate &v(_messageActionChannelCreate()); v.vtitle.read(from, end); } break; case mtpc_messageActionChatMigrateTo: _type = cons; { if (!data) setData(new MTPDmessageActionChatMigrateTo()); MTPDmessageActionChatMigrateTo &v(_messageActionChatMigrateTo()); v.vchannel_id.read(from, end); } break; case mtpc_messageActionChannelMigrateFrom: _type = cons; { if (!data) setData(new MTPDmessageActionChannelMigrateFrom()); MTPDmessageActionChannelMigrateFrom &v(_messageActionChannelMigrateFrom()); v.vtitle.read(from, end); v.vchat_id.read(from, end); } break; case mtpc_messageActionPinMessage: _type = cons; break; case mtpc_messageActionHistoryClear: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPmessageAction"); } } inline void MTPmessageAction::write(mtpBuffer &to) const { switch (_type) { case mtpc_messageActionChatCreate: { const MTPDmessageActionChatCreate &v(c_messageActionChatCreate()); v.vtitle.write(to); v.vusers.write(to); } break; case mtpc_messageActionChatEditTitle: { const MTPDmessageActionChatEditTitle &v(c_messageActionChatEditTitle()); v.vtitle.write(to); } break; case mtpc_messageActionChatEditPhoto: { const MTPDmessageActionChatEditPhoto &v(c_messageActionChatEditPhoto()); v.vphoto.write(to); } break; case mtpc_messageActionChatAddUser: { const MTPDmessageActionChatAddUser &v(c_messageActionChatAddUser()); v.vusers.write(to); } break; case mtpc_messageActionChatDeleteUser: { const MTPDmessageActionChatDeleteUser &v(c_messageActionChatDeleteUser()); v.vuser_id.write(to); } break; case mtpc_messageActionChatJoinedByLink: { const MTPDmessageActionChatJoinedByLink &v(c_messageActionChatJoinedByLink()); v.vinviter_id.write(to); } break; case mtpc_messageActionChannelCreate: { const MTPDmessageActionChannelCreate &v(c_messageActionChannelCreate()); v.vtitle.write(to); } break; case mtpc_messageActionChatMigrateTo: { const MTPDmessageActionChatMigrateTo &v(c_messageActionChatMigrateTo()); v.vchannel_id.write(to); } break; case mtpc_messageActionChannelMigrateFrom: { const MTPDmessageActionChannelMigrateFrom &v(c_messageActionChannelMigrateFrom()); v.vtitle.write(to); v.vchat_id.write(to); } break; } } inline MTPmessageAction::MTPmessageAction(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPmessageAction"); } } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatCreate *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatCreate) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatEditTitle *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatEditTitle) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatEditPhoto *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatEditPhoto) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatAddUser *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatAddUser) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatDeleteUser *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatDeleteUser) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatJoinedByLink *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatJoinedByLink) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChannelCreate *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChannelCreate) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChatMigrateTo *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChatMigrateTo) { } inline MTPmessageAction::MTPmessageAction(MTPDmessageActionChannelMigrateFrom *_data) : mtpDataOwner(_data), _type(mtpc_messageActionChannelMigrateFrom) { } 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 MTPdialog::MTPdialog() : mtpDataOwner(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"); if (!data) setData(new MTPDdialog()); MTPDdialog &v(_dialog()); 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 { const MTPDdialog &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 MTPdialog::MTPdialog(MTPDdialog *_data) : mtpDataOwner(_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.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vsizes.innerLength(); } } return 0; } inline mtpTypeId MTPphoto::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPphoto::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_photoEmpty: _type = cons; { if (!data) setData(new MTPDphotoEmpty()); MTPDphotoEmpty &v(_photoEmpty()); v.vid.read(from, end); } break; case mtpc_photo: _type = cons; { if (!data) setData(new MTPDphoto()); MTPDphoto &v(_photo()); 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: { const MTPDphotoEmpty &v(c_photoEmpty()); v.vid.write(to); } break; case mtpc_photo: { const MTPDphoto &v(c_photo()); v.vid.write(to); v.vaccess_hash.write(to); v.vdate.write(to); v.vsizes.write(to); } break; } } inline MTPphoto::MTPphoto(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_photoEmpty: setData(new MTPDphotoEmpty()); break; case mtpc_photo: setData(new MTPDphoto()); break; default: throw mtpErrorBadTypeId(type, "MTPphoto"); } } inline MTPphoto::MTPphoto(MTPDphotoEmpty *_data) : mtpDataOwner(_data), _type(mtpc_photoEmpty) { } inline MTPphoto::MTPphoto(MTPDphoto *_data) : mtpDataOwner(_data), _type(mtpc_photo) { } inline MTPphoto MTP_photoEmpty(const MTPlong &_id) { return MTP::internal::TypeCreator::new_photoEmpty(_id); } inline MTPphoto MTP_photo(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, const MTPVector &_sizes) { return MTP::internal::TypeCreator::new_photo(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPphotoSize::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_photoSizeEmpty: _type = cons; { if (!data) setData(new MTPDphotoSizeEmpty()); MTPDphotoSizeEmpty &v(_photoSizeEmpty()); v.vtype.read(from, end); } break; case mtpc_photoSize: _type = cons; { if (!data) setData(new MTPDphotoSize()); MTPDphotoSize &v(_photoSize()); 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; { if (!data) setData(new MTPDphotoCachedSize()); MTPDphotoCachedSize &v(_photoCachedSize()); 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: { const MTPDphotoSizeEmpty &v(c_photoSizeEmpty()); v.vtype.write(to); } break; case mtpc_photoSize: { const MTPDphotoSize &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: { const MTPDphotoCachedSize &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) : mtpDataOwner(0), _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 MTPphotoSize::MTPphotoSize(MTPDphotoSizeEmpty *_data) : mtpDataOwner(_data), _type(mtpc_photoSizeEmpty) { } inline MTPphotoSize::MTPphotoSize(MTPDphotoSize *_data) : mtpDataOwner(_data), _type(mtpc_photoSize) { } inline MTPphotoSize::MTPphotoSize(MTPDphotoCachedSize *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPgeoPoint::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_geoPointEmpty: _type = cons; break; case mtpc_geoPoint: _type = cons; { if (!data) setData(new MTPDgeoPoint()); MTPDgeoPoint &v(_geoPoint()); 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: { const MTPDgeoPoint &v(c_geoPoint()); v.vlong.write(to); v.vlat.write(to); } break; } } inline MTPgeoPoint::MTPgeoPoint(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_geoPointEmpty: break; case mtpc_geoPoint: setData(new MTPDgeoPoint()); break; default: throw mtpErrorBadTypeId(type, "MTPgeoPoint"); } } inline MTPgeoPoint::MTPgeoPoint(MTPDgeoPoint *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDauth_checkedPhone()); MTPDauth_checkedPhone &v(_auth_checkedPhone()); v.vphone_registered.read(from, end); } inline void MTPauth_checkedPhone::write(mtpBuffer &to) const { const MTPDauth_checkedPhone &v(c_auth_checkedPhone()); v.vphone_registered.write(to); } inline MTPauth_checkedPhone::MTPauth_checkedPhone(MTPDauth_checkedPhone *_data) : mtpDataOwner(_data) { } inline MTPauth_checkedPhone MTP_auth_checkedPhone(MTPBool _phone_registered) { return MTP::internal::TypeCreator::new_auth_checkedPhone(_phone_registered); } inline MTPauth_sentCode::MTPauth_sentCode() : mtpDataOwner(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"); if (!data) setData(new MTPDauth_sentCode()); MTPDauth_sentCode &v(_auth_sentCode()); 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 { const MTPDauth_sentCode &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 MTPauth_sentCode::MTPauth_sentCode(MTPDauth_sentCode *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDauth_authorization()); MTPDauth_authorization &v(_auth_authorization()); 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 { const MTPDauth_authorization &v(c_auth_authorization()); v.vflags.write(to); if (v.has_tmp_sessions()) v.vtmp_sessions.write(to); v.vuser.write(to); } inline MTPauth_authorization::MTPauth_authorization(MTPDauth_authorization *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDauth_exportedAuthorization()); MTPDauth_exportedAuthorization &v(_auth_exportedAuthorization()); v.vid.read(from, end); v.vbytes.read(from, end); } inline void MTPauth_exportedAuthorization::write(mtpBuffer &to) const { const MTPDauth_exportedAuthorization &v(c_auth_exportedAuthorization()); v.vid.write(to); v.vbytes.write(to); } inline MTPauth_exportedAuthorization::MTPauth_exportedAuthorization(MTPDauth_exportedAuthorization *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputNotifyPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputNotifyPeer: _type = cons; { if (!data) setData(new MTPDinputNotifyPeer()); MTPDinputNotifyPeer &v(_inputNotifyPeer()); 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: { const MTPDinputNotifyPeer &v(c_inputNotifyPeer()); v.vpeer.write(to); } break; } } inline MTPinputNotifyPeer::MTPinputNotifyPeer(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputNotifyPeer::MTPinputNotifyPeer(MTPDinputNotifyPeer *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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() : mtpDataOwner(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"); if (!data) setData(new MTPDinputPeerNotifySettings()); MTPDinputPeerNotifySettings &v(_inputPeerNotifySettings()); v.vflags.read(from, end); v.vmute_until.read(from, end); v.vsound.read(from, end); } inline void MTPinputPeerNotifySettings::write(mtpBuffer &to) const { const MTPDinputPeerNotifySettings &v(c_inputPeerNotifySettings()); v.vflags.write(to); v.vmute_until.write(to); v.vsound.write(to); } inline MTPinputPeerNotifySettings::MTPinputPeerNotifySettings(MTPDinputPeerNotifySettings *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPpeerNotifySettings::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_peerNotifySettingsEmpty: _type = cons; break; case mtpc_peerNotifySettings: _type = cons; { if (!data) setData(new MTPDpeerNotifySettings()); MTPDpeerNotifySettings &v(_peerNotifySettings()); 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: { const MTPDpeerNotifySettings &v(c_peerNotifySettings()); v.vflags.write(to); v.vmute_until.write(to); v.vsound.write(to); } break; } } inline MTPpeerNotifySettings::MTPpeerNotifySettings(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_peerNotifySettingsEmpty: break; case mtpc_peerNotifySettings: setData(new MTPDpeerNotifySettings()); break; default: throw mtpErrorBadTypeId(type, "MTPpeerNotifySettings"); } } inline MTPpeerNotifySettings::MTPpeerNotifySettings(MTPDpeerNotifySettings *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDpeerSettings()); MTPDpeerSettings &v(_peerSettings()); v.vflags.read(from, end); } inline void MTPpeerSettings::write(mtpBuffer &to) const { const MTPDpeerSettings &v(c_peerSettings()); v.vflags.write(to); } inline MTPpeerSettings::MTPpeerSettings(MTPDpeerSettings *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPwallPaper::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_wallPaper: _type = cons; { if (!data) setData(new MTPDwallPaper()); MTPDwallPaper &v(_wallPaper()); 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; { if (!data) setData(new MTPDwallPaperSolid()); MTPDwallPaperSolid &v(_wallPaperSolid()); 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: { const MTPDwallPaper &v(c_wallPaper()); v.vid.write(to); v.vtitle.write(to); v.vsizes.write(to); v.vcolor.write(to); } break; case mtpc_wallPaperSolid: { const MTPDwallPaperSolid &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_wallPaper: setData(new MTPDwallPaper()); break; case mtpc_wallPaperSolid: setData(new MTPDwallPaperSolid()); break; default: throw mtpErrorBadTypeId(type, "MTPwallPaper"); } } inline MTPwallPaper::MTPwallPaper(MTPDwallPaper *_data) : mtpDataOwner(_data), _type(mtpc_wallPaper) { } inline MTPwallPaper::MTPwallPaper(MTPDwallPaperSolid *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPreportReason::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); 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; { if (!data) setData(new MTPDinputReportReasonOther()); MTPDinputReportReasonOther &v(_inputReportReasonOther()); v.vtext.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPreportReason"); } } inline void MTPreportReason::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputReportReasonOther: { const MTPDinputReportReasonOther &v(c_inputReportReasonOther()); v.vtext.write(to); } break; } } inline MTPreportReason::MTPreportReason(mtpTypeId type) : mtpDataOwner(0), _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 MTPreportReason::MTPreportReason(MTPDinputReportReasonOther *_data) : mtpDataOwner(_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() : mtpDataOwner(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); } 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"); if (!data) setData(new MTPDuserFull()); MTPDuserFull &v(_userFull()); 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(); } } inline void MTPuserFull::write(mtpBuffer &to) const { const MTPDuserFull &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); } inline MTPuserFull::MTPuserFull(MTPDuserFull *_data) : mtpDataOwner(_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) { return MTP::internal::TypeCreator::new_userFull(_flags, _user, _about, _link, _profile_photo, _notify_settings, _bot_info); } inline MTPcontact::MTPcontact() : mtpDataOwner(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"); if (!data) setData(new MTPDcontact()); MTPDcontact &v(_contact()); v.vuser_id.read(from, end); v.vmutual.read(from, end); } inline void MTPcontact::write(mtpBuffer &to) const { const MTPDcontact &v(c_contact()); v.vuser_id.write(to); v.vmutual.write(to); } inline MTPcontact::MTPcontact(MTPDcontact *_data) : mtpDataOwner(_data) { } inline MTPcontact MTP_contact(MTPint _user_id, MTPBool _mutual) { return MTP::internal::TypeCreator::new_contact(_user_id, _mutual); } inline MTPimportedContact::MTPimportedContact() : mtpDataOwner(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"); if (!data) setData(new MTPDimportedContact()); MTPDimportedContact &v(_importedContact()); v.vuser_id.read(from, end); v.vclient_id.read(from, end); } inline void MTPimportedContact::write(mtpBuffer &to) const { const MTPDimportedContact &v(c_importedContact()); v.vuser_id.write(to); v.vclient_id.write(to); } inline MTPimportedContact::MTPimportedContact(MTPDimportedContact *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDcontactBlocked()); MTPDcontactBlocked &v(_contactBlocked()); v.vuser_id.read(from, end); v.vdate.read(from, end); } inline void MTPcontactBlocked::write(mtpBuffer &to) const { const MTPDcontactBlocked &v(c_contactBlocked()); v.vuser_id.write(to); v.vdate.write(to); } inline MTPcontactBlocked::MTPcontactBlocked(MTPDcontactBlocked *_data) : mtpDataOwner(_data) { } inline MTPcontactBlocked MTP_contactBlocked(MTPint _user_id, MTPint _date) { return MTP::internal::TypeCreator::new_contactBlocked(_user_id, _date); } inline MTPcontactStatus::MTPcontactStatus() : mtpDataOwner(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"); if (!data) setData(new MTPDcontactStatus()); MTPDcontactStatus &v(_contactStatus()); v.vuser_id.read(from, end); v.vstatus.read(from, end); } inline void MTPcontactStatus::write(mtpBuffer &to) const { const MTPDcontactStatus &v(c_contactStatus()); v.vuser_id.write(to); v.vstatus.write(to); } inline MTPcontactStatus::MTPcontactStatus(MTPDcontactStatus *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDcontacts_link()); MTPDcontacts_link &v(_contacts_link()); 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 { const MTPDcontacts_link &v(c_contacts_link()); v.vmy_link.write(to); v.vforeign_link.write(to); v.vuser.write(to); } inline MTPcontacts_link::MTPcontacts_link(MTPDcontacts_link *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPcontacts_contacts::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_contacts_contactsNotModified: _type = cons; break; case mtpc_contacts_contacts: _type = cons; { if (!data) setData(new MTPDcontacts_contacts()); MTPDcontacts_contacts &v(_contacts_contacts()); 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: { const MTPDcontacts_contacts &v(c_contacts_contacts()); v.vcontacts.write(to); v.vusers.write(to); } break; } } inline MTPcontacts_contacts::MTPcontacts_contacts(mtpTypeId type) : mtpDataOwner(0), _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 MTPcontacts_contacts::MTPcontacts_contacts(MTPDcontacts_contacts *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDcontacts_importedContacts()); MTPDcontacts_importedContacts &v(_contacts_importedContacts()); v.vimported.read(from, end); v.vretry_contacts.read(from, end); v.vusers.read(from, end); } inline void MTPcontacts_importedContacts::write(mtpBuffer &to) const { const MTPDcontacts_importedContacts &v(c_contacts_importedContacts()); v.vimported.write(to); v.vretry_contacts.write(to); v.vusers.write(to); } inline MTPcontacts_importedContacts::MTPcontacts_importedContacts(MTPDcontacts_importedContacts *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPcontacts_blocked::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_contacts_blocked: _type = cons; { if (!data) setData(new MTPDcontacts_blocked()); MTPDcontacts_blocked &v(_contacts_blocked()); v.vblocked.read(from, end); v.vusers.read(from, end); } break; case mtpc_contacts_blockedSlice: _type = cons; { if (!data) setData(new MTPDcontacts_blockedSlice()); MTPDcontacts_blockedSlice &v(_contacts_blockedSlice()); 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: { const MTPDcontacts_blocked &v(c_contacts_blocked()); v.vblocked.write(to); v.vusers.write(to); } break; case mtpc_contacts_blockedSlice: { const MTPDcontacts_blockedSlice &v(c_contacts_blockedSlice()); v.vcount.write(to); v.vblocked.write(to); v.vusers.write(to); } break; } } inline MTPcontacts_blocked::MTPcontacts_blocked(mtpTypeId type) : mtpDataOwner(0), _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 MTPcontacts_blocked::MTPcontacts_blocked(MTPDcontacts_blocked *_data) : mtpDataOwner(_data), _type(mtpc_contacts_blocked) { } inline MTPcontacts_blocked::MTPcontacts_blocked(MTPDcontacts_blockedSlice *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_dialogs::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_dialogs: _type = cons; { if (!data) setData(new MTPDmessages_dialogs()); MTPDmessages_dialogs &v(_messages_dialogs()); 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; { if (!data) setData(new MTPDmessages_dialogsSlice()); MTPDmessages_dialogsSlice &v(_messages_dialogsSlice()); 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: { const MTPDmessages_dialogs &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: { const MTPDmessages_dialogsSlice &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) : mtpDataOwner(0), _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 MTPmessages_dialogs::MTPmessages_dialogs(MTPDmessages_dialogs *_data) : mtpDataOwner(_data), _type(mtpc_messages_dialogs) { } inline MTPmessages_dialogs::MTPmessages_dialogs(MTPDmessages_dialogsSlice *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_messages::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_messages: _type = cons; { if (!data) setData(new MTPDmessages_messages()); MTPDmessages_messages &v(_messages_messages()); v.vmessages.read(from, end); v.vchats.read(from, end); v.vusers.read(from, end); } break; case mtpc_messages_messagesSlice: _type = cons; { if (!data) setData(new MTPDmessages_messagesSlice()); MTPDmessages_messagesSlice &v(_messages_messagesSlice()); 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; { if (!data) setData(new MTPDmessages_channelMessages()); MTPDmessages_channelMessages &v(_messages_channelMessages()); 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: { const MTPDmessages_messages &v(c_messages_messages()); v.vmessages.write(to); v.vchats.write(to); v.vusers.write(to); } break; case mtpc_messages_messagesSlice: { const MTPDmessages_messagesSlice &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: { const MTPDmessages_channelMessages &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) : mtpDataOwner(0), _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 MTPmessages_messages::MTPmessages_messages(MTPDmessages_messages *_data) : mtpDataOwner(_data), _type(mtpc_messages_messages) { } inline MTPmessages_messages::MTPmessages_messages(MTPDmessages_messagesSlice *_data) : mtpDataOwner(_data), _type(mtpc_messages_messagesSlice) { } inline MTPmessages_messages::MTPmessages_messages(MTPDmessages_channelMessages *_data) : mtpDataOwner(_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 MTPmessages_chats::MTPmessages_chats() : mtpDataOwner(new MTPDmessages_chats()) { } inline uint32 MTPmessages_chats::innerLength() const { const MTPDmessages_chats &v(c_messages_chats()); return v.vchats.innerLength(); } inline mtpTypeId MTPmessages_chats::type() const { return mtpc_messages_chats; } inline void MTPmessages_chats::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_messages_chats) throw mtpErrorUnexpected(cons, "MTPmessages_chats"); if (!data) setData(new MTPDmessages_chats()); MTPDmessages_chats &v(_messages_chats()); v.vchats.read(from, end); } inline void MTPmessages_chats::write(mtpBuffer &to) const { const MTPDmessages_chats &v(c_messages_chats()); v.vchats.write(to); } inline MTPmessages_chats::MTPmessages_chats(MTPDmessages_chats *_data) : mtpDataOwner(_data) { } inline MTPmessages_chats MTP_messages_chats(const MTPVector &_chats) { return MTP::internal::TypeCreator::new_messages_chats(_chats); } inline MTPmessages_chatFull::MTPmessages_chatFull() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_chatFull()); MTPDmessages_chatFull &v(_messages_chatFull()); v.vfull_chat.read(from, end); v.vchats.read(from, end); v.vusers.read(from, end); } inline void MTPmessages_chatFull::write(mtpBuffer &to) const { const MTPDmessages_chatFull &v(c_messages_chatFull()); v.vfull_chat.write(to); v.vchats.write(to); v.vusers.write(to); } inline MTPmessages_chatFull::MTPmessages_chatFull(MTPDmessages_chatFull *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_affectedHistory()); MTPDmessages_affectedHistory &v(_messages_affectedHistory()); v.vpts.read(from, end); v.vpts_count.read(from, end); v.voffset.read(from, end); } inline void MTPmessages_affectedHistory::write(mtpBuffer &to) const { const MTPDmessages_affectedHistory &v(c_messages_affectedHistory()); v.vpts.write(to); v.vpts_count.write(to); v.voffset.write(to); } inline MTPmessages_affectedHistory::MTPmessages_affectedHistory(MTPDmessages_affectedHistory *_data) : mtpDataOwner(_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 { return 0; } inline mtpTypeId MTPmessagesFilter::type() const { if (!_type) throw mtpErrorUninitialized(); 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; default: throw mtpErrorUnexpected(cons, "MTPmessagesFilter"); } } inline void MTPmessagesFilter::write(mtpBuffer &to) const { } 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; default: throw mtpErrorBadTypeId(type, "MTPmessagesFilter"); } } 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(); } 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_updateNewAuthorization: { const MTPDupdateNewAuthorization &v(c_updateNewAuthorization()); return v.vauth_key_id.innerLength() + v.vdate.innerLength() + v.vdevice.innerLength() + v.vlocation.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.vtype.innerLength() + v.vmessage.innerLength() + v.vmedia.innerLength() + v.vpopup.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.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.vquery_id.innerLength() + v.vuser_id.innerLength() + v.vpeer.innerLength() + v.vmsg_id.innerLength() + v.vdata.innerLength(); } 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.vquery_id.innerLength() + v.vuser_id.innerLength() + v.vmsg_id.innerLength() + v.vdata.innerLength(); } 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(); } } return 0; } inline mtpTypeId MTPupdate::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPupdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_updateNewMessage: _type = cons; { if (!data) setData(new MTPDupdateNewMessage()); MTPDupdateNewMessage &v(_updateNewMessage()); v.vmessage.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateMessageID: _type = cons; { if (!data) setData(new MTPDupdateMessageID()); MTPDupdateMessageID &v(_updateMessageID()); v.vid.read(from, end); v.vrandom_id.read(from, end); } break; case mtpc_updateDeleteMessages: _type = cons; { if (!data) setData(new MTPDupdateDeleteMessages()); MTPDupdateDeleteMessages &v(_updateDeleteMessages()); v.vmessages.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateUserTyping: _type = cons; { if (!data) setData(new MTPDupdateUserTyping()); MTPDupdateUserTyping &v(_updateUserTyping()); v.vuser_id.read(from, end); v.vaction.read(from, end); } break; case mtpc_updateChatUserTyping: _type = cons; { if (!data) setData(new MTPDupdateChatUserTyping()); MTPDupdateChatUserTyping &v(_updateChatUserTyping()); v.vchat_id.read(from, end); v.vuser_id.read(from, end); v.vaction.read(from, end); } break; case mtpc_updateChatParticipants: _type = cons; { if (!data) setData(new MTPDupdateChatParticipants()); MTPDupdateChatParticipants &v(_updateChatParticipants()); v.vparticipants.read(from, end); } break; case mtpc_updateUserStatus: _type = cons; { if (!data) setData(new MTPDupdateUserStatus()); MTPDupdateUserStatus &v(_updateUserStatus()); v.vuser_id.read(from, end); v.vstatus.read(from, end); } break; case mtpc_updateUserName: _type = cons; { if (!data) setData(new MTPDupdateUserName()); MTPDupdateUserName &v(_updateUserName()); 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; { if (!data) setData(new MTPDupdateUserPhoto()); MTPDupdateUserPhoto &v(_updateUserPhoto()); 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; { if (!data) setData(new MTPDupdateContactRegistered()); MTPDupdateContactRegistered &v(_updateContactRegistered()); v.vuser_id.read(from, end); v.vdate.read(from, end); } break; case mtpc_updateContactLink: _type = cons; { if (!data) setData(new MTPDupdateContactLink()); MTPDupdateContactLink &v(_updateContactLink()); v.vuser_id.read(from, end); v.vmy_link.read(from, end); v.vforeign_link.read(from, end); } break; case mtpc_updateNewAuthorization: _type = cons; { if (!data) setData(new MTPDupdateNewAuthorization()); MTPDupdateNewAuthorization &v(_updateNewAuthorization()); v.vauth_key_id.read(from, end); v.vdate.read(from, end); v.vdevice.read(from, end); v.vlocation.read(from, end); } break; case mtpc_updateNewEncryptedMessage: _type = cons; { if (!data) setData(new MTPDupdateNewEncryptedMessage()); MTPDupdateNewEncryptedMessage &v(_updateNewEncryptedMessage()); v.vmessage.read(from, end); v.vqts.read(from, end); } break; case mtpc_updateEncryptedChatTyping: _type = cons; { if (!data) setData(new MTPDupdateEncryptedChatTyping()); MTPDupdateEncryptedChatTyping &v(_updateEncryptedChatTyping()); v.vchat_id.read(from, end); } break; case mtpc_updateEncryption: _type = cons; { if (!data) setData(new MTPDupdateEncryption()); MTPDupdateEncryption &v(_updateEncryption()); v.vchat.read(from, end); v.vdate.read(from, end); } break; case mtpc_updateEncryptedMessagesRead: _type = cons; { if (!data) setData(new MTPDupdateEncryptedMessagesRead()); MTPDupdateEncryptedMessagesRead &v(_updateEncryptedMessagesRead()); v.vchat_id.read(from, end); v.vmax_date.read(from, end); v.vdate.read(from, end); } break; case mtpc_updateChatParticipantAdd: _type = cons; { if (!data) setData(new MTPDupdateChatParticipantAdd()); MTPDupdateChatParticipantAdd &v(_updateChatParticipantAdd()); 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; { if (!data) setData(new MTPDupdateChatParticipantDelete()); MTPDupdateChatParticipantDelete &v(_updateChatParticipantDelete()); v.vchat_id.read(from, end); v.vuser_id.read(from, end); v.vversion.read(from, end); } break; case mtpc_updateDcOptions: _type = cons; { if (!data) setData(new MTPDupdateDcOptions()); MTPDupdateDcOptions &v(_updateDcOptions()); v.vdc_options.read(from, end); } break; case mtpc_updateUserBlocked: _type = cons; { if (!data) setData(new MTPDupdateUserBlocked()); MTPDupdateUserBlocked &v(_updateUserBlocked()); v.vuser_id.read(from, end); v.vblocked.read(from, end); } break; case mtpc_updateNotifySettings: _type = cons; { if (!data) setData(new MTPDupdateNotifySettings()); MTPDupdateNotifySettings &v(_updateNotifySettings()); v.vpeer.read(from, end); v.vnotify_settings.read(from, end); } break; case mtpc_updateServiceNotification: _type = cons; { if (!data) setData(new MTPDupdateServiceNotification()); MTPDupdateServiceNotification &v(_updateServiceNotification()); v.vtype.read(from, end); v.vmessage.read(from, end); v.vmedia.read(from, end); v.vpopup.read(from, end); } break; case mtpc_updatePrivacy: _type = cons; { if (!data) setData(new MTPDupdatePrivacy()); MTPDupdatePrivacy &v(_updatePrivacy()); v.vkey.read(from, end); v.vrules.read(from, end); } break; case mtpc_updateUserPhone: _type = cons; { if (!data) setData(new MTPDupdateUserPhone()); MTPDupdateUserPhone &v(_updateUserPhone()); v.vuser_id.read(from, end); v.vphone.read(from, end); } break; case mtpc_updateReadHistoryInbox: _type = cons; { if (!data) setData(new MTPDupdateReadHistoryInbox()); MTPDupdateReadHistoryInbox &v(_updateReadHistoryInbox()); 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; { if (!data) setData(new MTPDupdateReadHistoryOutbox()); MTPDupdateReadHistoryOutbox &v(_updateReadHistoryOutbox()); 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; { if (!data) setData(new MTPDupdateWebPage()); MTPDupdateWebPage &v(_updateWebPage()); v.vwebpage.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateReadMessagesContents: _type = cons; { if (!data) setData(new MTPDupdateReadMessagesContents()); MTPDupdateReadMessagesContents &v(_updateReadMessagesContents()); v.vmessages.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateChannelTooLong: _type = cons; { if (!data) setData(new MTPDupdateChannelTooLong()); MTPDupdateChannelTooLong &v(_updateChannelTooLong()); 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; { if (!data) setData(new MTPDupdateChannel()); MTPDupdateChannel &v(_updateChannel()); v.vchannel_id.read(from, end); } break; case mtpc_updateNewChannelMessage: _type = cons; { if (!data) setData(new MTPDupdateNewChannelMessage()); MTPDupdateNewChannelMessage &v(_updateNewChannelMessage()); v.vmessage.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateReadChannelInbox: _type = cons; { if (!data) setData(new MTPDupdateReadChannelInbox()); MTPDupdateReadChannelInbox &v(_updateReadChannelInbox()); v.vchannel_id.read(from, end); v.vmax_id.read(from, end); } break; case mtpc_updateDeleteChannelMessages: _type = cons; { if (!data) setData(new MTPDupdateDeleteChannelMessages()); MTPDupdateDeleteChannelMessages &v(_updateDeleteChannelMessages()); 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; { if (!data) setData(new MTPDupdateChannelMessageViews()); MTPDupdateChannelMessageViews &v(_updateChannelMessageViews()); v.vchannel_id.read(from, end); v.vid.read(from, end); v.vviews.read(from, end); } break; case mtpc_updateChatAdmins: _type = cons; { if (!data) setData(new MTPDupdateChatAdmins()); MTPDupdateChatAdmins &v(_updateChatAdmins()); v.vchat_id.read(from, end); v.venabled.read(from, end); v.vversion.read(from, end); } break; case mtpc_updateChatParticipantAdmin: _type = cons; { if (!data) setData(new MTPDupdateChatParticipantAdmin()); MTPDupdateChatParticipantAdmin &v(_updateChatParticipantAdmin()); 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; { if (!data) setData(new MTPDupdateNewStickerSet()); MTPDupdateNewStickerSet &v(_updateNewStickerSet()); v.vstickerset.read(from, end); } break; case mtpc_updateStickerSetsOrder: _type = cons; { if (!data) setData(new MTPDupdateStickerSetsOrder()); MTPDupdateStickerSetsOrder &v(_updateStickerSetsOrder()); v.vorder.read(from, end); } break; case mtpc_updateStickerSets: _type = cons; break; case mtpc_updateSavedGifs: _type = cons; break; case mtpc_updateBotInlineQuery: _type = cons; { if (!data) setData(new MTPDupdateBotInlineQuery()); MTPDupdateBotInlineQuery &v(_updateBotInlineQuery()); 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; { if (!data) setData(new MTPDupdateBotInlineSend()); MTPDupdateBotInlineSend &v(_updateBotInlineSend()); 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; { if (!data) setData(new MTPDupdateEditChannelMessage()); MTPDupdateEditChannelMessage &v(_updateEditChannelMessage()); v.vmessage.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateChannelPinnedMessage: _type = cons; { if (!data) setData(new MTPDupdateChannelPinnedMessage()); MTPDupdateChannelPinnedMessage &v(_updateChannelPinnedMessage()); v.vchannel_id.read(from, end); v.vid.read(from, end); } break; case mtpc_updateBotCallbackQuery: _type = cons; { if (!data) setData(new MTPDupdateBotCallbackQuery()); MTPDupdateBotCallbackQuery &v(_updateBotCallbackQuery()); v.vquery_id.read(from, end); v.vuser_id.read(from, end); v.vpeer.read(from, end); v.vmsg_id.read(from, end); v.vdata.read(from, end); } break; case mtpc_updateEditMessage: _type = cons; { if (!data) setData(new MTPDupdateEditMessage()); MTPDupdateEditMessage &v(_updateEditMessage()); v.vmessage.read(from, end); v.vpts.read(from, end); v.vpts_count.read(from, end); } break; case mtpc_updateInlineBotCallbackQuery: _type = cons; { if (!data) setData(new MTPDupdateInlineBotCallbackQuery()); MTPDupdateInlineBotCallbackQuery &v(_updateInlineBotCallbackQuery()); v.vquery_id.read(from, end); v.vuser_id.read(from, end); v.vmsg_id.read(from, end); v.vdata.read(from, end); } break; case mtpc_updateReadChannelOutbox: _type = cons; { if (!data) setData(new MTPDupdateReadChannelOutbox()); MTPDupdateReadChannelOutbox &v(_updateReadChannelOutbox()); v.vchannel_id.read(from, end); v.vmax_id.read(from, end); } break; case mtpc_updateDraftMessage: _type = cons; { if (!data) setData(new MTPDupdateDraftMessage()); MTPDupdateDraftMessage &v(_updateDraftMessage()); 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; default: throw mtpErrorUnexpected(cons, "MTPupdate"); } } inline void MTPupdate::write(mtpBuffer &to) const { switch (_type) { case mtpc_updateNewMessage: { const MTPDupdateNewMessage &v(c_updateNewMessage()); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateMessageID: { const MTPDupdateMessageID &v(c_updateMessageID()); v.vid.write(to); v.vrandom_id.write(to); } break; case mtpc_updateDeleteMessages: { const MTPDupdateDeleteMessages &v(c_updateDeleteMessages()); v.vmessages.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateUserTyping: { const MTPDupdateUserTyping &v(c_updateUserTyping()); v.vuser_id.write(to); v.vaction.write(to); } break; case mtpc_updateChatUserTyping: { const MTPDupdateChatUserTyping &v(c_updateChatUserTyping()); v.vchat_id.write(to); v.vuser_id.write(to); v.vaction.write(to); } break; case mtpc_updateChatParticipants: { const MTPDupdateChatParticipants &v(c_updateChatParticipants()); v.vparticipants.write(to); } break; case mtpc_updateUserStatus: { const MTPDupdateUserStatus &v(c_updateUserStatus()); v.vuser_id.write(to); v.vstatus.write(to); } break; case mtpc_updateUserName: { const MTPDupdateUserName &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: { const MTPDupdateUserPhoto &v(c_updateUserPhoto()); v.vuser_id.write(to); v.vdate.write(to); v.vphoto.write(to); v.vprevious.write(to); } break; case mtpc_updateContactRegistered: { const MTPDupdateContactRegistered &v(c_updateContactRegistered()); v.vuser_id.write(to); v.vdate.write(to); } break; case mtpc_updateContactLink: { const MTPDupdateContactLink &v(c_updateContactLink()); v.vuser_id.write(to); v.vmy_link.write(to); v.vforeign_link.write(to); } break; case mtpc_updateNewAuthorization: { const MTPDupdateNewAuthorization &v(c_updateNewAuthorization()); v.vauth_key_id.write(to); v.vdate.write(to); v.vdevice.write(to); v.vlocation.write(to); } break; case mtpc_updateNewEncryptedMessage: { const MTPDupdateNewEncryptedMessage &v(c_updateNewEncryptedMessage()); v.vmessage.write(to); v.vqts.write(to); } break; case mtpc_updateEncryptedChatTyping: { const MTPDupdateEncryptedChatTyping &v(c_updateEncryptedChatTyping()); v.vchat_id.write(to); } break; case mtpc_updateEncryption: { const MTPDupdateEncryption &v(c_updateEncryption()); v.vchat.write(to); v.vdate.write(to); } break; case mtpc_updateEncryptedMessagesRead: { const MTPDupdateEncryptedMessagesRead &v(c_updateEncryptedMessagesRead()); v.vchat_id.write(to); v.vmax_date.write(to); v.vdate.write(to); } break; case mtpc_updateChatParticipantAdd: { const MTPDupdateChatParticipantAdd &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: { const MTPDupdateChatParticipantDelete &v(c_updateChatParticipantDelete()); v.vchat_id.write(to); v.vuser_id.write(to); v.vversion.write(to); } break; case mtpc_updateDcOptions: { const MTPDupdateDcOptions &v(c_updateDcOptions()); v.vdc_options.write(to); } break; case mtpc_updateUserBlocked: { const MTPDupdateUserBlocked &v(c_updateUserBlocked()); v.vuser_id.write(to); v.vblocked.write(to); } break; case mtpc_updateNotifySettings: { const MTPDupdateNotifySettings &v(c_updateNotifySettings()); v.vpeer.write(to); v.vnotify_settings.write(to); } break; case mtpc_updateServiceNotification: { const MTPDupdateServiceNotification &v(c_updateServiceNotification()); v.vtype.write(to); v.vmessage.write(to); v.vmedia.write(to); v.vpopup.write(to); } break; case mtpc_updatePrivacy: { const MTPDupdatePrivacy &v(c_updatePrivacy()); v.vkey.write(to); v.vrules.write(to); } break; case mtpc_updateUserPhone: { const MTPDupdateUserPhone &v(c_updateUserPhone()); v.vuser_id.write(to); v.vphone.write(to); } break; case mtpc_updateReadHistoryInbox: { const MTPDupdateReadHistoryInbox &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: { const MTPDupdateReadHistoryOutbox &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: { const MTPDupdateWebPage &v(c_updateWebPage()); v.vwebpage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateReadMessagesContents: { const MTPDupdateReadMessagesContents &v(c_updateReadMessagesContents()); v.vmessages.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateChannelTooLong: { const MTPDupdateChannelTooLong &v(c_updateChannelTooLong()); v.vflags.write(to); v.vchannel_id.write(to); if (v.has_pts()) v.vpts.write(to); } break; case mtpc_updateChannel: { const MTPDupdateChannel &v(c_updateChannel()); v.vchannel_id.write(to); } break; case mtpc_updateNewChannelMessage: { const MTPDupdateNewChannelMessage &v(c_updateNewChannelMessage()); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateReadChannelInbox: { const MTPDupdateReadChannelInbox &v(c_updateReadChannelInbox()); v.vchannel_id.write(to); v.vmax_id.write(to); } break; case mtpc_updateDeleteChannelMessages: { const MTPDupdateDeleteChannelMessages &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: { const MTPDupdateChannelMessageViews &v(c_updateChannelMessageViews()); v.vchannel_id.write(to); v.vid.write(to); v.vviews.write(to); } break; case mtpc_updateChatAdmins: { const MTPDupdateChatAdmins &v(c_updateChatAdmins()); v.vchat_id.write(to); v.venabled.write(to); v.vversion.write(to); } break; case mtpc_updateChatParticipantAdmin: { const MTPDupdateChatParticipantAdmin &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: { const MTPDupdateNewStickerSet &v(c_updateNewStickerSet()); v.vstickerset.write(to); } break; case mtpc_updateStickerSetsOrder: { const MTPDupdateStickerSetsOrder &v(c_updateStickerSetsOrder()); v.vorder.write(to); } break; case mtpc_updateBotInlineQuery: { const MTPDupdateBotInlineQuery &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: { const MTPDupdateBotInlineSend &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: { const MTPDupdateEditChannelMessage &v(c_updateEditChannelMessage()); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateChannelPinnedMessage: { const MTPDupdateChannelPinnedMessage &v(c_updateChannelPinnedMessage()); v.vchannel_id.write(to); v.vid.write(to); } break; case mtpc_updateBotCallbackQuery: { const MTPDupdateBotCallbackQuery &v(c_updateBotCallbackQuery()); v.vquery_id.write(to); v.vuser_id.write(to); v.vpeer.write(to); v.vmsg_id.write(to); v.vdata.write(to); } break; case mtpc_updateEditMessage: { const MTPDupdateEditMessage &v(c_updateEditMessage()); v.vmessage.write(to); v.vpts.write(to); v.vpts_count.write(to); } break; case mtpc_updateInlineBotCallbackQuery: { const MTPDupdateInlineBotCallbackQuery &v(c_updateInlineBotCallbackQuery()); v.vquery_id.write(to); v.vuser_id.write(to); v.vmsg_id.write(to); v.vdata.write(to); } break; case mtpc_updateReadChannelOutbox: { const MTPDupdateReadChannelOutbox &v(c_updateReadChannelOutbox()); v.vchannel_id.write(to); v.vmax_id.write(to); } break; case mtpc_updateDraftMessage: { const MTPDupdateDraftMessage &v(c_updateDraftMessage()); v.vpeer.write(to); v.vdraft.write(to); } break; } } inline MTPupdate::MTPupdate(mtpTypeId type) : mtpDataOwner(0), _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_updateNewAuthorization: setData(new MTPDupdateNewAuthorization()); 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; default: throw mtpErrorBadTypeId(type, "MTPupdate"); } } inline MTPupdate::MTPupdate(MTPDupdateNewMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateNewMessage) { } inline MTPupdate::MTPupdate(MTPDupdateMessageID *_data) : mtpDataOwner(_data), _type(mtpc_updateMessageID) { } inline MTPupdate::MTPupdate(MTPDupdateDeleteMessages *_data) : mtpDataOwner(_data), _type(mtpc_updateDeleteMessages) { } inline MTPupdate::MTPupdate(MTPDupdateUserTyping *_data) : mtpDataOwner(_data), _type(mtpc_updateUserTyping) { } inline MTPupdate::MTPupdate(MTPDupdateChatUserTyping *_data) : mtpDataOwner(_data), _type(mtpc_updateChatUserTyping) { } inline MTPupdate::MTPupdate(MTPDupdateChatParticipants *_data) : mtpDataOwner(_data), _type(mtpc_updateChatParticipants) { } inline MTPupdate::MTPupdate(MTPDupdateUserStatus *_data) : mtpDataOwner(_data), _type(mtpc_updateUserStatus) { } inline MTPupdate::MTPupdate(MTPDupdateUserName *_data) : mtpDataOwner(_data), _type(mtpc_updateUserName) { } inline MTPupdate::MTPupdate(MTPDupdateUserPhoto *_data) : mtpDataOwner(_data), _type(mtpc_updateUserPhoto) { } inline MTPupdate::MTPupdate(MTPDupdateContactRegistered *_data) : mtpDataOwner(_data), _type(mtpc_updateContactRegistered) { } inline MTPupdate::MTPupdate(MTPDupdateContactLink *_data) : mtpDataOwner(_data), _type(mtpc_updateContactLink) { } inline MTPupdate::MTPupdate(MTPDupdateNewAuthorization *_data) : mtpDataOwner(_data), _type(mtpc_updateNewAuthorization) { } inline MTPupdate::MTPupdate(MTPDupdateNewEncryptedMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateNewEncryptedMessage) { } inline MTPupdate::MTPupdate(MTPDupdateEncryptedChatTyping *_data) : mtpDataOwner(_data), _type(mtpc_updateEncryptedChatTyping) { } inline MTPupdate::MTPupdate(MTPDupdateEncryption *_data) : mtpDataOwner(_data), _type(mtpc_updateEncryption) { } inline MTPupdate::MTPupdate(MTPDupdateEncryptedMessagesRead *_data) : mtpDataOwner(_data), _type(mtpc_updateEncryptedMessagesRead) { } inline MTPupdate::MTPupdate(MTPDupdateChatParticipantAdd *_data) : mtpDataOwner(_data), _type(mtpc_updateChatParticipantAdd) { } inline MTPupdate::MTPupdate(MTPDupdateChatParticipantDelete *_data) : mtpDataOwner(_data), _type(mtpc_updateChatParticipantDelete) { } inline MTPupdate::MTPupdate(MTPDupdateDcOptions *_data) : mtpDataOwner(_data), _type(mtpc_updateDcOptions) { } inline MTPupdate::MTPupdate(MTPDupdateUserBlocked *_data) : mtpDataOwner(_data), _type(mtpc_updateUserBlocked) { } inline MTPupdate::MTPupdate(MTPDupdateNotifySettings *_data) : mtpDataOwner(_data), _type(mtpc_updateNotifySettings) { } inline MTPupdate::MTPupdate(MTPDupdateServiceNotification *_data) : mtpDataOwner(_data), _type(mtpc_updateServiceNotification) { } inline MTPupdate::MTPupdate(MTPDupdatePrivacy *_data) : mtpDataOwner(_data), _type(mtpc_updatePrivacy) { } inline MTPupdate::MTPupdate(MTPDupdateUserPhone *_data) : mtpDataOwner(_data), _type(mtpc_updateUserPhone) { } inline MTPupdate::MTPupdate(MTPDupdateReadHistoryInbox *_data) : mtpDataOwner(_data), _type(mtpc_updateReadHistoryInbox) { } inline MTPupdate::MTPupdate(MTPDupdateReadHistoryOutbox *_data) : mtpDataOwner(_data), _type(mtpc_updateReadHistoryOutbox) { } inline MTPupdate::MTPupdate(MTPDupdateWebPage *_data) : mtpDataOwner(_data), _type(mtpc_updateWebPage) { } inline MTPupdate::MTPupdate(MTPDupdateReadMessagesContents *_data) : mtpDataOwner(_data), _type(mtpc_updateReadMessagesContents) { } inline MTPupdate::MTPupdate(MTPDupdateChannelTooLong *_data) : mtpDataOwner(_data), _type(mtpc_updateChannelTooLong) { } inline MTPupdate::MTPupdate(MTPDupdateChannel *_data) : mtpDataOwner(_data), _type(mtpc_updateChannel) { } inline MTPupdate::MTPupdate(MTPDupdateNewChannelMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateNewChannelMessage) { } inline MTPupdate::MTPupdate(MTPDupdateReadChannelInbox *_data) : mtpDataOwner(_data), _type(mtpc_updateReadChannelInbox) { } inline MTPupdate::MTPupdate(MTPDupdateDeleteChannelMessages *_data) : mtpDataOwner(_data), _type(mtpc_updateDeleteChannelMessages) { } inline MTPupdate::MTPupdate(MTPDupdateChannelMessageViews *_data) : mtpDataOwner(_data), _type(mtpc_updateChannelMessageViews) { } inline MTPupdate::MTPupdate(MTPDupdateChatAdmins *_data) : mtpDataOwner(_data), _type(mtpc_updateChatAdmins) { } inline MTPupdate::MTPupdate(MTPDupdateChatParticipantAdmin *_data) : mtpDataOwner(_data), _type(mtpc_updateChatParticipantAdmin) { } inline MTPupdate::MTPupdate(MTPDupdateNewStickerSet *_data) : mtpDataOwner(_data), _type(mtpc_updateNewStickerSet) { } inline MTPupdate::MTPupdate(MTPDupdateStickerSetsOrder *_data) : mtpDataOwner(_data), _type(mtpc_updateStickerSetsOrder) { } inline MTPupdate::MTPupdate(MTPDupdateBotInlineQuery *_data) : mtpDataOwner(_data), _type(mtpc_updateBotInlineQuery) { } inline MTPupdate::MTPupdate(MTPDupdateBotInlineSend *_data) : mtpDataOwner(_data), _type(mtpc_updateBotInlineSend) { } inline MTPupdate::MTPupdate(MTPDupdateEditChannelMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateEditChannelMessage) { } inline MTPupdate::MTPupdate(MTPDupdateChannelPinnedMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateChannelPinnedMessage) { } inline MTPupdate::MTPupdate(MTPDupdateBotCallbackQuery *_data) : mtpDataOwner(_data), _type(mtpc_updateBotCallbackQuery) { } inline MTPupdate::MTPupdate(MTPDupdateEditMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateEditMessage) { } inline MTPupdate::MTPupdate(MTPDupdateInlineBotCallbackQuery *_data) : mtpDataOwner(_data), _type(mtpc_updateInlineBotCallbackQuery) { } inline MTPupdate::MTPupdate(MTPDupdateReadChannelOutbox *_data) : mtpDataOwner(_data), _type(mtpc_updateReadChannelOutbox) { } inline MTPupdate::MTPupdate(MTPDupdateDraftMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateDraftMessage) { } 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_updateNewAuthorization(const MTPlong &_auth_key_id, MTPint _date, const MTPstring &_device, const MTPstring &_location) { return MTP::internal::TypeCreator::new_updateNewAuthorization(_auth_key_id, _date, _device, _location); } 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); } inline MTPupdate MTP_updateServiceNotification(const MTPstring &_type, const MTPstring &_message, const MTPMessageMedia &_media, MTPBool _popup) { return MTP::internal::TypeCreator::new_updateServiceNotification(_type, _message, _media, _popup); } 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); } inline MTPupdate MTP_updateStickerSetsOrder(const MTPVector &_order) { return MTP::internal::TypeCreator::new_updateStickerSetsOrder(_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); } inline MTPupdate MTP_updateBotCallbackQuery(const MTPlong &_query_id, MTPint _user_id, const MTPPeer &_peer, MTPint _msg_id, const MTPbytes &_data) { return MTP::internal::TypeCreator::new_updateBotCallbackQuery(_query_id, _user_id, _peer, _msg_id, _data); } inline MTPupdate MTP_updateEditMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTP::internal::TypeCreator::new_updateEditMessage(_message, _pts, _pts_count); } inline MTPupdate MTP_updateInlineBotCallbackQuery(const MTPlong &_query_id, MTPint _user_id, const MTPInputBotInlineMessageID &_msg_id, const MTPbytes &_data) { return MTP::internal::TypeCreator::new_updateInlineBotCallbackQuery(_query_id, _user_id, _msg_id, _data); } 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 MTPupdates_state::MTPupdates_state() : mtpDataOwner(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"); if (!data) setData(new MTPDupdates_state()); MTPDupdates_state &v(_updates_state()); 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 { const MTPDupdates_state &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 MTPupdates_state::MTPupdates_state(MTPDupdates_state *_data) : mtpDataOwner(_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(); } } return 0; } inline mtpTypeId MTPupdates_difference::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPupdates_difference::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_updates_differenceEmpty: _type = cons; { if (!data) setData(new MTPDupdates_differenceEmpty()); MTPDupdates_differenceEmpty &v(_updates_differenceEmpty()); v.vdate.read(from, end); v.vseq.read(from, end); } break; case mtpc_updates_difference: _type = cons; { if (!data) setData(new MTPDupdates_difference()); MTPDupdates_difference &v(_updates_difference()); 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; { if (!data) setData(new MTPDupdates_differenceSlice()); MTPDupdates_differenceSlice &v(_updates_differenceSlice()); 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; default: throw mtpErrorUnexpected(cons, "MTPupdates_difference"); } } inline void MTPupdates_difference::write(mtpBuffer &to) const { switch (_type) { case mtpc_updates_differenceEmpty: { const MTPDupdates_differenceEmpty &v(c_updates_differenceEmpty()); v.vdate.write(to); v.vseq.write(to); } break; case mtpc_updates_difference: { const MTPDupdates_difference &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: { const MTPDupdates_differenceSlice &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; } } inline MTPupdates_difference::MTPupdates_difference(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPupdates_difference"); } } inline MTPupdates_difference::MTPupdates_difference(MTPDupdates_differenceEmpty *_data) : mtpDataOwner(_data), _type(mtpc_updates_differenceEmpty) { } inline MTPupdates_difference::MTPupdates_difference(MTPDupdates_difference *_data) : mtpDataOwner(_data), _type(mtpc_updates_difference) { } inline MTPupdates_difference::MTPupdates_difference(MTPDupdates_differenceSlice *_data) : mtpDataOwner(_data), _type(mtpc_updates_differenceSlice) { } 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 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPupdates::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_updatesTooLong: _type = cons; break; case mtpc_updateShortMessage: _type = cons; { if (!data) setData(new MTPDupdateShortMessage()); MTPDupdateShortMessage &v(_updateShortMessage()); 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; { if (!data) setData(new MTPDupdateShortChatMessage()); MTPDupdateShortChatMessage &v(_updateShortChatMessage()); 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; { if (!data) setData(new MTPDupdateShort()); MTPDupdateShort &v(_updateShort()); v.vupdate.read(from, end); v.vdate.read(from, end); } break; case mtpc_updatesCombined: _type = cons; { if (!data) setData(new MTPDupdatesCombined()); MTPDupdatesCombined &v(_updatesCombined()); 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; { if (!data) setData(new MTPDupdates()); MTPDupdates &v(_updates()); 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; { if (!data) setData(new MTPDupdateShortSentMessage()); MTPDupdateShortSentMessage &v(_updateShortSentMessage()); 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: { const MTPDupdateShortMessage &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: { const MTPDupdateShortChatMessage &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: { const MTPDupdateShort &v(c_updateShort()); v.vupdate.write(to); v.vdate.write(to); } break; case mtpc_updatesCombined: { const MTPDupdatesCombined &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: { const MTPDupdates &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: { const MTPDupdateShortSentMessage &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) : mtpDataOwner(0), _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 MTPupdates::MTPupdates(MTPDupdateShortMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateShortMessage) { } inline MTPupdates::MTPupdates(MTPDupdateShortChatMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateShortChatMessage) { } inline MTPupdates::MTPupdates(MTPDupdateShort *_data) : mtpDataOwner(_data), _type(mtpc_updateShort) { } inline MTPupdates::MTPupdates(MTPDupdatesCombined *_data) : mtpDataOwner(_data), _type(mtpc_updatesCombined) { } inline MTPupdates::MTPupdates(MTPDupdates *_data) : mtpDataOwner(_data), _type(mtpc_updates) { } inline MTPupdates::MTPupdates(MTPDupdateShortSentMessage *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPphotos_photos::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_photos_photos: _type = cons; { if (!data) setData(new MTPDphotos_photos()); MTPDphotos_photos &v(_photos_photos()); v.vphotos.read(from, end); v.vusers.read(from, end); } break; case mtpc_photos_photosSlice: _type = cons; { if (!data) setData(new MTPDphotos_photosSlice()); MTPDphotos_photosSlice &v(_photos_photosSlice()); 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: { const MTPDphotos_photos &v(c_photos_photos()); v.vphotos.write(to); v.vusers.write(to); } break; case mtpc_photos_photosSlice: { const MTPDphotos_photosSlice &v(c_photos_photosSlice()); v.vcount.write(to); v.vphotos.write(to); v.vusers.write(to); } break; } } inline MTPphotos_photos::MTPphotos_photos(mtpTypeId type) : mtpDataOwner(0), _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 MTPphotos_photos::MTPphotos_photos(MTPDphotos_photos *_data) : mtpDataOwner(_data), _type(mtpc_photos_photos) { } inline MTPphotos_photos::MTPphotos_photos(MTPDphotos_photosSlice *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDphotos_photo()); MTPDphotos_photo &v(_photos_photo()); v.vphoto.read(from, end); v.vusers.read(from, end); } inline void MTPphotos_photo::write(mtpBuffer &to) const { const MTPDphotos_photo &v(c_photos_photo()); v.vphoto.write(to); v.vusers.write(to); } inline MTPphotos_photo::MTPphotos_photo(MTPDphotos_photo *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDupload_file()); MTPDupload_file &v(_upload_file()); v.vtype.read(from, end); v.vmtime.read(from, end); v.vbytes.read(from, end); } inline void MTPupload_file::write(mtpBuffer &to) const { const MTPDupload_file &v(c_upload_file()); v.vtype.write(to); v.vmtime.write(to); v.vbytes.write(to); } inline MTPupload_file::MTPupload_file(MTPDupload_file *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDdcOption()); MTPDdcOption &v(_dcOption()); 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 { const MTPDdcOption &v(c_dcOption()); v.vflags.write(to); v.vid.write(to); v.vip_address.write(to); v.vport.write(to); } inline MTPdcOption::MTPdcOption(MTPDdcOption *_data) : mtpDataOwner(_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() : mtpDataOwner(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.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"); if (!data) setData(new MTPDconfig()); MTPDconfig &v(_config()); 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.vdisabled_features.read(from, end); } inline void MTPconfig::write(mtpBuffer &to) const { const MTPDconfig &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.vdisabled_features.write(to); } inline MTPconfig::MTPconfig(MTPDconfig *_data) : mtpDataOwner(_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, 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, _disabled_features); } inline MTPnearestDc::MTPnearestDc() : mtpDataOwner(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"); if (!data) setData(new MTPDnearestDc()); MTPDnearestDc &v(_nearestDc()); v.vcountry.read(from, end); v.vthis_dc.read(from, end); v.vnearest_dc.read(from, end); } inline void MTPnearestDc::write(mtpBuffer &to) const { const MTPDnearestDc &v(c_nearestDc()); v.vcountry.write(to); v.vthis_dc.write(to); v.vnearest_dc.write(to); } inline MTPnearestDc::MTPnearestDc(MTPDnearestDc *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPhelp_appUpdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_help_appUpdate: _type = cons; { if (!data) setData(new MTPDhelp_appUpdate()); MTPDhelp_appUpdate &v(_help_appUpdate()); 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: { const MTPDhelp_appUpdate &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) : mtpDataOwner(0), _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 MTPhelp_appUpdate::MTPhelp_appUpdate(MTPDhelp_appUpdate *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDhelp_inviteText()); MTPDhelp_inviteText &v(_help_inviteText()); v.vmessage.read(from, end); } inline void MTPhelp_inviteText::write(mtpBuffer &to) const { const MTPDhelp_inviteText &v(c_help_inviteText()); v.vmessage.write(to); } inline MTPhelp_inviteText::MTPhelp_inviteText(MTPDhelp_inviteText *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPencryptedChat::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_encryptedChatEmpty: _type = cons; { if (!data) setData(new MTPDencryptedChatEmpty()); MTPDencryptedChatEmpty &v(_encryptedChatEmpty()); v.vid.read(from, end); } break; case mtpc_encryptedChatWaiting: _type = cons; { if (!data) setData(new MTPDencryptedChatWaiting()); MTPDencryptedChatWaiting &v(_encryptedChatWaiting()); 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; { if (!data) setData(new MTPDencryptedChatRequested()); MTPDencryptedChatRequested &v(_encryptedChatRequested()); 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; { if (!data) setData(new MTPDencryptedChat()); MTPDencryptedChat &v(_encryptedChat()); 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; { if (!data) setData(new MTPDencryptedChatDiscarded()); MTPDencryptedChatDiscarded &v(_encryptedChatDiscarded()); v.vid.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPencryptedChat"); } } inline void MTPencryptedChat::write(mtpBuffer &to) const { switch (_type) { case mtpc_encryptedChatEmpty: { const MTPDencryptedChatEmpty &v(c_encryptedChatEmpty()); v.vid.write(to); } break; case mtpc_encryptedChatWaiting: { const MTPDencryptedChatWaiting &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: { const MTPDencryptedChatRequested &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: { const MTPDencryptedChat &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: { const MTPDencryptedChatDiscarded &v(c_encryptedChatDiscarded()); v.vid.write(to); } break; } } inline MTPencryptedChat::MTPencryptedChat(mtpTypeId type) : mtpDataOwner(0), _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 MTPencryptedChat::MTPencryptedChat(MTPDencryptedChatEmpty *_data) : mtpDataOwner(_data), _type(mtpc_encryptedChatEmpty) { } inline MTPencryptedChat::MTPencryptedChat(MTPDencryptedChatWaiting *_data) : mtpDataOwner(_data), _type(mtpc_encryptedChatWaiting) { } inline MTPencryptedChat::MTPencryptedChat(MTPDencryptedChatRequested *_data) : mtpDataOwner(_data), _type(mtpc_encryptedChatRequested) { } inline MTPencryptedChat::MTPencryptedChat(MTPDencryptedChat *_data) : mtpDataOwner(_data), _type(mtpc_encryptedChat) { } inline MTPencryptedChat::MTPencryptedChat(MTPDencryptedChatDiscarded *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDinputEncryptedChat()); MTPDinputEncryptedChat &v(_inputEncryptedChat()); v.vchat_id.read(from, end); v.vaccess_hash.read(from, end); } inline void MTPinputEncryptedChat::write(mtpBuffer &to) const { const MTPDinputEncryptedChat &v(c_inputEncryptedChat()); v.vchat_id.write(to); v.vaccess_hash.write(to); } inline MTPinputEncryptedChat::MTPinputEncryptedChat(MTPDinputEncryptedChat *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPencryptedFile::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_encryptedFileEmpty: _type = cons; break; case mtpc_encryptedFile: _type = cons; { if (!data) setData(new MTPDencryptedFile()); MTPDencryptedFile &v(_encryptedFile()); 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: { const MTPDencryptedFile &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_encryptedFileEmpty: break; case mtpc_encryptedFile: setData(new MTPDencryptedFile()); break; default: throw mtpErrorBadTypeId(type, "MTPencryptedFile"); } } inline MTPencryptedFile::MTPencryptedFile(MTPDencryptedFile *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputEncryptedFile::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputEncryptedFileEmpty: _type = cons; break; case mtpc_inputEncryptedFileUploaded: _type = cons; { if (!data) setData(new MTPDinputEncryptedFileUploaded()); MTPDinputEncryptedFileUploaded &v(_inputEncryptedFileUploaded()); 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; { if (!data) setData(new MTPDinputEncryptedFile()); MTPDinputEncryptedFile &v(_inputEncryptedFile()); v.vid.read(from, end); v.vaccess_hash.read(from, end); } break; case mtpc_inputEncryptedFileBigUploaded: _type = cons; { if (!data) setData(new MTPDinputEncryptedFileBigUploaded()); MTPDinputEncryptedFileBigUploaded &v(_inputEncryptedFileBigUploaded()); 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: { const MTPDinputEncryptedFileUploaded &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: { const MTPDinputEncryptedFile &v(c_inputEncryptedFile()); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputEncryptedFileBigUploaded: { const MTPDinputEncryptedFileBigUploaded &v(c_inputEncryptedFileBigUploaded()); v.vid.write(to); v.vparts.write(to); v.vkey_fingerprint.write(to); } break; } } inline MTPinputEncryptedFile::MTPinputEncryptedFile(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputEncryptedFile::MTPinputEncryptedFile(MTPDinputEncryptedFileUploaded *_data) : mtpDataOwner(_data), _type(mtpc_inputEncryptedFileUploaded) { } inline MTPinputEncryptedFile::MTPinputEncryptedFile(MTPDinputEncryptedFile *_data) : mtpDataOwner(_data), _type(mtpc_inputEncryptedFile) { } inline MTPinputEncryptedFile::MTPinputEncryptedFile(MTPDinputEncryptedFileBigUploaded *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPencryptedMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_encryptedMessage: _type = cons; { if (!data) setData(new MTPDencryptedMessage()); MTPDencryptedMessage &v(_encryptedMessage()); 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; { if (!data) setData(new MTPDencryptedMessageService()); MTPDencryptedMessageService &v(_encryptedMessageService()); 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: { const MTPDencryptedMessage &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: { const MTPDencryptedMessageService &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_encryptedMessage: setData(new MTPDencryptedMessage()); break; case mtpc_encryptedMessageService: setData(new MTPDencryptedMessageService()); break; default: throw mtpErrorBadTypeId(type, "MTPencryptedMessage"); } } inline MTPencryptedMessage::MTPencryptedMessage(MTPDencryptedMessage *_data) : mtpDataOwner(_data), _type(mtpc_encryptedMessage) { } inline MTPencryptedMessage::MTPencryptedMessage(MTPDencryptedMessageService *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_dhConfig::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_dhConfigNotModified: _type = cons; { if (!data) setData(new MTPDmessages_dhConfigNotModified()); MTPDmessages_dhConfigNotModified &v(_messages_dhConfigNotModified()); v.vrandom.read(from, end); } break; case mtpc_messages_dhConfig: _type = cons; { if (!data) setData(new MTPDmessages_dhConfig()); MTPDmessages_dhConfig &v(_messages_dhConfig()); 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: { const MTPDmessages_dhConfigNotModified &v(c_messages_dhConfigNotModified()); v.vrandom.write(to); } break; case mtpc_messages_dhConfig: { const MTPDmessages_dhConfig &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) : mtpDataOwner(0), _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 MTPmessages_dhConfig::MTPmessages_dhConfig(MTPDmessages_dhConfigNotModified *_data) : mtpDataOwner(_data), _type(mtpc_messages_dhConfigNotModified) { } inline MTPmessages_dhConfig::MTPmessages_dhConfig(MTPDmessages_dhConfig *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_sentEncryptedMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_sentEncryptedMessage: _type = cons; { if (!data) setData(new MTPDmessages_sentEncryptedMessage()); MTPDmessages_sentEncryptedMessage &v(_messages_sentEncryptedMessage()); v.vdate.read(from, end); } break; case mtpc_messages_sentEncryptedFile: _type = cons; { if (!data) setData(new MTPDmessages_sentEncryptedFile()); MTPDmessages_sentEncryptedFile &v(_messages_sentEncryptedFile()); 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: { const MTPDmessages_sentEncryptedMessage &v(c_messages_sentEncryptedMessage()); v.vdate.write(to); } break; case mtpc_messages_sentEncryptedFile: { const MTPDmessages_sentEncryptedFile &v(c_messages_sentEncryptedFile()); v.vdate.write(to); v.vfile.write(to); } break; } } inline MTPmessages_sentEncryptedMessage::MTPmessages_sentEncryptedMessage(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_sentEncryptedMessage::MTPmessages_sentEncryptedMessage(MTPDmessages_sentEncryptedMessage *_data) : mtpDataOwner(_data), _type(mtpc_messages_sentEncryptedMessage) { } inline MTPmessages_sentEncryptedMessage::MTPmessages_sentEncryptedMessage(MTPDmessages_sentEncryptedFile *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputDocument::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputDocumentEmpty: _type = cons; break; case mtpc_inputDocument: _type = cons; { if (!data) setData(new MTPDinputDocument()); MTPDinputDocument &v(_inputDocument()); 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: { const MTPDinputDocument &v(c_inputDocument()); v.vid.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputDocument::MTPinputDocument(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputDocumentEmpty: break; case mtpc_inputDocument: setData(new MTPDinputDocument()); break; default: throw mtpErrorBadTypeId(type, "MTPinputDocument"); } } inline MTPinputDocument::MTPinputDocument(MTPDinputDocument *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPdocument::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_documentEmpty: _type = cons; { if (!data) setData(new MTPDdocumentEmpty()); MTPDdocumentEmpty &v(_documentEmpty()); v.vid.read(from, end); } break; case mtpc_document: _type = cons; { if (!data) setData(new MTPDdocument()); MTPDdocument &v(_document()); 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: { const MTPDdocumentEmpty &v(c_documentEmpty()); v.vid.write(to); } break; case mtpc_document: { const MTPDdocument &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_documentEmpty: setData(new MTPDdocumentEmpty()); break; case mtpc_document: setData(new MTPDdocument()); break; default: throw mtpErrorBadTypeId(type, "MTPdocument"); } } inline MTPdocument::MTPdocument(MTPDdocumentEmpty *_data) : mtpDataOwner(_data), _type(mtpc_documentEmpty) { } inline MTPdocument::MTPdocument(MTPDdocument *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDhelp_support()); MTPDhelp_support &v(_help_support()); v.vphone_number.read(from, end); v.vuser.read(from, end); } inline void MTPhelp_support::write(mtpBuffer &to) const { const MTPDhelp_support &v(c_help_support()); v.vphone_number.write(to); v.vuser.write(to); } inline MTPhelp_support::MTPhelp_support(MTPDhelp_support *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPnotifyPeer::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_notifyPeer: _type = cons; { if (!data) setData(new MTPDnotifyPeer()); MTPDnotifyPeer &v(_notifyPeer()); 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: { const MTPDnotifyPeer &v(c_notifyPeer()); v.vpeer.write(to); } break; } } inline MTPnotifyPeer::MTPnotifyPeer(mtpTypeId type) : mtpDataOwner(0), _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 MTPnotifyPeer::MTPnotifyPeer(MTPDnotifyPeer *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPsendMessageAction::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); 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; { if (!data) setData(new MTPDsendMessageUploadVideoAction()); MTPDsendMessageUploadVideoAction &v(_sendMessageUploadVideoAction()); v.vprogress.read(from, end); } break; case mtpc_sendMessageRecordAudioAction: _type = cons; break; case mtpc_sendMessageUploadAudioAction: _type = cons; { if (!data) setData(new MTPDsendMessageUploadAudioAction()); MTPDsendMessageUploadAudioAction &v(_sendMessageUploadAudioAction()); v.vprogress.read(from, end); } break; case mtpc_sendMessageUploadPhotoAction: _type = cons; { if (!data) setData(new MTPDsendMessageUploadPhotoAction()); MTPDsendMessageUploadPhotoAction &v(_sendMessageUploadPhotoAction()); v.vprogress.read(from, end); } break; case mtpc_sendMessageUploadDocumentAction: _type = cons; { if (!data) setData(new MTPDsendMessageUploadDocumentAction()); MTPDsendMessageUploadDocumentAction &v(_sendMessageUploadDocumentAction()); v.vprogress.read(from, end); } break; case mtpc_sendMessageGeoLocationAction: _type = cons; break; case mtpc_sendMessageChooseContactAction: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPsendMessageAction"); } } inline void MTPsendMessageAction::write(mtpBuffer &to) const { switch (_type) { case mtpc_sendMessageUploadVideoAction: { const MTPDsendMessageUploadVideoAction &v(c_sendMessageUploadVideoAction()); v.vprogress.write(to); } break; case mtpc_sendMessageUploadAudioAction: { const MTPDsendMessageUploadAudioAction &v(c_sendMessageUploadAudioAction()); v.vprogress.write(to); } break; case mtpc_sendMessageUploadPhotoAction: { const MTPDsendMessageUploadPhotoAction &v(c_sendMessageUploadPhotoAction()); v.vprogress.write(to); } break; case mtpc_sendMessageUploadDocumentAction: { const MTPDsendMessageUploadDocumentAction &v(c_sendMessageUploadDocumentAction()); v.vprogress.write(to); } break; } } inline MTPsendMessageAction::MTPsendMessageAction(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPsendMessageAction"); } } inline MTPsendMessageAction::MTPsendMessageAction(MTPDsendMessageUploadVideoAction *_data) : mtpDataOwner(_data), _type(mtpc_sendMessageUploadVideoAction) { } inline MTPsendMessageAction::MTPsendMessageAction(MTPDsendMessageUploadAudioAction *_data) : mtpDataOwner(_data), _type(mtpc_sendMessageUploadAudioAction) { } inline MTPsendMessageAction::MTPsendMessageAction(MTPDsendMessageUploadPhotoAction *_data) : mtpDataOwner(_data), _type(mtpc_sendMessageUploadPhotoAction) { } inline MTPsendMessageAction::MTPsendMessageAction(MTPDsendMessageUploadDocumentAction *_data) : mtpDataOwner(_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 MTPcontacts_found::MTPcontacts_found() : mtpDataOwner(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"); if (!data) setData(new MTPDcontacts_found()); MTPDcontacts_found &v(_contacts_found()); v.vresults.read(from, end); v.vchats.read(from, end); v.vusers.read(from, end); } inline void MTPcontacts_found::write(mtpBuffer &to) const { const MTPDcontacts_found &v(c_contacts_found()); v.vresults.write(to); v.vchats.write(to); v.vusers.write(to); } inline MTPcontacts_found::MTPcontacts_found(MTPDcontacts_found *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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; 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; 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 uint32 MTPprivacyKey::innerLength() const { return 0; } inline mtpTypeId MTPprivacyKey::type() const { if (!_type) throw mtpErrorUninitialized(); 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; 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; 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 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputPrivacyRule::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputPrivacyValueAllowContacts: _type = cons; break; case mtpc_inputPrivacyValueAllowAll: _type = cons; break; case mtpc_inputPrivacyValueAllowUsers: _type = cons; { if (!data) setData(new MTPDinputPrivacyValueAllowUsers()); MTPDinputPrivacyValueAllowUsers &v(_inputPrivacyValueAllowUsers()); v.vusers.read(from, end); } break; case mtpc_inputPrivacyValueDisallowContacts: _type = cons; break; case mtpc_inputPrivacyValueDisallowAll: _type = cons; break; case mtpc_inputPrivacyValueDisallowUsers: _type = cons; { if (!data) setData(new MTPDinputPrivacyValueDisallowUsers()); MTPDinputPrivacyValueDisallowUsers &v(_inputPrivacyValueDisallowUsers()); v.vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputPrivacyRule"); } } inline void MTPinputPrivacyRule::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputPrivacyValueAllowUsers: { const MTPDinputPrivacyValueAllowUsers &v(c_inputPrivacyValueAllowUsers()); v.vusers.write(to); } break; case mtpc_inputPrivacyValueDisallowUsers: { const MTPDinputPrivacyValueDisallowUsers &v(c_inputPrivacyValueDisallowUsers()); v.vusers.write(to); } break; } } inline MTPinputPrivacyRule::MTPinputPrivacyRule(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputPrivacyRule::MTPinputPrivacyRule(MTPDinputPrivacyValueAllowUsers *_data) : mtpDataOwner(_data), _type(mtpc_inputPrivacyValueAllowUsers) { } inline MTPinputPrivacyRule::MTPinputPrivacyRule(MTPDinputPrivacyValueDisallowUsers *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPprivacyRule::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_privacyValueAllowContacts: _type = cons; break; case mtpc_privacyValueAllowAll: _type = cons; break; case mtpc_privacyValueAllowUsers: _type = cons; { if (!data) setData(new MTPDprivacyValueAllowUsers()); MTPDprivacyValueAllowUsers &v(_privacyValueAllowUsers()); v.vusers.read(from, end); } break; case mtpc_privacyValueDisallowContacts: _type = cons; break; case mtpc_privacyValueDisallowAll: _type = cons; break; case mtpc_privacyValueDisallowUsers: _type = cons; { if (!data) setData(new MTPDprivacyValueDisallowUsers()); MTPDprivacyValueDisallowUsers &v(_privacyValueDisallowUsers()); v.vusers.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPprivacyRule"); } } inline void MTPprivacyRule::write(mtpBuffer &to) const { switch (_type) { case mtpc_privacyValueAllowUsers: { const MTPDprivacyValueAllowUsers &v(c_privacyValueAllowUsers()); v.vusers.write(to); } break; case mtpc_privacyValueDisallowUsers: { const MTPDprivacyValueDisallowUsers &v(c_privacyValueDisallowUsers()); v.vusers.write(to); } break; } } inline MTPprivacyRule::MTPprivacyRule(mtpTypeId type) : mtpDataOwner(0), _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 MTPprivacyRule::MTPprivacyRule(MTPDprivacyValueAllowUsers *_data) : mtpDataOwner(_data), _type(mtpc_privacyValueAllowUsers) { } inline MTPprivacyRule::MTPprivacyRule(MTPDprivacyValueDisallowUsers *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDaccount_privacyRules()); MTPDaccount_privacyRules &v(_account_privacyRules()); v.vrules.read(from, end); v.vusers.read(from, end); } inline void MTPaccount_privacyRules::write(mtpBuffer &to) const { const MTPDaccount_privacyRules &v(c_account_privacyRules()); v.vrules.write(to); v.vusers.write(to); } inline MTPaccount_privacyRules::MTPaccount_privacyRules(MTPDaccount_privacyRules *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDaccountDaysTTL()); MTPDaccountDaysTTL &v(_accountDaysTTL()); v.vdays.read(from, end); } inline void MTPaccountDaysTTL::write(mtpBuffer &to) const { const MTPDaccountDaysTTL &v(c_accountDaysTTL()); v.vdays.write(to); } inline MTPaccountDaysTTL::MTPaccountDaysTTL(MTPDaccountDaysTTL *_data) : mtpDataOwner(_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.valt.innerLength() + v.vstickerset.innerLength(); } 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPdocumentAttribute::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_documentAttributeImageSize: _type = cons; { if (!data) setData(new MTPDdocumentAttributeImageSize()); MTPDdocumentAttributeImageSize &v(_documentAttributeImageSize()); v.vw.read(from, end); v.vh.read(from, end); } break; case mtpc_documentAttributeAnimated: _type = cons; break; case mtpc_documentAttributeSticker: _type = cons; { if (!data) setData(new MTPDdocumentAttributeSticker()); MTPDdocumentAttributeSticker &v(_documentAttributeSticker()); v.valt.read(from, end); v.vstickerset.read(from, end); } break; case mtpc_documentAttributeVideo: _type = cons; { if (!data) setData(new MTPDdocumentAttributeVideo()); MTPDdocumentAttributeVideo &v(_documentAttributeVideo()); v.vduration.read(from, end); v.vw.read(from, end); v.vh.read(from, end); } break; case mtpc_documentAttributeAudio: _type = cons; { if (!data) setData(new MTPDdocumentAttributeAudio()); MTPDdocumentAttributeAudio &v(_documentAttributeAudio()); 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; { if (!data) setData(new MTPDdocumentAttributeFilename()); MTPDdocumentAttributeFilename &v(_documentAttributeFilename()); v.vfile_name.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPdocumentAttribute"); } } inline void MTPdocumentAttribute::write(mtpBuffer &to) const { switch (_type) { case mtpc_documentAttributeImageSize: { const MTPDdocumentAttributeImageSize &v(c_documentAttributeImageSize()); v.vw.write(to); v.vh.write(to); } break; case mtpc_documentAttributeSticker: { const MTPDdocumentAttributeSticker &v(c_documentAttributeSticker()); v.valt.write(to); v.vstickerset.write(to); } break; case mtpc_documentAttributeVideo: { const MTPDdocumentAttributeVideo &v(c_documentAttributeVideo()); v.vduration.write(to); v.vw.write(to); v.vh.write(to); } break; case mtpc_documentAttributeAudio: { const MTPDdocumentAttributeAudio &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: { const MTPDdocumentAttributeFilename &v(c_documentAttributeFilename()); v.vfile_name.write(to); } break; } } inline MTPdocumentAttribute::MTPdocumentAttribute(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPdocumentAttribute"); } } inline MTPdocumentAttribute::MTPdocumentAttribute(MTPDdocumentAttributeImageSize *_data) : mtpDataOwner(_data), _type(mtpc_documentAttributeImageSize) { } inline MTPdocumentAttribute::MTPdocumentAttribute(MTPDdocumentAttributeSticker *_data) : mtpDataOwner(_data), _type(mtpc_documentAttributeSticker) { } inline MTPdocumentAttribute::MTPdocumentAttribute(MTPDdocumentAttributeVideo *_data) : mtpDataOwner(_data), _type(mtpc_documentAttributeVideo) { } inline MTPdocumentAttribute::MTPdocumentAttribute(MTPDdocumentAttributeAudio *_data) : mtpDataOwner(_data), _type(mtpc_documentAttributeAudio) { } inline MTPdocumentAttribute::MTPdocumentAttribute(MTPDdocumentAttributeFilename *_data) : mtpDataOwner(_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(); } inline MTPdocumentAttribute MTP_documentAttributeSticker(const MTPstring &_alt, const MTPInputStickerSet &_stickerset) { return MTP::internal::TypeCreator::new_documentAttributeSticker(_alt, _stickerset); } 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 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_stickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_stickersNotModified: _type = cons; break; case mtpc_messages_stickers: _type = cons; { if (!data) setData(new MTPDmessages_stickers()); MTPDmessages_stickers &v(_messages_stickers()); 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: { const MTPDmessages_stickers &v(c_messages_stickers()); v.vhash.write(to); v.vstickers.write(to); } break; } } inline MTPmessages_stickers::MTPmessages_stickers(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_stickers::MTPmessages_stickers(MTPDmessages_stickers *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDstickerPack()); MTPDstickerPack &v(_stickerPack()); v.vemoticon.read(from, end); v.vdocuments.read(from, end); } inline void MTPstickerPack::write(mtpBuffer &to) const { const MTPDstickerPack &v(c_stickerPack()); v.vemoticon.write(to); v.vdocuments.write(to); } inline MTPstickerPack::MTPstickerPack(MTPDstickerPack *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_allStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_allStickersNotModified: _type = cons; break; case mtpc_messages_allStickers: _type = cons; { if (!data) setData(new MTPDmessages_allStickers()); MTPDmessages_allStickers &v(_messages_allStickers()); 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: { const MTPDmessages_allStickers &v(c_messages_allStickers()); v.vhash.write(to); v.vsets.write(to); } break; } } inline MTPmessages_allStickers::MTPmessages_allStickers(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_allStickers::MTPmessages_allStickers(MTPDmessages_allStickers *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDdisabledFeature()); MTPDdisabledFeature &v(_disabledFeature()); v.vfeature.read(from, end); v.vdescription.read(from, end); } inline void MTPdisabledFeature::write(mtpBuffer &to) const { const MTPDdisabledFeature &v(c_disabledFeature()); v.vfeature.write(to); v.vdescription.write(to); } inline MTPdisabledFeature::MTPdisabledFeature(MTPDdisabledFeature *_data) : mtpDataOwner(_data) { } inline MTPdisabledFeature MTP_disabledFeature(const MTPstring &_feature, const MTPstring &_description) { return MTP::internal::TypeCreator::new_disabledFeature(_feature, _description); } inline MTPmessages_affectedMessages::MTPmessages_affectedMessages() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_affectedMessages()); MTPDmessages_affectedMessages &v(_messages_affectedMessages()); v.vpts.read(from, end); v.vpts_count.read(from, end); } inline void MTPmessages_affectedMessages::write(mtpBuffer &to) const { const MTPDmessages_affectedMessages &v(c_messages_affectedMessages()); v.vpts.write(to); v.vpts_count.write(to); } inline MTPmessages_affectedMessages::MTPmessages_affectedMessages(MTPDmessages_affectedMessages *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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.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); } } return 0; } inline mtpTypeId MTPwebPage::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPwebPage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_webPageEmpty: _type = cons; { if (!data) setData(new MTPDwebPageEmpty()); MTPDwebPageEmpty &v(_webPageEmpty()); v.vid.read(from, end); } break; case mtpc_webPagePending: _type = cons; { if (!data) setData(new MTPDwebPagePending()); MTPDwebPagePending &v(_webPagePending()); v.vid.read(from, end); v.vdate.read(from, end); } break; case mtpc_webPage: _type = cons; { if (!data) setData(new MTPDwebPage()); MTPDwebPage &v(_webPage()); v.vflags.read(from, end); v.vid.read(from, end); v.vurl.read(from, end); v.vdisplay_url.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(); } } break; default: throw mtpErrorUnexpected(cons, "MTPwebPage"); } } inline void MTPwebPage::write(mtpBuffer &to) const { switch (_type) { case mtpc_webPageEmpty: { const MTPDwebPageEmpty &v(c_webPageEmpty()); v.vid.write(to); } break; case mtpc_webPagePending: { const MTPDwebPagePending &v(c_webPagePending()); v.vid.write(to); v.vdate.write(to); } break; case mtpc_webPage: { const MTPDwebPage &v(c_webPage()); v.vflags.write(to); v.vid.write(to); v.vurl.write(to); v.vdisplay_url.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); } break; } } inline MTPwebPage::MTPwebPage(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPwebPage"); } } inline MTPwebPage::MTPwebPage(MTPDwebPageEmpty *_data) : mtpDataOwner(_data), _type(mtpc_webPageEmpty) { } inline MTPwebPage::MTPwebPage(MTPDwebPagePending *_data) : mtpDataOwner(_data), _type(mtpc_webPagePending) { } inline MTPwebPage::MTPwebPage(MTPDwebPage *_data) : mtpDataOwner(_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, 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) { return MTP::internal::TypeCreator::new_webPage(_flags, _id, _url, _display_url, _type, _site_name, _title, _description, _photo, _embed_url, _embed_type, _embed_width, _embed_height, _duration, _author, _document); } inline MTPauthorization::MTPauthorization() : mtpDataOwner(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"); if (!data) setData(new MTPDauthorization()); MTPDauthorization &v(_authorization()); 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 { const MTPDauthorization &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 MTPauthorization::MTPauthorization(MTPDauthorization *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDaccount_authorizations()); MTPDaccount_authorizations &v(_account_authorizations()); v.vauthorizations.read(from, end); } inline void MTPaccount_authorizations::write(mtpBuffer &to) const { const MTPDaccount_authorizations &v(c_account_authorizations()); v.vauthorizations.write(to); } inline MTPaccount_authorizations::MTPaccount_authorizations(MTPDaccount_authorizations *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPaccount_password::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_account_noPassword: _type = cons; { if (!data) setData(new MTPDaccount_noPassword()); MTPDaccount_noPassword &v(_account_noPassword()); v.vnew_salt.read(from, end); v.vemail_unconfirmed_pattern.read(from, end); } break; case mtpc_account_password: _type = cons; { if (!data) setData(new MTPDaccount_password()); MTPDaccount_password &v(_account_password()); 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: { const MTPDaccount_noPassword &v(c_account_noPassword()); v.vnew_salt.write(to); v.vemail_unconfirmed_pattern.write(to); } break; case mtpc_account_password: { const MTPDaccount_password &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) : mtpDataOwner(0), _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 MTPaccount_password::MTPaccount_password(MTPDaccount_noPassword *_data) : mtpDataOwner(_data), _type(mtpc_account_noPassword) { } inline MTPaccount_password::MTPaccount_password(MTPDaccount_password *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDaccount_passwordSettings()); MTPDaccount_passwordSettings &v(_account_passwordSettings()); v.vemail.read(from, end); } inline void MTPaccount_passwordSettings::write(mtpBuffer &to) const { const MTPDaccount_passwordSettings &v(c_account_passwordSettings()); v.vemail.write(to); } inline MTPaccount_passwordSettings::MTPaccount_passwordSettings(MTPDaccount_passwordSettings *_data) : mtpDataOwner(_data) { } inline MTPaccount_passwordSettings MTP_account_passwordSettings(const MTPstring &_email) { return MTP::internal::TypeCreator::new_account_passwordSettings(_email); } inline MTPaccount_passwordInputSettings::MTPaccount_passwordInputSettings() : mtpDataOwner(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"); if (!data) setData(new MTPDaccount_passwordInputSettings()); MTPDaccount_passwordInputSettings &v(_account_passwordInputSettings()); 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 { const MTPDaccount_passwordInputSettings &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 MTPaccount_passwordInputSettings::MTPaccount_passwordInputSettings(MTPDaccount_passwordInputSettings *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDauth_passwordRecovery()); MTPDauth_passwordRecovery &v(_auth_passwordRecovery()); v.vemail_pattern.read(from, end); } inline void MTPauth_passwordRecovery::write(mtpBuffer &to) const { const MTPDauth_passwordRecovery &v(c_auth_passwordRecovery()); v.vemail_pattern.write(to); } inline MTPauth_passwordRecovery::MTPauth_passwordRecovery(MTPDauth_passwordRecovery *_data) : mtpDataOwner(_data) { } inline MTPauth_passwordRecovery MTP_auth_passwordRecovery(const MTPstring &_email_pattern) { return MTP::internal::TypeCreator::new_auth_passwordRecovery(_email_pattern); } inline MTPreceivedNotifyMessage::MTPreceivedNotifyMessage() : mtpDataOwner(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"); if (!data) setData(new MTPDreceivedNotifyMessage()); MTPDreceivedNotifyMessage &v(_receivedNotifyMessage()); v.vid.read(from, end); v.vflags.read(from, end); } inline void MTPreceivedNotifyMessage::write(mtpBuffer &to) const { const MTPDreceivedNotifyMessage &v(c_receivedNotifyMessage()); v.vid.write(to); v.vflags.write(to); } inline MTPreceivedNotifyMessage::MTPreceivedNotifyMessage(MTPDreceivedNotifyMessage *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPexportedChatInvite::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatInviteEmpty: _type = cons; break; case mtpc_chatInviteExported: _type = cons; { if (!data) setData(new MTPDchatInviteExported()); MTPDchatInviteExported &v(_chatInviteExported()); v.vlink.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPexportedChatInvite"); } } inline void MTPexportedChatInvite::write(mtpBuffer &to) const { switch (_type) { case mtpc_chatInviteExported: { const MTPDchatInviteExported &v(c_chatInviteExported()); v.vlink.write(to); } break; } } inline MTPexportedChatInvite::MTPexportedChatInvite(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_chatInviteEmpty: break; case mtpc_chatInviteExported: setData(new MTPDchatInviteExported()); break; default: throw mtpErrorBadTypeId(type, "MTPexportedChatInvite"); } } inline MTPexportedChatInvite::MTPexportedChatInvite(MTPDchatInviteExported *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchatInvite::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_chatInviteAlready: _type = cons; { if (!data) setData(new MTPDchatInviteAlready()); MTPDchatInviteAlready &v(_chatInviteAlready()); v.vchat.read(from, end); } break; case mtpc_chatInvite: _type = cons; { if (!data) setData(new MTPDchatInvite()); MTPDchatInvite &v(_chatInvite()); 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: { const MTPDchatInviteAlready &v(c_chatInviteAlready()); v.vchat.write(to); } break; case mtpc_chatInvite: { const MTPDchatInvite &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_chatInviteAlready: setData(new MTPDchatInviteAlready()); break; case mtpc_chatInvite: setData(new MTPDchatInvite()); break; default: throw mtpErrorBadTypeId(type, "MTPchatInvite"); } } inline MTPchatInvite::MTPchatInvite(MTPDchatInviteAlready *_data) : mtpDataOwner(_data), _type(mtpc_chatInviteAlready) { } inline MTPchatInvite::MTPchatInvite(MTPDchatInvite *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputStickerSet::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputStickerSetEmpty: _type = cons; break; case mtpc_inputStickerSetID: _type = cons; { if (!data) setData(new MTPDinputStickerSetID()); MTPDinputStickerSetID &v(_inputStickerSetID()); v.vid.read(from, end); v.vaccess_hash.read(from, end); } break; case mtpc_inputStickerSetShortName: _type = cons; { if (!data) setData(new MTPDinputStickerSetShortName()); MTPDinputStickerSetShortName &v(_inputStickerSetShortName()); v.vshort_name.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPinputStickerSet"); } } inline void MTPinputStickerSet::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputStickerSetID: { const MTPDinputStickerSetID &v(c_inputStickerSetID()); v.vid.write(to); v.vaccess_hash.write(to); } break; case mtpc_inputStickerSetShortName: { const MTPDinputStickerSetShortName &v(c_inputStickerSetShortName()); v.vshort_name.write(to); } break; } } inline MTPinputStickerSet::MTPinputStickerSet(mtpTypeId type) : mtpDataOwner(0), _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 MTPinputStickerSet::MTPinputStickerSet(MTPDinputStickerSetID *_data) : mtpDataOwner(_data), _type(mtpc_inputStickerSetID) { } inline MTPinputStickerSet::MTPinputStickerSet(MTPDinputStickerSetShortName *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDstickerSet()); MTPDstickerSet &v(_stickerSet()); 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 { const MTPDstickerSet &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 MTPstickerSet::MTPstickerSet(MTPDstickerSet *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_stickerSet()); MTPDmessages_stickerSet &v(_messages_stickerSet()); v.vset.read(from, end); v.vpacks.read(from, end); v.vdocuments.read(from, end); } inline void MTPmessages_stickerSet::write(mtpBuffer &to) const { const MTPDmessages_stickerSet &v(c_messages_stickerSet()); v.vset.write(to); v.vpacks.write(to); v.vdocuments.write(to); } inline MTPmessages_stickerSet::MTPmessages_stickerSet(MTPDmessages_stickerSet *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDbotCommand()); MTPDbotCommand &v(_botCommand()); v.vcommand.read(from, end); v.vdescription.read(from, end); } inline void MTPbotCommand::write(mtpBuffer &to) const { const MTPDbotCommand &v(c_botCommand()); v.vcommand.write(to); v.vdescription.write(to); } inline MTPbotCommand::MTPbotCommand(MTPDbotCommand *_data) : mtpDataOwner(_data) { } inline MTPbotCommand MTP_botCommand(const MTPstring &_command, const MTPstring &_description) { return MTP::internal::TypeCreator::new_botCommand(_command, _description); } inline MTPbotInfo::MTPbotInfo() : mtpDataOwner(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"); if (!data) setData(new MTPDbotInfo()); MTPDbotInfo &v(_botInfo()); v.vuser_id.read(from, end); v.vdescription.read(from, end); v.vcommands.read(from, end); } inline void MTPbotInfo::write(mtpBuffer &to) const { const MTPDbotInfo &v(c_botInfo()); v.vuser_id.write(to); v.vdescription.write(to); v.vcommands.write(to); } inline MTPbotInfo::MTPbotInfo(MTPDbotInfo *_data) : mtpDataOwner(_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(); } } return 0; } inline mtpTypeId MTPkeyboardButton::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPkeyboardButton::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_keyboardButton: _type = cons; { if (!data) setData(new MTPDkeyboardButton()); MTPDkeyboardButton &v(_keyboardButton()); v.vtext.read(from, end); } break; case mtpc_keyboardButtonUrl: _type = cons; { if (!data) setData(new MTPDkeyboardButtonUrl()); MTPDkeyboardButtonUrl &v(_keyboardButtonUrl()); v.vtext.read(from, end); v.vurl.read(from, end); } break; case mtpc_keyboardButtonCallback: _type = cons; { if (!data) setData(new MTPDkeyboardButtonCallback()); MTPDkeyboardButtonCallback &v(_keyboardButtonCallback()); v.vtext.read(from, end); v.vdata.read(from, end); } break; case mtpc_keyboardButtonRequestPhone: _type = cons; { if (!data) setData(new MTPDkeyboardButtonRequestPhone()); MTPDkeyboardButtonRequestPhone &v(_keyboardButtonRequestPhone()); v.vtext.read(from, end); } break; case mtpc_keyboardButtonRequestGeoLocation: _type = cons; { if (!data) setData(new MTPDkeyboardButtonRequestGeoLocation()); MTPDkeyboardButtonRequestGeoLocation &v(_keyboardButtonRequestGeoLocation()); v.vtext.read(from, end); } break; case mtpc_keyboardButtonSwitchInline: _type = cons; { if (!data) setData(new MTPDkeyboardButtonSwitchInline()); MTPDkeyboardButtonSwitchInline &v(_keyboardButtonSwitchInline()); v.vflags.read(from, end); v.vtext.read(from, end); v.vquery.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPkeyboardButton"); } } inline void MTPkeyboardButton::write(mtpBuffer &to) const { switch (_type) { case mtpc_keyboardButton: { const MTPDkeyboardButton &v(c_keyboardButton()); v.vtext.write(to); } break; case mtpc_keyboardButtonUrl: { const MTPDkeyboardButtonUrl &v(c_keyboardButtonUrl()); v.vtext.write(to); v.vurl.write(to); } break; case mtpc_keyboardButtonCallback: { const MTPDkeyboardButtonCallback &v(c_keyboardButtonCallback()); v.vtext.write(to); v.vdata.write(to); } break; case mtpc_keyboardButtonRequestPhone: { const MTPDkeyboardButtonRequestPhone &v(c_keyboardButtonRequestPhone()); v.vtext.write(to); } break; case mtpc_keyboardButtonRequestGeoLocation: { const MTPDkeyboardButtonRequestGeoLocation &v(c_keyboardButtonRequestGeoLocation()); v.vtext.write(to); } break; case mtpc_keyboardButtonSwitchInline: { const MTPDkeyboardButtonSwitchInline &v(c_keyboardButtonSwitchInline()); v.vflags.write(to); v.vtext.write(to); v.vquery.write(to); } break; } } inline MTPkeyboardButton::MTPkeyboardButton(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPkeyboardButton"); } } inline MTPkeyboardButton::MTPkeyboardButton(MTPDkeyboardButton *_data) : mtpDataOwner(_data), _type(mtpc_keyboardButton) { } inline MTPkeyboardButton::MTPkeyboardButton(MTPDkeyboardButtonUrl *_data) : mtpDataOwner(_data), _type(mtpc_keyboardButtonUrl) { } inline MTPkeyboardButton::MTPkeyboardButton(MTPDkeyboardButtonCallback *_data) : mtpDataOwner(_data), _type(mtpc_keyboardButtonCallback) { } inline MTPkeyboardButton::MTPkeyboardButton(MTPDkeyboardButtonRequestPhone *_data) : mtpDataOwner(_data), _type(mtpc_keyboardButtonRequestPhone) { } inline MTPkeyboardButton::MTPkeyboardButton(MTPDkeyboardButtonRequestGeoLocation *_data) : mtpDataOwner(_data), _type(mtpc_keyboardButtonRequestGeoLocation) { } inline MTPkeyboardButton::MTPkeyboardButton(MTPDkeyboardButtonSwitchInline *_data) : mtpDataOwner(_data), _type(mtpc_keyboardButtonSwitchInline) { } 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 MTPkeyboardButtonRow::MTPkeyboardButtonRow() : mtpDataOwner(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"); if (!data) setData(new MTPDkeyboardButtonRow()); MTPDkeyboardButtonRow &v(_keyboardButtonRow()); v.vbuttons.read(from, end); } inline void MTPkeyboardButtonRow::write(mtpBuffer &to) const { const MTPDkeyboardButtonRow &v(c_keyboardButtonRow()); v.vbuttons.write(to); } inline MTPkeyboardButtonRow::MTPkeyboardButtonRow(MTPDkeyboardButtonRow *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPreplyMarkup::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_replyKeyboardHide: _type = cons; { if (!data) setData(new MTPDreplyKeyboardHide()); MTPDreplyKeyboardHide &v(_replyKeyboardHide()); v.vflags.read(from, end); } break; case mtpc_replyKeyboardForceReply: _type = cons; { if (!data) setData(new MTPDreplyKeyboardForceReply()); MTPDreplyKeyboardForceReply &v(_replyKeyboardForceReply()); v.vflags.read(from, end); } break; case mtpc_replyKeyboardMarkup: _type = cons; { if (!data) setData(new MTPDreplyKeyboardMarkup()); MTPDreplyKeyboardMarkup &v(_replyKeyboardMarkup()); v.vflags.read(from, end); v.vrows.read(from, end); } break; case mtpc_replyInlineMarkup: _type = cons; { if (!data) setData(new MTPDreplyInlineMarkup()); MTPDreplyInlineMarkup &v(_replyInlineMarkup()); v.vrows.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPreplyMarkup"); } } inline void MTPreplyMarkup::write(mtpBuffer &to) const { switch (_type) { case mtpc_replyKeyboardHide: { const MTPDreplyKeyboardHide &v(c_replyKeyboardHide()); v.vflags.write(to); } break; case mtpc_replyKeyboardForceReply: { const MTPDreplyKeyboardForceReply &v(c_replyKeyboardForceReply()); v.vflags.write(to); } break; case mtpc_replyKeyboardMarkup: { const MTPDreplyKeyboardMarkup &v(c_replyKeyboardMarkup()); v.vflags.write(to); v.vrows.write(to); } break; case mtpc_replyInlineMarkup: { const MTPDreplyInlineMarkup &v(c_replyInlineMarkup()); v.vrows.write(to); } break; } } inline MTPreplyMarkup::MTPreplyMarkup(mtpTypeId type) : mtpDataOwner(0), _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 MTPreplyMarkup::MTPreplyMarkup(MTPDreplyKeyboardHide *_data) : mtpDataOwner(_data), _type(mtpc_replyKeyboardHide) { } inline MTPreplyMarkup::MTPreplyMarkup(MTPDreplyKeyboardForceReply *_data) : mtpDataOwner(_data), _type(mtpc_replyKeyboardForceReply) { } inline MTPreplyMarkup::MTPreplyMarkup(MTPDreplyKeyboardMarkup *_data) : mtpDataOwner(_data), _type(mtpc_replyKeyboardMarkup) { } inline MTPreplyMarkup::MTPreplyMarkup(MTPDreplyInlineMarkup *_data) : mtpDataOwner(_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.vtext.innerLength(); } } return 0; } inline mtpTypeId MTPhelp_appChangelog::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPhelp_appChangelog::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_help_appChangelogEmpty: _type = cons; break; case mtpc_help_appChangelog: _type = cons; { if (!data) setData(new MTPDhelp_appChangelog()); MTPDhelp_appChangelog &v(_help_appChangelog()); v.vtext.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPhelp_appChangelog"); } } inline void MTPhelp_appChangelog::write(mtpBuffer &to) const { switch (_type) { case mtpc_help_appChangelog: { const MTPDhelp_appChangelog &v(c_help_appChangelog()); v.vtext.write(to); } break; } } inline MTPhelp_appChangelog::MTPhelp_appChangelog(mtpTypeId type) : mtpDataOwner(0), _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 MTPhelp_appChangelog::MTPhelp_appChangelog(MTPDhelp_appChangelog *_data) : mtpDataOwner(_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 &_text) { return MTP::internal::TypeCreator::new_help_appChangelog(_text); } 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessageEntity::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messageEntityUnknown: _type = cons; { if (!data) setData(new MTPDmessageEntityUnknown()); MTPDmessageEntityUnknown &v(_messageEntityUnknown()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityMention: _type = cons; { if (!data) setData(new MTPDmessageEntityMention()); MTPDmessageEntityMention &v(_messageEntityMention()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityHashtag: _type = cons; { if (!data) setData(new MTPDmessageEntityHashtag()); MTPDmessageEntityHashtag &v(_messageEntityHashtag()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityBotCommand: _type = cons; { if (!data) setData(new MTPDmessageEntityBotCommand()); MTPDmessageEntityBotCommand &v(_messageEntityBotCommand()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityUrl: _type = cons; { if (!data) setData(new MTPDmessageEntityUrl()); MTPDmessageEntityUrl &v(_messageEntityUrl()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityEmail: _type = cons; { if (!data) setData(new MTPDmessageEntityEmail()); MTPDmessageEntityEmail &v(_messageEntityEmail()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityBold: _type = cons; { if (!data) setData(new MTPDmessageEntityBold()); MTPDmessageEntityBold &v(_messageEntityBold()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityItalic: _type = cons; { if (!data) setData(new MTPDmessageEntityItalic()); MTPDmessageEntityItalic &v(_messageEntityItalic()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityCode: _type = cons; { if (!data) setData(new MTPDmessageEntityCode()); MTPDmessageEntityCode &v(_messageEntityCode()); v.voffset.read(from, end); v.vlength.read(from, end); } break; case mtpc_messageEntityPre: _type = cons; { if (!data) setData(new MTPDmessageEntityPre()); MTPDmessageEntityPre &v(_messageEntityPre()); v.voffset.read(from, end); v.vlength.read(from, end); v.vlanguage.read(from, end); } break; case mtpc_messageEntityTextUrl: _type = cons; { if (!data) setData(new MTPDmessageEntityTextUrl()); MTPDmessageEntityTextUrl &v(_messageEntityTextUrl()); v.voffset.read(from, end); v.vlength.read(from, end); v.vurl.read(from, end); } break; case mtpc_messageEntityMentionName: _type = cons; { if (!data) setData(new MTPDmessageEntityMentionName()); MTPDmessageEntityMentionName &v(_messageEntityMentionName()); v.voffset.read(from, end); v.vlength.read(from, end); v.vuser_id.read(from, end); } break; case mtpc_inputMessageEntityMentionName: _type = cons; { if (!data) setData(new MTPDinputMessageEntityMentionName()); MTPDinputMessageEntityMentionName &v(_inputMessageEntityMentionName()); 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: { const MTPDmessageEntityUnknown &v(c_messageEntityUnknown()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityMention: { const MTPDmessageEntityMention &v(c_messageEntityMention()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityHashtag: { const MTPDmessageEntityHashtag &v(c_messageEntityHashtag()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityBotCommand: { const MTPDmessageEntityBotCommand &v(c_messageEntityBotCommand()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityUrl: { const MTPDmessageEntityUrl &v(c_messageEntityUrl()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityEmail: { const MTPDmessageEntityEmail &v(c_messageEntityEmail()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityBold: { const MTPDmessageEntityBold &v(c_messageEntityBold()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityItalic: { const MTPDmessageEntityItalic &v(c_messageEntityItalic()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityCode: { const MTPDmessageEntityCode &v(c_messageEntityCode()); v.voffset.write(to); v.vlength.write(to); } break; case mtpc_messageEntityPre: { const MTPDmessageEntityPre &v(c_messageEntityPre()); v.voffset.write(to); v.vlength.write(to); v.vlanguage.write(to); } break; case mtpc_messageEntityTextUrl: { const MTPDmessageEntityTextUrl &v(c_messageEntityTextUrl()); v.voffset.write(to); v.vlength.write(to); v.vurl.write(to); } break; case mtpc_messageEntityMentionName: { const MTPDmessageEntityMentionName &v(c_messageEntityMentionName()); v.voffset.write(to); v.vlength.write(to); v.vuser_id.write(to); } break; case mtpc_inputMessageEntityMentionName: { const MTPDinputMessageEntityMentionName &v(c_inputMessageEntityMentionName()); v.voffset.write(to); v.vlength.write(to); v.vuser_id.write(to); } break; } } inline MTPmessageEntity::MTPmessageEntity(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityUnknown *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityUnknown) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityMention *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityMention) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityHashtag *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityHashtag) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityBotCommand *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityBotCommand) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityUrl *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityUrl) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityEmail *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityEmail) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityBold *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityBold) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityItalic *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityItalic) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityCode *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityCode) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityPre *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityPre) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityTextUrl *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityTextUrl) { } inline MTPmessageEntity::MTPmessageEntity(MTPDmessageEntityMentionName *_data) : mtpDataOwner(_data), _type(mtpc_messageEntityMentionName) { } inline MTPmessageEntity::MTPmessageEntity(MTPDinputMessageEntityMentionName *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputChannel::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputChannelEmpty: _type = cons; break; case mtpc_inputChannel: _type = cons; { if (!data) setData(new MTPDinputChannel()); MTPDinputChannel &v(_inputChannel()); 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: { const MTPDinputChannel &v(c_inputChannel()); v.vchannel_id.write(to); v.vaccess_hash.write(to); } break; } } inline MTPinputChannel::MTPinputChannel(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputChannelEmpty: break; case mtpc_inputChannel: setData(new MTPDinputChannel()); break; default: throw mtpErrorBadTypeId(type, "MTPinputChannel"); } } inline MTPinputChannel::MTPinputChannel(MTPDinputChannel *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDcontacts_resolvedPeer()); MTPDcontacts_resolvedPeer &v(_contacts_resolvedPeer()); v.vpeer.read(from, end); v.vchats.read(from, end); v.vusers.read(from, end); } inline void MTPcontacts_resolvedPeer::write(mtpBuffer &to) const { const MTPDcontacts_resolvedPeer &v(c_contacts_resolvedPeer()); v.vpeer.write(to); v.vchats.write(to); v.vusers.write(to); } inline MTPcontacts_resolvedPeer::MTPcontacts_resolvedPeer(MTPDcontacts_resolvedPeer *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmessageRange()); MTPDmessageRange &v(_messageRange()); v.vmin_id.read(from, end); v.vmax_id.read(from, end); } inline void MTPmessageRange::write(mtpBuffer &to) const { const MTPDmessageRange &v(c_messageRange()); v.vmin_id.write(to); v.vmax_id.write(to); } inline MTPmessageRange::MTPmessageRange(MTPDmessageRange *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPupdates_channelDifference::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_updates_channelDifferenceEmpty: _type = cons; { if (!data) setData(new MTPDupdates_channelDifferenceEmpty()); MTPDupdates_channelDifferenceEmpty &v(_updates_channelDifferenceEmpty()); 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; { if (!data) setData(new MTPDupdates_channelDifferenceTooLong()); MTPDupdates_channelDifferenceTooLong &v(_updates_channelDifferenceTooLong()); 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; { if (!data) setData(new MTPDupdates_channelDifference()); MTPDupdates_channelDifference &v(_updates_channelDifference()); 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: { const MTPDupdates_channelDifferenceEmpty &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: { const MTPDupdates_channelDifferenceTooLong &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: { const MTPDupdates_channelDifference &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) : mtpDataOwner(0), _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 MTPupdates_channelDifference::MTPupdates_channelDifference(MTPDupdates_channelDifferenceEmpty *_data) : mtpDataOwner(_data), _type(mtpc_updates_channelDifferenceEmpty) { } inline MTPupdates_channelDifference::MTPupdates_channelDifference(MTPDupdates_channelDifferenceTooLong *_data) : mtpDataOwner(_data), _type(mtpc_updates_channelDifferenceTooLong) { } inline MTPupdates_channelDifference::MTPupdates_channelDifference(MTPDupdates_channelDifference *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchannelMessagesFilter::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_channelMessagesFilterEmpty: _type = cons; break; case mtpc_channelMessagesFilter: _type = cons; { if (!data) setData(new MTPDchannelMessagesFilter()); MTPDchannelMessagesFilter &v(_channelMessagesFilter()); 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: { const MTPDchannelMessagesFilter &v(c_channelMessagesFilter()); v.vflags.write(to); v.vranges.write(to); } break; } } inline MTPchannelMessagesFilter::MTPchannelMessagesFilter(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_channelMessagesFilterEmpty: break; case mtpc_channelMessagesFilter: setData(new MTPDchannelMessagesFilter()); break; default: throw mtpErrorBadTypeId(type, "MTPchannelMessagesFilter"); } } inline MTPchannelMessagesFilter::MTPchannelMessagesFilter(MTPDchannelMessagesFilter *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPchannelParticipant::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_channelParticipant: _type = cons; { if (!data) setData(new MTPDchannelParticipant()); MTPDchannelParticipant &v(_channelParticipant()); v.vuser_id.read(from, end); v.vdate.read(from, end); } break; case mtpc_channelParticipantSelf: _type = cons; { if (!data) setData(new MTPDchannelParticipantSelf()); MTPDchannelParticipantSelf &v(_channelParticipantSelf()); v.vuser_id.read(from, end); v.vinviter_id.read(from, end); v.vdate.read(from, end); } break; case mtpc_channelParticipantModerator: _type = cons; { if (!data) setData(new MTPDchannelParticipantModerator()); MTPDchannelParticipantModerator &v(_channelParticipantModerator()); v.vuser_id.read(from, end); v.vinviter_id.read(from, end); v.vdate.read(from, end); } break; case mtpc_channelParticipantEditor: _type = cons; { if (!data) setData(new MTPDchannelParticipantEditor()); MTPDchannelParticipantEditor &v(_channelParticipantEditor()); v.vuser_id.read(from, end); v.vinviter_id.read(from, end); v.vdate.read(from, end); } break; case mtpc_channelParticipantKicked: _type = cons; { if (!data) setData(new MTPDchannelParticipantKicked()); MTPDchannelParticipantKicked &v(_channelParticipantKicked()); v.vuser_id.read(from, end); v.vkicked_by.read(from, end); v.vdate.read(from, end); } break; case mtpc_channelParticipantCreator: _type = cons; { if (!data) setData(new MTPDchannelParticipantCreator()); MTPDchannelParticipantCreator &v(_channelParticipantCreator()); v.vuser_id.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPchannelParticipant"); } } inline void MTPchannelParticipant::write(mtpBuffer &to) const { switch (_type) { case mtpc_channelParticipant: { const MTPDchannelParticipant &v(c_channelParticipant()); v.vuser_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantSelf: { const MTPDchannelParticipantSelf &v(c_channelParticipantSelf()); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantModerator: { const MTPDchannelParticipantModerator &v(c_channelParticipantModerator()); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantEditor: { const MTPDchannelParticipantEditor &v(c_channelParticipantEditor()); v.vuser_id.write(to); v.vinviter_id.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantKicked: { const MTPDchannelParticipantKicked &v(c_channelParticipantKicked()); v.vuser_id.write(to); v.vkicked_by.write(to); v.vdate.write(to); } break; case mtpc_channelParticipantCreator: { const MTPDchannelParticipantCreator &v(c_channelParticipantCreator()); v.vuser_id.write(to); } break; } } inline MTPchannelParticipant::MTPchannelParticipant(mtpTypeId type) : mtpDataOwner(0), _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 MTPchannelParticipant::MTPchannelParticipant(MTPDchannelParticipant *_data) : mtpDataOwner(_data), _type(mtpc_channelParticipant) { } inline MTPchannelParticipant::MTPchannelParticipant(MTPDchannelParticipantSelf *_data) : mtpDataOwner(_data), _type(mtpc_channelParticipantSelf) { } inline MTPchannelParticipant::MTPchannelParticipant(MTPDchannelParticipantModerator *_data) : mtpDataOwner(_data), _type(mtpc_channelParticipantModerator) { } inline MTPchannelParticipant::MTPchannelParticipant(MTPDchannelParticipantEditor *_data) : mtpDataOwner(_data), _type(mtpc_channelParticipantEditor) { } inline MTPchannelParticipant::MTPchannelParticipant(MTPDchannelParticipantKicked *_data) : mtpDataOwner(_data), _type(mtpc_channelParticipantKicked) { } inline MTPchannelParticipant::MTPchannelParticipant(MTPDchannelParticipantCreator *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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 { if (!_type) throw mtpErrorUninitialized(); 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() : mtpDataOwner(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"); if (!data) setData(new MTPDchannels_channelParticipants()); MTPDchannels_channelParticipants &v(_channels_channelParticipants()); v.vcount.read(from, end); v.vparticipants.read(from, end); v.vusers.read(from, end); } inline void MTPchannels_channelParticipants::write(mtpBuffer &to) const { const MTPDchannels_channelParticipants &v(c_channels_channelParticipants()); v.vcount.write(to); v.vparticipants.write(to); v.vusers.write(to); } inline MTPchannels_channelParticipants::MTPchannels_channelParticipants(MTPDchannels_channelParticipants *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDchannels_channelParticipant()); MTPDchannels_channelParticipant &v(_channels_channelParticipant()); v.vparticipant.read(from, end); v.vusers.read(from, end); } inline void MTPchannels_channelParticipant::write(mtpBuffer &to) const { const MTPDchannels_channelParticipant &v(c_channels_channelParticipant()); v.vparticipant.write(to); v.vusers.write(to); } inline MTPchannels_channelParticipant::MTPchannels_channelParticipant(MTPDchannels_channelParticipant *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDhelp_termsOfService()); MTPDhelp_termsOfService &v(_help_termsOfService()); v.vtext.read(from, end); } inline void MTPhelp_termsOfService::write(mtpBuffer &to) const { const MTPDhelp_termsOfService &v(c_help_termsOfService()); v.vtext.write(to); } inline MTPhelp_termsOfService::MTPhelp_termsOfService(MTPDhelp_termsOfService *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPfoundGif::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_foundGif: _type = cons; { if (!data) setData(new MTPDfoundGif()); MTPDfoundGif &v(_foundGif()); 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; { if (!data) setData(new MTPDfoundGifCached()); MTPDfoundGifCached &v(_foundGifCached()); 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: { const MTPDfoundGif &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: { const MTPDfoundGifCached &v(c_foundGifCached()); v.vurl.write(to); v.vphoto.write(to); v.vdocument.write(to); } break; } } inline MTPfoundGif::MTPfoundGif(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_foundGif: setData(new MTPDfoundGif()); break; case mtpc_foundGifCached: setData(new MTPDfoundGifCached()); break; default: throw mtpErrorBadTypeId(type, "MTPfoundGif"); } } inline MTPfoundGif::MTPfoundGif(MTPDfoundGif *_data) : mtpDataOwner(_data), _type(mtpc_foundGif) { } inline MTPfoundGif::MTPfoundGif(MTPDfoundGifCached *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_foundGifs()); MTPDmessages_foundGifs &v(_messages_foundGifs()); v.vnext_offset.read(from, end); v.vresults.read(from, end); } inline void MTPmessages_foundGifs::write(mtpBuffer &to) const { const MTPDmessages_foundGifs &v(c_messages_foundGifs()); v.vnext_offset.write(to); v.vresults.write(to); } inline MTPmessages_foundGifs::MTPmessages_foundGifs(MTPDmessages_foundGifs *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_savedGifs::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_savedGifsNotModified: _type = cons; break; case mtpc_messages_savedGifs: _type = cons; { if (!data) setData(new MTPDmessages_savedGifs()); MTPDmessages_savedGifs &v(_messages_savedGifs()); 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: { const MTPDmessages_savedGifs &v(c_messages_savedGifs()); v.vhash.write(to); v.vgifs.write(to); } break; } } inline MTPmessages_savedGifs::MTPmessages_savedGifs(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_savedGifs::MTPmessages_savedGifs(MTPDmessages_savedGifs *_data) : mtpDataOwner(_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); } } return 0; } inline mtpTypeId MTPinputBotInlineMessage::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputBotInlineMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputBotInlineMessageMediaAuto: _type = cons; { if (!data) setData(new MTPDinputBotInlineMessageMediaAuto()); MTPDinputBotInlineMessageMediaAuto &v(_inputBotInlineMessageMediaAuto()); 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; { if (!data) setData(new MTPDinputBotInlineMessageText()); MTPDinputBotInlineMessageText &v(_inputBotInlineMessageText()); 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; { if (!data) setData(new MTPDinputBotInlineMessageMediaGeo()); MTPDinputBotInlineMessageMediaGeo &v(_inputBotInlineMessageMediaGeo()); 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; { if (!data) setData(new MTPDinputBotInlineMessageMediaVenue()); MTPDinputBotInlineMessageMediaVenue &v(_inputBotInlineMessageMediaVenue()); 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; { if (!data) setData(new MTPDinputBotInlineMessageMediaContact()); MTPDinputBotInlineMessageMediaContact &v(_inputBotInlineMessageMediaContact()); 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, "MTPinputBotInlineMessage"); } } inline void MTPinputBotInlineMessage::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputBotInlineMessageMediaAuto: { const MTPDinputBotInlineMessageMediaAuto &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: { const MTPDinputBotInlineMessageText &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: { const MTPDinputBotInlineMessageMediaGeo &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: { const MTPDinputBotInlineMessageMediaVenue &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: { const MTPDinputBotInlineMessageMediaContact &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; } } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPinputBotInlineMessage"); } } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaAuto *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineMessageMediaAuto) { } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(MTPDinputBotInlineMessageText *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineMessageText) { } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaGeo *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineMessageMediaGeo) { } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaVenue *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineMessageMediaVenue) { } inline MTPinputBotInlineMessage::MTPinputBotInlineMessage(MTPDinputBotInlineMessageMediaContact *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineMessageMediaContact) { } 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); } 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(); } } return 0; } inline mtpTypeId MTPinputBotInlineResult::type() const { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPinputBotInlineResult::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_inputBotInlineResult: _type = cons; { if (!data) setData(new MTPDinputBotInlineResult()); MTPDinputBotInlineResult &v(_inputBotInlineResult()); 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; { if (!data) setData(new MTPDinputBotInlineResultPhoto()); MTPDinputBotInlineResultPhoto &v(_inputBotInlineResultPhoto()); 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; { if (!data) setData(new MTPDinputBotInlineResultDocument()); MTPDinputBotInlineResultDocument &v(_inputBotInlineResultDocument()); 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; default: throw mtpErrorUnexpected(cons, "MTPinputBotInlineResult"); } } inline void MTPinputBotInlineResult::write(mtpBuffer &to) const { switch (_type) { case mtpc_inputBotInlineResult: { const MTPDinputBotInlineResult &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: { const MTPDinputBotInlineResultPhoto &v(c_inputBotInlineResultPhoto()); v.vid.write(to); v.vtype.write(to); v.vphoto.write(to); v.vsend_message.write(to); } break; case mtpc_inputBotInlineResultDocument: { const MTPDinputBotInlineResultDocument &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; } } inline MTPinputBotInlineResult::MTPinputBotInlineResult(mtpTypeId type) : mtpDataOwner(0), _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; default: throw mtpErrorBadTypeId(type, "MTPinputBotInlineResult"); } } inline MTPinputBotInlineResult::MTPinputBotInlineResult(MTPDinputBotInlineResult *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineResult) { } inline MTPinputBotInlineResult::MTPinputBotInlineResult(MTPDinputBotInlineResultPhoto *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineResultPhoto) { } inline MTPinputBotInlineResult::MTPinputBotInlineResult(MTPDinputBotInlineResultDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputBotInlineResultDocument) { } 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 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPbotInlineMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_botInlineMessageMediaAuto: _type = cons; { if (!data) setData(new MTPDbotInlineMessageMediaAuto()); MTPDbotInlineMessageMediaAuto &v(_botInlineMessageMediaAuto()); 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; { if (!data) setData(new MTPDbotInlineMessageText()); MTPDbotInlineMessageText &v(_botInlineMessageText()); 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; { if (!data) setData(new MTPDbotInlineMessageMediaGeo()); MTPDbotInlineMessageMediaGeo &v(_botInlineMessageMediaGeo()); 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; { if (!data) setData(new MTPDbotInlineMessageMediaVenue()); MTPDbotInlineMessageMediaVenue &v(_botInlineMessageMediaVenue()); 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; { if (!data) setData(new MTPDbotInlineMessageMediaContact()); MTPDbotInlineMessageMediaContact &v(_botInlineMessageMediaContact()); 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: { const MTPDbotInlineMessageMediaAuto &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: { const MTPDbotInlineMessageText &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: { const MTPDbotInlineMessageMediaGeo &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: { const MTPDbotInlineMessageMediaVenue &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: { const MTPDbotInlineMessageMediaContact &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) : mtpDataOwner(0), _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 MTPbotInlineMessage::MTPbotInlineMessage(MTPDbotInlineMessageMediaAuto *_data) : mtpDataOwner(_data), _type(mtpc_botInlineMessageMediaAuto) { } inline MTPbotInlineMessage::MTPbotInlineMessage(MTPDbotInlineMessageText *_data) : mtpDataOwner(_data), _type(mtpc_botInlineMessageText) { } inline MTPbotInlineMessage::MTPbotInlineMessage(MTPDbotInlineMessageMediaGeo *_data) : mtpDataOwner(_data), _type(mtpc_botInlineMessageMediaGeo) { } inline MTPbotInlineMessage::MTPbotInlineMessage(MTPDbotInlineMessageMediaVenue *_data) : mtpDataOwner(_data), _type(mtpc_botInlineMessageMediaVenue) { } inline MTPbotInlineMessage::MTPbotInlineMessage(MTPDbotInlineMessageMediaContact *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPbotInlineResult::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_botInlineResult: _type = cons; { if (!data) setData(new MTPDbotInlineResult()); MTPDbotInlineResult &v(_botInlineResult()); 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; { if (!data) setData(new MTPDbotInlineMediaResult()); MTPDbotInlineMediaResult &v(_botInlineMediaResult()); 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: { const MTPDbotInlineResult &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: { const MTPDbotInlineMediaResult &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_botInlineResult: setData(new MTPDbotInlineResult()); break; case mtpc_botInlineMediaResult: setData(new MTPDbotInlineMediaResult()); break; default: throw mtpErrorBadTypeId(type, "MTPbotInlineResult"); } } inline MTPbotInlineResult::MTPbotInlineResult(MTPDbotInlineResult *_data) : mtpDataOwner(_data), _type(mtpc_botInlineResult) { } inline MTPbotInlineResult::MTPbotInlineResult(MTPDbotInlineMediaResult *_data) : mtpDataOwner(_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() : mtpDataOwner(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(); } 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"); if (!data) setData(new MTPDmessages_botResults()); MTPDmessages_botResults &v(_messages_botResults()); 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); } inline void MTPmessages_botResults::write(mtpBuffer &to) const { const MTPDmessages_botResults &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); } inline MTPmessages_botResults::MTPmessages_botResults(MTPDmessages_botResults *_data) : mtpDataOwner(_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) { return MTP::internal::TypeCreator::new_messages_botResults(_flags, _query_id, _next_offset, _switch_pm, _results); } inline MTPexportedMessageLink::MTPexportedMessageLink() : mtpDataOwner(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"); if (!data) setData(new MTPDexportedMessageLink()); MTPDexportedMessageLink &v(_exportedMessageLink()); v.vlink.read(from, end); } inline void MTPexportedMessageLink::write(mtpBuffer &to) const { const MTPDexportedMessageLink &v(c_exportedMessageLink()); v.vlink.write(to); } inline MTPexportedMessageLink::MTPexportedMessageLink(MTPDexportedMessageLink *_data) : mtpDataOwner(_data) { } inline MTPexportedMessageLink MTP_exportedMessageLink(const MTPstring &_link) { return MTP::internal::TypeCreator::new_exportedMessageLink(_link); } inline MTPmessageFwdHeader::MTPmessageFwdHeader() : mtpDataOwner(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"); if (!data) setData(new MTPDmessageFwdHeader()); MTPDmessageFwdHeader &v(_messageFwdHeader()); 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 { const MTPDmessageFwdHeader &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 MTPmessageFwdHeader::MTPmessageFwdHeader(MTPDmessageFwdHeader *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPauth_sentCodeType::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_auth_sentCodeTypeApp: _type = cons; { if (!data) setData(new MTPDauth_sentCodeTypeApp()); MTPDauth_sentCodeTypeApp &v(_auth_sentCodeTypeApp()); v.vlength.read(from, end); } break; case mtpc_auth_sentCodeTypeSms: _type = cons; { if (!data) setData(new MTPDauth_sentCodeTypeSms()); MTPDauth_sentCodeTypeSms &v(_auth_sentCodeTypeSms()); v.vlength.read(from, end); } break; case mtpc_auth_sentCodeTypeCall: _type = cons; { if (!data) setData(new MTPDauth_sentCodeTypeCall()); MTPDauth_sentCodeTypeCall &v(_auth_sentCodeTypeCall()); v.vlength.read(from, end); } break; case mtpc_auth_sentCodeTypeFlashCall: _type = cons; { if (!data) setData(new MTPDauth_sentCodeTypeFlashCall()); MTPDauth_sentCodeTypeFlashCall &v(_auth_sentCodeTypeFlashCall()); 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: { const MTPDauth_sentCodeTypeApp &v(c_auth_sentCodeTypeApp()); v.vlength.write(to); } break; case mtpc_auth_sentCodeTypeSms: { const MTPDauth_sentCodeTypeSms &v(c_auth_sentCodeTypeSms()); v.vlength.write(to); } break; case mtpc_auth_sentCodeTypeCall: { const MTPDauth_sentCodeTypeCall &v(c_auth_sentCodeTypeCall()); v.vlength.write(to); } break; case mtpc_auth_sentCodeTypeFlashCall: { const MTPDauth_sentCodeTypeFlashCall &v(c_auth_sentCodeTypeFlashCall()); v.vpattern.write(to); } break; } } inline MTPauth_sentCodeType::MTPauth_sentCodeType(mtpTypeId type) : mtpDataOwner(0), _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 MTPauth_sentCodeType::MTPauth_sentCodeType(MTPDauth_sentCodeTypeApp *_data) : mtpDataOwner(_data), _type(mtpc_auth_sentCodeTypeApp) { } inline MTPauth_sentCodeType::MTPauth_sentCodeType(MTPDauth_sentCodeTypeSms *_data) : mtpDataOwner(_data), _type(mtpc_auth_sentCodeTypeSms) { } inline MTPauth_sentCodeType::MTPauth_sentCodeType(MTPDauth_sentCodeTypeCall *_data) : mtpDataOwner(_data), _type(mtpc_auth_sentCodeTypeCall) { } inline MTPauth_sentCodeType::MTPauth_sentCodeType(MTPDauth_sentCodeTypeFlashCall *_data) : mtpDataOwner(_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() : mtpDataOwner(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); } 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"); if (!data) setData(new MTPDmessages_botCallbackAnswer()); MTPDmessages_botCallbackAnswer &v(_messages_botCallbackAnswer()); 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(); } } inline void MTPmessages_botCallbackAnswer::write(mtpBuffer &to) const { const MTPDmessages_botCallbackAnswer &v(c_messages_botCallbackAnswer()); v.vflags.write(to); if (v.has_message()) v.vmessage.write(to); if (v.has_url()) v.vurl.write(to); } inline MTPmessages_botCallbackAnswer::MTPmessages_botCallbackAnswer(MTPDmessages_botCallbackAnswer *_data) : mtpDataOwner(_data) { } Q_DECLARE_OPERATORS_FOR_FLAGS(MTPDmessages_botCallbackAnswer::Flags) inline MTPmessages_botCallbackAnswer MTP_messages_botCallbackAnswer(const MTPflags &_flags, const MTPstring &_message, const MTPstring &_url) { return MTP::internal::TypeCreator::new_messages_botCallbackAnswer(_flags, _message, _url); } inline MTPmessages_messageEditData::MTPmessages_messageEditData() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_messageEditData()); MTPDmessages_messageEditData &v(_messages_messageEditData()); v.vflags.read(from, end); } inline void MTPmessages_messageEditData::write(mtpBuffer &to) const { const MTPDmessages_messageEditData &v(c_messages_messageEditData()); v.vflags.write(to); } inline MTPmessages_messageEditData::MTPmessages_messageEditData(MTPDmessages_messageEditData *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDinputBotInlineMessageID()); MTPDinputBotInlineMessageID &v(_inputBotInlineMessageID()); v.vdc_id.read(from, end); v.vid.read(from, end); v.vaccess_hash.read(from, end); } inline void MTPinputBotInlineMessageID::write(mtpBuffer &to) const { const MTPDinputBotInlineMessageID &v(c_inputBotInlineMessageID()); v.vdc_id.write(to); v.vid.write(to); v.vaccess_hash.write(to); } inline MTPinputBotInlineMessageID::MTPinputBotInlineMessageID(MTPDinputBotInlineMessageID *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDinlineBotSwitchPM()); MTPDinlineBotSwitchPM &v(_inlineBotSwitchPM()); v.vtext.read(from, end); v.vstart_param.read(from, end); } inline void MTPinlineBotSwitchPM::write(mtpBuffer &to) const { const MTPDinlineBotSwitchPM &v(c_inlineBotSwitchPM()); v.vtext.write(to); v.vstart_param.write(to); } inline MTPinlineBotSwitchPM::MTPinlineBotSwitchPM(MTPDinlineBotSwitchPM *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_peerDialogs()); MTPDmessages_peerDialogs &v(_messages_peerDialogs()); 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 { const MTPDmessages_peerDialogs &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 MTPmessages_peerDialogs::MTPmessages_peerDialogs(MTPDmessages_peerDialogs *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDtopPeer()); MTPDtopPeer &v(_topPeer()); v.vpeer.read(from, end); v.vrating.read(from, end); } inline void MTPtopPeer::write(mtpBuffer &to) const { const MTPDtopPeer &v(c_topPeer()); v.vpeer.write(to); v.vrating.write(to); } inline MTPtopPeer::MTPtopPeer(MTPDtopPeer *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); 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() : mtpDataOwner(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"); if (!data) setData(new MTPDtopPeerCategoryPeers()); MTPDtopPeerCategoryPeers &v(_topPeerCategoryPeers()); v.vcategory.read(from, end); v.vcount.read(from, end); v.vpeers.read(from, end); } inline void MTPtopPeerCategoryPeers::write(mtpBuffer &to) const { const MTPDtopPeerCategoryPeers &v(c_topPeerCategoryPeers()); v.vcategory.write(to); v.vcount.write(to); v.vpeers.write(to); } inline MTPtopPeerCategoryPeers::MTPtopPeerCategoryPeers(MTPDtopPeerCategoryPeers *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPcontacts_topPeers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_contacts_topPeersNotModified: _type = cons; break; case mtpc_contacts_topPeers: _type = cons; { if (!data) setData(new MTPDcontacts_topPeers()); MTPDcontacts_topPeers &v(_contacts_topPeers()); 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: { const MTPDcontacts_topPeers &v(c_contacts_topPeers()); v.vcategories.write(to); v.vchats.write(to); v.vusers.write(to); } break; } } inline MTPcontacts_topPeers::MTPcontacts_topPeers(mtpTypeId type) : mtpDataOwner(0), _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 MTPcontacts_topPeers::MTPcontacts_topPeers(MTPDcontacts_topPeers *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPdraftMessage::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_draftMessageEmpty: _type = cons; break; case mtpc_draftMessage: _type = cons; { if (!data) setData(new MTPDdraftMessage()); MTPDdraftMessage &v(_draftMessage()); 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: { const MTPDdraftMessage &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) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_draftMessageEmpty: break; case mtpc_draftMessage: setData(new MTPDdraftMessage()); break; default: throw mtpErrorBadTypeId(type, "MTPdraftMessage"); } } inline MTPdraftMessage::MTPdraftMessage(MTPDdraftMessage *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_featuredStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_featuredStickersNotModified: _type = cons; break; case mtpc_messages_featuredStickers: _type = cons; { if (!data) setData(new MTPDmessages_featuredStickers()); MTPDmessages_featuredStickers &v(_messages_featuredStickers()); 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: { const MTPDmessages_featuredStickers &v(c_messages_featuredStickers()); v.vhash.write(to); v.vsets.write(to); v.vunread.write(to); } break; } } inline MTPmessages_featuredStickers::MTPmessages_featuredStickers(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_featuredStickers::MTPmessages_featuredStickers(MTPDmessages_featuredStickers *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_recentStickers::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_recentStickersNotModified: _type = cons; break; case mtpc_messages_recentStickers: _type = cons; { if (!data) setData(new MTPDmessages_recentStickers()); MTPDmessages_recentStickers &v(_messages_recentStickers()); 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: { const MTPDmessages_recentStickers &v(c_messages_recentStickers()); v.vhash.write(to); v.vstickers.write(to); } break; } } inline MTPmessages_recentStickers::MTPmessages_recentStickers(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_recentStickers::MTPmessages_recentStickers(MTPDmessages_recentStickers *_data) : mtpDataOwner(_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() : mtpDataOwner(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"); if (!data) setData(new MTPDmessages_archivedStickers()); MTPDmessages_archivedStickers &v(_messages_archivedStickers()); v.vcount.read(from, end); v.vsets.read(from, end); } inline void MTPmessages_archivedStickers::write(mtpBuffer &to) const { const MTPDmessages_archivedStickers &v(c_messages_archivedStickers()); v.vcount.write(to); v.vsets.write(to); } inline MTPmessages_archivedStickers::MTPmessages_archivedStickers(MTPDmessages_archivedStickers *_data) : mtpDataOwner(_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 { if (!_type) throw mtpErrorUninitialized(); return _type; } inline void MTPmessages_stickerSetInstallResult::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != _type) setData(0); switch (cons) { case mtpc_messages_stickerSetInstallResultSuccess: _type = cons; break; case mtpc_messages_stickerSetInstallResultArchive: _type = cons; { if (!data) setData(new MTPDmessages_stickerSetInstallResultArchive()); MTPDmessages_stickerSetInstallResultArchive &v(_messages_stickerSetInstallResultArchive()); 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: { const MTPDmessages_stickerSetInstallResultArchive &v(c_messages_stickerSetInstallResultArchive()); v.vsets.write(to); } break; } } inline MTPmessages_stickerSetInstallResult::MTPmessages_stickerSetInstallResult(mtpTypeId type) : mtpDataOwner(0), _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 MTPmessages_stickerSetInstallResult::MTPmessages_stickerSetInstallResult(MTPDmessages_stickerSetInstallResultArchive *_data) : mtpDataOwner(_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 MTPstickerSetCovered::MTPstickerSetCovered() : mtpDataOwner(new MTPDstickerSetCovered()) { } inline uint32 MTPstickerSetCovered::innerLength() const { const MTPDstickerSetCovered &v(c_stickerSetCovered()); return v.vset.innerLength() + v.vcover.innerLength(); } inline mtpTypeId MTPstickerSetCovered::type() const { return mtpc_stickerSetCovered; } inline void MTPstickerSetCovered::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { if (cons != mtpc_stickerSetCovered) throw mtpErrorUnexpected(cons, "MTPstickerSetCovered"); if (!data) setData(new MTPDstickerSetCovered()); MTPDstickerSetCovered &v(_stickerSetCovered()); v.vset.read(from, end); v.vcover.read(from, end); } inline void MTPstickerSetCovered::write(mtpBuffer &to) const { const MTPDstickerSetCovered &v(c_stickerSetCovered()); v.vset.write(to); v.vcover.write(to); } inline MTPstickerSetCovered::MTPstickerSetCovered(MTPDstickerSetCovered *_data) : mtpDataOwner(_data) { } inline MTPstickerSetCovered MTP_stickerSetCovered(const MTPStickerSet &_set, const MTPDocument &_cover) { return MTP::internal::TypeCreator::new_stickerSetCovered(_set, _cover); } 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);