handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'getVersion':
      return getVersion();
    case 'create':
      return create(call.arguments['handle'], call.arguments['config']);
    case 'destroy':
      return destroy();
    case 'setLogConfig':
      return setLogConfig(call.arguments['logLevel']);
    case 'setCacheConfig':
      return setCacheConfig();
    case 'setAdvancedConfig':
      return setAdvancedConfig(
          call.arguments['key'], call.arguments['value']);
    case 'login':
      return login(call.arguments['userID'], call.arguments['config']);
    case 'logout':
      return logout();
    case 'createRoom':
      return createRoom(call.arguments['roomInfo'], null);
    case 'enterRoom':
      return enterRoom(call.arguments['roomInfo'], call.arguments['config']);
    case 'joinRoom':
      return joinRoom(call.arguments['roomID']);
    case 'leaveRoom':
      return leaveRoom(call.arguments['roomID']);
    case 'queryRoomMemberList':
      return queryRoomMemberList(
          call.arguments['roomID'], call.arguments['config']);
    case 'queryRoomOnlineMemberCount':
      return queryRoomOnlineMemberCount(call.arguments['roomID']);
    case 'queryRoomAllAttributes':
      return queryRoomAllAttributes(call.arguments['roomID']);
    case 'setRoomAttributes':
      return setRoomAttributes(call.arguments['roomAttributes'],
          call.arguments['roomID'], call.arguments['config']);
    case 'deleteRoomAttributes':
      return deleteRoomAttributes(call.arguments['keys'],
          call.arguments['roomID'], call.arguments['config']);
    case 'beginRoomAttributesBatchOperation':
      return beginRoomAttributesBatchOperation(
          call.arguments['roomID'], call.arguments['config']);
    case 'endRoomAttributesBatchOperation':
      return endRoomAttributesBatchOperation(call.arguments['roomID']);
    case 'createRoomWithConfig':
      return createRoom(call.arguments['roomInfo'], call.arguments['config']);
    case 'renewToken':
      return renewToken(call.arguments['token']);
    case 'queryUsersInfo':
      return queryUsersInfo(
          call.arguments['userIDs'], call.arguments['config']);
    case 'queryConversationList':
      return queryConversationList(
          call.arguments['config'], call.arguments['option']);
    case 'updateUserName':
      return updateUserName(call.arguments['userName']);
    case 'updateUserAvatarUrl':
      return updateUserAvatarUrl(call.arguments['userAvatarUrl']);
    case 'updateUserExtendedData':
      return updateUserExtendedData(call.arguments['extendedData']);
    case 'clearConversationUnreadMessageCount':
      return clearConversationUnreadMessageCount(
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'clearConversationTotalUnreadMessageCount':
      return clearConversationTotalUnreadMessageCount();
    case 'queryHistoryMessage':
      return queryHistoryMessage(call.arguments['conversationID'],
          call.arguments['conversationType'], call.arguments['config']);
    case 'sendMediaMessage':
      return sendMediaMessage(
          call.arguments['message'],
          call.arguments['toConversationID'],
          call.arguments['conversationType'],
          call.arguments['config'],
          call.arguments['messageID'],
          call.arguments['progressID'],
          call.arguments['messageAttachedCallbackID']);
    case 'downloadMediaFile':
      return downloadMediaFile(call.arguments['message'],
          call.arguments['fileType'], call.arguments['progressID']);
    // case 'sendPeerMessage':
    //   return sendPeerMessage(call.arguments['message'],
    //       call.arguments['toUserID'], call.arguments['config']);
    // case 'sendRoomMessage':
    //   return sendRoomMessage(call.arguments['message'],
    //       call.arguments['toRoomID'], call.arguments['config']);
    // case 'sendGroupMessage':
    //   return sendGroupMessage(call.arguments['message'],
    //       call.arguments['toGroupID'], call.arguments['config']);
    case 'deleteMessages':
      return deleteMessages(
          call.arguments['messageList'],
          call.arguments['conversationID'],
          call.arguments['conversationType'],
          call.arguments['config']);
    case 'deleteAllMessage':
      return deleteAllMessage(call.arguments['conversationID'],
          call.arguments['conversationType'], call.arguments['config']);
    case 'createGroup':
      return createGroup(call.arguments['groupInfo'],
          call.arguments['userIDs'], call.arguments['config']);
    case 'joinGroup':
      return joinGroup(call.arguments['groupID']);
    case 'leaveGroup':
      return leaveGroup(call.arguments['groupID']);
    case 'dismissGroup':
      return dismissGroup(call.arguments['groupID']);
    case 'inviteUsersIntoGroup':
      return inviteUsersIntoGroup(
          call.arguments['userIDs'], call.arguments['groupID']);
    case 'kickGroupMembers':
      return kickGroupMembers(
          call.arguments['userIDs'], call.arguments['groupID']);
    case 'transferGroupOwner':
      return transferGroupOwner(
          call.arguments['toUserID'], call.arguments['groupID']);
    case 'updateGroupName':
      return updateGroupName(
          call.arguments['groupName'], call.arguments['groupID']);
    case 'updateGroupAvatarUrl':
      return updateGroupAvatarUrl(
          call.arguments['groupAvatarUrl'], call.arguments['groupID']);
    case 'updateGroupNotice':
      return updateGroupNotice(
          call.arguments['groupNotice'], call.arguments['groupID']);
    case 'queryGroupInfo':
      return queryGroupInfo(call.arguments['groupID']);
    case 'queryGroupList':
      return queryGroupList();
    case 'setGroupAttributes':
      return setGroupAttributes(
          call.arguments['groupAttributes'], call.arguments['groupID']);
    case 'deleteGroupAttributes':
      return deleteGroupAttributes(
          call.arguments['keys'], call.arguments['groupID']);
    case 'queryGroupAttributes':
      return queryGroupAttributes(
          call.arguments['keys'], call.arguments['groupID']);
    case 'queryGroupAllAttributes':
      return queryGroupAllAttributes(call.arguments['groupID']);
    case 'setGroupMemberRole':
      return setGroupMemberRole(call.arguments['role'],
          call.arguments['forUserID'], call.arguments['groupID']);
    case 'setGroupMemberNickname':
      return setGroupMemberNickname(call.arguments['nickname'],
          call.arguments['forUserID'], call.arguments['groupID']);
    case 'queryGroupMemberInfo':
      return queryGroupMemberInfo(
          call.arguments['userID'], call.arguments['groupID']);
    case 'queryGroupMemberList':
      return queryGroupMemberList(
          call.arguments['groupID'], call.arguments['config']);
    case 'deleteConversation':
      return deleteConversation(call.arguments['conversationID'],
          call.arguments['conversationType'], call.arguments['config']);
    case 'deleteAllConversations':
      return deleteAllConversations(call.arguments['config']);
    case 'setConversationNotificationStatus':
      return setConversationNotificationStatus(
          call.arguments['status'],
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'callInvite':
      return callInvite(call.arguments['invitees'], call.arguments['config']);
    case 'callCancel':
      return callCancel(call.arguments['invitees'], call.arguments['callID'],
          call.arguments['config']);
    case 'callAccept':
      return callAccept(call.arguments['callID'], call.arguments['config']);
    case 'callReject':
      return callReject(call.arguments['callID'], call.arguments['config']);
    case 'callQuit':
      return callQuit(call.arguments['callID'], call.arguments['config']);
    case 'callEnd':
      return callEnd(call.arguments['callID'], call.arguments['config']);
    case 'callJoin':
      return callJoin(call.arguments['callID'], call.arguments['config']);
    case 'callingInvite':
      return callingInvite(call.arguments['invitees'],
          call.arguments['callID'], call.arguments['config']);
    case 'queryCallInvitationList':
      return queryCallInvitationList(call.arguments['config']);
    case 'queryRoomMemberAttributesList':
      return queryRoomMemberAttributesList(
          call.arguments['roomID'], call.arguments['config']);
    case 'queryRoomMembersAttributes':
      return queryRoomMembersAttributes(
          call.arguments['userIDs'], call.arguments['roomID']);
    case 'sendMessage':
      return sendMessage(
          call.arguments['message'],
          call.arguments['toConversationID'],
          call.arguments['conversationType'],
          call.arguments['config'],
          call.arguments['messageAttachedCallbackID'],
          call.arguments['messageID']);
    case 'insertMessageToLocalDB':
      return insertMessageToLocalDB(
          call.arguments['message'],
          call.arguments['messageID'],
          call.arguments['conversationID'],
          call.arguments['conversationType'],
          call.arguments['senderUserID']);
    case 'setRoomMembersAttributes':
      return setRoomMembersAttributes(
          call.arguments['attributes'],
          call.arguments['roomID'],
          call.arguments['userIDs'],
          call.arguments['config']);
    case 'sendConversationMessageReceiptRead':
      return sendConversationMessageReceiptRead(
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'sendMessageReceiptsRead':
      return sendMessageReceiptsRead(
          call.arguments['messageList'],
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'queryMessageReceiptsInfo':
      return queryMessageReceiptsInfo(
          call.arguments['messageList'],
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'queryGroupMessageReceiptReadMemberList':
      return queryGroupMessageReceiptReadMemberList(call.arguments['message'],
          call.arguments['groupID'], call.arguments['config']);
    case 'queryGroupMessageReceiptUnreadMemberList':
      return queryGroupMessageReceiptUnreadMemberList(
          call.arguments['message'],
          call.arguments['groupID'],
          call.arguments['config']);
    case 'revokeMessage':
      return revokeMessage(
          call.arguments['message'], call.arguments['config']);
    case 'queryConversationPinnedList':
      return queryConversationPinnedList(call.arguments['config']);
    case 'updateConversationPinnedState':
      return updateConversationPinnedState(
          call.arguments['isPinned'],
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'queryRoomMembers':
      return queryRoomMembers(
          call.arguments['userIDs'], call.arguments['roomID']);
    case 'queryConversation':
      return queryConversation(call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'searchLocalConversations':
      return searchLocalConversations(call.arguments['config']);
    case 'searchGlobalLocalMessages':
      return searchGlobalLocalMessages(call.arguments['config']);
    case 'searchLocalMessages':
      return searchLocalMessages(call.arguments['conversationID'],
          call.arguments['conversationType'], call.arguments['config']);
    case 'searchLocalGroups':
      return searchLocalGroups(call.arguments['config']);
    case 'searchLocalGroupMembers':
      return searchLocalGroupMembers(
          call.arguments['groupID'], call.arguments['config']);
    case 'addMessageReaction':
      return addMessageReaction(
          call.arguments['reactionType'], call.arguments['message']);
    case 'deleteMessageReaction':
      return deleteMessageReaction(
          call.arguments['reactionType'], call.arguments['message']);
    case 'queryMessageReactionUserList':
      return queryMessageReactionUserList(
          call.arguments['message'], call.arguments['config']);
    case 'setGeofencingConfig':
      return setGeofencingConfig(
          call.arguments['areaList'], call.arguments['type']);
    case 'setConversationDraft':
      return setConversationDraft(
          call.arguments['draft'],
          call.arguments['conversationID'],
          call.arguments['conversationType']);

    case 'muteGroup':
      return muteGroup(call.arguments['isMute'], call.arguments['groupID'],
          call.arguments['config']);
    case 'muteGroupMembers':
      return muteGroupMembers(
          call.arguments['isMute'],
          call.arguments['userIDs'],
          call.arguments['groupID'],
          call.arguments['config']);
    case 'queryGroupMemberMutedList':
      return queryGroupMemberMutedList(
          call.arguments['groupID'], call.arguments['config']);
    case 'addFriend':
      return addFriend(call.arguments['userID'], call.arguments['config']);
    case 'deleteFriends':
      return deleteFriends(
          call.arguments['userIDs'], call.arguments['config']);
    case 'checkFriendsRelation':
      return checkFriendsRelation(
          call.arguments['userIDs'], call.arguments['config']);
    case 'updateFriendAlias':
      return updateFriendAlias(
          call.arguments['friendAlias'], call.arguments['userID']);
    case 'updateFriendAttributes':
      return updateFriendAttributes(
          call.arguments['friendAttributes'], call.arguments['userID']);
    case 'acceptFriendApplication':
      return acceptFriendApplication(
          call.arguments['userID'], call.arguments['config']);
    case 'rejectFriendApplication':
      return rejectFriendApplication(
          call.arguments['userID'], call.arguments['config']);
    case 'queryFriendsInfo':
      return queryFriendsInfo(call.arguments['userIDs']);
    case 'queryFriendList':
      return queryFriendList(call.arguments['config']);
    case 'queryFriendApplicationList':
      return queryFriendApplicationList(call.arguments['config']);
    case 'addUsersToBlacklist':
      return addUsersToBlacklist(call.arguments['userIDs']);
    case 'removeUsersFromBlacklist':
      return removeUsersFromBlacklist(call.arguments['userIDs']);
    case 'checkUserIsInBlackList':
      return checkUserIsInBlacklist(call.arguments['userID']);
    case 'queryBlackList':
      return queryBlacklist(call.arguments['config']);
    case 'deleteAllConversationMessages':
      return deleteAllConversationMessages(call.arguments['config']);
    case 'queryCombineMessageDetail':
      return queryCombineMessageDetail(call.arguments['message']);
    case 'searchLocalFriends':
      return searchLocalFriends(call.arguments['config']);
    case 'sendFriendApplication':
      return sendFriendApplication(
          call.arguments['userID'], call.arguments['config']);
    case 'updateUserOfflinePushRule':
      return updateUserOfflinePushRule(call.arguments['offlinePushRule']);
    case 'querySelfUserInfo':
      return querySelfUserInfo();
    case 'replyMessage':
      return replyMessage(
          call.arguments['message'],
          call.arguments['toOriginalMessage'],
          call.arguments['config'],
          call.arguments['progressID'],
          call.arguments['messageAttachedCallbackID']);
    case 'queryMessageRepliedList':
      return queryMessageRepliedList(
          call.arguments['message'], call.arguments['config']);
    case 'queryConversationTotalUnreadCount':
      return queryConversationTotalUnreadMessageCount(
          call.arguments['config']);
    case 'updateGroupJoinMode':
      return updateGroupJoinMode(
          call.arguments['mode'], call.arguments['groupID']);
    case 'updateGroupInviteMode':
      return updateGroupInviteMode(
          call.arguments['mode'], call.arguments['groupID']);
    case 'updateGroupBeInviteMode':
      return updateGroupBeInviteMode(
          call.arguments['mode'], call.arguments['groupID']);
    case 'sendGroupJoinApplication':
      return sendGroupJoinApplication(
          call.arguments['groupID'], call.arguments['config']);
    case 'acceptGroupJoinApplication':
      return acceptGroupJoinApplication(call.arguments['userID'],
          call.arguments['groupID'], call.arguments['config']);
    case 'rejectGroupJoinApplication':
      return rejectGroupJoinApplication(call.arguments['userID'],
          call.arguments['groupID'], call.arguments['config']);
    case 'sendGroupInviteApplications':
      return sendGroupInviteApplications(call.arguments['userIDs'],
          call.arguments['groupID'], call.arguments['config']);
    case 'acceptGroupInviteApplication':
      return acceptGroupInviteApplication(call.arguments['inviterUserID'],
          call.arguments['groupID'], call.arguments['config']);
    case 'rejectGroupInviteApplication':
      return rejectGroupInviteApplication(call.arguments['inviterUserID'],
          call.arguments['groupID'], call.arguments['config']);
    case 'queryGroupApplicationList':
      return queryGroupApplicationList(call.arguments['config']);
    case 'updateGroupAlias':
      return updateGroupAlias(
          call.arguments['groupAlias'], call.arguments['groupID']);
    case 'writeLog':
      return writeLog(call.arguments['logString']);
    case 'queryMessages':
      return queryMessages(
          call.arguments['messageSeqs'],
          call.arguments['conversationID'],
          call.arguments['conversationType']);
    case 'setConversationMark':
      return setConversationMark(call.arguments['markType'],
          call.arguments['enable'], call.arguments['infos']);
    case 'subscribeUsersStatus':
      return subscribeUsersStatus(
          call.arguments['userIDs'], call.arguments['config']);
    case 'unsubscribeUsersStatus':
      return unsubscribeUsersStatus(call.arguments['userIDs']);
    case 'querySubscribedUserStatusList':
      return querySubscribedUserStatusList(call.arguments['config']);
    case 'queryUsersStatus':
      return queryUsersStatus(call.arguments['userIDs']);
    case 'switchRoom':
      return switchRoom(
          call.arguments['fromRoomID'],
          call.arguments['toRoomInfo'],
          call.arguments['isCreateWhenRoomNotExisted'],
          call.arguments['config']);

    default:
      throw PlatformException(
        code: 'Unimplemented',
        details: 'zim for web doesn\'t implement \'${call.method}\'',
      );
  }
}