Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

57 lignes
1.9KB

  1. #ifndef _amf3_h_
  2. #define _amf3_h_
  3. #include <stdint.h>
  4. #include <stddef.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. enum AMF3DataType
  9. {
  10. AMF3_UNDEFINED = 0x00,
  11. AMF3_NULL,
  12. AMF3_FALSE,
  13. AMF3_TRUE,
  14. AMF3_INTEGER,
  15. AMF3_DOUBLE,
  16. AMF3_STRING,
  17. AMF3_XML_DOCUMENT,
  18. AMF3_DATE,
  19. AMF3_ARRAY,
  20. AMF3_OBJECT,
  21. AMF3_XML,
  22. AMF3_BYTE_ARRAY,
  23. AMF3_VECTOR_INT,
  24. AMF3_VECTOR_UINT,
  25. AMF3_VECTOR_DOUBLE,
  26. AMF3_VECTOR_OBJECT,
  27. AMF3_DICTIONARY,
  28. };
  29. //uint8_t* AMF3WriteNull(uint8_t* ptr, const uint8_t* end);
  30. //uint8_t* AMF3WriteObject(uint8_t* ptr, const uint8_t* end);
  31. //uint8_t* AMF3WriteObjectEnd(uint8_t* ptr, const uint8_t* end);
  32. //
  33. //uint8_t* AMF3WriteBoolean(uint8_t* ptr, const uint8_t* end, uint8_t value);
  34. //uint8_t* AMF3WriteInteger(uint8_t* ptr, const uint8_t* end, int32_t value);
  35. //uint8_t* AMF3WriteDouble(uint8_t* ptr, const uint8_t* end, double value);
  36. //uint8_t* AMF3WriteString(uint8_t* ptr, const uint8_t* end, const char* string, size_t length);
  37. //
  38. //uint8_t* AMF3WriteNamedBoolean(uint8_t* ptr, const uint8_t* end, const char* name, size_t length, uint8_t value);
  39. //uint8_t* AMF3WriteNamedInteger(uint8_t* ptr, const uint8_t* end, const char* name, size_t length, int32_t value);
  40. //uint8_t* AMF3WriteNamedString(uint8_t* ptr, const uint8_t* end, const char* name, size_t length, const char* value, size_t length2);
  41. //uint8_t* AM3FWriteNamedDouble(uint8_t* ptr, const uint8_t* end, const char* name, size_t length, double value);
  42. const uint8_t* AMF3ReadNull(const uint8_t* ptr, const uint8_t* end);
  43. const uint8_t* AMF3ReadBoolean(const uint8_t* ptr, const uint8_t* end);
  44. const uint8_t* AMF3ReadInteger(const uint8_t* ptr, const uint8_t* end, int32_t* value);
  45. const uint8_t* AMF3ReadDouble(const uint8_t* ptr, const uint8_t* end, double* value);
  46. const uint8_t* AMF3ReadString(const uint8_t* ptr, const uint8_t* end, char* string, uint32_t* length);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* !_amf3_h_ */