im::floo::floolib::BMXRosterService

好友Service

Public Classes

Name
class Application
好友邀请

Public Functions

Name
synchronized void delete()
[BMXErrorCode] get(ListOfLongLong list, boolean forceRefresh)
获取好友列表,如果forceRefresh == true,则强制从服务端拉取
[BMXErrorCode] fetchRosterById(long rosterId, boolean forceRefresh, BMXRosterItem item)
搜索用户
[BMXErrorCode] search(long rosterId, boolean forceRefresh, BMXRosterItem item)
搜索用户
[BMXErrorCode] fetchRosterByName(String name, boolean forceRefresh, BMXRosterItem item)
搜索用户
[BMXErrorCode] search(String name, boolean forceRefresh, BMXRosterItem item)
搜索用户
[BMXErrorCode] fetchRostersByIdList(ListOfLongLong rosterIdList, BMXRosterItemList list, boolean forceRefresh)
批量搜索用户
[BMXErrorCode] search(ListOfLongLong rosterIdList, BMXRosterItemList list, boolean forceRefresh)
批量搜索用户
[BMXErrorCode] setItemLocalExtension(BMXRosterItem item, String extension)
更新好友本地扩展信息
[BMXErrorCode] setItemExtension(BMXRosterItem item, String extension)
更新好友服务器扩展信息
[BMXErrorCode] setItemAlias(BMXRosterItem item, String alias)
更新好友别名
[BMXErrorCode] setItemMuteNotification(BMXRosterItem item, boolean status)
设置是否拒收用户消息
[BMXErrorCode] getApplicationList(ApplicationPage result, String cursor, int pageSize)
获取申请添加好友列表
[BMXErrorCode] apply(long rosterId, String message, String authAnswer)
[BMXErrorCode] apply(long rosterId, String message)
申请添加好友
[BMXErrorCode] remove(long rosterId)
删除好友
[BMXErrorCode] accept(long rosterId)
接受加好友申请
[BMXErrorCode] decline(long rosterId, String reason)
拒绝加好友申请
[BMXErrorCode] block(long rosterId)
加入黑名单
[BMXErrorCode] unblock(long rosterId)
从黑名单移除
[BMXErrorCode] getBlockList(ListOfLongLong list, boolean forceRefresh)
获取黑名单,如果forceRefresh == true,则强制从服务端拉取
[BMXErrorCode] downloadAvatar(BMXRosterItem item, boolean thumbnail, FileProgressListener listener)
下载头像
void addRosterListener(BMXRosterServiceListener listener)
添加好友变化监听者
void removeRosterListener(BMXRosterServiceListener listener)
移除好友变化监听者

Protected Functions

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

Protected Attributes

Name
transient boolean swigCMemOwn

Public Functions Documentation

function delete

inline synchronized void delete()

Example:

function get

inline BMXErrorCode get(
    ListOfLongLong list,
    boolean forceRefresh
)

获取好友列表,如果forceRefresh == true,则强制从服务端拉取

Parameters:

  • list 好友id列表,传入空列表函数返回后从此处获取返回的好友id列表
  • forceRefresh 是否从服务器读取数据,true为强制从服务器获取,false情况下本地读取列表为空的情况下会自动从服务器读取

Return: [BMXErrorCode]

Example:

function fetchRosterById

inline BMXErrorCode fetchRosterById(
    long rosterId,
    boolean forceRefresh,
    BMXRosterItem item
)

搜索用户

Parameters:

  • rosterId 搜索的好友id
  • forceRefresh 为true强制从服务器获取,为false情况下查询结果为空时自动从服务器获取。
  • item 查询返回的用户的信息,传入指向为空的shared_ptr对象函数执行后会自动赋值。

Return: [BMXErrorCode]

Example:

inline BMXErrorCode search(
    long rosterId,
    boolean forceRefresh,
    BMXRosterItem item
)

搜索用户

Parameters:

  • rosterId 搜索的好友id
  • forceRefresh 为true强制从服务器获取,为false情况下查询结果为空时自动从服务器获取。
  • item 查询返回的用户的信息,传入指向为空的shared_ptr对象函数执行后会自动赋值。

Return: [BMXErrorCode]

Example:

public BMXRosterItem getRosterListByDB(long rosterId) {
    BMXRosterItem item = new BMXRosterItem();
    BMXErrorCode error = mRosterService.search(rosterId, false, item);
    if (error == null || error.swigValue() != BMXErrorCode.NoError.swigValue()) {
        return null;
    }
    return item;

function fetchRosterByName

inline BMXErrorCode fetchRosterByName(
    String name,
    boolean forceRefresh,
    BMXRosterItem item
)

搜索用户

Parameters:

  • name 搜索的用户名
  • forceRefresh 为true强制从服务器获取,为false情况下查询结果为空时自动从服务器获取。
  • item 查询返回的用户的信息,传入指向为空的shared_ptr对象函数执行后会自动赋值。

Return: [BMXErrorCode]

Example:

inline BMXErrorCode search(
    String name,
    boolean forceRefresh,
    BMXRosterItem item
)

搜索用户

Parameters:

  • name 搜索的用户名
  • forceRefresh 为true强制从服务器获取,为false情况下查询结果为空时自动从服务器获取。
  • item 查询返回的用户的信息,传入指向为空的shared_ptr对象函数执行后会自动赋值。

Return: [BMXErrorCode]

Example:

public BMXRosterItem getRosterListByDB(long rosterId) {
    BMXRosterItem item = new BMXRosterItem();
    BMXErrorCode error = mRosterService.search(rosterId, false, item);
    if (error == null || error.swigValue() != BMXErrorCode.NoError.swigValue()) {
        return null;
    }
    return item;

function fetchRostersByIdList

inline BMXErrorCode fetchRostersByIdList(
    ListOfLongLong rosterIdList,
    BMXRosterItemList list,
    boolean forceRefresh
)

批量搜索用户

Parameters:

  • rosterIdList 需要搜索的用户id列表
  • list 返回的好友信息列表,传入空列表函数返回后从此处获取返回的好友信息列表
  • forceRefresh 是否强制从服务器获取,为true则强制从服务器获取

Return: [BMXErrorCode]

Example:

inline BMXErrorCode search(
    ListOfLongLong rosterIdList,
    BMXRosterItemList list,
    boolean forceRefresh
)

批量搜索用户

Parameters:

  • rosterIdList 需要搜索的用户id列表
  • list 返回的好友信息列表,传入空列表函数返回后从此处获取返回的好友信息列表
  • forceRefresh 是否强制从服务器获取,为true则强制从服务器获取

Return: [BMXErrorCode]

Example:

public BMXRosterItem getRosterListByDB(long rosterId) {
    BMXRosterItem item = new BMXRosterItem();
    BMXErrorCode error = mRosterService.search(rosterId, false, item);
    if (error == null || error.swigValue() != BMXErrorCode.NoError.swigValue()) {
        return null;
    }
    return item;

function setItemLocalExtension

inline BMXErrorCode setItemLocalExtension(
    BMXRosterItem item,
    String extension
)

更新好友本地扩展信息

Parameters:

  • item 用户信息
  • extension 本地扩展信息

Return: [BMXErrorCode]

Example:

function setItemExtension

inline BMXErrorCode setItemExtension(
    BMXRosterItem item,
    String extension
)

更新好友服务器扩展信息

Parameters:

  • item 用户信息
  • extension 服务器扩展信息

Return: [BMXErrorCode]

Example:

function setItemAlias

inline BMXErrorCode setItemAlias(
    BMXRosterItem item,
    String alias
)

更新好友别名

Parameters:

  • item 用户信息
  • alias 好友别名

Return: [BMXErrorCode]

Example:

function setItemMuteNotification

inline BMXErrorCode setItemMuteNotification(
    BMXRosterItem item,
    boolean status
)

设置是否拒收用户消息

Parameters:

  • item 用户信息
  • status 是否拒收用户消息,true拒收,false不拒收

Return: [BMXErrorCode]

Example:

function getApplicationList

inline BMXErrorCode getApplicationList(
    ApplicationPage result,
    String cursor,
    int pageSize
)

获取申请添加好友列表

Parameters:

  • result 返回的申请好友列表信息,传入指向为空的shared_ptr对象函数执行后会自动赋值。
  • cursor 分页获取的起始cursor,第一次传入为空,后续传入上次操作返回的result中的cursor
  • pageSize 分页大小

Return: [BMXErrorCode]

Example:

function apply

inline BMXErrorCode apply(
    long rosterId,
    String message,
    String authAnswer
)

Example:

function apply

inline BMXErrorCode apply(
    long rosterId,
    String message
)

申请添加好友

Parameters:

  • rosterId 申请添加的用户id
  • message 好友申请信息

Return: [BMXErrorCode]

Example:

function remove

inline BMXErrorCode remove(
    long rosterId
)

删除好友

Parameters:

  • rosterId 删除的好友id

Return: [BMXErrorCode]

Example:

function accept

inline BMXErrorCode accept(
    long rosterId
)

接受加好友申请

Parameters:

  • rosterId 申请加为好友的用户id

Return: [BMXErrorCode]

Example:

function decline

inline BMXErrorCode decline(
    long rosterId,
    String reason
)

拒绝加好友申请

Parameters:

  • rosterId 申请加为好友的用户id
  • reason 拒绝的原因

Return: [BMXErrorCode]

Example:

function block

inline BMXErrorCode block(
    long rosterId
)

加入黑名单

Parameters:

  • rosterId 加入黑名单的用户id

Return: [BMXErrorCode]

Example:

function unblock

inline BMXErrorCode unblock(
    long rosterId
)

从黑名单移除

Parameters:

  • rosterId 从黑名单移除的用户id

Return: [BMXErrorCode]

Example:

function getBlockList

inline BMXErrorCode getBlockList(
    ListOfLongLong list,
    boolean forceRefresh
)

获取黑名单,如果forceRefresh == true,则强制从服务端拉取

Parameters:

  • list 好友id列表,传入空列表函数返回后从此处获取返回的黑名单id列表
  • forceRefresh 是否从服务器读取数据,true为强制从服务器获取,false情况下本地读取列表为空的情况下会自动从服务器读取

Return: [BMXErrorCode]

Example:

function downloadAvatar

inline BMXErrorCode downloadAvatar(
    BMXRosterItem item,
    boolean thumbnail,
    FileProgressListener listener
)

下载头像

Parameters:

  • item 用户信息
  • thumbnail 是否下载缩略图,ture为缩略图,false为原图
  • listener 下载回调函数

Return: [BMXErrorCode]

Example:

function addRosterListener

inline void addRosterListener(
    BMXRosterServiceListener listener
)

添加好友变化监听者

Parameters:

  • listener 好友变化监听者

Example:

function removeRosterListener

inline void removeRosterListener(
    BMXRosterServiceListener listener
)

移除好友变化监听者

Parameters:

  • listener 好友变化监听者

Protected Functions Documentation

Example:

function BMXRosterService

inline BMXRosterService(
    long cPtr,
    boolean cMemoryOwn
)

Example:

function finalize

inline void finalize()

Example:

function getCPtr

static inline long getCPtr(
    BMXRosterService obj
)

Protected Attributes Documentation

variable swigCMemOwn

transient boolean swigCMemOwn;

Example:


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

© 2019-2023 美信拓扑 | 官网 该文件修订时间: 2023-08-09 14:48:15

results matching ""

    No results matching ""