2
0

WFCCThingsDataContent.m 824 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // WFCCThingsDataContent.m
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/8/16.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCCThingsDataContent.h"
  9. #import "WFCCIMService.h"
  10. #import "Common.h"
  11. @implementation WFCCThingsDataContent
  12. - (WFCCMessagePayload *)encode {
  13. WFCCMessagePayload *payload = [super encode];
  14. payload.binaryContent = self.data;
  15. return payload;
  16. }
  17. - (void)decode:(WFCCMessagePayload *)payload {
  18. [super decode:payload];
  19. self.data = payload.binaryContent;
  20. }
  21. + (int)getContentType {
  22. return THINGS_CONTENT_TYPE_DATA;
  23. }
  24. + (int)getContentFlags {
  25. return WFCCPersistFlag_NOT_PERSIST;
  26. }
  27. + (void)load {
  28. [[WFCCIMService sharedWFCIMService] registerMessageContent:self];
  29. }
  30. - (NSString *)digest:(WFCCMessage *)message {
  31. return nil;
  32. }
  33. @end