| 1 | /* |
| 2 | * This is the source code of tgnet library v. 1.1 |
| 3 | * It is licensed under GNU GPL v. 2 or later. |
| 4 | * You should have received a copy of the license in this archive (see LICENSE). |
| 5 | * |
| 6 | * Copyright Nikolai Kudashov, 2015-2018. |
| 7 | */ |
| 8 | |
| 9 | #include "TLObject.h" |
| 10 | #include "NativeByteBuffer.h" |
| 11 | |
| 12 | thread_local NativeByteBuffer *sizeCalculatorBuffer = new NativeByteBuffer(true); |
| 13 | |
| 14 | TLObject::~TLObject() { |
| 15 | |
| 16 | } |
| 17 | |
| 18 | void TLObject::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error) { |
| 19 | |
| 20 | } |
| 21 | |
| 22 | void TLObject::serializeToStream(NativeByteBuffer *stream) { |
| 23 | |
| 24 | } |
| 25 | |
| 26 | TLObject *TLObject::deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error) { |
| 27 | return nullptr; |
| 28 | } |
| 29 | |
| 30 | uint32_t TLObject::getObjectSize() { |
| 31 | sizeCalculatorBuffer->clearCapacity(); |
| 32 | serializeToStream(sizeCalculatorBuffer); |
| 33 | return sizeCalculatorBuffer->capacity(); |
| 34 | } |
| 35 | |
| 36 | bool TLObject::isNeedLayer() { |
| 37 | return false; |
| 38 | } |
| 39 | |