No Description

ChatSendHelper.h 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /************************************************************
  2. * * EaseMob CONFIDENTIAL
  3. * __________________
  4. * Copyright (C) 2013-2014 EaseMob Technologies. All rights reserved.
  5. *
  6. * NOTICE: All information contained herein is, and remains
  7. * the property of EaseMob Technologies.
  8. * Dissemination of this information or reproduction of this material
  9. * is strictly forbidden unless prior written permission is obtained
  10. * from EaseMob Technologies.
  11. */
  12. #import <Foundation/Foundation.h>
  13. @interface ChatSendHelper : NSObject
  14. /**
  15. * 发送文字消息(包括系统表情)
  16. *
  17. * @param str 发送的文字
  18. * @param username 接收方
  19. * @param isChatGroup 是否是群聊
  20. * @param requireEncryption 是否加密
  21. *
  22. * @return 封装的消息体
  23. */
  24. +(EMMessage *)sendTextMessageWithString:(NSString *)str
  25. toUsername:(NSString *)username
  26. isChatGroup:(BOOL)isChatGroup
  27. requireEncryption:(BOOL)requireEncryption;
  28. /**
  29. * 发送文字消息(包括系统表情)
  30. *
  31. * @param str 发送的文字
  32. * @param username 接收方
  33. * @param messageType 消息类型
  34. * @param requireEncryption 是否加密
  35. * @param ext 扩展信息
  36. * @return 封装的消息体
  37. */
  38. +(EMMessage *)sendTextMessageWithString:(NSString *)str
  39. toUsername:(NSString *)username
  40. messageType:(BOOL)isGroup
  41. requireEncryption:(BOOL)requireEncryption
  42. ext:(NSDictionary *)ext;
  43. /**
  44. * 发送图片消息
  45. *
  46. * @param image 发送的图片
  47. * @param username 接收方
  48. * @param isChatGroup 是否是群聊
  49. * @param requireEncryption 是否加密
  50. *
  51. * @return 封装的消息体
  52. */
  53. +(EMMessage *)sendImageMessageWithImage:(UIImage *)image
  54. toUsername:(NSString *)username
  55. isChatGroup:(BOOL)isChatGroup
  56. requireEncryption:(BOOL)requireEncryption;
  57. /**
  58. * 发送位置消息(定位)
  59. *
  60. * @param latitude 经度
  61. * @param longitude 纬度
  62. * @param address 位置描述信息
  63. * @param username 接收方
  64. * @param isChatGroup 是否是群聊
  65. * @param requireEncryption 是否加密
  66. *
  67. * @return 封装的消息体
  68. */
  69. +(EMMessage *)sendLocationLatitude:(double)latitude
  70. longitude:(double)longitude
  71. address:(NSString *)address
  72. toUsername:(NSString *)username
  73. isChatGroup:(BOOL)isChatGroup
  74. requireEncryption:(BOOL)requireEncryption;
  75. @end