| 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 = 0x541a1d1a; |
| 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 PeerColor : public TLObject { |
| 380 | public: |
| 381 | static PeerColor *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 382 | }; |
| 383 |
| 384 | class TL_peerColor : public PeerColor { |
| 385 | public: |
| 386 | static const uint32_t constructor = 0xb54b5acf; |
| 387 |
| 388 | int32_t flags; |
| 389 | int32_t color; |
| 390 | int64_t background_emoji_id; |
| 391 |
| 392 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 393 | void serializeToStream(NativeByteBuffer *stream); |
| 394 | }; |
| 395 |
| 396 | class TL_peerColorCollectible : public PeerColor { |
| 397 | public: |
| 398 | static const uint32_t constructor = 0xb9c0639a; |
| 399 |
| 400 | int32_t flags; |
| 401 | int64_t collectible_id; |
| 402 | int64_t gift_emoji_id; |
| 403 | int64_t background_emoji_id; |
| 404 | int32_t accent_color; |
| 405 | std::vector<int32_t> colors; |
| 406 | int32_t dark_accent_color; |
| 407 | std::vector<int32_t> dark_colors; |
| 408 |
| 409 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 410 | void serializeToStream(NativeByteBuffer *stream); |
| 411 | }; |
| 412 |
| 413 | class EmojiStatus : public TLObject { |
| 414 | public: |
| 415 | static EmojiStatus *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 416 | }; |
| 417 |
| 418 | class TL_emojiStatusEmpty : public EmojiStatus { |
| 419 | public: |
| 420 | static const uint32_t constructor = 0x2de11aae; |
| 421 |
| 422 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 423 | void serializeToStream(NativeByteBuffer *stream); |
| 424 | }; |
| 425 |
| 426 | class TL_emojiStatus : public EmojiStatus { |
| 427 | public: |
| 428 | static const uint32_t constructor = 0xe7ff068a; |
| 429 |
| 430 | int32_t flags; |
| 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_emojiStatus_layer197 : public EmojiStatus { |
| 439 | public: |
| 440 | static const uint32_t constructor = 0x929b619d; |
| 441 |
| 442 | int64_t document_id; |
| 443 |
| 444 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 445 | void serializeToStream(NativeByteBuffer *stream); |
| 446 | }; |
| 447 |
| 448 | class TL_emojiStatusUntil_layer197 : public EmojiStatus { |
| 449 | public: |
| 450 | static const uint32_t constructor = 0xfa30a8c7; |
| 451 |
| 452 | int64_t document_id; |
| 453 | int32_t until; |
| 454 |
| 455 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 456 | void serializeToStream(NativeByteBuffer *stream); |
| 457 | }; |
| 458 |
| 459 | class TL_emojiStatusCollectible : public EmojiStatus { |
| 460 | public: |
| 461 | static const uint32_t constructor = 0x7184603b; |
| 462 |
| 463 | int32_t flags; |
| 464 | int64_t collectible_id; |
| 465 | int64_t document_id; |
| 466 | std::string title; |
| 467 | std::string slug; |
| 468 | int64_t pattern_document_id; |
| 469 | int32_t center_color; |
| 470 | int32_t edge_color; |
| 471 | int32_t pattern_color; |
| 472 | int32_t text_color; |
| 473 | int32_t until; |
| 474 |
| 475 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 476 | void serializeToStream(NativeByteBuffer *stream); |
| 477 | }; |
| 478 |
| 479 | class TL_inputEmojiStatusCollectible : public EmojiStatus { |
| 480 | public: |
| 481 | static const uint32_t constructor = 0x7141dbf; |
| 482 |
| 483 | int32_t flags; |
| 484 | int64_t collectible_id; |
| 485 | int32_t until; |
| 486 |
| 487 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 488 | void serializeToStream(NativeByteBuffer *stream); |
| 489 | }; |
| 490 |
| 491 | class User : public TLObject { |
| 492 |
| 493 | public: |
| 494 | int64_t id; |
| 495 | std::string first_name; |
| 496 | std::string last_name; |
| 497 | std::string username; |
| 498 | int64_t access_hash; |
| 499 | std::string phone; |
| 500 | std::unique_ptr<UserProfilePhoto> photo; |
| 501 | std::unique_ptr<UserStatus> status; |
| 502 | int32_t flags; |
| 503 | int32_t flags2; |
| 504 | int32_t bot_info_version; |
| 505 | std::vector<std::unique_ptr<TL_restrictionReason>> restriction_reason; |
| 506 | std::string bot_inline_placeholder; |
| 507 | std::string lang_code; |
| 508 | std::vector<std::unique_ptr<TL_username>> usernames; |
| 509 | std::unique_ptr<TL_recentStory> stories_max_id; |
| 510 | std::unique_ptr<EmojiStatus> emoji_status; |
| 511 | std::unique_ptr<PeerColor> color; |
| 512 | std::unique_ptr<PeerColor> profile_color; |
| 513 | int32_t bot_active_users; |
| 514 | int64_t bot_verification_icon; |
| 515 | int64_t send_paid_messages_stars; |
| 516 |
| 517 | static User *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 518 | }; |
| 519 |
| 520 | class TL_userEmpty : public User { |
| 521 |
| 522 | public: |
| 523 | static const uint32_t constructor = 0xd3bc4b7a; |
| 524 |
| 525 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 526 | void serializeToStream(NativeByteBuffer *stream); |
| 527 | }; |
| 528 |
| 529 | class TL_user : public User { |
| 530 |
| 531 | public: |
| 532 | static const uint32_t constructor = 0x31774388; |
| 533 |
| 534 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 535 | void serializeToStream(NativeByteBuffer *stream); |
| 536 | }; |
| 537 |
| 538 | class TL_user_layer216 : public TL_user { |
| 539 |
| 540 | public: |
| 541 | static const uint32_t constructor = 0x20b1422; |
| 542 |
| 543 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 544 | void serializeToStream(NativeByteBuffer *stream); |
| 545 | }; |
| 546 |
| 547 | class InputPeer : public TLObject { |
| 548 |
| 549 | public: |
| 550 | int64_t user_id; |
| 551 | int64_t chat_id; |
| 552 | int64_t channel_id; |
| 553 | int64_t access_hash; |
| 554 |
| 555 | static InputPeer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 556 | }; |
| 557 |
| 558 | class TL_inputPeerSelf : public InputPeer { |
| 559 |
| 560 | public: |
| 561 | static const uint32_t constructor = 0x7da07ec9; |
| 562 |
| 563 | void serializeToStream(NativeByteBuffer *stream); |
| 564 | }; |
| 565 |
| 566 | class TL_inputPeerUser : public InputPeer { |
| 567 |
| 568 | public: |
| 569 | static const uint32_t constructor = 0xdde8a54c; |
| 570 |
| 571 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 572 | void serializeToStream(NativeByteBuffer *stream); |
| 573 | }; |
| 574 |
| 575 | class TL_inputPeerChat : public InputPeer { |
| 576 |
| 577 | public: |
| 578 | static const uint32_t constructor = 0x35a95cb9; |
| 579 |
| 580 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 581 | void serializeToStream(NativeByteBuffer *stream); |
| 582 | }; |
| 583 |
| 584 | class TL_inputPeerUserFromMessage : public InputPeer { |
| 585 |
| 586 | public: |
| 587 | static const uint32_t constructor = 0xa87b0a1c; |
| 588 |
| 589 | std::unique_ptr<InputPeer> peer; |
| 590 | int32_t msg_id; |
| 591 |
| 592 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 593 | void serializeToStream(NativeByteBuffer *stream); |
| 594 | }; |
| 595 |
| 596 | class TL_inputPeerChannelFromMessage : public InputPeer { |
| 597 |
| 598 | public: |
| 599 | static const uint32_t constructor = 0xbd2a0840; |
| 600 |
| 601 | std::unique_ptr<InputPeer> peer; |
| 602 | int32_t msg_id; |
| 603 |
| 604 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 605 | void serializeToStream(NativeByteBuffer *stream); |
| 606 | }; |
| 607 |
| 608 | class TL_inputPeerChannel : public InputPeer { |
| 609 |
| 610 | public: |
| 611 | static const uint32_t constructor = 0x27bcbbfc; |
| 612 |
| 613 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 614 | void serializeToStream(NativeByteBuffer *stream); |
| 615 | }; |
| 616 |
| 617 | class TL_inputPeerEmpty : public InputPeer { |
| 618 |
| 619 | public: |
| 620 | static const uint32_t constructor = 0x7f3b18ea; |
| 621 |
| 622 | void serializeToStream(NativeByteBuffer *stream); |
| 623 | }; |
| 624 |
| 625 | class InputUser : public TLObject { |
| 626 |
| 627 | public: |
| 628 | int64_t user_id; |
| 629 | int64_t access_hash; |
| 630 |
| 631 | static InputUser *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 632 | }; |
| 633 |
| 634 | class TL_inputUserSelf : public InputUser { |
| 635 |
| 636 | public: |
| 637 | static const uint32_t constructor = 0xf7c1b13f; |
| 638 |
| 639 | void serializeToStream(NativeByteBuffer *stream); |
| 640 | }; |
| 641 |
| 642 | class TL_inputUser : public InputUser { |
| 643 |
| 644 | public: |
| 645 | static const uint32_t constructor = 0xf21158c6; |
| 646 |
| 647 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 648 | void serializeToStream(NativeByteBuffer *stream); |
| 649 | }; |
| 650 |
| 651 | class TL_inputUserEmpty : public InputUser { |
| 652 |
| 653 | public: |
| 654 | static const uint32_t constructor = 0xb98886cf; |
| 655 |
| 656 | void serializeToStream(NativeByteBuffer *stream); |
| 657 | }; |
| 658 |
| 659 | class TL_inputUserFromMessage : public InputUser { |
| 660 |
| 661 | public: |
| 662 | static const uint32_t constructor = 0x1da448e2; |
| 663 |
| 664 | std::unique_ptr<InputPeer> peer; |
| 665 | int32_t msg_id; |
| 666 |
| 667 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 668 | void serializeToStream(NativeByteBuffer *stream); |
| 669 | }; |
| 670 |
| 671 | class MessageEntity : public TLObject { |
| 672 |
| 673 | public: |
| 674 | int32_t flags; |
| 675 | int32_t offset; |
| 676 | int32_t length; |
| 677 | std::string url; |
| 678 | std::string language; |
| 679 |
| 680 | static MessageEntity *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 681 | }; |
| 682 |
| 683 | class TL_messageEntityTextUrl : public MessageEntity { |
| 684 |
| 685 | public: |
| 686 | static const uint32_t constructor = 0x76a6d327; |
| 687 |
| 688 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 689 | void serializeToStream(NativeByteBuffer *stream); |
| 690 | }; |
| 691 |
| 692 | class TL_messageEntityBotCommand : public MessageEntity { |
| 693 |
| 694 | public: |
| 695 | static const uint32_t constructor = 0x6cef8ac7; |
| 696 |
| 697 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 698 | void serializeToStream(NativeByteBuffer *stream); |
| 699 | }; |
| 700 |
| 701 | class TL_messageEntityEmail : public MessageEntity { |
| 702 |
| 703 | public: |
| 704 | static const uint32_t constructor = 0x64e475c2; |
| 705 |
| 706 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 707 | void serializeToStream(NativeByteBuffer *stream); |
| 708 | }; |
| 709 |
| 710 | class TL_messageEntityPre : public MessageEntity { |
| 711 |
| 712 | public: |
| 713 | static const uint32_t constructor = 0x73924be0; |
| 714 |
| 715 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 716 | void serializeToStream(NativeByteBuffer *stream); |
| 717 | }; |
| 718 |
| 719 | class TL_messageEntityUnknown : public MessageEntity { |
| 720 | public: |
| 721 | static const uint32_t constructor = 0xbb92ba95; |
| 722 |
| 723 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 724 | void serializeToStream(NativeByteBuffer *stream); |
| 725 | }; |
| 726 |
| 727 | class TL_messageEntityUrl : public MessageEntity { |
| 728 |
| 729 | public: |
| 730 | static const uint32_t constructor = 0x6ed02538; |
| 731 |
| 732 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 733 | void serializeToStream(NativeByteBuffer *stream); |
| 734 | }; |
| 735 |
| 736 | class TL_messageEntityItalic : public MessageEntity { |
| 737 |
| 738 | public: |
| 739 | static const uint32_t constructor = 0x826f8b60; |
| 740 |
| 741 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 742 | void serializeToStream(NativeByteBuffer *stream); |
| 743 | }; |
| 744 |
| 745 | class TL_messageEntityMention : public MessageEntity { |
| 746 |
| 747 | public: |
| 748 | static const uint32_t constructor = 0xfa04579d; |
| 749 |
| 750 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 751 | void serializeToStream(NativeByteBuffer *stream); |
| 752 | }; |
| 753 |
| 754 | class TL_messageEntityMentionName : public MessageEntity { |
| 755 |
| 756 | public: |
| 757 | static const uint32_t constructor = 0xdc7b1140; |
| 758 |
| 759 | int64_t user_id; |
| 760 |
| 761 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 762 | void serializeToStream(NativeByteBuffer *stream); |
| 763 | }; |
| 764 |
| 765 | class TL_inputMessageEntityMentionName : public MessageEntity { |
| 766 |
| 767 | public: |
| 768 | static const uint32_t constructor = 0x208e68c9; |
| 769 |
| 770 | std::unique_ptr<InputUser> user_id; |
| 771 |
| 772 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 773 | void serializeToStream(NativeByteBuffer *stream); |
| 774 | }; |
| 775 |
| 776 | class TL_messageEntityCashtag : public MessageEntity { |
| 777 |
| 778 | public: |
| 779 | static const uint32_t constructor = 0x4c4e743f; |
| 780 |
| 781 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 782 | void serializeToStream(NativeByteBuffer *stream); |
| 783 | }; |
| 784 |
| 785 | class TL_messageEntityBold : public MessageEntity { |
| 786 |
| 787 | public: |
| 788 | static const uint32_t constructor = 0xbd610bc9; |
| 789 |
| 790 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 791 | void serializeToStream(NativeByteBuffer *stream); |
| 792 | }; |
| 793 |
| 794 | class TL_messageEntityHashtag : public MessageEntity { |
| 795 |
| 796 | public: |
| 797 | static const uint32_t constructor = 0x6f635b0d; |
| 798 |
| 799 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 800 | void serializeToStream(NativeByteBuffer *stream); |
| 801 | }; |
| 802 |
| 803 | class TL_messageEntityCode : public MessageEntity { |
| 804 |
| 805 | public: |
| 806 | static const uint32_t constructor = 0x28a20571; |
| 807 |
| 808 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 809 | void serializeToStream(NativeByteBuffer *stream); |
| 810 | }; |
| 811 |
| 812 | class TL_messageEntityStrike : public MessageEntity { |
| 813 |
| 814 | public: |
| 815 | static const uint32_t constructor = 0xbf0693d4; |
| 816 |
| 817 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 818 | void serializeToStream(NativeByteBuffer *stream); |
| 819 | }; |
| 820 |
| 821 | class TL_messageEntityBlockquote : public MessageEntity { |
| 822 |
| 823 | public: |
| 824 | static const uint32_t constructor = 0xf1ccaaac; |
| 825 |
| 826 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 827 | void serializeToStream(NativeByteBuffer *stream); |
| 828 | }; |
| 829 |
| 830 | class TL_messageEntityBlockquote_layer180 : public MessageEntity { |
| 831 |
| 832 | public: |
| 833 | static const uint32_t constructor = 0x20df5d0; |
| 834 |
| 835 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 836 | void serializeToStream(NativeByteBuffer *stream); |
| 837 | }; |
| 838 |
| 839 | class TL_messageEntityUnderline : public MessageEntity { |
| 840 |
| 841 | public: |
| 842 | static const uint32_t constructor = 0x9c4e7e8b; |
| 843 |
| 844 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 845 | void serializeToStream(NativeByteBuffer *stream); |
| 846 | }; |
| 847 |
| 848 | class TL_messageEntityPhone : public MessageEntity { |
| 849 |
| 850 | public: |
| 851 | static const uint32_t constructor = 0x9b69e34b; |
| 852 |
| 853 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 854 | void serializeToStream(NativeByteBuffer *stream); |
| 855 | }; |
| 856 |
| 857 | class TL_dataJSON : public TLObject { |
| 858 |
| 859 | public: |
| 860 | static const uint32_t constructor = 0x7d748d04; |
| 861 |
| 862 | std::string data; |
| 863 |
| 864 | static TL_dataJSON *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 865 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 866 | void serializeToStream(NativeByteBuffer *stream); |
| 867 | }; |
| 868 |
| 869 | class TL_help_termsOfService : public TLObject { |
| 870 |
| 871 | public: |
| 872 | static const uint32_t constructor = 0x780a0310; |
| 873 |
| 874 | int32_t flags; |
| 875 | bool popup; |
| 876 | std::unique_ptr<TL_dataJSON> id; |
| 877 | std::string text; |
| 878 | std::vector<std::unique_ptr<MessageEntity>> entities; |
| 879 | int32_t min_age_confirm; |
| 880 |
| 881 | static TL_help_termsOfService *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 882 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 883 | void serializeToStream(NativeByteBuffer *stream); |
| 884 | }; |
| 885 |
| 886 | class auth_Authorization : public TLObject { |
| 887 |
| 888 | public: |
| 889 | static auth_Authorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 890 | }; |
| 891 |
| 892 | class TL_auth_authorizationSignUpRequired : public auth_Authorization { |
| 893 |
| 894 | public: |
| 895 | static const uint32_t constructor = 0x44747e9a; |
| 896 |
| 897 | int32_t flags; |
| 898 | std::unique_ptr<TL_help_termsOfService> terms_of_service; |
| 899 |
| 900 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 901 | void serializeToStream(NativeByteBuffer *stream); |
| 902 | }; |
| 903 |
| 904 | class TL_auth_authorization : public auth_Authorization { |
| 905 |
| 906 | public: |
| 907 | static const uint32_t constructor = 0x2ea2c0d4; |
| 908 |
| 909 | int32_t flags; |
| 910 | int32_t tmp_sessions; |
| 911 | int32_t otherwise_relogin_days; |
| 912 | std::unique_ptr<ByteArray> future_auth_token; |
| 913 | std::unique_ptr<User> user; |
| 914 |
| 915 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 916 | void serializeToStream(NativeByteBuffer *stream); |
| 917 | }; |
| 918 |
| 919 | class TL_auth_exportedAuthorization : public TLObject { |
| 920 |
| 921 | public: |
| 922 | static const uint32_t constructor = 0xb434e2b8; |
| 923 |
| 924 | int64_t id; |
| 925 | std::unique_ptr<ByteArray> bytes; |
| 926 |
| 927 | static TL_auth_exportedAuthorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 928 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 929 | }; |
| 930 |
| 931 | class TL_auth_exportAuthorization : public TLObject { |
| 932 |
| 933 | public: |
| 934 | static const uint32_t constructor = 0xe5bfffcd; |
| 935 |
| 936 | int32_t dc_id; |
| 937 |
| 938 | bool isNeedLayer(); |
| 939 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 940 | void serializeToStream(NativeByteBuffer *stream); |
| 941 | }; |
| 942 |
| 943 | class TL_auth_importAuthorization : public TLObject { |
| 944 |
| 945 | public: |
| 946 | static const uint32_t constructor = 0xa57a7dad; |
| 947 |
| 948 | int64_t id; |
| 949 | std::unique_ptr<ByteArray> bytes; |
| 950 |
| 951 | bool isNeedLayer(); |
| 952 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 953 | void serializeToStream(NativeByteBuffer *stream); |
| 954 | }; |
| 955 |
| 956 | class TL_updatesTooLong : public TLObject { |
| 957 |
| 958 | public: |
| 959 | static const uint32_t constructor = 0xe317af7e; |
| 960 |
| 961 | void serializeToStream(NativeByteBuffer *stream); |
| 962 | }; |
| 963 |
| 964 |
| 965 | class TL_reactionCustomEmoji : public Reaction { |
| 966 |
| 967 | public: |
| 968 | static const uint32_t constructor = 0x8935fc73; |
| 969 | int64_t document_id; |
| 970 |
| 971 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 972 | void serializeToStream(NativeByteBuffer *stream); |
| 973 | }; |
| 974 |
| 975 |
| 976 | class TL_reactionEmoji : public Reaction { |
| 977 |
| 978 | public: |
| 979 | static const uint32_t constructor = 0x1b2286b8; |
| 980 | std::string emoticon; |
| 981 |
| 982 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 983 | void serializeToStream(NativeByteBuffer *stream); |
| 984 | }; |
| 985 |
| 986 |
| 987 |
| 988 | class TL_reactionEmpty : public Reaction { |
| 989 |
| 990 | public: |
| 991 | static const uint32_t constructor = 0x79f5d419; |
| 992 |
| 993 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 994 | void serializeToStream(NativeByteBuffer *stream); |
| 995 | }; |
| 996 |
| 997 | #endif |
| 998 |