EaseMessageReadManager.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /************************************************************
  2. * * Hyphenate CONFIDENTIAL
  3. * __________________
  4. * Copyright (C) 2016 Hyphenate Inc. All rights reserved.
  5. *
  6. * NOTICE: All information contained herein is, and remains
  7. * the property of Hyphenate Inc.
  8. * Dissemination of this information or reproduction of this material
  9. * is strictly forbidden unless prior written permission is obtained
  10. * from Hyphenate Inc.
  11. */
  12. #import <Foundation/Foundation.h>
  13. #import "MWPhotoBrowser.h"
  14. #import "EaseMessageModel.h"
  15. typedef void (^FinishBlock)(BOOL success);
  16. typedef void (^PlayBlock)(BOOL playing, EaseMessageModel *messageModel);
  17. @class EMChatFireBubbleView;
  18. @interface EaseMessageReadManager : NSObject<MWPhotoBrowserDelegate>
  19. @property (strong, nonatomic) MWPhotoBrowser *photoBrowser;
  20. @property (strong, nonatomic) FinishBlock finishBlock;
  21. @property (strong, nonatomic) EaseMessageModel *audioMessageModel;
  22. + (id)defaultManager;
  23. /*!
  24. @method
  25. @brief 显示图片消息原图
  26. @discussion
  27. @param imageArray 原图数组,需要传入UIImage对象
  28. @return
  29. */
  30. - (void)showBrowserWithImages:(NSArray *)imageArray;
  31. /*!
  32. @method
  33. @brief 语音消息是否可以播放
  34. @discussion 若传入的语音消息正在播放,停止播放并重置isMediaPlaying,返回NO;否则当前语音消息isMediaPlaying设为yes,记录的上一条语音消息isMediaPlaying重置,更新消息ext,返回yes
  35. @param messageModel 选中的语音消息model
  36. @param updateCompletion 语音消息model更新后的回调
  37. @return
  38. */
  39. - (BOOL)prepareMessageAudioModel:(EaseMessageModel *)messageModel
  40. updateViewCompletion:(void (^)(EaseMessageModel *prevAudioModel, EaseMessageModel *currentAudioModel))updateCompletion;
  41. /*!
  42. @method
  43. @brief 重置正在播放状态为NO,返回对应的语音消息model
  44. @discussion 重置正在播放状态为NO,返回对应的语音消息model,若当前记录的消息不为语音消息,返回nil
  45. @return 返回修改后的语音消息model
  46. */
  47. - (EaseMessageModel *)stopMessageAudioModel;
  48. @end