diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index 21c131cad3..53c19b62c8 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -47,6 +47,10 @@ dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer; dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer; +destroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes; +destroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes; +destroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes; + ---functions--- req_pq#60469778 nonce:int128 = ResPQ; @@ -55,6 +59,8 @@ req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer; +destroy_auth_key#d1435160 = DestroyAuthKeyRes; + /////////////////////////////// ////////////// System messages /////////////////////////////// diff --git a/Telegram/SourceFiles/mtproto/scheme_auto.cpp b/Telegram/SourceFiles/mtproto/scheme_auto.cpp index 418e1b58f3..00dbcf9f89 100644 --- a/Telegram/SourceFiles/mtproto/scheme_auto.cpp +++ b/Telegram/SourceFiles/mtproto/scheme_auto.cpp @@ -169,6 +169,18 @@ void _serialize_dh_gen_fail(MTPStringLogger &to, int32 stage, int32 lev, Types & } } +void _serialize_destroy_auth_key_ok(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 iflag) { + to.add("{ destroy_auth_key_ok }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + +void _serialize_destroy_auth_key_none(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 iflag) { + to.add("{ destroy_auth_key_none }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + +void _serialize_destroy_auth_key_fail(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 iflag) { + to.add("{ destroy_auth_key_fail }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + void _serialize_msgs_ack(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 iflag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -6932,6 +6944,10 @@ void _serialize_set_client_DH_params(MTPStringLogger &to, int32 stage, int32 lev } } +void _serialize_destroy_auth_key(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 iflag) { + to.add("{ destroy_auth_key }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + void _serialize_rpc_drop_answer(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 iflag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -9795,6 +9811,9 @@ namespace { _serializers.insert(mtpc_dh_gen_ok, _serialize_dh_gen_ok); _serializers.insert(mtpc_dh_gen_retry, _serialize_dh_gen_retry); _serializers.insert(mtpc_dh_gen_fail, _serialize_dh_gen_fail); + _serializers.insert(mtpc_destroy_auth_key_ok, _serialize_destroy_auth_key_ok); + _serializers.insert(mtpc_destroy_auth_key_none, _serialize_destroy_auth_key_none); + _serializers.insert(mtpc_destroy_auth_key_fail, _serialize_destroy_auth_key_fail); _serializers.insert(mtpc_msgs_ack, _serialize_msgs_ack); _serializers.insert(mtpc_bad_msg_notification, _serialize_bad_msg_notification); _serializers.insert(mtpc_bad_server_salt, _serialize_bad_server_salt); @@ -10328,6 +10347,7 @@ namespace { _serializers.insert(mtpc_req_pq, _serialize_req_pq); _serializers.insert(mtpc_req_DH_params, _serialize_req_DH_params); _serializers.insert(mtpc_set_client_DH_params, _serialize_set_client_DH_params); + _serializers.insert(mtpc_destroy_auth_key, _serialize_destroy_auth_key); _serializers.insert(mtpc_rpc_drop_answer, _serialize_rpc_drop_answer); _serializers.insert(mtpc_get_future_salts, _serialize_get_future_salts); _serializers.insert(mtpc_ping, _serialize_ping); diff --git a/Telegram/SourceFiles/mtproto/scheme_auto.h b/Telegram/SourceFiles/mtproto/scheme_auto.h index 040b36e0dd..a47333f795 100644 --- a/Telegram/SourceFiles/mtproto/scheme_auto.h +++ b/Telegram/SourceFiles/mtproto/scheme_auto.h @@ -48,9 +48,13 @@ enum { mtpc_dh_gen_ok = 0x3bcbf734, mtpc_dh_gen_retry = 0x46dc1fb9, mtpc_dh_gen_fail = 0xa69dae02, + mtpc_destroy_auth_key_ok = 0xf660e1d4, + mtpc_destroy_auth_key_none = 0xa9f2259, + mtpc_destroy_auth_key_fail = 0xea109b13, mtpc_req_pq = 0x60469778, mtpc_req_DH_params = 0xd712e4be, mtpc_set_client_DH_params = 0xf5045f1f, + mtpc_destroy_auth_key = 0xd1435160, mtpc_msgs_ack = 0x62d6b459, mtpc_bad_msg_notification = 0xa7eff811, mtpc_bad_server_salt = 0xedab447b, @@ -807,6 +811,8 @@ class MTPDdh_gen_ok; class MTPDdh_gen_retry; class MTPDdh_gen_fail; +class MTPdestroyAuthKeyRes; + class MTPmsgsAck; class MTPDmsgs_ack; @@ -1577,6 +1583,7 @@ typedef MTPBoxed MTPServer_DH_Params; typedef MTPBoxed MTPServer_DH_inner_data; typedef MTPBoxed MTPClient_DH_Inner_Data; typedef MTPBoxed MTPSet_client_DH_params_answer; +typedef MTPBoxed MTPDestroyAuthKeyRes; typedef MTPBoxed MTPMsgsAck; typedef MTPBoxed MTPBadMsgNotification; typedef MTPBoxed MTPMsgsStateReq; @@ -1992,6 +1999,30 @@ private: }; typedef MTPBoxed MTPSet_client_DH_params_answer; +class MTPdestroyAuthKeyRes { +public: + MTPdestroyAuthKeyRes() : _type(0) { + } + MTPdestroyAuthKeyRes(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { + read(from, end, cons); + } + + uint32 innerLength() const; + mtpTypeId type() const; + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); + void write(mtpBuffer &to) const; + + typedef void ResponseType; + +private: + explicit MTPdestroyAuthKeyRes(mtpTypeId type); + + friend class MTP::internal::TypeCreator; + + mtpTypeId _type; +}; +typedef MTPBoxed MTPDestroyAuthKeyRes; + class MTPmsgsAck : private mtpDataOwner { public: MTPmsgsAck(); @@ -16496,6 +16527,37 @@ public: } }; +class MTPdestroy_auth_key { // RPC method 'destroy_auth_key' +public: + MTPdestroy_auth_key() { + } + MTPdestroy_auth_key(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_destroy_auth_key) { + read(from, end, cons); + } + + uint32 innerLength() const { + return 0; + } + mtpTypeId type() const { + return mtpc_destroy_auth_key; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_destroy_auth_key) { + } + void write(mtpBuffer &to) const { + } + + typedef MTPDestroyAuthKeyRes ResponseType; +}; +class MTPDestroy_auth_key : public MTPBoxed { +public: + MTPDestroy_auth_key() { + } + MTPDestroy_auth_key(const MTPdestroy_auth_key &v) : MTPBoxed(v) { + } + MTPDestroy_auth_key(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } +}; + class MTPrpc_drop_answer { // RPC method 'rpc_drop_answer' public: MTPlong vreq_msg_id; @@ -25468,6 +25530,15 @@ public: inline static MTPset_client_DH_params_answer new_dh_gen_fail(const MTPint128 &_nonce, const MTPint128 &_server_nonce, const MTPint128 &_new_nonce_hash3) { return MTPset_client_DH_params_answer(new MTPDdh_gen_fail(_nonce, _server_nonce, _new_nonce_hash3)); } + inline static MTPdestroyAuthKeyRes new_destroy_auth_key_ok() { + return MTPdestroyAuthKeyRes(mtpc_destroy_auth_key_ok); + } + inline static MTPdestroyAuthKeyRes new_destroy_auth_key_none() { + return MTPdestroyAuthKeyRes(mtpc_destroy_auth_key_none); + } + inline static MTPdestroyAuthKeyRes new_destroy_auth_key_fail() { + return MTPdestroyAuthKeyRes(mtpc_destroy_auth_key_fail); + } inline static MTPmsgsAck new_msgs_ack(const MTPVector &_msg_ids) { return MTPmsgsAck(new MTPDmsgs_ack(_msg_ids)); } @@ -27367,6 +27438,41 @@ inline MTPset_client_DH_params_answer MTP_dh_gen_fail(const MTPint128 &_nonce, c return MTP::internal::TypeCreator::new_dh_gen_fail(_nonce, _server_nonce, _new_nonce_hash3); } +inline uint32 MTPdestroyAuthKeyRes::innerLength() const { + return 0; +} +inline mtpTypeId MTPdestroyAuthKeyRes::type() const { + t_assert(_type != 0); + return _type; +} +inline void MTPdestroyAuthKeyRes::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { + switch (cons) { + case mtpc_destroy_auth_key_ok: _type = cons; break; + case mtpc_destroy_auth_key_none: _type = cons; break; + case mtpc_destroy_auth_key_fail: _type = cons; break; + default: throw mtpErrorUnexpected(cons, "MTPdestroyAuthKeyRes"); + } +} +inline void MTPdestroyAuthKeyRes::write(mtpBuffer &to) const { +} +inline MTPdestroyAuthKeyRes::MTPdestroyAuthKeyRes(mtpTypeId type) : _type(type) { + switch (type) { + case mtpc_destroy_auth_key_ok: break; + case mtpc_destroy_auth_key_none: break; + case mtpc_destroy_auth_key_fail: break; + default: throw mtpErrorBadTypeId(type, "MTPdestroyAuthKeyRes"); + } +} +inline MTPdestroyAuthKeyRes MTP_destroy_auth_key_ok() { + return MTP::internal::TypeCreator::new_destroy_auth_key_ok(); +} +inline MTPdestroyAuthKeyRes MTP_destroy_auth_key_none() { + return MTP::internal::TypeCreator::new_destroy_auth_key_none(); +} +inline MTPdestroyAuthKeyRes MTP_destroy_auth_key_fail() { + return MTP::internal::TypeCreator::new_destroy_auth_key_fail(); +} + inline MTPmsgsAck::MTPmsgsAck() : mtpDataOwner(new MTPDmsgs_ack()) { }