BMXRosterServiceProtocol Protocol Reference

Conforms to NSObject
Declared in BMXRosterServiceProtocol.h

Instance Methods

friendAddedSponsorId:recipientId:

添加好友

- (void)friendAddedSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId*

Parameters

sponsorId
发起方

recipientId
接受方

Discussion

添加好友

Declared In

  • BMXRosterServiceProtocol.h

Example:

friendAddedtoBlockListSponsorId:recipientId:

  • 添加黑名单

- (void)friendAddedtoBlockListSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId*

Parameters

sponsorId
发起方

recipientId
接受方

Discussion

  • 添加黑名单

Declared In

  • BMXRosterServiceProtocol.h

Example:

friendDidApplicationAcceptedFromSponsorId:recipientId:

  • 加好友申请被通过了
  • 用户B同意用户A的加好友请求后,用户A会收到这个回调

- (void)friendDidApplicationAcceptedFromSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId*

Parameters

sponsorId
发起方

recipientId
接受方

Discussion

  • 加好友申请被通过了
  • 用户B同意用户A的加好友请求后,用户A会收到这个回调

Declared In

  • BMXRosterServiceProtocol.h

Example:

- (void)friendDidApplicationAcceptedFromSponsorId:(long long)sponsorId recipientId:(long long)recipientId {
    [[NSNotificationCenter defaultCenter] postNotificationName:@"RefreshContactList" object:nil];
    MAXLog(@"好友已经同意请求  ,发起人%lld, 接收人%lld", sponsorId, recipientId);
}

friendDidApplicationDeclinedFromSponsorId:recipientId:reson:

  • 加好友申请被拒绝了
  • 用户B拒绝用户A的加好友请求后,用户A会收到这个回调

- (void)friendDidApplicationDeclinedFromSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId* reson:(NSString *)*reason*

Parameters

sponsorId
发起方

recipientId
接受方

reason
拒绝理由

Discussion

  • 加好友申请被拒绝了
  • 用户B拒绝用户A的加好友请求后,用户A会收到这个回调

Declared In

  • BMXRosterServiceProtocol.h

Example:

- (void)friendDidApplicationDeclinedFromSponsorId:(long long)sponsorId recipientId:(long long)recipientId reson:(NSString *)reason {
    MAXLog(@"拒绝");
}

friendDidRecivedAppliedSponsorId:recipientId:message:

  • 收到加好友申请
  • 用户B申请加A为好友后,用户A会收到这个回调

- (void)friendDidRecivedAppliedSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId* message:(NSString *)*message*

Parameters

sponsorId
发起方

recipientId
接受方

message
好友邀请信息

Discussion

  • 收到加好友申请
  • 用户B申请加A为好友后,用户A会收到这个回调

Declared In

  • BMXRosterServiceProtocol.h

Example:

- (void)friendDidRecivedAppliedSponsorId:(long long)sponsorId recipientId:(long long)recipientId message:(NSString *)message {
    MAXLog(@"已经收到申请,发起人%lld, 接收人%lld", sponsorId, recipientId);
}

friendRemovedFromBlockListSponsorId:recipientId:

  • 删除黑名单

- (void)friendRemovedFromBlockListSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId*

Parameters

sponsorId
发起方

recipientId
接受方

Discussion

  • 删除黑名单

Declared In

  • BMXRosterServiceProtocol.h

Example:

friendRemovedSponsorId:recipientId:

删除好友
  • 用户B删除与用户A的好友关系后,用户A会收到这个回调

- (void)friendRemovedSponsorId:(long long)*sponsorId* recipientId:(long long)*recipientId*

Parameters

sponsorId
发起方

recipientId
接受方

Discussion

删除好友
  • 用户B删除与用户A的好友关系后,用户A会收到这个回调

Declared In

  • BMXRosterServiceProtocol.h

Example:

- (void)friendRemovedSponsorId:(long long)sponsorId recipientId:(long long)recipientId {
    MAXLog(@"对方删除好友");
    [[NSNotificationCenter defaultCenter] postNotificationName:@"RefreshContactList" object:nil];
}

rosterInfoDidUpdate:

用户信息更新

- (void)rosterInfoDidUpdate:(BMXRoster *)*roster*

Discussion

用户信息更新

Declared In

  • BMXRosterServiceProtocol.h

Example:

- (void)rosterInfoDidUpdate:(BMXRoster *)roster {
    MAXLog(@"好友信息变更");
    [[[BMXClient sharedClient] rosterService] downloadAvatarWithRoster:roster isThumbnail:YES progress:^(int progress, BMXError *error) {
    } completion:^(BMXRoster *roster, BMXError *error) {
        MAXLog(@"下载成功");
        
        // 会话页面刷新UI
        UINavigationController *navigation = (UINavigationController *)[self.childViewControllers firstObject];
        if ([NSStringFromClass([navigation.childViewControllers firstObject].class) isEqualToString:@"MainViewController"] ) {
            
            MainViewController *mainVC = [navigation.childViewControllers firstObject];
            [mainVC getAllConversations];
        }
        
    }];

}

© 2019-2022 美信拓扑 | 官网 该文件修订时间: 2022-09-21 11:43:07

results matching ""

    No results matching ""