NIMPassThroughOption.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // NIMPassThroughOption.h
  3. // NIMLib
  4. //
  5. // Created by Netease on 2019/12/19.
  6. // Copyright © 2019 Netease. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. typedef NS_ENUM(NSInteger, NIPassThroughHttpMethod){
  11. /*
  12. * Get
  13. */
  14. NIPassThroughHttpMethodGet = 1,
  15. /*
  16. * POST
  17. */
  18. NIPassThroughHttpMethodPost = 2,
  19. /*
  20. * Put
  21. */
  22. NIPassThroughHttpMethodPut = 3,
  23. /*
  24. * Delete
  25. */
  26. NIPassThroughHttpMethodDelete = 4,
  27. };
  28. /**
  29. * 透传的HTTP数据
  30. */
  31. @interface NIMPassThroughHttpData : NSObject
  32. /**
  33. * 映射一个视频云upstream host
  34. * 不传则用默认配置
  35. * 选填
  36. */
  37. @property (nullable, nonatomic, copy) NSString *zone;
  38. /**
  39. * url中除了host的path
  40. * 必填
  41. */
  42. @property (nonatomic, copy) NSString *path;
  43. /**
  44. * Http Method
  45. * 默认post
  46. * 选填
  47. */
  48. @property (nonatomic, assign) NIPassThroughHttpMethod method;
  49. /**
  50. * Http Header
  51. * 必须为json格式
  52. * 选填
  53. */
  54. @property (nullable, nonatomic, copy) NSString *header;
  55. /**
  56. * Http body
  57. * 格式自定
  58. * GET时必须为空, POST和PUT时必须为非空
  59. */
  60. @property (nullable, nonatomic, copy) NSString *body;
  61. @end
  62. /**
  63. * 收到的透传消息
  64. */
  65. @interface NIMPassThroughMsgData : NSObject
  66. /**
  67. * 发送方accid
  68. */
  69. @property (nullable, nonatomic, copy) NSString *fromAccid;
  70. /**
  71. * 透传内容
  72. */
  73. @property (nonatomic, copy) NSString *body;
  74. /**
  75. * 发送时间, 毫秒
  76. */
  77. @property (nonatomic, assign) int64_t time;
  78. @end
  79. NS_ASSUME_NONNULL_END