| 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_username : public TLObject { |
| 352 |
| 353 | public: |
| 354 | static const uint32_t constructor = 0xb4073647; |
| 355 | int32_t flags; |
| 356 | bool editable; |
| 357 | bool active; |
| 358 | std::string username; |
| 359 |
| 360 | static TL_username *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 User : public TLObject { |
| 366 |
| 367 | public: |
| 368 | int64_t id; |
| 369 | std::string first_name; |
| 370 | std::string last_name; |
| 371 | std::string username; |
| 372 | int64_t access_hash; |
| 373 | std::string phone; |
| 374 | std::unique_ptr<UserProfilePhoto> photo; |
| 375 | std::unique_ptr<UserStatus> status; |
| 376 | int32_t flags; |
| 377 | int32_t flags2; |
| 378 | int32_t bot_info_version; |
| 379 | std::vector<std::unique_ptr<TL_restrictionReason>> restriction_reason; |
| 380 | std::string bot_inline_placeholder; |
| 381 | std::string lang_code; |
| 382 | std::vector<std::unique_ptr<TL_username>> usernames; |
| 383 | int32_t stories_max_id; |
| 384 | int32_t emojiStatusMagic; |
| 385 | int64_t emojiStatusDocumentId; |
| 386 | int32_t emojiStatusUntil; |
| 387 | int32_t color_color; |
| 388 | int64_t color_background_emoji_id; |
| 389 | int32_t profile_color_color; |
| 390 | int64_t profile_color_background_emoji_id; |
| 391 |
| 392 | static User *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 393 | }; |
| 394 |
| 395 | class TL_userEmpty : public User { |
| 396 |
| 397 | public: |
| 398 | static const uint32_t constructor = 0xd3bc4b7a; |
| 399 |
| 400 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 401 | void serializeToStream(NativeByteBuffer *stream); |
| 402 | }; |
| 403 |
| 404 | class TL_user : public User { |
| 405 |
| 406 | public: |
| 407 | static const uint32_t constructor = 0x215c4438; |
| 408 |
| 409 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 410 | void serializeToStream(NativeByteBuffer *stream); |
| 411 | }; |
| 412 |
| 413 | class InputPeer : public TLObject { |
| 414 |
| 415 | public: |
| 416 | int64_t user_id; |
| 417 | int64_t chat_id; |
| 418 | int64_t channel_id; |
| 419 | int64_t access_hash; |
| 420 |
| 421 | static InputPeer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 422 | }; |
| 423 |
| 424 | class TL_inputPeerSelf : public InputPeer { |
| 425 |
| 426 | public: |
| 427 | static const uint32_t constructor = 0x7da07ec9; |
| 428 |
| 429 | void serializeToStream(NativeByteBuffer *stream); |
| 430 | }; |
| 431 |
| 432 | class TL_inputPeerUser : public InputPeer { |
| 433 |
| 434 | public: |
| 435 | static const uint32_t constructor = 0xdde8a54c; |
| 436 |
| 437 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 438 | void serializeToStream(NativeByteBuffer *stream); |
| 439 | }; |
| 440 |
| 441 | class TL_inputPeerChat : public InputPeer { |
| 442 |
| 443 | public: |
| 444 | static const uint32_t constructor = 0x35a95cb9; |
| 445 |
| 446 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 447 | void serializeToStream(NativeByteBuffer *stream); |
| 448 | }; |
| 449 |
| 450 | class TL_inputPeerUserFromMessage : public InputPeer { |
| 451 |
| 452 | public: |
| 453 | static const uint32_t constructor = 0xa87b0a1c; |
| 454 |
| 455 | std::unique_ptr<InputPeer> peer; |
| 456 | int32_t msg_id; |
| 457 |
| 458 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 459 | void serializeToStream(NativeByteBuffer *stream); |
| 460 | }; |
| 461 |
| 462 | class TL_inputPeerChannelFromMessage : public InputPeer { |
| 463 |
| 464 | public: |
| 465 | static const uint32_t constructor = 0xbd2a0840; |
| 466 |
| 467 | std::unique_ptr<InputPeer> peer; |
| 468 | int32_t msg_id; |
| 469 |
| 470 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 471 | void serializeToStream(NativeByteBuffer *stream); |
| 472 | }; |
| 473 |
| 474 | class TL_inputPeerChannel : public InputPeer { |
| 475 |
| 476 | public: |
| 477 | static const uint32_t constructor = 0x27bcbbfc; |
| 478 |
| 479 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 480 | void serializeToStream(NativeByteBuffer *stream); |
| 481 | }; |
| 482 |
| 483 | class TL_inputPeerEmpty : public InputPeer { |
| 484 |
| 485 | public: |
| 486 | static const uint32_t constructor = 0x7f3b18ea; |
| 487 |
| 488 | void serializeToStream(NativeByteBuffer *stream); |
| 489 | }; |
| 490 |
| 491 | class InputUser : public TLObject { |
| 492 |
| 493 | public: |
| 494 | int64_t user_id; |
| 495 | int64_t access_hash; |
| 496 |
| 497 | static InputUser *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 498 | }; |
| 499 |
| 500 | class TL_inputUserSelf : public InputUser { |
| 501 |
| 502 | public: |
| 503 | static const uint32_t constructor = 0xf7c1b13f; |
| 504 |
| 505 | void serializeToStream(NativeByteBuffer *stream); |
| 506 | }; |
| 507 |
| 508 | class TL_inputUser : public InputUser { |
| 509 |
| 510 | public: |
| 511 | static const uint32_t constructor = 0xf21158c6; |
| 512 |
| 513 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 514 | void serializeToStream(NativeByteBuffer *stream); |
| 515 | }; |
| 516 |
| 517 | class TL_inputUserEmpty : public InputUser { |
| 518 |
| 519 | public: |
| 520 | static const uint32_t constructor = 0xb98886cf; |
| 521 |
| 522 | void serializeToStream(NativeByteBuffer *stream); |
| 523 | }; |
| 524 |
| 525 | class TL_inputUserFromMessage : public InputUser { |
| 526 |
| 527 | public: |
| 528 | static const uint32_t constructor = 0x1da448e2; |
| 529 |
| 530 | std::unique_ptr<InputPeer> peer; |
| 531 | int32_t msg_id; |
| 532 |
| 533 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 534 | void serializeToStream(NativeByteBuffer *stream); |
| 535 | }; |
| 536 |
| 537 | class MessageEntity : public TLObject { |
| 538 |
| 539 | public: |
| 540 | int32_t offset; |
| 541 | int32_t length; |
| 542 | std::string url; |
| 543 | std::string language; |
| 544 |
| 545 | static MessageEntity *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 546 | }; |
| 547 |
| 548 | class TL_messageEntityTextUrl : public MessageEntity { |
| 549 |
| 550 | public: |
| 551 | static const uint32_t constructor = 0x76a6d327; |
| 552 |
| 553 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 554 | void serializeToStream(NativeByteBuffer *stream); |
| 555 | }; |
| 556 |
| 557 | class TL_messageEntityBotCommand : public MessageEntity { |
| 558 |
| 559 | public: |
| 560 | static const uint32_t constructor = 0x6cef8ac7; |
| 561 |
| 562 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 563 | void serializeToStream(NativeByteBuffer *stream); |
| 564 | }; |
| 565 |
| 566 | class TL_messageEntityEmail : public MessageEntity { |
| 567 |
| 568 | public: |
| 569 | static const uint32_t constructor = 0x64e475c2; |
| 570 |
| 571 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 572 | void serializeToStream(NativeByteBuffer *stream); |
| 573 | }; |
| 574 |
| 575 | class TL_messageEntityPre : public MessageEntity { |
| 576 |
| 577 | public: |
| 578 | static const uint32_t constructor = 0x73924be0; |
| 579 |
| 580 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 581 | void serializeToStream(NativeByteBuffer *stream); |
| 582 | }; |
| 583 |
| 584 | class TL_messageEntityUnknown : public MessageEntity { |
| 585 | public: |
| 586 | static const uint32_t constructor = 0xbb92ba95; |
| 587 |
| 588 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 589 | void serializeToStream(NativeByteBuffer *stream); |
| 590 | }; |
| 591 |
| 592 | class TL_messageEntityUrl : public MessageEntity { |
| 593 |
| 594 | public: |
| 595 | static const uint32_t constructor = 0x6ed02538; |
| 596 |
| 597 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 598 | void serializeToStream(NativeByteBuffer *stream); |
| 599 | }; |
| 600 |
| 601 | class TL_messageEntityItalic : public MessageEntity { |
| 602 |
| 603 | public: |
| 604 | static const uint32_t constructor = 0x826f8b60; |
| 605 |
| 606 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 607 | void serializeToStream(NativeByteBuffer *stream); |
| 608 | }; |
| 609 |
| 610 | class TL_messageEntityMention : public MessageEntity { |
| 611 |
| 612 | public: |
| 613 | static const uint32_t constructor = 0xfa04579d; |
| 614 |
| 615 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 616 | void serializeToStream(NativeByteBuffer *stream); |
| 617 | }; |
| 618 |
| 619 | class TL_messageEntityMentionName : public MessageEntity { |
| 620 |
| 621 | public: |
| 622 | static const uint32_t constructor = 0xdc7b1140; |
| 623 |
| 624 | int64_t user_id; |
| 625 |
| 626 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 627 | void serializeToStream(NativeByteBuffer *stream); |
| 628 | }; |
| 629 |
| 630 | class TL_inputMessageEntityMentionName : public MessageEntity { |
| 631 |
| 632 | public: |
| 633 | static const uint32_t constructor = 0x208e68c9; |
| 634 |
| 635 | std::unique_ptr<InputUser> user_id; |
| 636 |
| 637 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 638 | void serializeToStream(NativeByteBuffer *stream); |
| 639 | }; |
| 640 |
| 641 | class TL_messageEntityCashtag : public MessageEntity { |
| 642 |
| 643 | public: |
| 644 | static const uint32_t constructor = 0x4c4e743f; |
| 645 |
| 646 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 647 | void serializeToStream(NativeByteBuffer *stream); |
| 648 | }; |
| 649 |
| 650 | class TL_messageEntityBold : public MessageEntity { |
| 651 |
| 652 | public: |
| 653 | static const uint32_t constructor = 0xbd610bc9; |
| 654 |
| 655 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 656 | void serializeToStream(NativeByteBuffer *stream); |
| 657 | }; |
| 658 |
| 659 | class TL_messageEntityHashtag : public MessageEntity { |
| 660 |
| 661 | public: |
| 662 | static const uint32_t constructor = 0x6f635b0d; |
| 663 |
| 664 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 665 | void serializeToStream(NativeByteBuffer *stream); |
| 666 | }; |
| 667 |
| 668 | class TL_messageEntityCode : public MessageEntity { |
| 669 |
| 670 | public: |
| 671 | static const uint32_t constructor = 0x28a20571; |
| 672 |
| 673 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 674 | void serializeToStream(NativeByteBuffer *stream); |
| 675 | }; |
| 676 |
| 677 | class TL_messageEntityStrike : public MessageEntity { |
| 678 |
| 679 | public: |
| 680 | static const uint32_t constructor = 0xbf0693d4; |
| 681 |
| 682 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 683 | void serializeToStream(NativeByteBuffer *stream); |
| 684 | }; |
| 685 |
| 686 | class TL_messageEntityBlockquote : public MessageEntity { |
| 687 |
| 688 | public: |
| 689 | static const uint32_t constructor = 0x20df5d0; |
| 690 |
| 691 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 692 | void serializeToStream(NativeByteBuffer *stream); |
| 693 | }; |
| 694 |
| 695 | class TL_messageEntityUnderline : public MessageEntity { |
| 696 |
| 697 | public: |
| 698 | static const uint32_t constructor = 0x9c4e7e8b; |
| 699 |
| 700 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 701 | void serializeToStream(NativeByteBuffer *stream); |
| 702 | }; |
| 703 |
| 704 | class TL_messageEntityPhone : public MessageEntity { |
| 705 |
| 706 | public: |
| 707 | static const uint32_t constructor = 0x9b69e34b; |
| 708 |
| 709 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 710 | void serializeToStream(NativeByteBuffer *stream); |
| 711 | }; |
| 712 |
| 713 | class TL_dataJSON : public TLObject { |
| 714 |
| 715 | public: |
| 716 | static const uint32_t constructor = 0x7d748d04; |
| 717 |
| 718 | std::string data; |
| 719 |
| 720 | static TL_dataJSON *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 721 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 722 | void serializeToStream(NativeByteBuffer *stream); |
| 723 | }; |
| 724 |
| 725 | class TL_help_termsOfService : public TLObject { |
| 726 |
| 727 | public: |
| 728 | static const uint32_t constructor = 0x780a0310; |
| 729 |
| 730 | int32_t flags; |
| 731 | bool popup; |
| 732 | std::unique_ptr<TL_dataJSON> id; |
| 733 | std::string text; |
| 734 | std::vector<std::unique_ptr<MessageEntity>> entities; |
| 735 | int32_t min_age_confirm; |
| 736 |
| 737 | static TL_help_termsOfService *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 738 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 739 | void serializeToStream(NativeByteBuffer *stream); |
| 740 | }; |
| 741 |
| 742 | class auth_Authorization : public TLObject { |
| 743 |
| 744 | public: |
| 745 | static auth_Authorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 746 | }; |
| 747 |
| 748 | class TL_auth_authorizationSignUpRequired : public auth_Authorization { |
| 749 |
| 750 | public: |
| 751 | static const uint32_t constructor = 0x44747e9a; |
| 752 |
| 753 | int32_t flags; |
| 754 | std::unique_ptr<TL_help_termsOfService> terms_of_service; |
| 755 |
| 756 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 757 | void serializeToStream(NativeByteBuffer *stream); |
| 758 | }; |
| 759 |
| 760 | class TL_auth_authorization : public auth_Authorization { |
| 761 |
| 762 | public: |
| 763 | static const uint32_t constructor = 0x2ea2c0d4; |
| 764 |
| 765 | int32_t flags; |
| 766 | int32_t tmp_sessions; |
| 767 | int32_t otherwise_relogin_days; |
| 768 | std::unique_ptr<ByteArray> future_auth_token; |
| 769 | std::unique_ptr<User> user; |
| 770 |
| 771 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 772 | void serializeToStream(NativeByteBuffer *stream); |
| 773 | }; |
| 774 |
| 775 | class TL_auth_exportedAuthorization : public TLObject { |
| 776 |
| 777 | public: |
| 778 | static const uint32_t constructor = 0xb434e2b8; |
| 779 |
| 780 | int64_t id; |
| 781 | std::unique_ptr<ByteArray> bytes; |
| 782 |
| 783 | static TL_auth_exportedAuthorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 784 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 785 | }; |
| 786 |
| 787 | class TL_auth_exportAuthorization : public TLObject { |
| 788 |
| 789 | public: |
| 790 | static const uint32_t constructor = 0xe5bfffcd; |
| 791 |
| 792 | int32_t dc_id; |
| 793 |
| 794 | bool isNeedLayer(); |
| 795 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 796 | void serializeToStream(NativeByteBuffer *stream); |
| 797 | }; |
| 798 |
| 799 | class TL_auth_importAuthorization : public TLObject { |
| 800 |
| 801 | public: |
| 802 | static const uint32_t constructor = 0xa57a7dad; |
| 803 |
| 804 | int64_t id; |
| 805 | std::unique_ptr<ByteArray> bytes; |
| 806 |
| 807 | bool isNeedLayer(); |
| 808 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 809 | void serializeToStream(NativeByteBuffer *stream); |
| 810 | }; |
| 811 |
| 812 | class TL_updatesTooLong : public TLObject { |
| 813 |
| 814 | public: |
| 815 | static const uint32_t constructor = 0xe317af7e; |
| 816 |
| 817 | void serializeToStream(NativeByteBuffer *stream); |
| 818 | }; |
| 819 |
| 820 |
| 821 | class TL_reactionCustomEmoji : public Reaction { |
| 822 |
| 823 | public: |
| 824 | static const uint32_t constructor = 0x8935fc73; |
| 825 | int64_t document_id; |
| 826 |
| 827 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 828 | void serializeToStream(NativeByteBuffer *stream); |
| 829 | }; |
| 830 |
| 831 |
| 832 | class TL_reactionEmoji : public Reaction { |
| 833 |
| 834 | public: |
| 835 | static const uint32_t constructor = 0x1b2286b8; |
| 836 | std::string emoticon; |
| 837 |
| 838 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 839 | void serializeToStream(NativeByteBuffer *stream); |
| 840 | }; |
| 841 |
| 842 |
| 843 |
| 844 | class TL_reactionEmpty : public Reaction { |
| 845 |
| 846 | public: |
| 847 | static const uint32_t constructor = 0x79f5d419; |
| 848 |
| 849 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 850 | void serializeToStream(NativeByteBuffer *stream); |
| 851 | }; |
| 852 |
| 853 | #endif |
| 854 |