NIMKit.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. //
  2. // NIMKit.h
  3. // NIMKit
  4. //
  5. // Created by amao on 8/14/15.
  6. // Copyright (c) 2015 NetEase. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. //! Project version number for NIMKit.
  10. FOUNDATION_EXPORT double NIMKitVersionNumber;
  11. //! Project version string for NIMKit.
  12. FOUNDATION_EXPORT const unsigned char NIMKitVersionString[];
  13. // In this header, you should import all the public headers of your framework using statements like #import <NIMKit/PublicHeader.h>
  14. #import <NIMSDK/NIMSDK.h>
  15. /**
  16. * 基础Model
  17. */
  18. #import "NIMKitInfo.h"
  19. #import "NIMMediaItem.h" //多媒体面板对象
  20. #import "NIMMessageModel.h" //message Wrapper
  21. /**
  22. * 协议
  23. */
  24. #import "NIMKitMessageProvider.h"
  25. #import "NIMCellConfig.h" //message cell配置协议
  26. #import "NIMInputProtocol.h" //输入框回调
  27. #import "NIMKitDataProvider.h" //APP内容提供器
  28. #import "NIMMessageCellProtocol.h" //message cell事件回调
  29. #import "NIMSessionConfig.h" //会话页面配置
  30. #import "NIMKitEvent.h" //点击事件封装类
  31. #import "NIMCellLayoutConfig.h"
  32. /**
  33. * 消息cell的视觉模板
  34. */
  35. #import "NIMSessionMessageContentView.h"
  36. /**
  37. * UI 配置器
  38. */
  39. #import "NIMKitConfig.h"
  40. /**
  41. * 会话页
  42. */
  43. #import "NIMSessionViewController.h"
  44. /**
  45. * 会话列表页
  46. */
  47. #import "NIMSessionListViewController.h"
  48. /*
  49. * 机器人消息模板解析器
  50. */
  51. #import "NIMKitRobotDefaultTemplateParser.h"
  52. /*
  53. * 独立聊天室模式下需注入的信息
  54. */
  55. #import "NIMKitIndependentModeExtraInfo.h"
  56. @interface NIMKit : NSObject
  57. + (instancetype)sharedKit;
  58. /**
  59. * 注册自定义的排版配置,通过注册自定义排版配置来实现自定义消息的定制化排版
  60. */
  61. - (void)registerLayoutConfig:(NIMCellLayoutConfig *)layoutConfig;
  62. /**
  63. * 返回当前的排版配置
  64. */
  65. - (id<NIMCellLayoutConfig>)layoutConfig;
  66. /**
  67. * UI 配置器
  68. */
  69. @property (nonatomic,strong) NIMKitConfig *config;
  70. /**
  71. * 内容提供者,由上层开发者注入。如果没有则使用默认 provider
  72. */
  73. @property (nonatomic,strong) id<NIMKitDataProvider> provider;
  74. /**
  75. * 由于在独立聊天室模式下, IM 部分服务不可用,需要上层注入一些额外信息供组件显示使用。 默认为 nil,上层在独立聊天室模式下注入,注入时需要创建此对象并注入对象相关字段信息。
  76. *
  77. * 此字段需要配合默认的 NIMKitDataProvider ( NIMKitDataProviderImpl ) 使用,如果上层自己定义了 provider , 则忽略此字段。
  78. */
  79. @property (nonatomic,strong) NIMKitIndependentModeExtraInfo *independentModeExtraInfo;
  80. /**
  81. * NIMKit图片资源所在的 bundle 名称。
  82. */
  83. @property (nonatomic,copy) NSString *resourceBundleName;
  84. /**
  85. * NIMKit表情资源所在的 bundle 名称。
  86. */
  87. @property (nonatomic,copy) NSString *emoticonBundleName;
  88. /**
  89. * 机器人消息模板解析器
  90. */
  91. @property (nonatomic,strong) NIMKitRobotDefaultTemplateParser *robotTemplateParser;
  92. /**
  93. * 用户信息变更通知接口
  94. *
  95. * @param userIds 用户 id 集合
  96. */
  97. - (void)notfiyUserInfoChanged:(NSArray *)userIds;
  98. /**
  99. * 群信息变更通知接口
  100. *
  101. * @param teamIds 群 id 集合
  102. */
  103. - (void)notifyTeamInfoChanged:(NSArray *)teamIds;
  104. /**
  105. * 群成员变更通知接口
  106. *
  107. * @param teamIds 群id
  108. */
  109. - (void)notifyTeamMemebersChanged:(NSArray *)teamIds;
  110. /**
  111. * 返回用户信息
  112. */
  113. - (NIMKitInfo *)infoByUser:(NSString *)userId
  114. option:(NIMKitInfoFetchOption *)option;
  115. /**
  116. * 返回群信息
  117. */
  118. - (NIMKitInfo *)infoByTeam:(NSString *)teamId
  119. option:(NIMKitInfoFetchOption *)option;
  120. @end