IMAPlatform+FriendShip.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // IMAPlatform+FriendShip.h
  3. // TIMChat
  4. //
  5. // Created by AlexiChen on 16/3/1.
  6. // Copyright © 2016年 AlexiChen. All rights reserved.
  7. //
  8. #import "IMAPlatform.h"
  9. #import "TableRefreshViewController.h"
  10. // 关系链相关的操作
  11. @interface IMAPlatform (FriendShip)
  12. /**
  13. * 获取用户资料
  14. *
  15. * @param users 要获取的用户列表 NSString* 列表
  16. * @param succ 成功回调,返回 IMAUser* 列表
  17. * @param fail 失败回调
  18. *
  19. * @return 0 发送请求成功
  20. */
  21. - (void)asyncSearchUserBy:(NSString *)key with:(RequestPageParamItem *)page succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  22. - (void)asyncSearchGroupBy:(NSString *)key with:(RequestPageParamItem *)page succ:(TIMGroupListSucc)succ fail:(TIMFail)fail;
  23. /**
  24. * 向用户user发送好友申请
  25. *
  26. * @param user 要添加的用户信息
  27. * @parma remark 备注名
  28. * @parma group 要加到的分组
  29. * @param succ 成功回调
  30. * @param fail 失败回调
  31. *
  32. * @return 0 发送请求成功
  33. */
  34. - (void)asyncSendAddFriend:(IMAUser *)user withRemark:(NSString *)remark applyInfo:(NSString *)apinfo toSubGroup:(IMASubGroup *)group succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  35. /**
  36. * 通过网络获取未决请求列表
  37. *
  38. * @param meta 请求信息,详细参考RequestPageParamItem
  39. * @param type 拉取类型(参考TIMPendencyGetType)
  40. * @param succ 成功回调
  41. * @param fail 失败回调
  42. *
  43. * @return 0 发送请求成功
  44. */
  45. - (void)asyncGetAllFriendPendency:(TIMFriendFutureMeta *)meta succ:(TIMGetFriendFutureListSucc)succ fail:(TIMFail)fail;
  46. - (void)asyncGetAllFutureFriends:(TIMFutureFriendType)futureFlag meta:(TIMFriendFutureMeta *)meta succ:(TIMGetFriendFutureListSucc)succ fail:(TIMFail)fail;
  47. - (void)asyncDeleteFriendPendency:(TIMFriendPendencyItem *)item succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  48. - (void)asyncFriendPendencyReport:(uint64_t)timestamp succ:(TIMSucc)succ fail:(TIMFail)fail;
  49. - (void)asyncApplyAddFriendWithId:(NSString *)userid succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  50. - (void)asyncApplyAddFriend:(IMAUser *)item succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  51. - (void)asyncApplyAddFriend:(IMAUser *)item withRemark:(NSString *)remark succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  52. - (void)asyncGetFirendInfo:(NSString *)userid succ:(void (^)(IMAUser *auser))succ fail:(TIMFail)fail;
  53. - (void)asyncGetStrangerInfo:(NSString *)userid succ:(void (^)(IMAUser *auser))succ fail:(TIMFail)fail;
  54. - (void)asyncDeleteFutureFriend:(TIMFriendFutureItem *)item succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  55. - (void)asyncApplyAddFutureFriend:(TIMFriendFutureItem *)item succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  56. - (void)asyncRefuseFutureFriend:(TIMFriendFutureItem *)item succ:(TIMFriendSucc)succ fail:(TIMFail)fail;
  57. - (void)asyncGetSystemMessages:(RequestPageParamItem *)item last:(IMAMsg*)lastMsg succ:(TIMGetMsgSucc)succ fail:(TIMFail)fail;
  58. @end