IEMTranslateManager.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. //
  2. // IEMTranslateManager.h
  3. // HyphenateSDK
  4. //
  5. // Created by lixiaoming on 2021/11/10.
  6. // Copyright © 2021 easemob.com. All rights reserved.
  7. //
  8. #ifndef IEMTranslateManager_h
  9. #define IEMTranslateManager_h
  10. #import "EMTranslationResult.h"
  11. /*!
  12. * \~chinese
  13. * @header IEMTranslateManager.h
  14. * @abstract 翻译服务数据接口
  15. * @author Hyphenate
  16. * @version 3.00
  17. *
  18. * \~english
  19. * @header IEMTranslateManager.h
  20. * @abstract Translate service manager interface
  21. * @author Hyphenate
  22. * @version 3.00
  23. */
  24. @protocol IEMTranslateManager <NSObject>
  25. /*!
  26. * \~chinese
  27. * 设置消息的翻译信息
  28. *
  29. * @param translate 翻译信息
  30. *
  31. * \~english
  32. * Set translate info of message
  33. *
  34. * @param translate The translate info to set
  35. */
  36. - (BOOL)updateTranslate:(EMTranslationResult*)translate conversationId:(NSString*)conversationId;
  37. /*!
  38. * \~chinese
  39. * 根据消息id获取翻译信息
  40. *
  41. * @param msgId Message Id
  42. * @result translate 翻译信息
  43. *
  44. * \~english
  45. * Get translate info by messageId
  46. *
  47. * @param msgId Message Id
  48. * @result translate The translate info to set
  49. */
  50. - (EMTranslationResult*)getTranslationResultByMsgId:(NSString*)msgId;
  51. /*!
  52. * \~chinese
  53. * 获取指定条数的最新消息翻译信息
  54. *
  55. * @param count 翻译条数
  56. * @result translateResults 获取到的翻译信息
  57. *
  58. * \~english
  59. * Gets the latest message translation information for the specified number of messages
  60. *
  61. * @param count Message Id
  62. * @result translateResults The translates info getted
  63. */
  64. - (NSArray<EMTranslationResult*>*)loadTranslateResults:(NSNumber*)count;
  65. /*!
  66. * \~chinese
  67. * 根据消息ID删除翻译信息
  68. *
  69. * @param msgIds 要删除翻译信息的消息ID数组
  70. *
  71. * \~english
  72. * Remove translation infos by messageIds
  73. *
  74. * @param msgIds MessageIds to remove translation info
  75. */
  76. - (BOOL)removeTranslationsByMsgId:(NSArray<NSString*>*)msgIds;
  77. /*!
  78. * \~chinese
  79. * 根据会话ID删除翻译信息
  80. *
  81. * @param msgIds 要删除翻译信息的消息ID数组
  82. *
  83. * \~english
  84. * Remove translation infos by conversationId
  85. *
  86. * @param conversationId conversationId to remove translation info
  87. */
  88. - (BOOL)removeTranslationsByConversationId:(NSString*)conversationId;
  89. /*!
  90. * \~chinese
  91. * 删除所有的翻译信息
  92. *
  93. * \~english
  94. * Remove all translation infos
  95. *
  96. */
  97. - (BOOL)removeAllTranslations;
  98. @end
  99. #endif /* IEMTranslateManager_h */