Attachments.h 865 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include <bfc/platform/types.h>
  3. #include "mkv_reader.h"
  4. // Attachments
  5. const uint32_t mkv_segment_attachments = 0x941a469;
  6. const uint32_t mkv_attachments_attachedfile = 0x21a7;
  7. const uint32_t mkv_attachments_filename = 0x66e;
  8. const uint32_t mkv_attachments_filemimetype = 0x660;
  9. const uint32_t mkv_attachments_filedata =0x65c;
  10. const uint32_t mkv_attachments_fileuid = 0x6ae;
  11. namespace nsmkv
  12. {
  13. class AttachedFile
  14. {
  15. public:
  16. AttachedFile()
  17. {
  18. file_uid=0;
  19. filename=0;
  20. mime_type=0;
  21. }
  22. ~AttachedFile()
  23. {
  24. free(filename);
  25. free(mime_type);
  26. }
  27. void Own(char *&field, char *value)
  28. {
  29. if (field)
  30. free(field);
  31. field = value;
  32. }
  33. uint64_t file_uid;
  34. char *filename;
  35. char *mime_type;
  36. };
  37. class Attachments
  38. {
  39. public:
  40. };
  41. uint64_t ReadAttachment(MKVReader *reader, uint64_t size, nsmkv::Attachments &attachments);
  42. }