im::floo::floolib::BMXRosterServiceListener

好友变化监听者

Public Functions

Name
synchronized void delete()
void swigReleaseOwnership()
void swigTakeOwnership()
void onFriendAdded(long sponsorId, long recipientId)
添加好友
void onFriendRemoved(long sponsorId, long recipientId)
删除好友
void onApplied(long sponsorId, long recipientId, String message)
收到加好友申请
void onApplicationAccepted(long sponsorId, long recipientId)
加好友申请被通过了
void onApplicationDeclined(long sponsorId, long recipientId, String reason)
加好友申请被拒绝了
void onBlockListAdded(long sponsorId, long recipientId)
添加黑名单
void onBlockListRemoved(long sponsorId, long recipientId)
删除黑名单
void onRosterInfoUpdate(BMXRosterItem item)
用户信息更新
void onRosterListUpdate()
客户端从服务器拉取到新联系人时触发,用于用户联系人列表更新,从SDK调用本地获取联系人即可取得全部成员信息
BMXRosterServiceListener()
void registerRosterService(BMXRosterService service)

Protected Functions

Name
BMXRosterServiceListener(long cPtr, boolean cMemoryOwn)
void finalize()
void swigDirectorDisconnect()
long getCPtr(BMXRosterServiceListener obj)

Protected Attributes

Name
transient boolean swigCMemOwn

Public Functions Documentation

function delete

inline synchronized void delete()

Example:

function swigReleaseOwnership

inline void swigReleaseOwnership()

Example:

function swigTakeOwnership

inline void swigTakeOwnership()

Example:

function onFriendAdded

inline void onFriendAdded(
    long sponsorId,
    long recipientId
)

添加好友

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者

Example:

public void onFriendAdded(long sponsorId, long recipientId) {
    super.onFriendAdded(sponsorId, recipientId);
    // 添加好友
    initRoster(true);
}
public void onFriendAdded(long sponsorId, long recipientId) {
    super.onFriendAdded(sponsorId, recipientId);
    // 添加好友
    toastListener("onFriendAdded");
}

function onFriendRemoved

inline void onFriendRemoved(
    long sponsorId,
    long recipientId
)

删除好友

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者

Example:

public void onFriendRemoved(long sponsorId, long recipientId) {
    super.onFriendRemoved(sponsorId, recipientId);
    // 删除好友
    initRoster(true);
}
public void onFriendRemoved(long sponsorId, long recipientId) {
    super.onFriendRemoved(sponsorId, recipientId);
    toastListener("onFriendRemoved");
}

function onApplied

inline void onApplied(
    long sponsorId,
    long recipientId,
    String message
)

收到加好友申请

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者
  • message 好友申请消息

Example:

public void onApplied(long sponsorId, long recipientId, String message) {
    super.onApplied(sponsorId, recipientId, message);
    // 申请
}
public void onApplied(long sponsorId, long recipientId, String message) {
    super.onApplied(sponsorId, recipientId, message);
    toastListener("onApplied");
}

function onApplicationAccepted

inline void onApplicationAccepted(
    long sponsorId,
    long recipientId
)

加好友申请被通过了

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者

Example:

public void onApplicationAccepted(long sponsorId, long recipientId) {
    super.onApplicationAccepted(sponsorId, recipientId);
    // 申请被接受
}
public void onApplicationAccepted(long sponsorId, long recipientId) {
    super.onApplicationAccepted(sponsorId, recipientId);
    toastListener("onApplicationAccepted");
}

function onApplicationDeclined

inline void onApplicationDeclined(
    long sponsorId,
    long recipientId,
    String reason
)

加好友申请被拒绝了

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者
  • reason 申请拒绝原因

Example:

public void onApplicationDeclined(long sponsorId, long recipientId, String reason) {
    super.onApplicationDeclined(sponsorId, recipientId, reason);
    // 申请被拒绝
}
public void onApplicationDeclined(long sponsorId, long recipientId, String reason) {
    super.onApplicationDeclined(sponsorId, recipientId, reason);
    toastListener("onApplicationDeclined");
}

function onBlockListAdded

inline void onBlockListAdded(
    long sponsorId,
    long recipientId
)

添加黑名单

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者

Example:

public void onBlockListAdded(long sponsorId, long recipientId) {
    super.onBlockListAdded(sponsorId, recipientId);
    // 被加入黑名单
}
public void onBlockListAdded(long sponsorId, long recipientId) {
    super.onBlockListAdded(sponsorId, recipientId);
    toastListener("onBlockListAdded");
}

function onBlockListRemoved

inline void onBlockListRemoved(
    long sponsorId,
    long recipientId
)

删除黑名单

Parameters:

  • sponsorId 操作的发起者
  • recipientId 操作的接受者

Example:

public void onBlockListRemoved(long sponsorId, long recipientId) {
    super.onBlockListRemoved(sponsorId, recipientId);
    // 被移除黑名单
}
public void onBlockListRemoved(long sponsorId, long recipientId) {
    super.onBlockListRemoved(sponsorId, recipientId);
    toastListener("onBlockListRemoved");
}

function onRosterInfoUpdate

inline void onRosterInfoUpdate(
    BMXRosterItem item
)

用户信息更新

Parameters:

  • item 更新的好友信息

Example:

public void onRosterInfoUpdate(BMXRosterItem item) {
    super.onRosterInfoUpdate(item);
    // roster有更新
    initRoster(true);
}
public void onRosterInfoUpdate(BMXRosterItem item) {
    super.onRosterInfoUpdate(item);
    toastListener("onRosterInfoUpdate");
    RosterFetcher.getFetcher().putRoster(item);
    downloadRosterAvatar(item);
}

function onRosterListUpdate

inline void onRosterListUpdate()

客户端从服务器拉取到新联系人时触发,用于用户联系人列表更新,从SDK调用本地获取联系人即可取得全部成员信息

Example:

function BMXRosterServiceListener

inline BMXRosterServiceListener()

Example:

function registerRosterService

inline void registerRosterService(
    BMXRosterService service
)

Protected Functions Documentation

Example:

function BMXRosterServiceListener

inline BMXRosterServiceListener(
    long cPtr,
    boolean cMemoryOwn
)

Example:

function finalize

inline void finalize()

Example:

function swigDirectorDisconnect

inline void swigDirectorDisconnect()

Example:

function getCPtr

static inline long getCPtr(
    BMXRosterServiceListener obj
)

Protected Attributes Documentation

variable swigCMemOwn

transient boolean swigCMemOwn;

Example:


Updated on 2022-01-26 at 17:18:31 +0800

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

results matching ""

    No results matching ""