im::floo::floolib::BMXRosterManager

Friend manager

Public Functions

Name
BMXRosterManager(BMXRosterService service)
void get(final boolean forceRefresh, final BMXDataCallBack< ListOfLongLong > callBack)
Get friend list, force pull from server-side if forceRefresh == true
void search(final long rosterId, final boolean forceRefresh, final BMXDataCallBack< BMXRosterItem > callBack)
Search for users
void search(final String name, final boolean forceRefresh, final BMXDataCallBack< BMXRosterItem > callBack)
Search for users
void search(final ListOfLongLong rosterIdList, final boolean forceRefresh, final BMXDataCallBack< BMXRosterItemList > callBack)
Batch search for users
void setItemExtension(final BMXRosterItem item, final String extension, final BMXCallBack callBack)
Update friend's local extension information
void setItemAlias(final BMXRosterItem item, final String alias, final BMXCallBack callBack)
Update friend's alias
void setItemMuteNotification(final BMXRosterItem item, final boolean status, final BMXCallBack callBack)
Set whether to reject user message
void apply(final long rosterId, final String message, final BMXCallBack callBack)
Request to add friend
void remove(final long rosterId, final BMXCallBack callBack)
Delete friend
void getApplicationList(final String cursor, final int pageSize, final BMXDataCallBack< ApplicationPage > callBack)
Get list of adding friend requests
void accept(final long rosterId, final BMXCallBack callBack)
Accept adding friend request
void decline(final long rosterId, final String reason, final BMXCallBack callBack)
Reject adding friend request
void block(final long rosterId, final BMXCallBack callBack)
Add to blacklist
void unblock(final long rosterId, final BMXCallBack callBack)
Remove from blacklist
void getBlockList(final boolean forceRefresh, final BMXDataCallBack< ListOfLongLong > callBack)
Get blacklist, force pull from server-side if forceRefresh == true
void downloadAvatar(final BMXRosterItem item, final FileProgressListener listener, final BMXCallBack callBack)
Download avatar
void addRosterListener(BMXRosterServiceListener listener)
Add friend change listener
void removeRosterListener(BMXRosterServiceListener listener)
Remove friend change listener

Public Functions Documentation

function BMXRosterManager

inline BMXRosterManager(
    BMXRosterService service
)

Example:

function get

inline void get(
    final boolean forceRefresh,
    final BMXDataCallBack< ListOfLongLong > callBack
)

Get friend list, force pull from server-side if forceRefresh == true

Parameters:

  • forceRefresh Whether to read data from server, true to force read from server, false to automatically read from server if the local read list is empty
  • callBack [BMXErrorCode] friend id list

Example:

public void get(boolean forceRefresh, BMXDataCallBack<ListOfLongLong> callBack) {
    mService.get(forceRefresh, callBack);

inline void search(
    final long rosterId,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXRosterItem > callBack
)

Search for users

Parameters:

  • rosterId Friend id to search
  • forceRefresh True to force fetch from server, false to automatically fetch from server when query result is empty.
  • callBack [BMXErrorCode] user information returned by query

Example:

public void getRosterList(long rosterId, boolean forceRefresh, BMXDataCallBack<BMXRosterItem> callBack) {
    mService.search(rosterId, forceRefresh, callBack);
public void getRosterList(String name, boolean forceRefresh, BMXDataCallBack<BMXRosterItem> callBack) {
    mService.search(name, forceRefresh, callBack);
public void getRosterList(ListOfLongLong rosterIdList, boolean forceRefresh,
                          BMXDataCallBack<BMXRosterItemList> callBack) {
    mService.search(rosterIdList, forceRefresh, callBack);

inline void search(
    final String name,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXRosterItem > callBack
)

Search for users

Parameters:

  • name Username to search
  • forceRefresh True to force fetch from server, false to automatically fetch from server when query result is empty.
  • callBack [BMXErrorCode] user information returned by query

Example:

public void getRosterList(long rosterId, boolean forceRefresh, BMXDataCallBack<BMXRosterItem> callBack) {
    mService.search(rosterId, forceRefresh, callBack);
public void getRosterList(String name, boolean forceRefresh, BMXDataCallBack<BMXRosterItem> callBack) {
    mService.search(name, forceRefresh, callBack);
public void getRosterList(ListOfLongLong rosterIdList, boolean forceRefresh,
                          BMXDataCallBack<BMXRosterItemList> callBack) {
    mService.search(rosterIdList, forceRefresh, callBack);

inline void search(
    final ListOfLongLong rosterIdList,
    final boolean forceRefresh,
    final BMXDataCallBack< BMXRosterItemList > callBack
)

Batch search for users

Parameters:

  • rosterIdList List of user ids to search
  • forceRefresh Whether to force fetch from server, true to force fetch from server
  • callBack [BMXErrorCode] List of friend information returned

Example:

public void getRosterList(long rosterId, boolean forceRefresh, BMXDataCallBack<BMXRosterItem> callBack) {
    mService.search(rosterId, forceRefresh, callBack);
public void getRosterList(String name, boolean forceRefresh, BMXDataCallBack<BMXRosterItem> callBack) {
    mService.search(name, forceRefresh, callBack);
public void getRosterList(ListOfLongLong rosterIdList, boolean forceRefresh,
                          BMXDataCallBack<BMXRosterItemList> callBack) {
    mService.search(rosterIdList, forceRefresh, callBack);

function setItemExtension

inline void setItemExtension(
    final BMXRosterItem item,
    final String extension,
    final BMXCallBack callBack
)

Update friend's local extension information

Parameters:

  • item User information
  • extension Local extension information
  • callBack [BMXErrorCode]

Example:

public void setItemExtension(BMXRosterItem item, String extension, BMXCallBack callBack) {
    mService.setItemExtension(item, extension, callBack);

function setItemAlias

inline void setItemAlias(
    final BMXRosterItem item,
    final String alias,
    final BMXCallBack callBack
)

Update friend's alias

Parameters:

  • item User information
  • alias Friend alias
  • callBack [BMXErrorCode]

Example:

public void setItemAlias(BMXRosterItem item, String alias, BMXCallBack callBack) {
    mService.setItemAlias(item, alias, callBack);

function setItemMuteNotification

inline void setItemMuteNotification(
    final BMXRosterItem item,
    final boolean status,
    final BMXCallBack callBack
)

Set whether to reject user message

Parameters:

  • item User information
  • status Whether to reject user message, true to reject, false to accept
  • callBack [BMXErrorCode]

Example:

public void setItemMuteNotification(BMXRosterItem item, boolean status, BMXCallBack callBack) {
    mService.setItemMuteNotification(item, status, callBack);

function apply

inline void apply(
    final long rosterId,
    final String message,
    final BMXCallBack callBack
)

Request to add friend

Parameters:

  • rosterId User id requested to be added
  • message Friend application information
  • callBack [BMXErrorCode]

Example:

public void apply(long rosterId, String reason, BMXCallBack callBack) {
    mService.apply(rosterId, reason, callBack);
public void apply(long rosterId, String reason, String authAnswer, BMXCallBack callBack) {
    mService.apply(rosterId, reason, authAnswer, callBack);

function remove

inline void remove(
    final long rosterId,
    final BMXCallBack callBack
)

Delete friend

Parameters:

  • rosterId Delete friend id
  • callBack [BMXErrorCode]

Example:

public void remove(long rosterId, BMXCallBack callBack) {
    mService.remove(rosterId, callBack);

function getApplicationList

inline void getApplicationList(
    final String cursor,
    final int pageSize,
    final BMXDataCallBack< ApplicationPage > callBack
)

Get list of adding friend requests

Parameters:

  • cursor Paged starting cursor, passed in as empty-valued first, followed by the cursor in the result returned by last operation
  • pageSize Page size
  • callBack [BMXErrorCode] List of friend requests returned

Example:

public void getApplicationList(String cursor, int pageSize,
        BMXDataCallBack<ApplicationPage> callBack) {
    mService.getApplicationList(cursor, pageSize, callBack);

function accept

inline void accept(
    final long rosterId,
    final BMXCallBack callBack
)

Accept adding friend request

Parameters:

  • rosterId User id to be added as a friend
  • callBack [BMXErrorCode]

Example:

public void accept(long rosterId, BMXCallBack callBack) {
    mService.accept(rosterId, callBack);

function decline

inline void decline(
    final long rosterId,
    final String reason,
    final BMXCallBack callBack
)

Reject adding friend request

Parameters:

  • rosterId User id to be added as a friend
  • reason Reason for rejection
  • callBack [BMXErrorCode]

Example:

public void decline(long rosterId, String reason, BMXCallBack callBack) {
    mService.decline(rosterId, reason, callBack);

function block

inline void block(
    final long rosterId,
    final BMXCallBack callBack
)

Add to blacklist

Parameters:

  • rosterId Blacklisted user id
  • callBack [BMXErrorCode]

Example:

public void block(long rosterId, BMXCallBack callBack) {
    mService.block(rosterId, callBack);

function unblock

inline void unblock(
    final long rosterId,
    final BMXCallBack callBack
)

Remove from blacklist

Parameters:

  • rosterId Unblacklisted user id
  • callBack [BMXErrorCode]

Example:

public void unblock(long rosterId, BMXCallBack callBack) {
    mService.unblock(rosterId, callBack);

function getBlockList

inline void getBlockList(
    final boolean forceRefresh,
    final BMXDataCallBack< ListOfLongLong > callBack
)

Get blacklist, force pull from server-side if forceRefresh == true

Parameters:

  • forceRefresh Whether to read data from server, true to force read from server, false to automatically read from server if the local read list is empty
  • callBack [BMXErrorCode] friend id list

Example:

public void getBlockList(boolean forceRefresh, BMXDataCallBack<ListOfLongLong> callBack) {
    mService.getBlockList(forceRefresh, callBack);

function downloadAvatar

inline void downloadAvatar(
    final BMXRosterItem item,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

Download avatar

Parameters:

  • item User information
  • listener Download callback function
  • callBack [BMXErrorCode]

Example:

public void downloadAvatar(BMXRosterItem item, FileProgressListener listener, BMXCallBack callBack) {
    mService.downloadAvatar(item, listener, callBack);

function addRosterListener

inline void addRosterListener(
    BMXRosterServiceListener listener
)

Add friend change listener

Parameters:

  • listener Friend change listener

Example:

public void addRosterListener(BMXRosterServiceListener listener) {
    mService.addRosterListener(listener);

function removeRosterListener

inline void removeRosterListener(
    BMXRosterServiceListener listener
)

Remove friend change listener

Parameters:

  • listener Friend change listener

Example:

public void removeRosterListener(BMXRosterServiceListener listener) {
    mService.removeRosterListener(listener);


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 ""