EMPresence.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // EMPresence.h
  3. // HyphenateChat
  4. //
  5. // Created by lixiaoming on 2022/1/14.
  6. // Copyright © 2022 easemob.com. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. /*!
  10. * \~chinese
  11. * 在线状态详情,包括当前在线设备使用的平台以及当前在线状态。
  12. *
  13. * \~english
  14. * The presence details, including the platform used by the publisher's current online device and the current presence state.
  15. */
  16. @interface EMPresenceStatusDetail : NSObject
  17. /*!
  18. * \~chinese
  19. * 发布者的当前在线设备使用的平台,包括"ios"、"android"、"linux"、"win"和"webim"。
  20. *
  21. * \~english
  22. * The platform used by the current online device of the publisher, which can be "ios", "android", "linux", "win", or "webim".
  23. */
  24. @property (nonatomic,strong) NSString* _Nonnull device;
  25. /*!
  26. * \~chinese
  27. * 当前在线状态,0为离线,1为在线。
  28. *
  29. * \~english
  30. * The current presence state of the publisher.
  31. */
  32. @property (nonatomic) NSInteger status;
  33. @end
  34. /*!
  35. * \~chinese
  36. * 在线状态属性类,包含发布者的用户 ID、在线设备使用的平台、当前在线状态以及在线状态的扩展信息、更新时间和到期时间。
  37. *
  38. * \~english
  39. * The presence property class that contains presence properties, including the publisher's user ID and current presence state, and the platform used by the online device, as well as the presence's extension information, update time, and subscription expiration time.
  40. */
  41. @interface EMPresence: NSObject
  42. /*!
  43. * \~chinese
  44. * 在线状态发布者的用户 ID。
  45. *
  46. * \~english
  47. * The user ID of the presence publisher.
  48. */
  49. @property (nonatomic,strong) NSString*_Nonnull publisher;
  50. /*!
  51. * \~chinese
  52. * 该用户当前在线状态详情。
  53. *
  54. * \~english
  55. * The details of the current presence state.
  56. */
  57. @property (nonatomic,strong) NSArray<EMPresenceStatusDetail*>*_Nullable statusDetails;
  58. /*!
  59. * \~chinese
  60. * 在线状态描述信息,使用该字段设置自定义状态。
  61. *
  62. * \~english
  63. * The presence description information.
  64. */
  65. @property (nonatomic) NSString*_Nullable statusDescription;
  66. /*!
  67. * \~chinese
  68. * 在线状态更新时间。该时间由服务器自动生成。
  69. *
  70. * \~english
  71. * The presence update time, which is generated by the server.
  72. */
  73. @property (nonatomic) NSInteger lastTime;
  74. /*!
  75. * \~chinese
  76. * 在线状态订阅到期时间。
  77. *
  78. * \~english
  79. * The expiration time of the presence subscription.
  80. */
  81. @property (nonatomic) NSInteger expirytime;
  82. @end;