3.0.0-enterprise
This commit is contained in:
		
							parent
							
								
									9994a3939d
								
							
						
					
					
						commit
						021a262325
					
				| @ -53,5 +53,5 @@ dependencies { | ||||
|     // 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar | ||||
| //    implementation 'io.openim:core-sdk:0.0.1@aar' | ||||
| //    api 'io.openim:core-sdk:2.3.5-t44@aar' | ||||
|     implementation 'io.openim:core-sdk:3.0.0-enterprise-beta02@aar' | ||||
|     implementation 'io.openim:core-sdk:3.0.0-enterprise-beta04@aar' | ||||
| } | ||||
| @ -20,21 +20,16 @@ export 'src/listener/group_listener.dart'; | ||||
| export 'src/listener/listener_for_service.dart'; | ||||
| export 'src/listener/message_kv_info_listener.dart'; | ||||
| export 'src/listener/msg_send_progress_listener.dart'; | ||||
| export 'src/listener/organization_listener.dart'; | ||||
| export 'src/listener/put_file_listener.dart'; | ||||
| export 'src/listener/signaling_listener.dart'; | ||||
| export 'src/listener/user_listener.dart'; | ||||
| export 'src/listener/workmoments_listener.dart'; | ||||
| export 'src/manager/im_conversation_manager.dart'; | ||||
| export 'src/manager/im_friendship_manager.dart'; | ||||
| export 'src/manager/im_group_manager.dart'; | ||||
| export 'src/manager/im_manager.dart'; | ||||
| export 'src/manager/im_message_manager.dart'; | ||||
| export 'src/manager/im_offline_push_manager.dart'; | ||||
| export 'src/manager/im_organization_manager.dart'; | ||||
| export 'src/manager/im_signaling_manager.dart'; | ||||
| export 'src/manager/im_user_manager.dart'; | ||||
| export 'src/manager/im_workmoments_manager.dart'; | ||||
| export 'src/models/conversation_info.dart'; | ||||
| export 'src/models/group_info.dart'; | ||||
| export 'src/models/meeting_info.dart'; | ||||
| @ -44,6 +39,5 @@ export 'src/models/organization_info.dart'; | ||||
| export 'src/models/search_info.dart'; | ||||
| export 'src/models/signaling_info.dart'; | ||||
| export 'src/models/user_info.dart'; | ||||
| export 'src/models/workmoments_info.dart'; | ||||
| export 'src/openim.dart'; | ||||
| export 'src/utils.dart'; | ||||
|  | ||||
| @ -1,11 +0,0 @@ | ||||
| // /// 组织架构监听 | ||||
| // class OnOrganizationListener { | ||||
| //   Function()? onOrganizationUpdated; | ||||
| // | ||||
| //   OnOrganizationListener({this.onOrganizationUpdated}); | ||||
| // | ||||
| //   /// 组织架构有更新 | ||||
| //   void organizationUpdated() { | ||||
| //     onOrganizationUpdated?.call(); | ||||
| //   } | ||||
| // } | ||||
| @ -1,11 +0,0 @@ | ||||
| // /// 朋友圈监听 | ||||
| // class OnWorkMomentsListener { | ||||
| //   Function()? onRecvNewNotification; | ||||
| // | ||||
| //   OnWorkMomentsListener({this.onRecvNewNotification}); | ||||
| // | ||||
| //   /// 朋友圈信息发送改变 | ||||
| //   void recvNewNotification() { | ||||
| //     onRecvNewNotification?.call(); | ||||
| //   } | ||||
| // } | ||||
| @ -12,13 +12,8 @@ class IMManager { | ||||
|   late MessageManager messageManager; | ||||
|   late GroupManager groupManager; | ||||
|   late UserManager userManager; | ||||
| 
 | ||||
|   // late OfflinePushManager offlinePushManager; | ||||
|   late SignalingManager signalingManager; | ||||
| 
 | ||||
|   // late WorkMomentsManager workMomentsManager; | ||||
|   // late OrganizationManager organizationManager; | ||||
| 
 | ||||
|   late OnConnectListener _connectListener; | ||||
|   OnListenerForService? _listenerForService; | ||||
|   OnPutFileListener? _putFileListener; | ||||
| @ -34,10 +29,7 @@ class IMManager { | ||||
|     messageManager = MessageManager(_channel); | ||||
|     groupManager = GroupManager(_channel); | ||||
|     userManager = UserManager(_channel); | ||||
|     // offlinePushManager = OfflinePushManager(_channel); | ||||
|     signalingManager = SignalingManager(_channel); | ||||
|     // workMomentsManager = WorkMomentsManager(_channel); | ||||
|     // organizationManager = OrganizationManager(_channel); | ||||
|     _addNativeCallback(_channel); | ||||
|   } | ||||
| 
 | ||||
| @ -336,23 +328,7 @@ class IMManager { | ||||
|               signalingManager.listener.receiveCustomSignal(info); | ||||
|               break; | ||||
|           } | ||||
|         } | ||||
|         /*else if (call.method == ListenerType.workMomentsListener) { | ||||
|           String type = call.arguments['type']; | ||||
|           switch (type) { | ||||
|             case 'OnRecvNewNotification': | ||||
|               workMomentsManager.listener.recvNewNotification(); | ||||
|               break; | ||||
|           } | ||||
|         } else if (call.method == ListenerType.organizationListener) { | ||||
|           String type = call.arguments['type']; | ||||
|           switch (type) { | ||||
|             case 'onOrganizationUpdated': | ||||
|               organizationManager.listener.organizationUpdated(); | ||||
|               break; | ||||
|           } | ||||
|         }*/ | ||||
|         else if (call.method == ListenerType.customBusinessListener) { | ||||
|         } else if (call.method == ListenerType.customBusinessListener) { | ||||
|           String type = call.arguments['type']; | ||||
|           String data = call.arguments['data']; | ||||
|           switch (type) { | ||||
|  | ||||
| @ -1,7 +0,0 @@ | ||||
| // import 'package:flutter/services.dart'; | ||||
| // | ||||
| // class OfflinePushManager{ | ||||
| //   MethodChannel _channel; | ||||
| // | ||||
| //   OfflinePushManager(this._channel); | ||||
| // } | ||||
| @ -1,162 +0,0 @@ | ||||
| // import 'package:flutter/services.dart'; | ||||
| // import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; | ||||
| // | ||||
| // class OrganizationManager { | ||||
| //   MethodChannel _channel; | ||||
| //   late OnOrganizationListener listener; | ||||
| // | ||||
| //   OrganizationManager(this._channel); | ||||
| // | ||||
| //   /// 组织架构发生变化回调 | ||||
| //   Future setOrganizationListener(OnOrganizationListener listener) { | ||||
| //     this.listener = listener; | ||||
| //     return _channel.invokeMethod('setOrganizationListener', _buildParam({})); | ||||
| //   } | ||||
| // | ||||
| //   /// 获取子部门列表,返回当前部门下的一级子部门 | ||||
| //   /// [departmentID] 当前部门id | ||||
| //   /// [offset] 开始下标 | ||||
| //   /// [count] 每页大小 | ||||
| //   Future<List<DeptInfo>> getSubDept({ | ||||
| //     required String departmentID, | ||||
| //     int offset = 0, | ||||
| //     int count = 40, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getSubDepartment', | ||||
| //               _buildParam({ | ||||
| //                 'departmentID': departmentID, | ||||
| //                 'offset': offset, | ||||
| //                 'count': count, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => Utils.toList(value, (v) => DeptInfo.fromJson(v))); | ||||
| // | ||||
| //   /// 获取部门下的成员列表,返回当前部门下的一级成员 | ||||
| //   /// [departmentID] 当前部门id | ||||
| //   /// [offset] 开始下标 | ||||
| //   /// [count] 每页大小 | ||||
| //   Future<List<DeptMemberInfo>> getDeptMember({ | ||||
| //     required String departmentID, | ||||
| //     int offset = 0, | ||||
| //     int count = 40, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getDepartmentMember', | ||||
| //               _buildParam({ | ||||
| //                 'departmentID': departmentID, | ||||
| //                 'offset': offset, | ||||
| //                 'count': count, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => | ||||
| //               Utils.toList(value, (v) => DeptMemberInfo.fromJson(v))); | ||||
| // | ||||
| //   /// 获取成员所在的部门 | ||||
| //   /// [userID] 成员ID | ||||
| //   Future<List<UserInDept>> getUserInDept({ | ||||
| //     required String userID, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getUserInDepartment', | ||||
| //               _buildParam({ | ||||
| //                 'userID': userID, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => Utils.toList(value, (v) => UserInDept.fromJson(v))); | ||||
| // | ||||
| //   /// 获取部门下的子部门跟员工 | ||||
| //   /// [departmentID] 当前部门id | ||||
| //   Future<DeptMemberAndSubDept> getDeptMemberAndSubDept({ | ||||
| //     required String departmentID, | ||||
| //     // int departmentOffset = 0, | ||||
| //     // int departmentCount = 40, | ||||
| //     // int memberOffset = 0, | ||||
| //     // int memberCount = 40, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getDepartmentMemberAndSubDepartment', | ||||
| //               _buildParam({ | ||||
| //                 'departmentID': departmentID, | ||||
| //                 // 'departmentOffset': departmentOffset, | ||||
| //                 // 'departmentCount': departmentCount, | ||||
| //                 // 'memberOffset': memberOffset, | ||||
| //                 // 'memberCount': memberCount, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => | ||||
| //               Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v))); | ||||
| // | ||||
| //   /// 查询部门信息 | ||||
| //   /// [departmentID] 部门ID | ||||
| //   Future<DeptInfo> getDeptInfo({ | ||||
| //     required String departmentID, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getDepartmentInfo', | ||||
| //               _buildParam({ | ||||
| //                 'departmentID': departmentID, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => Utils.toObj(value, (v) => DeptInfo.fromJson(v))); | ||||
| // | ||||
| //   /// 搜索组织人员 | ||||
| //   /// [keyWord] 关键字 | ||||
| //   /// [isSearchUserName] 是否匹配用户名 | ||||
| //   /// [isSearchEnglishName] 是否匹配英文名 | ||||
| //   /// [isSearchPosition]  是否匹配职位 | ||||
| //   /// [isSearchUserID]  是否匹配用户ID | ||||
| //   /// [isSearchMobile]  是否匹配手机号 | ||||
| //   /// [isSearchEmail] 是否匹配邮箱号 | ||||
| //   /// [isSearchTelephone] 是否匹配电话号码 | ||||
| //   /// [offset]  开始下标 | ||||
| //   /// [count] 分页大小 | ||||
| //   Future<OrganizationSearchResult> searchOrganization({ | ||||
| //     required String keyWord, | ||||
| //     bool isSearchUserName = false, | ||||
| //     bool isSearchEnglishName = false, | ||||
| //     bool isSearchPosition = false, | ||||
| //     bool isSearchUserID = false, | ||||
| //     bool isSearchMobile = false, | ||||
| //     bool isSearchEmail = false, | ||||
| //     bool isSearchTelephone = false, | ||||
| //     int offset = 0, | ||||
| //     int count = 40, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'searchOrganization', | ||||
| //               _buildParam({ | ||||
| //                 'searchParam': { | ||||
| //                   'keyWord': keyWord, | ||||
| //                   'isSearchUserName': isSearchUserName, | ||||
| //                   'isSearchEnglishName': isSearchEnglishName, | ||||
| //                   'isSearchPosition': isSearchPosition, | ||||
| //                   'isSearchUserID': isSearchUserID, | ||||
| //                   'isSearchMobile': isSearchMobile, | ||||
| //                   'isSearchEmail': isSearchEmail, | ||||
| //                   'isSearchTelephone': isSearchTelephone, | ||||
| //                 }, | ||||
| //                 'offset': offset, | ||||
| //                 'count': count, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => | ||||
| //               Utils.toObj(value, (v) => OrganizationSearchResult.fromJson(v))); | ||||
| // | ||||
| //   static Map _buildParam(Map param) { | ||||
| //     param["ManagerName"] = "organizationManager"; | ||||
| //     return param; | ||||
| //   } | ||||
| // } | ||||
| @ -209,11 +209,11 @@ class SignalingManager { | ||||
|               Utils.toObj(value, (map) => SignalingCertificate.fromJson(map))); | ||||
| 
 | ||||
|   /// 加入会议室 | ||||
|   /// [meetingID] 会议ID | ||||
|   /// [roomID] 会议ID | ||||
|   /// [meetingName] 会议主题 | ||||
|   /// [participantNickname] 加入房间显示的名称 | ||||
|   Future<SignalingCertificate> signalingJoinMeeting({ | ||||
|     required String meetingID, | ||||
|     required String roomID, | ||||
|     String? meetingName, | ||||
|     String? participantNickname, | ||||
|     String? operationID, | ||||
| @ -223,7 +223,7 @@ class SignalingManager { | ||||
|               'signalingJoinMeeting', | ||||
|               _buildParam({ | ||||
|                 'info': { | ||||
|                   'meetingID': meetingID, | ||||
|                   'roomID': roomID, | ||||
|                   'meetingName': meetingName, | ||||
|                   'participantNickname': participantNickname, | ||||
|                 }, | ||||
| @ -300,14 +300,17 @@ class SignalingManager { | ||||
|             'operationID': Utils.checkOperationID(operationID), | ||||
|           })); | ||||
| 
 | ||||
|   Future<dynamic> getSignalingInvitationInfoStartApp({ | ||||
|   Future<SignalingInfo> getSignalingInvitationInfoStartApp({ | ||||
|     String? operationID, | ||||
|   }) => | ||||
|       _channel.invokeMethod( | ||||
|           'getSignalingInvitationInfoStartApp', | ||||
|           _buildParam({ | ||||
|             'operationID': Utils.checkOperationID(operationID), | ||||
|           })); | ||||
|       _channel | ||||
|           .invokeMethod( | ||||
|               'getSignalingInvitationInfoStartApp', | ||||
|               _buildParam({ | ||||
|                 'operationID': Utils.checkOperationID(operationID), | ||||
|               })) | ||||
|           .then((value) => | ||||
|               Utils.toObj(value, (map) => SignalingInfo.fromJson(map))); | ||||
| 
 | ||||
|   static Map _buildParam(Map param) { | ||||
|     param["ManagerName"] = "signalingManager"; | ||||
|  | ||||
| @ -1,61 +0,0 @@ | ||||
| // import 'package:flutter/services.dart'; | ||||
| // import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; | ||||
| // | ||||
| // class WorkMomentsManager { | ||||
| //   MethodChannel _channel; | ||||
| //   late OnWorkMomentsListener listener; | ||||
| // | ||||
| //   WorkMomentsManager(this._channel); | ||||
| // | ||||
| //   /// 朋友圈信息发送变化通知 | ||||
| //   Future setWorkMomentsListener(OnWorkMomentsListener listener) { | ||||
| //     this.listener = listener; | ||||
| //     return _channel.invokeMethod('setWorkMomentsListener', _buildParam({})); | ||||
| //   } | ||||
| // | ||||
| //   /// 获取朋友圈未读消息总数 | ||||
| //   Future<int> getWorkMomentsUnReadCount({ | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getWorkMomentsUnReadCount', | ||||
| //               _buildParam({ | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => Utils.toObj(value, (map) => map['unreadCount'])); | ||||
| // | ||||
| //   /// 获取通知列表 | ||||
| //   /// [offset] 开始下标 | ||||
| //   /// [count] 每页大小 | ||||
| //   Future<List<WorkMomentsInfo>> getWorkMomentsNotification({ | ||||
| //     required int offset, | ||||
| //     required int count, | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel | ||||
| //           .invokeMethod( | ||||
| //               'getWorkMomentsNotification', | ||||
| //               _buildParam({ | ||||
| //                 'offset': offset, | ||||
| //                 'count': count, | ||||
| //                 'operationID': Utils.checkOperationID(operationID), | ||||
| //               })) | ||||
| //           .then((value) => | ||||
| //               Utils.toList(value, (map) => WorkMomentsInfo.fromJson(map))); | ||||
| // | ||||
| //   /// 清除通知列表 | ||||
| //   Future clearWorkMomentsNotification({ | ||||
| //     String? operationID, | ||||
| //   }) => | ||||
| //       _channel.invokeMethod( | ||||
| //           'clearWorkMomentsNotification', | ||||
| //           _buildParam({ | ||||
| //             'operationID': Utils.checkOperationID(operationID), | ||||
| //           })); | ||||
| // | ||||
| //   static Map _buildParam(Map param) { | ||||
| //     param["ManagerName"] = "workMomentsManager"; | ||||
| //     return param; | ||||
| //   } | ||||
| // } | ||||
| @ -4,7 +4,7 @@ import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; | ||||
| 
 | ||||
| class SignalingInfo { | ||||
|   /// 操作者 | ||||
|   String? opUserID; | ||||
|   String? userID; | ||||
| 
 | ||||
|   /// 邀请信息 | ||||
|   InvitationInfo? invitation; | ||||
| @ -13,24 +13,24 @@ class SignalingInfo { | ||||
|   OfflinePushInfo? offlinePushInfo; | ||||
| 
 | ||||
|   SignalingInfo({ | ||||
|     this.opUserID, | ||||
|     this.userID, | ||||
|     this.invitation, | ||||
|     this.offlinePushInfo, | ||||
|   }); | ||||
| 
 | ||||
|   SignalingInfo.fromJson(Map<String, dynamic> json) { | ||||
|     opUserID = json['opUserID']; | ||||
|     invitation = json['invitation'] == null | ||||
|         ? null | ||||
|         : InvitationInfo.fromJson(json['invitation']); | ||||
|     offlinePushInfo = json['offlinePushInfo'] == null | ||||
|         ? null | ||||
|         : OfflinePushInfo.fromJson(json['offlinePushInfo']); | ||||
|     userID = json['userID'] ?? invitation?.inviterUserID; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final data = Map<String, dynamic>(); | ||||
|     data['opUserID'] = this.opUserID; | ||||
|     data['userID'] = this.userID; | ||||
|     data['invitation'] = this.invitation?.toJson(); | ||||
|     data['offlinePushInfo'] = this.offlinePushInfo?.toJson(); | ||||
|     return data; | ||||
| @ -78,7 +78,7 @@ class InvitationInfo { | ||||
| 
 | ||||
|   InvitationInfo.fromJson(Map<String, dynamic> json) { | ||||
|     inviterUserID = json['inviterUserID']; | ||||
|     inviteeUserIDList = json['inviteeUserIDList'].cast<String>(); | ||||
|     inviteeUserIDList = json['inviteeUserIDList']?.cast<String>(); | ||||
|     groupID = json['groupID']; | ||||
|     roomID = json['roomID']; | ||||
|     timeout = json['timeout']; | ||||
|  | ||||
| @ -1,56 +0,0 @@ | ||||
| // class WorkMomentsInfo { | ||||
| //   int? notificationMsgType; | ||||
| //   String? replyUserName; | ||||
| //   String? replyUserID; | ||||
| //   String? content; | ||||
| //   String? contentID; | ||||
| //   String? workMomentID; | ||||
| //   String? userID; | ||||
| //   String? userName; | ||||
| //   String? faceURL; | ||||
| //   String? workMomentContent; | ||||
| //   int? createTime; | ||||
| // | ||||
| //   WorkMomentsInfo( | ||||
| //       {this.notificationMsgType, | ||||
| //       this.replyUserName, | ||||
| //       this.replyUserID, | ||||
| //       this.content, | ||||
| //       this.contentID, | ||||
| //       this.workMomentID, | ||||
| //       this.userID, | ||||
| //       this.userName, | ||||
| //       this.faceURL, | ||||
| //       this.workMomentContent, | ||||
| //       this.createTime}); | ||||
| // | ||||
| //   WorkMomentsInfo.fromJson(Map<String, dynamic> json) { | ||||
| //     notificationMsgType = json['notificationMsgType']; | ||||
| //     replyUserName = json['replyUserName']; | ||||
| //     replyUserID = json['replyUserID']; | ||||
| //     content = json['content']; | ||||
| //     contentID = json['contentID']; | ||||
| //     workMomentID = json['workMomentID']; | ||||
| //     userID = json['userID']; | ||||
| //     userName = json['userName']; | ||||
| //     faceURL = json['faceURL']; | ||||
| //     workMomentContent = json['workMomentContent']; | ||||
| //     createTime = json['createTime']; | ||||
| //   } | ||||
| // | ||||
| //   Map<String, dynamic> toJson() { | ||||
| //     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
| //     data['notificationMsgType'] = this.notificationMsgType; | ||||
| //     data['replyUserName'] = this.replyUserName; | ||||
| //     data['replyUserID'] = this.replyUserID; | ||||
| //     data['content'] = this.content; | ||||
| //     data['contentID'] = this.contentID; | ||||
| //     data['workMomentID'] = this.workMomentID; | ||||
| //     data['userID'] = this.userID; | ||||
| //     data['userName'] = this.userName; | ||||
| //     data['faceURL'] = this.faceURL; | ||||
| //     data['workMomentContent'] = this.workMomentContent; | ||||
| //     data['createTime'] = this.createTime; | ||||
| //     return data; | ||||
| //   } | ||||
| // } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user