| 6 |
| * Copyright Nikolai Kudashov, 2015-2018. |
| 7 | */ |
| 8 |
| 9 | #ifndef APISCHEME_H |
| 10 | #define APISCHEME_H |
| 11 |
| 12 | #include <vector> |
| 13 | #include <memory> |
| 14 | #include "TLObject.h" |
| 15 |
| 16 | class ByteArray; |
| 17 | class NativeByteBuffer; |
| 18 |
| 19 | class Bool : public TLObject { |
| 20 |
| 21 | public: |
| 22 | static Bool *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 23 | }; |
| 24 |
| 25 | class TL_boolTrue : public Bool { |
| 26 |
| 27 | public: |
| 28 | static const uint32_t constructor = 0x997275b5; |
| 29 |
| 30 | void serializeToStream(NativeByteBuffer *stream); |
| 31 | }; |
| 32 |
| 33 | class TL_boolFalse : public Bool { |
| 34 |
| 35 | public: |
| 36 | static const uint32_t constructor = 0xbc799737; |
| 37 |
| 38 | void serializeToStream(NativeByteBuffer *stream); |
| 39 | }; |
| 40 |
| 41 | class TL_dcOption : public TLObject { |
| 42 |
| 43 | public: |
| 44 | static const uint32_t constructor = 0x18b7a10d; |
| 45 |
| 46 | int32_t flags; |
| 47 | bool ipv6; |
| 48 | bool media_only; |
| 49 | bool tcpo_only; |
| 50 | bool cdn; |
| 51 | bool isStatic; |
| 52 | bool thisPortOnly; |
| 53 | bool force_try_ipv6; |
| 54 | int32_t id; |
| 55 | std::string ip_address; |
| 56 | int32_t port; |
| 57 | std::unique_ptr<ByteArray> secret; |
| 58 |
| 59 | static TL_dcOption *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 60 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 61 | void serializeToStream(NativeByteBuffer *stream); |
| 62 | }; |
| 63 |
| 64 | class TL_cdnPublicKey : public TLObject { |
| 65 |
| 66 | public: |
| 67 | static const uint32_t constructor = 0xc982eaba; |
| 68 |
| 69 | int32_t dc_id; |
| 70 | std::string public_key; |
| 71 |
| 72 | static TL_cdnPublicKey *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 73 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 74 | void serializeToStream(NativeByteBuffer *stream); |
| 75 | }; |
| 76 |
| 77 | class TL_cdnConfig : public TLObject { |
| 78 |
| 79 | public: |
| 80 | static const uint32_t constructor = 0x5725e40a; |
| 81 |
| 82 | std::vector<std::unique_ptr<TL_cdnPublicKey>> public_keys; |
| 83 |
| 84 | static TL_cdnConfig *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 85 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 86 | void serializeToStream(NativeByteBuffer *stream); |
| 87 | }; |
| 88 |
| 89 | class TL_help_getCdnConfig : public TLObject { |
| 90 |
| 91 | public: |
| 92 | static const uint32_t constructor = 0x52029342; |
| 93 |
| 94 | bool isNeedLayer(); |
| 95 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 96 | void serializeToStream(NativeByteBuffer *stream); |
| 97 | }; |
| 98 |
| 99 | class Reaction : public TLObject { |
| 100 |
| 101 | public: |
| 102 | static Reaction *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 103 | }; |
| 104 |
| 105 |
| 106 | class TL_config : public TLObject { |
| 107 |
| 108 | public: |
| 109 | static const uint32_t constructor = 0xcc1a241e; |
| 110 |
| 111 | int32_t flags; |
| 112 | int32_t date; |
| 113 | int32_t expires; |
| 114 | bool test_mode; |
| 115 | int32_t this_dc; |
| 116 | std::vector<std::unique_ptr<TL_dcOption>> dc_options; |
| 117 | std::string dc_txt_domain_name; |
| 118 | int32_t chat_size_max; |
| 119 | int32_t megagroup_size_max; |
| 120 | int32_t forwarded_count_max; |
| 121 | int32_t online_update_period_ms; |
| 122 | int32_t offline_blur_timeout_ms; |
| 123 | int32_t offline_idle_timeout_ms; |
| 124 | int32_t online_cloud_timeout_ms; |
| 125 | int32_t notify_cloud_delay_ms; |
| 126 | int32_t notify_default_delay_ms; |
| 127 | int32_t push_chat_period_ms; |
| 128 | int32_t push_chat_limit; |
| 129 | // int32_t saved_gifs_limit; |
| 130 | int32_t edit_time_limit; |
| 131 | int32_t revoke_time_limit; |
| 132 | int32_t revoke_pm_time_limit; |
| 133 | int32_t rating_e_decay; |
| 134 | int32_t stickers_recent_limit; |
| 135 | // int32_t stickers_faved_limit; |
| 136 | int32_t channels_read_media_period; |
| 137 | int32_t tmp_sessions; |
| 138 | // int32_t pinned_dialogs_count_max; |
| 139 | // int32_t pinned_infolder_count_max; |
| 140 | int32_t call_receive_timeout_ms; |
| 141 | int32_t call_ring_timeout_ms; |
| 142 | int32_t call_connect_timeout_ms; |
| 143 | int32_t call_packet_timeout_ms; |
| 144 | std::string me_url_prefix; |
| 145 | std::string autoupdate_url_prefix; |
| 146 | std::string gif_search_username; |
| 147 | std::string venue_search_username; |
| 148 | std::string img_search_username; |
| 149 | std::string static_maps_provider; |
| 150 | int32_t caption_length_max; |
| 151 | int32_t message_length_max; |
| 152 | int32_t webfile_dc_id; |
| 153 | std::string suggested_lang_code; |
| 154 | int32_t lang_pack_version; |
| 155 | int32_t base_lang_pack_version; |
| 156 | std::unique_ptr<Reaction> reactions_default; |
| 157 | std::string autologin_token; |
| 158 |
| 159 | static TL_config *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 160 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 161 | void serializeToStream(NativeByteBuffer *stream); |
| 162 | }; |
| 163 |
| 164 | class TL_help_getConfig : public TLObject { |
| 165 |
| 166 | public: |
| 167 | static const uint32_t constructor = 0xc4f9186b; |
| 168 |
| 169 | bool isNeedLayer(); |
| 170 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 171 | void serializeToStream(NativeByteBuffer *stream); |
| 172 | }; |
| 173 |
| 174 | class TL_account_registerDevice : public TLObject { |
| 175 |
| 176 | public: |
| 177 | static const uint32_t constructor = 0x637ea878; |
| 178 |
| 179 | int32_t token_type; |
| 180 | std::string token; |
| 181 |
| 182 | bool isNeedLayer(); |
| 183 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 184 | void serializeToStream(NativeByteBuffer *stream); |
| 185 | }; |
| 186 |
| 187 | class UserStatus : public TLObject { |
| 188 |
| 189 | public: |
| 190 | int32_t expires; |
| 191 |
| 192 | static UserStatus *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 193 | }; |
| 194 |
| 195 | class TL_userStatusOffline : public UserStatus { |
| 196 |
| 197 | public: |
| 198 | static const uint32_t constructor = 0x8c703f; |
| 199 |
| 200 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 201 | void serializeToStream(NativeByteBuffer *stream); |
| 202 | }; |
| 203 |
| 204 | class TL_userStatusLastWeek : public UserStatus { |
| 205 |
| 206 | public: |
| 207 | static const uint32_t constructor = 0x7bf09fc; |
| 208 |
| 209 | uint32_t flags; |
| 210 | bool by_me; |
| 211 |
| 212 | void serializeToStream(NativeByteBuffer *stream); |
| 213 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 214 | }; |
| 215 |
| 216 | class TL_userStatusLastWeek_layer171 : public UserStatus { |
| 217 |
| 218 | public: |
| 219 | static const uint32_t constructor = 0x7bf09fc; |
| 220 |
| 221 | void serializeToStream(NativeByteBuffer *stream); |
| 222 | }; |
| 223 |
| 224 | class TL_userStatusEmpty : public UserStatus { |
| 225 |
| 226 | public: |
| 227 | static const uint32_t constructor = 0x9d05049; |
| 228 |
| 229 | void serializeToStream(NativeByteBuffer *stream); |
| 230 | }; |
| 231 |
| 232 | class TL_userStatusLastMonth : public UserStatus { |
| 233 |
| 234 | public: |
| 235 | static const uint32_t constructor = 0x65899777; |
| 236 |
| 237 | uint32_t flags; |
| 238 | bool by_me; |
| 239 |
| 240 | void serializeToStream(NativeByteBuffer *stream); |
| 241 |
| 242 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 243 | }; |
| 244 |
| 245 | class TL_userStatusLastMonth_layer171 : public UserStatus { |
| 246 |
| 247 | public: |
| 248 | static const uint32_t constructor = 0x77ebc742; |
| 249 |
| 250 | void serializeToStream(NativeByteBuffer *stream); |
| 251 | }; |
| 252 |
| 253 | class TL_userStatusOnline : public UserStatus { |
| 254 |
| 255 | public: |
| 256 | static const uint32_t constructor = 0xedb93949; |
| 257 |
| 258 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 259 | void serializeToStream(NativeByteBuffer *stream); |
| 260 | }; |
| 261 |
| 262 | class TL_userStatusRecently : public UserStatus { |
| 263 |
| 264 | public: |
| 265 | static const uint32_t constructor = 0x7b197dc8; |
| 266 |
| 267 | uint32_t flags; |
| 268 | bool by_me; |
| 269 |
| 270 | void serializeToStream(NativeByteBuffer *stream); |
| 271 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 272 | }; |
| 273 |
| 274 | class TL_userStatusRecently_layer171 : public UserStatus { |
| 275 |
| 276 | public: |
| 277 | static const uint32_t constructor = 0xe26f42f1; |
| 278 |
| 279 | void serializeToStream(NativeByteBuffer *stream); |
| 280 | }; |
| 281 |
| 282 | class TL_userStatusHidden : public UserStatus { |
| 283 |
| 284 | public: |
| 285 | static const uint32_t constructor = 0xcf7d64b1; |
| 286 |
| 287 | void serializeToStream(NativeByteBuffer *stream); |
| 288 | }; |
| 289 |
| 290 | class FileLocation : public TLObject { |
| 291 |
| 292 | public: |
| 293 | int64_t volume_id; |
| 294 | int32_t local_id; |
| 295 |
| 296 | static FileLocation *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 297 | }; |
| 298 |
| 299 | class TL_fileLocationToBeDeprecated : public FileLocation { |
| 300 |
| 301 | public: |
| 302 | static const uint32_t constructor = 0xbc7fc6cd; |
| 303 |
| 304 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 305 | void serializeToStream(NativeByteBuffer *stream); |
| 306 | }; |
| 307 |
| 308 | class UserProfilePhoto : public TLObject { |
| 309 |
| 310 | public: |
| 311 | int32_t flags; |
| 312 | bool has_video; |
| 313 | int64_t photo_id; |
| 314 | std::unique_ptr<ByteArray> stripped_thumb; |
| 315 | int32_t dc_id; |
| 316 |
| 317 | static UserProfilePhoto *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 318 | }; |
| 319 |
| 320 | class TL_userProfilePhotoEmpty : public UserProfilePhoto { |
| 321 |
| 322 | public: |
| 323 | static const uint32_t constructor = 0x4f11bae1; |
| 324 |
| 325 | void serializeToStream(NativeByteBuffer *stream); |
| 326 | }; |
| 327 |
| 328 | class TL_userProfilePhoto : public UserProfilePhoto { |
| 329 |
| 330 | public: |
| 331 | static const uint32_t constructor = 0x82d1f706; |
| 332 |
| 333 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 334 | void serializeToStream(NativeByteBuffer *stream); |
| 335 | }; |
| 336 |
| 337 | class TL_restrictionReason : public TLObject { |
| 338 |
| 339 | public: |
| 340 | static const uint32_t constructor = 0xd072acb4; |
| 341 |
| 342 | std::string platform; |
| 343 | std::string reason; |
| 344 | std::string text; |
| 345 |
| 346 | static TL_restrictionReason *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 347 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 348 | void serializeToStream(NativeByteBuffer *stream); |
| 349 | }; |
| 350 |
| 351 | class TL_recentStory : public TLObject { |
| 352 |
| 353 | public: |
| 354 | static const uint32_t constructor = 0x711d692d; |
| 355 |
| 356 | int32_t flags; |
| 357 | bool is_live; |
| 358 | int32_t max_id; |
| 359 |
| 360 | static TL_recentStory *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 361 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 362 | void serializeToStream(NativeByteBuffer *stream); |
| 363 | }; |
| 364 |
| 365 | class TL_username : public TLObject { |
| 366 |
| 367 | public: |
| 368 | static const uint32_t constructor = 0xb4073647; |
| 369 | int32_t flags; |
| 370 | bool editable; |
| 371 | bool active; |
| 372 | std::string username; |
| 373 |
| 374 | static TL_username *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 375 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 376 | void serializeToStream(NativeByteBuffer *stream); |
| 377 | }; |
| 378 |
| 379 | class TL_peerColor : public TLObject { |
| 380 | public: |
| 381 | static const uint32_t constructor = 0xb54b5acf; |
| 382 |
| 383 | int32_t flags; |
| 384 | int32_t color; |
| 385 | int64_t background_emoji_id; |
| 386 |
| 387 | static TL_peerColor *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 388 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 389 | void serializeToStream(NativeByteBuffer *stream); |
| 390 | }; |
| 391 |
| 392 | class EmojiStatus : public TLObject { |
| 393 | public: |
| 394 | static EmojiStatus *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 395 | }; |
| 396 |
| 397 | class TL_emojiStatusEmpty : public EmojiStatus { |
| 398 | public: |
| 399 | static const uint32_t constructor = 0xb54b5acf; |
| 400 |
| 401 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 402 | void serializeToStream(NativeByteBuffer *stream); |
| 403 | }; |
| 404 |
| 405 | class TL_emojiStatus : public EmojiStatus { |
| 406 | public: |
| 407 | static const uint32_t constructor = 0xe7ff068a; |
| 408 |
| 409 | int32_t flags; |
| 410 | int64_t document_id; |
| 411 | int32_t until; |
| 412 |
| 413 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 414 | void serializeToStream(NativeByteBuffer *stream); |
| 415 | }; |
| 416 |
| 417 | class TL_emojiStatus_layer197 : public EmojiStatus { |
| 418 | public: |
| 419 | static const uint32_t constructor = 0x929b619d; |
| 420 |
| 421 | int64_t document_id; |
| 422 |
| 423 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 424 | void serializeToStream(NativeByteBuffer *stream); |
| 425 | }; |
| 426 |
| 427 | class TL_emojiStatusUntil_layer197 : public EmojiStatus { |
| 428 | public: |
| 429 | static const uint32_t constructor = 0xfa30a8c7; |
| 430 |
| 431 | int64_t document_id; |
| 432 | int32_t until; |
| 433 |
| 434 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 435 | void serializeToStream(NativeByteBuffer *stream); |
| 436 | }; |
| 437 |
| 438 | class TL_emojiStatusCollectible : public EmojiStatus { |
| 439 | public: |
| 440 | static const uint32_t constructor = 0x7184603b; |
| 441 |
| 442 | int32_t flags; |
| 443 | int64_t collectible_id; |
| 444 | int64_t document_id; |
| 445 | std::string title; |
| 446 | std::string slug; |
| 447 | int64_t pattern_document_id; |
| 448 | int32_t center_color; |
| 449 | int32_t edge_color; |
| 450 | int32_t pattern_color; |
| 451 | int32_t text_color; |
| 452 | int32_t until; |
| 453 |
| 454 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 455 | void serializeToStream(NativeByteBuffer *stream); |
| 456 | }; |
| 457 |
| 458 | class User : public TLObject { |
| 459 |
| 460 | public: |
| 461 | int64_t id; |
| 462 | std::string first_name; |
| 463 | std::string last_name; |
| 464 | std::string username; |
| 465 | int64_t access_hash; |
| 466 | std::string phone; |
| 467 | std::unique_ptr<UserProfilePhoto> photo; |
| 468 | std::unique_ptr<UserStatus> status; |
| 469 | int32_t flags; |
| 470 | int32_t flags2; |
| 471 | int32_t bot_info_version; |
| 472 | std::vector<std::unique_ptr<TL_restrictionReason>> restriction_reason; |
| 473 | std::string bot_inline_placeholder; |
| 474 | std::string lang_code; |
| 475 | std::vector<std::unique_ptr<TL_username>> usernames; |
| 476 | std::unique_ptr<TL_recentStory> stories_max_id; |
| 477 | std::unique_ptr<EmojiStatus> emoji_status; |
| 478 | std::unique_ptr<TL_peerColor> color; |
| 479 | std::unique_ptr<TL_peerColor> profile_color; |
| 480 | int32_t bot_active_users; |
| 481 | int64_t bot_verification_icon; |
| 482 | int64_t send_paid_messages_stars; |
| 483 |
| 484 | static User *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 485 | }; |
| 486 |
| 487 | class TL_userEmpty : public User { |
| 488 |
| 489 | public: |
| 490 | static const uint32_t constructor = 0x31774388; |
| 491 |
| 492 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 493 | void serializeToStream(NativeByteBuffer *stream); |
| 494 | }; |
| 495 |
| 496 | class TL_user : public User { |
| 497 |
| 498 | public: |
| 499 | static const uint32_t constructor = 0xd3bc4b7a; |
| 500 |
| 501 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 502 | void serializeToStream(NativeByteBuffer *stream); |
| 503 | }; |
| 504 |
| 505 | class TL_user_layer216 : public TL_user { |
| 506 |
| 507 | public: |
| 508 | static const uint32_t constructor = 0x20b1422; |
| 509 |
| 510 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 511 | void serializeToStream(NativeByteBuffer *stream); |
| 512 | }; |
| 513 |
| 514 | class InputPeer : public TLObject { |
| 515 |
| 516 | public: |
| 517 | int64_t user_id; |
| 518 | int64_t chat_id; |
| 519 | int64_t channel_id; |
| 520 | int64_t access_hash; |
| 521 |
| 522 | static InputPeer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 523 | }; |
| 524 |
| 525 | class TL_inputPeerSelf : public InputPeer { |
| 526 |
| 527 | public: |
| 528 | static const uint32_t constructor = 0x7da07ec9; |
| 529 |
| 530 | void serializeToStream(NativeByteBuffer *stream); |
| 531 | }; |
| 532 |
| 533 | class TL_inputPeerUser : public InputPeer { |
| 534 |
| 535 | public: |
| 536 | static const uint32_t constructor = 0xdde8a54c; |
| 537 |
| 538 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 539 | void serializeToStream(NativeByteBuffer *stream); |
| 540 | }; |
| 541 |
| 542 | class TL_inputPeerChat : public InputPeer { |
| 543 |
| 544 | public: |
| 545 | static const uint32_t constructor = 0x35a95cb9; |
| 546 |
| 547 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 548 | void serializeToStream(NativeByteBuffer *stream); |
| 549 | }; |
| 550 |
| 551 | class TL_inputPeerUserFromMessage : public InputPeer { |
| 552 |
| 553 | public: |
| 554 | static const uint32_t constructor = 0xa87b0a1c; |
| 555 |
| 556 | std::unique_ptr<InputPeer> peer; |
| 557 | int32_t msg_id; |
| 558 |
| 559 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 560 | void serializeToStream(NativeByteBuffer *stream); |
| 561 | }; |
| 562 |
| 563 | class TL_inputPeerChannelFromMessage : public InputPeer { |
| 564 |
| 565 | public: |
| 566 | static const uint32_t constructor = 0xbd2a0840; |
| 567 |
| 568 | std::unique_ptr<InputPeer> peer; |
| 569 | int32_t msg_id; |
| 570 |
| 571 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 572 | void serializeToStream(NativeByteBuffer *stream); |
| 573 | }; |
| 574 |
| 575 | class TL_inputPeerChannel : public InputPeer { |
| 576 |
| 577 | public: |
| 578 | static const uint32_t constructor = 0x27bcbbfc; |
| 579 |
| 580 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 581 | void serializeToStream(NativeByteBuffer *stream); |
| 582 | }; |
| 583 |
| 584 | class TL_inputPeerEmpty : public InputPeer { |
| 585 |
| 586 | public: |
| 587 | static const uint32_t constructor = 0x7f3b18ea; |
| 588 |
| 589 | void serializeToStream(NativeByteBuffer *stream); |
| 590 | }; |
| 591 |
| 592 | class InputUser : public TLObject { |
| 593 |
| 594 | public: |
| 595 | int64_t user_id; |
| 596 | int64_t access_hash; |
| 597 |
| 598 | static InputUser *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 599 | }; |
| 600 |
| 601 | class TL_inputUserSelf : public InputUser { |
| 602 |
| 603 | public: |
| 604 | static const uint32_t constructor = 0xf7c1b13f; |
| 605 |
| 606 | void serializeToStream(NativeByteBuffer *stream); |
| 607 | }; |
| 608 |
| 609 | class TL_inputUser : public InputUser { |
| 610 |
| 611 | public: |
| 612 | static const uint32_t constructor = 0xf21158c6; |
| 613 |
| 614 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 615 | void serializeToStream(NativeByteBuffer *stream); |
| 616 | }; |
| 617 |
| 618 | class TL_inputUserEmpty : public InputUser { |
| 619 |
| 620 | public: |
| 621 | static const uint32_t constructor = 0xb98886cf; |
| 622 |
| 623 | void serializeToStream(NativeByteBuffer *stream); |
| 624 | }; |
| 625 |
| 626 | class TL_inputUserFromMessage : public InputUser { |
| 627 |
| 628 | public: |
| 629 | static const uint32_t constructor = 0x1da448e2; |
| 630 |
| 631 | std::unique_ptr<InputPeer> peer; |
| 632 | int32_t msg_id; |
| 633 |
| 634 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 635 | void serializeToStream(NativeByteBuffer *stream); |
| 636 | }; |
| 637 |
| 638 | class MessageEntity : public TLObject { |
| 639 |
| 640 | public: |
| 641 | int32_t flags; |
| 642 | int32_t offset; |
| 643 | int32_t length; |
| 644 | std::string url; |
| 645 | std::string language; |
| 646 |
| 647 | static MessageEntity *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 648 | }; |
| 649 |
| 650 | class TL_messageEntityTextUrl : public MessageEntity { |
| 651 |
| 652 | public: |
| 653 | static const uint32_t constructor = 0x76a6d327; |
| 654 |
| 655 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 656 | void serializeToStream(NativeByteBuffer *stream); |
| 657 | }; |
| 658 |
| 659 | class TL_messageEntityBotCommand : public MessageEntity { |
| 660 |
| 661 | public: |
| 662 | static const uint32_t constructor = 0x6cef8ac7; |
| 663 |
| 664 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 665 | void serializeToStream(NativeByteBuffer *stream); |
| 666 | }; |
| 667 |
| 668 | class TL_messageEntityEmail : public MessageEntity { |
| 669 |
| 670 | public: |
| 671 | static const uint32_t constructor = 0x64e475c2; |
| 672 |
| 673 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 674 | void serializeToStream(NativeByteBuffer *stream); |
| 675 | }; |
| 676 |
| 677 | class TL_messageEntityPre : public MessageEntity { |
| 678 |
| 679 | public: |
| 680 | static const uint32_t constructor = 0x73924be0; |
| 681 |
| 682 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 683 | void serializeToStream(NativeByteBuffer *stream); |
| 684 | }; |
| 685 |
| 686 | class TL_messageEntityUnknown : public MessageEntity { |
| 687 | public: |
| 688 | static const uint32_t constructor = 0xbb92ba95; |
| 689 |
| 690 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 691 | void serializeToStream(NativeByteBuffer *stream); |
| 692 | }; |
| 693 |
| 694 | class TL_messageEntityUrl : public MessageEntity { |
| 695 |
| 696 | public: |
| 697 | static const uint32_t constructor = 0x6ed02538; |
| 698 |
| 699 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 700 | void serializeToStream(NativeByteBuffer *stream); |
| 701 | }; |
| 702 |
| 703 | class TL_messageEntityItalic : public MessageEntity { |
| 704 |
| 705 | public: |
| 706 | static const uint32_t constructor = 0x826f8b60; |
| 707 |
| 708 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 709 | void serializeToStream(NativeByteBuffer *stream); |
| 710 | }; |
| 711 |
| 712 | class TL_messageEntityMention : public MessageEntity { |
| 713 |
| 714 | public: |
| 715 | static const uint32_t constructor = 0xfa04579d; |
| 716 |
| 717 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 718 | void serializeToStream(NativeByteBuffer *stream); |
| 719 | }; |
| 720 |
| 721 | class TL_messageEntityMentionName : public MessageEntity { |
| 722 |
| 723 | public: |
| 724 | static const uint32_t constructor = 0xdc7b1140; |
| 725 |
| 726 | int64_t user_id; |
| 727 |
| 728 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 729 | void serializeToStream(NativeByteBuffer *stream); |
| 730 | }; |
| 731 |
| 732 | class TL_inputMessageEntityMentionName : public MessageEntity { |
| 733 |
| 734 | public: |
| 735 | static const uint32_t constructor = 0x208e68c9; |
| 736 |
| 737 | std::unique_ptr<InputUser> user_id; |
| 738 |
| 739 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 740 | void serializeToStream(NativeByteBuffer *stream); |
| 741 | }; |
| 742 |
| 743 | class TL_messageEntityCashtag : public MessageEntity { |
| 744 |
| 745 | public: |
| 746 | static const uint32_t constructor = 0x4c4e743f; |
| 747 |
| 748 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 749 | void serializeToStream(NativeByteBuffer *stream); |
| 750 | }; |
| 751 |
| 752 | class TL_messageEntityBold : public MessageEntity { |
| 753 |
| 754 | public: |
| 755 | static const uint32_t constructor = 0xbd610bc9; |
| 756 |
| 757 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 758 | void serializeToStream(NativeByteBuffer *stream); |
| 759 | }; |
| 760 |
| 761 | class TL_messageEntityHashtag : public MessageEntity { |
| 762 |
| 763 | public: |
| 764 | static const uint32_t constructor = 0x6f635b0d; |
| 765 |
| 766 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 767 | void serializeToStream(NativeByteBuffer *stream); |
| 768 | }; |
| 769 |
| 770 | class TL_messageEntityCode : public MessageEntity { |
| 771 |
| 772 | public: |
| 773 | static const uint32_t constructor = 0x28a20571; |
| 774 |
| 775 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 776 | void serializeToStream(NativeByteBuffer *stream); |
| 777 | }; |
| 778 |
| 779 | class TL_messageEntityStrike : public MessageEntity { |
| 780 |
| 781 | public: |
| 782 | static const uint32_t constructor = 0xbf0693d4; |
| 783 |
| 784 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 785 | void serializeToStream(NativeByteBuffer *stream); |
| 786 | }; |
| 787 |
| 788 | class TL_messageEntityBlockquote : public MessageEntity { |
| 789 |
| 790 | public: |
| 791 | static const uint32_t constructor = 0xf1ccaaac; |
| 792 |
| 793 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 794 | void serializeToStream(NativeByteBuffer *stream); |
| 795 | }; |
| 796 |
| 797 | class TL_messageEntityBlockquote_layer180 : public MessageEntity { |
| 798 |
| 799 | public: |
| 800 | static const uint32_t constructor = 0x20df5d0; |
| 801 |
| 802 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 803 | void serializeToStream(NativeByteBuffer *stream); |
| 804 | }; |
| 805 |
| 806 | class TL_messageEntityUnderline : public MessageEntity { |
| 807 |
| 808 | public: |
| 809 | static const uint32_t constructor = 0x9c4e7e8b; |
| 810 |
| 811 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 812 | void serializeToStream(NativeByteBuffer *stream); |
| 813 | }; |
| 814 |
| 815 | class TL_messageEntityPhone : public MessageEntity { |
| 816 |
| 817 | public: |
| 818 | static const uint32_t constructor = 0x9b69e34b; |
| 819 |
| 820 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 821 | void serializeToStream(NativeByteBuffer *stream); |
| 822 | }; |
| 823 |
| 824 | class TL_dataJSON : public TLObject { |
| 825 |
| 826 | public: |
| 827 | static const uint32_t constructor = 0x7d748d04; |
| 828 |
| 829 | std::string data; |
| 830 |
| 831 | static TL_dataJSON *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 832 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 833 | void serializeToStream(NativeByteBuffer *stream); |
| 834 | }; |
| 835 |
| 836 | class TL_help_termsOfService : public TLObject { |
| 837 |
| 838 | public: |
| 839 | static const uint32_t constructor = 0x780a0310; |
| 840 |
| 841 | int32_t flags; |
| 842 | bool popup; |
| 843 | std::unique_ptr<TL_dataJSON> id; |
| 844 | std::string text; |
| 845 | std::vector<std::unique_ptr<MessageEntity>> entities; |
| 846 | int32_t min_age_confirm; |
| 847 |
| 848 | static TL_help_termsOfService *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 849 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 850 | void serializeToStream(NativeByteBuffer *stream); |
| 851 | }; |
| 852 |
| 853 | class auth_Authorization : public TLObject { |
| 854 |
| 855 | public: |
| 856 | static auth_Authorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 857 | }; |
| 858 |
| 859 | class TL_auth_authorizationSignUpRequired : public auth_Authorization { |
| 860 |
| 861 | public: |
| 862 | static const uint32_t constructor = 0x44747e9a; |
| 863 |
| 864 | int32_t flags; |
| 865 | std::unique_ptr<TL_help_termsOfService> terms_of_service; |
| 866 |
| 867 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 868 | void serializeToStream(NativeByteBuffer *stream); |
| 869 | }; |
| 870 |
| 871 | class TL_auth_authorization : public auth_Authorization { |
| 872 |
| 873 | public: |
| 874 | static const uint32_t constructor = 0x2ea2c0d4; |
| 875 |
| 876 | int32_t flags; |
| 877 | int32_t tmp_sessions; |
| 878 | int32_t otherwise_relogin_days; |
| 879 | std::unique_ptr<ByteArray> future_auth_token; |
| 880 | std::unique_ptr<User> user; |
| 881 |
| 882 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 883 | void serializeToStream(NativeByteBuffer *stream); |
| 884 | }; |
| 885 |
| 886 | class TL_auth_exportedAuthorization : public TLObject { |
| 887 |
| 888 | public: |
| 889 | static const uint32_t constructor = 0xb434e2b8; |
| 890 |
| 891 | int64_t id; |
| 892 | std::unique_ptr<ByteArray> bytes; |
| 893 |
| 894 | static TL_auth_exportedAuthorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 895 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 896 | }; |
| 897 |
| 898 | class TL_auth_exportAuthorization : public TLObject { |
| 899 |
| 900 | public: |
| 901 | static const uint32_t constructor = 0xe5bfffcd; |
| 902 |
| 903 | int32_t dc_id; |
| 904 |
| 905 | bool isNeedLayer(); |
| 906 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 907 | void serializeToStream(NativeByteBuffer *stream); |
| 908 | }; |
| 909 |
| 910 | class TL_auth_importAuthorization : public TLObject { |
| 911 |
| 912 | public: |
| 913 | static const uint32_t constructor = 0xa57a7dad; |
| 914 |
| 915 | int64_t id; |
| 916 | std::unique_ptr<ByteArray> bytes; |
| 917 |
| 918 | bool isNeedLayer(); |
| 919 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 920 | void serializeToStream(NativeByteBuffer *stream); |
| 921 | }; |
| 922 |
| 923 | class TL_updatesTooLong : public TLObject { |
| 924 |
| 925 | public: |
| 926 | static const uint32_t constructor = 0xe317af7e; |
| 927 |
| 928 | void serializeToStream(NativeByteBuffer *stream); |
| 929 | }; |
| 930 |
| 931 |
| 932 | class TL_reactionCustomEmoji : public Reaction { |
| 933 |
| 934 | public: |
| 935 | static const uint32_t constructor = 0x8935fc73; |
| 936 | int64_t document_id; |
| 937 |
| 938 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 939 | void serializeToStream(NativeByteBuffer *stream); |
| 940 | }; |
| 941 |
| 942 |
| 943 | class TL_reactionEmoji : public Reaction { |
| 944 |
| 945 | public: |
| 946 | static const uint32_t constructor = 0x1b2286b8; |
| 947 | std::string emoticon; |
| 948 |
| 949 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 950 | void serializeToStream(NativeByteBuffer *stream); |
| 951 | }; |
| 952 |
| 953 |
| 954 |
| 955 | class TL_reactionEmpty : public Reaction { |
| 956 |
| 957 | public: |
| 958 | static const uint32_t constructor = 0x79f5d419; |
| 959 |
| 960 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 961 | void serializeToStream(NativeByteBuffer *stream); |
| 962 | }; |
| 963 |
| 964 | #endif |
| 965 |