酷店

AlibcMsgBus.h 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * AlibcMsgBus.h
  3. *
  4. * 阿里百川电商
  5. * 项目名称:阿里巴巴电商 AlibcTradeCommon
  6. * 版本号:3.1.1.93
  7. * 发布时间:2017-03-06
  8. * 开发团队:阿里巴巴百川商业化团队
  9. * 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
  10. * Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
  11. */
  12. #import <Foundation/Foundation.h>
  13. #ifndef AlibcMsgBus_h
  14. #define AlibcMsgBus_h
  15. typedef NS_ENUM(NSInteger, MsgBusItemType) {
  16. MsgBusItemTypeFilter, //过滤器
  17. MsgBusItemTypeTop, //top监听,首先被串行通知,通知完后才通知normal
  18. MsgBusItemTypeNormal //普通监听,并发通知
  19. };
  20. @interface AlibcMsgBus : NSObject
  21. + (instancetype)sharedInstance;
  22. - (void)registerNotify:(NSString *)eventID target:(NSObject *)target action:(SEL)action dataType:(Class)dataType mainThread:(BOOL)bMain type:(MsgBusItemType)type;
  23. - (void)registerNotify:(NSString *)eventID target:(NSObject *)target action:(SEL)action dataType:(Class)dataType1 dataType:(Class)dataType2 mainThread:(BOOL)bMain type:(MsgBusItemType)type;
  24. - (void)registerNotify:(NSString *)eventID target:(NSObject *)target action:(SEL)action dataType:(Class)dataType1 dataType:(Class)dataType2 dataType:(Class)dataType3 mainThread:(BOOL)bMain type:(MsgBusItemType)type;
  25. - (void)unregisterEventNotifyByTarget:(NSString *)eventID target:(NSObject *)target;
  26. - (BOOL)fireEventNotify:(NSString *)eventID data:(id)data;
  27. - (BOOL)fireEventNotify:(NSString *)eventID data1:(id)data1 data2:(id)data2;
  28. - (BOOL)fireEventNotify:(NSString *)eventID data1:(id)data1 data2:(id)data2 data3:(id)data3;
  29. @end
  30. #endif