CustomElemCmd.h 766 B

12345678910111213141516171819202122232425262728
  1. //
  2. // CustomElemCmd.h
  3. // TIMChat
  4. //
  5. // Created by wilderliao on 16/6/22.
  6. // Copyright © 2016年 AlexiChen. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface CustomElemCmd : NSObject
  10. @property (nonatomic, assign) NSInteger userAction; // 对应CustomElemCmd命令字,必须字段
  11. @property (nonatomic, strong) NSString *actionParam; // 自定义参数字段,可为空,为空不传
  12. @property (nonatomic, strong) NSMutableDictionary *customInfo;
  13. - (NSInteger)msgType;
  14. - (instancetype)initWith:(NSInteger)command;
  15. - (instancetype)initWith:(NSInteger)command param:(NSString *)param;
  16. + (instancetype)parseCustom:(TIMCustomElem *)elem;
  17. // 将消息封装成Json,然后下发
  18. - (NSData *)packToSendData;
  19. @end