TLObject.h 768 B

123456789101112131415161718192021222324252627282930
  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. #ifndef TLOBJECT_H
  9. #define TLOBJECT_H
  10. #include <stdint.h>
  11. #include "Defines.h"
  12. class NativeByteBuffer;
  13. class TLObject {
  14. public:
  15. virtual ~TLObject();
  16. virtual void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
  17. virtual void serializeToStream(NativeByteBuffer *stream);
  18. virtual TLObject *deserializeResponse(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error);
  19. uint32_t getObjectSize();
  20. virtual bool isNeedLayer();
  21. fillParamsFunc initFunc;
  22. };
  23. #endif