From 7a278729e1636fd4c6801d81c7dec8be4e80486c Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 8 Sep 2015 20:22:29 +0300 Subject: [PATCH] report spam almost done --- Telegram/Resources/lang.strings | 1 + Telegram/Resources/style.txt | 28 +- Telegram/SourceFiles/app.cpp | 8 + Telegram/SourceFiles/history.cpp | 10 + Telegram/SourceFiles/historywidget.cpp | 147 +- Telegram/SourceFiles/historywidget.h | 24 +- Telegram/SourceFiles/mainwidget.cpp | 7 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 2 +- Telegram/SourceFiles/mtproto/mtpScheme.cpp | 796 ++--- Telegram/SourceFiles/mtproto/mtpScheme.h | 3435 ++++++++++--------- Telegram/SourceFiles/mtproto/scheme.tl | 220 +- Telegram/SourceFiles/profilewidget.cpp | 3 +- Telegram/SourceFiles/settings.cpp | 3 +- Telegram/SourceFiles/settings.h | 5 +- Telegram/SourceFiles/types.h | 7 + 15 files changed, 2423 insertions(+), 2273 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 0b3646c987..4115544b49 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -487,6 +487,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org "lng_report_spam" = "Report Spam"; "lng_report_spam_hide" = "Hide"; +"lng_report_spam_thanks" = "Thank you for your report!"; "lng_send_button" = "Send"; "lng_message_ph" = "Write a message.."; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 3956587d80..697c39220c 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1075,18 +1075,6 @@ taMsgField: flatTextarea(taDefFlat) { maxFieldHeight: 220px; // historyMinHeight: 56px; -reportSpamButton: flatButton(topBarActionButton) { - textTop: 6px; - overTextTop: 6px; - downTextTop: 7px; - - width: -50px; - height: 30px; - - bgColor: #888; - overBgColor: #7b7b7b; - downBgColor: #7b7b7b; -} reportSpamHide: flatButton(topBarButton) { height: 46px; @@ -1098,8 +1086,20 @@ reportSpamHide: flatButton(topBarButton) { overBgColor: transparent; downBgColor: transparent; } -reportSpamPadding: size(12px, 8px); -reportSpamBg: #ffffffc0; +reportSpamButton: flatButton(reportSpamHide) { + textTop: 6px; + overTextTop: 6px; + downTextTop: 7px; + + width: -50px; + height: 30px; + + bgColor: #888; + overBgColor: #7b7b7b; + downBgColor: #7b7b7b; +} +reportSpamSeparator: 30px; +reportSpamBg: #fffffff0; newMsgSound: ':/gui/art/newmsg.wav'; diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 7d9385d536..b598b067fb 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -446,6 +446,10 @@ namespace App { data->setBotInfoVersion(-1); } data->contact = (flags & (MTPDuser_flag_contact | MTPDuser_flag_mutual_contact)) ? 1 : (data->phone.isEmpty() ? -1 : 0); + if (data->contact == 1 && cReportSpamStatuses().value(data->id, dbiprsNoButton) != dbiprsNoButton) { + cRefReportSpamStatuses().insert(data->id, dbiprsNoButton); + Local::writeReportSpamStatuses(); + } if ((flags & MTPDuser_flag_self) && ::self != data) { ::self = data; if (App::wnd()) App::wnd()->updateGlobalMenu(); @@ -875,6 +879,10 @@ namespace App { switch (myLink.type()) { case mtpc_contactLinkContact: user->contact = 1; + if (user->contact == 1 && cReportSpamStatuses().value(user->id, dbiprsNoButton) != dbiprsNoButton) { + cRefReportSpamStatuses().insert(user->id, dbiprsNoButton); + Local::writeReportSpamStatuses(); + } break; case mtpc_contactLinkHasPhone: user->contact = 0; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index e757adfc72..e5c3ead6df 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -6320,6 +6320,11 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) { UserData *u = App::user(App::peerFromUser(d.vuser_id)); second = TextLinkPtr(new PeerLink(u)); text = lng_action_add_user(lt_from, from, lt_user, textcmdLink(2, u->name)); + if (d.vuser_id.v == MTP::authedId() && unread()) { + if (history()->peer->chat && !history()->peer->asChat()->inviterForSpamReport && !_from->chat) { + history()->peer->asChat()->inviterForSpamReport = App::userFromPeer(_from->id); + } + } } } break; @@ -6337,6 +6342,11 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) { case mtpc_messageActionChatCreate: { const MTPDmessageActionChatCreate &d(action.c_messageActionChatCreate()); text = lng_action_created_chat(lt_from, from, lt_title, textClean(qs(d.vtitle))); + if (unread()) { + if (history()->peer->chat && !history()->peer->asChat()->inviterForSpamReport && !_from->chat && App::userFromPeer(_from->id) != MTP::authedId()) { + history()->peer->asChat()->inviterForSpamReport = App::userFromPeer(_from->id); + } + } } break; case mtpc_messageActionChatDeletePhoto: { diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 9b951163b9..50cff26596 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -1637,16 +1637,23 @@ void MessageField::focusInEvent(QFocusEvent *e) { } ReportSpamPanel::ReportSpamPanel(HistoryWidget *parent) : TWidget(parent), -_report(this, lang(lng_report_spam), st::reportSpamButton), _hide(this, lang(lng_report_spam_hide), st::reportSpamHide) { +_report(this, lang(lng_report_spam), st::reportSpamHide), +_hide(this, lang(lng_report_spam_hide), st::reportSpamHide), +_clear(this, lang(lng_profile_delete_conversation)) { resize(parent->width(), _hide.height() + st::titleShadow); connect(&_report, SIGNAL(clicked()), this, SIGNAL(reportClicked())); connect(&_hide, SIGNAL(clicked()), this, SIGNAL(hideClicked())); + connect(&_clear, SIGNAL(clicked()), this, SIGNAL(clearClicked())); + + _clear.hide(); } void ReportSpamPanel::resizeEvent(QResizeEvent *e) { - _report.moveToLeft(st::reportSpamPadding.width(), st::reportSpamPadding.height(), width()); + _report.resize(width() - (_hide.width() + st::reportSpamSeparator) * 2, _report.height()); + _report.moveToLeft(_hide.width() + st::reportSpamSeparator, 0, width()); _hide.moveToRight(0, 0, width()); + _clear.move((width() - _clear.width()) / 2, height() - _clear.height() - ((height() - st::msgFont->height - _clear.height()) / 2)); } void ReportSpamPanel::paintEvent(QPaintEvent *e) { @@ -1657,6 +1664,22 @@ void ReportSpamPanel::paintEvent(QPaintEvent *e) { } else { p.fillRect(0, height() - st::titleShadow, width(), st::titleShadow, st::titleShadowColor->b); } + if (!_clear.isHidden()) { + p.setPen(st::black->p); + p.setFont(st::msgFont->f); + p.drawText(QRect(_report.x(), (_clear.y() - st::msgFont->height) / 2, _report.width(), st::msgFont->height), lang(lng_report_spam_thanks), style::al_top); + } +} + +void ReportSpamPanel::setReported(bool reported) { + if (reported) { + _report.hide(); + _clear.show(); + } else { + _report.show(); + _clear.hide(); + } + update(); } BotKeyboard::BotKeyboard() : _wasForMsgId(0), _height(0), _maxOuterHeight(0), _maximizeSize(false), _singleUse(false), _forceReply(false), @@ -2221,7 +2244,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _replyTo(0) , _replyToNameVersion(0) , _replyForwardPreviewCancel(this, st::replyCancel) -, _reportSpamStatus(ReportSpamUnknown) +, _reportSpamStatus(dbiprsUnknown) , _previewData(0) , _previewRequest(0) , _previewCancelled(false) @@ -2229,6 +2252,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _replyReturn(0) , _stickersUpdateRequest(0) , _peer(0) +, _clearPeer(0) , _showAtMsgId(0) , _preloadRequest(0), _preloadDownRequest(0) , _delayedShowAtMsgId(-1) @@ -2245,6 +2269,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _unblock(this, lang(lng_unblock_button), st::btnUnblock) , _botStart(this, lang(lng_bot_start), st::btnSend) , _unblockRequest(0) +, _reportSpamRequest(0) , _attachDocument(this, st::btnAttachDocument) , _attachPhoto(this, st::btnAttachPhoto) , _attachEmoji(this, st::btnAttachEmoji) @@ -2284,6 +2309,9 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) setAcceptDrops(true); connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onListScroll())); + connect(&_reportSpamPanel, SIGNAL(reportClicked()), this, SLOT(onReportSpamClicked())); + connect(&_reportSpamPanel, SIGNAL(hideClicked()), this, SLOT(onReportSpamHide())); + connect(&_reportSpamPanel, SIGNAL(clearClicked()), this, SLOT(onReportSpamClear())); connect(&_toHistoryEnd, SIGNAL(clicked()), this, SLOT(onHistoryToEnd())); connect(&_replyForwardPreviewCancel, SIGNAL(clicked()), this, SLOT(onReplyForwardPreviewCancel())); connect(&_send, SIGNAL(clicked()), this, SLOT(onSend())); @@ -2823,7 +2851,7 @@ void HistoryWidget::showPeerHistory(const PeerId &peerId, MsgId showAtMsgId) { } _peer = peerId ? App::peer(peerId) : 0; - _unblockRequest = 0; + _unblockRequest = _reportSpamRequest = 0; _titlePeerText = QString(); _titlePeerTextWidth = 0; @@ -2940,29 +2968,33 @@ void HistoryWidget::contactsReceived() { } void HistoryWidget::updateReportSpamStatus() { - if (!_peer || cNoReportSpamButton().contains(_peer->id)) { - _reportSpamStatus = ReportSpamNoButton; - return; - } else if (cShowReportSpamButton().contains(_peer->id)) { - _reportSpamStatus = ReportSpamShowButton; + if (!_peer || App::userFromPeer(_peer->id) == MTP::authedId()) { + _reportSpamStatus = dbiprsNoButton; return; + } else { + ReportSpamStatuses::const_iterator i = cReportSpamStatuses().constFind(_peer->id); + if (i != cReportSpamStatuses().cend()) { + _reportSpamStatus = i.value(); + _reportSpamPanel.setReported(_reportSpamStatus == dbiprsReportSent); + return; + } } if ((!_history->loadedAtTop() && (_history->size() < 2 || _history->size() == 2 && _history->at(1)->size() < 2)) || !cContactsReceived() || _firstLoadRequest) { - _reportSpamStatus = ReportSpamUnknown; + _reportSpamStatus = dbiprsUnknown; } else if (_peer->chat) { if (_peer->asChat()->inviterForSpamReport > 0) { UserData *user = App::userLoaded(_peer->asChat()->inviterForSpamReport); if (user && user->contact > 0) { - _reportSpamStatus = ReportSpamNoButton; + _reportSpamStatus = dbiprsNoButton; } else { - _reportSpamStatus = ReportSpamShowButton; + _reportSpamStatus = dbiprsShowButton; } } else { - _reportSpamStatus = ReportSpamNoButton; + _reportSpamStatus = dbiprsNoButton; } } else { if (_peer->asUser()->contact > 0) { - _reportSpamStatus = ReportSpamNoButton; + _reportSpamStatus = dbiprsNoButton; } else { bool anyFound = false, outFound = false; for (int32 i = 0, l = _history->size(); i < l; ++i) { @@ -2976,23 +3008,18 @@ void HistoryWidget::updateReportSpamStatus() { } if (anyFound) { if (outFound) { - _reportSpamStatus = ReportSpamNoButton; + _reportSpamStatus = dbiprsNoButton; } else { - _reportSpamStatus = ReportSpamShowButton; + _reportSpamStatus = dbiprsShowButton; } } else { - _reportSpamStatus = ReportSpamUnknown; + _reportSpamStatus = dbiprsUnknown; } } } - if (_reportSpamStatus == ReportSpamShowButton || _reportSpamStatus == ReportSpamNoButton) { - if (_reportSpamStatus == ReportSpamShowButton) { - cRefNoReportSpamButton().remove(_peer->id); - cRefShowReportSpamButton().insert(_peer->id, true); - } else { - cRefNoReportSpamButton().insert(_peer->id, true); - cRefShowReportSpamButton().remove(_peer->id); - } + if (_reportSpamStatus == dbiprsShowButton || _reportSpamStatus == dbiprsNoButton) { + _reportSpamPanel.setReported(false); + cRefReportSpamStatuses().insert(_peer->id, _reportSpamStatus); Local::writeReportSpamStatuses(); } } @@ -3026,7 +3053,7 @@ void HistoryWidget::updateControlsVisibility() { } else { _scroll.show(); } - if (_reportSpamStatus == ReportSpamShowButton) { + if (_reportSpamStatus == dbiprsShowButton || _reportSpamStatus == dbiprsReportSent) { _reportSpamPanel.show(); } else { _reportSpamPanel.hide(); @@ -3248,9 +3275,9 @@ void HistoryWidget::messagesReceived(const MTPmessages_Messages &messages, mtpRe addMessagesToFront(*histList); _preloadRequest = 0; onListScroll(); - if (_reportSpamStatus == ReportSpamUnknown) { + if (_reportSpamStatus == dbiprsUnknown) { updateReportSpamStatus(); - if (_reportSpamStatus != ReportSpamUnknown) updateControlsVisibility(); + if (_reportSpamStatus != dbiprsUnknown) updateControlsVisibility(); } } else if (_preloadDownRequest == requestId) { addMessagesToBack(*histList); @@ -3483,10 +3510,18 @@ void HistoryWidget::unblockDone(PeerData *peer, const MTPBool &result) { bool HistoryWidget::unblockFail(const RPCError &error) { if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false; -// _unblockRequest = 0; + + _unblockRequest = 0; return false; } +void HistoryWidget::blockDone(PeerData *peer, const MTPBool &result) { + if (peer->chat) return; + + peer->asUser()->blocked = UserIsBlocked; + emit App::main()->peerUpdated(peer); +} + void HistoryWidget::onBotStart() { if (!_peer || _peer->chat || !_peer->asUser()->botInfo) { updateControlsVisibility(); @@ -4598,6 +4633,60 @@ void HistoryWidget::onAudioFailed(MsgId newId) { } } +void HistoryWidget::onReportSpamClicked() { + if (_reportSpamRequest) return; + + if (!_peer->chat) MTP::send(MTPcontacts_Block(_peer->asUser()->inputUser), rpcDone(&HistoryWidget::blockDone, _peer), RPCFailHandlerPtr(), 0, 5); + _reportSpamRequest = MTP::send(MTPmessages_ReportSpam(_peer->input), rpcDone(&HistoryWidget::reportSpamDone, _peer), rpcFail(&HistoryWidget::reportSpamFail)); +} + +void HistoryWidget::reportSpamDone(PeerData *peer, const MTPBool &result, mtpRequestId req) { + if (req == _reportSpamRequest) { + _reportSpamRequest = 0; + } + if (peer) { + cRefReportSpamStatuses().insert(peer->id, dbiprsReportSent); + Local::writeReportSpamStatuses(); + } + _reportSpamStatus = dbiprsReportSent; + _reportSpamPanel.setReported(_reportSpamStatus == dbiprsReportSent); +} + +bool HistoryWidget::reportSpamFail(const RPCError &error, mtpRequestId req) { + if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false; + + if (req == _reportSpamRequest) { + _reportSpamRequest = 0; + } + return false; +} + +void HistoryWidget::onReportSpamHide() { + if (_peer) { + cRefReportSpamStatuses().insert(_peer->id, dbiprsNoButton); + Local::writeReportSpamStatuses(); + } + _reportSpamStatus = dbiprsNoButton; + updateControlsVisibility(); +} + +void HistoryWidget::onReportSpamClear() { + ConfirmBox *box = new ConfirmBox(_peer->chat ? lng_sure_delete_and_exit(lt_group, _peer->name) : lng_sure_delete_history(lt_contact, _peer->name)); + connect(box, SIGNAL(confirmed()), this, SLOT(onReportSpamClearSure())); + App::wnd()->showLayer(box); + _clearPeer = _peer; +} + +void HistoryWidget::onReportSpamClearSure() { + if (_clearPeer->chat) { + App::wnd()->hideLayer(); + App::main()->showDialogs(); + MTP::send(MTPmessages_DeleteChatUser(MTP_int(_clearPeer->id & 0xFFFFFFFF), App::self()->inputUser), App::main()->rpcDone(&MainWidget::deleteHistoryAfterLeave, _clearPeer), App::main()->rpcFail(&MainWidget::leaveChatFailed, _clearPeer)); + } else { + App::main()->deleteConversation(_clearPeer); + } +} + void HistoryWidget::peerMessagesUpdated(PeerId peer) { if (_peer && _list && peer == _peer->id) { updateListSize(); diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 7e82a84e15..4c11b46de6 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -219,14 +219,18 @@ public: void resizeEvent(QResizeEvent *e); void paintEvent(QPaintEvent *e); + void setReported(bool reported); + signals: void hideClicked(); void reportClicked(); + void clearClicked(); private: FlatButton _report, _hide; + LinkButton _clear; }; @@ -539,6 +543,11 @@ public slots: void onDocumentFailed(MsgId msgId); void onAudioFailed(MsgId msgId); + void onReportSpamClicked(); + void onReportSpamHide(); + void onReportSpamClear(); + void onReportSpamClearSure(); + void onListScroll(); void onHistoryToEnd(); void onSend(bool ctrlShiftEnter = false, MsgId replyTo = -1); @@ -609,12 +618,7 @@ private: void drawRecording(Painter &p); void updateField(); - enum ReportSpamStatus { - ReportSpamNoButton, - ReportSpamUnknown, - ReportSpamShowButton, - }; - ReportSpamStatus _reportSpamStatus; + DBIPeerReportSpamStatus _reportSpamStatus; void updateReportSpamStatus(); QString _previewLinks; @@ -637,8 +641,12 @@ private: void addMessagesToFront(const QVector &messages); void addMessagesToBack(const QVector &messages); + void reportSpamDone(PeerData *peer, const MTPBool &result, mtpRequestId request); + bool reportSpamFail(const RPCError &error, mtpRequestId request); + void unblockDone(PeerData *peer, const MTPBool &result); bool unblockFail(const RPCError &error); + void blockDone(PeerData *peer, const MTPBool &result); void countHistoryShowFrom(); @@ -656,7 +664,7 @@ private: void updateDragAreas(); - PeerData *_peer; + PeerData *_peer, *_clearPeer; // cache _peer in _clearPeer when showing clear history box MsgId _showAtMsgId; mtpRequestId _firstLoadRequest, _preloadRequest, _preloadDownRequest; @@ -682,7 +690,7 @@ private: ReportSpamPanel _reportSpamPanel; FlatButton _send, _unblock, _botStart; - mtpRequestId _unblockRequest; + mtpRequestId _unblockRequest, _reportSpamRequest; IconedButton _attachDocument, _attachPhoto, _attachEmoji, _kbShow, _kbHide, _cmdStart; bool _cmdStartShown; MessageField _field; diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 71aee84fcc..98e083dafb 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -760,7 +760,12 @@ void MainWidget::deleteHistoryPart(PeerData *peer, const MTPmessages_AffectedHis updPtsUpdated(d.vpts.v, d.vpts_count.v); int32 offset = d.voffset.v; - if (!MTP::authedId() || offset <= 0) return; + if (!MTP::authedId()) return; + if (offset <= 0) { + cRefReportSpamStatuses().remove(peer->id); + Local::writeReportSpamStatuses(); + return; + } MTP::send(MTPmessages_DeleteHistory(peer->input, d.voffset), rpcDone(&MainWidget::deleteHistoryPart, peer)); } diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index 682073f148..95e6340acb 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -366,7 +366,7 @@ static const mtpTypeId mtpLayers[] = { mtpc_invokeWithLayer17, mtpc_invokeWithLayer18, }, mtpLayerMaxSingle = sizeof(mtpLayers) / sizeof(mtpLayers[0]); -static const mtpPrime mtpCurrentLayer = 36; +static const mtpPrime mtpCurrentLayer = 37; template class MTPBoxed : public bareT { diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index d6bd9b55d7..79d35b8467 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -1256,7 +1256,9 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP to.add("\n").addSpaces(lev); } switch (stage) { - case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" self_participant: "); ++stages.back(); if (flag & MTPDchatParticipantsForbidden::flag_self_participant) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } break; @@ -2451,7 +2453,8 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 2: to.add(" inviter_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } break; @@ -4496,6 +4499,20 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; + case mtpc_auth_sendSms: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ auth_sendSms"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" phone_code_hash: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + case mtpc_account_registerDevice: if (stage) { to.add(",\n").addSpaces(lev); @@ -4560,158 +4577,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; - case mtpc_contacts_deleteContacts: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_deleteContacts"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_contacts_block: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_block"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_contacts_unblock: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_unblock"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_messages_setTyping: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messages_setTyping"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" action: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_upload_saveFilePart: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ upload_saveFilePart"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_help_saveAppLog: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ help_saveAppLog"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" events: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_messages_discardEncryption: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messages_discardEncryption"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_messages_setEncryptedTyping: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messages_setEncryptedTyping"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" typing: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_messages_readEncryptedHistory: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messages_readEncryptedHistory"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" max_date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_upload_saveBigFilePart: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ upload_saveBigFilePart"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" file_total_parts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_auth_sendSms: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ auth_sendSms"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" phone_code_hash: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - case mtpc_account_checkUsername: if (stage) { to.add(",\n").addSpaces(lev); @@ -4791,6 +4656,100 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; + case mtpc_contacts_deleteContacts: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ contacts_deleteContacts"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_contacts_block: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ contacts_block"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_contacts_unblock: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ contacts_unblock"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_messages_setTyping: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ messages_setTyping"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" action: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_messages_discardEncryption: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ messages_discardEncryption"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_messages_setEncryptedTyping: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ messages_setEncryptedTyping"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" typing: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_messages_readEncryptedHistory: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ messages_readEncryptedHistory"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" max_date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + case mtpc_messages_installStickerSet: if (stage) { to.add(",\n").addSpaces(lev); @@ -4818,6 +4777,63 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; + case mtpc_messages_reportSpam: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ messages_reportSpam"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_upload_saveFilePart: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ upload_saveFilePart"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_upload_saveBigFilePart: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ upload_saveBigFilePart"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" file_total_parts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_help_saveAppLog: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ help_saveAppLog"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" events: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + case mtpc_invokeAfterMsg: if (stage) { to.add(",\n").addSpaces(lev); @@ -5022,6 +5038,10 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; + case mtpc_auth_requestPasswordRecovery: + to.add("{ auth_requestPasswordRecovery }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + case mtpc_account_getNotifySettings: if (stage) { to.add(",\n").addSpaces(lev); @@ -5049,19 +5069,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; - case mtpc_contacts_importCard: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_importCard"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" export_card: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - case mtpc_account_updateUsername: if (stage) { to.add(",\n").addSpaces(lev); @@ -5075,19 +5082,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; - case mtpc_contacts_resolveUsername: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_resolveUsername"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" username: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - case mtpc_account_changePhone: if (stage) { to.add(",\n").addSpaces(lev); @@ -5103,10 +5097,101 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; + case mtpc_contacts_importCard: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ contacts_importCard"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" export_card: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_contacts_resolveUsername: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ contacts_resolveUsername"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" username: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + case mtpc_account_getWallPapers: to.add("{ account_getWallPapers }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + case mtpc_account_getPrivacy: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ account_getPrivacy"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_account_setPrivacy: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ account_setPrivacy"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" rules: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_account_getAccountTTL: + to.add("{ account_getAccountTTL }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + + case mtpc_account_sendChangePhoneCode: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ account_sendChangePhoneCode"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_account_getAuthorizations: + to.add("{ account_getAuthorizations }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + + case mtpc_account_getPassword: + to.add("{ account_getPassword }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + + case mtpc_account_getPasswordSettings: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ account_getPasswordSettings"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" current_password_hash: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + case mtpc_users_getUsers: if (stage) { to.add(",\n").addSpaces(lev); @@ -5208,6 +5293,20 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP to.add("{ contacts_exportCard }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + case mtpc_contacts_search: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ contacts_search"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" q: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + case mtpc_messages_getMessages: if (stage) { to.add(",\n").addSpaces(lev); @@ -5549,149 +5648,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; - case mtpc_updates_getState: - to.add("{ updates_getState }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_updates_getDifference: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ updates_getDifference"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_photos_updateProfilePhoto: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ photos_updateProfilePhoto"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_photos_uploadProfilePhoto: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ photos_uploadProfilePhoto"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" geo_point: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_photos_deletePhotos: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ photos_deletePhotos"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_messages_receivedQueue: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messages_receivedQueue"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" max_qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_upload_getFile: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ upload_getFile"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" location: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_help_getConfig: - to.add("{ help_getConfig }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_help_getNearestDc: - to.add("{ help_getNearestDc }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_help_getAppUpdate: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ help_getAppUpdate"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" device_model: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" system_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" app_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_help_getInviteText: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ help_getInviteText"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_photos_getUserPhotos: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ photos_getUserPhotos"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" user_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - case mtpc_messages_getDhConfig: if (stage) { to.add(",\n").addSpaces(lev); @@ -5782,64 +5738,28 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; - case mtpc_help_getSupport: - to.add("{ help_getSupport }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_contacts_search: + case mtpc_messages_receivedQueue: if (stage) { to.add(",\n").addSpaces(lev); } else { - to.add("{ contacts_search"); + to.add("{ messages_receivedQueue"); to.add("\n").addSpaces(lev); } switch (stage) { - case 0: to.add(" q: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 0: to.add(" max_qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } break; - case mtpc_account_getPrivacy: + case mtpc_photos_deletePhotos: if (stage) { to.add(",\n").addSpaces(lev); } else { - to.add("{ account_getPrivacy"); + to.add("{ photos_deletePhotos"); to.add("\n").addSpaces(lev); } switch (stage) { - case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_account_setPrivacy: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ account_setPrivacy"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" rules: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_account_getAccountTTL: - to.add("{ account_getAccountTTL }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_account_sendChangePhoneCode: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ account_sendChangePhoneCode"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } break; @@ -5884,31 +5804,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; - case mtpc_account_getAuthorizations: - to.add("{ account_getAuthorizations }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_account_getPassword: - to.add("{ account_getPassword }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - - case mtpc_account_getPasswordSettings: - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ account_getPasswordSettings"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" current_password_hash: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } - break; - - case mtpc_auth_requestPasswordRecovery: - to.add("{ auth_requestPasswordRecovery }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); - break; - case mtpc_messages_exportChatInvite: if (stage) { to.add(",\n").addSpaces(lev); @@ -5948,6 +5843,127 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } break; + case mtpc_updates_getState: + to.add("{ updates_getState }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + + case mtpc_updates_getDifference: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ updates_getDifference"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_photos_updateProfilePhoto: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ photos_updateProfilePhoto"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_photos_uploadProfilePhoto: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ photos_uploadProfilePhoto"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" geo_point: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_photos_getUserPhotos: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ photos_getUserPhotos"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" user_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_upload_getFile: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ upload_getFile"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" location: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_help_getConfig: + to.add("{ help_getConfig }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + + case mtpc_help_getNearestDc: + to.add("{ help_getNearestDc }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + + case mtpc_help_getAppUpdate: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ help_getAppUpdate"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" device_model: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" system_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" app_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_help_getInviteText: + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ help_getInviteText"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } + break; + + case mtpc_help_getSupport: + to.add("{ help_getSupport }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); + break; + case mtpc_help_getAppChangelog: if (stage) { to.add(",\n").addSpaces(lev); diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index 82b548bb10..9fc3f6af51 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -68,10 +68,13 @@ enum { mtpc_inputPeerEmpty = 0x7f3b18ea, mtpc_inputPeerSelf = 0x7da07ec9, mtpc_inputPeerChat = 0x179be863, + mtpc_inputPeerUser = 0x7b8e7de6, 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, @@ -80,6 +83,12 @@ enum { mtpc_inputMediaUploadedVideo = 0x82713fdf, mtpc_inputMediaUploadedThumbVideo = 0x7780ddf9, mtpc_inputMediaVideo = 0x936a4ebd, + mtpc_inputMediaUploadedAudio = 0x4e498cab, + mtpc_inputMediaAudio = 0x89938781, + mtpc_inputMediaUploadedDocument = 0xffe76b78, + mtpc_inputMediaUploadedThumbDocument = 0x41481486, + mtpc_inputMediaDocument = 0xd184e841, + mtpc_inputMediaVenue = 0x2827a81a, mtpc_inputChatPhotoEmpty = 0x1ca48f57, mtpc_inputChatUploadedPhoto = 0x94254732, mtpc_inputChatPhoto = 0xb2e1bf08, @@ -91,6 +100,9 @@ enum { mtpc_inputVideo = 0xee579652, mtpc_inputFileLocation = 0x14637196, mtpc_inputVideoFileLocation = 0x3d0364ec, + mtpc_inputEncryptedFileLocation = 0xf5235d55, + mtpc_inputAudioFileLocation = 0x74dc404d, + mtpc_inputDocumentFileLocation = 0x4e45abe9, mtpc_inputPhotoCropAuto = 0xade6b004, mtpc_inputPhotoCrop = 0xd9915325, mtpc_inputAppEvent = 0x770656a8, @@ -109,17 +121,21 @@ enum { mtpc_fileLocationUnavailable = 0x7c596b46, mtpc_fileLocation = 0x53d69076, mtpc_userEmpty = 0x200250ba, + mtpc_user = 0x22e49072, 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 = 0x6e9c9bc7, mtpc_chatForbidden = 0xfb0ccc41, mtpc_chatFull = 0x2e02a614, mtpc_chatParticipant = 0xc8d7493e, - mtpc_chatParticipantsForbidden = 0xfd2bb8a, + mtpc_chatParticipantsForbidden = 0xfc900c2b, mtpc_chatParticipants = 0x7841b415, mtpc_chatPhotoEmpty = 0x37c1011c, mtpc_chatPhoto = 0x6153276a, @@ -132,6 +148,10 @@ enum { mtpc_messageMediaGeo = 0x56e0d474, mtpc_messageMediaContact = 0x5e7d2f39, mtpc_messageMediaUnsupported = 0x9f84f49e, + mtpc_messageMediaDocument = 0x2fda2204, + mtpc_messageMediaAudio = 0xc6b68300, + mtpc_messageMediaWebPage = 0xa32dd600, + mtpc_messageMediaVenue = 0x7912b71f, mtpc_messageActionEmpty = 0xb6aef7b0, mtpc_messageActionChatCreate = 0xa6638b9a, mtpc_messageActionChatEditTitle = 0xb5a1ce5a, @@ -139,6 +159,7 @@ enum { mtpc_messageActionChatDeletePhoto = 0x95e3fbef, mtpc_messageActionChatAddUser = 0x5e3cfc4b, mtpc_messageActionChatDeleteUser = 0xb2ae9b0c, + mtpc_messageActionChatJoinedByLink = 0xf89cf5e8, mtpc_dialog = 0xc1dd804a, mtpc_photoEmpty = 0x2331b22d, mtpc_photo = 0xcded42fe, @@ -151,6 +172,7 @@ enum { mtpc_geoPoint = 0x2049d70c, mtpc_auth_checkedPhone = 0x811ea28e, mtpc_auth_sentCode = 0xefed51d9, + mtpc_auth_sentAppCode = 0xe325edcf, mtpc_auth_authorization = 0xff036af1, mtpc_auth_exportedAuthorization = 0xdf969c2d, mtpc_inputNotifyPeer = 0xb8bc5b0c, @@ -165,6 +187,7 @@ enum { mtpc_peerNotifySettingsEmpty = 0x70a68512, mtpc_peerNotifySettings = 0x8d5e11ee, mtpc_wallPaper = 0xccb03657, + mtpc_wallPaperSolid = 0x63117f24, mtpc_userFull = 0x5a89ac5b, mtpc_contact = 0xf911c994, mtpc_importedContact = 0xd0028438, @@ -206,6 +229,22 @@ enum { 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 = 0x2cc36971, + mtpc_updateReadMessagesContents = 0x68c13933, mtpc_updates_state = 0xa56c2a3e, mtpc_updates_differenceEmpty = 0x5d75a138, mtpc_updates_difference = 0xf49ca0, @@ -216,6 +255,7 @@ enum { mtpc_updateShort = 0x78d4dec1, mtpc_updatesCombined = 0x725b04c3, mtpc_updates = 0x74ae4240, + mtpc_updateShortSentMessage = 0x11f1331c, mtpc_photos_photos = 0x8dca6aa5, mtpc_photos_photosSlice = 0x15051f54, mtpc_photos_photo = 0x20212ca8, @@ -226,11 +266,6 @@ enum { mtpc_help_appUpdate = 0x8987f311, mtpc_help_noAppUpdate = 0xc45a6536, mtpc_help_inviteText = 0x18cb9f78, - mtpc_wallPaperSolid = 0x63117f24, - mtpc_updateNewEncryptedMessage = 0x12bcbd9a, - mtpc_updateEncryptedChatTyping = 0x1710f156, - mtpc_updateEncryption = 0xb4a2e88d, - mtpc_updateEncryptedMessagesRead = 0x38fe25b7, mtpc_encryptedChatEmpty = 0xab7ec0a0, mtpc_encryptedChatWaiting = 0x3bf703dc, mtpc_encryptedChatRequested = 0xc878527e, @@ -242,31 +277,17 @@ enum { mtpc_inputEncryptedFileEmpty = 0x1837c364, mtpc_inputEncryptedFileUploaded = 0x64bd0306, mtpc_inputEncryptedFile = 0x5a17b5e5, - mtpc_inputEncryptedFileLocation = 0xf5235d55, + 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_inputFileBig = 0xfa4f0bb5, - mtpc_inputEncryptedFileBigUploaded = 0x2dc173c8, - mtpc_updateChatParticipantAdd = 0x3a0eeb22, - mtpc_updateChatParticipantDelete = 0x6e5f8c22, - mtpc_updateDcOptions = 0x8e5e9873, - mtpc_inputMediaUploadedAudio = 0x4e498cab, - mtpc_inputMediaAudio = 0x89938781, - mtpc_inputMediaUploadedDocument = 0xffe76b78, - mtpc_inputMediaUploadedThumbDocument = 0x41481486, - mtpc_inputMediaDocument = 0xd184e841, - mtpc_messageMediaDocument = 0x2fda2204, - mtpc_messageMediaAudio = 0xc6b68300, mtpc_inputAudioEmpty = 0xd95adc84, mtpc_inputAudio = 0x77d440ff, mtpc_inputDocumentEmpty = 0x72f0eaae, mtpc_inputDocument = 0x18798952, - mtpc_inputAudioFileLocation = 0x74dc404d, - mtpc_inputDocumentFileLocation = 0x4e45abe9, mtpc_audioEmpty = 0x586988d8, mtpc_audio = 0xf9e35055, mtpc_documentEmpty = 0x36f8c871, @@ -276,9 +297,6 @@ enum { mtpc_notifyUsers = 0xb4c83b4c, mtpc_notifyChats = 0xc007cec3, mtpc_notifyAll = 0x74d07c60, - mtpc_updateUserBlocked = 0x80ece81a, - mtpc_updateNotifySettings = 0xbec268ef, - mtpc_auth_sentAppCode = 0xe325edcf, mtpc_sendMessageTypingAction = 0x16bf744e, mtpc_sendMessageCancelAction = 0xfd5ec8f5, mtpc_sendMessageRecordVideoAction = 0xa187d66f, @@ -291,11 +309,6 @@ enum { mtpc_sendMessageChooseContactAction = 0x628cbc6f, mtpc_contactFound = 0xea879f95, mtpc_contacts_found = 0x566000e, - mtpc_updateServiceNotification = 0x382dd3e4, - mtpc_userStatusRecently = 0xe26f42f1, - mtpc_userStatusLastWeek = 0x7bf09fc, - mtpc_userStatusLastMonth = 0x77ebc742, - mtpc_updatePrivacy = 0xee3b272a, mtpc_inputPrivacyKeyStatusTimestamp = 0x4f96cb18, mtpc_privacyKeyStatusTimestamp = 0xbc2eab30, mtpc_inputPrivacyValueAllowContacts = 0xd09e07b, @@ -313,7 +326,6 @@ enum { mtpc_account_privacyRules = 0x554abb6f, mtpc_accountDaysTTL = 0xb8d0afdf, mtpc_account_sentChangePhoneCode = 0xa4f58c4c, - mtpc_updateUserPhone = 0x12b9417b, mtpc_documentAttributeImageSize = 0x6c37c15c, mtpc_documentAttributeAnimated = 0x11b58939, mtpc_documentAttributeSticker = 0x3a556302, @@ -326,18 +338,14 @@ enum { mtpc_messages_allStickersNotModified = 0xe86602c3, mtpc_messages_allStickers = 0xd51dafdb, mtpc_disabledFeature = 0xae636f24, - mtpc_updateReadHistoryInbox = 0x9961fd5c, - mtpc_updateReadHistoryOutbox = 0x2f2f21bf, mtpc_messages_affectedMessages = 0x84d19185, mtpc_contactLinkUnknown = 0x5f4f9247, mtpc_contactLinkNone = 0xfeedd3ad, mtpc_contactLinkHasPhone = 0x268f3f59, mtpc_contactLinkContact = 0xd502c2d0, - mtpc_updateWebPage = 0x2cc36971, mtpc_webPageEmpty = 0xeb1477e8, mtpc_webPagePending = 0xc586da1c, mtpc_webPage = 0xca820ed7, - mtpc_messageMediaWebPage = 0xa32dd600, mtpc_authorization = 0x7bf2e6f6, mtpc_account_authorizations = 0x1250abde, mtpc_account_noPassword = 0x96dabc18, @@ -345,21 +353,16 @@ enum { mtpc_account_passwordSettings = 0xb7b72ab3, mtpc_account_passwordInputSettings = 0xbcfc532c, mtpc_auth_passwordRecovery = 0x137948a5, - mtpc_inputMediaVenue = 0x2827a81a, - mtpc_messageMediaVenue = 0x7912b71f, mtpc_receivedNotifyMessage = 0xa384b779, mtpc_chatInviteEmpty = 0x69df3769, mtpc_chatInviteExported = 0xfc2e05bc, mtpc_chatInviteAlready = 0x5a686d7c, mtpc_chatInvite = 0xce917dcd, - mtpc_messageActionChatJoinedByLink = 0xf89cf5e8, - mtpc_updateReadMessagesContents = 0x68c13933, mtpc_inputStickerSetEmpty = 0xffb62b95, mtpc_inputStickerSetID = 0x9de7a269, mtpc_inputStickerSetShortName = 0x861cc8a0, mtpc_stickerSet = 0xcd303b41, mtpc_messages_stickerSet = 0xb60a24a6, - mtpc_user = 0x22e49072, mtpc_botCommand = 0xc27ac8c7, mtpc_botInfoEmpty = 0xbb2e37ce, mtpc_botInfo = 0x9cf585d, @@ -368,8 +371,6 @@ enum { mtpc_replyKeyboardHide = 0xa03e5b85, mtpc_replyKeyboardForceReply = 0xf4108aa0, mtpc_replyKeyboardMarkup = 0x3502758c, - mtpc_inputPeerUser = 0x7b8e7de6, - mtpc_inputUser = 0xd8292816, mtpc_help_appChangelogEmpty = 0xaf7e0394, mtpc_help_appChangelog = 0x4668e6bd, mtpc_messageEntityUnknown = 0xbb92ba95, @@ -383,9 +384,11 @@ enum { mtpc_messageEntityCode = 0x28a20571, mtpc_messageEntityPre = 0x73924be0, mtpc_messageEntityTextUrl = 0x76a6d327, - mtpc_updateShortSentMessage = 0x11f1331c, mtpc_invokeAfterMsg = 0xcb9f372d, mtpc_invokeAfterMsgs = 0x3dc4b4f0, + mtpc_initConnection = 0x69796de9, + mtpc_invokeWithLayer = 0xda9b0d0d, + mtpc_invokeWithoutUpdates = 0xbf9459b7, mtpc_auth_checkPhone = 0x6fe51dfb, mtpc_auth_sendCode = 0x768d5f4d, mtpc_auth_sendCall = 0x3c51564, @@ -397,6 +400,11 @@ enum { mtpc_auth_exportAuthorization = 0xe5bfffcd, mtpc_auth_importAuthorization = 0xe3ef9613, mtpc_auth_bindTempAuthKey = 0xcdd42a05, + mtpc_auth_sendSms = 0xda9f3e8, + mtpc_auth_importBotAuthorization = 0x67a3ff2c, + mtpc_auth_checkPassword = 0xa63011e, + mtpc_auth_requestPasswordRecovery = 0xd897bc66, + mtpc_auth_recoverPassword = 0x4ea56e92, mtpc_account_registerDevice = 0x446c712c, mtpc_account_unregisterDevice = 0x65c55b40, mtpc_account_updateNotifySettings = 0x84be5b93, @@ -405,6 +413,21 @@ enum { mtpc_account_updateProfile = 0xf0888d68, mtpc_account_updateStatus = 0x6628562c, mtpc_account_getWallPapers = 0xc04cfac2, + 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 = 0xa407a8f4, + 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_users_getUsers = 0xd91a548, mtpc_users_getFullUser = 0xca30a5b1, mtpc_contacts_getStatuses = 0xc4a353ee, @@ -418,6 +441,8 @@ enum { mtpc_contacts_getBlocked = 0xf57c350f, mtpc_contacts_exportCard = 0x84e53737, mtpc_contacts_importCard = 0x4fe196fe, + mtpc_contacts_search = 0x11f812d8, + mtpc_contacts_resolveUsername = 0xbf0131c, mtpc_messages_getMessages = 0x4222fa74, mtpc_messages_getDialogs = 0xeccf1df6, mtpc_messages_getHistory = 0x92a1df2f, @@ -437,19 +462,6 @@ enum { mtpc_messages_addChatUser = 0xf9a0aa09, mtpc_messages_deleteChatUser = 0xe0611f16, mtpc_messages_createChat = 0x9cb126e, - mtpc_updates_getState = 0xedd4882a, - mtpc_updates_getDifference = 0xa041495, - mtpc_photos_updateProfilePhoto = 0xeef579a0, - mtpc_photos_uploadProfilePhoto = 0xd50f9c88, - mtpc_photos_deletePhotos = 0x87cf7f2f, - mtpc_upload_saveFilePart = 0xb304a621, - mtpc_upload_getFile = 0xe3a6cfb5, - mtpc_help_getConfig = 0xc4f9186b, - mtpc_help_getNearestDc = 0x1fb33026, - mtpc_help_getAppUpdate = 0xc812ac7e, - mtpc_help_saveAppLog = 0x6f02f748, - mtpc_help_getInviteText = 0xa4a95186, - mtpc_photos_getUserPhotos = 0x91cd32a8, mtpc_messages_forwardMessage = 0x33963bf9, mtpc_messages_sendBroadcast = 0xbf73f4da, mtpc_messages_getDhConfig = 0x26cf8950, @@ -462,37 +474,10 @@ enum { mtpc_messages_sendEncryptedFile = 0x9a901b66, mtpc_messages_sendEncryptedService = 0x32d439a4, mtpc_messages_receivedQueue = 0x55a5bb66, - mtpc_upload_saveBigFilePart = 0xde7b673d, - mtpc_initConnection = 0x69796de9, - mtpc_help_getSupport = 0x9cdf08cd, - mtpc_auth_sendSms = 0xda9f3e8, mtpc_messages_readMessageContents = 0x36a73f77, - mtpc_account_checkUsername = 0x2714d86c, - mtpc_account_updateUsername = 0x3e0bdd7c, - mtpc_contacts_search = 0x11f812d8, - mtpc_account_getPrivacy = 0xdadbc950, - mtpc_account_setPrivacy = 0xc9f81ce8, - mtpc_account_deleteAccount = 0x418d4e0b, - mtpc_account_getAccountTTL = 0x8fc711d, - mtpc_account_setAccountTTL = 0x2442485e, - mtpc_invokeWithLayer = 0xda9b0d0d, - mtpc_contacts_resolveUsername = 0xbf0131c, - mtpc_account_sendChangePhoneCode = 0xa407a8f4, - mtpc_account_changePhone = 0x70c32edb, mtpc_messages_getStickers = 0xae22e045, mtpc_messages_getAllStickers = 0xaa3bc868, - mtpc_account_updateDeviceLocked = 0x38df3532, - mtpc_auth_importBotAuthorization = 0x67a3ff2c, mtpc_messages_getWebPagePreview = 0x25223e24, - mtpc_account_getAuthorizations = 0xe320c158, - mtpc_account_resetAuthorization = 0xdf77f3bc, - mtpc_account_getPassword = 0x548a30f5, - mtpc_account_getPasswordSettings = 0xbc8d11bb, - mtpc_account_updatePasswordSettings = 0xfa7c4b86, - mtpc_auth_checkPassword = 0xa63011e, - mtpc_auth_requestPasswordRecovery = 0xd897bc66, - mtpc_auth_recoverPassword = 0x4ea56e92, - mtpc_invokeWithoutUpdates = 0xbf9459b7, mtpc_messages_exportChatInvite = 0x7d885289, mtpc_messages_checkChatInvite = 0x3eadb1bb, mtpc_messages_importChatInvite = 0x6c50051c, @@ -500,6 +485,22 @@ enum { mtpc_messages_installStickerSet = 0x7b30c3a6, mtpc_messages_uninstallStickerSet = 0xf96e55de, mtpc_messages_startBot = 0x1b3e0ffc, + mtpc_messages_reportSpam = 0xcf1592db, + mtpc_updates_getState = 0xedd4882a, + mtpc_updates_getDifference = 0xa041495, + 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 = 0xc812ac7e, + mtpc_help_saveAppLog = 0x6f02f748, + mtpc_help_getInviteText = 0xa4a95186, + mtpc_help_getSupport = 0x9cdf08cd, mtpc_help_getAppChangelog = 0x5bab7fb2 }; @@ -3183,7 +3184,7 @@ private: explicit MTPchatParticipants(MTPDchatParticipantsForbidden *_data); explicit MTPchatParticipants(MTPDchatParticipants *_data); - friend MTPchatParticipants MTP_chatParticipantsForbidden(MTPint _chat_id); + friend MTPchatParticipants MTP_chatParticipantsForbidden(MTPint _flags, MTPint _chat_id, const MTPChatParticipant &_self_participant); friend MTPchatParticipants MTP_chatParticipants(MTPint _chat_id, MTPint _admin_id, const MTPVector &_participants, MTPint _version); mtpTypeId _type; @@ -5122,7 +5123,7 @@ private: friend MTPupdate MTP_updateEncryptedChatTyping(MTPint _chat_id); friend MTPupdate MTP_updateEncryption(const MTPEncryptedChat &_chat, MTPint _date); friend MTPupdate MTP_updateEncryptedMessagesRead(MTPint _chat_id, MTPint _max_date, MTPint _date); - friend MTPupdate MTP_updateChatParticipantAdd(MTPint _chat_id, MTPint _user_id, MTPint _inviter_id, MTPint _version); + friend MTPupdate MTP_updateChatParticipantAdd(MTPint _chat_id, MTPint _user_id, MTPint _inviter_id, MTPint _date, MTPint _version); friend MTPupdate MTP_updateChatParticipantDelete(MTPint _chat_id, MTPint _user_id, MTPint _version); friend MTPupdate MTP_updateDcOptions(const MTPVector &_dc_options); friend MTPupdate MTP_updateUserBlocked(MTPint _user_id, MTPBool _blocked); @@ -8737,10 +8738,18 @@ class MTPDchatParticipantsForbidden : public mtpDataImpl { @@ -9627,12 +9636,13 @@ class MTPDupdateChatParticipantAdd : public mtpDataImpl +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; @@ -12015,6 +12160,205 @@ public: } }; +class MTPauth_sendSms { // RPC method 'auth.sendSms' +public: + MTPstring vphone_number; + MTPstring vphone_code_hash; + + MTPauth_sendSms() { + } + MTPauth_sendSms(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendSms) { + read(from, end, cons); + } + MTPauth_sendSms(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_sendSms; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendSms) { + 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_SendSms : public MTPBoxed { +public: + MTPauth_SendSms() { + } + MTPauth_SendSms(const MTPauth_sendSms &v) : MTPBoxed(v) { + } + MTPauth_SendSms(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } + MTPauth_SendSms(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : MTPBoxed(MTPauth_sendSms(_phone_number, _phone_code_hash)) { + } +}; + +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 MTPaccount_registerDevice { // RPC method 'account.registerDevice' public: MTPint vtoken_type; @@ -12338,6 +12682,579 @@ public: } }; +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: + MTPstring vphone_number; + + MTPaccount_sendChangePhoneCode() { + } + MTPaccount_sendChangePhoneCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendChangePhoneCode) { + read(from, end, cons); + } + MTPaccount_sendChangePhoneCode(const MTPstring &_phone_number) : vphone_number(_phone_number) { + } + + uint32 innerLength() const { + return vphone_number.innerLength(); + } + mtpTypeId type() const { + return mtpc_account_sendChangePhoneCode; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendChangePhoneCode) { + vphone_number.read(from, end); + } + void write(mtpBuffer &to) const { + vphone_number.write(to); + } + + typedef MTPaccount_SentChangePhoneCode ResponseType; +}; +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 MTPstring &_phone_number) : MTPBoxed(MTPaccount_sendChangePhoneCode(_phone_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 MTPusers_getUsers { // RPC method 'users.getUsers' public: MTPVector vid; @@ -12835,6 +13752,87 @@ public: } }; +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 MTPUser 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 MTPmessages_getMessages { // RPC method 'messages.getMessages' public: MTPVector vid; @@ -13699,537 +14697,6 @@ public: } }; -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 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 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 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: - MTPstring vdevice_model; - MTPstring vsystem_version; - MTPstring vapp_version; - MTPstring vlang_code; - - MTPhelp_getAppUpdate() { - } - MTPhelp_getAppUpdate(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppUpdate) { - read(from, end, cons); - } - MTPhelp_getAppUpdate(const MTPstring &_device_model, const MTPstring &_system_version, const MTPstring &_app_version, const MTPstring &_lang_code) : vdevice_model(_device_model), vsystem_version(_system_version), vapp_version(_app_version), vlang_code(_lang_code) { - } - - uint32 innerLength() const { - return vdevice_model.innerLength() + vsystem_version.innerLength() + vapp_version.innerLength() + vlang_code.innerLength(); - } - mtpTypeId type() const { - return mtpc_help_getAppUpdate; - } - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppUpdate) { - vdevice_model.read(from, end); - vsystem_version.read(from, end); - vapp_version.read(from, end); - vlang_code.read(from, end); - } - void write(mtpBuffer &to) const { - vdevice_model.write(to); - vsystem_version.write(to); - vapp_version.write(to); - vlang_code.write(to); - } - - 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) { - } - MTPhelp_GetAppUpdate(const MTPstring &_device_model, const MTPstring &_system_version, const MTPstring &_app_version, const MTPstring &_lang_code) : MTPBoxed(MTPhelp_getAppUpdate(_device_model, _system_version, _app_version, _lang_code)) { - } -}; - -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: - MTPstring vlang_code; - - MTPhelp_getInviteText() { - } - MTPhelp_getInviteText(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getInviteText) { - read(from, end, cons); - } - MTPhelp_getInviteText(const MTPstring &_lang_code) : vlang_code(_lang_code) { - } - - uint32 innerLength() const { - return vlang_code.innerLength(); - } - mtpTypeId type() const { - return mtpc_help_getInviteText; - } - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getInviteText) { - vlang_code.read(from, end); - } - void write(mtpBuffer &to) const { - vlang_code.write(to); - } - - 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) { - } - MTPhelp_GetInviteText(const MTPstring &_lang_code) : MTPBoxed(MTPhelp_getInviteText(_lang_code)) { - } -}; - -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 MTPmessages_forwardMessage { // RPC method 'messages.forwardMessage' public: MTPInputPeer vpeer; @@ -14755,181 +15222,6 @@ public: } }; -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)) { - } -}; - -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)) { - } -}; - -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 MTPauth_sendSms { // RPC method 'auth.sendSms' -public: - MTPstring vphone_number; - MTPstring vphone_code_hash; - - MTPauth_sendSms() { - } - MTPauth_sendSms(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendSms) { - read(from, end, cons); - } - MTPauth_sendSms(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_sendSms; - } - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_auth_sendSms) { - 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_SendSms : public MTPBoxed { -public: - MTPauth_SendSms() { - } - MTPauth_SendSms(const MTPauth_sendSms &v) : MTPBoxed(v) { - } - MTPauth_SendSms(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { - } - MTPauth_SendSms(const MTPstring &_phone_number, const MTPstring &_phone_code_hash) : MTPBoxed(MTPauth_sendSms(_phone_number, _phone_code_hash)) { - } -}; - class MTPmessages_readMessageContents { // RPC method 'messages.readMessageContents' public: MTPVector vid; @@ -14969,481 +15261,6 @@ public: } }; -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 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 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)) { - } -}; - -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)) { - } -}; - -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 MTPUser 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 MTPaccount_sendChangePhoneCode { // RPC method 'account.sendChangePhoneCode' -public: - MTPstring vphone_number; - - MTPaccount_sendChangePhoneCode() { - } - MTPaccount_sendChangePhoneCode(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendChangePhoneCode) { - read(from, end, cons); - } - MTPaccount_sendChangePhoneCode(const MTPstring &_phone_number) : vphone_number(_phone_number) { - } - - uint32 innerLength() const { - return vphone_number.innerLength(); - } - mtpTypeId type() const { - return mtpc_account_sendChangePhoneCode; - } - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_account_sendChangePhoneCode) { - vphone_number.read(from, end); - } - void write(mtpBuffer &to) const { - vphone_number.write(to); - } - - typedef MTPaccount_SentChangePhoneCode ResponseType; -}; -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 MTPstring &_phone_number) : MTPBoxed(MTPaccount_sendChangePhoneCode(_phone_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 MTPmessages_getStickers { // RPC method 'messages.getStickers' public: MTPstring vemoticon; @@ -15525,93 +15342,6 @@ public: } }; -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 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 MTPmessages_getWebPagePreview { // RPC method 'messages.getWebPagePreview' public: MTPstring vmessage; @@ -15651,336 +15381,6 @@ public: } }; -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 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)) { - } -}; - -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 MTPmessages_exportChatInvite { // RPC method 'messages.exportChatInvite' public: MTPint vchat_id; @@ -16266,6 +15666,655 @@ public: } }; +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 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 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: + MTPstring vdevice_model; + MTPstring vsystem_version; + MTPstring vapp_version; + MTPstring vlang_code; + + MTPhelp_getAppUpdate() { + } + MTPhelp_getAppUpdate(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppUpdate) { + read(from, end, cons); + } + MTPhelp_getAppUpdate(const MTPstring &_device_model, const MTPstring &_system_version, const MTPstring &_app_version, const MTPstring &_lang_code) : vdevice_model(_device_model), vsystem_version(_system_version), vapp_version(_app_version), vlang_code(_lang_code) { + } + + uint32 innerLength() const { + return vdevice_model.innerLength() + vsystem_version.innerLength() + vapp_version.innerLength() + vlang_code.innerLength(); + } + mtpTypeId type() const { + return mtpc_help_getAppUpdate; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getAppUpdate) { + vdevice_model.read(from, end); + vsystem_version.read(from, end); + vapp_version.read(from, end); + vlang_code.read(from, end); + } + void write(mtpBuffer &to) const { + vdevice_model.write(to); + vsystem_version.write(to); + vapp_version.write(to); + vlang_code.write(to); + } + + 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) { + } + MTPhelp_GetAppUpdate(const MTPstring &_device_model, const MTPstring &_system_version, const MTPstring &_app_version, const MTPstring &_lang_code) : MTPBoxed(MTPhelp_getAppUpdate(_device_model, _system_version, _app_version, _lang_code)) { + } +}; + +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: + MTPstring vlang_code; + + MTPhelp_getInviteText() { + } + MTPhelp_getInviteText(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getInviteText) { + read(from, end, cons); + } + MTPhelp_getInviteText(const MTPstring &_lang_code) : vlang_code(_lang_code) { + } + + uint32 innerLength() const { + return vlang_code.innerLength(); + } + mtpTypeId type() const { + return mtpc_help_getInviteText; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_help_getInviteText) { + vlang_code.read(from, end); + } + void write(mtpBuffer &to) const { + vlang_code.write(to); + } + + 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) { + } + MTPhelp_GetInviteText(const MTPstring &_lang_code) : MTPBoxed(MTPhelp_getInviteText(_lang_code)) { + } +}; + +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: MTPstring vdevice_model; @@ -18858,7 +18907,7 @@ inline uint32 MTPchatParticipants::innerLength() const { switch (_type) { case mtpc_chatParticipantsForbidden: { const MTPDchatParticipantsForbidden &v(c_chatParticipantsForbidden()); - return v.vchat_id.innerLength(); + 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()); @@ -18877,7 +18926,9 @@ inline void MTPchatParticipants::read(const mtpPrime *&from, const mtpPrime *end 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()); @@ -18894,7 +18945,9 @@ 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()); @@ -18916,8 +18969,8 @@ inline MTPchatParticipants::MTPchatParticipants(MTPDchatParticipantsForbidden *_ } inline MTPchatParticipants::MTPchatParticipants(MTPDchatParticipants *_data) : mtpDataOwner(_data), _type(mtpc_chatParticipants) { } -inline MTPchatParticipants MTP_chatParticipantsForbidden(MTPint _chat_id) { - return MTPchatParticipants(new MTPDchatParticipantsForbidden(_chat_id)); +inline MTPchatParticipants MTP_chatParticipantsForbidden(MTPint _flags, MTPint _chat_id, const MTPChatParticipant &_self_participant) { + return MTPchatParticipants(new MTPDchatParticipantsForbidden(_flags, _chat_id, _self_participant)); } inline MTPchatParticipants MTP_chatParticipants(MTPint _chat_id, MTPint _admin_id, const MTPVector &_participants, MTPint _version) { return MTPchatParticipants(new MTPDchatParticipants(_chat_id, _admin_id, _participants, _version)); @@ -20989,7 +21042,7 @@ inline uint32 MTPupdate::innerLength() const { } case mtpc_updateChatParticipantAdd: { const MTPDupdateChatParticipantAdd &v(c_updateChatParticipantAdd()); - return v.vchat_id.innerLength() + v.vuser_id.innerLength() + v.vinviter_id.innerLength() + v.vversion.innerLength(); + 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()); @@ -21156,6 +21209,7 @@ inline void MTPupdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeI 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; { @@ -21329,6 +21383,7 @@ inline void MTPupdate::write(mtpBuffer &to) const { 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: { @@ -21531,8 +21586,8 @@ inline MTPupdate MTP_updateEncryption(const MTPEncryptedChat &_chat, MTPint _dat inline MTPupdate MTP_updateEncryptedMessagesRead(MTPint _chat_id, MTPint _max_date, MTPint _date) { return MTPupdate(new MTPDupdateEncryptedMessagesRead(_chat_id, _max_date, _date)); } -inline MTPupdate MTP_updateChatParticipantAdd(MTPint _chat_id, MTPint _user_id, MTPint _inviter_id, MTPint _version) { - return MTPupdate(new MTPDupdateChatParticipantAdd(_chat_id, _user_id, _inviter_id, _version)); +inline MTPupdate MTP_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 MTPupdate MTP_updateChatParticipantDelete(MTPint _chat_id, MTPint _user_id, MTPint _version) { return MTPupdate(new MTPDupdateChatParticipantDelete(_chat_id, _user_id, _version)); diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index 66803e904a..33fb1f1257 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -133,13 +133,16 @@ null#56730bcc = Null; inputPeerEmpty#7f3b18ea = InputPeer; inputPeerSelf#7da07ec9 = InputPeer; inputPeerChat#179be863 chat_id:int = InputPeer; +inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer; inputUserEmpty#b98886cf = InputUser; inputUserSelf#f7c1b13f = InputUser; +inputUser#d8292816 user_id:int access_hash:long = InputUser; inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact; inputFile#f52ff27f id:long parts:int name:string md5_checksum:string = InputFile; +inputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile; inputMediaEmpty#9664f57f = InputMedia; inputMediaUploadedPhoto#f7aff1c0 file:InputFile caption:string = InputMedia; @@ -149,6 +152,12 @@ inputMediaContact#a6e45987 phone_number:string first_name:string last_name:strin inputMediaUploadedVideo#82713fdf file:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia; inputMediaUploadedThumbVideo#7780ddf9 file:InputFile thumb:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia; inputMediaVideo#936a4ebd id:InputVideo caption:string = InputMedia; +inputMediaUploadedAudio#4e498cab file:InputFile duration:int mime_type:string = InputMedia; +inputMediaAudio#89938781 id:InputAudio = InputMedia; +inputMediaUploadedDocument#ffe76b78 file:InputFile mime_type:string attributes:Vector = InputMedia; +inputMediaUploadedThumbDocument#41481486 file:InputFile thumb:InputFile mime_type:string attributes:Vector = InputMedia; +inputMediaDocument#d184e841 id:InputDocument = InputMedia; +inputMediaVenue#2827a81a geo_point:InputGeoPoint title:string address:string provider:string venue_id:string = InputMedia; inputChatPhotoEmpty#1ca48f57 = InputChatPhoto; inputChatUploadedPhoto#94254732 file:InputFile crop:InputPhotoCrop = InputChatPhoto; @@ -165,6 +174,9 @@ inputVideo#ee579652 id:long access_hash:long = InputVideo; inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation; inputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation; +inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; +inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation; +inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation; inputPhotoCropAuto#ade6b004 = InputPhotoCrop; inputPhotoCrop#d9915325 crop_left:double crop_top:double crop_width:double = InputPhotoCrop; @@ -189,6 +201,7 @@ fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileL fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation; userEmpty#200250ba id:int = User; +user#22e49072 flags:# id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User; userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto; @@ -196,6 +209,9 @@ userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileL userStatusEmpty#9d05049 = UserStatus; userStatusOnline#edb93949 expires:int = UserStatus; userStatusOffline#8c703f was_online:int = UserStatus; +userStatusRecently#e26f42f1 = UserStatus; +userStatusLastWeek#7bf09fc = UserStatus; +userStatusLastMonth#77ebc742 = UserStatus; chatEmpty#9ba2d800 id:int = Chat; chat#6e9c9bc7 id:int title:string photo:ChatPhoto participants_count:int date:int left:Bool version:int = Chat; @@ -205,7 +221,7 @@ chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_s chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant; -chatParticipantsForbidden#fd2bb8a chat_id:int = ChatParticipants; +chatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?ChatParticipant = ChatParticipants; chatParticipants#7841b415 chat_id:int admin_id:int participants:Vector version:int = ChatParticipants; chatPhotoEmpty#37c1011c = ChatPhoto; @@ -221,6 +237,10 @@ messageMediaVideo#5bcf1675 video:Video caption:string = MessageMedia; messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia; messageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia; messageMediaUnsupported#9f84f49e = MessageMedia; +messageMediaDocument#2fda2204 document:Document = MessageMedia; +messageMediaAudio#c6b68300 audio:Audio = MessageMedia; +messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia; +messageMediaVenue#7912b71f geo:GeoPoint title:string address:string provider:string venue_id:string = MessageMedia; messageActionEmpty#b6aef7b0 = MessageAction; messageActionChatCreate#a6638b9a title:string users:Vector = MessageAction; @@ -229,6 +249,7 @@ messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction; messageActionChatDeletePhoto#95e3fbef = MessageAction; messageActionChatAddUser#5e3cfc4b user_id:int = MessageAction; messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction; +messageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction; dialog#c1dd804a peer:Peer top_message:int read_inbox_max_id:int unread_count:int notify_settings:PeerNotifySettings = Dialog; @@ -248,6 +269,7 @@ geoPoint#2049d70c long:double lat:double = GeoPoint; auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone; auth.sentCode#efed51d9 phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode; +auth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode; auth.authorization#ff036af1 user:User = auth.Authorization; @@ -270,6 +292,7 @@ peerNotifySettingsEmpty#70a68512 = PeerNotifySettings; peerNotifySettings#8d5e11ee mute_until:int sound:string show_previews:Bool events_mask:int = PeerNotifySettings; wallPaper#ccb03657 id:int title:string sizes:Vector color:int = WallPaper; +wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper; userFull#5a89ac5b user:User link:contacts.Link profile_photo:Photo notify_settings:PeerNotifySettings blocked:Bool bot_info:BotInfo = UserFull; @@ -329,6 +352,22 @@ updateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bo updateContactRegistered#2575bbb9 user_id:int date:int = Update; updateContactLink#9d2e67c5 user_id:int my_link:ContactLink foreign_link:ContactLink = Update; updateNewAuthorization#8f06529a auth_key_id:long date:int device:string location:string = Update; +updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update; +updateEncryptedChatTyping#1710f156 chat_id:int = Update; +updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update; +updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update; +updateChatParticipantAdd#ea4b0e5c chat_id:int user_id:int inviter_id:int date:int version:int = Update; +updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update; +updateDcOptions#8e5e9873 dc_options:Vector = Update; +updateUserBlocked#80ece81a user_id:int blocked:Bool = Update; +updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update; +updateServiceNotification#382dd3e4 type:string message:string media:MessageMedia popup:Bool = Update; +updatePrivacy#ee3b272a key:PrivacyKey rules:Vector = Update; +updateUserPhone#12b9417b user_id:int phone:string = Update; +updateReadHistoryInbox#9961fd5c peer:Peer max_id:int pts:int pts_count:int = Update; +updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update; +updateWebPage#2cc36971 webpage:WebPage = Update; +updateReadMessagesContents#68c13933 messages:Vector pts:int pts_count:int = Update; updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; @@ -342,6 +381,7 @@ updateShortChatMessage#f9409b3d flags:# id:int from_id:int chat_id:int message:s updateShort#78d4dec1 update:Update date:int = Updates; updatesCombined#725b04c3 updates:Vector users:Vector chats:Vector date:int seq_start:int seq:int = Updates; updates#74ae4240 updates:Vector users:Vector chats:Vector date:int seq:int = Updates; +updateShortSentMessage#11f1331c flags:# id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector = Updates; photos.photos#8dca6aa5 photos:Vector users:Vector = photos.Photos; photos.photosSlice#15051f54 count:int photos:Vector users:Vector = photos.Photos; @@ -361,13 +401,6 @@ help.noAppUpdate#c45a6536 = help.AppUpdate; help.inviteText#18cb9f78 message:string = help.InviteText; -wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper; - -updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update; -updateEncryptedChatTyping#1710f156 chat_id:int = Update; -updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update; -updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update; - encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat; encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat; encryptedChatRequested#c878527e id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat; @@ -382,8 +415,7 @@ encryptedFile#4a70994c id:long access_hash:long size:int dc_id:int key_fingerpri inputEncryptedFileEmpty#1837c364 = InputEncryptedFile; inputEncryptedFileUploaded#64bd0306 id:long parts:int md5_checksum:string key_fingerprint:int = InputEncryptedFile; inputEncryptedFile#5a17b5e5 id:long access_hash:long = InputEncryptedFile; - -inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; +inputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile; encryptedMessage#ed18c118 random_id:long chat_id:int date:int bytes:bytes file:EncryptedFile = EncryptedMessage; encryptedMessageService#23734b06 random_id:long chat_id:int date:int bytes:bytes = EncryptedMessage; @@ -394,32 +426,12 @@ messages.dhConfig#2c221edd g:int p:bytes version:int random:bytes = messages.DhC messages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage; messages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage; -inputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile; - -inputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile; - -updateChatParticipantAdd#3a0eeb22 chat_id:int user_id:int inviter_id:int version:int = Update; -updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update; -updateDcOptions#8e5e9873 dc_options:Vector = Update; - -inputMediaUploadedAudio#4e498cab file:InputFile duration:int mime_type:string = InputMedia; -inputMediaAudio#89938781 id:InputAudio = InputMedia; -inputMediaUploadedDocument#ffe76b78 file:InputFile mime_type:string attributes:Vector = InputMedia; -inputMediaUploadedThumbDocument#41481486 file:InputFile thumb:InputFile mime_type:string attributes:Vector = InputMedia; -inputMediaDocument#d184e841 id:InputDocument = InputMedia; - -messageMediaDocument#2fda2204 document:Document = MessageMedia; -messageMediaAudio#c6b68300 audio:Audio = MessageMedia; - inputAudioEmpty#d95adc84 = InputAudio; inputAudio#77d440ff id:long access_hash:long = InputAudio; inputDocumentEmpty#72f0eaae = InputDocument; inputDocument#18798952 id:long access_hash:long = InputDocument; -inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation; -inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation; - audioEmpty#586988d8 id:long = Audio; audio#f9e35055 id:long access_hash:long date:int duration:int mime_type:string size:int dc_id:int = Audio; @@ -433,11 +445,6 @@ notifyUsers#b4c83b4c = NotifyPeer; notifyChats#c007cec3 = NotifyPeer; notifyAll#74d07c60 = NotifyPeer; -updateUserBlocked#80ece81a user_id:int blocked:Bool = Update; -updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update; - -auth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode; - sendMessageTypingAction#16bf744e = SendMessageAction; sendMessageCancelAction#fd5ec8f5 = SendMessageAction; sendMessageRecordVideoAction#a187d66f = SendMessageAction; @@ -453,14 +460,6 @@ contactFound#ea879f95 user_id:int = ContactFound; contacts.found#566000e results:Vector users:Vector = contacts.Found; -updateServiceNotification#382dd3e4 type:string message:string media:MessageMedia popup:Bool = Update; - -userStatusRecently#e26f42f1 = UserStatus; -userStatusLastWeek#7bf09fc = UserStatus; -userStatusLastMonth#77ebc742 = UserStatus; - -updatePrivacy#ee3b272a key:PrivacyKey rules:Vector = Update; - inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey; privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey; @@ -485,8 +484,6 @@ accountDaysTTL#b8d0afdf days:int = AccountDaysTTL; account.sentChangePhoneCode#a4f58c4c phone_code_hash:string send_call_timeout:int = account.SentChangePhoneCode; -updateUserPhone#12b9417b user_id:int phone:string = Update; - documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute; documentAttributeAnimated#11b58939 = DocumentAttribute; documentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = DocumentAttribute; @@ -504,9 +501,6 @@ messages.allStickers#d51dafdb hash:string sets:Vector = messages.All disabledFeature#ae636f24 feature:string description:string = DisabledFeature; -updateReadHistoryInbox#9961fd5c peer:Peer max_id:int pts:int pts_count:int = Update; -updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update; - messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages; contactLinkUnknown#5f4f9247 = ContactLink; @@ -514,14 +508,10 @@ contactLinkNone#feedd3ad = ContactLink; contactLinkHasPhone#268f3f59 = ContactLink; contactLinkContact#d502c2d0 = ContactLink; -updateWebPage#2cc36971 webpage:WebPage = Update; - webPageEmpty#eb1477e8 id:long = WebPage; webPagePending#c586da1c id:long date:int = WebPage; webPage#ca820ed7 flags:# id:long url:string display_url:string type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document = WebPage; -messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia; - authorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization; account.authorizations#1250abde authorizations:Vector = account.Authorizations; @@ -535,10 +525,6 @@ account.passwordInputSettings#bcfc532c flags:# new_salt:flags.0?bytes new_passwo auth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery; -inputMediaVenue#2827a81a geo_point:InputGeoPoint title:string address:string provider:string venue_id:string = InputMedia; - -messageMediaVenue#7912b71f geo:GeoPoint title:string address:string provider:string venue_id:string = MessageMedia; - receivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage; chatInviteEmpty#69df3769 = ExportedChatInvite; @@ -547,10 +533,6 @@ chatInviteExported#fc2e05bc link:string = ExportedChatInvite; chatInviteAlready#5a686d7c chat:Chat = ChatInvite; chatInvite#ce917dcd title:string = ChatInvite; -messageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction; - -updateReadMessagesContents#68c13933 messages:Vector pts:int pts_count:int = Update; - inputStickerSetEmpty#ffb62b95 = InputStickerSet; inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet; inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet; @@ -559,8 +541,6 @@ stickerSet#cd303b41 flags:# id:long access_hash:long title:string short_name:str messages.stickerSet#b60a24a6 set:StickerSet packs:Vector documents:Vector = messages.StickerSet; -user#22e49072 flags:# id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User; - botCommand#c27ac8c7 command:string description:string = BotCommand; botInfoEmpty#bb2e37ce = BotInfo; @@ -574,10 +554,6 @@ replyKeyboardHide#a03e5b85 flags:# = ReplyMarkup; replyKeyboardForceReply#f4108aa0 flags:# = ReplyMarkup; replyKeyboardMarkup#3502758c flags:# rows:Vector = ReplyMarkup; -inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer; - -inputUser#d8292816 user_id:int access_hash:long = InputUser; - help.appChangelogEmpty#af7e0394 = help.AppChangelog; help.appChangelog#4668e6bd text:string = help.AppChangelog; @@ -593,13 +569,13 @@ messageEntityCode#28a20571 offset:int length:int = MessageEntity; messageEntityPre#73924be0 offset:int length:int language:string = MessageEntity; messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity; -updateShortSentMessage#11f1331c flags:# id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector = Updates; - ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; - invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector query:!X = X; +initConnection#69796de9 {X:Type} api_id:int device_model:string system_version:string app_version:string lang_code:string query:!X = X; +invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X; +invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X; auth.checkPhone#6fe51dfb phone_number:string = auth.CheckedPhone; auth.sendCode#768d5f4d phone_number:string sms_type:int api_id:int api_hash:string lang_code:string = auth.SentCode; @@ -612,6 +588,11 @@ auth.sendInvites#771c1d97 phone_numbers:Vector message:string = Bool; auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization; auth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization; auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool; +auth.sendSms#da9f3e8 phone_number:string phone_code_hash:string = Bool; +auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization; +auth.checkPassword#a63011e password_hash:bytes = auth.Authorization; +auth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery; +auth.recoverPassword#4ea56e92 code:string = auth.Authorization; account.registerDevice#446c712c token_type:int token:string device_model:string system_version:string app_version:string app_sandbox:Bool lang_code:string = Bool; account.unregisterDevice#65c55b40 token_type:int token:string = Bool; @@ -621,6 +602,21 @@ account.resetNotifySettings#db7e1747 = Bool; account.updateProfile#f0888d68 first_name:string last_name:string = User; account.updateStatus#6628562c offline:Bool = Bool; account.getWallPapers#c04cfac2 = Vector; +account.checkUsername#2714d86c username:string = Bool; +account.updateUsername#3e0bdd7c username:string = User; +account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules; +account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector = account.PrivacyRules; +account.deleteAccount#418d4e0b reason:string = Bool; +account.getAccountTTL#8fc711d = AccountDaysTTL; +account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool; +account.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode; +account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User; +account.updateDeviceLocked#38df3532 period:int = Bool; +account.getAuthorizations#e320c158 = account.Authorizations; +account.resetAuthorization#df77f3bc hash:long = Bool; +account.getPassword#548a30f5 = account.Password; +account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings; +account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool; users.getUsers#d91a548 id:Vector = Vector; users.getFullUser#ca30a5b1 id:InputUser = UserFull; @@ -636,6 +632,8 @@ contacts.unblock#e54100bd id:InputUser = Bool; contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked; contacts.exportCard#84e53737 = Vector; contacts.importCard#4fe196fe export_card:Vector = User; +contacts.search#11f812d8 q:string limit:int = contacts.Found; +contacts.resolveUsername#bf0131c username:string = User; messages.getMessages#4222fa74 id:Vector = messages.Messages; messages.getDialogs#eccf1df6 offset:int max_id:int limit:int = messages.Dialogs; @@ -656,25 +654,6 @@ messages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates; messages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates; messages.deleteChatUser#e0611f16 chat_id:int user_id:InputUser = Updates; messages.createChat#9cb126e users:Vector title:string = Updates; - -updates.getState#edd4882a = updates.State; -updates.getDifference#a041495 pts:int date:int qts:int = updates.Difference; - -photos.updateProfilePhoto#eef579a0 id:InputPhoto crop:InputPhotoCrop = UserProfilePhoto; -photos.uploadProfilePhoto#d50f9c88 file:InputFile caption:string geo_point:InputGeoPoint crop:InputPhotoCrop = photos.Photo; -photos.deletePhotos#87cf7f2f id:Vector = Vector; - -upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool; -upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File; - -help.getConfig#c4f9186b = Config; -help.getNearestDc#1fb33026 = NearestDc; -help.getAppUpdate#c812ac7e device_model:string system_version:string app_version:string lang_code:string = help.AppUpdate; -help.saveAppLog#6f02f748 events:Vector = Bool; -help.getInviteText#a4a95186 lang_code:string = help.InviteText; - -photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos; - messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates; messages.sendBroadcast#bf73f4da contacts:Vector random_id:Vector message:string media:InputMedia = Updates; messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig; @@ -687,56 +666,10 @@ messages.sendEncrypted#a9776773 peer:InputEncryptedChat random_id:long data:byte messages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage; messages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage; messages.receivedQueue#55a5bb66 max_qts:int = Vector; - -upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool; - -initConnection#69796de9 {X:Type} api_id:int device_model:string system_version:string app_version:string lang_code:string query:!X = X; - -help.getSupport#9cdf08cd = help.Support; - -auth.sendSms#da9f3e8 phone_number:string phone_code_hash:string = Bool; - messages.readMessageContents#36a73f77 id:Vector = messages.AffectedMessages; - -account.checkUsername#2714d86c username:string = Bool; -account.updateUsername#3e0bdd7c username:string = User; - -contacts.search#11f812d8 q:string limit:int = contacts.Found; - -account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules; -account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector = account.PrivacyRules; -account.deleteAccount#418d4e0b reason:string = Bool; -account.getAccountTTL#8fc711d = AccountDaysTTL; -account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool; - -invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X; - -contacts.resolveUsername#bf0131c username:string = User; - -account.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode; -account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User; - messages.getStickers#ae22e045 emoticon:string hash:string = messages.Stickers; messages.getAllStickers#aa3bc868 hash:string = messages.AllStickers; - -account.updateDeviceLocked#38df3532 period:int = Bool; - -auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization; - messages.getWebPagePreview#25223e24 message:string = MessageMedia; - -account.getAuthorizations#e320c158 = account.Authorizations; -account.resetAuthorization#df77f3bc hash:long = Bool; -account.getPassword#548a30f5 = account.Password; -account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings; -account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool; - -auth.checkPassword#a63011e password_hash:bytes = auth.Authorization; -auth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery; -auth.recoverPassword#4ea56e92 code:string = auth.Authorization; - -invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X; - messages.exportChatInvite#7d885289 chat_id:int = ExportedChatInvite; messages.checkChatInvite#3eadb1bb hash:string = ChatInvite; messages.importChatInvite#6c50051c hash:string = Updates; @@ -744,5 +677,24 @@ messages.getStickerSet#2619a90e stickerset:InputStickerSet = messages.StickerSet messages.installStickerSet#7b30c3a6 stickerset:InputStickerSet disabled:Bool = Bool; messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool; messages.startBot#1b3e0ffc bot:InputUser chat_id:int random_id:long start_param:string = Updates; +messages.reportSpam#cf1592db peer:InputPeer = Bool; +updates.getState#edd4882a = updates.State; +updates.getDifference#a041495 pts:int date:int qts:int = updates.Difference; + +photos.updateProfilePhoto#eef579a0 id:InputPhoto crop:InputPhotoCrop = UserProfilePhoto; +photos.uploadProfilePhoto#d50f9c88 file:InputFile caption:string geo_point:InputGeoPoint crop:InputPhotoCrop = photos.Photo; +photos.deletePhotos#87cf7f2f id:Vector = Vector; +photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos; + +upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool; +upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File; +upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool; + +help.getConfig#c4f9186b = Config; +help.getNearestDc#1fb33026 = NearestDc; +help.getAppUpdate#c812ac7e device_model:string system_version:string app_version:string lang_code:string = help.AppUpdate; +help.saveAppLog#6f02f748 events:Vector = Bool; +help.getInviteText#a4a95186 lang_code:string = help.InviteText; +help.getSupport#9cdf08cd = help.Support; help.getAppChangelog#5bab7fb2 device_model:string system_version:string app_version:string lang_code:string = help.AppChangelog; diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 023b71e402..d8b9f185ef 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -299,7 +299,8 @@ void ProfileInner::blockDone(bool blocked, const MTPBool &result) { bool ProfileInner::blockFail(const RPCError &error) { if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false; - //_blockRequest = 0; + + _blockRequest = 0; return false; } diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 0e3a122b15..f7412a36ca 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -160,8 +160,7 @@ float64 gSongVolume = 0.9; SavedPeers gSavedPeers; SavedPeersByTime gSavedPeersByTime; -ReportSpamButtons gShowReportSpamButton; -ReportSpamButtons gNoReportSpamButton; +ReportSpamStatuses gReportSpamStatuses; void settingsParseArgs(int argc, char *argv[]) { #ifdef Q_OS_MAC diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index a138d0cb27..e2dfa9f422 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -317,8 +317,7 @@ typedef QMultiMap SavedPeersByTime; DeclareRefSetting(SavedPeers, SavedPeers); DeclareRefSetting(SavedPeersByTime, SavedPeersByTime); -typedef QMap ReportSpamButtons; -DeclareRefSetting(ReportSpamButtons, ShowReportSpamButton); -DeclareRefSetting(ReportSpamButtons, NoReportSpamButton); +typedef QMap ReportSpamStatuses; +DeclareRefSetting(ReportSpamStatuses, ReportSpamStatuses); void settingsParseArgs(int argc, char *argv[]); diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 377f922380..d88b1c2900 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -357,6 +357,13 @@ enum DBIPlatform { dbipLinux32 = 3, }; +enum DBIPeerReportSpamStatus { + dbiprsNoButton, + dbiprsUnknown, + dbiprsShowButton, + dbiprsReportSent, +}; + typedef enum { HitTestNone = 0, HitTestClient,