im::floo::floolib::BMXRosterServiceListener

Friend change listener

Public Functions

Name
synchronized void delete()
void swigReleaseOwnership()
void swigTakeOwnership()
void onFriendAdded(long sponsorId, long recipientId)
Add friend
void onFriendRemoved(long sponsorId, long recipientId)
Delete friend
void onApplied(long sponsorId, long recipientId, String message)
Request of adding friend received
void onApplicationAccepted(long sponsorId, long recipientId)
Request of adding friend approved
void onApplicationDeclined(long sponsorId, long recipientId, String reason)
Request of adding friend rejected
void onBlockListAdded(long sponsorId, long recipientId)
Add to blacklist
void onBlockListRemoved(long sponsorId, long recipientId)
Delete blacklist
void onRosterInfoUpdate(BMXRosterItem item)
Update user information
void onRosterListUpdate()
Triggered when client pulls new contact from server, used to update user contact list, and call local fetching contact via SDK for all member information
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
)

Add friend

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient

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
)

Delete friend

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient

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
)

Request of adding friend received

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient
  • message Friend request 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
)

Request of adding friend approved

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient

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
)

Request of adding friend rejected

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient
  • reason Reason for application rejection

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
)

Add to blacklist

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient

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
)

Delete blacklist

Parameters:

  • sponsorId Operation initiator
  • recipientId Operation recipient

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
)

Update user information

Parameters:

  • item Updated friend information

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()

Triggered when client pulls new contact from server, used to update user contact list, and call local fetching contact via SDK for all member information

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-2024 MaximTop | Homepage | Site Map Last modified time: 2024-09-26 03:17:35

results matching ""

    No results matching ""