| 6 |
| * Copyright Nikolai Kudashov, 2015. |
| 7 | */ |
| 8 |
| 9 | #ifndef MTPROTOSCHEME_H |
| 10 | #define MTPROTOSCHEME_H |
| 11 |
| 12 | #include <vector> |
| 13 | #include <memory> |
| 14 | #include <map> |
| 15 | #include <bits/unique_ptr.h> |
| 16 | #include "TLObject.h" |
| 17 |
| 18 | class ByteArray; |
| 19 | class NativeByteBuffer; |
| 20 |
| 21 | class TLClassStore { |
| 22 |
| 23 | public: |
| 24 | static TLObject *TLdeserialize(NativeByteBuffer *stream, uint32_t bytes, uint32_t constructor, bool &error); |
| 25 |
| 26 | }; |
| 27 |
| 28 | class TL_api_request : public TLObject { |
| 29 |
| 30 | public: |
| 31 | NativeByteBuffer *request = nullptr; |
| 32 |
| 33 | ~TL_api_request(); |
| 34 | bool isNeedLayer(); |
| 35 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t bytes, bool &error); |
| 36 | void serializeToStream(NativeByteBuffer *stream); |
| 37 | }; |
| 38 |
| 39 | class TL_api_response : public TLObject { |
| 40 |
| 41 | public: |
| 42 | std::unique_ptr<NativeByteBuffer> response; |
| 43 |
| 44 | void readParamsEx(NativeByteBuffer *stream, uint32_t bytes, bool &error); |
| 45 | }; |
| 46 |
| 47 | class TL_future_salt : public TLObject { |
| 48 |
| 49 | public: |
| 50 | static const uint32_t constructor = 0x0949d9dc; |
| 51 |
| 52 | int32_t valid_since; |
| 53 | int32_t valid_until; |
| 54 | int64_t salt; |
| 55 |
| 56 | static TL_future_salt *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 57 | void readParams(NativeByteBuffer *stream, bool &error); |
| 58 | }; |
| 59 |
| 60 | class TL_msgs_state_info : public TLObject { |
| 61 |
| 62 | public: |
| 63 | static const uint32_t constructor = 0x04deb57d; |
| 64 |
| 65 | int64_t req_msg_id; |
| 66 | std::unique_ptr<ByteArray> info; |
| 67 |
| 68 | static TL_msgs_state_info *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 69 | void readParams(NativeByteBuffer *stream, bool &error); |
| 70 | void serializeToStream(NativeByteBuffer *stream); |
| 71 | }; |
| 72 |
| 73 | class Server_DH_Params : public TLObject { |
| 74 |
| 75 | public: |
| 76 | std::unique_ptr<ByteArray> nonce; |
| 77 | std::unique_ptr<ByteArray> server_nonce; |
| 78 | std::unique_ptr<ByteArray> new_nonce_hash; |
| 79 | std::unique_ptr<ByteArray> encrypted_answer; |
| 80 |
| 81 | static Server_DH_Params *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 82 | }; |
| 83 |
| 84 | class TL_server_DH_params_fail : public Server_DH_Params { |
| 85 |
| 86 | public: |
| 87 | static const uint32_t constructor = 0x79cb045d; |
| 88 |
| 89 | void readParams(NativeByteBuffer *stream, bool &error); |
| 90 | }; |
| 91 |
| 92 | class TL_server_DH_params_ok : public Server_DH_Params { |
| 93 |
| 94 | public: |
| 95 | static const uint32_t constructor = 0xd0e8075c; |
| 96 |
| 97 | void readParams(NativeByteBuffer *stream, bool &error); |
| 98 | }; |
| 99 |
| 100 | class TL_resPQ : public TLObject { |
| 101 |
| 102 | public: |
| 103 | static const uint32_t constructor = 0x05162463; |
| 104 |
| 105 | std::unique_ptr<ByteArray> nonce; |
| 106 | std::unique_ptr<ByteArray> server_nonce; |
| 107 | std::unique_ptr<ByteArray> pq; |
| 108 | std::vector<int64_t> server_public_key_fingerprints; |
| 109 |
| 110 | static TL_resPQ *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 111 | void readParams(NativeByteBuffer *stream, bool &error); |
| 112 | }; |
| 113 |
| 114 | class TL_p_q_inner_data : public TLObject { |
| 115 |
| 116 | public: |
| 117 | static const uint32_t constructor = 0x83c95aec; |
| 118 |
| 119 | std::unique_ptr<ByteArray> pq; |
| 120 | std::unique_ptr<ByteArray> p; |
| 121 | std::unique_ptr<ByteArray> q; |
| 122 | std::unique_ptr<ByteArray> nonce; |
| 123 | std::unique_ptr<ByteArray> server_nonce; |
| 124 | std::unique_ptr<ByteArray> new_nonce; |
| 125 |
| 126 | void serializeToStream(NativeByteBuffer *stream); |
| 127 | }; |
| 128 |
| 129 | class TL_pong : public TLObject { |
| 130 |
| 131 | public: |
| 132 | static const uint32_t constructor = 0x347773c5; |
| 133 |
| 134 | int64_t msg_id; |
| 135 | int64_t ping_id; |
| 136 |
| 137 | static TL_pong *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 138 | void readParams(NativeByteBuffer *stream, bool &error); |
| 139 | }; |
| 140 |
| 141 | class TL_future_salts : public TLObject { |
| 142 |
| 143 | public: |
| 144 | static const uint32_t constructor = 0xae500895; |
| 145 |
| 146 | int64_t req_msg_id; |
| 147 | int32_t now; |
| 148 | std::vector<std::unique_ptr<TL_future_salt>> salts; |
| 149 |
| 150 | static TL_future_salts *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 151 | void readParams(NativeByteBuffer *stream, bool &error); |
| 152 | }; |
| 153 |
| 154 | class RpcDropAnswer : public TLObject { |
| 155 |
| 156 | public: |
| 157 | int64_t msg_id; |
| 158 | int32_t seq_no; |
| 159 | int32_t bytes; |
| 160 |
| 161 | static RpcDropAnswer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 162 | }; |
| 163 |
| 164 | class TL_rpc_answer_unknown : public RpcDropAnswer { |
| 165 |
| 166 | public: |
| 167 | static const uint32_t constructor = 0x5e2ad36e; |
| 168 |
| 169 | void serializeToStream(NativeByteBuffer *stream); |
| 170 | }; |
| 171 |
| 172 | class TL_rpc_answer_dropped : public RpcDropAnswer { |
| 173 |
| 174 | public: |
| 175 | static const uint32_t constructor = 0xa43ad8b7; |
| 176 |
| 177 | void readParams(NativeByteBuffer *stream, bool &error); |
| 178 | }; |
| 179 |
| 180 | class TL_rpc_answer_dropped_running : public RpcDropAnswer { |
| 181 |
| 182 | public: |
| 183 | static const uint32_t constructor = 0xcd78e586; |
| 184 |
| 185 | void serializeToStream(NativeByteBuffer *stream); |
| 186 | }; |
| 187 |
| 188 | class Set_client_DH_params_answer : public TLObject { |
| 189 |
| 190 | public: |
| 191 | std::unique_ptr<ByteArray> nonce; |
| 192 | std::unique_ptr<ByteArray> server_nonce; |
| 193 | std::unique_ptr<ByteArray> new_nonce_hash2; |
| 194 | std::unique_ptr<ByteArray> new_nonce_hash3; |
| 195 | std::unique_ptr<ByteArray> new_nonce_hash1; |
| 196 |
| 197 | static Set_client_DH_params_answer *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 198 | }; |
| 199 |
| 200 | class TL_message : public TLObject { |
| 201 |
| 202 | public: |
| 203 | static const uint32_t constructor = 0x5bb8e511; |
| 204 |
| 205 | int64_t msg_id; |
| 206 | int32_t seqno; |
| 207 | int32_t bytes; |
| 208 | std::unique_ptr<TLObject> body; |
| 209 | TLObject *outgoingBody = nullptr; |
| 210 | std::unique_ptr<NativeByteBuffer> unparsedBody; |
| 211 |
| 212 | static TL_message *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 213 | void readParams(NativeByteBuffer *stream, bool &error); |
| 214 | void serializeToStream(NativeByteBuffer *stream); |
| 215 | }; |
| 216 |
| 217 | class TL_dh_gen_retry : public Set_client_DH_params_answer { |
| 218 |
| 219 | public: |
| 220 | static const uint32_t constructor = 0x46dc1fb9; |
| 221 |
| 222 | void readParams(NativeByteBuffer *stream, bool &error); |
| 223 | }; |
| 224 |
| 225 | class TL_dh_gen_fail : public Set_client_DH_params_answer { |
| 226 |
| 227 | public: |
| 228 | static const uint32_t constructor = 0xa69dae02; |
| 229 |
| 230 | void readParams(NativeByteBuffer *stream, bool &error); |
| 231 | }; |
| 232 |
| 233 | class TL_dh_gen_ok : public Set_client_DH_params_answer { |
| 234 |
| 235 | public: |
| 236 | static const uint32_t constructor = 0x3bcbf734; |
| 237 |
| 238 | void readParams(NativeByteBuffer *stream, bool &error); |
| 239 | }; |
| 240 |
| 241 | class BadMsgNotification : public TLObject { |
| 242 |
| 243 | public: |
| 244 | int64_t bad_msg_id; |
| 245 | int32_t bad_msg_seqno; |
| 246 | int32_t error_code; |
| 247 | int64_t new_server_salt; |
| 248 |
| 249 | static BadMsgNotification *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 250 | }; |
| 251 |
| 252 | class TL_bad_msg_notification : public BadMsgNotification { |
| 253 |
| 254 | public: |
| 255 | static const uint32_t constructor = 0xa7eff811; |
| 256 |
| 257 | void readParams(NativeByteBuffer *stream, bool &error); |
| 258 | }; |
| 259 |
| 260 | class TL_bad_server_salt : public BadMsgNotification { |
| 261 |
| 262 | public: |
| 263 | static const uint32_t constructor = 0xedab447b; |
| 264 |
| 265 | void readParams(NativeByteBuffer *stream, bool &error); |
| 266 | }; |
| 267 |
| 268 | class TL_msgs_state_req : public TLObject { |
| 269 |
| 270 | public: |
| 271 | static const uint32_t constructor = 0xda69fb52; |
| 272 |
| 273 | std::vector<int64_t> msg_ids; |
| 274 |
| 275 | static TL_msgs_state_req *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 276 | void readParams(NativeByteBuffer *stream, bool &error); |
| 277 | void serializeToStream(NativeByteBuffer *stream); |
| 278 | }; |
| 279 |
| 280 | class MsgDetailedInfo : public TLObject { |
| 281 |
| 282 | public: |
| 283 | int64_t answer_msg_id; |
| 284 | int32_t bytes; |
| 285 | int32_t status; |
| 286 | int64_t msg_id; |
| 287 |
| 288 | static MsgDetailedInfo *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 289 | }; |
| 290 |
| 291 | class TL_msg_new_detailed_info : public MsgDetailedInfo { |
| 292 |
| 293 | public: |
| 294 | static const uint32_t constructor = 0x809db6df; |
| 295 |
| 296 | void readParams(NativeByteBuffer *stream, bool &error); |
| 297 | }; |
| 298 |
| 299 | class TL_msg_detailed_info : public MsgDetailedInfo { |
| 300 |
| 301 | public: |
| 302 | static const uint32_t constructor = 0x276d3ec6; |
| 303 |
| 304 | void readParams(NativeByteBuffer *stream, bool &error); |
| 305 | }; |
| 306 |
| 307 | class TL_msg_copy : public TLObject { |
| 308 |
| 309 | public: |
| 310 | static const uint32_t constructor = 0xe06046b2; |
| 311 |
| 312 | std::unique_ptr<TL_message> orig_message; |
| 313 |
| 314 | static TL_msg_copy *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 315 | void readParams(NativeByteBuffer *stream, bool &error); |
| 316 | void serializeToStream(NativeByteBuffer *stream); |
| 317 | }; |
| 318 |
| 319 | class TL_msgs_all_info : public TLObject { |
| 320 |
| 321 | public: |
| 322 | static const uint32_t constructor = 0x8cc0d131; |
| 323 |
| 324 | std::vector<int64_t> msg_ids; |
| 325 | std::unique_ptr<ByteArray> info; |
| 326 |
| 327 | static TL_msgs_all_info *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 328 | void readParams(NativeByteBuffer *stream, bool &error); |
| 329 | }; |
| 330 |
| 331 | class TL_rpc_result : public TLObject { |
| 332 |
| 333 | public: |
| 334 | static const uint32_t constructor = 0xf35c6d01; |
| 335 |
| 336 | int64_t req_msg_id; |
| 337 | std::unique_ptr<TLObject> result; |
| 338 |
| 339 | void readParamsEx(NativeByteBuffer *stream, uint32_t bytes, bool &error); |
| 340 | }; |
| 341 |
| 342 | class TL_new_session_created : public TLObject { |
| 343 |
| 344 | public: |
| 345 | static const uint32_t constructor = 0x9ec20908; |
| 346 |
| 347 | int64_t first_msg_id; |
| 348 | int64_t unique_id; |
| 349 | int64_t server_salt; |
| 350 |
| 351 | void readParams(NativeByteBuffer *stream, bool &error); |
| 352 | }; |
| 353 |
| 354 | class DestroySessionRes : public TLObject { |
| 355 |
| 356 | public: |
| 357 | int64_t session_id; |
| 358 |
| 359 | static DestroySessionRes *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 360 | }; |
| 361 |
| 362 | class TL_destroy_session_ok : public DestroySessionRes { |
| 363 |
| 364 | public: |
| 365 | static const uint32_t constructor = 0xe22045fc; |
| 366 |
| 367 | void readParams(NativeByteBuffer *stream, bool &error); |
| 368 | }; |
| 369 |
| 370 | class TL_destroy_session_none : public DestroySessionRes { |
| 371 |
| 372 | public: |
| 373 | static const uint32_t constructor = 0x62d350c9; |
| 374 |
| 375 | void readParams(NativeByteBuffer *stream, bool &error); |
| 376 | }; |
| 377 |
| 378 | class TL_msgs_ack : public TLObject { |
| 379 |
| 380 | public: |
| 381 | static const uint32_t constructor = 0x62d6b459; |
| 382 |
| 383 | std::vector<int64_t> msg_ids; |
| 384 |
| 385 | static TL_msgs_ack *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 386 | void readParams(NativeByteBuffer *stream, bool &error); |
| 387 | void serializeToStream(NativeByteBuffer *stream); |
| 388 | }; |
| 389 |
| 390 | class TL_msg_container : public TLObject { |
| 391 |
| 392 | public: |
| 393 | static const uint32_t constructor = 0x73f1f8dc; |
| 394 |
| 395 | std::vector<std::unique_ptr<TL_message>> messages; |
| 396 |
| 397 | static TL_msg_container *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 398 | void readParams(NativeByteBuffer *stream, bool &error); |
| 399 | void serializeToStream(NativeByteBuffer *stream); |
| 400 | }; |
| 401 |
| 402 | class TL_msg_resend_req : public TLObject { |
| 403 |
| 404 | public: |
| 405 | static const uint32_t constructor = 0x7d861a08; |
| 406 |
| 407 | std::vector<int64_t> msg_ids; |
| 408 |
| 409 | static TL_msg_resend_req *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 410 | void readParams(NativeByteBuffer *stream, bool &error); |
| 411 | void serializeToStream(NativeByteBuffer *stream); |
| 412 | }; |
| 413 |
| 414 | class MsgsStateInfo : public TLObject { |
| 415 |
| 416 | public: |
| 417 | static const uint32_t constructor = 0x04deb57d; |
| 418 |
| 419 | int64_t req_msg_id; |
| 420 | std::string info; |
| 421 |
| 422 | void readParams(NativeByteBuffer *stream, bool &error); |
| 423 | }; |
| 424 |
| 425 | class RpcError : public TLObject { |
| 426 |
| 427 | public: |
| 428 | int32_t error_code; |
| 429 | std::string error_message; |
| 430 | int64_t query_id; |
| 431 | }; |
| 432 |
| 433 | class TL_rpc_error : public RpcError { |
| 434 |
| 435 | public: |
| 436 | static const uint32_t constructor = 0x2144ca19; |
| 437 |
| 438 | void readParams(NativeByteBuffer *stream, bool &error); |
| 439 | }; |
| 440 |
| 441 | class TL_rpc_req_error : public RpcError { |
| 442 |
| 443 | public: |
| 444 | static const uint32_t constructor = 0x7ae432f5; |
| 445 |
| 446 | void readParams(NativeByteBuffer *stream, bool &error); |
| 447 | }; |
| 448 |
| 449 | class TL_client_DH_inner_data : public TLObject { |
| 450 |
| 451 | public: |
| 452 | static const uint32_t constructor = 0x6643b654; |
| 453 |
| 454 | std::unique_ptr<ByteArray> nonce; |
| 455 | std::unique_ptr<ByteArray> server_nonce; |
| 456 | int64_t retry_id; |
| 457 | std::unique_ptr<ByteArray> g_b; |
| 458 |
| 459 | void serializeToStream(NativeByteBuffer *stream); |
| 460 | }; |
| 461 |
| 462 | class TL_server_DH_inner_data : public TLObject { |
| 463 |
| 464 | public: |
| 465 | static const uint32_t constructor = 0xb5890dba; |
| 466 |
| 467 | std::unique_ptr<ByteArray> nonce; |
| 468 | std::unique_ptr<ByteArray> server_nonce; |
| 469 | uint32_t g; |
| 470 | std::unique_ptr<ByteArray> dh_prime; |
| 471 | std::unique_ptr<ByteArray> g_a; |
| 472 | int32_t server_time; |
| 473 |
| 474 | static TL_server_DH_inner_data *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 475 | void readParams(NativeByteBuffer *stream, bool &error); |
| 476 | void serializeToStream(NativeByteBuffer *stream); |
| 477 | }; |
| 478 |
| 479 | class TL_req_pq : public TLObject { |
| 480 |
| 481 | public: |
| 482 | static const uint32_t constructor = 0x60469778; |
| 483 |
| 484 | std::unique_ptr<ByteArray> nonce; |
| 485 |
| 486 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 487 | void serializeToStream(NativeByteBuffer *stream); |
| 488 | }; |
| 489 |
| 490 | class TL_req_DH_params : public TLObject { |
| 491 |
| 492 | public: |
| 493 | static const uint32_t constructor = 0xd712e4be; |
| 494 |
| 495 | std::unique_ptr<ByteArray> nonce; |
| 496 | std::unique_ptr<ByteArray> server_nonce; |
| 497 | std::unique_ptr<ByteArray> p; |
| 498 | std::unique_ptr<ByteArray> q; |
| 499 | int64_t public_key_fingerprint; |
| 500 | std::unique_ptr<ByteArray> encrypted_data; |
| 501 |
| 502 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 503 | void serializeToStream(NativeByteBuffer *stream); |
| 504 | }; |
| 505 |
| 506 | class TL_set_client_DH_params : public TLObject { |
| 507 |
| 508 | public: |
| 509 | static const uint32_t constructor = 0xf5045f1f; |
| 510 |
| 511 | std::unique_ptr<ByteArray> nonce; |
| 512 | std::unique_ptr<ByteArray> server_nonce; |
| 513 | std::unique_ptr<ByteArray> encrypted_data; |
| 514 |
| 515 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 516 | void serializeToStream(NativeByteBuffer *stream); |
| 517 | }; |
| 518 |
| 519 | class TL_rpc_drop_answer : public TLObject { |
| 520 |
| 521 | public: |
| 522 | static const uint32_t constructor = 0x58e4a740; |
| 523 |
| 524 | int64_t req_msg_id; |
| 525 |
| 526 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 527 | void serializeToStream(NativeByteBuffer *stream); |
| 528 | }; |
| 529 |
| 530 | class TL_get_future_salts : public TLObject { |
| 531 |
| 532 | public: |
| 533 | static const uint32_t constructor = 0xb921bd04; |
| 534 |
| 535 | int32_t num; |
| 536 |
| 537 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 538 | void serializeToStream(NativeByteBuffer *stream); |
| 539 | }; |
| 540 |
| 541 | class TL_ping : public TLObject { |
| 542 |
| 543 | public: |
| 544 | static const uint32_t constructor = 0x7abe77ec; |
| 545 |
| 546 | int64_t ping_id; |
| 547 |
| 548 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 549 | void serializeToStream(NativeByteBuffer *stream); |
| 550 | }; |
| 551 |
| 552 | class TL_ping_delay_disconnect : public TLObject { |
| 553 |
| 554 | public: |
| 555 | static const uint32_t constructor = 0xf3427b8c; |
| 556 |
| 557 | int64_t ping_id; |
| 558 | int32_t disconnect_delay; |
| 559 |
| 560 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 561 | void serializeToStream(NativeByteBuffer *stream); |
| 562 | }; |
| 563 |
| 564 | class TL_destroy_session : public TLObject { |
| 565 |
| 566 | public: |
| 567 | static const uint32_t constructor = 0xe7512126; |
| 568 |
| 569 | int64_t session_id; |
| 570 |
| 571 | TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 572 | void serializeToStream(NativeByteBuffer *stream); |
| 573 | }; |
| 574 |
| 575 | class TL_gzip_packed : public TLObject { |
| 576 |
| 577 | public: |
| 578 | static const uint32_t constructor = 0x3072cfa1; |
| 579 |
| 580 | NativeByteBuffer *packed_data_to_send = nullptr; |
| 581 | std::unique_ptr<NativeByteBuffer> packed_data; |
| 582 | std::unique_ptr<TLObject> originalRequest; |
| 583 |
| 584 | ~TL_gzip_packed(); |
| 585 | void readParams(NativeByteBuffer *stream, bool &error); |
| 586 | void serializeToStream(NativeByteBuffer *stream); |
| 587 | }; |
| 588 |
| 589 | class TL_error : public TLObject { |
| 590 |
| 591 | public: |
| 592 | static const uint32_t constructor = 0xc4b9f9bb; |
| 593 |
| 594 | int32_t code; |
| 595 | std::string text; |
| 596 |
| 597 | static TL_error *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 598 | void readParams(NativeByteBuffer *stream, bool &error); |
| 599 | void serializeToStream(NativeByteBuffer *stream); |
| 600 | }; |
| 601 |
| 602 | class TL_invokeAfterMsg : public TLObject { |
| 603 |
| 604 | public: |
| 605 | static const uint32_t constructor = 0xcb9f372d; |
| 606 |
| 607 | int64_t msg_id; |
| 608 | TLObject *outgoingQuery = nullptr; |
| 609 | std::unique_ptr<TLObject> query; |
| 610 |
| 611 | void serializeToStream(NativeByteBuffer *stream); |
| 612 | }; |
| 613 |
| 614 | class invokeWithLayer : public TLObject { |
| 615 |
| 616 | public: |
| 617 | static const uint32_t constructor = 0xda9b0d0d; |
| 618 |
| 619 | int32_t layer; |
| 620 | std::unique_ptr<TLObject> query; |
| 621 |
| 622 | void serializeToStream(NativeByteBuffer *stream); |
| 623 | }; |
| 624 |
| 625 | class initConnection : public TLObject { |
| 626 |
| 627 | public: |
| 628 | static const uint32_t constructor = 0xc7481da6; |
| 629 |
| 630 | int32_t api_id; |
| 631 | std::string device_model; |
| 632 | std::string system_version; |
| 633 | std::string app_version; |
| 634 | std::string system_lang_code; |
| 635 | std::string lang_pack; |
| 636 | std::string lang_code; |
| 637 | std::unique_ptr<TLObject> query; |
| 638 |
| 639 | void serializeToStream(NativeByteBuffer *stream); |
| 640 | }; |
| 641 |
| 642 | class TL_ipPort : public TLObject { |
| 643 |
| 644 | public: |
| 645 | std::string ipv4; |
| 646 | uint32_t port; |
| 647 |
| 648 | void readParams(NativeByteBuffer *stream, bool &error); |
| 649 | }; |
| 650 |
| 651 | class TL_help_configSimple : public TLObject { |
| 652 |
| 653 | public: |
| 654 | static const uint32_t constructor = 0xd997c3c5; |
| 655 |
| 656 | int32_t date; |
| 657 | int32_t expires; |
| 658 | uint32_t dc_id; |
| 659 | std::vector<std::unique_ptr<TL_ipPort>> ip_port_list; |
| 660 |
| 661 | static TL_help_configSimple *TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, bool &error); |
| 662 | void readParams(NativeByteBuffer *stream, bool &error); |
| 663 | }; |
| 664 |
| 665 | #endif |
| 666 |