| 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 | void serializeToStream(NativeByteBuffer *stream); |
| 210 | }; |
| 211 |
| 212 | class TL_userStatusEmpty : public UserStatus { |
| 213 |
| 214 | public: |
| 215 | static const uint32_t constructor = 0x9d05049; |
| 216 |
| 217 | void serializeToStream(NativeByteBuffer *stream); |
| 218 | }; |
| 219 |
| 220 | class TL_userStatusLastMonth : public UserStatus { |
| 221 |
| 222 | public: |
| 223 | static const uint32_t constructor = 0x77ebc742; |
| 224 |
| 225 | void serializeToStream(NativeByteBuffer *stream); |
| 226 | }; |
| 227 |
| 228 | class TL_userStatusOnline : public UserStatus { |
| 229 |
| 230 | public: |
| 231 | static const uint32_t constructor = 0xedb93949; |
| 232 |
| 233 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 234 | void serializeToStream(NativeByteBuffer *stream); |
| 235 | }; |
| 236 |
| 237 | class TL_userStatusRecently : public UserStatus { |
| 238 |
| 239 | public: |
| 240 | static const uint32_t constructor = 0xe26f42f1; |
| 241 |
| 242 | void serializeToStream(NativeByteBuffer *stream); |
| 243 | }; |
| 244 |
| 245 | class FileLocation : public TLObject { |
| 246 |
| 247 | public: |
| 248 | int64_t volume_id; |
| 249 | int32_t local_id; |
| 250 |
| 251 | static FileLocation *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 252 | }; |
| 253 |
| 254 | class TL_fileLocationToBeDeprecated : public FileLocation { |
| 255 |
| 256 | public: |
| 257 | static const uint32_t constructor = 0xbc7fc6cd; |
| 258 |
| 259 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 260 | void serializeToStream(NativeByteBuffer *stream); |
| 261 | }; |
| 262 |
| 263 | class UserProfilePhoto : public TLObject { |
| 264 |
| 265 | public: |
| 266 | int32_t flags; |
| 267 | bool has_video; |
| 268 | int64_t photo_id; |
| 269 | std::unique_ptr<ByteArray> stripped_thumb; |
| 270 | int32_t dc_id; |
| 271 |
| 272 | static UserProfilePhoto *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 273 | }; |
| 274 |
| 275 | class TL_userProfilePhotoEmpty : public UserProfilePhoto { |
| 276 |
| 277 | public: |
| 278 | static const uint32_t constructor = 0x4f11bae1; |
| 279 |
| 280 | void serializeToStream(NativeByteBuffer *stream); |
| 281 | }; |
| 282 |
| 283 | class TL_userProfilePhoto : public UserProfilePhoto { |
| 284 |
| 285 | public: |
| 286 | static const uint32_t constructor = 0x82d1f706; |
| 287 |
| 288 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 289 | void serializeToStream(NativeByteBuffer *stream); |
| 290 | }; |
| 291 |
| 292 | class TL_restrictionReason : public TLObject { |
| 293 |
| 294 | public: |
| 295 | static const uint32_t constructor = 0xd072acb4; |
| 296 |
| 297 | std::string platform; |
| 298 | std::string reason; |
| 299 | std::string text; |
| 300 |
| 301 | static TL_restrictionReason *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 302 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 303 | void serializeToStream(NativeByteBuffer *stream); |
| 304 | }; |
| 305 |
| 306 | class TL_username : public TLObject { |
| 307 |
| 308 | public: |
| 309 | static const uint32_t constructor = 0xb4073647; |
| 310 | int32_t flags; |
| 311 | bool editable; |
| 312 | bool active; |
| 313 | std::string username; |
| 314 |
| 315 | static TL_username *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 316 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 317 | void serializeToStream(NativeByteBuffer *stream); |
| 318 | }; |
| 319 |
| 320 | class User : public TLObject { |
| 321 |
| 322 | public: |
| 323 | int64_t id; |
| 324 | std::string first_name; |
| 325 | std::string last_name; |
| 326 | std::string username; |
| 327 | int64_t access_hash; |
| 328 | std::string phone; |
| 329 | std::unique_ptr<UserProfilePhoto> photo; |
| 330 | std::unique_ptr<UserStatus> status; |
| 331 | int32_t flags; |
| 332 | int32_t flags2; |
| 333 | int32_t bot_info_version; |
| 334 | std::vector<std::unique_ptr<TL_restrictionReason>> restriction_reason; |
| 335 | std::string bot_inline_placeholder; |
| 336 | std::string lang_code; |
| 337 | std::vector<std::unique_ptr<TL_username>> usernames; |
| 338 |
| 339 | static User *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 340 | }; |
| 341 |
| 342 | class TL_userEmpty : public User { |
| 343 |
| 344 | public: |
| 345 | static const uint32_t constructor = 0xd3bc4b7a; |
| 346 |
| 347 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 348 | void serializeToStream(NativeByteBuffer *stream); |
| 349 | }; |
| 350 |
| 351 | class TL_user : public User { |
| 352 |
| 353 | public: |
| 354 | static const uint32_t constructor = 0x8f97c628; |
| 355 |
| 356 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 357 | void serializeToStream(NativeByteBuffer *stream); |
| 358 | }; |
| 359 |
| 360 | class InputPeer : public TLObject { |
| 361 |
| 362 | public: |
| 363 | int64_t user_id; |
| 364 | int64_t chat_id; |
| 365 | int64_t channel_id; |
| 366 | int64_t access_hash; |
| 367 |
| 368 | static InputPeer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 369 | }; |
| 370 |
| 371 | class TL_inputPeerSelf : public InputPeer { |
| 372 |
| 373 | public: |
| 374 | static const uint32_t constructor = 0x7da07ec9; |
| 375 |
| 376 | void serializeToStream(NativeByteBuffer *stream); |
| 377 | }; |
| 378 |
| 379 | class TL_inputPeerUser : public InputPeer { |
| 380 |
| 381 | public: |
| 382 | static const uint32_t constructor = 0xdde8a54c; |
| 383 |
| 384 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 385 | void serializeToStream(NativeByteBuffer *stream); |
| 386 | }; |
| 387 |
| 388 | class TL_inputPeerChat : public InputPeer { |
| 389 |
| 390 | public: |
| 391 | static const uint32_t constructor = 0x35a95cb9; |
| 392 |
| 393 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 394 | void serializeToStream(NativeByteBuffer *stream); |
| 395 | }; |
| 396 |
| 397 | class TL_inputPeerUserFromMessage : public InputPeer { |
| 398 |
| 399 | public: |
| 400 | static const uint32_t constructor = 0xa87b0a1c; |
| 401 |
| 402 | std::unique_ptr<InputPeer> peer; |
| 403 | int32_t msg_id; |
| 404 |
| 405 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 406 | void serializeToStream(NativeByteBuffer *stream); |
| 407 | }; |
| 408 |
| 409 | class TL_inputPeerChannelFromMessage : public InputPeer { |
| 410 |
| 411 | public: |
| 412 | static const uint32_t constructor = 0xbd2a0840; |
| 413 |
| 414 | std::unique_ptr<InputPeer> peer; |
| 415 | int32_t msg_id; |
| 416 |
| 417 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 418 | void serializeToStream(NativeByteBuffer *stream); |
| 419 | }; |
| 420 |
| 421 | class TL_inputPeerChannel : public InputPeer { |
| 422 |
| 423 | public: |
| 424 | static const uint32_t constructor = 0x27bcbbfc; |
| 425 |
| 426 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 427 | void serializeToStream(NativeByteBuffer *stream); |
| 428 | }; |
| 429 |
| 430 | class TL_inputPeerEmpty : public InputPeer { |
| 431 |
| 432 | public: |
| 433 | static const uint32_t constructor = 0x7f3b18ea; |
| 434 |
| 435 | void serializeToStream(NativeByteBuffer *stream); |
| 436 | }; |
| 437 |
| 438 | class InputUser : public TLObject { |
| 439 |
| 440 | public: |
| 441 | int64_t user_id; |
| 442 | int64_t access_hash; |
| 443 |
| 444 | static InputUser *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 445 | }; |
| 446 |
| 447 | class TL_inputUserSelf : public InputUser { |
| 448 |
| 449 | public: |
| 450 | static const uint32_t constructor = 0xf7c1b13f; |
| 451 |
| 452 | void serializeToStream(NativeByteBuffer *stream); |
| 453 | }; |
| 454 |
| 455 | class TL_inputUser : public InputUser { |
| 456 |
| 457 | public: |
| 458 | static const uint32_t constructor = 0xf21158c6; |
| 459 |
| 460 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 461 | void serializeToStream(NativeByteBuffer *stream); |
| 462 | }; |
| 463 |
| 464 | class TL_inputUserEmpty : public InputUser { |
| 465 |
| 466 | public: |
| 467 | static const uint32_t constructor = 0xb98886cf; |
| 468 |
| 469 | void serializeToStream(NativeByteBuffer *stream); |
| 470 | }; |
| 471 |
| 472 | class TL_inputUserFromMessage : public InputUser { |
| 473 |
| 474 | public: |
| 475 | static const uint32_t constructor = 0x1da448e2; |
| 476 |
| 477 | std::unique_ptr<InputPeer> peer; |
| 478 | int32_t msg_id; |
| 479 |
| 480 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 481 | void serializeToStream(NativeByteBuffer *stream); |
| 482 | }; |
| 483 |
| 484 | class MessageEntity : public TLObject { |
| 485 |
| 486 | public: |
| 487 | int32_t offset; |
| 488 | int32_t length; |
| 489 | std::string url; |
| 490 | std::string language; |
| 491 |
| 492 | static MessageEntity *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 493 | }; |
| 494 |
| 495 | class TL_messageEntityTextUrl : public MessageEntity { |
| 496 |
| 497 | public: |
| 498 | static const uint32_t constructor = 0x76a6d327; |
| 499 |
| 500 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 501 | void serializeToStream(NativeByteBuffer *stream); |
| 502 | }; |
| 503 |
| 504 | class TL_messageEntityBotCommand : public MessageEntity { |
| 505 |
| 506 | public: |
| 507 | static const uint32_t constructor = 0x6cef8ac7; |
| 508 |
| 509 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 510 | void serializeToStream(NativeByteBuffer *stream); |
| 511 | }; |
| 512 |
| 513 | class TL_messageEntityEmail : public MessageEntity { |
| 514 |
| 515 | public: |
| 516 | static const uint32_t constructor = 0x64e475c2; |
| 517 |
| 518 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 519 | void serializeToStream(NativeByteBuffer *stream); |
| 520 | }; |
| 521 |
| 522 | class TL_messageEntityPre : public MessageEntity { |
| 523 |
| 524 | public: |
| 525 | static const uint32_t constructor = 0x73924be0; |
| 526 |
| 527 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 528 | void serializeToStream(NativeByteBuffer *stream); |
| 529 | }; |
| 530 |
| 531 | class TL_messageEntityUnknown : public MessageEntity { |
| 532 | public: |
| 533 | static const uint32_t constructor = 0xbb92ba95; |
| 534 |
| 535 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 536 | void serializeToStream(NativeByteBuffer *stream); |
| 537 | }; |
| 538 |
| 539 | class TL_messageEntityUrl : public MessageEntity { |
| 540 |
| 541 | public: |
| 542 | static const uint32_t constructor = 0x6ed02538; |
| 543 |
| 544 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 545 | void serializeToStream(NativeByteBuffer *stream); |
| 546 | }; |
| 547 |
| 548 | class TL_messageEntityItalic : public MessageEntity { |
| 549 |
| 550 | public: |
| 551 | static const uint32_t constructor = 0x826f8b60; |
| 552 |
| 553 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 554 | void serializeToStream(NativeByteBuffer *stream); |
| 555 | }; |
| 556 |
| 557 | class TL_messageEntityMention : public MessageEntity { |
| 558 |
| 559 | public: |
| 560 | static const uint32_t constructor = 0xfa04579d; |
| 561 |
| 562 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 563 | void serializeToStream(NativeByteBuffer *stream); |
| 564 | }; |
| 565 |
| 566 | class TL_messageEntityMentionName : public MessageEntity { |
| 567 |
| 568 | public: |
| 569 | static const uint32_t constructor = 0xdc7b1140; |
| 570 |
| 571 | int64_t user_id; |
| 572 |
| 573 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 574 | void serializeToStream(NativeByteBuffer *stream); |
| 575 | }; |
| 576 |
| 577 | class TL_inputMessageEntityMentionName : public MessageEntity { |
| 578 |
| 579 | public: |
| 580 | static const uint32_t constructor = 0x208e68c9; |
| 581 |
| 582 | std::unique_ptr<InputUser> user_id; |
| 583 |
| 584 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 585 | void serializeToStream(NativeByteBuffer *stream); |
| 586 | }; |
| 587 |
| 588 | class TL_messageEntityCashtag : public MessageEntity { |
| 589 |
| 590 | public: |
| 591 | static const uint32_t constructor = 0x4c4e743f; |
| 592 |
| 593 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 594 | void serializeToStream(NativeByteBuffer *stream); |
| 595 | }; |
| 596 |
| 597 | class TL_messageEntityBold : public MessageEntity { |
| 598 |
| 599 | public: |
| 600 | static const uint32_t constructor = 0xbd610bc9; |
| 601 |
| 602 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 603 | void serializeToStream(NativeByteBuffer *stream); |
| 604 | }; |
| 605 |
| 606 | class TL_messageEntityHashtag : public MessageEntity { |
| 607 |
| 608 | public: |
| 609 | static const uint32_t constructor = 0x6f635b0d; |
| 610 |
| 611 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 612 | void serializeToStream(NativeByteBuffer *stream); |
| 613 | }; |
| 614 |
| 615 | class TL_messageEntityCode : public MessageEntity { |
| 616 |
| 617 | public: |
| 618 | static const uint32_t constructor = 0x28a20571; |
| 619 |
| 620 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 621 | void serializeToStream(NativeByteBuffer *stream); |
| 622 | }; |
| 623 |
| 624 | class TL_messageEntityStrike : public MessageEntity { |
| 625 |
| 626 | public: |
| 627 | static const uint32_t constructor = 0xbf0693d4; |
| 628 |
| 629 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 630 | void serializeToStream(NativeByteBuffer *stream); |
| 631 | }; |
| 632 |
| 633 | class TL_messageEntityBlockquote : public MessageEntity { |
| 634 |
| 635 | public: |
| 636 | static const uint32_t constructor = 0x20df5d0; |
| 637 |
| 638 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 639 | void serializeToStream(NativeByteBuffer *stream); |
| 640 | }; |
| 641 |
| 642 | class TL_messageEntityUnderline : public MessageEntity { |
| 643 |
| 644 | public: |
| 645 | static const uint32_t constructor = 0x9c4e7e8b; |
| 646 |
| 647 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 648 | void serializeToStream(NativeByteBuffer *stream); |
| 649 | }; |
| 650 |
| 651 | class TL_messageEntityPhone : public MessageEntity { |
| 652 |
| 653 | public: |
| 654 | static const uint32_t constructor = 0x9b69e34b; |
| 655 |
| 656 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 657 | void serializeToStream(NativeByteBuffer *stream); |
| 658 | }; |
| 659 |
| 660 | class TL_dataJSON : public TLObject { |
| 661 |
| 662 | public: |
| 663 | static const uint32_t constructor = 0x7d748d04; |
| 664 |
| 665 | std::string data; |
| 666 |
| 667 | static TL_dataJSON *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 668 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 669 | void serializeToStream(NativeByteBuffer *stream); |
| 670 | }; |
| 671 |
| 672 | class TL_help_termsOfService : public TLObject { |
| 673 |
| 674 | public: |
| 675 | static const uint32_t constructor = 0x780a0310; |
| 676 |
| 677 | int32_t flags; |
| 678 | bool popup; |
| 679 | std::unique_ptr<TL_dataJSON> id; |
| 680 | std::string text; |
| 681 | std::vector<std::unique_ptr<MessageEntity>> entities; |
| 682 | int32_t min_age_confirm; |
| 683 |
| 684 | static TL_help_termsOfService *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 685 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 686 | void serializeToStream(NativeByteBuffer *stream); |
| 687 | }; |
| 688 |
| 689 | class auth_Authorization : public TLObject { |
| 690 |
| 691 | public: |
| 692 | static auth_Authorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 693 | }; |
| 694 |
| 695 | class TL_auth_authorizationSignUpRequired : public auth_Authorization { |
| 696 |
| 697 | public: |
| 698 | static const uint32_t constructor = 0x44747e9a; |
| 699 |
| 700 | int32_t flags; |
| 701 | std::unique_ptr<TL_help_termsOfService> terms_of_service; |
| 702 |
| 703 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 704 | void serializeToStream(NativeByteBuffer *stream); |
| 705 | }; |
| 706 |
| 707 | class TL_auth_authorization : public auth_Authorization { |
| 708 |
| 709 | public: |
| 710 | static const uint32_t constructor = 0x2ea2c0d4; |
| 711 |
| 712 | int32_t flags; |
| 713 | int32_t tmp_sessions; |
| 714 | int32_t otherwise_relogin_days; |
| 715 | std::unique_ptr<ByteArray> future_auth_token; |
| 716 | std::unique_ptr<User> user; |
| 717 |
| 718 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 719 | void serializeToStream(NativeByteBuffer *stream); |
| 720 | }; |
| 721 |
| 722 | class TL_auth_exportedAuthorization : public TLObject { |
| 723 |
| 724 | public: |
| 725 | static const uint32_t constructor = 0xb434e2b8; |
| 726 |
| 727 | int64_t id; |
| 728 | std::unique_ptr<ByteArray> bytes; |
| 729 |
| 730 | static TL_auth_exportedAuthorization *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 731 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 732 | }; |
| 733 |
| 734 | class TL_auth_exportAuthorization : public TLObject { |
| 735 |
| 736 | public: |
| 737 | static const uint32_t constructor = 0xe5bfffcd; |
| 738 |
| 739 | int32_t dc_id; |
| 740 |
| 741 | bool isNeedLayer(); |
| 742 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 743 | void serializeToStream(NativeByteBuffer *stream); |
| 744 | }; |
| 745 |
| 746 | class TL_auth_importAuthorization : public TLObject { |
| 747 |
| 748 | public: |
| 749 | static const uint32_t constructor = 0xa57a7dad; |
| 750 |
| 751 | int64_t id; |
| 752 | std::unique_ptr<ByteArray> bytes; |
| 753 |
| 754 | bool isNeedLayer(); |
| 755 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error); |
| 756 | void serializeToStream(NativeByteBuffer *stream); |
| 757 | }; |
| 758 |
| 759 | class TL_updatesTooLong : public TLObject { |
| 760 |
| 761 | public: |
| 762 | static const uint32_t constructor = 0xe317af7e; |
| 763 |
| 764 | void serializeToStream(NativeByteBuffer *stream); |
| 765 | }; |
| 766 |
| 767 |
| 768 | class TL_reactionCustomEmoji : public Reaction { |
| 769 |
| 770 | public: |
| 771 | static const uint32_t constructor = 0x8935fc73; |
| 772 | int64_t document_id; |
| 773 |
| 774 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 775 | void serializeToStream(NativeByteBuffer *stream); |
| 776 | }; |
| 777 |
| 778 |
| 779 | class TL_reactionEmoji : public Reaction { |
| 780 |
| 781 | public: |
| 782 | static const uint32_t constructor = 0x1b2286b8; |
| 783 | std::string emoticon; |
| 784 |
| 785 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 786 | void serializeToStream(NativeByteBuffer *stream); |
| 787 | }; |
| 788 |
| 789 |
| 790 |
| 791 | class TL_reactionEmpty : public Reaction { |
| 792 |
| 793 | public: |
| 794 | static const uint32_t constructor = 0x79f5d419; |
| 795 |
| 796 | void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error); |
| 797 | void serializeToStream(NativeByteBuffer *stream); |
| 798 | }; |
| 799 |
| 800 | #endif |
| 801 |