ApiScheme.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. /*
  2. * This is the source code of tgnet library v. 1.1
  3. * It is licensed under GNU GPL v. 2 or later.
  4. * You should have received a copy of the license in this archive (see LICENSE).
  5. *
  6. * Copyright Nikolai Kudashov, 2015-2018.
  7. */
  8. #ifndef APISCHEME_H
  9. #define APISCHEME_H
  10. #include <vector>
  11. #include <memory>
  12. #include "TLObject.h"
  13. class ByteArray;
  14. class NativeByteBuffer;
  15. class Bool : public TLObject {
  16. public:
  17. static Bool *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  18. };
  19. class TL_boolTrue : public Bool {
  20. public:
  21. static const uint32_t constructor = 0x997275b5;
  22. void serializeToStream(NativeByteBuffer *stream);
  23. };
  24. class TL_boolFalse : public Bool {
  25. public:
  26. static const uint32_t constructor = 0xbc799737;
  27. void serializeToStream(NativeByteBuffer *stream);
  28. };
  29. class TL_dcOption : public TLObject {
  30. public:
  31. static const uint32_t constructor = 0x18b7a10d;
  32. int32_t flags;
  33. bool ipv6;
  34. bool media_only;
  35. bool tcpo_only;
  36. bool cdn;
  37. bool isStatic;
  38. bool thisPortOnly;
  39. int32_t id;
  40. std::string ip_address;
  41. int32_t port;
  42. std::unique_ptr<ByteArray> secret;
  43. static TL_dcOption *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  44. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  45. void serializeToStream(NativeByteBuffer *stream);
  46. };
  47. class TL_cdnPublicKey : public TLObject {
  48. public:
  49. static const uint32_t constructor = 0xc982eaba;
  50. int32_t dc_id;
  51. std::string public_key;
  52. static TL_cdnPublicKey *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  53. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  54. void serializeToStream(NativeByteBuffer *stream);
  55. };
  56. class TL_cdnConfig : public TLObject {
  57. public:
  58. static const uint32_t constructor = 0x5725e40a;
  59. std::vector<std::unique_ptr<TL_cdnPublicKey>> public_keys;
  60. static TL_cdnConfig *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  61. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  62. void serializeToStream(NativeByteBuffer *stream);
  63. };
  64. class TL_help_getCdnConfig : public TLObject {
  65. public:
  66. static const uint32_t constructor = 0x52029342;
  67. bool isNeedLayer();
  68. TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  69. void serializeToStream(NativeByteBuffer *stream);
  70. };
  71. class Reaction : public TLObject {
  72. public:
  73. static Reaction *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  74. };
  75. class TL_config : public TLObject {
  76. public:
  77. static const uint32_t constructor = 0x232566ac;
  78. int32_t flags;
  79. int32_t date;
  80. int32_t expires;
  81. bool test_mode;
  82. int32_t this_dc;
  83. std::vector<std::unique_ptr<TL_dcOption>> dc_options;
  84. std::string dc_txt_domain_name;
  85. int32_t chat_size_max;
  86. int32_t megagroup_size_max;
  87. int32_t forwarded_count_max;
  88. int32_t online_update_period_ms;
  89. int32_t offline_blur_timeout_ms;
  90. int32_t offline_idle_timeout_ms;
  91. int32_t online_cloud_timeout_ms;
  92. int32_t notify_cloud_delay_ms;
  93. int32_t notify_default_delay_ms;
  94. int32_t push_chat_period_ms;
  95. int32_t push_chat_limit;
  96. int32_t saved_gifs_limit;
  97. int32_t edit_time_limit;
  98. int32_t revoke_time_limit;
  99. int32_t revoke_pm_time_limit;
  100. int32_t rating_e_decay;
  101. int32_t stickers_recent_limit;
  102. int32_t stickers_faved_limit;
  103. int32_t channels_read_media_period;
  104. int32_t tmp_sessions;
  105. int32_t pinned_dialogs_count_max;
  106. int32_t pinned_infolder_count_max;
  107. int32_t call_receive_timeout_ms;
  108. int32_t call_ring_timeout_ms;
  109. int32_t call_connect_timeout_ms;
  110. int32_t call_packet_timeout_ms;
  111. std::string me_url_prefix;
  112. std::string autoupdate_url_prefix;
  113. std::string gif_search_username;
  114. std::string venue_search_username;
  115. std::string img_search_username;
  116. std::string static_maps_provider;
  117. int32_t caption_length_max;
  118. int32_t message_length_max;
  119. int32_t webfile_dc_id;
  120. std::string suggested_lang_code;
  121. int32_t lang_pack_version;
  122. int32_t base_lang_pack_version;
  123. std::unique_ptr<Reaction> reactions_default;
  124. static TL_config *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  125. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  126. void serializeToStream(NativeByteBuffer *stream);
  127. };
  128. class TL_help_getConfig : public TLObject {
  129. public:
  130. static const uint32_t constructor = 0xc4f9186b;
  131. bool isNeedLayer();
  132. TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  133. void serializeToStream(NativeByteBuffer *stream);
  134. };
  135. class TL_account_registerDevice : public TLObject {
  136. public:
  137. static const uint32_t constructor = 0x637ea878;
  138. int32_t token_type;
  139. std::string token;
  140. bool isNeedLayer();
  141. TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  142. void serializeToStream(NativeByteBuffer *stream);
  143. };
  144. class UserStatus : public TLObject {
  145. public:
  146. int32_t expires;
  147. static UserStatus *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  148. };
  149. class TL_userStatusOffline : public UserStatus {
  150. public:
  151. static const uint32_t constructor = 0x8c703f;
  152. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  153. void serializeToStream(NativeByteBuffer *stream);
  154. };
  155. class TL_userStatusLastWeek : public UserStatus {
  156. public:
  157. static const uint32_t constructor = 0x7bf09fc;
  158. void serializeToStream(NativeByteBuffer *stream);
  159. };
  160. class TL_userStatusEmpty : public UserStatus {
  161. public:
  162. static const uint32_t constructor = 0x9d05049;
  163. void serializeToStream(NativeByteBuffer *stream);
  164. };
  165. class TL_userStatusLastMonth : public UserStatus {
  166. public:
  167. static const uint32_t constructor = 0x77ebc742;
  168. void serializeToStream(NativeByteBuffer *stream);
  169. };
  170. class TL_userStatusOnline : public UserStatus {
  171. public:
  172. static const uint32_t constructor = 0xedb93949;
  173. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  174. void serializeToStream(NativeByteBuffer *stream);
  175. };
  176. class TL_userStatusRecently : public UserStatus {
  177. public:
  178. static const uint32_t constructor = 0xe26f42f1;
  179. void serializeToStream(NativeByteBuffer *stream);
  180. };
  181. class FileLocation : public TLObject {
  182. public:
  183. int64_t volume_id;
  184. int32_t local_id;
  185. static FileLocation *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  186. };
  187. class TL_fileLocationToBeDeprecated : public FileLocation {
  188. public:
  189. static const uint32_t constructor = 0xbc7fc6cd;
  190. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  191. void serializeToStream(NativeByteBuffer *stream);
  192. };
  193. class UserProfilePhoto : public TLObject {
  194. public:
  195. int32_t flags;
  196. bool has_video;
  197. int64_t photo_id;
  198. std::unique_ptr<ByteArray> stripped_thumb;
  199. int32_t dc_id;
  200. static UserProfilePhoto *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  201. };
  202. class TL_userProfilePhotoEmpty : public UserProfilePhoto {
  203. public:
  204. static const uint32_t constructor = 0x4f11bae1;
  205. void serializeToStream(NativeByteBuffer *stream);
  206. };
  207. class TL_userProfilePhoto : public UserProfilePhoto {
  208. public:
  209. static const uint32_t constructor = 0x82d1f706;
  210. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  211. void serializeToStream(NativeByteBuffer *stream);
  212. };
  213. class TL_restrictionReason : public TLObject {
  214. public:
  215. static const uint32_t constructor = 0xd072acb4;
  216. std::string platform;
  217. std::string reason;
  218. std::string text;
  219. static TL_restrictionReason *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  220. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  221. void serializeToStream(NativeByteBuffer *stream);
  222. };
  223. class User : public TLObject {
  224. public:
  225. int64_t id;
  226. std::string first_name;
  227. std::string last_name;
  228. std::string username;
  229. int64_t access_hash;
  230. std::string phone;
  231. std::unique_ptr<UserProfilePhoto> photo;
  232. std::unique_ptr<UserStatus> status;
  233. int32_t flags;
  234. int32_t bot_info_version;
  235. std::vector<std::unique_ptr<TL_restrictionReason>> restriction_reason;
  236. std::string bot_inline_placeholder;
  237. std::string lang_code;
  238. static User *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  239. };
  240. class TL_userEmpty : public User {
  241. public:
  242. static const uint32_t constructor = 0xd3bc4b7a;
  243. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  244. void serializeToStream(NativeByteBuffer *stream);
  245. };
  246. class TL_user : public User {
  247. public:
  248. static const uint32_t constructor = 0x5d99adee;
  249. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  250. void serializeToStream(NativeByteBuffer *stream);
  251. };
  252. class InputPeer : public TLObject {
  253. public:
  254. int64_t user_id;
  255. int64_t chat_id;
  256. int64_t channel_id;
  257. int64_t access_hash;
  258. static InputPeer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  259. };
  260. class TL_inputPeerSelf : public InputPeer {
  261. public:
  262. static const uint32_t constructor = 0x7da07ec9;
  263. void serializeToStream(NativeByteBuffer *stream);
  264. };
  265. class TL_inputPeerUser : public InputPeer {
  266. public:
  267. static const uint32_t constructor = 0xdde8a54c;
  268. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  269. void serializeToStream(NativeByteBuffer *stream);
  270. };
  271. class TL_inputPeerChat : public InputPeer {
  272. public:
  273. static const uint32_t constructor = 0x35a95cb9;
  274. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  275. void serializeToStream(NativeByteBuffer *stream);
  276. };
  277. class TL_inputPeerUserFromMessage : public InputPeer {
  278. public:
  279. static const uint32_t constructor = 0xa87b0a1c;
  280. std::unique_ptr<InputPeer> peer;
  281. int32_t msg_id;
  282. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  283. void serializeToStream(NativeByteBuffer *stream);
  284. };
  285. class TL_inputPeerChannelFromMessage : public InputPeer {
  286. public:
  287. static const uint32_t constructor = 0xbd2a0840;
  288. std::unique_ptr<InputPeer> peer;
  289. int32_t msg_id;
  290. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  291. void serializeToStream(NativeByteBuffer *stream);
  292. };
  293. class TL_inputPeerChannel : public InputPeer {
  294. public:
  295. static const uint32_t constructor = 0x27bcbbfc;
  296. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  297. void serializeToStream(NativeByteBuffer *stream);
  298. };
  299. class TL_inputPeerEmpty : public InputPeer {
  300. public:
  301. static const uint32_t constructor = 0x7f3b18ea;
  302. void serializeToStream(NativeByteBuffer *stream);
  303. };
  304. class InputUser : public TLObject {
  305. public:
  306. int64_t user_id;
  307. int64_t access_hash;
  308. static InputUser *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  309. };
  310. class TL_inputUserSelf : public InputUser {
  311. public:
  312. static const uint32_t constructor = 0xf7c1b13f;
  313. void serializeToStream(NativeByteBuffer *stream);
  314. };
  315. class TL_inputUser : public InputUser {
  316. public:
  317. static const uint32_t constructor = 0xf21158c6;
  318. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  319. void serializeToStream(NativeByteBuffer *stream);
  320. };
  321. class TL_inputUserEmpty : public InputUser {
  322. public:
  323. static const uint32_t constructor = 0xb98886cf;
  324. void serializeToStream(NativeByteBuffer *stream);
  325. };
  326. class TL_inputUserFromMessage : public InputUser {
  327. public:
  328. static const uint32_t constructor = 0x1da448e2;
  329. std::unique_ptr<InputPeer> peer;
  330. int32_t msg_id;
  331. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  332. void serializeToStream(NativeByteBuffer *stream);
  333. };
  334. class MessageEntity : public TLObject {
  335. public:
  336. int32_t offset;
  337. int32_t length;
  338. std::string url;
  339. std::string language;
  340. static MessageEntity *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  341. };
  342. class TL_messageEntityTextUrl : public MessageEntity {
  343. public:
  344. static const uint32_t constructor = 0x76a6d327;
  345. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  346. void serializeToStream(NativeByteBuffer *stream);
  347. };
  348. class TL_messageEntityBotCommand : public MessageEntity {
  349. public:
  350. static const uint32_t constructor = 0x6cef8ac7;
  351. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  352. void serializeToStream(NativeByteBuffer *stream);
  353. };
  354. class TL_messageEntityEmail : public MessageEntity {
  355. public:
  356. static const uint32_t constructor = 0x64e475c2;
  357. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  358. void serializeToStream(NativeByteBuffer *stream);
  359. };
  360. class TL_messageEntityPre : public MessageEntity {
  361. public:
  362. static const uint32_t constructor = 0x73924be0;
  363. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  364. void serializeToStream(NativeByteBuffer *stream);
  365. };
  366. class TL_messageEntityUnknown : public MessageEntity {
  367. public:
  368. static const uint32_t constructor = 0xbb92ba95;
  369. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  370. void serializeToStream(NativeByteBuffer *stream);
  371. };
  372. class TL_messageEntityUrl : public MessageEntity {
  373. public:
  374. static const uint32_t constructor = 0x6ed02538;
  375. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  376. void serializeToStream(NativeByteBuffer *stream);
  377. };
  378. class TL_messageEntityItalic : public MessageEntity {
  379. public:
  380. static const uint32_t constructor = 0x826f8b60;
  381. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  382. void serializeToStream(NativeByteBuffer *stream);
  383. };
  384. class TL_messageEntityMention : public MessageEntity {
  385. public:
  386. static const uint32_t constructor = 0xfa04579d;
  387. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  388. void serializeToStream(NativeByteBuffer *stream);
  389. };
  390. class TL_messageEntityMentionName : public MessageEntity {
  391. public:
  392. static const uint32_t constructor = 0xdc7b1140;
  393. int64_t user_id;
  394. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  395. void serializeToStream(NativeByteBuffer *stream);
  396. };
  397. class TL_inputMessageEntityMentionName : public MessageEntity {
  398. public:
  399. static const uint32_t constructor = 0x208e68c9;
  400. std::unique_ptr<InputUser> user_id;
  401. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  402. void serializeToStream(NativeByteBuffer *stream);
  403. };
  404. class TL_messageEntityCashtag : public MessageEntity {
  405. public:
  406. static const uint32_t constructor = 0x4c4e743f;
  407. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  408. void serializeToStream(NativeByteBuffer *stream);
  409. };
  410. class TL_messageEntityBold : public MessageEntity {
  411. public:
  412. static const uint32_t constructor = 0xbd610bc9;
  413. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  414. void serializeToStream(NativeByteBuffer *stream);
  415. };
  416. class TL_messageEntityHashtag : public MessageEntity {
  417. public:
  418. static const uint32_t constructor = 0x6f635b0d;
  419. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  420. void serializeToStream(NativeByteBuffer *stream);
  421. };
  422. class TL_messageEntityCode : public MessageEntity {
  423. public:
  424. static const uint32_t constructor = 0x28a20571;
  425. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  426. void serializeToStream(NativeByteBuffer *stream);
  427. };
  428. class TL_messageEntityStrike : public MessageEntity {
  429. public:
  430. static const uint32_t constructor = 0xbf0693d4;
  431. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  432. void serializeToStream(NativeByteBuffer *stream);
  433. };
  434. class TL_messageEntityBlockquote : public MessageEntity {
  435. public:
  436. static const uint32_t constructor = 0x20df5d0;
  437. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  438. void serializeToStream(NativeByteBuffer *stream);
  439. };
  440. class TL_messageEntityUnderline : public MessageEntity {
  441. public:
  442. static const uint32_t constructor = 0x9c4e7e8b;
  443. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  444. void serializeToStream(NativeByteBuffer *stream);
  445. };
  446. class TL_messageEntityPhone : public MessageEntity {
  447. public:
  448. static const uint32_t constructor = 0x9b69e34b;
  449. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  450. void serializeToStream(NativeByteBuffer *stream);
  451. };
  452. class TL_dataJSON : public TLObject {
  453. public:
  454. static const uint32_t constructor = 0x7d748d04;
  455. std::string data;
  456. static TL_dataJSON *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  457. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  458. void serializeToStream(NativeByteBuffer *stream);
  459. };
  460. class TL_help_termsOfService : public TLObject {
  461. public:
  462. static const uint32_t constructor = 0x780a0310;
  463. int32_t flags;
  464. bool popup;
  465. std::unique_ptr<TL_dataJSON> id;
  466. std::string text;
  467. std::vector<std::unique_ptr<MessageEntity>> entities;
  468. int32_t min_age_confirm;
  469. static TL_help_termsOfService *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  470. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  471. void serializeToStream(NativeByteBuffer *stream);
  472. };
  473. class auth_Authorization : public TLObject {
  474. public:
  475. static auth_Authorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  476. };
  477. class TL_auth_authorizationSignUpRequired : public auth_Authorization {
  478. public:
  479. static const uint32_t constructor = 0x44747e9a;
  480. int32_t flags;
  481. std::unique_ptr<TL_help_termsOfService> terms_of_service;
  482. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  483. void serializeToStream(NativeByteBuffer *stream);
  484. };
  485. class TL_auth_authorization : public auth_Authorization {
  486. public:
  487. static const uint32_t constructor = 0x33fb7bb8;
  488. int32_t flags;
  489. int32_t tmp_sessions;
  490. std::unique_ptr<User> user;
  491. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  492. void serializeToStream(NativeByteBuffer *stream);
  493. };
  494. class TL_auth_exportedAuthorization : public TLObject {
  495. public:
  496. static const uint32_t constructor = 0xb434e2b8;
  497. int64_t id;
  498. std::unique_ptr<ByteArray> bytes;
  499. static TL_auth_exportedAuthorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  500. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  501. };
  502. class TL_auth_exportAuthorization : public TLObject {
  503. public:
  504. static const uint32_t constructor = 0xe5bfffcd;
  505. int32_t dc_id;
  506. bool isNeedLayer();
  507. TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  508. void serializeToStream(NativeByteBuffer *stream);
  509. };
  510. class TL_auth_importAuthorization : public TLObject {
  511. public:
  512. static const uint32_t constructor = 0xa57a7dad;
  513. int64_t id;
  514. std::unique_ptr<ByteArray> bytes;
  515. bool isNeedLayer();
  516. TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  517. void serializeToStream(NativeByteBuffer *stream);
  518. };
  519. class TL_updatesTooLong : public TLObject {
  520. public:
  521. static const uint32_t constructor = 0xe317af7e;
  522. void serializeToStream(NativeByteBuffer *stream);
  523. };
  524. class TL_reactionCustomEmoji : public Reaction {
  525. public:
  526. static const uint32_t constructor = 0x8935fc73;
  527. int64_t document_id;
  528. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  529. void serializeToStream(NativeByteBuffer *stream);
  530. };
  531. class TL_reactionEmoji : public Reaction {
  532. public:
  533. static const uint32_t constructor = 0x1b2286b8;
  534. std::string emoticon;
  535. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  536. void serializeToStream(NativeByteBuffer *stream);
  537. };
  538. class TL_reactionEmpty : public Reaction {
  539. public:
  540. static const uint32_t constructor = 0x79f5d419;
  541. void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  542. void serializeToStream(NativeByteBuffer *stream);
  543. };
  544. #endif